| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-10-09 15:39:43 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-10-09 15:39:43 +0200 | 
| commit | 80cf57bc91d25a043ed8c1de557ebe1ccbe17022 (patch) | |
| tree | b59e4a825748de5eb96382cbb9fbaa3c6d280e7f /src/roster | |
| parent | f027695551d297b02f4bfa614d060d8f0e0d68d7 (diff) | |
Creates roster & inventory alongside player.
Diffstat (limited to 'src/roster')
| -rw-r--r-- | src/roster/rst_shim.erl | 2 | ||||
| -rw-r--r-- | src/roster/struct/rst_roster.erl | 12 | 
2 files changed, 4 insertions, 10 deletions
| diff --git a/src/roster/rst_shim.erl b/src/roster/rst_shim.erl index 57a62f5..681ff8e 100644 --- a/src/roster/rst_shim.erl +++ b/src/roster/rst_shim.erl @@ -18,7 +18,7 @@  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  -spec generate_random_character_roster () -> rst_roster:type().  generate_random_character_roster () -> -   Result = rst_roster:new(<<"0">>, <<"0">>), +   Result = rst_roster:new(<<"0">>),     %% TODO [DEBUG][REQUIRED]: unimplemented. diff --git a/src/roster/struct/rst_roster.erl b/src/roster/struct/rst_roster.erl index a362619..7841fb4 100644 --- a/src/roster/struct/rst_roster.erl +++ b/src/roster/struct/rst_roster.erl @@ -9,7 +9,6 @@  (     roster,     { -      id :: id(),        owner :: binary(),        characters :: array:array(rst_character:type())     } @@ -26,7 +25,6 @@  -export  (     [ -      get_id/1,        get_owner/1,        get_characters/1,        get_character/2, @@ -49,7 +47,7 @@  -export  (     [ -      new/2 +      new/1     ]  ). @@ -61,9 +59,6 @@  %% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%% Accessors --spec get_id (type()) -> id(). -get_id (Roster) -> Roster#roster.id. -  -spec get_owner (type()) -> binary().  get_owner (Roster) -> Roster#roster.owner. @@ -117,11 +112,10 @@ remove_character (IX, Roster) ->  -spec get_characters_field () -> non_neg_integer().  get_characters_field () -> #roster.characters. --spec new (binary(), binary()) -> type(). -new (ID, Owner) -> +-spec new (binary()) -> type(). +new (Owner) ->     #roster     { -      id = ID,        owner = Owner,        characters = array:new()     }. | 


