Documentation ¶
Index ¶
- Constants
- Variables
- func CategoryToDisplayName(s string) (string, error)
- func GetItemList(items ItemList, sort string) map[Kind][]Entity
- func KindToCategory(k Kind) (string, error)
- func Search(term string, limit int, kind *Kind) (*search.Result, error)
- func SearchByName(term string, limit int, kind *Kind) (*search.Result, error)
- type AmmoEffects
- type AmmoFrag
- type AmmoGrenadeProperties
- type Ammunition
- type AmmunitionResult
- type Armor
- type ArmorComponent
- type ArmorMaterial
- type ArmorProps
- type ArmorResult
- type Auxiliary
- type AuxiliaryResult
- type Backpack
- type BackpackResult
- type Barrel
- type BarrelResult
- type Barter
- type BarterResult
- type Bipod
- type BipodResult
- type Charge
- type ChargeResult
- type ClassRange
- type Clothing
- type ClothingResult
- type Compressor
- type Container
- type ContainerResult
- type Device
- type DeviceResult
- type Effect
- type EffectPenalties
- type Effects
- type Entity
- type EntityResult
- type Filter
- type Firearm
- type FirearmResult
- type Food
- type FoodResult
- type Foregrip
- type ForegripResult
- type GasBlock
- type GasBlockResult
- type Goggles
- type GogglesResult
- type GogglesSpecial
- type GogglesSpecialResult
- type Grenade
- type GrenadeResult
- type Grid
- type GridModifier
- type GridProperties
- type Handguard
- type HandguardResult
- type Headphone
- type HeadphoneResult
- type HighPass
- type Index
- type Item
- type ItemList
- type ItemResult
- type Key
- type KeyResult
- type Kind
- type KindStats
- type Launcher
- type LauncherResult
- type Magazine
- type MagazineModifier
- type MagazineResult
- type Map
- type MapResult
- type Medical
- type MedicalResult
- type Melee
- type MeleeAttack
- type MeleeResult
- type Modification
- type ModificationResult
- type Money
- type MoneyResult
- type Mount
- type MountResult
- type Muzzle
- type MuzzleResult
- type OpticSpecial
- type Penalties
- type PistolGrip
- type PistolGripResult
- type RGBA
- type Receiver
- type ReceiverResult
- type Result
- type Sight
- type SightResult
- type SightSpecial
- type SightSpecialResult
- type Slot
- type Slots
- type Stock
- type StockResult
- type TacticalRig
- type TacticalRigResult
- type WeaponModifier
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")
)
View Source
var KindList = [...]Kind{ KindAmmunition, KindArmor, KindBackpack, KindBarter, KindClothing, KindCommon, KindContainer, KindFirearm, KindFood, KindGrenade, KindHeadphone, KindKey, KindMagazine, KindMap, KindMedical, KindMelee, KindModification, KindModificationAuxiliary, KindModificationBarrel, KindModificationBipod, KindModificationCharge, KindModificationDevice, KindModificationForegrip, KindModificationGasblock, KindModificationGoggles, KindModificationHandguard, KindModificationLauncher, KindModificationMount, KindModificationMuzzle, KindModificationPistolgrip, KindModificationReceiver, KindModificationSight, KindModificationSightSpecial, KindModificationStock, KindMoney, KindTacticalrig, }
Functions ¶
func CategoryToDisplayName ¶
func KindToCategory ¶
Types ¶
type AmmoEffects ¶
type AmmoGrenadeProperties ¶
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 ¶
type ArmorComponent ¶
type ArmorComponent struct {
ArmorProps
}
type ArmorMaterial ¶
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 ¶
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) DurabilityBurnPercent ¶
type AuxiliaryResult ¶
func (*AuxiliaryResult) GetEntities ¶
func (r *AuxiliaryResult) GetEntities() []Entity
type BackpackResult ¶
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 (*Barrel) DurabilityBurnPercent ¶
type BarrelResult ¶
func (*BarrelResult) GetEntities ¶
func (r *BarrelResult) GetEntities() []Entity
type BarterResult ¶
func (*BarterResult) GetEntities ¶
func (r *BarterResult) GetEntities() []Entity
type Bipod ¶
type Bipod struct {
Modification
}
type BipodResult ¶
func (*BipodResult) GetEntities ¶
func (r *BipodResult) GetEntities() []Entity
type Charge ¶
type Charge struct {
Modification
}
type ChargeResult ¶
func (*ChargeResult) GetEntities ¶
func (r *ChargeResult) GetEntities() []Entity
type ClassRange ¶
func (ClassRange) String ¶
func (c ClassRange) String() string
type ClothingResult ¶
func (*ClothingResult) GetEntities ¶
func (r *ClothingResult) GetEntities() []Entity
type Compressor ¶
type ContainerResult ¶
func (*ContainerResult) GetEntities ¶
func (r *ContainerResult) GetEntities() []Entity
type Device ¶
type Device struct { Modification Type string `json:"type"` Modes []string `json:"modes"` }
type DeviceResult ¶
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 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 EntityResult ¶
func GetItemsByID ¶
func GetItemsBySearch ¶
func GetItemsBySearch(text string, limit int) (EntityResult, error)
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 ¶
type FirearmResult ¶
func (*FirearmResult) GetEntities ¶
func (r *FirearmResult) GetEntities() []Entity
type FoodResult ¶
func (*FoodResult) GetEntities ¶
func (r *FoodResult) GetEntities() []Entity
type Foregrip ¶
type Foregrip struct {
Modification
}
type ForegripResult ¶
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) DurabilityBurnPercent ¶
type GasBlockResult ¶
func (*GasBlockResult) GetEntities ¶
func (r *GasBlockResult) GetEntities() []Entity
type Goggles ¶
type Goggles struct { Modification Type string `json:"type"` }
type GogglesResult ¶
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 ¶
func (*GrenadeResult) GetEntities ¶
func (r *GrenadeResult) GetEntities() []Entity
type GridModifier ¶
type GridProperties ¶
type Handguard ¶
type Handguard struct { Modification HeatFactor float64 `json:"heatFactor"` CoolFactor float64 `json:"coolFactor"` }
type HandguardResult ¶
func (*HandguardResult) GetEntities ¶
func (r *HandguardResult) GetEntities() []Entity
type HeadphoneResult ¶
func (*HeadphoneResult) GetEntities ¶
func (r *HeadphoneResult) GetEntities() []Entity
type Index ¶
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 (Item) GetShortName ¶
type ItemResult ¶
func (*ItemResult) GetEntities ¶
func (r *ItemResult) GetEntities() []Entity
type KeyResult ¶
func (*KeyResult) GetEntities ¶
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 (Kind) GetEntityResult ¶
func (k Kind) GetEntityResult() (EntityResult, error)
func (*Kind) MarshalJSON ¶
func (*Kind) UnmarshalJSON ¶
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 ¶
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 MagazineResult ¶
func (*MagazineResult) GetEntities ¶
func (r *MagazineResult) GetEntities() []Entity
type MapResult ¶
func (*MapResult) GetEntities ¶
type MedicalResult ¶
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 MeleeResult ¶
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 MoneyResult ¶
func (*MoneyResult) GetEntities ¶
func (r *MoneyResult) GetEntities() []Entity
type Mount ¶
type Mount struct { Modification HeatFactor float64 `json:"heatFactor"` CoolFactor float64 `json:"coolFactor"` }
type MountResult ¶
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) DurabilityBurnPercent ¶
type MuzzleResult ¶
func (*MuzzleResult) GetEntities ¶
func (r *MuzzleResult) GetEntities() []Entity
type OpticSpecial ¶
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 Receiver ¶
type Receiver struct { Modification Velocity float64 `json:"velocity"` DurabilityBurn float64 `json:"durabilityBurn"` HeatFactor float64 `json:"heatFactor"` CoolFactor float64 `json:"coolFactor"` }
func (*Receiver) DurabilityBurnPercent ¶
type ReceiverResult ¶
func (*ReceiverResult) GetEntities ¶
func (r *ReceiverResult) GetEntities() []Entity
type Sight ¶
type Sight struct { Modification Type string `json:"type"` Magnification []string `json:"magnification"` VariableZoom bool `json:"variableZoom"` ZeroDistances []int64 `json:"zeroDistances"` }
type SightResult ¶
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 Stock ¶
type Stock struct { Modification FoldRectractable bool `json:"foldRectractable"` HeatFactor float64 `json:"heatFactor"` CoolFactor float64 `json:"coolFactor"` }
type StockResult ¶
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
Source Files ¶
- category.go
- index.go
- item.go
- kind.go
- kind_ammunition.go
- kind_armor.go
- kind_backpack.go
- kind_barter.go
- kind_clothing.go
- kind_common.go
- kind_container.go
- kind_firearm.go
- kind_food.go
- kind_grenade.go
- kind_headphones.go
- kind_key.go
- kind_magazine.go
- kind_map.go
- kind_medical.go
- kind_melee.go
- kind_modification.go
- kind_money.go
- kind_tacticalRig.go
- prop_effects.go
- prop_grid.go
- prop_penalties.go
- prop_slots.go
Click to show internal directories.
Click to hide internal directories.