share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
changeset 12016 e93ee0bedad8
parent 12015 37787ab00853
child 12017 a315ded26330
equal deleted inserted replaced
12015:37787ab00853 12016:e93ee0bedad8
  1398 		pMode = {loc("LandFlag Modification Mode"),loc("Sprite Erasure Mode")}
  1398 		pMode = {loc("LandFlag Modification Mode"),loc("Sprite Erasure Mode")}
  1399 	elseif cat[cIndex] == loc("Sprite Testing Mode") or cat[cIndex] == loc("Sprite Placement Mode") then
  1399 	elseif cat[cIndex] == loc("Sprite Testing Mode") or cat[cIndex] == loc("Sprite Placement Mode") then
  1400 		for i = 1, #reducedSpriteTextArray do
  1400 		for i = 1, #reducedSpriteTextArray do
  1401 			pMode[i] = reducedSpriteTextArray[i]
  1401 			pMode[i] = reducedSpriteTextArray[i]
  1402 		end
  1402 		end
       
  1403 		sFrame = 0
  1403 	elseif cat[cIndex] == loc("Waypoint Editing Mode") then
  1404 	elseif cat[cIndex] == loc("Waypoint Editing Mode") then
  1404 		pMode = {loc("Place Waypoint"), loc("Delete Waypoint")}
  1405 		pMode = {loc("Place Waypoint"), loc("Delete Waypoint")}
  1405 	end
  1406 	end
  1406 
  1407 
  1407 end
  1408 end
  3105 	else
  3106 	else
  3106 		pIndex = pIndex - 1
  3107 		pIndex = pIndex - 1
  3107 		if pIndex == 0 then
  3108 		if pIndex == 0 then
  3108 			pIndex = #pMode
  3109 			pIndex = #pMode
  3109 		end
  3110 		end
  3110 		sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1)
  3111 		if cat[cIndex] == loc("Sprite Placement Mode") then
       
  3112 			sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1)
       
  3113 		end
  3111 
  3114 
  3112 		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  3115 		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  3113 			AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2)
  3116 			AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2)
  3114 		end
  3117 		end
  3115 	end
  3118 	end
  3131 	else
  3134 	else
  3132 		pIndex = pIndex + 1
  3135 		pIndex = pIndex + 1
  3133 		if pIndex > #pMode then
  3136 		if pIndex > #pMode then
  3134 			pIndex = 1
  3137 			pIndex = 1
  3135 		end
  3138 		end
  3136 		sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1)
  3139 		if cat[cIndex] == loc("Sprite Placement Mode") then
       
  3140 			sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1)
       
  3141 		end
  3137 	
  3142 	
  3138 		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  3143 		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  3139 			AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2)
  3144 			AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2)
  3140 		end
  3145 		end
  3141 	end
  3146 	end