| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/struct/inventory/shr_equipment.erl | 47 | ||||
| -rw-r--r-- | src/shared/struct/shr_character.erl | 14 | 
2 files changed, 60 insertions, 1 deletions
| diff --git a/src/shared/struct/inventory/shr_equipment.erl b/src/shared/struct/inventory/shr_equipment.erl index 4de05fd..cbd4381 100644 --- a/src/shared/struct/inventory/shr_equipment.erl +++ b/src/shared/struct/inventory/shr_equipment.erl @@ -69,6 +69,7 @@        ataxia_set_portrait/2,        ataxia_set_glyph_board/2,        ataxia_set_glyphs/2, +      ataxia_set_glyphs/3,        get_primary_weapon_id/1,        get_secondary_weapon_id/1, @@ -83,13 +84,15 @@        set_portrait_id/2,        set_glyph_board_id/2,        set_glyph_ids/2, +      set_glyph_ids/2,        ataxia_set_primary_weapon_id/2,        ataxia_set_secondary_weapon_id/2,        ataxia_set_armor_id/2,        ataxia_set_portrait_id/2,        ataxia_set_glyph_board_id/2, -      ataxia_set_glyph_ids/2 +      ataxia_set_glyph_ids/2, +      ataxia_set_glyph_ids/3     ]  ). @@ -305,6 +308,29 @@ ataxia_set_glyphs (V, Eq) ->        )     }. +-spec ataxia_set_glyphs +   ( +      list(shr_glyph:type()), +      ataxic:basic(), +      type() +   ) +   -> {type(), ataxic:basic()}; +   ( +      list(shr_glyph:type()), +      ataxic:basic(), +      unresolved() +   ) +   -> {unresolved(), ataxic:basic()}. +ataxia_set_glyphs (V, VUpdate, Eq) -> +   { +      set_glyphs(V, Eq), +      ataxic:update_field +      ( +         get_glyphs_field(), +         VUpdate +      ) +   }. +  -spec set_primary_weapon_id     (shr_weapon:id(), type()) -> type();     (shr_weapon:id(), unresolved()) -> unresolved(). @@ -431,6 +457,25 @@ ataxia_set_glyph_ids (V, Eq) ->        )     }. +-spec ataxia_set_glyph_ids +   ( +      list(shr_glyph:id()), +      ataxic:basic(), +      type() +   ) +   -> {type(), ataxic:basic()}; +   ( +      list(shr_glyph:id()), +      ataxic:basic(), +      unresolved() +   ) +   -> {unresolved(), ataxic:basic()}. +ataxia_set_glyph_ids (V, VUpdate, Eq) -> +   { +      set_glyph_ids(V, Eq), +      ataxic:update_field(get_glyphs_field(), VUpdate) +   }. +  -spec default () -> type().  default () ->     #shr_eq diff --git a/src/shared/struct/shr_character.erl b/src/shared/struct/shr_character.erl index 133a6c2..09ad10b 100644 --- a/src/shared/struct/shr_character.erl +++ b/src/shared/struct/shr_character.erl @@ -56,6 +56,7 @@        ataxia_set_name/2,        set_equipment/2, +      ataxia_set_equipment/2,        ataxia_set_equipment/3,        set_extra_omnimods/2, @@ -139,6 +140,19 @@ set_equipment (EqRef, CharRef) when is_record(CharRef, shr_char_ref) ->     CharRef#shr_char_ref{ equipment = EqRef }.  -spec ataxia_set_equipment +   (shr_equipment:type(), type()) -> {type(), ataxic:basic()}; +   ( +      shr_equipment:unresolved(), +      unresolved() +   ) +   -> {unresolved(), ataxic:basic()}. +ataxia_set_equipment (Eq, Char) -> +   { +      set_equipment(Eq, Char), +      ataxic:update_field(get_equipment_field(), ataxic:constant(Eq)) +   }. + +-spec ataxia_set_equipment     (shr_equipment:type(), ataxic:basic(), type()) -> {type(), ataxic:basic()};     (        shr_equipment:unresolved(), | 


