summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/struct/inventory')
-rw-r--r--src/shared/struct/inventory/shr_inventory.erl16
-rw-r--r--src/shared/struct/inventory/shr_weapon.erl.m44
2 files changed, 7 insertions, 13 deletions
diff --git a/src/shared/struct/inventory/shr_inventory.erl b/src/shared/struct/inventory/shr_inventory.erl
index 884c213..0396b0a 100644
--- a/src/shared/struct/inventory/shr_inventory.erl
+++ b/src/shared/struct/inventory/shr_inventory.erl
@@ -273,12 +273,7 @@ default () ->
glyphs = EmptySet
}.
--spec allows_equipment
- (
- (shr_equipment:type()|shr_equipment:unresolved()),
- type()
- )
- -> boolean().
+-spec allows_equipment (shr_equipment:either(), type()) -> boolean().
allows_equipment (Eq, Inv) ->
Weapons = Inv#inventory.weapons,
Glyphs = Inv#inventory.glyphs,
@@ -312,12 +307,7 @@ allows_equipment (Eq, Inv) ->
)
).
--spec add_equipment
- (
- (shr_equipment:type()|shr_equipment:unresolved()),
- type()
- )
- -> type().
+-spec add_equipment (shr_equipment:either(), type()) -> type().
add_equipment (Eq, Inv) ->
Inv#inventory
{
@@ -360,7 +350,7 @@ add_equipment (Eq, Inv) ->
-spec ataxia_add_equipment
(
- (shr_equipment:type()|shr_equipment:unresolved()),
+ shr_equipment:either(),
type()
)
-> {type(), ataxic:basic()}.
diff --git a/src/shared/struct/inventory/shr_weapon.erl.m4 b/src/shared/struct/inventory/shr_weapon.erl.m4
index a18c48e..b2c6734 100644
--- a/src/shared/struct/inventory/shr_weapon.erl.m4
+++ b/src/shared/struct/inventory/shr_weapon.erl.m4
@@ -30,6 +30,7 @@
(
[
get_id/1,
+ get_is_primary/1,
get_name/1,
get_minimum_range/1,
get_maximum_range/1,
@@ -60,6 +61,9 @@ get_id (Wp) -> Wp#weapon.id.
-spec get_name (type()) -> binary().
get_name (Wp) -> Wp#weapon.name.
+-spec get_is_primary (type()) -> boolean().
+get_is_primary (Wp) -> Wp#weapon.is_primary.
+
-spec get_minimum_range (type()) -> non_neg_integer().
get_minimum_range (Wp) -> Wp#weapon.range_min.