From 83cd7ce064b8a46a106dc855d748b1bd7e45af01 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Fri, 4 Jan 2019 17:25:39 +0100 Subject: Removes 'id' field from ataxia entry values. While sometimes usefull as a way to retrieve the object's ID, they were both redundant (you can't get the object without its ID anyway) and bothersome to maintain (insert + update, which would have required setting up a bounty for any insert). --- src/login/lgn_shim.erl | 77 -------------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 src/login/lgn_shim.erl (limited to 'src/login/lgn_shim.erl') diff --git a/src/login/lgn_shim.erl b/src/login/lgn_shim.erl deleted file mode 100644 index df35d97..0000000 --- a/src/login/lgn_shim.erl +++ /dev/null @@ -1,77 +0,0 @@ --module(lgn_shim). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([generate_random_player/4]). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec add_ref_to_event - ( - binary(), - binary(), - boolean(), - shr_player:type() - ) - -> shr_player:type(). -add_ref_to_event (BattleID, EventName, IsPlayersTurn, Player) -> - Event = - shr_battle_summary:new(BattleID, EventName, <<"Never">>, IsPlayersTurn), - - Result = shr_player:set_event_summaries([Event], Player), - - Result. - --spec add_ref_to_map - ( - binary(), - binary(), - shr_player:type() - ) - -> shr_player:type(). -add_ref_to_map (MapID, EventName, Player) -> - MapRef = shr_map_summary:new(MapID, EventName), - - Result = shr_player:set_map_summaries([MapRef], Player), - - Result. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec generate_random_player - ( - binary(), - binary(), - binary(), - binary() - ) - -> shr_player:type(). -generate_random_player (ID, Username, Password, Email) -> - Result = shr_player:new(ID, Username, Password, Email), - - S0Result = - case ID of - <<"0">> -> - S0 = add_ref_to_event(<<"0">>, <<"Test Battle">>, true, Result), - S1 = shr_player:set_roster_id(<<"0">>, S0), - S2 = add_ref_to_map(<<"0">>, <<"Test Map 0">>, S1), - S2; - - <<"1">> -> - S0 = add_ref_to_event(<<"0">>, <<"Test Battle">>, false, Result), - S1 = shr_player:set_roster_id(<<"1">>, S0), - S2 = add_ref_to_map(<<"1">>, <<"Test Map 1">>, S1), - - S2; - - _ -> Result - end, - - S0Result. -- cgit v1.2.3-70-g09d2