summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-07-11 17:54:14 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-07-11 17:54:14 +0200
commitfde827cba1ff3d889135c74ee1978098465fd200 (patch)
treed6022f800aa8226bf79a26a19189965c8cbfb2fe /src/battlemap/struct/bm_character_turn_update.erl
parentdf59024199c387903e3d4a901171939a358489d3 (diff)
"Battlemap" -> "Battle".
Diffstat (limited to 'src/battlemap/struct/bm_character_turn_update.erl')
-rw-r--r--src/battlemap/struct/bm_character_turn_update.erl85
1 files changed, 0 insertions, 85 deletions
diff --git a/src/battlemap/struct/bm_character_turn_update.erl b/src/battlemap/struct/bm_character_turn_update.erl
deleted file mode 100644
index 1ca5d94..0000000
--- a/src/battlemap/struct/bm_character_turn_update.erl
+++ /dev/null
@@ -1,85 +0,0 @@
--module(bm_character_turn_update).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--record
-(
- type,
- {
- data :: bm_character_turn_data:type(),
- timeline :: list(any()),
- db :: list(sh_db_query:op())
- }
-).
-
--opaque type() :: #type{}.
-
--export_type([type/0]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--export
-(
- [
- new/1,
-
- get_data/1,
- get_timeline/1,
- get_db/1,
-
- set_data/2,
- add_to_timeline/3,
- add_to_db/2
- ]
-).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec new (bm_character_turn_data:type()) -> type().
-new (Data) ->
- #type
- {
- data = Data,
- timeline = [],
- db = []
- }.
-
--spec get_data (type()) -> bm_character_turn_data:type().
-get_data (Update) -> Update#type.data.
-
--spec get_timeline (type()) -> list(any()).
-get_timeline (Update) -> Update#type.timeline.
-
--spec get_db (type()) -> list(sh_db_query:op()).
-get_db (Update) -> Update#type.db.
-
--spec set_data (bm_character_turn_data:type(), type()) -> type().
-set_data (Data, Update) ->
- Update#type{ data = Data}.
-
--spec add_to_timeline
- (
- bm_turn_result:type(),
- sh_db_query:op(),
- type()
- ) -> type().
-add_to_timeline (Item, DBUpdate, Update) ->
- add_to_db
- (
- DBUpdate,
- Update#type
- {
- timeline = [bm_turn_result:encode(Item)|Update#type.timeline]
- }
- ).
-
--spec add_to_db (sh_db_query:op(), type()) -> type().
-add_to_db (Item, Update) ->
- Update#type{ db = [Item|Update#type.db] }.