Merge branch 'devel' into experimental

This commit is contained in:
Marisa the Magician 2019-04-28 11:30:59 +02:00
commit 9b1ea9d84e
6 changed files with 25 additions and 7 deletions

View file

@ -47,6 +47,23 @@ Class UTHereticBlueKey : KeyBlue
}
}
// TODO Base class for items that can be activated from the inventory bar
Class UTActivatable : Inventory
{
Default
{
+INVENTORY.INVBAR;
}
}
// These have to be subclassed from HealthPickup for auto-use
Class UTActivatableHealth : HealthPickup
{
Default
{
}
}
// Alternative player classes for compatibility with Heretic sprites
Class UTPlayerHereticCompat : UTPlayer
{

View file

@ -160,7 +160,10 @@ Class UTPlayer : DoomPlayer
{
let type = (class<Inventory>)(AllActorClasses[i]);
if ( !type ) continue;
let def = GetDefaultByType (type);
let def = GetDefaultByType(type);
if ( !(self is "UTPlayerHereticCompat")
&& ((type is "UTActivatable") || (type is "UTActivatableHealth")) )
continue; // don't give these outside of Heretic/Hexen
if ( def.Icon.isValid() && (def.MaxAmount > 1) &&
!(type is "PuzzleItem") && !(type is "Powerup") && !(type is "Ammo") && !(type is "Armor"))
{