Much stuff, starting work on Demolitionist Menu.

This commit is contained in:
Mari the Deer 2020-01-28 01:41:14 +01:00
commit ec1db7a42e
64 changed files with 1185 additions and 90 deletions

View file

@ -1,2 +1,6 @@
// Unissix Crafts Blackfire Igniter (from UnSX 4, cut from initial SWWM GZ release)
// Slot 6, spawns shared with Hellblazer
Class BlackfireIgniter : SWWMWeapon
{
}

View file

@ -0,0 +1,37 @@
// All DLC weapon ammo pickups
Class GravityCell : Ammo
{
}
Class SplatCore : Ammo
{
}
Class SkullAmmo : Ammo
{
}
Class SkullBox : SkullAmmo
{
}
Class DarkCanister : Ammo
{
}
Class SMW05Ammo : Ammo
{
}
Class EMPCore : Ammo
{
}
Class MadCore : Ammo
{
}
Class FunBalls : Ammo
{
}

View file

@ -1,2 +1,6 @@
// Tach-Engine Technologies Microgravity Manipulator aka "Gravity Gun" (from Zanaveth Ultra Suite)
// Slot 4, spawns shared with Wallbuster
// Slot 3, spawns shared with Spreadgun
Class GravityGun : SWWMWeapon
{
}

View file

@ -1,2 +1,6 @@
// Symnatek Reinforced Combat Hammer (from UnSX 5)
// Slot 1, spawns shared with Pusher
Class ItamexHammer : SWWMWeapon
{
}

View file

@ -1,2 +0,0 @@
// Dr. Locke's Instant Clone Army Deployer aka "Miniclone Machine" (from UnSX and SWWM series)
// Slot 9, spawns shared with Candygun

View file

@ -1,2 +1,6 @@
// PROWEL and TADEL artifacts, unknown creator (from UnSX series, based on nonsensical gibberish)
// Slot 0, spawns shared with Ynykron Artifact
// PROWEL and TADEL artifacts, by Nukritas 2xx of the University of Nos-Kora (from UnSX series, based on nonsensical gibberish)
// Slot 9, spawns shared with Candy Gun
Class PROWELfartsupintheTADEL : SWWMWeapon
{
}

View file

@ -1,2 +1,6 @@
// Dr. Locke's Instant Room Painter aka "Splatter" (from SWWM Series)
// Slot 9, spawns shared with Candygun
// Slot 4, spawns shared with Wallbuster
Class Splatter : SWWMWeapon
{
}

View file

@ -1,2 +1,6 @@
// Dr. Locke's Spooky Scary Skeleton Shooter aka "Skull Launcher" (from unreleased "Weirdweapons" mod)
// Slot 5, spawns shared with Eviscerator
Class SkullLauncher : SWWMWeapon
{
}

View file

@ -1,2 +1,6 @@
// Dr. Locke's Super Happy Fun Ball (was meant for SWWM Z)
// Slot 0, spawns shared with Ynykron Artifact
Class SuperHappyFunBall : SWWMWeapon
{
}

View file

@ -1,2 +1,6 @@
// Blackmann Arms "Puntzer Gamma" SMW.05 Assault Carbine (was planned for SWWM Z)
// Slot 7, spawns shared with Legacy Sparkster
Class PuntzerGamma : SWWMWeapon
{
}

View file

@ -1,2 +1,6 @@
// Tach-Engine Technologies EMP Rail Carbine (planned for unreleased Zanaveth Ultra Suite 2, successor to EMP Rifle from first Ultra Suite)
// Slot 8, shared spawn with Silver Bullet JET
Class EMPCarbine : SWWMWeapon
{
}

View file

