item

package
v0.0.0-...-4cc3681 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CategoryAmmunition               = "ammunition"
	CategoryArmor                    = "armor"
	CategoryBackpack                 = "backpack"
	CategoryBarter                   = "barter"
	CategoryClothing                 = "clothing"
	CategoryCommon                   = "common"
	CategoryContainer                = "container"
	CategoryFirearm                  = "firearm"
	CategoryFood                     = "food"
	CategoryGrenade                  = "grenade"
	CategoryHeadphone                = "headphone"
	CategoryKey                      = "key"
	CategoryMagazine                 = "magazine"
	CategoryMap                      = "map"
	CategoryMedical                  = "medical"
	CategoryMelee                    = "melee"
	CategoryModification             = "mod-other"
	CategoryModificationAuxiliary    = "auxiliary"
	CategoryModificationBarrel       = "barrel"
	CategoryModificationBipod        = "bipod"
	CategoryModificationCharge       = "charge"
	CategoryModificationDevice       = "device"
	CategoryModificationForegrip     = "foregrip"
	CategoryModificationGasblock     = "gasblock"
	CategoryModificationGoggles      = "goggles"
	CategoryModificationHandguard    = "handguard"
	CategoryModificationLauncher     = "launcher"
	CategoryModificationMount        = "mount"
	CategoryModificationMuzzle       = "muzzle"
	CategoryModificationPistolgrip   = "pistolgrip"
	CategoryModificationReceiver     = "receiver"
	CategoryModificationSight        = "sight"
	CategoryModificationSightSpecial = "sight-special"
	CategoryModificationStock        = "stock"
	CategoryMoney                    = "money"
	CategoryTacticalrig              = "tacticalrig"
)

Variables

View Source
var (
	ErrInvalidCategory = errors.New("category is not valid")
)
View Source
var (
	ErrInvalidKind = errors.New("kind is not valid")
)

Functions

func CategoryToDisplayName

func CategoryToDisplayName(s string) (string, error)

func GetItemList

func GetItemList(items ItemList, sort string) map[Kind][]Entity

func KindToCategory

func KindToCategory(k Kind) (string, error)
func Search(term string, limit int, kind *Kind) (*search.Result, error)

func SearchByName

func SearchByName(term string, limit int, kind *Kind) (*search.Result, error)

Types

type AmmoEffects

type AmmoEffects struct {
	LightBleedingChance float64 `json:"lightBleedingChance,omitempty"`
	HeavyBleedingChance float64 `json:"heavyBleedingChance,omitempty"`
}

type AmmoFrag

type AmmoFrag struct {
	Chance float64 `json:"chance"`
	Min    int64   `json:"min"`
	Max    int64   `json:"max"`
}

type AmmoGrenadeProperties

type AmmoGrenadeProperties struct {
	Delay         float64 `json:"delay"`
	FragmentCount float64 `json:"fragCount"`
	MinRadius     float64 `json:"minRadius"`
	MaxRadius     float64 `json:"maxRadius"`
}

type Ammunition

type Ammunition struct {
	Item

	Caliber             string                `json:"caliber"`
	Type                string                `json:"type"`
	Tracer              bool                  `json:"tracer"`
	TracerColor         string                `json:"tracerColor"`
	Subsonic            bool                  `json:"subsonic"`
	CasingMass          float64               `json:"casingMass"`
	BulletMass          float64               `json:"bulletMass"`
	BulletDiameter      float64               `json:"bulletDiameter"`
	Velocity            float64               `json:"velocity"`
	BallisticCoeficient float64               `json:"ballisticCoef"`
	Damage              float64               `json:"damage"`
	Penetration         float64               `json:"penetration"`
	ArmorDamage         float64               `json:"armorDamage"`
	Fragmentation       AmmoFrag              `json:"fragmentation"`
	Effects             AmmoEffects           `json:"effects"`
	Projectiles         int64                 `json:"projectiles"`
	MisfireChance       float64               `json:"misfireChance"`
	FailureToFeedChance float64               `json:"failureToFeedChance"`
	WeaponModifier      WeaponModifier        `json:"weaponModifier"`
	GrenadeProperties   AmmoGrenadeProperties `json:"grenadeProps,omitempty"`
}

