From 06f79726a8e5d29b60b53e9e2f599d33483fa83c Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Mon, 22 Feb 2021 17:01:58 +0100 Subject: [PATCH] Add item sparkles. Tweak Omnisight pickup behavior (shared in mp). --- cvarinfo.txt | 1 + gldefs.ammo | 4 ++-- gldefs.pickups | 12 ++++++++++++ language.def_base | 3 ++- language.def_menu | 2 ++ language.es_base | 3 ++- language.es_menu | 2 ++ language.version | 4 ++-- menudef.txt | 1 + zscript/swwm_handler.zsc | 1 + zscript/swwm_player.zsc | 31 +++++++++++++++++++++++++++++++ zscript/swwm_powerup.zsc | 24 +++++++++++++++++++++--- zscript/swwm_utility.zsc | 5 ++++- 13 files changed, 83 insertions(+), 10 deletions(-) diff --git a/cvarinfo.txt b/cvarinfo.txt index 4e8ad7fe2..6e89bcbb5 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -102,6 +102,7 @@ nosave int swwm_numcolor_ap = 3; // font color for armor numbers (default: gree server int swwm_drlaskill = 3; // [DRLA Monsters] skill setting for monster spawns nosave bool swwm_showminimap = true; // show a minimap below the score counter nosave noarchive float swwm_minimapzoom = 1; // zoom level of minimap +nosave bool swwm_itemsparkles = false; // visual aid for low visibility items server noarchive bool swwm_iseriouslywanttoplaythiswithbd = false; // self-explanatory diff --git a/gldefs.ammo b/gldefs.ammo index 0b8b6e947..101c5daee 100644 --- a/gldefs.ammo +++ b/gldefs.ammo @@ -95,8 +95,8 @@ Object GoldShell PointLight SPARKUNITLIGHT { - Color 0.5 0.3 0.6 - Size 8 + Color 0.25 0.15 0.3 + Size 20 Offset 0 16 0 Attenuate 1 } diff --git a/gldefs.pickups b/gldefs.pickups index 7e514c87c..e765b9350 100644 --- a/gldefs.pickups +++ b/gldefs.pickups @@ -172,6 +172,18 @@ Object Ragekit Frame "XZW1" { light "RAGELIGHT" } } +PointLight OMNISIGHTLIGHT +{ + Color 0.3 0.0 0.0 + Size 20 + Offset 0 16 0 + Attenuate 1 +} +Object Omnisight +{ + Frame "XZW1" { light "OMNISIGHTLIGHT" } +} + FlickerLight2 LAMPLIGHT { Color 0.6 1.0 0.7 diff --git a/language.def_base b/language.def_base index 680c2cc64..b30b0395f 100644 --- a/language.def_base +++ b/language.def_base @@ -560,6 +560,7 @@ OB_ASTRAL = "%o got scorched by a gray ball friend."; D_BLASTSUIT = "The Blast Suit broke down."; D_GHOSTARTI = "The Ghost Artifact ran out of energy."; D_GRAVITYS = "The Gravity Suppressor is out of power."; +D_OMNISHARE = "Omnisight data link received from %s."; D_LAMP = "The Lamp ran out of oil."; D_INVINCIBALL = "You are no longer fucking invincible."; D_RAGEKIT = "The Ragekit has ragequit."; @@ -586,7 +587,7 @@ SWWM_TITLEMODBY = "a mod by \cxMarisa Kirisame"; SWWM_TITLESCROLL = "SWWM GZ ~ Cute Robutt Whomst Love To Explode Demons\n" "A wondrous GZDoom gameplay mod by Marisa Kirisame of UnSX Team\n" "Lovingly designed 3D models with hand-painted 256-color dithered textures\n" -"Nearly 40,000 lines of ZScript, and still counting (god help me)\n" +"Nearly 50k lines of ZScript, and still counting (god help me)\n" "The deepest lore this side of the Doom Modiverse\n" "And much much more!\n" "Greetz to Mub, Ribbed, Slemg, Bunr, Kegbine, Term-kun, Hype64, Bartendy, Skelly, Mr. BIG SHOT WildWeasel, Endy, Mima-sama, Sinkie, BillowPlaster, Disgusting Dog Water, Dangle Logo, Lämp Paipu, Leek Spah, MarTREE, Dusty Demon Bread, Roasted Rock, Ed the Netcode Boy, Thirst Cactus, JimJam, Cappy Jay, A Nom, Missy Fits, Minor Cookie, Squid Kid, YukiCute, MafSulk, FineRaff25, NetroRutcase, ShudTheFugUpRyan, Kobl, Cacous Seriodemon, Zomb, Man of Chins, Bun Pun, Zikeous Shadestructor, Blimyot, Baja Blast Tittums, DrySpy.py, Typo Gem, Wantopus, Morf, Daedalus, Popato, SpengRob, Sgt. Shellpost, Loud M, Snk, Donut, C.Kid, Emit Birb, You Go To Sleep, Rach, Le No Chicken, Murasa, Smart Cactus Dude, Phantomboobs, Sanae Kochiya, Gardeboy, Cat, HK417, Smol Koa, Joe Mama, Jahn, Guta, Glue, Atan, Schweet Prints, Angury Teeth Practitioner, Sell Her, MiSiFu, Portuguese Sausage, Scoob Stub, Actually Jabba, Very Honest Cat, Chiaki's Tit Mole, Homie, Snacks, Tubz, Toof, Teef, Frisp, Sanyanya, Trashkat, Succ 'n Spicy, Melissa Follower When, Shokku, Scummyboi, Kat Gravity Rush, John Romero, John Carmack, Tim Allen, Tim Sweeney and last but not least my beloved pet dragon\n" diff --git a/language.def_menu b/language.def_menu index be6f40865..3d64bc565 100644 --- a/language.def_menu +++ b/language.def_menu @@ -208,6 +208,7 @@ SWWM_DRLASKILL_TECHNOPHOBIA = "Technophobia"; SWWM_DRLASKILL_ARMAGEDDON = "Armageddon"; SWWM_DRLASKILL_ADAPTIVE = "Adaptive"; SWWM_SHOWMINIMAP = "Show Minimap"; +SWWM_ITEMSPARKLES = "Item Sparkles"; TOOLTIP_SWWM_VOICETYPE = "Sets the voice pack for the player."; TOOLTIP_SWWM_MUTEVOICE = "Control what gets muted, if you'd rather have a more silent protagonist."; TOOLTIP_SWWM_FLASHSTRENGTH = "Screen flashes usually happen when firing some weapons, you can lower this if these effects are harmful for you."; @@ -299,6 +300,7 @@ TOOLTIP_SWWM_NUMCOLOR_HP = "Select the color for health numbers."; TOOLTIP_SWWM_NUMCOLOR_AP = "Select the color for armor numbers."; TOOLTIP_SWWM_DRLASKILL = "[DRLA Monsters] Sets the skill level for enemy spawns."; TOOLTIP_SWWM_SHOWMINIMAP = "Displays a minimap under the score counter."; +TOOLTIP_SWWM_ITEMSPARKLES = "Nearby items will have particles around them, as a visual aid."; // knowledge base SWWM_COMINGSOON = "(coming soon)"; SWWM_MISSTAB = "Mission"; diff --git a/language.es_base b/language.es_base index e444e863b..587b90f07 100644 --- a/language.es_base +++ b/language.es_base @@ -496,6 +496,7 @@ OB_ASTRAL = "%o fue escaldad@[ao_esp] por una amigable bola gris."; D_BLASTSUIT = "El Chaleco Antiexplosivos se ha roto."; D_GHOSTARTI = "El Artefacto Fantasma se ha agotado."; D_GRAVITYS = "El Supresor de Gravedad se ha agotado."; +D_OMNISHARE = "Enlace de datos de Omnivisión recibido de %s."; D_LAMP = "La Lámpara se ha quedado sin aceite."; D_INVINCIBALL = "Ya no eres jodidamente invencible."; D_RAGEKIT = "El Ragekit ha hecho ragequit."; @@ -520,7 +521,7 @@ SWWM_TITLEMODBY = "un mod de \cxMarisa Kirisame"; SWWM_TITLESCROLL = "SWWM GZ ~ Cute Robutt Whomst Love To Explode Demons\n" "Un maravilleante mod de gameplay para GZDoom por Marisa Kirisame de UnSX Team\n" "Modelos 3D diseñados con cariño con texturas pintadas a mano de 256 colores con dithering\n" -"Casi 40.000 líneas de ZScript, y aun contando (dios me ayude)\n" +"Casi 50 mil líneas de ZScript, y aun contando (dios me ayude)\n" "El lore más profundo a este lado del Modiverso de Doom\n" "¡Y mucho mucho más!\nSaludos a Mub, Ribbed, Slemg, Bunr, Kegbine, Term-kun, Hype64, Bartendy, Skelly, Mr. BIG SHOT WildWeasel, Endy, Mima-sama, Sinkie, BillowPlaster, Disgusting Dog Water, Dangle Logo, Lämp Paipu, Leek Spah, MarTREE, Dusty Demon Bread, Roasted Rock, Ed the Netcode Boy, Thirst Cactus, JimJam, Cappy Jay, A Nom, Missy Fits, Minor Cookie, Squid Kid, YukiCute, MafSulk, FineRaff25, NetroRutcase, ShudTheFugUpRyan, Kobl, Cacous Seriodemon, Zomb, Man of Chins, Bun Pun, Zikeous Shadestructor, Blimyot, Baja Blast Tittums, DrySpy.py, Typo Gem, Wantopus, Morf, Daedalus, Popato, SpengRob, Sgt. Shellpost, Loud M, Snk, Donut, C.Kid, Emit Birb, You Go To Sleep, Rach, Le No Chicken, Murasa, Smart Cactus Dude, Phantomboobs, Sanae Kochiya, Gardeboy, Cat, HK417, Smol Koa, Joe Mama, Jahn, Guta, Glue, Atan, Schweet Prints, Angury Teeth Practitioner, Sell Her, MiSiFu, Portuguese Sausage, Scoob Stub, Actually Jabba, Very Honest Cat, Chiaki's Tit Mole, Homie, Snacks, Tubz, Toof, Teef, Frisp, Sanyanya, Trashkat, Succ 'n Spicy, Melissa Follower When, Shokku, Scummyboi, Kat Gravity Rush, John Romero, John Carmack, Tim Allen, Tim Sweeney y por último pero no menos importante mi querido dragón mascota\n" "He intentado estrujar todos los nombres que he podido ahí, que haya podido recordar, por lo menos, así que si no estás ahí y quieres entrar, solo pídelo\n" diff --git a/language.es_menu b/language.es_menu index 9a90071b9..d94c647ef 100644 --- a/language.es_menu +++ b/language.es_menu @@ -205,6 +205,7 @@ SWWM_DRLASKILL_TECHNOPHOBIA = "Tecnofobia"; SWWM_DRLASKILL_ARMAGEDDON = "Armagedón"; SWWM_DRLASKILL_ADAPTIVE = "Adaptado"; SWWM_SHOWMINIMAP = "Mostrar Minimapa"; +SWWM_ITEMSPARKLES = "Partículas de Ítem"; TOOLTIP_SWWM_VOICETYPE = "Selecciona el pack de voz para el jugador."; TOOLTIP_SWWM_MUTEVOICE = "Controla lo que se mutea, si prefieres tener un protagonista más silencioso."; TOOLTIP_SWWM_FLASHSTRENGTH = "Los destellos en pantalla suelen ocurrir al disparar algunas armas, puedes reducirlo si este tipo de efectos te causan malestar."; @@ -296,6 +297,7 @@ TOOLTIP_SWWM_NUMCOLOR_HP = "Selecciona el color para los números de salud."; TOOLTIP_SWWM_NUMCOLOR_AP = "Selecciona el color para los números de armadura."; TOOLTIP_SWWM_DRLASKILL = "[DRLA Monsters] Elige el nivel de dificultad para spawns de enemigos."; TOOLTIP_SWWM_SHOWMINIMAP = "Muestra un minimapa bajo el contador de puntuación."; +TOOLTIP_SWWM_ITEMSPARKLES = "Los ítems cercanos tendrán partículas alrededor, para mejor visibilidad."; // knowledge base SWWM_COMINGSOON = "(próximamente)"; SWWM_MISSTAB = "Misión"; diff --git a/language.version b/language.version index d157d06b8..00e727a21 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r299 \cu(Mon 22 Feb 14:36:42 CET 2021)\c-"; -SWWM_SHORTVER="\cw0.9.11b-pre r299 \cu(2021-02-22 14:36:42)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r300 \cu(Mon 22 Feb 17:01:58 CET 2021)\c-"; +SWWM_SHORTVER="\cw0.9.11b-pre r300 \cu(2021-02-22 17:01:58)\c-"; diff --git a/menudef.txt b/menudef.txt index aab15f440..aff99a8b0 100644 --- a/menudef.txt +++ b/menudef.txt @@ -133,6 +133,7 @@ OptionMenu "SWWMOptionMenu" StaticText "$SWWM_ETITLE", "Blue" Option "$SWWM_SHADOWS", "swwm_shadows", "SWWMShadows" ScaleSlider "$SWWM_SHADOWDIST", "swwm_shadowdist", -1, 4000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED" + Option "$SWWM_ITEMSPARKLES", "swwm_itemsparkles", "YesNo" Option "$SWWM_BLOOD", "swwm_blood", "YesNo" ScaleSlider "$SWWM_MAXBLOOD", "swwm_maxblood", -1, 1000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED" ScaleSlider "$SWWM_MAXGIBS", "swwm_maxgibs", -1, 1000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED" diff --git a/zscript/swwm_handler.zsc b/zscript/swwm_handler.zsc index 783ac41cb..48720e4d0 100644 --- a/zscript/swwm_handler.zsc +++ b/zscript/swwm_handler.zsc @@ -3293,6 +3293,7 @@ Class SWWMHandler : EventHandler Console.Printf("Bundle: %d",Random2[Bundle]()); Console.Printf("Candy: %d",Random2[Candy]()); Console.Printf("Chancebox: %d",Random2[Chancebox]()); + Console.Printf("ClientSparkles: %d",Random2[ClientSparkles]()); Console.Printf("Corrode: %d",Random2[Corrode]()); Console.Printf("DemoLines: %d",Random2[DemoLines]()); Console.Printf("DoBlast: %d",Random2[DoBlast]()); diff --git a/zscript/swwm_player.zsc b/zscript/swwm_player.zsc index 1ff767923..918eeb9b9 100644 --- a/zscript/swwm_player.zsc +++ b/zscript/swwm_player.zsc @@ -675,6 +675,36 @@ Class Demolitionist : PlayerPawn SWWMGesture.SetGesture(self,GS_EmptyMelee); } } + void NearbyItemSparkles() + { + if ( (player != players[consoleplayer]) || !swwm_itemsparkles ) return; + let bt = BlockThingsIterator.Create(self,500); + while ( bt.Next() ) + { + let t = bt.Thing; + if ( !t || !(t is 'Inventory') || !t.bSPECIAL || t.bINVISIBLE || Inventory(t).Owner || !SWWMUtility.SphereIntersect(t,pos,500) ) + continue; + Vector3 bpos = (0,0,16); + if ( t.bFLOATBOB ) bpos.z += BobSin(t.FloatBobPhase)*t.FloatBobStrength; + double alph = clamp((500.-Distance3D(t))/500.,0.,1.); + Color pcol = "Gold"; + if ( Inventory(t).PickupFlash is 'SWWMPickupFlash' ) + { + let def = GetDefaultByType(Inventory(t).PickupFlash); + pcol = Color(def.Args[1]*85,def.Args[2]*85,def.Args[3]*85); + } + int numpt = clamp(int(max(t.radius,t.height-16)/4),1,8); + for ( int i=0; i