summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-10-09 15:39:43 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-10-09 15:39:43 +0200
commit80cf57bc91d25a043ed8c1de557ebe1ccbe17022 (patch)
treeb59e4a825748de5eb96382cbb9fbaa3c6d280e7f /src/roster/struct/rst_roster.erl
parentf027695551d297b02f4bfa614d060d8f0e0d68d7 (diff)
Creates roster & inventory alongside player.
Diffstat (limited to 'src/roster/struct/rst_roster.erl')
-rw-r--r--src/roster/struct/rst_roster.erl12
1 files changed, 3 insertions, 9 deletions
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()
}.