It begins. Demolitionist Menu currently not functional.
This commit is contained in:
commit
6b47f92764
17 changed files with 3989 additions and 3608 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r1 \cu(Sat 18 Sep 00:10:31 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw1.2pre r1 \cu(2021-09-18 00:10:31)\c-";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre \cu(Sat 18 Sep 14:20:11 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw1.2pre \cu(2021-09-18 14:20:11)\c-";
|
||||
|
|
|
|||
|
|
@ -912,11 +912,15 @@ ynykron/wind sounds/ynykron/mc_vortexwind.ogg
|
|||
misc/secret sounds/menu/findsecret.ogg
|
||||
misc/keytry sounds/menu/failuse.ogg
|
||||
misc/w_pkup sounds/general/wpickup.ogg
|
||||
misc/w_pkup_vip sounds/general/wpickup_vip.ogg
|
||||
misc/p_pkup sounds/general/ppickup.ogg
|
||||
misc/p_pkup_vip sounds/general/ppickup_vip.ogg
|
||||
misc/i_pkup sounds/general/ipickup.ogg
|
||||
misc/k_pkup sounds/general/kpickup.ogg
|
||||
misc/ammo_pkup sounds/general/apickup.ogg
|
||||
misc/bullet_pkup sounds/general/bpickup.ogg
|
||||
misc/ammo_pkup_vip sounds/general/apickup_vip.ogg
|
||||
misc/bullet_pkup_vip sounds/general/bpickup_vip.ogg
|
||||
misc/armor_pkup sounds/general/spickup.ogg
|
||||
misc/health_pkup sounds/general/hpickup.ogg
|
||||
misc/spawn sounds/CORK.ogg
|
||||
|
|
|
|||
BIN
sounds/general/apickup_vip.ogg
Normal file
BIN
sounds/general/apickup_vip.ogg
Normal file
Binary file not shown.
BIN
sounds/general/bpickup_vip.ogg
Normal file
BIN
sounds/general/bpickup_vip.ogg
Normal file
Binary file not shown.
BIN
sounds/general/ppickup_vip.ogg
Normal file
BIN
sounds/general/ppickup_vip.ogg
Normal file
Binary file not shown.
BIN
sounds/general/wpickup_vip.ogg
Normal file
BIN
sounds/general/wpickup_vip.ogg
Normal file
Binary file not shown.
|
|
@ -61,6 +61,7 @@ version "4.6"
|
|||
#include "zscript/hud/swwm_hudextra.zsc"
|
||||
// kbase
|
||||
#include "zscript/kbase/swwm_kbase.zsc"
|
||||
#include "zscript/kbase/swwm_kbase_priv.zsc"
|
||||
// items
|
||||
#include "zscript/items/swwm_baseitem.zsc"
|
||||
#include "zscript/items/swwm_basehealth.zsc"
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ Class GrandSpear : MagAmmo
|
|||
//$Icon ammo
|
||||
Tag "$T_GRANDSPEAR";
|
||||
MagAmmo.PickupTag "GRANDSPEAR";
|
||||
Inventory.PickupSound "misc/bullet_pkup_vip";
|
||||
Inventory.Icon "graphics/HUD/Icons/A_GrandSpear.png";
|
||||
MagAmmo.ParentAmmo "GrandAmmo";
|
||||
MagAmmo.ClipSize 5;
|
||||
|
|
@ -419,6 +420,7 @@ Class GrandAmmo : SWWMAmmo
|
|||
//$Icon ammo
|
||||
Tag "$T_GRANDAMMO";
|
||||
SWWMAmmo.PickupTag "GRANDAMMO";
|
||||
Inventory.PickupSound "misc/ammo_pkup_vip";
|
||||
Stamina -1200000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_GrandAmmo.png";
|
||||
Inventory.Amount 1;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Class GrandLance : SWWMWeapon
|
|||
//$Icon weapon
|
||||
Tag "$T_GRANDLANCE";
|
||||
Inventory.PickupMessage "$T_GRANDLANCE";
|
||||
Inventory.PickupSound "misc/w_pkup_vip";
|
||||
Obituary "$O_GRANDLANCE";
|
||||
SWWMWeapon.Tooltip "$TT_GRANDLANCE";
|
||||
Inventory.Icon "graphics/HUD/Icons/W_GrandLance.png";
|
||||
|
|
|
|||
|
|
@ -262,6 +262,7 @@ Class UltimatePod : MagAmmo
|
|||
//$Icon ammo
|
||||
Tag "$T_ULTIMATEPOD";
|
||||
MagAmmo.PickupTag "ULTIMATEPOD";
|
||||
Inventory.PickupSound "misc/bullet_pkup_vip";
|
||||
Inventory.Icon "graphics/HUD/Icons/A_UltimatePod.png";
|
||||
MagAmmo.ParentAmmo "UltimateAmmo";
|
||||
MagAmmo.ClipSize 4;
|
||||
|
|
@ -287,6 +288,7 @@ Class UltimateAmmo : SWWMAmmo
|
|||
//$Icon ammo
|
||||
Tag "$T_ULTIMATEAMMO";
|
||||
SWWMAmmo.PickupTag "ULTIMATEAMMO";
|
||||
Inventory.PickupSound "misc/ammo_pkup_vip";
|
||||
Stamina -2000000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_UltimateAmmo.png";
|
||||
Inventory.Amount 1;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ Class RafanKos : SWWMWeapon
|
|||
//$Icon weapon
|
||||
Tag "$T_RAFANKOS";
|
||||
Inventory.PickupMessage "$T_RAFANKOS";
|
||||
Inventory.PickupSound "misc/w_pkup_vip";
|
||||
Obituary "$O_RAFANKOS";
|
||||
SWWMWeapon.Tooltip "$TT_RAFANKOS";
|
||||
Inventory.Icon "graphics/HUD/Icons/W_RafanKos.png";
|
||||
|
|
|
|||
|
|
@ -1090,6 +1090,7 @@ Class YnykronAmmo : SWWMAmmo
|
|||
//$Icon ammo
|
||||
Tag "$T_YNYKRONAMMO";
|
||||
SWWMAmmo.PickupTag "YNYKRONAMMO";
|
||||
Inventory.PickupSound "misc/ammo_pkup_vip";
|
||||
Stamina -3000000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_Ynykron.png";
|
||||
Inventory.Amount 1;
|
||||
|
|
|
|||
|
|
@ -2941,7 +2941,7 @@ Class Mykradvo : Inventory
|
|||
Tag "$T_MYKRADVO";
|
||||
Stamina -1200000;
|
||||
Inventory.Icon "graphics/HUD/Icons/I_Mykradvo.png";
|
||||
Inventory.PickupSound "misc/p_pkup";
|
||||
Inventory.PickupSound "misc/p_pkup_vip";
|
||||
Inventory.UseSound "mykradvo/arc";
|
||||
Inventory.PickupMessage "$T_MYKRADVO";
|
||||
Inventory.MaxAmount 3;
|
||||
|
|
@ -3357,7 +3357,7 @@ Class AngerySigil : Inventory
|
|||
Tag "$T_DEVASTATION";
|
||||
Stamina -1500000;
|
||||
Inventory.Icon "graphics/HUD/Icons/I_Devastation.png";
|
||||
Inventory.PickupSound "misc/p_pkup";
|
||||
Inventory.PickupSound "misc/p_pkup_vip";
|
||||
Inventory.UseSound "powerup/devastation";
|
||||
Inventory.PickupMessage "$T_DEVASTATION";
|
||||
Inventory.MaxAmount 3;
|
||||
|
|
@ -3625,7 +3625,7 @@ Class DivineSprite : Inventory
|
|||
Tag "$T_DIVINE";
|
||||
Stamina -3600000;
|
||||
Inventory.Icon "graphics/HUD/Icons/I_Divine.png";
|
||||
Inventory.PickupSound "misc/p_pkup";
|
||||
Inventory.PickupSound "misc/p_pkup_vip";
|
||||
Inventory.UseSound "powerup/divineuse";
|
||||
Inventory.PickupMessage "$T_DIVINE";
|
||||
Inventory.MaxAmount 3;
|
||||
|
|
|
|||
3728
zscript/kbase/OLD_swwm_kbase.zsc
Normal file
3728
zscript/kbase/OLD_swwm_kbase.zsc
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
232
zscript/kbase/swwm_kbase_priv.zsc
Normal file
232
zscript/kbase/swwm_kbase_priv.zsc
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
// kbase private functions
|
||||
|
||||
extend Class DemolitionistMenu
|
||||
{
|
||||
// initialize the crime clock
|
||||
private void SetClock()
|
||||
{
|
||||
if ( gameinfo.gametype&GAME_Heretic )
|
||||
{
|
||||
// April 10th 2171, 17:34 JST
|
||||
// Epoch: 6351554040
|
||||
c_year = 2171;
|
||||
c_month = 3;
|
||||
c_day = 9;
|
||||
c_hour = 17;
|
||||
c_minute = 34;
|
||||
c_tz = "JST";
|
||||
}
|
||||
else if ( gameinfo.gametype&GAME_Hexen )
|
||||
{
|
||||
// May 25th 2171, 16:41 JST
|
||||
// Epoch: 6355438860
|
||||
c_year = 2171;
|
||||
c_month = 4;
|
||||
c_day = 24;
|
||||
c_hour = 16;
|
||||
c_minute = 41;
|
||||
c_tz = "JST";
|
||||
if ( SWWMUtility.IsDeathkings() )
|
||||
{
|
||||
// deathkings happen the day after
|
||||
c_day = 25;
|
||||
c_hour = 10;
|
||||
c_minute = 28;
|
||||
}
|
||||
}
|
||||
else if ( SWWMUtility.IsEviternity() )
|
||||
{
|
||||
// June 10th 2150, 20:09 +09
|
||||
// (June 10th 2150, 20:09 JST)
|
||||
// Epoch: 5694145740
|
||||
c_year = 2150;
|
||||
c_month = 5;
|
||||
c_day = 9;
|
||||
c_hour = 20;
|
||||
c_minute = 9;
|
||||
c_tz = "+09";
|
||||
}
|
||||
else // Doom
|
||||
{
|
||||
// June 6th 2148, 18:37 EDT
|
||||
// (June 7th 2148, 07:37 JST)
|
||||
// Epoch: 5630769420
|
||||
c_year = 2148;
|
||||
c_month = 5;
|
||||
c_day = 5;
|
||||
c_hour = 18;
|
||||
c_minute = 37;
|
||||
c_tz = "EDT";
|
||||
if ( SWWMUtility.IsKnownMap() && (level.cluster == 11) )
|
||||
{
|
||||
// NRFTL just happens the next day after
|
||||
c_day = 6;
|
||||
c_hour = 15;
|
||||
c_minute = 48;
|
||||
}
|
||||
}
|
||||
clockstr = CrimeTime();
|
||||
}
|
||||
|
||||
// please don't look at this
|
||||
private String CrimeTime()
|
||||
{
|
||||
// we have to do things this way because dates in this mod go beyond 32-bit unix time
|
||||
static const int days_in_month[] = {31,28,31,30,31,30,31,31,30,31,30,31};
|
||||
bool leap_year;
|
||||
int y = c_year, m = c_month, d = c_day, h = c_hour, mn = c_minute;
|
||||
int addtime = level.totaltime/GameTicRate;
|
||||
while ( addtime > 0 )
|
||||
{
|
||||
leap_year = (!(y%4) && ((y%100) || !(y%400)));
|
||||
if ( addtime >= 86400 )
|
||||
{
|
||||
addtime -= 86400;
|
||||
d++;
|
||||
int md = days_in_month[m];
|
||||
if ( leap_year && (m == 1) ) md++;
|
||||
if ( d >= md )
|
||||
{
|
||||
d = 0;
|
||||
m++;
|
||||
if ( m > 11 )
|
||||
{
|
||||
m = 0;
|
||||
y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( addtime >= 3600 )
|
||||
{
|
||||
addtime -= 3600;
|
||||
h++;
|
||||
if ( h > 23 )
|
||||
{
|
||||
h = 0;
|
||||
d++;
|
||||
int md = days_in_month[m];
|
||||
if ( leap_year && (m == 1) ) md++;
|
||||
if ( d >= md )
|
||||
{
|
||||
d = 0;
|
||||
m++;
|
||||
if ( m > 11 )
|
||||
{
|
||||
m = 0;
|
||||
y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( addtime >= 60 )
|
||||
{
|
||||
addtime -= 60;
|
||||
mn++;
|
||||
if ( mn > 59 )
|
||||
{
|
||||
mn = 0;
|
||||
h++;
|
||||
if ( h > 23 )
|
||||
{
|
||||
h = 0;
|
||||
d++;
|
||||
int md = days_in_month[m];
|
||||
if ( leap_year && (m == 1) ) md++;
|
||||
if ( d >= md )
|
||||
{
|
||||
d = 0;
|
||||
m++;
|
||||
if ( m > 11 )
|
||||
{
|
||||
m = 0;
|
||||
y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// we finished counting
|
||||
addtime = 0;
|
||||
}
|
||||
}
|
||||
return String.Format("%04d-%02d-%02d %02d:%02d %s",y,m+1,d+1,h,mn,c_tz);
|
||||
}
|
||||
|
||||
// ui->play transaction checks
|
||||
private void CheckTransactions()
|
||||
{
|
||||
for ( int i=0; i<checklist.Size(); i++ )
|
||||
{
|
||||
bool deleteme = false;
|
||||
for ( int j=0; j<hnd.checklist.Size(); j++ )
|
||||
{
|
||||
if ( hnd.checklist[j].uid != checklist[i].uid ) continue;
|
||||
if ( checklist[i].type == MenuTransaction.TT_ITEMUSE )
|
||||
{
|
||||
// check if use succeeded
|
||||
if ( checklist[i].result || hnd.checklist[j].result )
|
||||
{
|
||||
// only play use sound if game isn't frozen
|
||||
if ( !multiplayer && (menuactive == Menu.On) )
|
||||
{
|
||||
// if it's a weapon, play the select sound
|
||||
// if it's a collectible or key, play the "hands up" sound
|
||||
let w = (Class<Weapon>)(hnd.checklist[j].used);
|
||||
if ( w )
|
||||
{
|
||||
// play if actually switching
|
||||
if ( hnd.checklist[j].result )
|
||||
{
|
||||
String snd = GetDefaultByType(w).UpSound;
|
||||
MenuSound(snd);
|
||||
}
|
||||
}
|
||||
else if ( (hnd.checklist[j].used is 'SWWMCollectible') || (hnd.checklist[j].used is 'SWWMKey') )
|
||||
MenuSound("demolitionist/handsup");
|
||||
else
|
||||
{
|
||||
String snd = GetDefaultByType(hnd.checklist[j].used).UseSound;
|
||||
MenuSound(snd);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tmsg = StringTable.Localize("$SWWM_INVFAIL");
|
||||
tmsgtic = gametic+70;
|
||||
MenuSound("menu/noinvuse");
|
||||
}
|
||||
}
|
||||
else if ( checklist[i].type == MenuTransaction.TT_ITEMDROP )
|
||||
{
|
||||
// check if drop succeeded
|
||||
if ( !hnd.checklist[j].result )
|
||||
{
|
||||
tmsg = StringTable.Localize("$SWWM_INVNDROP");
|
||||
tmsgtic = gametic+70;
|
||||
MenuSound("menu/noinvuse");
|
||||
}
|
||||
}
|
||||
else if ( checklist[i].type == MenuTransaction.TT_ITEMSEND )
|
||||
{
|
||||
// check if trade succeeded
|
||||
if ( !hnd.checklist[j].result )
|
||||
{
|
||||
tmsg = StringTable.Localize("$SWWM_TRADEFULL");
|
||||
tmsgtic = gametic+70;
|
||||
MenuSound("menu/noinvuse");
|
||||
}
|
||||
else MenuSound("menu/demosel");
|
||||
}
|
||||
EventHandler.SendNetworkEvent("swwmcleartransaction",checklist[i].uid,consoleplayer);
|
||||
deleteme = true;
|
||||
break;
|
||||
}
|
||||
if ( !deleteme ) continue;
|
||||
checklist.Delete(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -236,6 +236,7 @@ Class Ynykron : SWWMWeapon
|
|||
//$Icon weapon
|
||||
Tag "$T_YNYKRON";
|
||||
Inventory.PickupMessage "$T_YNYKRON";
|
||||
Inventory.PickupSound "misc/w_pkup_vip";
|
||||
Obituary "$O_YNYKRON";
|
||||
SWWMWeapon.Tooltip "$TT_YNYKRON";
|
||||
Inventory.Icon "graphics/HUD/Icons/W_Ynykron.png";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue