A couple tweaks.
This commit is contained in:
parent
b7d03a602d
commit
98012daf26
8 changed files with 118 additions and 88 deletions
|
|
@ -49,7 +49,7 @@ extend Class SWWMHandler
|
|||
return false;
|
||||
}
|
||||
|
||||
private static bool ShouldSpawnGold()
|
||||
static bool ShouldSpawnGold()
|
||||
{
|
||||
int totalneeded = 0;
|
||||
// check "free space" in player inventories
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ Class FroggyChair : Actor
|
|||
+NOBLOOD;
|
||||
+INTERPOLATEANGLES;
|
||||
+FORCEPAIN;
|
||||
+CANPASS;
|
||||
+NOBLOCKMONST;
|
||||
+MOVEWITHSECTOR;
|
||||
+SLIDESONWALLS;
|
||||
}
|
||||
private void BeginCarry( Actor carrier )
|
||||
{
|
||||
|
|
@ -728,12 +732,12 @@ Class Chancebox : Actor
|
|||
// no candidates? just burst into treats
|
||||
if ( Random[Chancebox](0,1) )
|
||||
{
|
||||
let a = Spawn(!Random[Chancebox](0,2)?"GoldShell":Random[Chancebox](0,1)?"GrilledCheeseSandwich":"YnykronAmmo",pos);
|
||||
let a = Spawn((!Random[Chancebox](0,2)&&SWWMUtility.ItemExists("Spreadgun"))?"GoldShell":(Random[Chancebox](0,1)&&SWWMUtility.ItemExists("Ynykron"))?"YnykronAmmo":"GrilledCheeseSandwich",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
}
|
||||
else if ( !Random[Chancebox](0,2) )
|
||||
else if ( !Random[Chancebox](0,2) && SWWMUtility.ItemExists("CandyGun") )
|
||||
{
|
||||
for ( int i=0; i<=6; i++ )
|
||||
{
|
||||
|
|
@ -744,7 +748,7 @@ Class Chancebox : Actor
|
|||
if ( i > 0 ) a.vel.xy = (cos(i*60),sin(i*60))*FRandom[Chancebox](1,2);
|
||||
}
|
||||
}
|
||||
else if ( !Random[Chancebox](0,2) )
|
||||
else if ( !Random[Chancebox](0,2) && SWWMUtility.ItemExists("SilverBullet") )
|
||||
{
|
||||
for ( int i=0; i<3; i++ )
|
||||
{
|
||||
|
|
@ -763,7 +767,7 @@ Class Chancebox : Actor
|
|||
a.vel.xy = (cos(i*60),sin(i*60))*FRandom[Chancebox](3,4);
|
||||
}
|
||||
}
|
||||
else if ( Random[Chancebox](0,1) )
|
||||
else if ( Random[Chancebox](0,1) && SWWMUtility.ItemExists("Hellblazer") )
|
||||
{
|
||||
let a = Spawn("HellblazerWarheads",pos);
|
||||
a.bDROPPED = false;
|
||||
|
|
@ -794,7 +798,7 @@ Class Chancebox : Actor
|
|||
a.vel.xy = (cos(i*45),sin(i*45))*FRandom[Chancebox](5,6);
|
||||
}
|
||||
}
|
||||
else if ( Random[Chancebox](0,1) )
|
||||
else if ( Random[Chancebox](0,1) && SWWMUtility.ItemExists("Spreadgun") )
|
||||
{
|
||||
let a = Spawn("BlackShell",pos);
|
||||
a.bDROPPED = false;
|
||||
|
|
@ -802,7 +806,7 @@ Class Chancebox : Actor
|
|||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
for ( int i=0; i<3; i++ )
|
||||
{
|
||||
a = Spawn("BlueShell",pos);
|
||||
a = Spawn("WhiteShell",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
|
|
@ -810,7 +814,7 @@ Class Chancebox : Actor
|
|||
}
|
||||
for ( int i=0; i<8; i++ )
|
||||
{
|
||||
a = Spawn((i%2)?"WhiteShell":"PurpleShell",pos);
|
||||
a = Spawn((i%2)?"PurpleShell":"BlueShell",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
|
|
@ -827,13 +831,14 @@ Class Chancebox : Actor
|
|||
}
|
||||
else if ( Random[Chancebox](0,1) )
|
||||
{
|
||||
Class<Actor> which = Random[Chancebox](1,0)?"HealthNuggetItem":"ArmorNuggetItem";
|
||||
for ( int i=0; i<20; i++ )
|
||||
{
|
||||
let a = Spawn("HealthNuggetItem",pos);
|
||||
let a = Spawn(which,pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.vel.z = FRandom[Chancebox](2,8);
|
||||
a.vel.xy = (cos(i*3.6),sin(i*3.6))*FRandom[Chancebox](1,8);
|
||||
a.vel.xy = (cos(i*18),sin(i*18))*FRandom[Chancebox](1,8);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -2308,6 +2308,10 @@ Class DemolitionistMenu : GenericMenu
|
|||
if ( !type ) continue;
|
||||
// no collectibles
|
||||
if ( type is 'SWWMCollectible' ) continue;
|
||||
// no barriers outside doom
|
||||
if ( !(gameinfo.gametype&GAME_DOOM) && (type is 'EBarrier') ) continue;
|
||||
// no gravity outside raven
|
||||
if ( !(gameinfo.gametype&GAME_RAVEN) && (type is 'GravitySuppressor') ) continue;
|
||||
// can't sell candygun spares
|
||||
if ( sub && (type is 'CandyGunSpares') ) continue;
|
||||
let cur = players[consoleplayer].mo.FindInventory(type);
|
||||
|
|
|
|||
|
|
@ -335,7 +335,12 @@ Class Demolitionist : PlayerPawn
|
|||
{
|
||||
let type = (class<Inventory>)(AllActorClasses[i]);
|
||||
if ( !type ) continue;
|
||||
if ( !(gameinfo.gametype&GAME_Hexen) && (type is 'AmmoFabricator') ) continue; // no fabricators before hexen
|
||||
// no fabricators before hexen
|
||||
if ( !(gameinfo.gametype&GAME_Hexen) && (type is 'AmmoFabricator') ) continue;
|
||||
// no barriers outside doom
|
||||
if ( !(gameinfo.gametype&GAME_DOOM) && (type is 'EBarrier') ) continue;
|
||||
// no gravity outside raven
|
||||
if ( !(gameinfo.gametype&GAME_RAVEN) && (type is 'GravitySuppressor') ) continue;
|
||||
// Don't give maxed items
|
||||
let owned = FindInventory(type);
|
||||
if ( owned && (owned.Amount >= owned.MaxAmount) ) continue;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@ Class SWWMUtility
|
|||
continue;
|
||||
Array<String> ln;
|
||||
list[i].Split(ln,",",0);
|
||||
// game filtering
|
||||
if ( !(gameinfo.gametype&GAME_DOOM) && (ln[3] ~== "doom") ) continue;
|
||||
else if ( !(gameinfo.gametype&GAME_HERETIC) && (ln[3] ~== "heretic") ) continue;
|
||||
else if ( !(gameinfo.gametype&GAME_HEXEN) && (ln[3] ~== "hexen") ) continue;
|
||||
else if ( !(gameinfo.gametype&GAME_RAVEN) && (ln[3] ~== "raven") ) continue;
|
||||
else if ( !(gameinfo.gametype&(GAME_DOOM|GAME_HERETIC)) && (ln[3] ~== "nothexen") ) continue;
|
||||
let ac = new("SWWMAchievement");
|
||||
ac.basename = ln[0];
|
||||
ac.maxval = ln[1].ToInt();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue