Remove the 'Mx. Worldwide' achievement, it can't work due to cvars being split between games.

Adjust how the 'Full Set' achievement is handled, for the same reasons.
Don't split the Demolitionist Menu help text, it just complicates code.
This commit is contained in:
Mari the Deer 2021-03-24 18:10:17 +01:00
commit 1e82cf6b09
10 changed files with 28 additions and 109 deletions

View file

@ -42,7 +42,6 @@ gib,1000,yes
golden,24,yes
gravity,25,yes
#hnd,6,yes
iwad,7,no
jump,100,yes
lead,1500,yes
#lightning,0,no

View file

@ -183,7 +183,6 @@ nosave int swwm_achievement_gib = 0;
nosave int swwm_achievement_golden = 0;
nosave int swwm_achievement_gravity = 0;
nosave int swwm_achievement_hnd = 0;
nosave int swwm_achievement_iwad = 0;
nosave int swwm_achievement_jump = 0;
nosave int swwm_achievement_lead = 0;
nosave int swwm_achievement_lightning = 0;
@ -251,7 +250,6 @@ nosave int swwm_progress_gib = 0;
nosave int swwm_progress_golden = 0;
nosave int swwm_progress_gravity = 0;
nosave int swwm_progress_hnd = 0;
nosave int swwm_progress_iwad = 0;
nosave int swwm_progress_jump = 0;
nosave int swwm_progress_lead = 0;
nosave int swwm_progress_love = 0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -902,8 +902,6 @@ SWWM_ACHIEVEMENT_GRAVITY_TAG = "Decent Ascent";
SWWM_ACHIEVEMENT_GRAVITY_TXT = "Use %d Gravity Suppressors";
SWWM_ACHIEVEMENT_HND_TAG = "High Noon";
SWWM_ACHIEVEMENT_HND_TXT = "Land %d killing shots in a single Puntzer Beta reload";
SWWM_ACHIEVEMENT_IWAD_TAG = "Mx. Worldwide";
SWWM_ACHIEVEMENT_IWAD_TXT = "Play on all supported games";
SWWM_ACHIEVEMENT_JUMP_TAG = "Verticality";
SWWM_ACHIEVEMENT_JUMP_TXT = "Walljump %d times";
SWWM_ACHIEVEMENT_LEAD_TAG = "Lead Delivery";

View file

@ -532,9 +532,8 @@ SWWM_HELPTXT =
"\n"
"\cfArrow Keys:\c- Navigate\n"
"\cfEnter/Left Click:\c- Sell\n"
"\cfBackspace/Right Click:\c- Switch to buying";
SWWM_HELPTXT_TRADING =
"\n\n"
"\cfBackspace/Right Click:\c- Switch to buying\n"
"\n"
"\cxTrading Tab - Controls (Main)\c-\n"
"\cx---------------------------\c-\n"
"\n"
@ -553,9 +552,8 @@ SWWM_HELPTXT_TRADING =
"\cx------------------------------\c-\n"
"\n"
"\cfUp/Down:\c- Scroll\n"
"\cfBackspace/Right Click:\c- Return";
SWWM_HELPTXT_CHAT =
"\n\n"
"\cfBackspace/Right Click:\c- Return\n"
"\n"
"\cxChat Log Tab - Controls\c-\n"
"\cx---------------------\c-\n"
"\n"

View file

@ -802,7 +802,6 @@ SWWM_ACHIEVEMENT_GRAVITY_TAG = "Ascenso Decente";
SWWM_ACHIEVEMENT_GRAVITY_TXT = "Usa %d Supresores de Gravedad";
SWWM_ACHIEVEMENT_HND_TAG = "Mediodía";
SWWM_ACHIEVEMENT_HND_TXT = "Realiza %d disparos mortales en una única recarga de Puntzer Beta";
SWWM_ACHIEVEMENT_IWAD_TXT = "Juega en todos los juegos soportados";
SWWM_ACHIEVEMENT_JUMP_TAG = "Verticalidad";
SWWM_ACHIEVEMENT_JUMP_TXT = "Salta paredes %d veces";
SWWM_ACHIEVEMENT_LEAD_TAG = "Reparto de Plomo";

View file