func (*Ammunition) DurabilityBurnPercent

func (b *Ammunition) DurabilityBurnPercent() float64

func (*Ammunition) Heat

func (b *Ammunition) Heat() float64

type AmmunitionResult

type AmmunitionResult struct {
	*Result
	Items []Ammunition `json:"items"`
}

func (*AmmunitionResult) GetEntities

func (r *AmmunitionResult) GetEntities() []Entity

type Armor

type Armor struct {
	Item

	Type           string           `json:"type"`
	Armor          ArmorProps       `json:"armor"`
	Components     []ArmorComponent `json:"components" bson:"components"`
	RicochetChance string           `json:"ricochetChance,omitempty"`
	Penalties      Penalties        `json:"penalties"`
	Blocking       []string         `json:"blocking"`
	Slots          Slots            `json:"slots"`
	Compatibility  ItemList         `json:"compatibility"`
	Confilcts      ItemList         `json:"conflicts"`
}

func (Armor) ClassRange

func (a Armor) ClassRange() ClassRange

func (Armor) TotalDurability

func (a Armor) TotalDurability() float64

type ArmorComponent

type ArmorComponent struct {
	ArmorProps
}

type ArmorMaterial

type ArmorMaterial struct {
	Name            string  `json:"name"`
	Destructibility float64 `json:"destructibility"`
}

type ArmorProps

type ArmorProps struct {
	Class           int64         `json:"class"`
	Durability      float64       `json:"durability"`
	Material        ArmorMaterial `json:"material"`
	BluntThroughput float64       `json:"bluntThroughput"`
	Zones           []string      `json:"zones"`
}

type ArmorResult

type ArmorResult struct {
	*Result
	Items []Armor `json:"items"`
}

func (*ArmorResult) GetEntities

func (r *ArmorResult) GetEntities() []Entity

type Auxiliary

type Auxiliary struct {
	Modification

	DurabilityBurn float64 `json:"durabilityBurn"`
	HeatFactor     float64 `json:"heatFactor"`
	CoolFactor     float64 `json:"coolFactor"`
}

func (*Auxiliary) Cooling

func (a *Auxiliary) Cooling() float64

func (*Auxiliary) DurabilityBurnPercent

func (a *Auxiliary) DurabilityBurnPercent() float64

func (*Auxiliary) Heat

func (a *Auxiliary) Heat() float64

type AuxiliaryResult

type AuxiliaryResult struct {
	*Result
	Items []Auxiliary `json:"items"`
}

func (*AuxiliaryResult) GetEntities

func (r *AuxiliaryResult) GetEntities() []Entity

type Backpack

type Backpack struct {
	Item

	Capacity  int64     `json:"capacity"`
	Grids     []Grid    `json:"grids"`
	Penalties Penalties `json:"penalties"`
}

type BackpackResult

type BackpackResult struct {
	*Result
	Items []Backpack `json:"items"`
}

func (*BackpackResult) GetEntities

func (r *BackpackResult) GetEntities() []Entity

type Barrel

type Barrel struct {
	Modification

	Length         float64 `json:"length"`
	Velocity       float64 `json:"velocity"`
	Suppressor     bool    `json:"suppressor"`
	CenterOfImpact float64 `json:"centerOfImpact"`
	DurabilityBurn float64 `json:"durabilityBurn"`
	HeatFactor     float64 `json:"heatFactor"`
	CoolFactor     float64 `json:"coolFactor"`
}

func (*Barrel) AccuracyMoa

func (b *Barrel) AccuracyMoa() float64

func (*Barrel) Cooling

func (b *Barrel) Cooling() float64

func (*Barrel) DurabilityBurnPercent

func (b *Barrel) DurabilityBurnPercent() float64

func (*Barrel) Heat

func (b *Barrel) Heat() float64

type BarrelResult

type BarrelResult struct {
	*Result
	Items []Barrel `json:"items"`
}

func (*BarrelResult) GetEntities

func (r *BarrelResult) GetEntities() []Entity

type Barter

type Barter struct {
	Item
}

type BarterResult

type BarterResult struct {
	*Result
	Items []Barter `json:"items"`
}

func (*BarterResult) GetEntities

func (r *BarterResult) GetEntities() []Entity

type Bipod