@ -1 +1,414 @@
// All the ammo items go here
// ============================================================================
// Spreadgun / Wallbuster ammo
// ============================================================================
// Common code for grouped shell handling and per-amount pickup messages
Mixin Class SWWMShellAmmo
{
override string PickupMessage()
{
String tagstr = "$"..GetParentAmmo().GetClassName();
tagstr.MakeUpper();
if ( Amount > 1 )
{
tagstr = tagstr.."S";
return String.Format("%d %s",Amount,StringTable.Localize(tagstr));
}
return StringTable.Localize(tagstr);
}
override bool HandlePickup( Inventory item )
{
// drop unwanted shells
if ( (item is 'Ammo') && (Ammo(item).GetParentAmmo() == GetParentAmmo()) )
{
int excess = Amount+item.Amount;
if ( excess > MaxAmount ) excess -= MaxAmount;
if ( excess < item.Amount )
{
// drop spares
for ( int i=0; i<excess; i++ )
{
let s = Spawn(GetParentAmmo(),item.pos);
double ang = FRandom[SpareShells](0,360);
s.vel.xy = (cos(ang),sin(ang))*FRandom[SpareShells](1.,3.);
s.vel.z = FRandom[SpareShells](2,5);
}
}
}
return Super.HandlePickup(item);
}
}
Class RedShell : Ammo
{
Mixin SWWMShellAmmo;
Default
{
Stamina 500;
Inventory.Amount 1;
Inventory.MaxAmount 60;
Ammo.BackpackAmount 6;
}
}
Class RedShell2 : RedShell
{
Default
{
Inventory.Amount 2;
}
}
Class RedShell4 : RedShell
{
Default
{
Inventory.Amount 4;
}
}
Class RedShell6 : RedShell
{
Default
{
Inventory.Amount 6;
}
}
Class RedShell8 : RedShell
{
Default
{
Inventory.Amount 8;
}
}
Class RedShell12 : RedShell
{
Default
{
Inventory.Amount 12;
}
}
Class GreenShell : Ammo
{
Mixin SWWMShellAmmo;
Default
{
Stamina 600;
Inventory.Amount 1;
Inventory.MaxAmount 48;
Ammo.BackpackAmount 4;
}
}
Class GreenShell2 : GreenShell
{
Default
{
Inventory.Amount 2;
}
}
Class GreenShell4 : GreenShell
{
Default
{
Inventory.Amount 4;
}
}
Class GreenShell6 : GreenShell
{
Default
{
Inventory.Amount 6;
}
}
Class GreenShell8 : GreenShell
{
Default
{
Inventory.Amount 6;
}
}
Class WhiteShell : Ammo
{
Mixin SWWMShellAmmo;
Default
{
Stamina 900;
Inventory.Amount 1;
Inventory.MaxAmount 24;
Ammo.BackpackAmount 2;
}
}
Class WhiteShell2 : WhiteShell
{
Default
{
Inventory.Amount 2;
}
}
Class WhiteShell4 : WhiteShell
{
Default
{
Inventory.Amount 4;
}
}
Class WhiteShell6 : WhiteShell
{
Default
{
Inventory.Amount 6;
}
}
Class BlueShell : Ammo
{
Mixin SWWMShellAmmo;
Default
{
Stamina 700;
Inventory.Amount 1;
Inventory.MaxAmount 30;
Ammo.BackpackAmount 3;
}
}
Class BlueShell2 : BlueShell
{
Default
{
Inventory.Amount 2;
}
}
Class BlueShell4 : BlueShell
{
Default
{
Inventory.Amount 4;
}
}
Class BlueShell6 : BlueShell
{
Default
{
Inventory.Amount 6;
}
}
Class BlackShell : Ammo
{
Mixin SWWMShellAmmo;
Default
{
Stamina 1000;
Inventory.Amount 1;
Inventory.MaxAmount 20;
Ammo.BackpackAmount 2;
}
}
Class BlackShell2 : BlackShell
{
Default
{
Inventory.Amount 2;
}
}
Class BlackShell4 : BlackShell
{
Default
{
Inventory.Amount 4;
}
}
Class PurpleShell : Ammo
{
Default
{
Stamina 800;
Inventory.Amount 1;
Inventory.MaxAmount 24;
Ammo.BackpackAmount 4;
}
}
Class PurpleShell2 : PurpleShell
{
Default
{
Inventory.Amount 2;
}
}
Class PurpleShell4 : PurpleShell
{
Default
{
Inventory.Amount 4;
}
}
Class PurpleShell6 : PurpleShell
{
Default
{
Inventory.Amount 6;
}
}
Class GoldShell : Ammo
{
Mixin SWWMShellAmmo;
Default
{
Stamina 120000;
Inventory.Amount 1;
Inventory.MaxAmount 6;
Ammo.BackpackAmount 0;
}
}
// ============================================================================
// Eviscerator ammo
// ============================================================================
Class EvisceratorShell : Ammo
{
Default
{
Stamina 2500;
Inventory.Amount 1;
Inventory.MaxAmount 60;
Ammo.BackpackAmount 6;
}
}
Class EvisceratorSixPack : EvisceratorShell
{
Default
{
Inventory.Amount 6;
}
}
// ============================================================================
// Hellblazer ammo
// ============================================================================
Class HellblazerMissiles : Ammo
{
Default
{
Stamina 6000;
Inventory.Amount 1;
Inventory.MaxAmount 12;
Ammo.BackpackAmount 4;
}
}
Class HellblazerCrackshots : Ammo
{
Default
{
Stamina 8000;
Inventory.Amount 1;
Inventory.MaxAmount 8;
Ammo.BackpackAmount 2;
}
}
Class HellblazerRavagers : Ammo
{
Default
{
Stamina 12000;
Inventory.Amount 1;
Inventory.MaxAmount 4;
Ammo.BackpackAmount 1;
}
}
Class HellblazerWarheads : Ammo
{
Default
{
Stamina 25000;
Inventory.Amount 1;
Inventory.MaxAmount 2;
Ammo.BackpackAmount 0;
}
}
// ============================================================================
// Sparkster ammo
// ============================================================================
Class SparkUnit : Ammo
{
Default
{
Stamina 20000;
Inventory.Amount 1;
Inventory.MaxAmount 20;
Ammo.BackpackAmount 2;
}
}
// ============================================================================
// Silver Bullet ammo
// ============================================================================
Class SilverBulletAmmo : Ammo
{
Default
{
Stamina 6000;
Inventory.Amount 1;
Inventory.MaxAmount 12;
Ammo.BackpackAmount 1;
}
}
// ============================================================================
// Candygun ammo
// ============================================================================
Class CandyGunAmmo : Ammo
{
Default
{
Stamina 80000;
Inventory.Amount 1;
Inventory.MaxAmount 8;
Ammo.BackpackAmount 0;
}
}
Class CandyGunSpares : Ammo
{
Default
{
Stamina 150000;
Inventory.Amount 1;
Inventory.MaxAmount 4;
Ammo.BackpackAmount 0;
}
}
// ============================================================================
// Ynykron ammo
// ============================================================================
Class YnykronAmmo : Ammo
{
Default
{
Stamina 400000;
Inventory.Amount 1;
Inventory.MaxAmount 2;
Ammo.BackpackAmount 0;
}
}