@ -529,9 +529,8 @@ SWWM_HELPTXT =
"\n"
"\cfFlechas:\c- Navegar\n"
"\cfEnter/Click Izdo.:\c- Vender\n"
"\cfRetroceso/Click Dcho.:\c- Cambiar a compra";
SWWM_HELPTXT_TRADING =
"\n\n"
"\cfRetroceso/Click Dcho.:\c- Cambiar a compra\n"
"\n"
"\cxPestaña de Intercambio - Controles (Principal)\c-\n"
"\cx---------------------------\c-\n"
"\n"
@ -550,9 +549,8 @@ SWWM_HELPTXT_TRADING =
"\cx--------------------------------------------\c-\n"
"\n"
"\cfArriba/Abajo:\c- Scroll\n"
"\cfRetroceso/Click Dcho.:\c- Volver";
SWWM_HELPTXT_CHAT =
"\n\n"
"\cfRetroceso/Click Dcho.:\c- Volver\n"
"\n"
"\cxPestaña de Historial de Chat - Controles\c-\n"
"\cx--------------------------------------\c-\n"
"\n"

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r401 \cu(Wed 24 Mar 17:46:46 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r401 \cu(2021-03-24 17:46:46)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r402 \cu(Wed 24 Mar 18:10:17 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r402 \cu(2021-03-24 18:10:17)\c-";

View file

@ -81,28 +81,24 @@ Class SWWMCollectible : Inventory abstract
{
Super.AttachToOwner(other);
// count how many we have, set progress accordingly
int nc = 0, tnc = 0, cnc = 0;
int nc = 0, cnc = 0;
for ( int i=0; i<AllActorClasses.Size(); i++ )
{
let c = (Class<SWWMCollectible>)(AllActorClasses[i]);
if ( !c || (c == 'SWWMCollectible') ) continue;
let def = GetDefaultByType(c);
tnc++;
// check that we can collect it in this IWAD
if ( !def.ValidGame() ) continue;
nc++;
}
for ( Inventory i=other.inv; i; i=i.inv )
{
if ( i is 'SWWMCollectible' )
cnc++;
if ( !(i is 'SWWMCollectible') ) continue;
cnc++;
}
// force progress to be "total collectibles" so this doesn't get unset on other IWADs that may have more
if ( cnc == nc ) SWWMUtility.AchievementProgress('swwm_progress_allcoll',tnc,other.player);
else SWWMUtility.AchievementProgress('swwm_progress_allcoll',cnc,other.player);
SWWMUtility.AchievementProgress('swwm_progress_allcoll',cnc,other.player);
// we're only attaching to the other players
if ( propagated )
return;
if ( propagated ) return;
// give credit
if ( other.player && (Stamina > 0) )
{

View file

@ -509,17 +509,10 @@ Class DemolitionistMenu : GenericMenu
case MKEY_DOWN:
if ( tabs[curtab] == TAB_HELP )
{
String str = StringTable.Localize("$SWWM_HELPTXT");
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || (i == consoleplayer) ) continue;
if ( deathmatch && (!teamplay || (players[i].GetTeam() != players[consoleplayer].GetTeam())) ) continue;
str = str..StringTable.Localize("$SWWM_HELPTXT_TRADING");
break;
}
let bar = SWWMStatusBar(StatusBar);
if ( bar && (bar.FullHistory.Size() > 0) )
str = str..StringTable.Localize("$SWWM_HELPTXT_CHAT");
String kstr;
if ( mkey[1] != "" ) kstr = mkey[0].."/"..mkey[1];
else kstr = mkey[0];
str = String.Format(StringTable.Localize("$SWWM_HELPTXT"),kstr);
BrokenLines l = fnt.BreakLines(str,629);
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
if ( (l.Count() > 28) && (sel0 < l.Count()-28) )
@ -1528,21 +1521,10 @@ Class DemolitionistMenu : GenericMenu
else if ( (tabs[curtab] == TAB_HELP) && !isrclick )
{
// are we clicking where the scrollbar should be?
if ( mpos.x < 632 ) return res;
String kstr;
if ( mkey[1] != "" ) kstr = mkey[0].."/"..mkey[1];
else kstr = mkey[0];
str = String.Format(StringTable.Localize("$SWWM_HELPTXT"),kstr);
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || (i == consoleplayer) ) continue;
if ( deathmatch && (!teamplay || (players[i].GetTeam() != players[consoleplayer].GetTeam())) ) continue;
str = str..StringTable.Localize("$SWWM_HELPTXT_TRADING");
break;
}
let bar = SWWMStatusBar(StatusBar);
if ( bar && (bar.FullHistory.Size() > 0) )
str = str..StringTable.Localize("$SWWM_HELPTXT_CHAT");
BrokenLines l = fnt.BreakLines(str,629);
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
else return res; // no scrollbar
@ -1777,16 +1759,6 @@ Class DemolitionistMenu : GenericMenu
[k1, k2] = bindings.GetKeysForCommand("openmenu SWWMKnowledgeBaseMenu");
String kstr = bindings.NameKeys(k1,k2);
str = String.Format(StringTable.Localize("$SWWM_HELPTXT"),kstr);
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || (i == consoleplayer) ) continue;
if ( deathmatch && (!teamplay || (players[i].GetTeam() != players[consoleplayer].GetTeam())) ) continue;
str = str..StringTable.Localize("$SWWM_HELPTXT_TRADING");
break;
}
let bar = SWWMStatusBar(StatusBar);
if ( bar && (bar.FullHistory.Size() > 0) )
str = str..StringTable.Localize("$SWWM_HELPTXT_CHAT");
BrokenLines l = fnt.BreakLines(str,629);
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
else return res; // no scrollbar
@ -2182,33 +2154,13 @@ Class DemolitionistMenu : GenericMenu
double afactor = adone?1.:0., bfactor = bdone?1.:0.;
if ( a.progress )
{
int val = a.progress.GetInt();
int mval = a.maxval;
if ( a.basename == "iwad" )
{
// special case
mval = 3;
int bits = val;
val = 0;
for ( int i=0; i<3; i++ ) if ( bits&(1<<i) ) val++;
}
int cur = min(val,mval);
afactor = cur/double(mval);
int cur = clamp(a.progress.GetInt(),0,a.maval);
afactor = cur/double(a.maxval);
}
if ( b.progress )
{
int val = b.progress.GetInt();
int mval = b.maxval;
if ( b.basename == "iwad" )
{
// special case
mval = 3;
int bits = val;
val = 0;
for ( int i=0; i<3; i++ ) if ( bits&(1<<i) ) val++;
}
int cur = min(val,mval);
bfactor = cur/double(mval);
int cur = clamp(b.progress.GetInt(),0,b.maxval);
bfactor = cur/double(b.maxval);
}
if ( adone && bdone )
{
@ -3156,21 +3108,12 @@ Class DemolitionistMenu : GenericMenu
if ( a.progress )
{
int val = a.progress.GetInt();
int mval = a.maxval;
if ( a.basename == "iwad" )
{
// special case
mval = 3;
int bits = val;
val = 0;
for ( int i=0; i<3; i++ ) if ( bits&(1<<i) ) val++;
}
val = clamp(val,0,mval);
if ( completed ) str = SWWMUtility.BlockBar(mval,mval,barsz,Font.CR_DARKGREEN,Font.CR_BLACK);
else str = SWWMUtility.BlockBar(val,mval,barsz,Font.CR_DARKGRAY,Font.CR_BLACK);
val = clamp(val,0,a.maxval);
if ( completed ) str = SWWMUtility.BlockBar(a.maxval,a.maxval,barsz,Font.CR_DARKGREEN,Font.CR_BLACK);
else str = SWWMUtility.BlockBar(val,a.maxval,barsz,Font.CR_DARKGRAY,Font.CR_BLACK);
Screen.DrawText(TewiFont,Font.CR_UNTRANSLATED,origin.x+xx,origin.y+yy+34,str,DTA_Spacing,-5,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( completed ) str = String.Format("%s / %s",SWWMUtility.ThousandsNum(mval),SWWMUtility.ThousandsNum(mval));
else str = String.Format("%s / %s",SWWMUtility.ThousandsNum(val),SWWMUtility.ThousandsNum(mval));
if ( completed ) str = String.Format("%s / %s",SWWMUtility.ThousandsNum(a.maxval),SWWMUtility.ThousandsNum(a.maxval));
else str = String.Format("%s / %s",SWWMUtility.ThousandsNum(val),SWWMUtility.ThousandsNum(a.maxval));
int ox = (barsz-MiniwiFont.StringWidth(str))/2;
Screen.DrawText(MiniwiFont,completed?Font.CR_GREEN:hasprogress?Font.CR_WHITE:Font.CR_DARKGRAY,origin.x+xx+ox,origin.y+yy+37,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
@ -3654,16 +3597,6 @@ Class DemolitionistMenu : GenericMenu
if ( mkey[1] != "" ) kstr = mkey[0].."/"..mkey[1];
else kstr = mkey[0];
str = String.Format(StringTable.Localize("$SWWM_HELPTXT"),kstr);
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || (i == consoleplayer) ) continue;
if ( deathmatch && (!teamplay || (players[i].GetTeam() != players[consoleplayer].GetTeam())) ) continue;
str = str..StringTable.Localize("$SWWM_HELPTXT_TRADING");
break;
}
let bar = SWWMStatusBar(StatusBar);
if ( bar && (bar.FullHistory.Size() > 0) )
str = str..StringTable.Localize("$SWWM_HELPTXT_CHAT");
BrokenLines l = fnt.BreakLines(str,629);
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
xx = 6;