type Bipod struct {
	Modification
}

type BipodResult

type BipodResult struct {
	*Result
	Items []Bipod `json:"items"`
}

func (*BipodResult) GetEntities

func (r *BipodResult) GetEntities() []Entity

type Charge

type Charge struct {
	Modification
}

type ChargeResult

type ChargeResult struct {
	*Result
	Items []Charge `json:"items"`
}

func (*ChargeResult) GetEntities

func (r *ChargeResult) GetEntities() []Entity

type ClassRange

type ClassRange struct {
	Min int64
	Max int64
}

func (ClassRange) String

func (c ClassRange) String() string

type Clothing

type Clothing struct {
	Item

	Type      string    `json:"type"`
	Blocking  []string  `json:"blocking"`
	Penalties Penalties `json:"penalties"`
	Slots     Slots     `json:"slots"`
}

type ClothingResult

type ClothingResult struct {
	*Result
	Items []Clothing `json:"items"`
}

func (*ClothingResult) GetEntities

func (r *ClothingResult) GetEntities() []Entity

type Compressor

type Compressor struct {
	Attack    float64 `json:"attack"`
	Gain      float64 `json:"gain"`
	Release   float64 `json:"release"`
	Treshhold float64 `json:"treshhold"`
	Volume    float64 `json:"volume"`
}

type Container

type Container struct {
	Item

	Capacity int64  `json:"capacity"`
	Grids    []Grid `json:"grids"`
}

type ContainerResult

type ContainerResult struct {
	*Result
	Items []Container `json:"items"`
}

func (*ContainerResult) GetEntities

func (r *ContainerResult) GetEntities() []Entity

type Device

type Device struct {
	Modification

	Type  string   `json:"type"`
	Modes []string `json:"modes"`
}

type DeviceResult

type DeviceResult struct {
	*Result
	Items []Device `json:"items"`
}

func (*DeviceResult) GetEntities

func (r *DeviceResult) GetEntities() []Entity

type Effect

type Effect struct {
	Name          string          `json:"name,omitempty"`
	ResourceCosts int64           `json:"resourceCosts"`
	FadeIn        float64         `json:"fadeIn"`
	FadeOut       float64         `json:"fadeOut"`
	Chance        float64         `json:"chance"`
	Delay         float64         `json:"delay"`
	Duration      float64         `json:"duration"`
	Value         float64         `json:"value"`
	IsPercent     bool            `json:"isPercent"`
	Removes       bool            `json:"removes"`
	Penalties     EffectPenalties `json:"penalties"`
}

type EffectPenalties

type EffectPenalties struct {
	HealthMin float64 `json:"healthMin,omitempty"`
	HealthMax float64 `json:"healthMax,omitempty"`
}

type Effects

type Effects struct {
	Energy            Effect   `json:"energy,omitempty"`
	EnergyRate        Effect   `json:"energyRate,omitempty"`
	Hydration         Effect   `json:"hydration,omitempty"`
	HydrationRate     Effect   `json:"hydrationRate,omitempty"`
	Stamina           Effect   `json:"stamina,omitempty"`
	StaminaRate       Effect   `json:"staminaRate,omitempty"`
	Health            Effect   `json:"health,omitempty"`
	HealthRate        Effect   `json:"healthRate,omitempty"`
	LightBleeding     Effect   `json:"lightBleeding,omitempty"`
	HeavyBleeding     Effect   `json:"heavyBleeding,omitempty"`
	Fracture          Effect   `json:"fracture,omitempty"`
	Contusion         Effect   `json:"contusion,omitempty"`
	Pain              Effect   `json:"pain,omitempty"`
	TunnelVision      Effect   `json:"tunnelVision,omitempty"`
	Tremor            Effect   `json:"tremor,omitempty"`
	Toxication        Effect   `json:"toxication,omitempty"`
	Antidote          Effect   `json:"antidote,omitempty"`
	RadiationExposure Effect   `json:"radExposure,omitempty"`
	BodyTemperature   Effect   `json:"bodyTemperature,omitempty"`
	Mobility          Effect   `json:"mobility,omitempty"`
	Recoil            Effect   `json:"recoil,omitempty"`
	ReloadSpeed       Effect   `json:"reloadSpeed,omitempty"`
	LootSpeed         Effect   `json:"lootSpeed,omitempty"`
	UnlockSpeed       Effect   `json:"unlockSpeed,omitempty"`
	DestroyedPart     Effect   `json:"destroyedPart,omitempty"`
	WeightLimit       Effect   `json:"weightLimit,omitempty"`
	DamageModifier    Effect   `json:"damageModifier,omitempty"`
	Skill             []Effect `json:"skill,omitempty"`
}