View file

@ -1,2 +1,10 @@
// Imanaki Corp Hellfire Cannon Mk3, aka "Hellblazer" (from SWWM series, originally inspired by the Hellraiser from OMGWEAPONS)
// Slot 6, replaces Rocket Launcher, Phoenix Rod, Firestorm
Class Hellblazer : SWWMWeapon
{
Default
{
Stamina 40000;
}
}

View file

@ -1,2 +1,14 @@
// Blackmann Arms "Wallbuster" Heavy Armor Perforator Shotgun (planned for unreleased Total Destruction UT mod as the "Armor Perforator")
// Slot 3, replaces Super Shotgun, Ethereal Crossbow, Frost Shards
Class WallbusterReloadMenu : GenericMenu
{
}
Class Wallbuster : SWWMWeapon
{
Default
{
Stamina 15000;
}
}

View file

@ -10,35 +10,69 @@ enum ESWWMGZChannels
CHAN_JETPACK = 63206
};
// Scoreing
// Misc. Utility code
Class SWWMUtility
{
static void StripColor( out String str )
{
int len = str.CodePointCount();
for ( int i=0; i<len; i++ )
{
int remlen = 0;
if ( str.GetNextCodePoint(i) != 0x1C )
continue;
remlen++;
if ( str.GetNextCodePoint(i+remlen) == 0x5B )
while ( str.GetNextCodePoint(i+remlen) != 0x5D )
remlen++;
remlen++;
str.Remove(i,remlen);
len -= remlen;
}
}
}
// Scoring
Class SWWMCredits : Thinker
{
PlayerInfo myplayer;
int credits;
static void GiveCredits( PlayerInfo p, int amount )
static void Give( PlayerInfo p, int amount )
{
let c = FindCredits(p);
let c = Find(p);
if ( !c ) return;
if ( (c.credits+amount < c.credits) || (c.credits+amount > 999999999) ) c.credits = 999999999;
else c.credits += amount;
}
static bool TakeCredits( PlayerInfo p, int amount )
static clearscope bool CanTake( PlayerInfo p, int amount )
{
let c = FindCredits(p);
let c = Find(p);
if ( !c ) return false;
// too much!
if ( (c.credits-amount < 0) || (c.credits-amount > c.credits) ) return false;
return true;
}
static bool Take( PlayerInfo p, int amount )
{
let c = Find(p);
if ( !c ) return false;
// too much!
if ( (c.credits-amount < 0) || (c.credits-amount > c.credits) ) return false;
c.credits -= amount;
return true;
}
static int GetCredits( PlayerInfo p )
static clearscope int Get( PlayerInfo p )
{
let c = FindCredits(p);
let c = Find(p);
if ( !c ) return 0;
return c.credits;
}
private static SWWMCredits FindCredits( PlayerInfo p )
static clearscope SWWMCredits Find( PlayerInfo p )
{
let ti = ThinkerIterator.Create("SWWMCredits",STAT_STATIC);
SWWMCredits t;
@ -47,10 +81,129 @@ Class SWWMCredits : Thinker
if ( t.myplayer != p ) continue;
return t;
}
t = new("SWWMCredits");
t.ChangeStatNum(STAT_STATIC);
t.myplayer = p;
return t;
return null;
}
}
// Trading history between players
Class SWWMTrade
{
int timestamp, type;
String other, what;
}
Class SWWMTradeHistory : Thinker
{
PlayerInfo myplayer;
Array<SWWMTrade> ent;
static void RegisterSend( PlayerInfo p, PlayerInfo other, String what )
{
let th = Find(p);
if ( !th ) return;
SWWMTrade t = new("SWWMTrade");
t.timestamp = gametic;
t.type = 0;
t.other = other.GetUserName();
t.what = what;
th.ent.Push(t);
}
static void RegisterReceive( PlayerInfo p, PlayerInfo other, String what )
{
let th = Find(p);
if ( !th ) return;
SWWMTrade t = new("SWWMTrade");
t.timestamp = gametic;
t.type = 1;
t.other = other.GetUserName();
t.what = what;
th.ent.Push(t);
}
static clearscope SWWMTradeHistory Find( PlayerInfo p )
{
let ti = ThinkerIterator.Create("SWWMTradeHistory",STAT_STATIC);
SWWMTradeHistory th;
while ( th = SWWMTradeHistory(ti.Next()) )
{
if ( th.myplayer != p ) continue;
return th;
}
return Null;
}
}
// Lore holder
Class SWWMLore
{
String tag, text;
}
Class SWWMLoreLibrary : Thinker
{
PlayerInfo myplayer;
Array<SWWMLore> ent;
void DirectAdd( String ref )
{
ref.MakeUpper();
String tag = String.Format("SWWM_LORETAG_%s",ref);
String text = String.Format("SWWM_LORETXT_%s",ref);
// check that it's valid
if ( StringTable.Localize(tag,false) == tag ) return;
if ( StringTable.Localize(text,false) == text ) return;
// check if existing
for ( int i=0; i<ent.Size(); i++ )
{
if ( ent[i].tag != tag ) continue;
return;
}
SWWMLore e = new("SWWMLore");
e.tag = "$"..tag;
e.text = "$"..text;
// sorted add
String loca = StringTable.Localize(e.tag), locb;
int cpa, cpb;
for ( int i=0; i<ent.Size(); i++ )
{
locb = StringTable.Localize(ent[i].tag);
bool less = false;
int lena = loca.CodePointCount(),
lenb = locb.CodePointCount();
int lim = min(lena,lenb);
for ( int j=0; j<lim; j++ )
{
cpa = loca.GetNextCodePoint(j);
cpb = locb.GetNextCodePoint(j);
if ( cpa >= cpb ) continue;
less = true;
break;
}
if ( !less ) continue;
ent.Insert(i,e);
return;
}
// append otherwise
ent.Push(e);
}
static void Add( PlayerInfo p, String ref )
{
let ll = Find(p);
if ( !ll ) return;
ll.DirectAdd(ref);
}
static clearscope SWWMLoreLibrary Find( PlayerInfo p )
{
let ti = ThinkerIterator.Create("SWWMLoreLibrary",STAT_STATIC);
SWWMLoreLibrary ll;
while ( ll = SWWMLoreLibrary(ti.Next()) )
{
if ( ll.myplayer != p ) continue;
return ll;
}
return Null;
}
}
@ -638,7 +791,6 @@ Class SWWMHandler : EventHandler
int lastkill[MAXPLAYERS];
int multilevel[MAXPLAYERS];
int lastitemcount[MAXPLAYERS];
int creditsbridge[MAXPLAYERS]; // curse the gap between play/ui
transient CVar mutevoice;
@ -682,10 +834,72 @@ Class SWWMHandler : EventHandler
override void PlayerEntered( PlayerEvent e )
{
// create some static thinkers for this player
PlayerInfo p = players[e.playernumber];
SWWMTradeHistory th = SWWMTradeHistory.Find(p);
if ( !th )
{
th = new("SWWMTradeHistory");
th.ChangeStatNum(Thinker.STAT_STATIC);
th.myplayer = p;
}
SWWMCredits c = SWWMCredits.Find(p);
if ( !c )
{
c = new("SWWMCredits");
c.ChangeStatNum(Thinker.STAT_STATIC);
c.myplayer = p;
}
SWWMLoreLibrary l = SWWMLoreLibrary.Find(p);
if ( !l )
{
l = new("SWWMLoreLibrary");
l.ChangeStatNum(Thinker.STAT_STATIC);
l.myplayer = p;
// pre-add some lore
l.DirectAdd("Belt");
l.DirectAdd("Collar");
l.DirectAdd("Demolitionist");
l.DirectAdd("Display");
l.DirectAdd("Hammerspace");
l.DirectAdd("Ibuki");
l.DirectAdd("Knowledgebase");
l.DirectAdd("Propulsor");
l.DirectAdd("Saya");
l.DirectAdd("Voicebox");
if ( gameinfo.gametype&GAME_Doom )
{
l.DirectAdd("Doomguy");
l.DirectAdd("Earth");
l.DirectAdd("Hell");
l.DirectAdd("UAC");
}
else if ( gameinfo.gametype&GAME_Heretic )
{
l.DirectAdd("Corvus");
l.DirectAdd("Parthoris");
l.DirectAdd("SerpentRiders");
l.DirectAdd("Sidhe");
}
else if ( gameinfo.gametype&GAME_Hexen )
{
l.DirectAdd("Baratus");
l.DirectAdd("Cronos");
l.DirectAdd("Daedolon");
l.DirectAdd("Parias");
l.DirectAdd("SerpentRiders");
}
}
// reset some vars
multilevel[e.playernumber] = 0;
lastkill[e.playernumber] = int.min;
}
override void PlayerRespawned( PlayerEvent e )
{
PlayerEntered(e);
}
override void WorldTick()
{
if ( !mutevoice ) mutevoice = CVar.GetCVar('swwm_mutevoice',players[consoleplayer]);
@ -706,8 +920,6 @@ Class SWWMHandler : EventHandler
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] ) continue;
// while we're at it, also update the bridge var for counting credits
creditsbridge[i] = SWWMCredits.GetCredits(players[i]);
if ( players[i].itemcount > lastitemcount[i] )
{
int score = 25;
@ -716,7 +928,7 @@ Class SWWMHandler : EventHandler
score = 2500;
Console.Printf(StringTable.Localize("$SWWM_LASTITEM"),players[i].GetUserName(),score);
}
SWWMCredits.GiveCredits(players[i],score);
SWWMCredits.Give(players[i],score);
lastitemcount[i] = players[i].itemcount;
}
}
@ -775,17 +987,18 @@ Class SWWMHandler : EventHandler
{
if ( !mutevoice ) mutevoice = CVar.GetCVar('swwm_mutevoice',players[consoleplayer]);
if ( e.Thing.player ) tookdamage[e.Thing.PlayerNumber()] = true;
if ( e.DamageSource && e.DamageSource.bISMONSTER && (e.Thing == players[consoleplayer].mo) && (e.Thing.Health > 0) )
if ( e.DamageSource && (e.DamageSource.bISMONSTER || e.DamageSource.player) && (e.Thing == players[consoleplayer].mo) && (e.Thing.Health > 0) )
{
if ( (!lastcombat || (gametic > lastcombat+20)) && (mutevoice.GetInt() < 1) )
lastcombat = AddOneliner(e.Thing.IsFriend(e.DamageSource)?"friendhit":"gethit",15);
highesttic = gametic;
}
if ( e.DamageSource && (e.DamageSource == players[consoleplayer].mo) && (e.Thing.bISMONSTER || e.Thing.player) )
{
if ( e.Thing.IsFriend(e.DamageSource) )
{
// no comment if it's a friendly (to be added)
}
else
{
// hurt comment
if ( (!lastcombat || (gametic > lastcombat+20)) && (mutevoice.GetInt() < 1) )
lastcombat = AddOneliner("gethit",15);
lastcombat = AddOneliner("hitfriend",15);
highesttic = gametic;
}
}
@ -817,7 +1030,7 @@ Class SWWMHandler : EventHandler
score += 5000;
Console.Printf(StringTable.Localize("$SWWM_LASTMONSTER",e.DamageSource.player.GetUserName()),5000);
}
SWWMCredits.GiveCredits(e.DamageSource.player,score);
SWWMCredits.Give(e.DamageSource.player,score);
// TODO floating score for HUD
spreecount[pnum]++;
}
@ -870,6 +1083,17 @@ Class SWWMHandler : EventHandler
}
}
override void CheckReplacement( ReplaceEvent e )
{
if ( (e.Replacee is 'Pistol') || (e.Replacee is 'GoldWand') || (e.Replacee is 'FWeapFist') || (e.Replacee is 'CWeapMace') || (e.Replacee is 'MWeapWand') ) e.Replacement = 'ExplodiumGun';
else if ( (e.Replacee is 'BFG9000') || (e.Replacee is 'Mace') )
{
if ( Random[Replacements](0,1) ) e.Replacement = 'Ynykron';
else e.Replacement = 'CandyGun';
}
else if ( e.Replacee is 'MWeaponPiece1' ) e.Replacement = 'CandyGun';
}
override void NetworkProcess( ConsoleEvent e )
{
if ( e.Name ~== "swwmgesture" )
@ -890,6 +1114,32 @@ Class SWWMHandler : EventHandler
break;
}
}
else if ( e.Name.Left(14) ~== "swwmstoregive." )
{
Class<Inventory> item = e.Name.Mid(14);
if ( !item ) return;
if ( SWWMCredits.Take(players[e.Args[0]],e.Args[1]) )
{
players[e.Args[0]].mo.GiveInventory(item,1);
if ( item is 'Weapon' ) players[e.Args[0]].mo.A_SelectWeapon((Class<Weapon>)(item));
}
}
else if ( e.Name.Left(10) ~== "swwmtrade." )
{
Class<Inventory> item = e.Name.Mid(10);
if ( !item ) return;
let def = GetDefaultByType(item);
if ( players[e.Args[1]].mo.GiveInventory(item,1) )
{
players[e.Args[0]].mo.TakeInventory(item,1);
// add to history
SWWMTradeHistory.RegisterSend(players[e.Args[0]],players[e.Args[1]],def.GetTag());
SWWMTradeHistory.RegisterReceive(players[e.Args[1]],players[e.Args[0]],def.GetTag());
// add messages
if ( e.Args[0] == consoleplayer ) Console.Printf(StringTable.Localize("$SWWM_MSGSENT"),def.GetTag(),players[e.Args[1]].GetUserName());
if ( e.Args[1] == consoleplayer ) Console.Printf(StringTable.Localize("$SWWM_MSGRECV"),players[e.Args[0]].GetUserName(),def.GetTag());
}
}
}
static void DoFlash( Actor camera, Color c, int duration )

