| summaryrefslogtreecommitdiff |
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2019-04-26 15:05:44 +0200 |
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2019-04-26 15:05:44 +0200 |
| commit | ec6eec260d6383ae948505c3d42b3055ae3dd94c (patch) | |
| tree | 1d9ab2b09ab0a534fc6c09b62b940d9f1c7e139f /src/shared/struct/inventory/shr_equipment.erl | |
| parent | 7d428bac2f9d62c5a0e704eb32be869c10fec72e (diff) | |
Makes Dialyzer validate shared & battle.
Diffstat (limited to 'src/shared/struct/inventory/shr_equipment.erl')
| -rw-r--r-- | src/shared/struct/inventory/shr_equipment.erl | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/shared/struct/inventory/shr_equipment.erl b/src/shared/struct/inventory/shr_equipment.erl index cbd4381..a931444 100644 --- a/src/shared/struct/inventory/shr_equipment.erl +++ b/src/shared/struct/inventory/shr_equipment.erl @@ -40,7 +40,7 @@ -opaque unresolved() :: #shr_eq_ref{}. -type either() :: (type() | unresolved()). --export_type([type/0, unresolved/0]). +-export_type([type/0, unresolved/0, either/0]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -84,7 +84,6 @@ 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, @@ -299,14 +298,12 @@ set_glyphs (V, Eq) when is_record(Eq, shr_eq_ref) -> (list(shr_glyph:type()), type()) -> {type(), ataxic:basic()}; (list(shr_glyph:type()), unresolved()) -> {unresolved(), ataxic:basic()}. ataxia_set_glyphs (V, Eq) -> - { - set_glyphs(V, Eq), - ataxic:update_field - ( - get_glyphs_field(), - ataxic:constant(shr_glyph:get_id(V)) - ) - }. + ataxia_set_glyphs + ( + V, + ataxic:constant(lists:map(fun shr_glyph:get_id/1, V)), + Eq + ). -spec ataxia_set_glyphs ( @@ -448,14 +445,7 @@ set_glyph_ids (V, Eq) when is_record(Eq, shr_eq) -> (list(shr_glyph:id()), type()) -> {type(), ataxic:basic()}; (list(shr_glyph:id()), unresolved()) -> {unresolved(), ataxic:basic()}. ataxia_set_glyph_ids (V, Eq) -> - { - set_glyph_ids(V, Eq), - ataxic:update_field - ( - get_glyphs_field(), - ataxic:constant(V) - ) - }. + ataxia_set_glyph_ids(V, ataxic:constant(V), Eq). -spec ataxia_set_glyph_ids ( |