type Entity

type Entity interface {
	GetID() objectID
	GetKind() Kind
	GetName() string
	GetShortName() string
	GetDescription() string
}

func GetItem

func GetItem(id objectID, kind Kind) (Entity, error)

type EntityResult

type EntityResult interface {
	GetKind() Kind
	GetCount() int64
	GetEntities() []Entity
}

func GetItems

func GetItems(kind Kind, opts *api.Options) (EntityResult, error)

func GetItemsByID

func GetItemsByID(ids string, kind Kind, opts *api.Options) (EntityResult, error)

func GetItemsBySearch

func GetItemsBySearch(text string, limit int) (EntityResult, error)

type Filter

type Filter map[string][]string

func (Filter) Get

func (f Filter) Get(k string) []string

func (Filter) GetAll

func (f Filter) GetAll() map[string][]string

type Firearm

type Firearm struct {
	Item

	Type               string   `json:"type"`
	Class              string   `json:"class"`
	Caliber            string   `json:"caliber"`
	Manufacturer       string   `json:"manufacturer"`
	RateOfFire         int64    `json:"rof"`
	BurstRounds        int64    `json:"burstRounds,omitempty"`
	Action             string   `json:"action"`
	Modes              []string `json:"modes"`
	Velocity           float64  `json:"velocity"`
	EffectiveDistance  int64    `json:"effectiveDist"`
	Ergonomics         float64  `json:"ergonomicsFP"`
	FoldRectractable   bool     `json:"foldRectractable"`
	RecoilVertical     int64    `json:"recoilVertical"`
	RecoilHorizontal   int64    `json:"recoilHorizontal"`
	OperatingResources float64  `json:"operatingResources"`
	MalfunctionChance  float64  `json:"malfunctionChance"`
	DurabilityRatio    float64  `json:"durabilityRatio"`
	HeatFactor         float64  `json:"heatFactor"`
	HeatFactorByShot   float64  `json:"heatFactorByShot"`
	CoolFactor         float64  `json:"coolFactor"`
	CoolFactorMods     float64  `json:"coolFactorMods"`
	CenterOfImpact     float64  `json:"centerOfImpact"`
	Slots              Slots    `json:"slots"`
}

func (*Firearm) AccuracyMoa

func (f *Firearm) AccuracyMoa() float64

type FirearmResult

type FirearmResult struct {
	*Result
	Items []Firearm `json:"items"`
}

func (*FirearmResult) GetEntities

func (r *FirearmResult) GetEntities() []Entity

type Food

type Food struct {
	Item

	Type      string  `json:"type"`
	Resources int64   `json:"resources"`
	UseTime   float64 `json:"useTime"`
	Effects   Effects `json:"effects"`
}

type FoodResult

type FoodResult struct {
	*Result
	Items []Food `json:"items"`
}

func (*FoodResult) GetEntities

func (r *FoodResult) GetEntities() []Entity

type Foregrip

type Foregrip struct {
	Modification
}

type ForegripResult

type ForegripResult struct {
	*Result
	Items []Foregrip `json:"items"`
}

func (*ForegripResult) GetEntities

func (r *ForegripResult) GetEntities() []Entity

type GasBlock

type GasBlock struct {
	Modification

	DurabilityBurn float64 `json:"durabilityBurn"`
	HeatFactor     float64 `json:"heatFactor"`
	CoolFactor     float64 `json:"coolFactor"`
}

func (*GasBlock) Cooling

func (g *GasBlock) Cooling() float64

func (*GasBlock) DurabilityBurnPercent

func (g *GasBlock) DurabilityBurnPercent() float64

func (*GasBlock) Heat

func (g *GasBlock) Heat() float64

type GasBlockResult

type GasBlockResult struct {
	*Result
	Items []GasBlock `json:"items"`
}

