summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-02-23 11:35:45 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-02-23 11:35:45 +0100 |
commit | acf9e9f1eb880ffb8ab918c40724eda566aefcc7 (patch) | |
tree | efa3dd6c88d7970632fbe44f322d03b983b02768 /src/struct/character.erl | |
parent | 43e38e5fc54fd58e8230b2b5198b6d8cb625803c (diff) |
Starting a big refactoring...
Diffstat (limited to 'src/struct/character.erl')
-rw-r--r-- | src/struct/character.erl | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/struct/character.erl b/src/struct/character.erl new file mode 100644 index 0000000..03906e3 --- /dev/null +++ b/src/struct/character.erl @@ -0,0 +1,54 @@ +-module(character). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-record +( + character, + { + id, + name, + icon, + portrait, + attributes, + weapons, + glyphs, + armors + } +). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%% Accessors +-export +( + [ + get_id/1, + get_name/1, + get_icon/1, + get_portrait/1, + get_attributes/1, + get_weapons/1, + get_armors/1, + get_glyphs/1 + ] +). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%% Accessors +get_id (Char) -> Char#character.id. +get_name (Char) -> Char#character.name. +get_icon (Char) -> Char#character.icon. +get_portrait (Char) -> Char#character.portrait. +get_attributes (Char) -> Char#character.attributes. +get_weapons (Char) -> Char#character.weapons. +get_armors (Char) -> Char#character.armors. +get_glyphs (Char) -> Char#character.glyphs. |