diff --git a/src/map-editor.lua b/src/map-editor.lua index faad31d..6f9b131 100644 --- a/src/map-editor.lua +++ b/src/map-editor.lua @@ -49,7 +49,10 @@ local map_editor_scene_menu_options = { action = function() win.scene:remove("menu") win.scene("context").paused = false - end + end, + keys = { + "escape" + } }, { texture = TEXTURES.SETTINGS_HEX, @@ -61,7 +64,10 @@ local map_editor_scene_menu_options = { texture = TEXTURES.QUIT_HEX, action = function() win:close() - end + end, + keys = { + "f4" + } }, false } diff --git a/src/tower.lua b/src/tower.lua index 3fc96d7..ae53ec2 100644 --- a/src/tower.lua +++ b/src/tower.lua @@ -435,7 +435,11 @@ end function tower_deserialize(json_string) local tower = entity_basic_json_parse(json_string) + + -- @HACK weapons.last_shot_time field gets overrided with this merge, which we don't want + local weapons = tower.weapons table.merge(tower, get_tower_spec(tower.type)) + tower.weapons = weapons for i,h in pairs(tower.hexes) do tower.hexes[i] = vec2(tower.hexes[i][1], tower.hexes[i][2])