func (*GasBlockResult) GetEntities

func (r *GasBlockResult) GetEntities() []Entity

type Goggles

type Goggles struct {
	Modification

	Type string `json:"type"`
}

type GogglesResult

type GogglesResult struct {
	*Result
	Items []Goggles `json:"items"`
}

func (*GogglesResult) GetEntities

func (r *GogglesResult) GetEntities() []Entity

type GogglesSpecial

type GogglesSpecial struct {
	Goggles
	OpticSpecial
}

type GogglesSpecialResult

type GogglesSpecialResult struct {
	*Result
	Items []GogglesSpecial `json:"items"`
}

func (*GogglesSpecialResult) GetEntities

func (r *GogglesSpecialResult) GetEntities() []Entity

type Grenade

type Grenade struct {
	Item

	Type              string  `json:"type"`
	Delay             float64 `json:"delay"`
	FragmentCount     float64 `json:"fragCount"`
	FragmentDamage    float64 `json:"fragDamage,omitempty"`
	MinDistance       float64 `json:"minDistance"`
	MaxDistance       float64 `json:"maxDistance"`
	ContusionDistance float64 `json:"contusionDistance"`
	Strength          float64 `json:"strength"`
	EmitTime          float64 `json:"emitTime"`
}

type GrenadeResult

type GrenadeResult struct {
	*Result
	Items []Grenade `json:"items"`
}

func (*GrenadeResult) GetEntities

func (r *GrenadeResult) GetEntities() []Entity

type Grid

type Grid struct {
	ID        string   `json:"id"`
	Height    int64    `json:"height"`
	Width     int64    `json:"width"`
	MaxWeight float64  `json:"maxWeight"`
	Filter    ItemList `json:"filter"`
}

type GridModifier

type GridModifier struct {
	Height int64 `json:"height"`
	Width  int64 `json:"width"`
}

type GridProperties

type GridProperties struct {
	Color  RGBA  `json:"color"`
	Height int64 `json:"height"`
	Width  int64 `json:"width"`
}

type Handguard

type Handguard struct {
	Modification

	HeatFactor float64 `json:"heatFactor"`
	CoolFactor float64 `json:"coolFactor"`
}

func (*Handguard) Cooling

func (h *Handguard) Cooling() float64

func (*Handguard) Heat

func (h *Handguard) Heat() float64

type HandguardResult

type HandguardResult struct {
	*Result
	Items []Handguard `json:"items"`
}

func (*HandguardResult) GetEntities

func (r *HandguardResult) GetEntities() []Entity

type Headphone

type Headphone struct {
	Item

	AmbientVolume  float64    `json:"ambientVol"`
	DryVolume      float64    `json:"dryVol"`
	Distortion     float64    `json:"distortion"`
	HighPassFilter HighPass   `json:"hpf"`
	Compressor     Compressor `json:"compressor"`
}

type HeadphoneResult

type HeadphoneResult struct {
	*Result
	Items []Headphone `json:"items"`
}

func (*HeadphoneResult) GetEntities

func (r *HeadphoneResult) GetEntities() []Entity

type HighPass

type HighPass struct {
	CutoffFrequency float64 `json:"cutoffFreq"`
	Resonance       float64 `json:"resonance"`
}

type Index

type Index struct {
	Total    int64                 `json:"total"`
	Modified timestamp             `json:"modified"`
	Kinds    map[string]*KindStats `json:"kinds"`
}

func GetIndex

func GetIndex(skipKinds bool) (*Index, error)

type Item

type Item struct {
	ID          objectID       `json:"_id"`
	Name        string         `json:"name"`
	ShortName   string         `json:"shortName"`
	Description string         `json:"description"`
	Weight      float64        `json:"weight"`
	MaxStack    int64          `json:"maxStack"`
	Grid        GridProperties `json:"grid"`
	Modified    timestamp      `json:"_modified"`
	Kind        Kind           `json:"_kind"`
}

func (Item) GetDescription

func (i Item) GetDescription() string

func (Item) GetID

func (i Item) GetID() objectID

func (Item) GetKind

func (i Item) GetKind() Kind

func (Item) GetName

func (i Item) GetName() string

func (Item) GetShortName

func (i Item) GetShortName() string

