From 9035220433ab2013d9d82ecb175d92a9c9f2d381 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Sat, 3 Jul 2021 13:18:16 +0200 Subject: [PATCH] Add joke option to turn off the engine. --- language.def_menu | 2 ++ language.es_menu | 2 ++ language.version | 4 ++-- menudef.txt | 1 + zscript/menu/swwm_menus.zsc | 45 +++++++++++++++++++++++++++++++++++++ 5 files changed, 52 insertions(+), 2 deletions(-) diff --git a/language.def_menu b/language.def_menu index 49b28cebe..c91dc012c 100644 --- a/language.def_menu +++ b/language.def_menu @@ -193,6 +193,7 @@ SWWM_MELEEPICKUP = "Allow Item Pickup Through Melee"; SWWM_BUTTSFX = "Clapping Buttcheeks"; SWWM_ONDEMANDAMMO = "On Demand Ammo Placement"; SWWM_BUMP = "FOV Bump Strength"; +SWWM_ENGINE = "Engine"; SWWM_MMTITLE = "Minimap Settings"; SWWM_MM_ENABLE = "Show Minimap"; SWWM_MM_ROTATE = "Rotate Minimap"; @@ -334,6 +335,7 @@ TOOLTIP_SWWM_MELEEPICKUP = "Allows picking up items though melee attacks. Do not TOOLTIP_SWWM_BUTTSFX = "The Demolitionist's buttcheeks will VERY AUDIBLY clap upon executing a successful buttslam."; TOOLTIP_SWWM_ONDEMANDAMMO = "Only ammo for weapons that are currently available (either in the player's inventory or in the map) will spawn in the map. May cause long load times on large maps."; TOOLTIP_SWWM_BUMPSTRENGTH = "Controls how strong the bumping of the FOV is from weapon recoil and other actions."; +TOOLTIP_SWWM_ENGINE = "Don't touch this."; TOOLTIP_SWWM_MM_ENABLE = "Displays a minimap under the score counter."; TOOLTIP_SWWM_MM_ROTATE = "Rotates the minimap view."; TOOLTIP_SWWM_MM_GRID = "Shows a 128x128 grid on the minimap."; diff --git a/language.es_menu b/language.es_menu index 765bbfd2b..e720074b8 100644 --- a/language.es_menu +++ b/language.es_menu @@ -192,6 +192,7 @@ SWWM_MELEEPICKUP = "Permitir Recoger Ítems con Melé"; SWWM_BUTTSFX = "Azote de Nalgas"; SWWM_ONDEMANDAMMO = "Colocar Munición por Demanda"; SWWM_BUMP = "Intensidad de Sacudida de FOV"; +SWWM_ENGINE = "Motor"; SWWM_MMTITLE = "Opciones de Minimapa"; SWWM_MM_ENABLE = "Mostrar Minimapa"; SWWM_MM_ROTATE = "Rotar Minimapa"; @@ -333,6 +334,7 @@ TOOLTIP_SWWM_MELEEPICKUP = "Permite recoger ítems por medio de ataques a melé. TOOLTIP_SWWM_BUTTSFX = "Las nalgas de la Demolicionista emitiran un azote MUY SONORO al ejecutar exitosamente un golpe de culo."; TOOLTIP_SWWM_ONDEMANDAMMO = "Solo coloca en el mapa munición para armas que estén actualmente disponibles (tanto en el inventario del jugador como en el mapa). Puede causar tiempos de carga largos en mapas grandes."; TOOLTIP_SWWM_BUMPSTRENGTH = "Controla lo intensa que es la sacudida del FOV por el retroceso de armas y otras acciones."; +TOOLTIP_SWWM_ENGINE = "No toques esto."; TOOLTIP_SWWM_MM_ENABLE = "Muestra un minimapa bajo el contador de puntuación."; TOOLTIP_SWWM_MM_ROTATE = "Gira la vista del minimapa."; TOOLTIP_SWWM_MM_GRID = "Muestra una cuadrícula de 128x128 en el minimapa."; diff --git a/language.version b/language.version index c26619801..aa86dba6a 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r570 \cu(Thu 1 Jul 17:49:37 CEST 2021)\c-"; -SWWM_SHORTVER="\cw0.9.11b-pre r570 \cu(2021-07-01 17:49:37)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r571 \cu(Sat 3 Jul 13:18:16 CEST 2021)\c-"; +SWWM_SHORTVER="\cw0.9.11b-pre r571 \cu(2021-07-03 13:18:16)\c-"; diff --git a/menudef.txt b/menudef.txt index 86d1a12b5..d9cbaa1f8 100644 --- a/menudef.txt +++ b/menudef.txt @@ -149,6 +149,7 @@ OptionMenu "SWWMOptionMenu" Option "$SWWM_SUPERFUEL", "swwm_superfuel", "YesNo" Option "$SWWM_PARTYTIME", "swwm_partytime", "YesNo" Option "$SWWM_FUNTRAILS", "swwm_funtrails", "SWWMFunTrails" + TrapOption "$SWWM_ENGINE", "swwm_engine" StaticText " " StaticText "$SWWM_BTITLE", "Blue" Option "$SWWM_PISTOLSTART", "swwm_pistolstart", "YesNo" diff --git a/zscript/menu/swwm_menus.zsc b/zscript/menu/swwm_menus.zsc index 342b988b5..707b731a3 100644 --- a/zscript/menu/swwm_menus.zsc +++ b/zscript/menu/swwm_menus.zsc @@ -860,6 +860,51 @@ Class ListMenuItemSWWMPatchItemM : ListMenuItemSelectable } } +Class OptionMenuItemTrapOption : OptionMenuItemCommand +{ + int cdown; + + OptionMenuItemTrapOption Init( String label, Name command ) + { + Super.Init(label,'exit'); + mAction = command; + return self; + } + + override int Draw( OptionMenuDescriptor desc, int y, int indent, bool selected ) + { + drawLabel(indent,y,selected?OptionMenuSettings.mFontColorSelection:OptionMenuSettings.mFontColor); + String text = StringTable.Localize(OptionValues.GetText('OnOff',(cdown==0))); + if ( text.Length() == 0 ) text = "Unknown"; + drawValue(indent,y,OptionMenuSettings.mFontColorValue,text); + return indent; + } + override bool MenuEvent( int mkey, bool fromcontroller ) + { + if ( (mkey == Menu.MKEY_Left) || (mkey == Menu.MKEY_Right) || (mkey == Menu.MKEY_Enter) ) + { + Activate(); + return true; + } + return Super.MenuEvent(mkey,fromcontroller); + } + override void Ticker() + { + Super.Ticker(); + if ( cdown > 0 ) + { + cdown--; + if ( cdown <= 0 ) Super.Activate(); + } + } + override bool Activate() + { + Menu.MenuSound("bruh"); + cdown = int(S_GetLength("bruh")*GameTicRate)+4; + return true; + } +} + // this is kind of a fucky // scalesliders kinda fuck up keyboard input if the step is not 1, // so I'll fix that for my super special use cases