View file

@ -1,2 +1,10 @@
// Mr. BIG SHOT Industries "Eviscerator" High Load Flak Cannon (from SWWM series)
// Slot 5, replaces Chaingun, Dragon Claw, Hammer of Retribution
Class Eviscerator : SWWMWeapon
{
Default
{
Stamina 25000;
}
}

View file

@ -1,2 +1,10 @@
// Ynykron Artifact (from UnSX Series, featured in SWWM Platinum as a secret weapon)
// Slot 0, replaces BFG9000, Firemace, Wraithverge (arc)
Class Ynykron : SWWMWeapon
{
Default
{
Stamina 600000;
}
}

View file

@ -1,2 +1,10 @@
// Dr. Locke's Mighty Wolf Breath Airgun aka "Deep Impact" Airblaster (from SWWM series)
// Slot 1, replaces Fist, Staff, Hexen starting weapons
Class DeepImpact : SWWMWeapon
{
Default
{
Stamina 2000;
}
}

View file

@ -107,8 +107,7 @@ Class SWWMStatusBar : BaseStatusBar
// update interpolators
HealthInter.Update(CPlayer.health);
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
if ( hnd ) ScoreInter.Update(hnd.creditsbridge[CPlayer.mo.PlayerNumber()]);
else ScoreInter.Update(0);
ScoreInter.Update(SWWMCredits.Get(CPlayer));
let d = Demolitionist(CPlayer.mo);
if ( d )
{
@ -325,18 +324,7 @@ Class SWWMStatusBar : BaseStatusBar
Screen.Dim("Black",.8,0,Screen.GetHeight()-int(15*hs.y),Screen.GetWidth(),int(15*hs.y));
String pname = players[consoleplayer].GetUserName();
// strip colors
for ( int i=0; i<pname.CodePointCount(); i++ )
{
int remlen = 0;
if ( pname.GetNextCodePoint(i) != 0x1C )
continue;
remlen++;
if ( pname.GetNextCodePoint(i+remlen) == 0x5B )
while ( pname.GetNextCodePoint(i+remlen) != 0x5D )
remlen++;
remlen++;
pname.Remove(i,remlen);
}
SWWMUtility.StripColor(pname);
String fullstr = String.Format("\cq%s\cd@\cqdemolitionist%d\cn ~ \c-wall %s%s",pname,consoleplayer+1,txt,mTewiFont.mFont.GetCursor());
// cut out to fit
int w = mTewiFont.mFont.StringWidth(fullstr);

View file

@ -56,6 +56,11 @@ Class SWWMArmor : Armor
}
}
// gives armor when used
Class SWWMSpareArmor : Inventory
{
}
// Base casing classes
Class SWWMCasing : Actor
{

View file

@ -1,2 +1,10 @@
// Tach-Engine Technologies Microfusion Rotary Hammer aka "Pusher" (planned for unreleased Zanaveth Ultra Suite 2)
// Slot 1, replaces Chainsaw, Gauntlets, Timon's Axe
Class PusherWeapon : SWWMWeapon
{
Default
{
Stamina 5000;
}
}

View file

@ -1,3 +0,0 @@
// Akari Labs "Loudboi" Voicebox
// With this you can E M I T
// Additional voice packs will be made later

View file

@ -2,7 +2,25 @@
Class SWWMKnowledgeBaseMenu : GenericMenu
{
// TODO everything, just have it be a blank menu for now
TextureID MainWindow, TabSeparator, WindowSeparator;
Font TewiFont;
int curtab;
// for scrolling
int sel0, sel1, sel2;
// inventory lists
Array<Inventory> invlist;
// lore stuff
SWWMLoreLibrary lorelib;
// store prompt
Array<Class<Inventory> > storelist;
bool buying;
int buyitem;
int buyamount;
// trading
SWWMTradeHistory tradelib;
// temporary bottom messages, such as "not enough money"
String tmsg;
int tmsgtic;
override void Init( Menu parent )
{
@ -14,6 +32,11 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
return;
}
TewiFont = Font.GetFont('TewiShaded');
MainWindow = TexMan.CheckForTexture("graphics/KBase/MainWindow.png",TexMan.Type_Any);
TabSeparator = TexMan.CheckForTexture("graphics/KBase/TabSeparator.png",TexMan.Type_Any);
WindowSeparator = TexMan.CheckForTexture("graphics/KBase/WindowSeparator.png",TexMan.Type_Any);
curtab = CVar.GetCVar('swwm_lasttab',players[consoleplayer]).GetInt();
if ( (curtab < 0) || (curtab > 7) ) curtab = 0;
}
override bool MenuEvent( int mkey, bool fromcontroller )
@ -33,22 +56,11 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
{
Super.Drawer();
String str;
double hs = min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/400.));
if ( hs < 1. )
{
str = StringTable.Localize("$SWWM_TOOSMALL");
BrokenLines l = TewiFont.BreakLines(str,CleanWidth/2);
int xx, yy = (CleanHeight-l.Count()*TewiFont.GetHeight())/2;
for ( int i=0; i<l.Count(); i++ )
{
xx = (CleanWidth-TewiFont.StringWidth(l.StringAt(i)))/2;
Screen.DrawText(TewiFont,Font.CR_FIRE,xx,yy,l.StringAt(i),DTA_Clean,true);
yy += TewiFont.GetHeight();
}
return;
}
double hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/400.)),1.);
Vector2 ss = (Screen.GetWidth(),Screen.GetHeight())/hs;
Vector2 origin = (ss.x-640,ss.y-400)/2.;
Screen.DrawTexture(MainWindow,false,origin.x,origin.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
str = StringTable.Localize("$SWWM_COMINGSOON");
Vector2 ss = (Screen.GetWidth()/hs,Screen.GetHeight()/hs);
Screen.DrawText(TewiFont,Font.CR_FIRE,(ss.x-TewiFont.StringWidth(str))/2.,(ss.y-TewiFont.GetHeight())/2.,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
}

View file

@ -110,6 +110,7 @@ Class Demolitionist : PlayerPawn
override void Tick()
{
Super.Tick();
if ( !player ) return;
if ( !myvoice ) myvoice = CVar.GetCVar('swwm_voicetype',player);
if ( !mute ) mute = CVar.GetCVar('swwm_mutevoice',player);
if ( player.onground && !bNoGravity && !lastground && (waterlevel < 2) && (health > 0) )
@ -156,7 +157,8 @@ Class Demolitionist : PlayerPawn
Actor a;
for ( int i=-1; i<=1; i+=2 ) for ( int j=1; j<4; j++ )
{
a = Spawn("DashTrail",Vec3Angle(30,angle+i*160,30));
a = Spawn("DashTrail",Vec3Angle(15,angle+i*140,35));
a.target = self;
a.vel = (RotateVector((j,0),angle+i*160),0)-(0,0,1)*j;
a.vel -= vel*.5;
}
@ -166,7 +168,8 @@ Class Demolitionist : PlayerPawn
Actor a;
for ( int i=-1; i<=1; i+=2 ) for ( int j=1; j<4; j++ )
{
a = Spawn("DashTrail",Vec3Angle(10,angle+i*160,30));
a = Spawn("DashTrail",Vec3Angle(10,angle+i*140,40));
a.target = self;
a.vel = .5*(RotateVector((j,0),angle+i*160),0)-(0,0,1)*j;
a.vel -= vel*.5;
}
@ -289,6 +292,12 @@ Class Demolitionist : PlayerPawn
}
override void PlayIdle()
{
if ( !player )
{
if ( !InStateSequence(CurState,FindState("Spawn")) )
SetStateLabel("Spawn");
return;
}
if ( player.health <= 0 ) return;
if ( !bNoGravity && player.onground && (waterlevel < 3) )
{
@ -356,6 +365,12 @@ Class Demolitionist : PlayerPawn
}
override void PlayRunning()
{
if ( !player )
{
if ( !InStateSequence(CurState,FindState("See")) )
SetStateLabel("See");
return;
}
if ( player.health <= 0 ) return;
if ( !bNoGravity && player.onground && (waterlevel < 3) )
{
@ -416,7 +431,7 @@ Class Demolitionist : PlayerPawn
if ( InStateSequence(CurState,FindState("Dash"))
|| InStateSequence(CurState,FindState("Jump")) )
return; // don't cancel dash/jump
if ( player.crouchdir == -1 ) SetStateLabel("CrouchMissile");
if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchMissile");
else SetStateLabel("Missile");
}
override void PlayAttacking2()
@ -435,19 +450,19 @@ Class Demolitionist : PlayerPawn
if ( lastdamage > 60 )
{
A_StartSound("*pain25",CHAN_VOICE);
if ( mute.GetInt() < 4 )
if ( mute && myvoice && (mute.GetInt() < 4) )
A_StartSound(String.Format("voice/%s/hipain",myvoice.GetString()),CHAN_DEMOVOICE,CHANF_OVERLAP);
}
else if ( lastdamage > 40 )
{
A_StartSound("*pain50",CHAN_VOICE);
if ( mute.GetInt() < 4 )
if ( mute && myvoice && (mute.GetInt() < 4) )
A_StartSound(String.Format("voice/%s/pain",myvoice.GetString()),CHAN_DEMOVOICE,CHANF_OVERLAP);
}
else if ( lastdamage > 0 )
{
A_StartSound("*pain100",CHAN_VOICE);
if ( mute.GetInt() < 4 )
if ( mute && myvoice && (mute.GetInt() < 4) )
A_StartSound(String.Format("voice/%s/lopain",myvoice.GetString()),CHAN_DEMOVOICE,CHANF_OVERLAP);
}
}
@ -456,11 +471,12 @@ Class Demolitionist : PlayerPawn
if ( !myvoice ) myvoice = CVar.GetCVar('swwm_voicetype',player);
if ( !mute ) mute = CVar.GetCVar('swwm_mutevoice',player);
A_PlayerScream();
if ( mute.GetInt() < 4 )
if ( mute && myvoice && (mute.GetInt() < 4) )
A_StartSound(String.Format("voice/%s/death",myvoice.GetString()),CHAN_DEMOVOICE,CHANF_OVERLAP);
}
override bool OnGiveSecret( bool printmsg, bool playsound )
{
if ( !player ) return false;
if ( !mute ) mute = CVar.GetCVar('swwm_mutevoice',player);
int score = 500;
// last secret (this is called before counting it up, so have to subtract)
@ -471,13 +487,16 @@ Class Demolitionist : PlayerPawn
}
else Console.Printf(StringTable.Localize("$SWWM_FINDSECRET"),player.GetUserName(),score);
if ( CheckLocalView() && (mute.GetInt() < 2) ) SWWMHandler.AddOneliner("findsecret",40);
SWWMCredits.GiveCredits(player,score);
SWWMCredits.Give(player,score);
return true;
}
override void AddInventory( Inventory item )
{
if ( !mute ) mute = CVar.GetCVar('swwm_mutevoice',player);
Super.AddInventory(item);
if ( !player ) return;
// add lore if any
SWWMLoreLibrary.Add(player,item.GetClassName());
if ( !mute ) mute = CVar.GetCVar('swwm_mutevoice',player);
if ( (item is 'Weapon') && CheckLocalView() && (mute.GetInt() < 2) )
SWWMHandler.AddOneliner("getweapon");
if ( (item is 'Key') && !key_reentrant )
@ -485,7 +504,7 @@ Class Demolitionist : PlayerPawn
// score
int score = 250;
Console.Printf(StringTable.Localize("$SWWM_FINDKEY"),player.GetUserName(),item.GetTag(),score);
SWWMCredits.GiveCredits(player,score);
SWWMCredits.Give(player,score);
// share all keys in mp
for ( int i=0; i<MAXPLAYERS; i++ )
{
@ -499,6 +518,7 @@ Class Demolitionist : PlayerPawn
}
override bool UseInventory( Inventory item )
{
if ( !player ) return Super.UseInventory(item);
if ( !mute ) mute = CVar.GetCVar('swwm_mutevoice',player);
if ( !(item is 'PuzzleItem') || (mute.GetInt() >= 2) )
return Super.UseInventory(item);
@ -522,6 +542,14 @@ Class Demolitionist : PlayerPawn
b.A_CheckTerrain();
}
}
override bool Used( Actor user )
{
if ( !(user is 'Demolitionist') || !user.player ) return false;
CVar othermute = CVar.GetCVar('swwm_mutevoice',user.player);
if ( (user.player == players[consoleplayer]) && (othermute.GetInt() < 2) )
SWWMHandler.AddOneliner("greet");
return false;
}
States
{
Spawn:
@ -723,15 +751,22 @@ Class DashTrail : Actor
{
Super.PostBeginPlay();
SetState(FindState("Spawn")+Random[ExploS](0,7));
let t = Spawn("DashTrail2",pos);
let t = Spawn("DashTrail2",level.Vec3Offset(pos,vel*.3));
t.target = target;
t.vel = vel*1.2;
let s = Spawn("SWWMSmoke",pos);
let s = Spawn("SWWMSmoke",level.Vec3Offset(pos,vel*1.6));
s.vel = vel*.8;
s.SetShade(Color(1,1,1)*Random[ExploS](64,128));
s.special1 = Random[ExploS](2,4);
s.scale *= 1.4;
s.alpha *= .3;
}
override void Tick()
{
Super.Tick();
// hack
if ( target && (players[consoleplayer].Camera == target) ) Warp(target,pos.x,pos.y,pos.z,0,WARPF_ABSOLUTEPOSITION|WARPF_COPYINTERPOLATION);
}
States
{
Spawn:
@ -762,6 +797,12 @@ Class DashTrail2 : Actor
Super.PostBeginPlay();
SetState(FindState("Spawn")+Random[ExploS](0,7));
}
override void Tick()
{
Super.Tick();
// hack
if ( target && (players[consoleplayer].Camera == target) ) Warp(target,pos.x,pos.y,pos.z,0,WARPF_ABSOLUTEPOSITION|WARPF_COPYINTERPOLATION);
}
States
{
Spawn:

View file

@ -1,2 +1,10 @@
// Blackmann "Rhino Stopper" Spreadgun (from Instant Action 3, also planned for Zanaveth Ultra Suite 2)
// Slot 3, replaces Shotgun, Ethereal Crossbow, Serpent Staff
Class Spreadgun : SWWMWeapon
{
Default
{
Stamina 10000;
}
}

View file

@ -1,2 +1,10 @@
// Decade Mechanics Model S-5 Biospark Carbine aka "Legacy Sparkster" (from UnSX series, also featured in SWWM series)
// Slot 7, replaces Plasma Rifle, Hellstaff, Arc of Death
Class Sparkster : SWWMWeapon
{
Default
{
Stamina 80000;
}
}

View file

@ -293,6 +293,13 @@ Class ExplodiumGun : SWWMWeapon
ui TextureID WeaponBox;
ui HUDFont mTewiFont;
override void AttachToOwner( Actor other )
{
Super.AttachToOwner(other);
// additional lore
SWWMLoreLibrary.Add(other.player,"Munch");
}
override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss )
{
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/ExplodiumDisplay.png",TexMan.Type_Any);
@ -433,6 +440,7 @@ Class ExplodiumGun : SWWMWeapon
Obituary "$O_EXPLODIUM";
Weapon.UpSound "explodium/select";
Weapon.SlotNumber 2;
Stamina 600;
}
States
{

View file

@ -1,2 +1,15 @@
// Munch Innovations "Taste the Sweetness" Candy Gun (from unreleased "Weird Weapons" UT minimod)
// Slot 9, replaces BFG9000, Firemace, Bloodscourge (stub)
Class CandyGun : SWWMWeapon
{
Default
{
Tag "$T_CANDYGUN";
Inventory.PickupMessage "$T_CANDYGUN";
Obituary "$O_CANDYGUN";
Weapon.UpSound "explodium/select";
Weapon.SlotNumber 9;
Stamina 70000;
}
}

View file

@ -1,2 +1,10 @@
// Blackmann-Forx Silver Bullet JET (successor to Silver Bullet from Zanaveth Ultra Suite)
// Slot 8, replaces Plasma Rifle, Hellstaff, Quietus (hilt)
Class SilverBullet : SWWMWeapon
{
Default
{
Stamina 120000;
}
}