diff --git a/gldefs.pickups b/gldefs.pickups index ac78f2945..49cc23fc2 100644 --- a/gldefs.pickups +++ b/gldefs.pickups @@ -37,6 +37,10 @@ Brightmap Texture "models/GhostArtifact.png" { Map "models/GhostArtifact_bright.png" } +Brightmap Texture "models/Gravity.png" +{ + Map "models/Gravity_bright.png" +} PointLight ARMORNUGGETLIGHT { @@ -100,3 +104,15 @@ Object GhostArtifact { Frame "XZW1" { light "GHOSTARTILIGHT" } } + +PointLight GRAVITYLIGHT +{ + Color 0.3 0.8 1.0 + Size 40 + Offset 0 16 0 + Attenuate 1 +} +Object GravitySuppressor +{ + Frame "XZW1" { light "GRAVITYLIGHT" } +} diff --git a/language.txt b/language.txt index 9e0fa589e..48c2f2074 100644 --- a/language.txt +++ b/language.txt @@ -100,6 +100,7 @@ SWWM_TRADEFROM = "Received from"; SWWM_MSGSENT = "You sent %dx %s to %s."; SWWM_MSGRECV = "%s sent you %dx %s."; SWWM_CHATTAB = "Chat Log"; +SWWM_SECRETTAB = "Secret"; SWWM_MAINCONTROLS = "PgUp/PgDn: Switch Tab | Arrows: Navigate | "; SWWM_INVCONTROLS = "Enter: Use | Backspace: Drop | "; SWWM_STRCONTROLS = "Enter: Buy | "; diff --git a/modeldef.pickups b/modeldef.pickups index c49b38ca8..b5b79f7da 100644 --- a/modeldef.pickups +++ b/modeldef.pickups @@ -40,7 +40,7 @@ Model "TetraHealthItem" Path "models" Model 0 "TetraHealth_d.3d" Skin 0 "TetraHealth.png" - Scale 0.05 0.05 0.05 + Scale 0.03 0.03 0.03 ZOffset 16 ROTATING @@ -52,7 +52,7 @@ Model "CubeHealthItem" Path "models" Model 0 "CubeHealth_d.3d" Skin 0 "CubeHealth.png" - Scale 0.05 0.05 0.05 + Scale 0.03 0.03 0.03 ZOffset 16 ROTATING @@ -132,3 +132,16 @@ Model "GhostArtifactX" FrameIndex XZW1 A 0 0 } + +Model "GravitySuppressor" +{ + Path "models" + Model 0 "Gravity_d.3d" + SurfaceSkin 0 0 "Gravity.png" + SurfaceSkin 0 1 "silvermap.png" + Scale 0.06 0.06 0.06 + ZOffset 16 + ROTATING + + FrameIndex XZW1 A 0 0 +} diff --git a/sndinfo.txt b/sndinfo.txt index 4a46dc1b1..175b398e2 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -408,6 +408,9 @@ powerup/sandwich sounds/CORK.ogg powerup/ghost sounds/items/CloakOn.ogg powerup/ghostact sounds/items/CloakLoop3.ogg powerup/ghostend sounds/items/CloakOff.ogg +powerup/gravity sounds/items/gravityon.ogg +powerup/gravityact sounds/items/gravityact.ogg +powerup/gravityend sounds/items/gravityoff.ogg menu/activate sounds/hmenu/hmenu1.ogg menu/backup sounds/hmenu/hmenu2.ogg diff --git a/sounds/items/gravityact.ogg b/sounds/items/gravityact.ogg new file mode 100644 index 000000000..3771af84f Binary files /dev/null and b/sounds/items/gravityact.ogg differ diff --git a/sounds/items/gravityoff.ogg b/sounds/items/gravityoff.ogg new file mode 100644 index 000000000..cff69d8f8 Binary files /dev/null and b/sounds/items/gravityoff.ogg differ diff --git a/sounds/items/gravityon.ogg b/sounds/items/gravityon.ogg new file mode 100644 index 000000000..6d5198b8a Binary files /dev/null and b/sounds/items/gravityon.ogg differ diff --git a/zscript.txt b/zscript.txt index 13f1f44a7..669f5cd0e 100644 --- a/zscript.txt +++ b/zscript.txt @@ -6,6 +6,7 @@ version "4.3" #include "zscript/swwm_libeye/projector planar.txt" #include "zscript/swwm_libeye/viewport.txt" #include "zscript/swwm_coordutil.zsc" +#include "zscript/swwm_quaternion.zsc" // base code #include "zscript/swwm_common.zsc" #include "zscript/swwm_player.zsc" diff --git a/zscript/swwm_armor.zsc b/zscript/swwm_armor.zsc index cb74c4333..a4f2166db 100644 --- a/zscript/swwm_armor.zsc +++ b/zscript/swwm_armor.zsc @@ -32,8 +32,8 @@ Class ArmorNuggetItem : SWWMSpareArmor Stamina 1000; Inventory.Icon "graphics/HUD/Icons/I_ArmorNugget.png"; Inventory.PickupMessage "$T_NUGGETA"; - Inventory.MaxAmount int.max; - Inventory.InterHubAmount int.max; + Inventory.MaxAmount 40; + Inventory.InterHubAmount 40; Inventory.UseSound "misc/armor_pkup"; SWWMSpareArmor.GiveArmor "ArmorNugget"; +INVENTORY.ALWAYSPICKUP; diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index e2d7da1d9..0970d4acb 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -1195,30 +1195,41 @@ Class SWWMHandler : EventHandler } } + private void DoKeyTagFix( Actor a ) + { + if ( a is 'RedCard' ) a.SetTag("$T_REDCARD"); + else if ( a is 'BlueCard' ) a.SetTag("$T_BLUECARD"); + else if ( a is 'YellowCard' ) a.SetTag("$T_YELLOWCARD"); + else if ( a is 'RedSkull' ) a.SetTag("$T_REDSKULL"); + else if ( a is 'BlueSkull' ) a.SetTag("$T_BLUESKULL"); + else if ( a is 'YellowSkull' ) a.SetTag("$T_YELLOWSKULL"); + else if ( a is 'KeyYellow' ) a.SetTag("$T_YELLOWKEY"); + else if ( a is 'KeyGreen' ) a.SetTag("$T_GREENKEY"); + else if ( a is 'KeyBlue' ) a.SetTag("$T_BLUEKEY"); + else if ( a.GetClassName() == 'KeyRed' ) a.SetTag("$T_REDKEY"); + else if ( a is 'KeySteel' ) a.SetTag("$T_KEYSTEEL"); + else if ( a is 'KeyCave' ) a.SetTag("$T_KEYCAVE"); + else if ( a is 'KeyAxe' ) a.SetTag("$T_KEYAXE"); + else if ( a is 'KeyFire' ) a.SetTag("$T_KEYFIRE"); + else if ( a is 'KeyEmerald' ) a.SetTag("$T_KEYEMERALD"); + else if ( a is 'KeyDungeon' ) a.SetTag("$T_KEYDUNGEON"); + else if ( a is 'KeySilver' ) a.SetTag("$T_KEYSILVER"); + else if ( a is 'KeyRusted' ) a.SetTag("$T_KEYRUSTED"); + else if ( a is 'KeyHorn' ) a.SetTag("$T_KEYHORN"); + else if ( a is 'KeySwamp' ) a.SetTag("$T_KEYSWAMP"); + else if ( a is 'KeyCastle' ) a.SetTag("$T_KEYCASTLE"); + } + + static void KeyTagFix( Actor a ) + { + let hnd = SWWMHandler(Find("SWWMHandler")); + if ( hnd ) hnd.DoKeyTagFix(a); + } + // tempfix keys have no tags override void WorldThingSpawned( WorldEvent e ) { - if ( e.Thing is 'RedCard' ) e.Thing.SetTag("$T_REDCARD"); - else if ( e.Thing is 'BlueCard' ) e.Thing.SetTag("$T_BLUECARD"); - else if ( e.Thing is 'YellowCard' ) e.Thing.SetTag("$T_YELLOWCARD"); - else if ( e.Thing is 'RedSkull' ) e.Thing.SetTag("$T_REDSKULL"); - else if ( e.Thing is 'BlueSkull' ) e.Thing.SetTag("$T_BLUESKULL"); - else if ( e.Thing is 'YellowSkull' ) e.Thing.SetTag("$T_YELLOWSKULL"); - else if ( e.Thing is 'KeyYellow' ) e.Thing.SetTag("$T_YELLOWKEY"); - else if ( e.Thing is 'KeyGreen' ) e.Thing.SetTag("$T_GREENKEY"); - else if ( e.Thing is 'KeyBlue' ) e.Thing.SetTag("$T_BLUEKEY"); - else if ( e.Thing.GetClassName() == 'KeyRed' ) e.Thing.SetTag("$T_REDKEY"); - else if ( e.Thing is 'KeySteel' ) e.Thing.SetTag("$T_KEYSTEEL"); - else if ( e.Thing is 'KeyCave' ) e.Thing.SetTag("$T_KEYCAVE"); - else if ( e.Thing is 'KeyAxe' ) e.Thing.SetTag("$T_KEYAXE"); - else if ( e.Thing is 'KeyFire' ) e.Thing.SetTag("$T_KEYFIRE"); - else if ( e.Thing is 'KeyEmerald' ) e.Thing.SetTag("$T_KEYEMERALD"); - else if ( e.Thing is 'KeyDungeon' ) e.Thing.SetTag("$T_KEYDUNGEON"); - else if ( e.Thing is 'KeySilver' ) e.Thing.SetTag("$T_KEYSILVER"); - else if ( e.Thing is 'KeyRusted' ) e.Thing.SetTag("$T_KEYRUSTED"); - else if ( e.Thing is 'KeyHorn' ) e.Thing.SetTag("$T_KEYHORN"); - else if ( e.Thing is 'KeySwamp' ) e.Thing.SetTag("$T_KEYSWAMP"); - else if ( e.Thing is 'KeyCastle' ) e.Thing.SetTag("$T_KEYCASTLE"); + if ( e.Thing is 'Key' ) DoKeyTagFix(e.Thing); } override void PostUiTick() @@ -1478,6 +1489,7 @@ Class SWWMHandler : EventHandler else if ( (e.Replacee == 'Soulsphere') || (e.Replacee == 'ArtiSuperHealth') ) e.Replacement = 'RefresherItem'; else if ( (e.Replacee == 'Megasphere') || (e.Replacee == 'ArtiEgg') || (e.Replacee == 'PlatinumHelm') ) e.Replacement = 'GrilledCheeseSandwich'; else if ( (e.Replacee == 'Blursphere') || (e.Replacee == 'ArtiInvisibility') || (e.Replacee == 'AmuletOfWarding') ) e.Replacement = 'GhostArtifact'; + else if ( (e.Replacee == 'Radsuit') || (e.Replacee == 'ArtiFly') || (e.Replacee == 'ArtiSpeedBoots') ) e.Replacement = 'GravitySuppressor'; else if ( (e.Replacee == 'GreenArmor') || (e.Replacee == 'SilverShield') || (e.Replacee == 'MeshArmor') ) e.Replacement = 'BlastSuitItem'; else if ( (e.Replacee == 'BlueArmor') || (e.Replacee == 'FalconShield') || (e.Replacee == 'EnchantedShield') ) e.Replacement = 'WarArmorItem'; } diff --git a/zscript/swwm_health.zsc b/zscript/swwm_health.zsc index 8409b33b4..5150292f1 100644 --- a/zscript/swwm_health.zsc +++ b/zscript/swwm_health.zsc @@ -90,8 +90,8 @@ Class HealthNuggetItem : SWWMHealth Stamina 1200; Inventory.Icon "graphics/HUD/Icons/I_HealthNugget.png"; Inventory.PickupMessage "$T_NUGGETH"; - Inventory.MaxAmount int.max; - Inventory.InterHubAmount int.max; + Inventory.MaxAmount 40; + Inventory.InterHubAmount 40; SWWMHealth.GiveHealth "HealthNugget"; +INVENTORY.ALWAYSPICKUP; +COUNTITEM; diff --git a/zscript/swwm_hud.zsc b/zscript/swwm_hud.zsc index acf87c365..2bad73fa1 100644 --- a/zscript/swwm_hud.zsc +++ b/zscript/swwm_hud.zsc @@ -222,7 +222,7 @@ Class SWWMStatusBar : BaseStatusBar private void DrawInventory() { // active items (armor / powerups) - double xx = margin; + double xx = margin+2; double yy = ss.y-(margin+60); if ( CPlayer.mo.InvSel && !isInventoryBarVisible() ) yy -= 34; bool drewarmor = false; diff --git a/zscript/swwm_inventory.zsc b/zscript/swwm_inventory.zsc index cc9886882..ba6ce5330 100644 --- a/zscript/swwm_inventory.zsc +++ b/zscript/swwm_inventory.zsc @@ -457,7 +457,7 @@ Class SWWMWeapon : Weapon abstract } else flashstate = weap.FindState(flashlabel); player.SetPSprite(PSP_FLASH,flashstate); - A_OverlayFlags(PSP_FLASH,PSPF_RENDERSTYLE,true); + A_OverlayFlags(PSP_FLASH,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true); A_OverlayRenderStyle(PSP_FLASH,STYLE_Add); } // tells the SWWM HUD that this weapon has ammo available diff --git a/zscript/swwm_menu.zsc b/zscript/swwm_menu.zsc index b6e334c71..53e451b46 100644 --- a/zscript/swwm_menu.zsc +++ b/zscript/swwm_menu.zsc @@ -10,7 +10,8 @@ Class SWWMKnowledgeBaseMenu : GenericMenu TAB_LIBRARY, TAB_STORE, TAB_TRADING, - TAB_CHAT + TAB_CHAT, + TAB_SECRET }; TextureID MainWindow, TabSeparator, WindowSeparator, WindowSeparatorH, @@ -45,6 +46,8 @@ Class SWWMKnowledgeBaseMenu : GenericMenu int lastuseamt; int checkuse; int checkdrop; + // seeeeecret + int kcode; override void Init( Menu parent ) { @@ -75,6 +78,38 @@ Class SWWMKnowledgeBaseMenu : GenericMenu override bool MenuEvent( int mkey, bool fromcontroller ) { + switch ( kcode ) + { + case 0: + case 1: + if ( mkey == MKEY_UP ) kcode++; + else kcode = 0; + break; + case 2: + case 3: + if ( mkey == MKEY_DOWN ) kcode++; + else kcode = 0; + break; + case 4: + case 6: + if ( mkey == MKEY_LEFT ) kcode++; + else kcode = 0; + break; + case 5: + case 7: + if ( mkey == MKEY_RIGHT ) kcode++; + else kcode = 0; + break; + case 10: + if ( mkey == MKEY_ENTER ) + { + MenuSound("misc/secret"); + curtab = TAB_SECRET; + } + default: + kcode = 0; + break; + } switch ( mkey ) { case MKEY_BACK: @@ -270,6 +305,21 @@ Class SWWMKnowledgeBaseMenu : GenericMenu switch ( ev.type ) { case UIEvent.Type_KeyDown: + switch ( kcode ) + { + case 8: + if ( ev.keystring ~== "B" ) + kcode++; + else kcode = 0; + break; + case 9: + if ( ev.keystring ~== "A" ) kcode++; + else kcode = 0; + break; + default: + kcode = 0; + break; + } if( (ikey[0] && (ev.keystring == mkey[0])) || (ikey[1] && (ev.keystring == mkey[1])) ) { MenuSound("menu/democlose"); @@ -301,9 +351,11 @@ Class SWWMKnowledgeBaseMenu : GenericMenu static const string tabnames[] = { "$SWWM_MISSTAB", "$SWWM_STATTAB", "$SWWM_INVTAB", "$SWWM_KEYTAB", - "$SWWM_KBASETAB", "$SWWM_STORETAB", "$SWWM_TRADETAB", "$SWWM_CHATTAB" + "$SWWM_KBASETAB", "$SWWM_STORETAB", "$SWWM_TRADETAB", "$SWWM_CHATTAB", + "$SWWM_SECRETTAB" }; - for ( int i=0; i<8; i++ ) + int mx = (curtab==TAB_SECRET)?9:8; + for ( int i=0; i