type ItemList

type ItemList map[Kind][]objectID

type ItemResult

type ItemResult struct {
	*Result
	Items []Item `json:"items"`
}

func (*ItemResult) GetEntities

func (r *ItemResult) GetEntities() []Entity

type Key

type Key struct {
	Item

	Location string `json:"location"`
	Usages   int64  `json:"usages,omitempty"`
}

type KeyResult

type KeyResult struct {
	*Result
	Items []Key `json:"items"`
}

func (*KeyResult) GetEntities

func (r *KeyResult) GetEntities() []Entity

type Kind

type Kind string
const (
	KindModification               Kind = "modification"
	KindModificationAuxiliary      Kind = "modificationAuxiliary"
	KindModificationBarrel         Kind = "modificationBarrel"
	KindModificationBipod          Kind = "modificationBipod"
	KindModificationCharge         Kind = "modificationCharge"
	KindModificationDevice         Kind = "modificationDevice"
	KindModificationForegrip       Kind = "modificationForegrip"
	KindModificationGasblock       Kind = "modificationGasblock"
	KindModificationHandguard      Kind = "modificationHandguard"
	KindModificationLauncher       Kind = "modificationLauncher"
	KindModificationMount          Kind = "modificationMount"
	KindModificationMuzzle         Kind = "modificationMuzzle"
	KindModificationGoggles        Kind = "modificationGoggles"
	KindModificationGogglesSpecial Kind = "modificationGogglesSpecial"
	KindModificationPistolgrip     Kind = "modificationPistolgrip"
	KindModificationReceiver       Kind = "modificationReceiver"
	KindModificationSight          Kind = "modificationSight"
	KindModificationSightSpecial   Kind = "modificationSightSpecial"
	KindModificationStock          Kind = "modificationStock"
)
const (
	KindAmmunition Kind = "ammunition"
)
const (
	KindArmor Kind = "armor"
)
const (
	KindBackpack Kind = "backpack"
)
const (
	KindBarter Kind = "barter"
)
const (
	KindClothing Kind = "clothing"
)
const KindCommon Kind = "common"
const (
	KindContainer Kind = "container"
)
const (
	KindFirearm Kind = "firearm"
)
const (
	KindFood Kind = "food"
)
const (
	KindGrenade Kind = "grenade"
)
const (
	KindHeadphone Kind = "headphone"
)
const (
	KindKey Kind = "key"
)
const (
	KindMagazine Kind = "magazine"
)
const (
	KindMap Kind = "map"
)
const (
	KindMedical Kind = "medical"
)
const (
	KindMelee Kind = "melee"
)
const (
	KindMoney Kind = "money"
)
const (
	KindTacticalrig Kind = "tacticalrig"
)

func CategoryToKind

func CategoryToKind(s string) (Kind, error)

func (Kind) GetEntity

func (k Kind) GetEntity() (Entity, error)

func (Kind) GetEntityResult

func (k Kind) GetEntityResult() (EntityResult, error)

func (Kind) GetFilter

func (k Kind) GetFilter() Filter

func (Kind) IsValid

func (k Kind) IsValid() bool

func (*Kind) MarshalJSON

func (k *Kind) MarshalJSON() ([]byte, error)

func (Kind) String

func (k Kind) String() string

func (*Kind) UnmarshalJSON

func (k *Kind) UnmarshalJSON(b []byte) error

type KindStats

type KindStats struct {
	Count    int64     `json:"count"`
	Modified timestamp `json:"modified"`
}

type Launcher

type Launcher struct {
	Modification

	Caliber string `json:"caliber"`
}

type LauncherResult

type LauncherResult struct {
	*Result
	Items []Launcher `json:"items"`
}

func (*LauncherResult) GetEntities

func (r *LauncherResult) GetEntities() []Entity

type Magazine

type Magazine struct {
	Item

	Capacity          int64            `json:"capacity"`
	Caliber           string           `json:"caliber"`
	Ergonomics        float64          `json:"ergonomicsFP"`
	MalfunctionChance float64          `json:"malfunctionChance"`
	Modifier          MagazineModifier `json:"modifier"`
	GridModifier      GridModifier     `json:"gridModifier"`
	Compatibility     ItemList         `json:"compatibility"`
}

