Skip to content

Commit

Permalink
add ammo grenade properties
Browse files Browse the repository at this point in the history
  • Loading branch information
morphy2k committed Jul 28, 2020
1 parent 524520f commit 8bbf4ed
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions model/item/kind_ammunition.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ const (
type Ammunition struct {
Item `bson:",inline"`

Caliber string `json:"caliber" bson:"caliber"`
Type string `json:"type" bson:"type"`
Tracer bool `json:"tracer" bson:"tracer"`
TracerColor string `json:"tracerColor" bson:"tracerColor"`
Subsonic bool `json:"subsonic" bson:"subsonic"`
Velocity float64 `json:"velocity" bson:"velocity"`
BallisticCoeficient float64 `json:"ballisticCoef" bson:"ballisticCoef"`
Damage float64 `json:"damage" bson:"damage"`
Penetration float64 `json:"penetration" bson:"penetration"`
ArmorDamage float64 `json:"armorDamage" bson:"armorDamage"`
Fragmentation AmmoFrag `json:"fragmentation" bson:"fragmentation"`
Projectiles int64 `json:"projectiles" bson:"projectiles"`
Pellets int64 `json:"pellets,omitempty" bson:"pellets,omitempty"` // deprecated
WeaponModifier WeaponModifier `json:"weaponModifier" bson:"weaponModifier"`
Caliber string `json:"caliber" bson:"caliber"`
Type string `json:"type" bson:"type"`
Tracer bool `json:"tracer" bson:"tracer"`
TracerColor string `json:"tracerColor" bson:"tracerColor"`
Subsonic bool `json:"subsonic" bson:"subsonic"`
Velocity float64 `json:"velocity" bson:"velocity"`
BallisticCoeficient float64 `json:"ballisticCoef" bson:"ballisticCoef"`
Damage float64 `json:"damage" bson:"damage"`
Penetration float64 `json:"penetration" bson:"penetration"`
ArmorDamage float64 `json:"armorDamage" bson:"armorDamage"`
Fragmentation AmmoFrag `json:"fragmentation" bson:"fragmentation"`
Projectiles int64 `json:"projectiles" bson:"projectiles"`
Pellets int64 `json:"pellets,omitempty" bson:"pellets,omitempty"` // deprecated
WeaponModifier WeaponModifier `json:"weaponModifier" bson:"weaponModifier"`
GrenadeProperties *AmmoGrenadeProperties `json:"grenadeProps,omitempty" bson:"grenadeProps,omitempty"`
}

// AmmoFrag represents the fragmentation data of Ammunition
Expand All @@ -37,3 +38,11 @@ type WeaponModifier struct {
Accuracy float64 `json:"accuracy" bson:"accuracy"`
Recoil float64 `json:"recoil" bson:"recoil"`
}

// AmmoGrenadeProperties represents the grenade properties of Ammunition
type AmmoGrenadeProperties struct {
Delay float64 `json:"delay" bson:"delay"`
FragmentCount float64 `json:"fragCount" bson:"fragCount"`
MinRadius float64 `json:"minRadius" bson:"minRadius"`
MaxRadius float64 `json:"maxRadius" bson:"maxRadius"`
}

0 comments on commit 8bbf4ed

Please sign in to comment.