project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/No_Jumping.lua
(experimental) make the mysterious borders around land/hats/etc that appear on zoom vanish
note: not applied to everything yet
note: I'll probably merge the two functions that do the same thing (one for 1darray, one for 2darray representation of pixels) into a single function
--------------------------------
-- NO JUMPING
--------------------------------
loadfile(GetDataPath() .. "Scripts/Locale.lua")()
local specialGear = nil
function onGameInit()
Goals = loc("Jumping is disabled")
end
function onNewTurn()
SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
end
function onGearAdd(gear)
if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
specialGear = gear
SetInputMask(band(0xFFFFFFFF, bnot(gmHJump)))
end
end
function onGearDelete(gear)
if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
specialGear = nil
SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
end
end