share/hedgewars/Data/Scripts/Multiplayer/WxW.lua
changeset 15137 651c1737be2a
parent 15068 6f51c75994a4
child 15199 b0ed2b17c0cf
equal deleted inserted replaced
15136:309aa93df110 15137:651c1737be2a
   975 function PlaceWarn()
   975 function PlaceWarn()
   976 	PlaySound(sndDenied)
   976 	PlaySound(sndDenied)
   977 	AddCaption(loc("Please place your hedgehog first!"), msgColorWarn, capgrpMessage2)
   977 	AddCaption(loc("Please place your hedgehog first!"), msgColorWarn, capgrpMessage2)
   978 end
   978 end
   979 
   979 
   980 function onLJump()
   980 function AcceptConfiguration()
   981 	if roundN == 1 then
   981 	if roundN == 1 then
   982 		PlaySound(sndPlaced)
   982 		PlaySound(sndPlaced)
   983 		SetInputMask(0xFFFFFFFF)
   983 		SetInputMask(0xFFFFFFFF)
   984 		AddCaption(loc("Configuration accepted."), msgColorTech, capgrpMessage)
   984 		AddCaption(loc("Configuration accepted."), msgColorTech, capgrpMessage)
   985 		if GetGameFlag(gfPlaceHog) then
   985 		if GetGameFlag(gfPlaceHog) then
   999 			wallsLeft = #wTouched
   999 			wallsLeft = #wTouched
  1000 			allowCrate = true
  1000 			allowCrate = true
  1001 		end
  1001 		end
  1002 		PlaySound(sndYesSir, CurrentHedgehog)
  1002 		PlaySound(sndYesSir, CurrentHedgehog)
  1003 		FinalizeMenu()
  1003 		FinalizeMenu()
       
  1004 	end
       
  1005 end
       
  1006 
       
  1007 function onLJump()
       
  1008 	if roundN == 1 then
       
  1009 		AcceptConfiguration()
  1004 	elseif roundN == 2 then
  1010 	elseif roundN == 2 then
  1005 		PlaceWarn()
  1011 		PlaceWarn()
  1006 	elseif roundN == 100 then
  1012 	elseif roundN == 100 then
  1007 		if CBA and not crateCollected then
  1013 		if CBA and not crateCollected then
  1008 			if (GetCurAmmoType() ~= amRope) and
  1014 			if (GetCurAmmoType() ~= amRope) and
  1361 		SetInputMask(0)
  1367 		SetInputMask(0)
  1362 		allowCrate = false
  1368 		allowCrate = false
  1363 		UpdateMenu()
  1369 		UpdateMenu()
  1364 		AddCaption(string.format(loc("%s may choose the rules."), GetHogTeamName(CurrentHedgehog)), msgColorTech, capgrpGameState)
  1370 		AddCaption(string.format(loc("%s may choose the rules."), GetHogTeamName(CurrentHedgehog)), msgColorTech, capgrpGameState)
  1365 		HandleStartingStage()
  1371 		HandleStartingStage()
       
  1372 		if GetHogLevel(CurrentHedgehog) ~= 0 then
       
  1373 			AcceptConfiguration()
       
  1374 		end
  1366 	end
  1375 	end
  1367 
  1376 
  1368 end
  1377 end
  1369 
  1378 
  1370 function CanSurf()
  1379 function CanSurf()