share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
changeset 12334 f88eebcf22c5
parent 12333 ddeaa203c405
child 12343 43eb886f479b
equal deleted inserted replaced
12333:ddeaa203c405 12334:f88eebcf22c5
   274 HedgewarsScriptLoad("/Scripts/TechMaps.lua")
   274 HedgewarsScriptLoad("/Scripts/TechMaps.lua")
   275 
   275 
   276 -- experimental crap
   276 -- experimental crap
   277 --local destroyMap = false
   277 --local destroyMap = false
   278 
   278 
       
   279 -- Special frames in Ammos.png/Ammos_bw.png
       
   280 local ammoFrameAirAttack = 63
       
   281 
   279 -----------------------------------------
   282 -----------------------------------------
   280 -- tracking vars for save/load purposes
   283 -- tracking vars for save/load purposes
   281 -----------------------------------------
   284 -----------------------------------------
   282 
   285 
   283 local teamCounter = 0
   286 local teamCounter = 0
   352 				{amCake, 	"amCake"},
   355 				{amCake, 	"amCake"},
   353 				{amBallgun, 	"amBallgun"},
   356 				{amBallgun, 	"amBallgun"},
   354 				{amRCPlane,	"amRCPlane"},
   357 				{amRCPlane,	"amRCPlane"},
   355 				{amSMine,	"amSMine"},
   358 				{amSMine,	"amSMine"},
   356 
   359 
   357 				{amAirAttack,	"amAirAttack", 63}, -- overwritten icon in Ammos.png
   360 				{amAirAttack,	"amAirAttack", ammoFrameAirAttack}, -- overwritten icon in Ammos.png
   358 				{amMineStrike,	"amMineStrike"},
   361 				{amMineStrike,	"amMineStrike"},
   359 				{amNapalm, 	"amNapalm"},
   362 				{amNapalm, 	"amNapalm"},
   360 				{amPiano,	"amPiano"},
   363 				{amPiano,	"amPiano"},
   361 				{amDrillStrike,	"amDrillStrike"},
   364 				{amDrillStrike,	"amDrillStrike"},
   362 				{amAirMine,	"amAirMine"},
   365 				{amAirMine,	"amAirMine"},
   986 		placedLandFlags[pID] = "lfNormal"
   989 		placedLandFlags[pID] = "lfNormal"
   987 		--placedTint[pID] = nil
   990 		--placedTint[pID] = nil
   988 		placedTint[pID] = 255 + (255*0x100) + (255*0x10000) + (255*0x1000000) -- A BGR
   991 		placedTint[pID] = 255 + (255*0x100) + (255*0x10000) + (255*0x1000000) -- A BGR
   989 	end
   992 	end
   990 
   993 
   991 	return PlaceSprite(placedX[pID], placedY[pID], placedSprite[pID], placedFrame[pID],
   994 	-- Special case: Placing amAirAttack of the ammos sprite (since this one is overwritten)
       
   995 	local actualDisplayedImage = placedFrame[pID]
       
   996 	if (placedSprite[pID] == sprAMAmmos or placedSprite[pID] == sprAMAmmosBW) and (actualDisplayedImage == (amAirAttack - 1)) then
       
   997 		actualDisplayedImage = ammoFrameAirAttack
       
   998 	end
       
   999 
       
  1000 	return PlaceSprite(placedX[pID], placedY[pID], placedSprite[pID], actualDisplayedImage,
   992 		placedTint[pID],
  1001 		placedTint[pID],
   993 		nil, -- overrite existing land
  1002 		nil, -- overrite existing land
   994 		nil, nil, -- this stuff specifies flipping
  1003 		nil, nil, -- this stuff specifies flipping
   995 		landType)
  1004 		landType)
   996 
  1005 
  2851 				dAngle = 270
  2860 				dAngle = 270
  2852 				dSprite = sprKnife
  2861 				dSprite = sprKnife
  2853 			elseif (cat[cIndex] == loc("Sprite Placement Mode")) then
  2862 			elseif (cat[cIndex] == loc("Sprite Placement Mode")) then
  2854 				dSprite = reducedSpriteIDArray[pIndex]
  2863 				dSprite = reducedSpriteIDArray[pIndex]
  2855 				dFrame = sFrame
  2864 				dFrame = sFrame
       
  2865 				if ((dSprite == sprAMAmmos) or (dSprite == sprAMAmmosBW)) and (dFrame == (amAirAttack - 1)) then
       
  2866 					-- Special case: Air attack icon of ammos sprite needs to be fixed (since this icon is overwritten)
       
  2867 					dFrame = ammoFrameAirAttack
       
  2868 				end
  2856 			else
  2869 			else
  2857 				dCol = 0xFFFFFF00
  2870 				dCol = 0xFFFFFF00
  2858 				dSprite = sprArrow
  2871 				dSprite = sprArrow
  2859 			end
  2872 			end
  2860 
  2873