Small scorenum/damnum refactor.

This commit is contained in:
Mari the Deer 2024-01-16 10:17:28 +01:00
commit 38cd7df826
23 changed files with 182 additions and 54 deletions

View file

@ -5,6 +5,8 @@ extend Class Demolitionist
void CheatGive_Health( int amount = 0 )
{
player.health = health = (amount>0)?(health+amount):default.health;
if ( player == players[consoleplayer] && ((amount > 0) || ((health-default.health) > 0)) )
SWWMScoreObj.SpawnAtActorBunch((amount>0)?amount:(health-default.health),self,Font.CR_BLUE);
}
void CheatGive_Backpack()
{
@ -60,6 +62,8 @@ extend Class Demolitionist
armo.AttachToOwner(self);
}
armo.Amount = armo.MaxAmount;
if ( player == players[consoleplayer] )
SWWMScoreObj.SpawnAtActorBunch(armo.MaxAmount,self,Font.CR_GREEN);
}
}
void CheatGive_Keys()
@ -225,6 +229,7 @@ extend Class Demolitionist
void CheatTake_Health( int amount = 0 )
{
if ( amount > 0 ) SWWMDamNum.SpawnAtActor(amount,self);
if ( amount >= health )
{
CheatSuicide();