Implemented proper HUD rendering, along with toggling and resizing. Works just like in UT now. Added "extended" version of the Beta menu music, quickly put together in OpenMPT. I really like it. Added M_DOOM graphic and changed the titlemap texture. Made various screen graphics additive now that I know how to. Separated pickup and first person brightmaps for Pulse Gun, this is needed for beta skin packs (there will be skins for the Pulse Gun, Redeemer and Impact Hammer).
147 lines
2.9 KiB
Text
147 lines
2.9 KiB
Text
Class UTArmor : Armor
|
|
{
|
|
int absorb;
|
|
|
|
Property ArmorAbsorption : absorb;
|
|
|
|
Default
|
|
{
|
|
+INVENTORY.AUTOACTIVATE;
|
|
+INVENTORY.UNTOSSABLE;
|
|
}
|
|
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
|
|
{
|
|
int saved;
|
|
if ( (amount > 0) && !DamageTypeDefinition.IgnoreArmor(damageType) )
|
|
{
|
|
saved = damage*absorb/100.;
|
|
if ( amount <= saved ) saved = amount;
|
|
newdamage -= saved;
|
|
amount -= saved;
|
|
damage = newdamage;
|
|
}
|
|
if ( damage > 0 ) newdamage = ApplyDamageFactors(GetClass(),damageType,damage,damage);
|
|
if ( amount <= 0 ) Destroy();
|
|
}
|
|
}
|
|
|
|
Class UTArmorBonus : UTArmor replaces ArmorBonus
|
|
{
|
|
Default
|
|
{
|
|
Tag "Armor Bonus";
|
|
+COUNTITEM;
|
|
+INVENTORY.ALWAYSPICKUP;
|
|
Inventory.Amount 5;
|
|
Inventory.MaxAmount 50;
|
|
Inventory.InterHubAmount 50;
|
|
UTArmor.ArmorAbsorption 25;
|
|
Inventory.PickupMessage "You picked up an Armor Bonus.";
|
|
Inventory.PickupSound "misc/ut_shard";
|
|
Radius 4;
|
|
Height 12;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XANH A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class UTThighPads : UTArmor replaces GreenArmor
|
|
{
|
|
Default
|
|
{
|
|
Tag "Thigh Pads";
|
|
Inventory.Amount 50;
|
|
Inventory.MaxAmount 50;
|
|
Inventory.InterHubAmount 50;
|
|
UTArmor.ArmorAbsorption 50;
|
|
Inventory.PickupMessage "You got the Thigh Pads.";
|
|
Inventory.PickupSound "misc/ut_armor";
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
THIG A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class UTBodyArmor : UTArmor replaces BlueArmor
|
|
{
|
|
Default
|
|
{
|
|
Tag "Body Armor";
|
|
Inventory.Amount 100;
|
|
Inventory.MaxAmount 100;
|
|
Inventory.InterHubAmount 100;
|
|
UTArmor.ArmorAbsorption 75;
|
|
Inventory.PickupMessage "You got the Body Armor.";
|
|
Inventory.PickupSound "misc/ut_armor";
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
UARM A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class UTShieldBelt : UTArmor replaces Megasphere
|
|
{
|
|
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
|
|
{
|
|
if ( (amount > 0) && !DamageTypeDefinition.IgnoreArmor(damageType) )
|
|
{
|
|
Owner.A_PlaySound("belt/absorb",CHAN_7);
|
|
UTMainHandler.DoFlash(Owner,Color(80,255,224,0),5);
|
|
}
|
|
Super.AbsorbDamage(damage,damageType,newdamage);
|
|
}
|
|
override void OnDestroy()
|
|
{
|
|
Super.OnDestroy();
|
|
if ( amount <= 0 && Owner ) PrintPickupMessage(true,"The Shield Belt has depleted.");
|
|
}
|
|
override bool Use( bool pickup )
|
|
{
|
|
// removes thigh pads and body armor like in UT
|
|
Owner.TakeInventory("UTThighPads",50);
|
|
Owner.TakeInventory("UTBodyArmor",150);
|
|
return false;
|
|
}
|
|
override bool HandlePickup( Inventory item )
|
|
{
|
|
if ( (item is 'UTThighPads') || (item is 'UTBodyArmor') )
|
|
{
|
|
if ( amount < maxamount )
|
|
{
|
|
DepleteOrDestroy();
|
|
return Super.HandlePickup(item);
|
|
}
|
|
else return true;
|
|
}
|
|
return Super.HandlePickup(item);
|
|
}
|
|
Default
|
|
{
|
|
Tag "Shield Belt";
|
|
+COUNTITEM;
|
|
+INVENTORY.BIGPOWERUP;
|
|
Inventory.Amount 150;
|
|
Inventory.MaxAmount 150;
|
|
Inventory.InterHubAmount 150;
|
|
UTArmor.ArmorAbsorption 100;
|
|
Inventory.PickupMessage "You got the Shield Belt.";
|
|
Inventory.PickupSound "belt/pickup";
|
|
Inventory.RespawnTics 2100;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
BELT A -1;
|
|
Stop;
|
|
}
|
|
}
|