Golden shells won't spawn if players have a full supply.
Tweak ammo max amounts. Embiggener max amount halved back to 8. Embiggeners now increase ammo capacity by a factor relative to BackpackMaxAmount, rather than a fixed increase. Credits now show the mod's alt title (UnSX Gaiden: Demolitionist). Added compatibility tweaks to Okuplok and Holy Hell Revealed.
This commit is contained in:
parent
b8fba1f39e
commit
90ca4e4838
15 changed files with 124 additions and 36 deletions
|
|
@ -15,6 +15,7 @@ Class SMW05Ammo : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 90;
|
||||
Ammo.BackpackAmount 6;
|
||||
Ammo.BackpackMaxAmount 250;
|
||||
Ammo.DropAmount 6;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -69,6 +70,7 @@ Class SheenAmmo : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 300;
|
||||
Ammo.BackpackAmount 50;
|
||||
Ammo.BackpackMaxAmount 1500;
|
||||
Ammo.DropAmount 50;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -110,8 +112,9 @@ Class QuadravolAmmo : Ammo
|
|||
Stamina 10000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_QuadAmmo.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 9;
|
||||
Inventory.MaxAmount 8;
|
||||
Ammo.BackpackAmount 1;
|
||||
Ammo.BackpackMaxAmount 24;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -162,6 +165,7 @@ Class DarkCanister : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 5;
|
||||
Ammo.BackpackAmount 1;
|
||||
Ammo.BackpackMaxAmount 13;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -189,6 +193,7 @@ Class EMPCore : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 6;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 14;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -261,6 +266,7 @@ Class RayAmmo : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 4;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 8;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -289,6 +295,7 @@ Class RayBattery : Ammo
|
|||
Inventory.MaxAmount 2;
|
||||
Inventory.PickupFlash "SWWMPickupFlash";
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 4;
|
||||
Ammo.DropAmount 1;
|
||||
+INVENTORY.IGNORESKILL;
|
||||
+FLOATBOB;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Class Quadravol : SWWMWeapon
|
|||
Weapon.AmmoType1 "QuadAmmo";
|
||||
Weapon.AmmoGive1 1;
|
||||
SWWMWeapon.DropAmmoType "QuadAmmo";
|
||||
Quadravol.ClipCount 10;
|
||||
Quadravol.ClipCount 4;
|
||||
Stamina 80000;
|
||||
+SWWMWEAPON.NOFIRSTGIVE;
|
||||
+WEAPON.EXPLOSIVE;
|
||||
|
|
|
|||
|
|
@ -344,8 +344,9 @@ Class RedShell : Ammo
|
|||
Stamina 500;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_ShellsNormal.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 50;
|
||||
Inventory.MaxAmount 40;
|
||||
Ammo.BackpackAmount 3;
|
||||
Ammo.BackpackMaxAmount 200;
|
||||
Ammo.DropAmount 3;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -418,8 +419,9 @@ Class GreenShell : Ammo
|
|||
Stamina 800;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_ShellsSlug.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 48;
|
||||
Inventory.MaxAmount 30;
|
||||
Ammo.BackpackAmount 2;
|
||||
Ammo.BackpackMaxAmount 150;
|
||||
Ammo.DropAmount 2;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -483,8 +485,9 @@ Class WhiteShell : Ammo
|
|||
Stamina 1000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_ShellsDragon.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 32;
|
||||
Inventory.MaxAmount 24;
|
||||
Ammo.BackpackAmount 1;
|
||||
Ammo.BackpackMaxAmount 80;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -539,8 +542,9 @@ Class BlueShell : Ammo
|
|||
Stamina 2500;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_ShellsKinylum.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 40;
|
||||
Inventory.MaxAmount 28;
|
||||
Ammo.BackpackAmount 2;
|
||||
Ammo.BackpackMaxAmount 100;
|
||||
Ammo.DropAmount 2;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -595,8 +599,9 @@ Class BlackShell : Ammo
|
|||
Stamina 4000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_ShellsFuck.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 20;
|
||||
Inventory.MaxAmount 8;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 32;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -644,6 +649,7 @@ Class PurpleShell : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 32;
|
||||
Ammo.BackpackAmount 2;
|
||||
Ammo.BackpackMaxAmount 120;
|
||||
Ammo.DropAmount 2;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -730,8 +736,9 @@ Class GoldShell : Ammo
|
|||
Stamina 0;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_ShellsGold.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 5;
|
||||
Inventory.MaxAmount 3;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 7;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
+DONTGIB; // don't crush these, they're valuable
|
||||
|
|
@ -764,8 +771,9 @@ Class EvisceratorShell : Ammo
|
|||
Stamina 3000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_Eviscerator.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 48;
|
||||
Inventory.MaxAmount 36;
|
||||
Ammo.BackpackAmount 2;
|
||||
Ammo.BackpackMaxAmount 148;
|
||||
Ammo.DropAmount 2;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -835,8 +843,9 @@ Class HellblazerMissiles : Ammo
|
|||
Stamina 8000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_HellblazerMissile.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 48;
|
||||
Inventory.MaxAmount 30;
|
||||
Ammo.BackpackAmount 2;
|
||||
Ammo.BackpackMaxAmount 94;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -900,8 +909,9 @@ Class HellblazerCrackshots : Ammo
|
|||
Stamina 15000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_HellblazerCrackshot.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 30;
|
||||
Inventory.MaxAmount 15;
|
||||
Ammo.BackpackAmount 1;
|
||||
Ammo.BackpackMaxAmount 71;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -944,8 +954,9 @@ Class HellblazerRavagers : Ammo
|
|||
Stamina 25000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_HellblazerRavager.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 18;
|
||||
Inventory.MaxAmount 12;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 60;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -988,8 +999,9 @@ Class HellblazerWarheads : Ammo
|
|||
Stamina 40000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_HellblazerWarhead.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 6;
|
||||
Inventory.MaxAmount 4;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 12;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -1036,8 +1048,9 @@ Class SparkUnit : Ammo
|
|||
Stamina 50000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_Sparkster.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 8;
|
||||
Inventory.MaxAmount 6;
|
||||
Ammo.BackpackAmount 1;
|
||||
Ammo.BackpackMaxAmount 30;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -1071,6 +1084,7 @@ Class SilverBulletAmmo : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 3;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 11;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -1100,6 +1114,7 @@ Class SilverBulletAmmo2 : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 2;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 10;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -1225,6 +1240,7 @@ Class CandyGunAmmo : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 3;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 7;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -1318,6 +1334,7 @@ Class YnykronAmmo : Ammo
|
|||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 1;
|
||||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 5;
|
||||
Ammo.DropAmount 1;
|
||||
+FLOATBOB;
|
||||
FloatBobStrength 0.25;
|
||||
|
|
@ -1607,9 +1624,12 @@ Class HammerspaceEmbiggener : Inventory
|
|||
// The player did not have the ammoitem. Add it.
|
||||
ammoitem = Ammo(Spawn(type));
|
||||
ammoitem.Amount = amount;
|
||||
ammoitem.MaxAmount = int(ammoitem.default.MaxAmount*(1+self.Amount/2.));
|
||||
if ( ammoitem.BackpackMaxAmount > 0 )
|
||||
ammoitem.MaxAmount = min(ammoitem.MaxAmount,ammoitem.BackpackMaxAmount);
|
||||
{
|
||||
double factor = (ammoitem.BackpackMaxAmount-ammoitem.default.MaxAmount)/double(MaxAmount);
|
||||
ammoitem.MaxAmount = int(ammoitem.default.MaxAmount+self.Amount*factor);
|
||||
}
|
||||
else ammoitem.MaxAmount = int(ammoitem.default.MaxAmount*(1+self.Amount));
|
||||
if ( (ammoitem.Amount > ammoitem.MaxAmount) && !sv_unlimited_pickup )
|
||||
ammoitem.Amount = ammoitem.MaxAmount;
|
||||
ammoitem.AttachToOwner(other);
|
||||
|
|
@ -1617,9 +1637,12 @@ Class HammerspaceEmbiggener : Inventory
|
|||
else
|
||||
{
|
||||
// The player had the ammoitem. Give some more.
|
||||
ammoitem.MaxAmount = int(ammoitem.default.MaxAmount*(1+self.Amount/2.));
|
||||
if ( ammoitem.BackpackMaxAmount > 0 )
|
||||
ammoitem.MaxAmount = min(ammoitem.MaxAmount,ammoitem.BackpackMaxAmount);
|
||||
{
|
||||
double factor = (ammoitem.BackpackMaxAmount-ammoitem.default.MaxAmount)/double(MaxAmount);
|
||||
ammoitem.MaxAmount = int(ammoitem.default.MaxAmount+self.Amount*factor);
|
||||
}
|
||||
else ammoitem.MaxAmount = int(ammoitem.default.MaxAmount*(1+self.Amount));
|
||||
if ( ammoitem.Amount < ammoitem.MaxAmount )
|
||||
{
|
||||
ammoitem.Amount += amount;
|
||||
|
|
@ -1638,13 +1661,15 @@ Class HammerspaceEmbiggener : Inventory
|
|||
{
|
||||
if ( !HammerspaceEmbiggener(item).cheatedin ) Owner.A_StartSound("powerup/embiggener",CHAN_ITEMEXTRA);
|
||||
// readjust ammo values to new capacity
|
||||
// also do the same for spare bullets
|
||||
for ( Inventory i=Owner.Inv; i; i=i.Inv )
|
||||
{
|
||||
if ( !(i is 'Ammo') ) continue;
|
||||
i.MaxAmount = int(i.default.MaxAmount*(1+Amount/2.));
|
||||
if ( Ammo(i).BackpackMaxAmount > 0 )
|
||||
i.MaxAmount = min(i.MaxAmount,Ammo(i).BackpackMaxAmount);
|
||||
{
|
||||
double factor = (Ammo(i).BackpackMaxAmount-i.default.MaxAmount)/double(MaxAmount);
|
||||
i.MaxAmount = int(i.default.MaxAmount+Amount*factor);
|
||||
}
|
||||
else i.MaxAmount = int(i.default.MaxAmount*(1+Amount));
|
||||
int amount = Ammo(i).BackpackAmount;
|
||||
if ( !bIgnoreSkill ) amount = int(amount*G_SkillPropertyFloat(SKILLP_AmmoFactor));
|
||||
i.Amount += amount;
|
||||
|
|
@ -1655,7 +1680,12 @@ Class HammerspaceEmbiggener : Inventory
|
|||
// new ammo suddenly added? upgrade it (this shouldn't happen unless fucky scripting has been involved)
|
||||
if ( (item is 'Ammo') && !Owner.FindInventory(Ammo(item).GetParentAmmo()) )
|
||||
{
|
||||
item.MaxAmount = int(item.default.MaxAmount*(1+Amount/2.));
|
||||
if ( Ammo(item).BackpackMaxAmount > 0 )
|
||||
{
|
||||
double factor = (Ammo(item).BackpackMaxAmount-item.default.MaxAmount)/double(MaxAmount);
|
||||
item.MaxAmount = int(item.default.MaxAmount+Amount*factor);
|
||||
}
|
||||
else item.MaxAmount = int(item.default.MaxAmount*1+Amount);
|
||||
if ( Ammo(item).BackpackMaxAmount > 0 )
|
||||
item.MaxAmount = min(item.MaxAmount,Ammo(item).BackpackMaxAmount);
|
||||
}
|
||||
|
|
@ -1679,8 +1709,8 @@ Class HammerspaceEmbiggener : Inventory
|
|||
{
|
||||
Tag "$T_EMBIGGENER";
|
||||
Inventory.PickupMessage "$T_EMBIGGENER";
|
||||
Inventory.MaxAmount 16;
|
||||
Inventory.InterHubAmount 16;
|
||||
Inventory.MaxAmount 8;
|
||||
Inventory.InterHubAmount 8;
|
||||
Inventory.PickupFlash "SWWMPickupFlash";
|
||||
+INVENTORY.UNDROPPABLE;
|
||||
+INVENTORY.UNTOSSABLE;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,18 @@ Class SWWMLevelCompatibility : LevelPostProcessor
|
|||
// script uses checkinventory for yellow skull
|
||||
SetLineSpecial(22610,ACS_LockedExecute,-Int('ZPACK_E3M8_SCRIPT15'),0,0,0,6);
|
||||
break;
|
||||
// okuplok
|
||||
case 'F7F353146676920238935A8D0D1B6E8E':
|
||||
// add 7 more backpacks on top of existing one, for a full embiggening
|
||||
// (players will need it)
|
||||
for ( int i=0; i<7; i++ ) AddThing(8,(11808,-2016,384));
|
||||
break;
|
||||
// holy hell revealed
|
||||
case '83569A062B5261C6BB4A034BA8245D24':
|
||||
// remove boss brain and re-spawn it when end is reached, prevents cheesing the map with the ynykron
|
||||
SetThingEdNum(50183,9001);
|
||||
SetThingID(50183,666);
|
||||
SetLineSpecial(21964,ACS_Execute,-Int('HHR_BRAINWALL'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
{
|
||||
TextureID bgtex;
|
||||
TextureID logo;
|
||||
String stitle;
|
||||
String stitle, stitle2;
|
||||
String sdev, sassets, smusic, sfanart, slocal, spatrons, sthanks;
|
||||
Array<SWWMCreditsEntry> cdev, cassets, cmusic, cfanart, clocal, cpatrons, cthanks;
|
||||
transient CVar fuzz, lang;
|
||||
|
|
@ -149,6 +149,7 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
logo = TexMan.CheckForTexture("graphics/M_SWWM.png",TexMan.Type_Any);
|
||||
[logow, logoh] = TexMan.GetSize(logo);
|
||||
stitle = StringTable.Localize("$SWWM_CSTITLE");
|
||||
stitle2 = StringTable.Localize("$SWWM_CSTITLE2");
|
||||
sdev = StringTable.Localize("$SWWM_CLEAD");
|
||||
sassets = StringTable.Localize("$SWWM_CASSETS");
|
||||
smusic = StringTable.Localize("$SWWM_CMUSIC");
|
||||
|
|
@ -176,7 +177,6 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
clocal.Push(new("SWWMCreditsEntry").Init(sfnt,"Marisa Kirisame","$SWWM_LOCES"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Snacks"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"john"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Alexa Jones-Gonzales"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Jonas Höglund"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Lilian Lamp"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Valerie Thiessen"));
|
||||
|
|
@ -184,6 +184,7 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Dac"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Pietro Gagliardi"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Xada Xephron"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Alexa Jones-Gonzales"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"NekoMithos"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Ashley Lambert"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"LordMisfit"));
|
||||
|
|
@ -202,7 +203,7 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"$SWWM_CDEVS1","$SWWM_CDEVS2"));
|
||||
cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"$SWWM_CYOU1","$SWWM_CYOU2"));
|
||||
speed = 16.;
|
||||
spos = (ss.y-logoh)/2;
|
||||
spos = ss.y-logoh;
|
||||
// calc total height
|
||||
theight = logoh;
|
||||
theight += 7*(SECTION_PAD+bfnt.GetHeight());
|
||||
|
|
@ -252,7 +253,14 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
// don't draw if we're offscreen, saves time
|
||||
if ( (y+logoh < 0) || (y > ss.y) ) return logoh;
|
||||
Screen.DrawTexture(logo,true,x-logow/2,y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(sfnt,Font.CR_SAPPHIRE,x-sfnt.StringWidth(stitle)/2,y+(logoh-24),stitle,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(sfnt,Font.CR_SAPPHIRE,x-sfnt.StringWidth(stitle)/2,y+(logoh-28),stitle,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
// underline
|
||||
int w = max(sfnt.StringWidth(stitle),sfnt.StringWidth(stitle2));
|
||||
int cw = int(ceil((w+8)/6.))*6;
|
||||
double xx = x-cw/2;
|
||||
for ( int i=0; i<cw; i+=6 )
|
||||
Screen.DrawChar(sfnt,Font.CR_SAPPHIRE,xx+i,y+(logoh-22),0x5F,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(sfnt,Font.CR_WHITE,x-sfnt.StringWidth(stitle2)/2,y+(logoh-9),stitle2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
return logoh;
|
||||
}
|
||||
double DrawSection( double x, double y, String txt )
|
||||
|
|
|
|||
|
|
@ -1179,6 +1179,28 @@ Class SWWMHandler : EventHandler
|
|||
return false;
|
||||
}
|
||||
|
||||
private static bool ShouldSpawnGold()
|
||||
{
|
||||
int totalneeded = 0;
|
||||
// check "free space" in player inventories
|
||||
for ( int i=0; i<MAXPLAYERS; i++ )
|
||||
{
|
||||
if ( !playeringame[i] || !players[i].mo ) continue;
|
||||
let cg = players[i].mo.FindInventory("GoldShell");
|
||||
if ( cg ) totalneeded += cg.MaxAmount-cg.Amount;
|
||||
else totalneeded = GetDefaultByType("GoldShell").MaxAmount;
|
||||
}
|
||||
// subtract any shells already in the world
|
||||
let ti = ThinkerIterator.Create("GoldShell");
|
||||
GoldShell g;
|
||||
while ( g = GoldShell(ti.Next()) )
|
||||
{
|
||||
if ( g.Owner ) continue;
|
||||
totalneeded -= g.Amount;
|
||||
}
|
||||
return (totalneeded > 0);
|
||||
}
|
||||
|
||||
override void WorldThingDied( WorldEvent e )
|
||||
{
|
||||
if ( e.Thing.default.bISMONSTER && ((e.Thing.default.bBOSS) || (e.Thing.GetSpawnHealth() >= 1000)) && (alreadygold.Find(e.Thing) == alreadygold.Size()) )
|
||||
|
|
@ -1194,7 +1216,8 @@ Class SWWMHandler : EventHandler
|
|||
while ( ti.Next() ) dropweight++;
|
||||
int minchance = max(1,6-(e.Thing.GetSpawnHealth()/1000));
|
||||
dropweight = max(minchance,dropweight/4);
|
||||
if ( !Random[GoldDrop](0,dropweight) )
|
||||
// make sure the gold shell is "worth spawning", too
|
||||
if ( !Random[GoldDrop](0,dropweight) && ShouldSpawnGold() )
|
||||
{
|
||||
let g = Actor.Spawn("GoldShell",e.Thing.Vec3Offset(0,0,e.Thing.Height/2));
|
||||
double ang = FRandom[SpareShells](0,360);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue