Small scorenum/damnum refactor.
This commit is contained in:
parent
6d8732af5d
commit
38cd7df826
23 changed files with 182 additions and 54 deletions
|
|
@ -593,7 +593,7 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
else Console.Printf(StringTable.Localize("$SWWM_FINDSECRETREM"),player.GetUserName(),score);
|
||||
SWWMCredits.Give(player,score);
|
||||
SWWMScoreObj.Spawn(score,Vec3Offset(0,0,Height/2));
|
||||
if ( player == players[consoleplayer] ) SWWMScoreObj.SpawnAtActorBunch(score,self);
|
||||
// somehow ongivesecret can be called BEFORE PostBeginPlay (wat)
|
||||
if ( !mystats ) mystats = SWWMStats.Find(player);
|
||||
mystats.secrets++;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ extend Class Demolitionist
|
|||
if ( player == players[consoleplayer] ) Console.Printf(StringTable.Localize("$SWWM_FINDKEY"),item.GetTag(),score);
|
||||
else Console.Printf(StringTable.Localize("$SWWM_FINDKEYREM"),player.GetUserName(),item.GetTag(),score);
|
||||
SWWMCredits.Give(player,score);
|
||||
SWWMScoreObj.Spawn(100,player.mo.Vec3Offset(0,0,Height/2));
|
||||
if ( player == players[consoleplayer] ) SWWMScoreObj.SpawnAtActorBunch(100,self);
|
||||
if ( !ingivecheat )
|
||||
{
|
||||
if ( !Random[DemoLines](0,5) &&
|
||||
|
|
|
|||
|
|
@ -316,6 +316,8 @@ extend Class Demolitionist
|
|||
if ( hasrevived ) SWWMUtility.MarkAchievement("sekiro",player);
|
||||
hasrevived = true;
|
||||
player.Resurrect();
|
||||
if ( player == players[consoleplayer] )
|
||||
SWWMScoreObj.SpawnAtActorBunch(player.health,self,Font.CR_BLUE);
|
||||
player.damagecount = 0;
|
||||
player.bonuscount = 0;
|
||||
player.poisoncount = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue