share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua
author Wuzzy <Wuzzy2@mail.ru>
Fri, 16 Mar 2018 02:02:27 +0100
changeset 13226 4028d7f85233
parent 8043 da083f8d95e6
permissions -rw-r--r--
Make video metadata strings translatable in frontend In the video page, a small part of the strings was untranslatable, e.g. “Player: ”. These were part of the video metadata. Now these are localizable.

--------------------------------
-- NO JUMPING
--------------------------------

HedgewarsScriptLoad("/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