Skip to content

Commit

Permalink
add new armor properties
Browse files Browse the repository at this point in the history
  • Loading branch information
morphy2k committed Jan 10, 2024
1 parent 4514e46 commit 0355e32
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
22 changes: 14 additions & 8 deletions model/item/kind_armor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ const (
type Armor struct {
Item `bson:",inline"`

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

// ArmorProps represents the armor properties of Armor and TacticalRig
// ArmorComponent describes the entity of an armor component
type ArmorComponent struct {
ArmorProps `bson:",inline"`
}

// ArmorProps represents the armor properties of ArmorComponent and Armor
type ArmorProps struct {
Class int64 `json:"class" bson:"class"`
Durability float64 `json:"durability" bson:"durability"`
Expand Down
10 changes: 6 additions & 4 deletions model/item/kind_tacticalRig.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ const (
type TacticalRig struct {
Item `bson:",inline"`

Capacity int64 `json:"capacity" bson:"capacity"`
Grids []Grid `json:"grids" bson:"grids"`
Penalties Penalties `json:"penalties" bson:"penalties"`
Armor *ArmorProps `json:"armor,omitempty" bson:"armor,omitempty"`
Capacity int64 `json:"capacity" bson:"capacity"`
Grids []Grid `json:"grids" bson:"grids"`
Penalties Penalties `json:"penalties" bson:"penalties"`
Armor *ArmorProps `json:"armor,omitempty" bson:"armor,omitempty"` // Deprecated
ArmorComponents []ArmorComponent `json:"armorComponents,omitempty" bson:"armorComponents,omitempty"`
Slots Slots `json:"slots" bson:"slots"`
}

0 comments on commit 0355e32

Please sign in to comment.