From 27e74e26dbcf1a7a68fe90b1fa3ca72e3c8da07b Mon Sep 17 00:00:00 2001 From: nsensfel Date: Wed, 5 Sep 2018 18:08:36 +0200 Subject: Adds map for player2, player_db cached as 'any'. --- src/map/map_handler.erl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/map/map_handler.erl') diff --git a/src/map/map_handler.erl b/src/map/map_handler.erl index 0866315..e4bcb60 100644 --- a/src/map/map_handler.erl +++ b/src/map/map_handler.erl @@ -27,7 +27,19 @@ start (TimedCachesManagerPid) -> <<"0">>, any, any, - map_shim:generate_random_map() + map_shim:generate_random_map(0, <<"0">>) + ) + end, + case shr_database:fetch(map_db, <<"1">>, admin) of + {ok, _} -> ok; + not_found -> + shr_database:insert_at + ( + map_db, + <<"1">>, + any, + any, + map_shim:generate_random_map(1, <<"1">>) ) end, shr_timed_caches_manager:new_cache(TimedCachesManagerPid, map_db, none), -- cgit v1.2.3-70-g09d2