share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua
author mikade
Mon, 31 Oct 2011 19:40:39 +0200
changeset 6253 d73317579ae4
parent 5827 a416f1070fdf
child 8043 da083f8d95e6
permissions -rw-r--r--
Add "Surfer" achievement to Space Invasion. Balance "Shield Miser" in Space Invasion. Fix disappearing ghost bug in Racer Extend waypoint limit to 8 in Racer Lengthen ghost tracking interval to improve performance in Racer. Allow users to view score between turns now that HideMission() is fixed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4662
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
     1
--------------------------------
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
     2
-- NO JUMPING
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
     3
--------------------------------
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
     4
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
     5
loadfile(GetDataPath() .. "Scripts/Locale.lua")()
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
     6
5571
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
     7
local specialGear = nil
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
     8
4893
353781305c07 make Random Weapons and No Jumping use the new custom goal function
Henek
parents: 4662
diff changeset
     9
function onGameInit()
353781305c07 make Random Weapons and No Jumping use the new custom goal function
Henek
parents: 4662
diff changeset
    10
    Goals = loc("Jumping is disabled")
4662
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
    11
end
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
    12
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
    13
function onNewTurn()
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
    14
	SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
    15
end
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
    16
5571
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    17
function onGearAdd(gear)
5827
a416f1070fdf we don't need trailing whitespaces... I guess :P
sheepluva
parents: 5571
diff changeset
    18
5571
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    19
	if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    20
		specialGear = gear
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    21
		SetInputMask(band(0xFFFFFFFF, bnot(gmHJump)))
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    22
	end
4662
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
    23
5571
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    24
end
4662
63aafc9c2a81 Add a bunch of lua from mikade, update translation files
mikade+nemo
parents:
diff changeset
    25
5571
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    26
function onGearDelete(gear)
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    27
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    28
	if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    29
		specialGear = nil
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    30
		SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    31
	end
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    32
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    33
end
434ec40070e0 Allow user to drop bombs off rope, parachute, and flying saucer.
mikade
parents: 5325
diff changeset
    34