diff --git a/Achievements.md b/Achievements.md index da8d43c67..779b79ce9 100644 --- a/Achievements.md +++ b/Achievements.md @@ -22,6 +22,7 @@ - **Hydrogenated**: Consume a total of 1000L of fuel. - **I Am Very Smart**: Load SWWM GZ and Brutal Doom together. - **Icarus Dimes**: Blow yourself up with your own explosives. +- **It's Been Ten Years**: Use a cheat code from SWWM Platinum. - **Just A Replica**: Find something the Ynykron can't destroy. - **Knock Knock**: Kill 50 enemies through walls with the Silver Bullet. - **Layers Of White**: Summon the White Lady. diff --git a/language.version b/language.version index 3734d7378..72ba74be0 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r576 \cu(Sat 24 Oct 15:45:53 CEST 2020)"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r576 \cu(Sat 24 Oct 18:54:31 CEST 2020)"; diff --git a/sndinfo.txt b/sndinfo.txt index 65638fd49..99182a598 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -865,6 +865,9 @@ misc/chat2 sounds/menu/chatsnd.ogg Chat sounds/menu/chatsnd.ogg // hexen what the fuck misc/sundowner sounds/SUNDOWNER.ogg misc/emone sounds/EMONE.ogg +misc/trombone sounds/SADTROMBONE.ogg +misc/lamborghini sounds/GNAWLIDGE.ogg +misc/nocheat sounds/DSNOPE.ogg misc/drumroll sounds/DRUMROLL.ogg misc/tada sounds/TADA.ogg misc/heart sounds/KOKORO.ogg @@ -874,11 +877,11 @@ misc/gibber3 sounds/general/Gib3.ogg misc/gibber4 sounds/general/Gib4.ogg misc/gibber5 sounds/general/Gib5.ogg $random misc/gibber { misc/gibber1 misc/gibber2 misc/gibber3 misc/gibber4 misc/gibber5 } -misc/gibhit1 sounds/general/flesh1.ogg -misc/gibhit2 sounds/general/flesh2.ogg -misc/gibhit3 sounds/general/flesh3.ogg -misc/gibhit4 sounds/general/flesh4.ogg -misc/gibhit5 sounds/general/flesh5.ogg +misc/gibhit1 sounds/general/gibP1.ogg +misc/gibhit2 sounds/general/gibP3.ogg +misc/gibhit3 sounds/general/gibP4.ogg +misc/gibhit4 sounds/general/gibP5.ogg +misc/gibhit5 sounds/general/gibP6.ogg $random misc/gibhit { misc/gibhit1 misc/gibhit2 misc/gibhit3 misc/gibhit4 misc/gibhit5 } misc/blooddrop sounds/general/bloddrop.ogg misc/bodythump sounds/general/thump.ogg diff --git a/sounds/DSNOPE.ogg b/sounds/DSNOPE.ogg new file mode 100644 index 000000000..78d9f62fc Binary files /dev/null and b/sounds/DSNOPE.ogg differ diff --git a/sounds/GNAWLIDGE.ogg b/sounds/GNAWLIDGE.ogg new file mode 100644 index 000000000..2ffc500ca Binary files /dev/null and b/sounds/GNAWLIDGE.ogg differ diff --git a/sounds/SADTROMBONE.ogg b/sounds/SADTROMBONE.ogg new file mode 100644 index 000000000..1eea4b472 Binary files /dev/null and b/sounds/SADTROMBONE.ogg differ diff --git a/sounds/general/flesh1.ogg b/sounds/general/flesh1.ogg deleted file mode 100644 index 5466214ae..000000000 Binary files a/sounds/general/flesh1.ogg and /dev/null differ diff --git a/sounds/general/flesh2.ogg b/sounds/general/flesh2.ogg deleted file mode 100644 index 48c3852f0..000000000 Binary files a/sounds/general/flesh2.ogg and /dev/null differ diff --git a/sounds/general/flesh3.ogg b/sounds/general/flesh3.ogg deleted file mode 100644 index 39a6a1be4..000000000 Binary files a/sounds/general/flesh3.ogg and /dev/null differ diff --git a/sounds/general/flesh4.ogg b/sounds/general/flesh4.ogg deleted file mode 100644 index d31c5061c..000000000 Binary files a/sounds/general/flesh4.ogg and /dev/null differ diff --git a/sounds/general/flesh5.ogg b/sounds/general/flesh5.ogg deleted file mode 100644 index 2cf4a85a6..000000000 Binary files a/sounds/general/flesh5.ogg and /dev/null differ diff --git a/sounds/general/gibP1.ogg b/sounds/general/gibP1.ogg new file mode 100644 index 000000000..73af865b5 Binary files /dev/null and b/sounds/general/gibP1.ogg differ diff --git a/sounds/general/gibP3.ogg b/sounds/general/gibP3.ogg new file mode 100644 index 000000000..8dec54cec Binary files /dev/null and b/sounds/general/gibP3.ogg differ diff --git a/sounds/general/gibP4.ogg b/sounds/general/gibP4.ogg new file mode 100644 index 000000000..55a046d39 Binary files /dev/null and b/sounds/general/gibP4.ogg differ diff --git a/sounds/general/gibP5.ogg b/sounds/general/gibP5.ogg new file mode 100644 index 000000000..69cdf3ad7 Binary files /dev/null and b/sounds/general/gibP5.ogg differ diff --git a/sounds/general/gibP6.ogg b/sounds/general/gibP6.ogg new file mode 100644 index 000000000..470c6bc5a Binary files /dev/null and b/sounds/general/gibP6.ogg differ diff --git a/zscript/swwm_handler.zsc b/zscript/swwm_handler.zsc index 381d686c6..c2399c3db 100644 --- a/zscript/swwm_handler.zsc +++ b/zscript/swwm_handler.zsc @@ -139,8 +139,9 @@ Class SWWMHandler : EventHandler int multilevel[MAXPLAYERS]; int lastitemcount[MAXPLAYERS]; bool allkills, allitems, allsecrets; - // for money cheat - transient ui int kcode, lcode; + // for custom cheats + transient ui int kcode; + transient ui String kstr; // heal/armor flashes need to be handled here so they don't stack transient int hflash[MAXPLAYERS], aflash[MAXPLAYERS]; @@ -1228,36 +1229,55 @@ Class SWWMHandler : EventHandler { if ( e.Type == InputEvent.TYPE_KeyDown ) { - // need a reliable way to check for cheats - //if ( sv_cheats ) + // cheat code handling + String cht[] = { - static const int lods[] = {38,24,32,31,24,33,18,50,24,49,18}; - // what's that spell? - // loadsamoney! ... probably - if ( e.KeyScan == lods[kcode] ) - { - kcode++; - if ( kcode >= 11 ) - { - SendNetworkEvent("swwmmoneycheat",consoleplayer); - kcode = 0; - } - } - else kcode = 0; - static const int deep[] = {32,18,18,25,38,24,19,18}; - // the deepest lore - if ( e.KeyScan == deep[lcode] ) - { - lcode++; - if ( lcode >= 8 ) - { - SendNetworkEvent("swwmlorecheat",consoleplayer); - lcode = 0; - } - } - else lcode = 0; + "mklodsofemone", "mkdeeplore", + // SWWM Platinum cheats + "mkimstuck", "mkarmojumbo", "mkdangimhealthy", + "mkwarriorofzaemonath", "mkpowerparp", "mkcannotseemyhands", + "mkreflectonme", "mkgunzmeneeds", "mkbloodrainsfromheaven", + "mknotwannaboom", "mkverywrappyoatmeal", "mkflaggerybingo", + "mkheadsball", "mksmarties", "mknocilla", + "mkmarioisaweenie", "mkpunish", "mkboingball", + "mkgassy", "mkiamsuperman", "mktouchstone" + }; + String cmd[] = + { + "swwmmoneycheat", "swwmlorecheat", + // SWWM Platinum cheats + "swwmsafecheat", "swwmweaponcheat", "swwmhealcheat", + "swwmynykroncheat", "swwmgravcheat", "swwminvischeat", + "swwmbarriercheat", "swwmammocheat", "swwmbloodcheat", + "swwmexplocheat", "swwmallcheat", "swwmflagcheat", + "swwmballcheat", "swwmsmartcheat", "swwmnutcheat", + "swwmweeniecheat", "swwmpunishcheat", "swwmball2cheat", + "swwmfartcheat", "swwmsupercheat", "swwmstonecheat" + }; + bool matchany = false; + kstr.AppendCharacter(e.KeyChar); + for ( int i=0; i 2 ) return true; // eat keypresses from this point + } + // F + if ( e.KeyChar == 0x66 ) { let demo = Demolitionist(players[consoleplayer].mo); let gone = PlayerGone(players[consoleplayer].mo); @@ -1273,8 +1293,6 @@ Class SWWMHandler : EventHandler } } } - if ( (kcode > 2) || (lcode > 2) ) - return true; // eat keypresses from this point } return false; } @@ -1761,29 +1779,6 @@ Class SWWMHandler : EventHandler if ( dist < 2000 ) Console.Printf("\cx%s\cx: %s\c-",players[e.Args[0]].GetUserName(),StringTable.Localize(e.Name.Mid(19))); } - else if ( e.Name ~== "swwmmoneycheat" ) - { - if ( consoleplayer == e.Args[0] ) - { - Console.Printf("\cfLOADSAMONEY!\c-"); - S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); - S_StartSound("misc/emone",CHAN_VOICE,CHANF_UI); - } - SWWMCredits.Give(players[e.Args[0]],1000000000); - SWWMScoreObj.Spawn(1000000000,players[e.Args[0]].mo.Vec3Offset(0,0,players[e.Args[0]].mo.Height/2)); - } - else if ( e.Name ~== "swwmlorecheat" ) - { - // look up all lore files - for ( int l=0; l)(AllActorClasses[i]); + if ( !w || (w == 'SWWMWeapon') ) continue; + let def = GetDefaultByType(w); + if ( def.bCHEATNOTWEAPON ) continue; + let ow = players[e.Args[0]].mo.FindInventory(w); + if ( ow && (ow.Amount >= ow.MaxAmount) ) continue; + if ( ow ) ow.Amount = ow.MaxAmount; + else players[e.Args[0]].mo.GiveInventory(w,def.MaxAmount); + } + } + else if ( e.Name ~== "swwmhealcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyRemember to stay fit.\c-"); + S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); + S_StartSound("misc/health_pkup",CHAN_VOICE,CHANF_UI); + } + players[e.Args[0]].health = players[e.Args[0]].mo.health = 1000; + } + else if ( e.Name ~== "swwmynykroncheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyYou're still crazy.\c-"); + S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); + S_StartSound("misc/w_pkup",CHAN_VOICE,CHANF_UI); + } + players[e.Args[0]].mo.GiveInventory("Ynykron",1); + } + else if ( e.Name ~== "swwmgravcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyGot something floatier.\c-"); + S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); + S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); + } + let g = GravityPower(players[e.Args[0]].mo.FindInventory("GravityPower")); + if ( g ) g.EffectTics += g.default.EffectTics; + else players[e.Args[0]].mo.GiveInventory("GravityPower",1); + } + else if ( e.Name ~== "swwminvischeat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyProbably because you're invisible.\c-"); + S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); + S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); + } + let g = GhostPower(players[e.Args[0]].mo.FindInventory("GhostPower")); + if ( g ) g.EffectTics += g.default.EffectTics; + else players[e.Args[0]].mo.GiveInventory("GhostPower",1); + } + else if ( e.Name ~== "swwmbarriercheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cySafe from those pesky elements.\c-"); + S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); + S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); + } + let b = BarrierPower(players[e.Args[0]].mo.FindInventory("BarrierPower")); + if ( b ) b.EffectTics += b.default.EffectTics; + else players[e.Args[0]].mo.GiveInventory("BarrierPower",1); + } + else if ( e.Name ~== "swwmammocheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyDon't squander it.\c-"); + S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); + S_StartSound("misc/ammo_pkup",CHAN_VOICE,CHANF_UI); + } + players[e.Args[0]].mo.GiveInventory("HammerspaceEmbiggener",16,true); + for ( Inventory i=players[e.Args[0]].mo.inv; i; i=i.inv ) + { + if ( !(i is 'Ammo') ) continue; + i.Amount = i.MaxAmount; + } + } + else if ( e.Name ~== "swwmbloodcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyEdgy...\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmexplocheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyThat cheat's not needed anymore.\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmallcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyStill as wrappy as it's always been.\c-"); + S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); + S_StartSound("fabricator/use",CHAN_VOICE,CHANF_UI); + } + players[e.Args[0]].mo.CheatGive("all",0); + } + else if ( e.Name ~== "swwmflagcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyThere are no flags here.\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmballcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cy\"Balls on your head\"? What was I even thinking...\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmsmartcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cySkittles are better anyway.\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmnutcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyI'm way past that, it was bad for my health.\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmweeniecheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyAlways has been.\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmpunishcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyThis is a bulli free zone.\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmball2cheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cy\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmfartcheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyI'd rather not reimplement that one.\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmsupercheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyNo, you're the Demolitionist.\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } + else if ( e.Name ~== "swwmstonecheat" ) + { + if ( SWWMUtility.CheatsDisabled(e.Args[0]) ) + return; + if ( consoleplayer == e.Args[0] ) + { + Console.Printf("\cyThe pinnacle of... wait, I misread that.\c-"); + S_StartSound("misc/nocheat",CHAN_ITEM,CHANF_UI); + } + } } // stuff for hud diff --git a/zscript/swwm_utility.zsc b/zscript/swwm_utility.zsc index 7e9969619..8ffae810e 100644 --- a/zscript/swwm_utility.zsc +++ b/zscript/swwm_utility.zsc @@ -836,6 +836,20 @@ Class SWWMUtility if ( (maxdist > 0.) && (sc.z < maxdist) ) return false; return true; } + + static clearscope bool CheatsDisabled( int p = -1 ) + { + if ( cl_blockcheats || ((G_SkillPropertyInt(SKILLP_DisableCheats) || netgame || deathmatch) && !sv_cheats) ) + { + if ( (p != -1) && (p == consoleplayer) ) + { + Console.Printf("\cfSORRY NOTHING\c-"); + S_StartSound("misc/trombone",CHAN_VOICE,CHANF_UI); + } + return true; + } + return false; + } } Class RadiusDebugSphere : Actor