
//==============================================================================================================================================
//==============================================================================
//		ASSEMBLED ARMORS
//==============================================================================
//==============================================================================================================================================

ACTOR RLCerberusArmorPickup : RLGenericArmorPickup
{
    //$category "Master Assembled Armor"
	//$Sprite CERAA0
    Tag "Cerberus Armor"
    Inventory.Icon "CERABOX"
	Inventory.PickupSound "misc/rlarmor4"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		CERA A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		CERA A 6
		CERA A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorModReconfigure:
// This armor can't be reconfigured, so throw out an error and don't activate the armor or anything.
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is not a reconfigurable\ntype of armor.")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLCerberusArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLCerberusArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLCerberusArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLCerberusArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLCerberusArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLCerberusArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvCerberus Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvCerberus Armor \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLCerberusSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Cerberus Armor =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLCerberusSetBonusArmor",1)
		TNT1 A 0 A_JumpIfInventory("RLCerberusSetBonusBoots",1,"SetBonusCheckingDetection")
		TNT1 A 0 A_JumpIfInventory("RLCerberusSetBonusTristarBlaster",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLCerberusSetBonusBoots",1,1)
		Stop
		TNT1 A 0 A_JumpIfInventory("RLCerberusSetBonusTristarBlaster",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLCerberusSetBonusActive",1)
		TNT1 A 0 A_Print("\cvCerberus Armor \c-equipped.\n\cf= TRINITY GUARDIAN =\n\cgTristar Blaster fires three times faster", 8, "CONFONT")
		Stop*/
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLCerberusArmorWorldSpawnPickup : RLCerberusArmorPickup 18004
{
    //$category "Master Assembled Armor"
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledWorldDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/masterspawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLCerberusArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLCerberusArmorPickupSpecial : RLCerberusArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLCerberusArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLCerberusArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLCerberusArmor : RLGenericArmor
{
  Armor.Savepercent 0
  Armor.Saveamount 100
  DamageFactor "Bullet", 0.85
  DamageFactor "Fire", 0.30
  DamageFactor "Plasma", 0.50
}

Actor RLCerberusArmorToken : RLPermanentInventory {}
Actor RLCerberusArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLFireShieldArmorPickup : RLGenericArmorPickup 18005
{
    //$category "Advanced Assembled Armor"
	//$Sprite FSHDA0
    Tag "Fire Shield"
    Inventory.Icon "FSHDBOX"
	Inventory.PickupSound "misc/rlarmor3"
	Inventory.UseSound "misc/rlshield"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		FSHD A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		FSHD A 6
		FSHD A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorModReconfigure:
// This armor can't be reconfigured, so throw out an error and don't activate the armor or anything.
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is not a reconfigurable\ntype of armor.")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLFireShieldArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLFireShieldArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLFireShieldArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLFireShieldArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL200ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLFireShieldArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLFireShieldArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvFire Shield.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvFire Shield \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Fire Shield =", 2, "CONFONT")
		Fail
	
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLFireShieldArmorPickupSpecial : RLFireShieldArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLFireShieldArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLFireShieldArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLFireShieldArmor : RLGenericArmor
{
  Armor.Savepercent 40
  Armor.Saveamount 200
  DamageFactor "Fire", 0.05
}
	
Actor RLFireShieldArmorRenegade : RLFireShieldArmor
{
  Armor.Savepercent 60
}

Actor RLFireShieldArmorToken : RLPermanentInventory {}
Actor RLFireShieldArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLTowerShieldArmorPickup : RLGenericArmorPickup 18006
{
    //$category "Basic Assembled Armor"
	//$Sprite TSHDA0
    Tag "Tower Shield"
    Inventory.Icon "TSHDBOX"
	Inventory.PickupSound "misc/rlarmor5"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		TSHD A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		TSHD A 6
		TSHD A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorModReconfigure:
// This armor can't be reconfigured, so throw out an error and don't activate the armor or anything.
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is not a reconfigurable\ntype of armor.")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLTowerShieldArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLTowerShieldArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLTowerShieldArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLTowerShieldArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL150ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLTowerShieldArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLTowerShieldArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvTower Shield.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvTower Shield \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Tower Shield =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLTowerShieldArmorPickupSpecial : RLTowerShieldArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLTowerShieldArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLTowerShieldArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLTowerShieldArmor : RLGenericArmor
{
  Armor.Savepercent 50
  Armor.Saveamount 150
  DamageFactor "Normal", 0.0
  DamageFactor "Piercing", 1.0
}

Actor RLTowerShieldArmorRenegade : RLTowerShieldArmor
{
  Armor.Savepercent 75
}

Actor RLTowerShieldArmorToken : RLPermanentInventory {}
Actor RLTowerShieldArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLTacticalArmorPickup : RLGenericArmorPickup 18007
{
    //$category "Basic Assembled Armor"
	//$Sprite TACAA0
    Tag "Tactical Armor"
    Inventory.Icon "TACABOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		TACA A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		TACA A 6
		TACA A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorModReconfigure:
// This armor can't be reconfigured, so throw out an error and don't activate the armor or anything.
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is not a reconfigurable\ntype of armor.")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLTacticalArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLTacticalArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLTacticalArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLTacticalArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLTacticalArmorBonus",1)// This disrupts missile lock-ons.
		TNT1 A 0 A_GiveInventory("PowerRLTacticalArmorProtection",1)// Revenants hate this armor.
		TNT1 A 0 A_GiveInventory("RL100ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLTacticalArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLTacticalArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvTactical Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvTactical Armor \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLTacticalSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Tactical Armor =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLTacticalSetBonusArmor",1)
		TNT1 A 0 A_JumpIfInventory("RLTacticalSetBonusBoots",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLTacticalSetBonusBoots",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLTacticalSetBonusActive",1)
		TNT1 A 0 A_GiveInventory("PowerRLTacticalSetBonusProtection",1)
		TNT1 A 0 A_Print("\cvTactical Armor \c-equipped.\n\cf= TACTICAL READINESS =\n\cgImmunity to splash damage", 8, "CONFONT")
		Stop*/
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLTacticalArmorPickupSpecial : RLTacticalArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLTacticalArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLTacticalArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLTacticalArmor : RLGenericArmor
{
  Armor.Savepercent 0
  Armor.Saveamount 100
}

Actor RLTacticalArmorToken : RLPermanentInventory {}
Actor RLTacticalArmorBonus : RLPermanentInventory {}
Actor RLTacticalArmorUse : RLPermanentInventory {}

ACTOR PowerRLTacticalArmorProtection : PowerInvisibility
{
   inventory.icon ""
   Powerup.Duration -0x7FFFFFFF
   Powerup.Strength 0
   Powerup.Mode "Opaque"
   +INVENTORY.PERSISTENTPOWER
   +CANTSEEK
   -SHADOW
}

//==============================================================================================================================================
//==============================================================================
//		ASSEMBLED COLOR ARMORS
//==============================================================================
//==============================================================================================================================================

ACTOR RLAblativeGreenArmorPickup : RLGenericArmorPickup 18008
{
    //$category "Basic Assembled Armor"
	//$Sprite ABL1A0
    Tag "Ablative Security Armor"
    Inventory.Icon "ABL1BOX"
	Inventory.PickupSound "misc/rlarmor3"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ABL1 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ABL1 A 6
		ABL1 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
	
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLAblativeGreenArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLAblativeGreenArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLAblativeGreenArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLAblativeGreenArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL200ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLAblativeGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLAblativeGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLAblativeBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdAblative Security Armor \c-reconfigured into \chAblative Combat Armor.")
		Stop
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLAblativeRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdAblative Security Armor \c-reconfigured into \cgAblative Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvAblative Security Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvAblative Security Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Ablative Security Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLAblativeGreenArmorPickupSpecial : RLAblativeGreenArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLAblativeGreenArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLAblativeGreenArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLAblativeGreenArmor : RLGenericArmor
{
  Armor.Savepercent 80
  Armor.Saveamount 200
  DamageFactor "Bullet", 0.0
}

Actor RLAblativeGreenArmorToken : RLPermanentInventory {}
Actor RLAblativeGreenArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLAblativeBlueArmorPickup : RLGenericArmorPickup 18009
{
    //$category "Basic Assembled Armor"
	//$Sprite ABL2A0
    Tag "Ablative Combat Armor"
    Inventory.Icon "ABL2BOX"
	Inventory.PickupSound "misc/rlarmor3"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ABL2 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ABL2 A 6
		ABL2 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLAblativeBlueArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLAblativeBlueArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLAblativeBlueArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLAblativeBlueArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL200ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLAblativeBlueArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLAblativeBlueArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLAblativeGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chAblative Combat Armor \c-reconfigured into \cdAblative Security Armor.")
		Stop
		
			ArmorModpackBlue:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLAblativeRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chAblative Combat Armor \c-reconfigured into \cgAblative Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvAblative Combat Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvAblative Combat Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Ablative Combat Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLAblativeBlueArmorPickupSpecial : RLAblativeBlueArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLAblativeBlueArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLAblativeBlueArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLAblativeBlueArmor : RLGenericArmor
{
  Armor.Savepercent 80
  Armor.Saveamount 200
  DamageFactor "Plasma", 0.0
}

Actor RLAblativeBlueArmorToken : RLPermanentInventory {}
Actor RLAblativeBlueArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLAblativeRedArmorPickup : RLGenericArmorPickup 18010
{
    //$category "Basic Assembled Armor"
	//$Sprite ABL3A0
    Tag "Ablative Commando Armor"
    Inventory.Icon "ABL3BOX"
	Inventory.PickupSound "misc/rlarmor3"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ABL3 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ABL3 A 6
		ABL3 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLAblativeRedArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLAblativeRedArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLAblativeRedArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLAblativeRedArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL200ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLAblativeRedArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLAblativeRedArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLAblativeGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgAblative Commando Armor \c-reconfigured into \cdAblative Security Armor.")
		Stop
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLAblativeBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgAblative Commando Armor \c-reconfigured into \chAblative Combat Armor.")
		Stop
		
			ArmorModpackRed:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvAblative Commando Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvAblative Commando Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Ablative Commando Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLAblativeRedArmorPickupSpecial : RLAblativeRedArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLAblativeRedArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLAblativeRedArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLAblativeRedArmor : RLGenericArmor
{
  Armor.Savepercent 80
  Armor.Saveamount 200
  DamageFactor "Fire", 0.0
}

Actor RLAblativeRedArmorToken : RLPermanentInventory {}
Actor RLAblativeRedArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLBallisticGreenArmorPickup : RLGenericArmorPickup 18011
{
    //$category "Basic Assembled Armor"
	//$Sprite BLA1A0
    Tag "Ballistic Security Armor"
    Inventory.Icon "BLA1BOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		BLA1 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		BLA1 A 6
		BLA1 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLBallisticGreenArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLBallisticGreenArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLBallisticGreenArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLBallisticGreenArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLBallisticGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLBallisticGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLBallisticBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdBallistic Security Armor \c-reconfigured into \chBallistic Combat Armor.")
		Stop
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLBallisticRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdBallistic Security Armor \c-reconfigured into \cgBallistic Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvBallistic Security Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvBallistic Security Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Ballistic Security Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLBallisticGreenArmorPickupSpecial : RLBallisticGreenArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLBallisticGreenArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLBallisticGreenArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLBallisticGreenArmor : RLGenericArmor
{
  Armor.Savepercent 30
  Armor.Saveamount 100
  DamageFactor "Bullet", 0.45
  DamageFactor "Melee", 0.7
}
	
Actor RLBallisticGreenArmorRenegade : RLBallisticGreenArmor
{
  Armor.Savepercent 45
}

Actor RLBallisticGreenArmorToken : RLPermanentInventory {}
Actor RLBallisticGreenArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLBallisticBlueArmorPickup : RLGenericArmorPickup 18012
{
    //$category "Basic Assembled Armor"
	//$Sprite BLA2A0
    Tag "Ballistic Combat Armor"
    Inventory.Icon "BLA2BOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		BLA2 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		BLA2 A 6
		BLA2 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLBallisticBlueArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLBallisticBlueArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLBallisticBlueArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLBallisticBlueArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLBallisticBlueArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLBallisticBlueArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLBallisticGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chBallistic Combat Armor \c-reconfigured into \cdBallistic Security Armor.")
		Stop
		
			ArmorModpackBlue:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLBallisticRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chBallistic Combat Armor \c-reconfigured into \cgBallistic Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvBallistic Combat Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvBallistic Combat Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Ballistic Combat Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLBallisticBlueArmorPickupSpecial : RLBallisticBlueArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLBallisticBlueArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLBallisticBlueArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLBallisticBlueArmor : RLGenericArmor
{
  Armor.Savepercent 30
  Armor.Saveamount 100
  DamageFactor "Bullet", 0.7
  DamageFactor "Melee", 0.7
  DamageFactor "Plasma", 0.75
}
	
Actor RLBallisticBlueArmorRenegade : RLBallisticBlueArmor
{
  Armor.Savepercent 45
}

Actor RLBallisticBlueArmorToken : RLPermanentInventory {}
Actor RLBallisticBlueArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLBallisticRedArmorPickup : RLGenericArmorPickup 18013
{
    //$category "Basic Assembled Armor"
	//$Sprite BLA3A0
    Tag "Ballistic Commando Armor"
    Inventory.Icon "BLA3BOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		BLA3 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		BLA3 A 6
		BLA3 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLBallisticRedArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLBallisticRedArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLBallisticRedArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLBallisticRedArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLBallisticRedArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLBallisticRedArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLBallisticGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgBallistic Commando Armor \c-reconfigured into \cdBallistic Security Armor.")
		Stop
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLBallisticBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgBallistic Commando Armor \c-reconfigured into \chBallistic Combat Armor.")
		Stop
		
			ArmorModpackRed:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvBallistic Commando Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvBallistic Commando Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Ballistic Commando Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLBallisticRedArmorPickupSpecial : RLBallisticRedArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLBallisticRedArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLBallisticRedArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLBallisticRedArmor : RLGenericArmor
{
  Armor.Savepercent 30
  Armor.Saveamount 100
  DamageFactor "Bullet", 0.7
  DamageFactor "Melee", 0.7
  DamageFactor "Fire", 0.75
}
		
Actor RLBallisticRedArmorRenegade : RLBallisticRedArmor
{
  Armor.Savepercent 45
}

Actor RLBallisticRedArmorToken : RLPermanentInventory {}
Actor RLBallisticRedArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLCybernanoGreenArmorPickup : RLGenericArmorPickup
{
    //$category "Master Assembled Armor"
	//$Sprite CYN1A0
    Tag "Cybernano Security Armor"
    Inventory.Icon "CYN1BOX"
	Inventory.PickupSound "misc/rlarmor5"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		CYN1 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		CYN1 ABC 4 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLCybernanoGreenArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLCybernanoGreenArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLCybernanoGreenArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLCybernanoGreenArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLCybernanoGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLCybernanoGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
	ArmorAlreadyEquippedMessage1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	ArmorAlreadyEquippedArmorMod1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail
	NoArmorEquippedMessage1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	NoArmorEquippedArmorMod1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLCybernanoBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdCybernano Security Armor \c-reconfigured into \chCybernano Combat Armor.")
		Stop
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLCybernanoRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdCybernano Security Armor \c-reconfigured into \cgCybernano Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvCybernano Security Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvCybernano Security Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Cybernano Security Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLCybernanoGreenArmorWorldSpawnPickup : RLCybernanoGreenArmorPickup 18014
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledWorldDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/masterspawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLCybernanoGreenArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLCybernanoGreenArmorPickupSpecial : RLCybernanoGreenArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLCybernanoGreenArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLCybernanoGreenArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLCybernanoGreenArmor : RLGenericArmor
{
  Armor.Savepercent 70
  Armor.Saveamount 99999
  DamageFactor "Bullet", 0.75
}
	
Actor RLCybernanoGreenArmorRenegade : RLCybernanoGreenArmor
{
  Armor.Savepercent 75
}

Actor RLCybernanoGreenArmorToken : RLPermanentInventory {}
Actor RLCybernanoGreenArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLCybernanoBlueArmorPickup : RLGenericArmorPickup
{
    //$category "Master Assembled Armor"
	//$Sprite CYN2A0
    Tag "Cybernano Combat Armor"
    Inventory.Icon "CYN2BOX"
	Inventory.PickupSound "misc/rlarmor5"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		CYN2 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		CYN2 ABC 4 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLCybernanoBlueArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLCybernanoBlueArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLCybernanoBlueArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLCybernanoBlueArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLCybernanoBlueArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLCybernanoBlueArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

	ArmorAlreadyEquippedMessage1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	ArmorAlreadyEquippedArmorMod1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail
	NoArmorEquippedMessage1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	NoArmorEquippedArmorMod1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLCybernanoGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chCybernano Combat Armor \c-reconfigured into \cdCybernano Security Armor.")
		Stop
		
			ArmorModpackBlue:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLCybernanoRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chCybernano Combat Armor \c-reconfigured into \cgCybernano Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvCybernano Combat Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvCybernano Combat Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Cybernano Combat Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLCybernanoBlueArmorWorldSpawnPickup : RLCybernanoBlueArmorPickup 18015
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledWorldDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/masterspawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLCybernanoBlueArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLCybernanoBlueArmorPickupSpecial : RLCybernanoBlueArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLCybernanoBlueArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLCybernanoBlueArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLCybernanoBlueArmor : RLGenericArmor
{
  Armor.Savepercent 70
  Armor.Saveamount 99999
  DamageFactor "Plasma", 0.75
}
	
Actor RLCybernanoBlueArmorRenegade : RLCybernanoBlueArmor
{
  Armor.Savepercent 75
}

Actor RLCybernanoBlueArmorToken : RLPermanentInventory {}
Actor RLCybernanoBlueArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLCybernanoRedArmorPickup : RLGenericArmorPickup
{
    //$category "Master Assembled Armor"
	//$Sprite CYN3A0
    Tag "Cybernano Commando Armor"
    Inventory.Icon "CYN3BOX"
	Inventory.PickupSound "misc/rlarmor5"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		CYN3 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		CYN3 ABC 4 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLCybernanoRedArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLCybernanoRedArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLCybernanoRedArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLCybernanoRedArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLCybernanoRedArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLCybernanoRedArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

	ArmorAlreadyEquippedMessage1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	ArmorAlreadyEquippedArmorMod1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail
	NoArmorEquippedMessage1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	NoArmorEquippedArmorMod1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLCybernanoGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgCybernano Commando Armor \c-reconfigured into \cdCybernano Security Armor.")
		Stop
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLCybernanoBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgCybernano Commando Armor \c-reconfigured into \chCybernano Combat Armor.")
		Stop
		
			ArmorModpackRed:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvCybernano Commando Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvCybernano Commando Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Cybernano Commando Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLCybernanoRedArmorWorldSpawnPickup : RLCybernanoRedArmorPickup 18016
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledWorldDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/masterspawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLCybernanoRedArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLCybernanoRedArmorPickupSpecial : RLCybernanoRedArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLCybernanoRedArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLCybernanoRedArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLCybernanoRedArmor : RLGenericArmor
{
  Armor.Savepercent 70
  Armor.Saveamount 99999
  DamageFactor "Fire", 0.75
}
		
Actor RLCybernanoRedArmorRenegade : RLCybernanoRedArmor
{
  Armor.Savepercent 75
}

Actor RLCybernanoRedArmorToken : RLPermanentInventory {}
Actor RLCybernanoRedArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLFireproofGreenArmorPickup : RLGenericArmorPickup 18017
{
    //$category "Basic Assembled Armor"
	//$Sprite FPA1A0
    Tag "Fireproof Security Armor"
    Inventory.Icon "FPA1BOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		FPA1 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		FPA1 A 6
		FPA1 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLFireproofGreenArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLFireproofGreenArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLFireproofGreenArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLFireproofGreenArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLFireproofGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLFireproofGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLFireproofBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdFireproof Security Armor \c-reconfigured into \chFireproof Combat Armor.")
		Stop
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLFireproofRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdFireproof Security Armor \c-reconfigured into \cgFireproof Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvFireproof Security Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvFireproof Security Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Fireproof Security Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLFireproofGreenArmorPickupSpecial : RLFireproofGreenArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLFireproofGreenArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLFireproofGreenArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLFireproofGreenArmor : RLGenericArmor
{
  Armor.Savepercent 30
  Armor.Saveamount 100
  DamageFactor "Bullet", 0.75
  DamageFactor "Melee", 1.3
  DamageFactor "Fire", 0.7
}
	
Actor RLFireproofGreenArmorRenegade : RLFireproofGreenArmor
{
  Armor.Savepercent 45
}

Actor RLFireproofGreenArmorToken : RLPermanentInventory {}
Actor RLFireproofGreenArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLFireproofBlueArmorPickup : RLGenericArmorPickup 18018
{
    //$category "Basic Assembled Armor"
	//$Sprite FPA2A0
    Tag "Fireproof Combat Armor"
    Inventory.Icon "FPA2BOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		FPA2 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		FPA2 A 6
		FPA2 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLFireproofBlueArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLFireproofBlueArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLFireproofBlueArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLFireproofBlueArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLFireproofBlueArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLFireproofBlueArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLFireproofGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chFireproof Combat Armor \c-reconfigured into \cdFireproof Security Armor.")
		Stop
		
			ArmorModpackBlue:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLFireproofRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chFireproof Combat Armor \c-reconfigured into \cgFireproof Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvFireproof Combat Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvFireproof Combat Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Fireproof Combat Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLFireproofBlueArmorPickupSpecial : RLFireproofBlueArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLFireproofBlueArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLFireproofBlueArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLFireproofBlueArmor : RLGenericArmor
{
  Armor.Savepercent 30
  Armor.Saveamount 100
  DamageFactor "Melee", 1.3
  DamageFactor "Fire", 0.7
  DamageFactor "Plasma", 0.75
}
	
Actor RLFireproofBlueArmorRenegade : RLFireproofBlueArmor
{
  Armor.Savepercent 45
}

Actor RLFireproofBlueArmorToken : RLPermanentInventory {}
Actor RLFireproofBlueArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLFireproofRedArmorPickup : RLGenericArmorPickup 18019
{
    //$category "Basic Assembled Armor"
	//$Sprite FPA3A0
    Tag "Fireproof Commando Armor"
    Inventory.Icon "FPA3BOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		FPA3 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		FPA3 A 6
		FPA3 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLFireproofRedArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLFireproofRedArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLFireproofRedArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLFireproofRedArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100ArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLFireproofRedArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLFireproofRedArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLFireproofGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgFireproof Commando Armor \c-reconfigured into \cdFireproof Security Armor.")
		Stop
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLFireproofBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgFireproof Commando Armor \c-reconfigured into \chFireproof Combat Armor.")
		Stop
		
			ArmorModpackRed:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvFireproof Commando Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvFireproof Commando Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Fireproof Commando Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLFireproofRedArmorPickupSpecial : RLFireproofRedArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLFireproofRedArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLFireproofRedArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLFireproofRedArmor : RLGenericArmor
{
  Armor.Savepercent 30
  Armor.Saveamount 100
  DamageFactor "Fire", 0.4
  DamageFactor "Melee", 1.3
}
		
Actor RLFireproofRedArmorRenegade : RLFireproofRedArmor
{
  Armor.Savepercent 45
}

Actor RLFireproofRedArmorToken : RLPermanentInventory {}
Actor RLFireproofRedArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLNanofiberGreenArmorPickup : RLGenericArmorPickup 18020
{
    //$category "Basic Assembled Armor"
	//$Sprite NFA1A0
    Tag "Nanofiber Security Armor"
    Inventory.Icon "NFA1BOX"
	Inventory.PickupSound "misc/rlarmor1"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		NFA1 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		NFA1 A 6
		NFA1 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLNanofiberGreenArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLNanofiberGreenArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLNanofiberGreenArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLNanofiberGreenArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLNanofiberGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLNanofiberGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdNanofiber Security Armor \c-reconfigured into \chNanofiber Combat Armor.")
		Stop
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdNanofiber Security Armor \c-reconfigured into \cgNanofiber Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvNanofiber Security Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvNanofiber Security Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Nanofiber Security Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLNanofiberGreenArmorPickupSpecial : RLNanofiberGreenArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNanofiberGreenArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLNanofiberGreenArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLNanofiberGreenArmor : RLGenericArmor
{
  Armor.Savepercent 10
  Armor.Saveamount 100
  DamageFactor "Bullet", 0.87
}
	
Actor RLNanofiberGreenArmorRenegade : RLNanofiberGreenArmor
{
  Armor.Savepercent 15
}

Actor RLNanofiberGreenArmorToken : RLPermanentInventory {}
Actor RLNanofiberGreenArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLNanofiberBlueArmorPickup : RLGenericArmorPickup 18021
{
    //$category "Basic Assembled Armor"
	//$Sprite NFA2A0
    Tag "Nanofiber Combat Armor"
    Inventory.Icon "NFA2BOX"
	Inventory.PickupSound "misc/rlarmor1"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		NFA2 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		NFA2 A 6
		NFA2 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLNanofiberBlueArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLNanofiberBlueArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLNanofiberBlueArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLNanofiberBlueArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLNanofiberBlueArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLNanofiberBlueArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chNanofiber Combat Armor \c-reconfigured into \cdNanofiber Security Armor.")
		Stop
		
			ArmorModpackBlue:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chNanofiber Combat Armor \c-reconfigured into \cgNanofiber Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvNanofiber Combat Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvNanofiber Combat Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Nanofiber Combat Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLNanofiberBlueArmorPickupSpecial : RLNanofiberBlueArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNanofiberBlueArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLNanofiberBlueArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLNanofiberBlueArmor : RLGenericArmor
{
  Armor.Savepercent 10
  Armor.Saveamount 200
  DamageFactor "Plasma", 0.87
}
	
Actor RLNanofiberBlueArmorRenegade : RLNanofiberBlueArmor
{
  Armor.Savepercent 15
}

Actor RLNanofiberBlueArmorToken : RLPermanentInventory {}
Actor RLNanofiberBlueArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLNanofiberRedArmorPickup : RLGenericArmorPickup 18022
{
    //$category "Basic Assembled Armor"
	//$Sprite NFA3A0
    Tag "Nanofiber Commando Armor"
    Inventory.Icon "NFA3BOX"
	Inventory.PickupSound "misc/rlarmor1"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		NFA3 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		NFA3 A 6
		NFA3 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLNanofiberRedArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLNanofiberRedArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLNanofiberRedArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLNanofiberRedArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLNanofiberRedArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLNanofiberRedArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgNanofiber Commando Armor \c-reconfigured into \cdNanofiber Security Armor.")
		Stop
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgNanofiber Commando Armor \c-reconfigured into \chNanofiber Combat Armor.")
		Stop
		
			ArmorModpackRed:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvNanofiber Commando Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvNanofiber Commando Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Nanofiber Commando Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLNanofiberRedArmorPickupSpecial : RLNanofiberRedArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNanofiberRedArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLNanofiberRedArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLNanofiberRedArmor : RLGenericArmor
{
  Armor.Savepercent 10
  Armor.Saveamount 100
  DamageFactor "Fire", 0.87
}
		
Actor RLNanofiberRedArmorRenegade : RLNanofiberRedArmor
{
  Armor.Savepercent 15
}

Actor RLNanofiberRedArmorToken : RLPermanentInventory {}
Actor RLNanofiberRedArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLNanofiberSkinGreenArmorPickup : RLGenericArmorPickup 18023
{
    //$category "Advanced Assembled Armor"
	//$Sprite NFS1A0
    Tag "Nanofiber Skin Security Armor"
    Inventory.Icon "NFS1BOX"
	Inventory.PickupSound "misc/rlarmor4"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		NFS1 B 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		NFS1 B 6
		NFS1 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLNanofiberSkinGreenArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinGreenArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLNanofiberSkinGreenArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinGreenArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

	ArmorAlreadyEquippedMessage1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	ArmorAlreadyEquippedArmorMod1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail
	NoArmorEquippedMessage1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	NoArmorEquippedArmorMod1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdNanofiber Skin Security Armor \c-reconfigured into \chNanofiber Skin Combat Armor.")
		Stop
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdNanofiber Skin Security Armor \c-reconfigured into \cgNanofiber Skin Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvNanofiber Skin Security Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvNanofiber Skin Security Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Nanofiber Skin Security Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLNanofiberSkinGreenArmorPickupSpecial : RLNanofiberSkinGreenArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinGreenArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinGreenArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLNanofiberSkinGreenArmor : RLGenericArmor
{
  Armor.Savepercent 40
  Armor.Saveamount 99999
  DamageFactor "Bullet", 0.5
  DamageFactor "Melee", 0.75
  DamageFactor "Fire", 0.75
  DamageFactor "Plasma", 0.75
}
	
Actor RLNanofiberSkinGreenArmorRenegade : RLNanofiberSkinGreenArmor
{
  Armor.Savepercent 60
}

Actor RLNanofiberSkinGreenArmorToken : RLPermanentInventory {}
Actor RLNanofiberSkinGreenArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLNanofiberSkinBlueArmorPickup : RLGenericArmorPickup 18024
{
    //$category "Advanced Assembled Armor"
	//$Sprite NFS2A0
    Tag "Nanofiber Skin Combat Armor"
    Inventory.Icon "NFS2BOX"
	Inventory.PickupSound "misc/rlarmor4"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		NFS2 B 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		NFS2 B 6
		NFS2 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLNanofiberSkinBlueArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinBlueArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLNanofiberSkinBlueArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinBlueArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinBlueArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinBlueArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

	ArmorAlreadyEquippedMessage1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	ArmorAlreadyEquippedArmorMod1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail
	NoArmorEquippedMessage1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	NoArmorEquippedArmorMod1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chNanofiber Skin Combat Armor \c-reconfigured into \cdNanofiber Skin Security Armor.")
		Stop
		
			ArmorModpackBlue:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chNanofiber Skin Combat Armor \c-reconfigured into \cgNanofiber Skin Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvNanofiber Skin Combat Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvNanofiber Skin Combat Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Nanofiber Skin Combat Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLNanofiberSkinBlueArmorPickupSpecial : RLNanofiberSkinBlueArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinBlueArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinBlueArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLNanofiberSkinBlueArmor : RLGenericArmor
{
  Armor.Savepercent 40
  Armor.Saveamount 99999
  DamageFactor "Bullet", 0.75
  DamageFactor "Melee", 0.75
  DamageFactor "Fire", 0.75
  DamageFactor "Plasma", 0.5
}
	
Actor RLNanofiberSkinBlueArmorRenegade : RLNanofiberSkinBlueArmor
{
  Armor.Savepercent 60
}

Actor RLNanofiberSkinBlueArmorToken : RLPermanentInventory {}
Actor RLNanofiberSkinBlueArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLNanofiberSkinRedArmorPickup : RLGenericArmorPickup 18025
{
    //$category "Advanced Assembled Armor"
	//$Sprite NFS3A0
    Tag "Nanofiber Skin Commando Armor"
    Inventory.Icon "NFS3BOX"
	Inventory.PickupSound "misc/rlarmor4"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		NFS3 B 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		NFS3 B 6
		NFS3 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLNanofiberSkinRedArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinRedArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLNanofiberSkinRedArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinRedArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinRedArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinRedArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

	ArmorAlreadyEquippedMessage1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	ArmorAlreadyEquippedArmorMod1:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected armor, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail
	NoArmorEquippedMessage1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\cgThis armor cannot be removed once worn.", 5)
		Fail
	NoArmorEquippedArmorMod1:
		TNT1 A 0 A_Print("Use the armor again to wear it.\n\nPress \caDrop Item (DRLA)\c- to drop it, or switch weapons to cancel.\n\nYou may activate a compatible armor modpack to\nconvert this armor to a different type.\n\cgThis armor cannot be removed once worn.", 8)
		Fail

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgNanofiber Skin Commando Armor \c-reconfigured into \cdNanofiber Skin Security Armor.")
		Stop
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgNanofiber Skin Commando Armor \c-reconfigured into \chNanofiber Skin Combat Armor.")
		Stop
		
			ArmorModpackRed:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvNanofiber Skin Commando Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvNanofiber Skin Commando Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Nanofiber Skin Commando Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLNanofiberSkinRedArmorPickupSpecial : RLNanofiberSkinRedArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinRedArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLNanofiberSkinRedArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLNanofiberSkinRedArmor : RLGenericArmor
{
  Armor.Savepercent 40
  Armor.Saveamount 99999
  DamageFactor "Bullet", 0.75
  DamageFactor "Melee", 0.75
  DamageFactor "Fire", 0.5
  DamageFactor "Plasma", 0.75
}
		
Actor RLNanofiberSkinRedArmorRenegade : RLNanofiberSkinRedArmor
{
  Armor.Savepercent 60
}

Actor RLNanofiberSkinRedArmorToken : RLPermanentInventory {}
Actor RLNanofiberSkinRedArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLPowerGreenArmorPickup : RLGenericArmorPickup 18026
{
    //$category "Basic Assembled Armor"
	//$Sprite PWR1A0
    Tag "Powered Security Armor"
    Inventory.Icon "PWR1BOX"
	Inventory.PickupSound "misc/rlarmor4"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		PWR1 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		PWR1 A 6
		PWR1 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLPowerGreenArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLPowerGreenArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLPowerGreenArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLPowerGreenArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100RegenArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLPowerGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLPowerGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLPowerBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdPowered Security Armor \c-reconfigured into \chPowered Combat Armor.")
		Stop
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLPowerRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdPowered Security Armor \c-reconfigured into \cgPowered Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvPowered Security Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvPowered Security Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Powered Security Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLPowerGreenArmorPickupSpecial : RLPowerGreenArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLPowerGreenArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLPowerGreenArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLPowerGreenArmor : RLGenericArmor
{
  Armor.Savepercent 50
  Armor.Saveamount 100
  DamageFactor "Bullet", 0.5
  DamageFactor "Melee", 0.75
}
	
Actor RLPowerGreenArmorRenegade : RLPowerGreenArmor
{
  Armor.Savepercent 75
}

Actor RLPowerGreenArmorToken : RLPermanentInventory {}
Actor RLPowerGreenArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLPowerBlueArmorPickup : RLGenericArmorPickup 18027
{
    //$category "Basic Assembled Armor"
	//$Sprite PWR2A0
    Tag "Powered Combat Armor"
    Inventory.Icon "PWR2BOX"
	Inventory.PickupSound "misc/rlarmor4"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		PWR2 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		PWR2 A 6
		PWR2 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLPowerBlueArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLPowerBlueArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLPowerBlueArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLPowerBlueArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100RegenArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLPowerBlueArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLPowerBlueArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLPowerGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chPowered Combat Armor \c-reconfigured into \cdPowered Security Armor.")
		Stop
		
			ArmorModpackBlue:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLPowerRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chPowered Combat Armor \c-reconfigured into \cgPowered Commando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvPowered Combat Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvPowered Combat Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Powered Combat Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLPowerBlueArmorPickupSpecial : RLPowerBlueArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLPowerBlueArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLPowerBlueArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLPowerBlueArmor : RLGenericArmor
{
  Armor.Savepercent 50
  Armor.Saveamount 100
  DamageFactor "Plasma", 0.5
  DamageFactor "Melee", 0.75
}
	
Actor RLPowerBlueArmorRenegade : RLPowerBlueArmor
{
  Armor.Savepercent 75
}

Actor RLPowerBlueArmorToken : RLPermanentInventory {}
Actor RLPowerBlueArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLPowerRedArmorPickup : RLGenericArmorPickup 18028
{
    //$category "Basic Assembled Armor"
	//$Sprite PWR3A0
    Tag "Powered Commando Armor"
    Inventory.Icon "PWR3BOX"
	Inventory.PickupSound "misc/rlarmor4"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_opengl"), 3) // If enabled, rarity beam will be cyan, rather than blue
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembled", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamAssembledDRPG", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		PWR3 A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		PWR3 A 6
		PWR3 A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor cannot be made \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLPowerRedArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLPowerRedArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLPowerRedArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLPowerRedArmorToken",1)
		TNT1 A 0 A_GiveInventory("RL100RegenArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLPowerRedArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLPowerRedArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLPowerGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgPowered Commando Armor \c-reconfigured into \cdPowered Security Armor.")
		Stop
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLPowerBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgPowered Commando Armor \c-reconfigured into \chPowered Combat Armor.")
		Stop
		
			ArmorModpackRed:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cvPowered Commando Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cvPowered Commando Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cv= Powered Commando Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLPowerRedArmorPickupSpecial : RLPowerRedArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLPowerRedArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLPowerRedArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLPowerRedArmor : RLGenericArmor
{
  Armor.Savepercent 50
  Armor.Saveamount 100
  DamageFactor "Fire", 0.5
  DamageFactor "Melee", 0.75
}
		
Actor RLPowerRedArmorRenegade : RLPowerRedArmor
{
  Armor.Savepercent 75
}

Actor RLPowerRedArmorToken : RLPermanentInventory {}
Actor RLPowerRedArmorUse : RLPermanentInventory {}
