summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-04-19 19:01:27 +0200
committernsensfel <SpamShield0@noot-noot.org>2019-04-19 19:01:27 +0200
commitd85264c80cf23d1e13ffed091141c3ab929e7f4a (patch)
tree02aca87788f38268231201fe7a7070b6a9bf5d48 /src/shared
parent7ad856639b0d8470728d4e5436c3b1152959fd99 (diff)
...
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/reply/shr_add_glyph.erl28
-rw-r--r--src/shared/reply/shr_add_glyph_board.erl32
2 files changed, 60 insertions, 0 deletions
diff --git a/src/shared/reply/shr_add_glyph.erl b/src/shared/reply/shr_add_glyph.erl
new file mode 100644
index 0000000..2e4a259
--- /dev/null
+++ b/src/shared/reply/shr_add_glyph.erl
@@ -0,0 +1,28 @@
+-module(shr_add_glyph).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-export([generate/1]).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-spec generate (shr_glyph:type()) -> {list(any())}.
+generate (Glyph) ->
+ {
+ [
+ {<<"msg">>, <<"add_glyph">>},
+ {<<"id">>, shr_glyph:get_id(Glyph)},
+ {<<"nam">>, shr_glyph:get_name(Glyph)},
+ {<<"omni">>, shr_omnimods:encode(shr_glyph:get_omnimods(Glyph))}
+ ]
+ }.
diff --git a/src/shared/reply/shr_add_glyph_board.erl b/src/shared/reply/shr_add_glyph_board.erl
new file mode 100644
index 0000000..1d694f1
--- /dev/null
+++ b/src/shared/reply/shr_add_glyph_board.erl
@@ -0,0 +1,32 @@
+-module(shr_add_glyph_board).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-export([generate/1]).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-spec generate (shr_glyph_board:type()) -> {list(any())}.
+generate (GlyphBoard) ->
+ {
+ [
+ {<<"msg">>, <<"add_glyph_board">>},
+ {<<"id">>, shr_glyph_board:get_id(GlyphBoard)},
+ {<<"nam">>, shr_glyph_board:get_name(GlyphBoard)},
+ {<<"slot">>, shr_glyph_board:get_slots(GlyphBoard)},
+ {
+ <<"omni">>,
+ shr_omnimods:encode(shr_glyph_board:get_omnimods(GlyphBoard))
+ }
+ ]
+ }.