local NO_WALKING_THRESHOLD = fixed_float(500)

local eets = nil
local we = nil

function OnInit()
	if GetVersion() ~= "IOS" then
		local params = {
			{ ClickableExtension.KEY_RControl, false },
			{ ClickableExtension.KEY_LControl, false },
			{ ClickableExtension.KEY_RShift, true },
			{ ClickableExtension.KEY_LShift, true },
		}
		for object in World_GetObjects() do
			if object:GetBlueprintName() == "spring" then
				object:GetClickableExtension():SetHotkey(params[ 1 ][ 1 ])
				if params[ 1 ][ 2 ] then
					object:CallFunction("EnableRandomness")
				end
				table.remove(params, 1)
			end
		end
	end
	
	eets = World_GetEets()
	we = eets:GetWalkingExtension()
end

function OnUpdatePlaying()
	if eets:GetPosition().y < NO_WALKING_THRESHOLD then
		we:DelayLanding()
	end
end