mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-09-29 11:55:21 +00:00
Fix godmode cmds when switching maps
This commit is contained in:
parent
0e4b8ca8f8
commit
ff6a4ef59d
@ -2103,17 +2103,20 @@ def testCombat
|
|||||||
getPos(@x, @y)
|
getPos(@x, @y)
|
||||||
checkEncounter(x, y, TRUE)
|
checkEncounter(x, y, TRUE)
|
||||||
end
|
end
|
||||||
|
def setCheatCmds
|
||||||
|
// install cheat commands
|
||||||
|
cmdTbl['T'] = @kbdTeleport
|
||||||
|
cmdTbl['P'] = @showPos
|
||||||
|
cmdTbl['>'] = @nextPortrait
|
||||||
|
cmdTbl['<'] = @prevPortrait
|
||||||
|
cmdTbl['!'] = @testCombat
|
||||||
|
cmdTbl['Y'] = @nextSky
|
||||||
|
cmdTbl['G'] = @nextGround
|
||||||
|
end
|
||||||
def enableGodMode()
|
def enableGodMode()
|
||||||
if ^$C061 >= 128 and ^$C062 >= 128
|
if ^$C061 >= 128 and ^$C062 >= 128
|
||||||
global->b_godmode = 1
|
global->b_godmode = 1
|
||||||
// install cheat commands
|
setCheatCmds()
|
||||||
cmdTbl['T'] = @kbdTeleport
|
|
||||||
cmdTbl['P'] = @showPos
|
|
||||||
cmdTbl['>'] = @nextPortrait
|
|
||||||
cmdTbl['<'] = @prevPortrait
|
|
||||||
cmdTbl['!'] = @testCombat
|
|
||||||
cmdTbl['Y'] = @nextSky
|
|
||||||
cmdTbl['G'] = @nextGround
|
|
||||||
beep; beep // A little audio feedback
|
beep; beep // A little audio feedback
|
||||||
fin
|
fin
|
||||||
end
|
end
|
||||||
@ -2135,7 +2138,11 @@ def initCmds()
|
|||||||
cmdTbl[$13] = @saveGame // ctrl-S
|
cmdTbl[$13] = @saveGame // ctrl-S
|
||||||
cmdTbl[$0c] = @loadGame // ctrl-L
|
cmdTbl[$0c] = @loadGame // ctrl-L
|
||||||
cmdTbl['?'] = @help
|
cmdTbl['?'] = @help
|
||||||
cmdTbl['!'] = @enableGodMode
|
if global->b_godmode
|
||||||
|
setCheatCmds()
|
||||||
|
else
|
||||||
|
cmdTbl['!'] = @enableGodMode
|
||||||
|
fin
|
||||||
|
|
||||||
// Commands handled differently in 3D vs 2D
|
// Commands handled differently in 3D vs 2D
|
||||||
if mapIs3D
|
if mapIs3D
|
||||||
|
Loading…
Reference in New Issue
Block a user