type MagazineModifier

type MagazineModifier struct {
	CheckTime  float64 `json:"checkTime"`
	LoadUnload float64 `json:"loadUnload"`
}

type MagazineResult

type MagazineResult struct {
	*Result
	Items []Magazine `json:"items"`
}

func (*MagazineResult) GetEntities

func (r *MagazineResult) GetEntities() []Entity

type Map

type Map struct {
	Item
}

type MapResult

type MapResult struct {
	*Result
	Items []Map `json:"items"`
}

func (*MapResult) GetEntities

func (r *MapResult) GetEntities() []Entity

type Medical

type Medical struct {
	Item

	Type         string  `json:"type"`
	Resources    int64   `json:"resources"`
	ResourceRate int64   `json:"resourceRate"`
	UseTime      float64 `json:"useTime"`
	Effects      Effects `json:"effects"`
}

type MedicalResult

type MedicalResult struct {
	*Result
	Items []Medical `json:"items"`
}

func (*MedicalResult) GetEntities

func (r *MedicalResult) GetEntities() []Entity

type Melee

type Melee struct {
	Item

	Slash MeleeAttack `json:"slash"`
	Stab  MeleeAttack `json:"stab"`
}

type MeleeAttack

type MeleeAttack struct {
	Damage      float64 `json:"damage"`
	Rate        float64 `json:"rate"`
	Range       float64 `json:"range"`
	Consumption float64 `json:"consumption"`
}

type MeleeResult

type MeleeResult struct {
	*Result
	Items []Melee `json:"items"`
}

func (*MeleeResult) GetEntities

func (r *MeleeResult) GetEntities() []Entity

type Modification

type Modification struct {
	Item

	Ergonomics    float64      `json:"ergonomicsFP"`
	Accuracy      float64      `json:"accuracy"`
	Recoil        float64      `json:"recoil"`
	RaidModdable  int64        `json:"raidModdable"`
	GridModifier  GridModifier `json:"gridModifier"`
	Slots         Slots        `json:"slots"`
	Compatibility ItemList     `json:"compatibility"`
	Conflicts     ItemList     `json:"conflicts"`
}

type ModificationResult

type ModificationResult struct {
	*Result
	Items []Modification `json:"items"`
}

func (*ModificationResult) GetEntities

func (r *ModificationResult) GetEntities() []Entity

type Money

type Money struct {
	Item
}

type MoneyResult

type MoneyResult struct {
	*Result
	Items []Money `json:"items"`
}

func (*MoneyResult) GetEntities

func (r *MoneyResult) GetEntities() []Entity

type Mount

type Mount struct {
	Modification

	HeatFactor float64 `json:"heatFactor"`
	CoolFactor float64 `json:"coolFactor"`
}

func (*Mount) Cooling

func (m *Mount) Cooling() float64

func (*Mount) Heat

func (m *Mount) Heat() float64

type MountResult

type MountResult struct {
	*Result
	Items []Mount `json:"items"`
}

func (*MountResult) GetEntities

func (r *MountResult) GetEntities() []Entity

type Muzzle

type Muzzle struct {
	Modification

	Type           string  `json:"type"`
	Velocity       float64 `json:"velocity"`
	Loudness       float64 `json:"loudness"`
	DurabilityBurn float64 `json:"durabilityBurn"`
	HeatFactor     float64 `json:"heatFactor"`
	CoolFactor     float64 `json:"coolFactor"`
}

func (*Muzzle) Cooling

func (m *Muzzle) Cooling() float64

func (*Muzzle) DurabilityBurnPercent

func (m *Muzzle) DurabilityBurnPercent() float64

func (*Muzzle) Heat

func (m *Muzzle) Heat() float64

type MuzzleResult

type MuzzleResult struct {
	*Result
	Items []Muzzle `json:"items"`
}

func (*MuzzleResult) GetEntities

func (r *MuzzleResult) GetEntities() []Entity

type OpticSpecial

type OpticSpecial struct {
	Modes []string `json:"modes"`
	Color RGBA     `json:"color"`
	Noise string   `json:"noise"`
}

type Penalties

