summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2019-01-04 17:25:39 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2019-01-04 17:25:39 +0100 |
commit | 83cd7ce064b8a46a106dc855d748b1bd7e45af01 (patch) | |
tree | cee5d4e3d21936925f8108940c35533f9f6484f5 /src/battle/struct/btl_pending_battle.erl | |
parent | 895a5348f521b16b3a6e32d921f7f23ec8f3036e (diff) |
Removes 'id' field from ataxia entry values.
While sometimes usefull as a way to retrieve the object's ID, they were
both redundant (you can't get the object without its ID anyway) and
bothersome to maintain (insert + update, which would have required
setting up a bounty for any insert).
Diffstat (limited to 'src/battle/struct/btl_pending_battle.erl')
-rw-r--r-- | src/battle/struct/btl_pending_battle.erl | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/battle/struct/btl_pending_battle.erl b/src/battle/struct/btl_pending_battle.erl index cecaeb5..a69e6ce 100644 --- a/src/battle/struct/btl_pending_battle.erl +++ b/src/battle/struct/btl_pending_battle.erl @@ -3,13 +3,12 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --type id() :: binary(). +-type id() :: ataxia_id:type(). -record ( pending_battle, { - id :: id(), free_slots :: non_neg_integer(), battle :: btl_battle:type() } @@ -29,7 +28,6 @@ -export ( [ - get_id/1, get_battle/1, get_free_slots/1, @@ -44,7 +42,7 @@ -export ( [ - new/3 + new/2 ] ). @@ -55,19 +53,15 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec new (id(), non_neg_integer(), btl_battle:type()) -> type(). -new (ID, FreeSlots, Battle) -> +-spec new (non_neg_integer(), btl_battle:type()) -> type(). +new (FreeSlots, Battle) -> #pending_battle { - id = ID, free_slots = FreeSlots, battle = Battle }. %%%% Accessors --spec get_id (type()) -> id(). -get_id (PBattle) -> PBattle#pending_battle.id. - -spec get_battle (type()) -> btl_battle:type(). get_battle (PBattle) -> PBattle#pending_battle.battle. |