Skip to content
Snippets Groups Projects
Commit 2977a40e authored by dg's avatar dg
Browse files

tactical display

git-svn-id: http://svn.net-core.org/repos/t-engine4@338 51575b47-30f0-44d4-a5cc-537603b46e54
parent a8d649f4
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,13 @@ defineAction{
name = "Quit game",
}
defineAction{
default = { "sym:116:false:true:false:false" },
type = "TACTICAL_DISPLAY",
group = "actions",
name = "Tactical display on/off",
}
defineAction{
default = { "sym:116:true:false:false:false" },
type = "SHOW_TIME",
......
......@@ -481,18 +481,6 @@ function _M:setupCommands()
self:saveGame()
end,
-- Toggle tactical displau
SHOW_TIME = function()
if Map.view_faction then
self:targetMode(false, true)
self.always_target = nil
else
self.always_target = true
self:targetMode(true, true)
-- Find nearest target
self.target:scan(5)
end
end,
-- Show time
SHOW_TIME = function()
self.log(self.calendar:getTimeDate(self.turn))
......@@ -517,6 +505,16 @@ function _M:setupCommands()
local menu = require("engine.dialogs.GameMenu").new{"resume", "keybinds", "resolution", "save", "quit"}
self:registerDialog(menu)
end,
TACTICAL_DISPLAY = function()
if Map.view_faction then
self.always_target = nil
Map:setViewerFaction(nil)
else
self.always_target = true
Map:setViewerFaction("players")
end
end,
}
--[[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment