--show a list of 'spells'
local dlg=require("gui.dialogs")
--[[for k,v in pairs(df.global.world.armies.all) do
if v.flags[0]== true then
print(k)
end
end]]
function GoN()
for k,v in pairs(df.global.world.armies.all) do
if v.flags[0]== true then
local Nor=v.pos.y-1
v.pos.y=Nor
end
end
end
function GoS()
for k,v in pairs(df.global.world.armies.all) do
if v.flags[0]== true then
local Nor=v.pos.y+1
v.pos.y=Nor
end
end
end
function GoE()
for k,v in pairs(df.global.world.armies.all) do
if v.flags[0]== true then
local Nor=v.pos.x+1
v.pos.x=Nor
end
end
end
function GoW()
for k,v in pairs(df.global.world.armies.all) do
if v.flags[0]== true then
local Nor=v.pos.x-1
v.pos.x=Nor
end
end
end
function GoD()
for k,v in pairs(df.global.world.armies.all) do
if v.flags[0]== true then
--local Nor=v.pos.z1
v.pos.z=1
end
end
end
function GoU()
for k,v in pairs(df.global.world.armies.all) do
if v.flags[0]== true then
--local Nor=v.pos.z=0
v.pos.z=0
end
end
end
function Go()
for k,v in pairs(df.global.world.armies.all) do
if v.flags[0]== true then
local Nor=v.pos.y-1
v.pos.y=Nor
end
end
end
function doNothing()
print("doing nothing")
--require("plugins.dfusion.adv_tools").addSite(nil,nil,nil,nil,nil,nil,df.global.world.units.active[0].civ_id)
end
MOVEMENT_KEYS = {
A_CARE_MOVE_N = { 0, -1, 0 }, A_CARE_MOVE_S = { 0, 1, 0 },
A_CARE_MOVE_W = { -1, 0, 0 }, A_CARE_MOVE_E = { 1, 0, 0 },
A_CARE_MOVE_NW = { -1, -1, 0 }, A_CARE_MOVE_NE = { 1, -1, 0 },
A_CARE_MOVE_SW = { -1, 1, 0 }, A_CARE_MOVE_SE = { 1, 1, 0 },
--[[A_MOVE_N = { 0, -1, 0 }, A_MOVE_S = { 0, 1, 0 },
A_MOVE_W = { -1, 0, 0 }, A_MOVE_E = { 1, 0, 0 },
A_MOVE_NW = { -1, -1, 0 }, A_MOVE_NE = { 1, -1, 0 },
A_MOVE_SW = { -1, 1, 0 }, A_MOVE_SE = { 1, 1, 0 },--]]
A_CUSTOM_CTRL_D = { 0, 0, -1 },
A_CUSTOM_CTRL_E = { 0, 0, 1 },
CURSOR_UP_Z_AUX = { 0, 0, 1 }, CURSOR_DOWN_Z_AUX = { 0, 0, -1 },
A_MOVE_SAME_SQUARE={0,0,0},
SELECT={0,0,0},
}
ALLOWED_KEYS={
A_MOVE_N=true,A_MOVE_S=true,A_MOVE_W=true,A_MOVE_E=true,A_MOVE_NW=true,
A_MOVE_NE=true,A_MOVE_SW=true,A_MOVE_SE=true,A_STANCE=true,SELECT=true,A_MOVE_DOWN_AUX=true,
A_MOVE_UP_AUX=true,A_LOOK=true,CURSOR_DOWN=true,CURSOR_UP=true,CURSOR_LEFT=true,CURSOR_RIGHT=true,
CURSOR_UPLEFT=true,CURSOR_UPRIGHT=true,CURSOR_DOWNLEFT=true,CURSOR_DOWNRIGHT=true,A_CLEAR_ANNOUNCEMENTS=true,
CURSOR_UP_Z=true,CURSOR_DOWN_Z=true,
}
listofspells={
{text="nothing", spell=doNothing,icon='*'},
{text="North", spell=GoN,key="CUSTOM_W"},
{text="South", spell=GoS,key="CUSTOM_S"},
{text="East", spell=GoE,key="CUSTOM_D"},
{text="West", spell=GoW,key="CUSTOM_A"},
{text="Surface", spell=GoU,key="CUSTOM_Z"},
{text="Caverns", spell=GoD,key="CUSTOM_X"},
}
dlg.showListPrompt("Directions","Choze Direct",nil, listofspells,function(index,choice) choice.spell() end)
Doesn't really allow for escaping from the mountains if you're in there, it's more of a 'now I can cross through a mountain in a straight line, or cross a river or cut through a town or city that block access off. there's a "warp me to a different spot" script but uhh kinda tricky to pull off constantly given the new quest log making you have to press Q-M to get free access to the map instead of being able to warp to the hotspot or point of interest.