#library "ssplash"
#include "zcommon.acs"

script "BDCheckFloorType" (void) //Water Small Splash
{
  if (CheckActorFloorTexture(0, "WATER01"))    GiveInventory("IsOverWater", 1);
  if (CheckActorFloorTexture(0, "TIDAL01"))    GiveInventory("IsOverWater", 1);
  if (CheckActorFloorTexture(0, "WATMD01"))    GiveInventory("IsOverWater", 1);
  if (CheckActorFloorTexture(0, "GRASS1"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "GRASS2"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "GRASS3"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNGFL1"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNGFL2"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNGFL3"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNGFL4"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "DIRT01"))    GiveInventory("IsOverGrass", 1);
if (CheckActorFloorTexture(0, "DIRT01B"))    GiveInventory("IsOverGrass", 1);
if (CheckActorFloorTexture(0, "DIRT02"))    GiveInventory("IsOverGrass", 1);
if (CheckActorFloorTexture(0, "DIRT03"))    GiveInventory("IsOverGrass", 1);

  if (CheckActorFloorTexture(0, "RROCK19"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "RROCK20"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "FLAT10"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "FLAT5"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "FLOOR7_1"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "MFLR8_2"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "MFLR8_4"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "RROCK03"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "RROCK16"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "RROCK17"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "RROCK18"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "DESERT01"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "DESERT02"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "DESERT03"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNKY15"))    GiveInventory("IsOverGrass", 1);
   if (CheckActorFloorTexture(0, "SANDS1"))    GiveInventory("IsOverSand", 1);
   if (CheckActorFloorTexture(0, "SANDS2"))    GiveInventory("IsOverSand", 1);
   
   if (CheckActorFloorTexture(0, "bricks5"))    GiveInventory("IsOverBricks", 1);
   if (CheckActorFloorTexture(0, "bamboo1"))    GiveInventory("IsOverWood", 1);
   if (CheckActorFloorTexture(0, "wood1"))    GiveInventory("IsOverWood", 1);
   if (CheckActorFloorTexture(0, "wood05"))    GiveInventory("IsOverWood", 1);
   if (CheckActorFloorTexture(0, "wood06"))    GiveInventory("IsOverWood", 1);
}


script "BDCheckFloorType2" (void) // Footstep Sounds
{  
  
   if (CheckActorFloorTexture(0, "WATER01"))    GiveInventory("IsOverWater", 1); 
  if (CheckActorFloorTexture(0, "WATMD01"))    GiveInventory("IsOverWater", 1);
  if (CheckActorFloorTexture(0, "TIDAL01"))    GiveInventory("IsOverWater", 1);
  
  if (CheckActorFloorTexture(0, "JUNGFL1"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNGFL2"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNGFL3"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNGFL4"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNGFL5"))    GiveInventory("IsOverGrass", 1);
  
if (CheckActorFloorTexture(0, "DIRT01"))    GiveInventory("IsOverGravel", 1);
if (CheckActorFloorTexture(0, "DIRT01B"))    GiveInventory("IsOverGravel", 1);
if (CheckActorFloorTexture(0, "DIRT02"))    GiveInventory("IsOverGravel", 1);
if (CheckActorFloorTexture(0, "DIRT03"))    GiveInventory("IsOverGravel", 1);
	
  
  if (CheckActorFloorTexture(0, "FLOOR6_1"))    GiveInventory("IsOverGravel", 1);
  if (CheckActorFloorTexture(0, "FLOOR6_2"))    GiveInventory("IsOverGravel", 1);
  if (CheckActorFloorTexture(0, "JUNKY15"))    GiveInventory("IsOverGravel", 1);
  if (CheckActorFloorTexture(0, "SANDS1"))    GiveInventory("IsOverGravel", 1);
  if (CheckActorFloorTexture(0, "SANDS2"))    GiveInventory("IsOverGravel", 1);
  
    
  
  if (CheckActorFloorTexture(0, "JUNKY15"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "FLAT10"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "GRASS1"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "GRASS2"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "GRASS3"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "MFLR8_4"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "RROCK16"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "RROCK17"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "RROCK18"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "RROCK19"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "RROCK20"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "JUNKY15"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "JUNKY16"))    GiveInventory("IsOverDirt", 1);
  
  
  
  if (CheckActorFloorTexture(0, "CEIL1_2"))    GiveInventory("IsOverMetal", 1);
  if (CheckActorFloorTexture(0, "FLAT1_3"))    GiveInventory("IsOverMetal", 1);
  if (CheckActorFloorTexture(0, "FLAT4"))    GiveInventory("IsOverMetal", 1);
  if (CheckActorFloorTexture(0, "FLAT20"))    GiveInventory("IsOverMetal", 1);
  if (CheckActorFloorTexture(0, "FLAT23"))    GiveInventory("IsOverMetal", 1);
  if (CheckActorFloorTexture(0, "FLAT22"))    GiveInventory("IsOverMetal", 1);
  
  if (CheckActorFloorTexture(0, "SLIME14"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "SLIME15"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "SLIME16"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "GATE1"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "GATE2"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "GATE3"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "GATE4"))    GiveInventory("IsOverMetal2", 1);
  
  if (CheckActorFloorTexture(0, "METAL17"))    GiveInventory("IsOverMetal", 1);
  if (CheckActorFloorTexture(0, "METAL35"))    GiveInventory("IsOverMetal", 1);
  if (CheckActorFloorTexture(0, "METAL37"))    GiveInventory("IsOverMetal", 1);
  if (CheckActorFloorTexture(0, "METAL38"))    GiveInventory("IsOverMetal", 1);
  if (CheckActorFloorTexture(0, "METAL40"))    GiveInventory("IsOverMetal", 1);
  
  if (CheckActorFloorTexture(0, "METAL12"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "METAL13"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "METAL13B"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "METAL13C"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "METAL14"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "METAL15"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "METAL16"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "METAL36"))    GiveInventory("IsOverMetal2", 1);
  if (CheckActorFloorTexture(0, "METAL51"))    GiveInventory("IsOverMetal2", 1);
  
  
  if (CheckActorFloorTexture(0, "FLAT1"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "FLAT1_1"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "FLAT1_2"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "FLAT1_3"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "FLAT5_6"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "FLAT5_7"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "FLAT5_8"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "FLOOR5_4"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "GRNROCK"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "MFLR8_2"))    GiveInventory("IsOverGravel", 1);
  if (CheckActorFloorTexture(0, "MFLR8_3"))    GiveInventory("IsOverGravel", 1);
  if (CheckActorFloorTexture(0, "RROCK03"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "RROCK03"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "RROCK04"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "RROCK09"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "RROCK10"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "RROCK11"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "RROCK12"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "RROCK13"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "RROCK14"))    GiveInventory("IsOverRock", 1);
  if (CheckActorFloorTexture(0, "RROCK15"))    GiveInventory("IsOverRock", 1);
  
  if (CheckActorFloorTexture(0, "JUNKY15"))    GiveInventory("IsOverSnow", 1);
  
  if (CheckActorFloorTexture(0, "CEIL1_1"))    GiveInventory("IsOverWood", 1);
  if (CheckActorFloorTexture(0, "CRATOP1"))    GiveInventory("IsOverWood", 1);
  if (CheckActorFloorTexture(0, "CRATOP2"))    GiveInventory("IsOverWood", 1);
  if (CheckActorFloorTexture(0, "FLAT5_1"))    GiveInventory("IsOverWood", 1);
  if (CheckActorFloorTexture(0, "FLAT5_2"))    GiveInventory("IsOverWood", 1);
  
  
  if (CheckActorFloorTexture(0, "CEIL1_3"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "CEIL3_3"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "CEIL3_4"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "CEIL3_4"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "COMP01"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "CONS1_1"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "CONS1_5"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "CONS1_7"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLAT2"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLAT3"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLAT8"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLAT9"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLAT17"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLAT18"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLAT19"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLOOR0_5"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLOOR0_6"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLOOR0_7"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLOOR3_3"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLOOR4_1"))    GiveInventory("IsOverTile", 1);
  if (CheckActorFloorTexture(0, "FLOOR4_5"))    GiveInventory("IsOverTile", 1);
  
  if (CheckActorFloorTexture(0, "DEM1_1"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "DEM1_2"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "DEM1_3"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "DEM1_4"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "DEM1_5"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "DEM1_6"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "FLOOR4_6"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "FLOOR4_8"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "FLOOR5_1"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "FLOOR5_2"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "FLOOR5_3"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "FLOOR7_2"))    GiveInventory("IsOverTile2", 1);
  if (CheckActorFloorTexture(0, "RROCK20"))    GiveInventory("IsOverGrass", 1);
  
  //if (CheckActorFloorTexture(0, "JUNKY15"))    GiveInventory("IsOverSlimy", 1);
  
  if (CheckActorFloorTexture(0, "DESERT01"))    GiveInventory("IsOverGravel", 1);
  if (CheckActorFloorTexture(0, "DESERT02"))    GiveInventory("IsOverGravel", 1);
  if (CheckActorFloorTexture(0, "DESERT03"))    GiveInventory("IsOverGravel", 1);
  if (CheckActorFloorTexture(0, "SANDS1"))    GiveInventory("IsOverSand", 1);
  if (CheckActorFloorTexture(0, "SANDS2"))    GiveInventory("IsOverSand", 1);
  
  

}







script "BDCheckFloorType3" (void) ///Check if Over Dirt or Grass for explosions
{
  if (CheckActorFloorTexture(0, "GRASS1"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "GRASS2"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "GRASS3"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "RROCK20"))    GiveInventory("IsOverGrass", 1);
  if (CheckActorFloorTexture(0, "JUNGFL1"))    GiveInventory("IsOverGrass", 1);
	

  
  if (CheckActorFloorTexture(0, "RROCK03"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "RROCK16"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "RROCK17"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "RROCK18"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "RROCK19"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "RROCK20"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "DIRT01"))    GiveInventory("IsOverdIRT", 1);
if (CheckActorFloorTexture(0, "DIRT01B"))    GiveInventory("IsOverdIRT", 1);
if (CheckActorFloorTexture(0, "DIRT02"))    GiveInventory("IsOverdIRT", 1);
if (CheckActorFloorTexture(0, "DIRT03"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "FLAT10"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "FLAT5"))    GiveInventory("IsOverdIRT", 1);
  
  if (CheckActorFloorTexture(0, "FLOOR7_1"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "FLOOR6_1"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "FLOOR6_2"))    GiveInventory("IsOverDirt", 1);
  if (CheckActorFloorTexture(0, "MFLR8_2"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "MFLR8_4"))    GiveInventory("IsOverdIRT", 1);
  
  if (CheckActorFloorTexture(0, "DESERT01"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "DESERT02"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "DESERT03"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "JUNKY15"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "JUNKY16"))    GiveInventory("IsOverdIRT", 1);
  if (CheckActorFloorTexture(0, "SANDS1"))    GiveInventory("IsOverSand", 1);
  if (CheckActorFloorTexture(0, "SANDS2"))    GiveInventory("IsOverSand", 1);
  
  if (CheckActorFloorTexture(0, "SANDS2"))    GiveInventory("IsOverSand", 1);
  
  if (CheckActorFloorTexture(0, "SFLR6_1"))    GiveInventory("IsOverFlesh", 1);
  if (CheckActorFloorTexture(0, "SFLR6_4"))    GiveInventory("IsOverFlesh", 1);
  if (CheckActorFloorTexture(0, "SFLR7_1"))    GiveInventory("IsOverFlesh", 1);
  if (CheckActorFloorTexture(0, "SFLR7_4"))    GiveInventory("IsOverFlesh", 1);
  

}






script "NapalmCheckCeiling" (void)
{
  if (CheckActorCeilingTexture(0, "F_SKY1"))    GiveInventory("PositiveMark", 1);
  if (CheckActorCeilingTexture(0, "JUNGLE4B"))    GiveInventory("PositiveMark", 1);
  if (CheckActorCeilingTexture(0, "JUNGLE4"))    GiveInventory("PositiveMark", 1);
}


script "NapalmFighterAnimate" (void)
{
  Thing_Destroy(544);
}


// IF argument 1, is a FENCE01
// If argument 2, is a FENCE02
// If argument 3, is a FENCE03
script 41 (int arg1, int arg2, int arg3)
{
	 SetLineTexture(arg1,SIDE_FRONT,TEXTURE_MIDDLE,"FENCE01B");
     SetLineTexture(arg1,SIDE_BACK,TEXTURE_MIDDLE,"FENCE01B");
		
	 SetLineTexture(arg2,SIDE_FRONT,TEXTURE_MIDDLE,"FENCE02B");
     SetLineTexture(arg2,SIDE_BACK,TEXTURE_MIDDLE,"FENCE02B");

	 SetLineTexture(arg3,SIDE_FRONT,TEXTURE_MIDDLE,"FENCE03B");
     SetLineTexture(arg3,SIDE_BACK,TEXTURE_MIDDLE,"FENCE03B");
	 SetLineBlocking(arg1, BLOCK_NOTHING);
	 SetLineBlocking(arg2, BLOCK_NOTHING);
	 SetLineBlocking(arg3, BLOCK_NOTHING);
}