summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2019-10-23 17:46:45 +0200 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2019-10-23 17:46:45 +0200 |
commit | 65a2b95f7355b6b495516b95dafa63f8ccaa2bb0 (patch) | |
tree | 05011efdd963f8aa017d508bab1386eb90379df2 /src/shared/struct/shr_condition.erl | |
parent | 240b60a2a747d073eb001dd92450fd19b91902e9 (diff) |
...
Diffstat (limited to 'src/shared/struct/shr_condition.erl')
-rw-r--r-- | src/shared/struct/shr_condition.erl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/struct/shr_condition.erl b/src/shared/struct/shr_condition.erl index 13c3426..25504fa 100644 --- a/src/shared/struct/shr_condition.erl +++ b/src/shared/struct/shr_condition.erl @@ -13,6 +13,7 @@ { id :: id(), name :: binary(), + module :: atom(), description :: binary(), % can it be removed or stolen? Not ranks, for example. is_transferable :: boolean() @@ -29,6 +30,8 @@ -export ( [ + from_id/1, + get_module/1 ] ). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -38,3 +41,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-spec get_module (type()) -> atom(). +get_module (#condition{ module = Module }) -> Module. + +-spec from_id (id()) -> type(). +from_id (ID) -> + error({condition, unknown, ID}). |