share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
changeset 12020 da843fffe020
parent 12019 67b18844e3bb
child 12021 c7c0be04ee36
equal deleted inserted replaced
12019:67b18844e3bb 12020:da843fffe020
  2944 			end
  2944 			end
  2945 
  2945 
  2946 			-- update display selection criteria
  2946 			-- update display selection criteria
  2947 			if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  2947 			if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  2948 				AddCaption(cat[cIndex],0xffba00ff,capgrpMessage)
  2948 				AddCaption(cat[cIndex],0xffba00ff,capgrpMessage)
  2949 				local caption2
  2949 				showSecondaryMessage()
  2950 				if type(pMode[pIndex]) == "table" then
       
  2951 					caption2 = tostring(pMode[pIndex][1])
       
  2952 				else
       
  2953 					caption2 = tostring(pMode[pIndex])
       
  2954 				end
       
  2955 				AddCaption(caption2,0xffba00ff,capgrpMessage2)
       
  2956 				if superDelete == true then
  2950 				if superDelete == true then
  2957 					AddCaption(loc("Warning: Deletition Mode Active"),0xffba00ff,capgrpAmmoinfo)
  2951 					AddCaption(loc("Warning: Deletition Mode Active"),0xffba00ff,capgrpAmmoinfo)
  2958 				end
  2952 				end
  2959 			end
  2953 			end
  2960 
  2954 
  3085 
  3079 
  3086 function onPreciseUp()
  3080 function onPreciseUp()
  3087 	preciseOn = false
  3081 	preciseOn = false
  3088 end
  3082 end
  3089 
  3083 
       
  3084 function showSecondaryMessage()
       
  3085 	local caption2
       
  3086 	if type(pMode[pIndex]) == "table" then
       
  3087 		caption2 = tostring(pMode[pIndex][1])
       
  3088 	elseif curWep == amGirder then
       
  3089 		caption2 = loc("Girder")
       
  3090 	elseif curWep == amRubber then
       
  3091 		caption2 = loc("Rubber")
       
  3092 	else
       
  3093 		caption2 = tostring(pMode[pIndex])
       
  3094 	end
       
  3095 	AddCaption(caption2, 0xffba00ff, capgrpMessage2)
       
  3096 end
       
  3097 
  3090 ---------------------------------------------------------------
  3098 ---------------------------------------------------------------
  3091 -- Cycle through selection subsets (by changing pIndex, pMode)
  3099 -- Cycle through selection subsets (by changing pIndex, pMode)
  3092 -- i.e 	health of barrels, medikits,
  3100 -- i.e 	health of barrels, medikits,
  3093 --		timer of mines
  3101 --		timer of mines
  3094 --		contents of crates etc.
  3102 --		contents of crates etc.
  3113 		if cat[cIndex] == loc("Sprite Placement Mode") then
  3121 		if cat[cIndex] == loc("Sprite Placement Mode") then
  3114 			sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1)
  3122 			sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1)
  3115 		end
  3123 		end
  3116 
  3124 
  3117 		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  3125 		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  3118 			AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2)
  3126 			showSecondaryMessage()
  3119 		end
  3127 		end
  3120 	end
  3128 	end
  3121 
  3129 
  3122 end
  3130 end
  3123 
  3131 
  3141 		if cat[cIndex] == loc("Sprite Placement Mode") then
  3149 		if cat[cIndex] == loc("Sprite Placement Mode") then
  3142 			sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1)
  3150 			sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1)
  3143 		end
  3151 		end
  3144 	
  3152 	
  3145 		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  3153 		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
  3146 			AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2)
  3154 			showSecondaryMessage()
  3147 		end
  3155 		end
  3148 	end
  3156 	end
  3149 
  3157 
  3150 end
  3158 end
  3151 
  3159