Adjust how the Unchecked Capitalism achievement works.
This commit is contained in:
parent
d07bc12a8f
commit
b64841cc47
5 changed files with 14 additions and 21 deletions
|
|
@ -19,8 +19,7 @@ extend Class SWWMHandler
|
|||
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
|
||||
S_StartSound("misc/emone",CHAN_VOICE,CHANF_UI);
|
||||
}
|
||||
SWWMCredits.HasCheated(players[e.Args[0]]);
|
||||
SWWMCredits.Give(players[e.Args[0]],1000000000);
|
||||
SWWMCredits.Give(players[e.Args[0]],0,1,true);
|
||||
SWWMScoreObj.Spawn(1000000000,players[e.Args[0]].mo.Vec3Offset(0,0,players[e.Args[0]].mo.Height/2));
|
||||
}
|
||||
else if ( e.Name ~== "swwmlorecheat" )
|
||||
|
|
|
|||
|
|
@ -201,16 +201,8 @@ Class SWWMCredits : Thinker
|
|||
{
|
||||
PlayerInfo myplayer;
|
||||
int credits, hcredits;
|
||||
bool cheated;
|
||||
|
||||
static void HasCheated( PlayerInfo p )
|
||||
{
|
||||
let c = Find(p);
|
||||
if ( !c ) return;
|
||||
c.cheated = true;
|
||||
}
|
||||
|
||||
static void Give( PlayerInfo p, int amount, int hamount = 0 )
|
||||
static void Give( PlayerInfo p, int amount, int hamount = 0, bool cheat = false )
|
||||
{
|
||||
let c = Find(p);
|
||||
if ( !c ) return;
|
||||
|
|
@ -229,9 +221,11 @@ Class SWWMCredits : Thinker
|
|||
s.hiscore = c.credits;
|
||||
s.hhiscore = c.hcredits;
|
||||
}
|
||||
if ( c.cheated ) return;
|
||||
if ( c.hcredits > 0 ) SWWMUtility.AchievementProgress('swwm_progress_dosh',1000000000,p);
|
||||
else SWWMUtility.AchievementProgress('swwm_progress_dosh',c.credits,p);
|
||||
if ( cheat ) return;
|
||||
int curamt = swwm_progress_dosh;
|
||||
if ( (hamount > 0) || (curamt+amount < curamt) || (curamt+amount >= 1000000000) )
|
||||
SWWMUtility.AchievementProgress('swwm_progress_dosh',1000000000,p);
|
||||
else SWWMUtility.AchievementProgress('swwm_progress_dosh',curamt+amount,p);
|
||||
}
|
||||
|
||||
static clearscope bool CanTake( PlayerInfo p, int amount, int hamount = 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue