actor ScriptableSkyViewpoint : SkyViewpoint 19190
{
    //$Category "Ghouls vs Humans Decoration"
    //$Title SkyViewPoint Script Caller
	states
	{
		Spawn:
		TNT1 A 1
		TNT1 A -1 ACS_NamedExecuteWithResult("SkyViewPoint")
		stop
	}
}

Actor Duke_ParticleGlass
{
	Height 4
	Radius 4
	Scale 0.15
	+MISSILE
	+BOUNCEONWALLS
	+BOUNCEONFLOORS
	+BOUNCEONCEILINGS
	+BOUNCEAUTOOFF
	+CLIENTSIDEONLY
	+NOBOUNCESOUND
	States
	{
		Spawn: DK06 ABCABCABCABCABCABCABCABCABC 2
		Stop
	}
}

Actor Duke_ParticleScrap1
{
	Height 4
	Radius 4
	Scale 0.4
	+MISSILE
	+CLIENTSIDEONLY
	States
	{
		Spawn: DK47 ABCDEFGHI 2
		Loop
	}
}

Actor Duke_ParticleScrap2 : Duke_ParticleScrap1
{
	States
	{
		Spawn: DK48 ABCDEFGH 2
		Loop
	}
}

Actor Duke_ParticlePaper : Duke_ParticleScrap1
{
	States
	{
		Spawn: DK49 ABCD 2
		Loop
	}
}

Actor Duke_ParticleRubber : Duke_ParticleScrap1
{
	States
	{
		Spawn: DK47 ABCDEFG 2
		Loop
	}
}

Actor Duke_WaterFountain
{
	Scale 0.001
	+NOINTERACTION
	+FORCEYBILLBOARD
	+CLIENTSIDEONLY
	States
	{
		Spawn:
			DK12 ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 A_SetScale(scalex + 0.02, scaley + 0.02)
			
		SpawnLoop:
			DK12 ABCD 1
			Loop
	}
}

ACTOR Duke_FireHydrant 30000 
{ 
	//$Category Duke3d
	Health 1
	Mass 100000
	Scale 0.6
	+SHOOTABLE
	+SOLID
	+NOBLOOD
	+NOBLOODDECALS
	States 
	{ 
		Spawn: DK00 A -1 
		Stop 
		
		Death: DK00 B 0 A_SpawnItemEx("Duke_WaterFountain", 0, 0, 0, 0, 0, 0, 0, SXF_CLIENTSIDE)
		Death2: DK00 B -1
		Stop
	}
}

ACTOR Duke_FireBarrel 30004
{
	//$Category Duke3d
	Height 25
	Radius 10
	Health 1
	Mass 100000
	Scale 0.8
	+SHOOTABLE
	+SOLID
	+NOBLOOD
	+NOBLOODDECALS
	+FORCEYBILLBOARD
	States
	{ 
		Spawn: 
			DK03 ABCD 3
			Loop
		Death:
			TNT1 AAAAAAAAAA 0 A_SpawnItemEx("Duke_ParticleScrap1", random(-8, 8), random(-8, 8), random(0, 20), random(-8, 8), random(-8, 8), random(0, 10), 0, SXF_CLIENTSIDE)
			TNT1 AAAAAAAAAA 0 A_SpawnItemEx("Duke_ParticleScrap2", random(-8, 8), random(-8, 8), random(0, 20), random(-8, 8), random(-8, 8), random(0, 10), 0, SXF_CLIENTSIDE)
			Stop
	}
}

ACTOR Duke_Toilet 30005
{
	//$Category Duke3d
	Height 16
	Radius 8
	Health 1
	Mass 100000
	Scale 0.6
	+SHOOTABLE
	+SOLID
	+NOBLOOD
	+NOBLOODDECALS
	+FORCEYBILLBOARD
	States 
	{ 
		Spawn: DK04 A -1
		Stop
		
		Death: DK04 B 0 A_SpawnItemEx("Duke_WaterFountain", 0, 0, 0, 0, 0, 0, 0, SXF_CLIENTSIDE)
		Death2: DK04 B -1
		Stop
	}
}

ACTOR Duke_BarStool 30006
{ 
	//$Category Duke3d
	Scale 0.4
	+NOINTERACTION
	+CLIENTSIDEONLY
	+FORCEYBILLBOARD
	States 
	{ 
		Spawn: DK05 A -1 
		Stop 
	}
}

Actor Duke_Plant 30030
{
	//$Category Duke3d
	Height 4
	Radius 4
	Scale 0.6
	+NOINTERACTION
	+CLIENTSIDEONLY
	States
	{
		Spawn:
			DK30 A -1
			Stop
	}
}

Actor Duke_TrashCan : Duke_FireBarrel 30033
{
	States
	{
		Spawn:
			DK33 A -1
			Stop
	}
}

// i hope this doesnt cause network lag...
actor Duke_InvisoBoom : SwitchableDecoration 30040
{
    //$Arg0 "Delay(Tics)"
    //$Arg0Type 0
    //$Category Duke3d
    +NOGRAVITY
    var int user_timer;
    
	States
	{
        Spawn:
        Inactive:
            TNT1 A 0 A_ChangeFlag("DORMANT", true)
            TNT1 A -1
            Stop
            
        Active:
		    // the timing of duke's SEENINE actor is weird
            TNT1 A 0 A_SetUserVar("user_timer", user_timer+2)
            TNT1 A 1 A_JumpIf(user_timer >= args[0], "Explode")
            loop
            
        Explode:
            TNT1 A 0 A_Quake(1, 32, 0, 5000, "")
			//TNT1 A 0 A_PlaySound("rpg_explode", 7, 1.0, false, 2)
			TNT1 A 0 ACS_ExecuteAlways(2, 0, 0, 0, 0) // this fixes the sound issues
            TNT1 A 0 A_Explode(140 - random(0, 7), 148, XF_HURTSOURCE, 1)
			DK40 ABCDEFGHIJKLMNOPQRSTU 2 bright
            Stop
	}
}



ACTOR ArgsRainSpawner 19191
{    
    //$Category "Ghouls vs Humans Decoration"
    //$Title Rain Spawner (Customizable)
	//$Arg0 Rain delay (lower tics)
	//$Arg1 Rain delay (upper tics)
	//+MISSILE
	+NOCLIP
	+NOGRAVITY
	+NOBLOCKMAP
    +SPAWNCEILING
	+CLIENTSIDEONLY
 	States
 	{
 	Spawn:
		TNT1 A 0 A_SetTics(random(args[0], 6 + args[1]))
		TNT1 A 3 A_SpawnItemEx("RainDrop",Random(0,-128),Random(0,-128),0,Random(0,1),Random(0,1),-Random(1,5),Random(0,255),0) 
 		Goto Spawn
	}
}
