summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-12-13 23:22:59 +0100 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-12-13 23:22:59 +0100 |
commit | f79ec67e93619ee0b4253ad79042de0cd5dd79de (patch) | |
tree | a10e831a4225cbd155a7234845efb6ed73a8ffe5 /src/map/query | |
parent | 3ffb430c28ba3c04835d2762a17aac39a1e64ded (diff) |
[BROKEN] Still converting to Ataxia...
Diffstat (limited to 'src/map/query')
-rw-r--r-- | src/map/query/map_update.erl | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/src/map/query/map_update.erl b/src/map/query/map_update.erl index 49ed1de..ac4499b 100644 --- a/src/map/query/map_update.erl +++ b/src/map/query/map_update.erl @@ -115,32 +115,36 @@ commit_update (QueryState, Input) -> MapID = Input#input.map_id, Map = QueryState#query_state.map, - Query = - shr_db_query:new + ok = + ataxia_client:commit ( map_db, - MapID, - {user, PlayerID}, - [ - shr_db_query:set_field - ( - map_map:get_height_field(), - Input#input.h - ), - shr_db_query:set_field - ( - map_map:get_width_field(), - Input#input.w - ), - shr_db_query:set_field + ataxia_security:user_from_id(PlayerID), + ataxic:value + ( + ataxic:sequence ( - map_map:get_tile_instances_field(), - map_map:get_tile_instances(Map) + [ + ataxic:on_field + ( + map_map:get_height_field(), + ataxic:constant(Input#input.h) + ), + ataxic:on_field + ( + map_map:get_width_field(), + ataxic:constant(Input#input.w) + ), + ataxic:on_field + ( + map_map:get_tile_instances_field(), + ataxic:constant(map_map:get_tile_instances(Map)) + ) + ] ) - ] + ) ), - shr_database:commit(Query), shr_timed_cache:update(map_db, PlayerID, MapID, Map), 'ok'. |