type Penalties struct {
	Mouse      float64 `json:"mouse,omitempty"`
	Speed      float64 `json:"speed,omitempty"`
	Ergonomics float64 `json:"ergonomicsFP,omitempty"`
	Deafness   string  `json:"deafness,omitempty"`
}

type PistolGrip

type PistolGrip struct {
	Modification
}

type PistolGripResult

type PistolGripResult struct {
	*Result
	Items []PistolGrip `json:"items"`
}

func (*PistolGripResult) GetEntities

func (r *PistolGripResult) GetEntities() []Entity

type RGBA

type RGBA struct {
	R uint `json:"r"`
	G uint `json:"g"`
	B uint `json:"b"`
	A uint `json:"a"`
}

type Receiver

type Receiver struct {
	Modification

	Velocity       float64 `json:"velocity"`
	DurabilityBurn float64 `json:"durabilityBurn"`
	HeatFactor     float64 `json:"heatFactor"`
	CoolFactor     float64 `json:"coolFactor"`
}

func (*Receiver) Cooling

func (r *Receiver) Cooling() float64

func (*Receiver) DurabilityBurnPercent

func (r *Receiver) DurabilityBurnPercent() float64

func (*Receiver) Heat

func (r *Receiver) Heat() float64

type ReceiverResult

type ReceiverResult struct {
	*Result
	Items []Receiver `json:"items"`
}

func (*ReceiverResult) GetEntities

func (r *ReceiverResult) GetEntities() []Entity

type Result

type Result struct {
	Kind  Kind  `json:"kind"`
	Count int64 `json:"total"`
}

func (Result) GetCount

func (r Result) GetCount() int64

func (Result) GetKind

func (r Result) GetKind() Kind

type Sight

type Sight struct {
	Modification

	Type          string   `json:"type"`
	Magnification []string `json:"magnification"`
	VariableZoom  bool     `json:"variableZoom"`
	ZeroDistances []int64  `json:"zeroDistances"`
}

type SightResult

type SightResult struct {
	*Result
	Items []Sight `json:"items"`
}

func (*SightResult) GetEntities

func (r *SightResult) GetEntities() []Entity

type SightSpecial

type SightSpecial struct {
	Sight
	OpticSpecial
}

type SightSpecialResult

type SightSpecialResult struct {
	*Result
	Items []SightSpecial `json:"items"`
}

func (*SightSpecialResult) GetEntities

func (r *SightSpecialResult) GetEntities() []Entity

type Slot

type Slot struct {
	Filter   ItemList `json:"filter"`
	Required bool     `json:"required"`
}

type Slots

type Slots map[string]Slot

type Stock

type Stock struct {
	Modification

	FoldRectractable bool    `json:"foldRectractable"`
	HeatFactor       float64 `json:"heatFactor"`
	CoolFactor       float64 `json:"coolFactor"`
}

func (*Stock) Cooling

func (s *Stock) Cooling() float64

func (*Stock) Heat

func (s *Stock) Heat() float64

type StockResult

type StockResult struct {
	*Result
	Items []Stock `json:"items"`
}

func (*StockResult) GetEntities

func (r *StockResult) GetEntities() []Entity

type TacticalRig

type TacticalRig struct {
	Item

	Capacity        int64            `json:"capacity"`
	Grids           []Grid           `json:"grids"`
	Penalties       Penalties        `json:"penalties"`
	ArmorComponents []ArmorComponent `json:"armorComponents,omitempty" bson:"armorComponents,omitempty"`
	IsPlateCarrier  bool             `json:"isPlateCarrier" bson:"isPlateCarrier"`
	Slots           Slots            `json:"slots" bson:"slots"`
}

func (TacticalRig) ClassRange

func (t TacticalRig) ClassRange() ClassRange

func (TacticalRig) TotalDurability

func (t TacticalRig) TotalDurability() float64

type TacticalRigResult

type TacticalRigResult struct {
	*Result
	Items []TacticalRig `json:"items"`
}

func (*TacticalRigResult) GetEntities

func (r *TacticalRigResult) GetEntities() []Entity

type WeaponModifier

type WeaponModifier struct {
	Accuracy       float64 `json:"accuracy"`
	Recoil         float64 `json:"recoil"`
	DurabilityBurn float64 `json:"durabilityBurn"`
	HeatFactor     float64 `json:"heatFactor"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL