From 40174cfab120cc4a923becc1b81d177d65472d1d Mon Sep 17 00:00:00 2001 From: TerminalHash Date: Mon, 15 Jul 2024 15:18:45 +0300 Subject: [PATCH] add nomenu buying items (thanks you, bunnie) --- Base/Entities/Characters/Archer/Archer.cfg | 2 + Base/Entities/Characters/Builder/Builder.cfg | 2 + Base/Entities/Characters/Knight/Knight.cfg | 2 + Base/Scripts/Emotes/EmoteHotkeys.as | 5 + Modules/BindingsModule/BindingsCommon.as | 168 +++++- Modules/BindingsModule/BindingsSystem.as | 62 +- Modules/BindingsModule/NoMenuBuying.as | 593 +++++++++++++++++++ Translations/TranslationsSystem.as | 44 ++ Translations/language_en.as | 44 ++ Translations/language_ru.as | 46 +- 10 files changed, 958 insertions(+), 10 deletions(-) create mode 100644 Modules/BindingsModule/NoMenuBuying.as diff --git a/Base/Entities/Characters/Archer/Archer.cfg b/Base/Entities/Characters/Archer/Archer.cfg index 7b6e77ba..685de46a 100644 --- a/Base/Entities/Characters/Archer/Archer.cfg +++ b/Base/Entities/Characters/Archer/Archer.cfg @@ -20,6 +20,7 @@ $sprite_factory = generic_sprite DrawHoverMessages.as; ItemNerf.as; RotateSpriteOnMove.as; + NoMenuBuying.as; $sprite_texture = ArcherMale.png s32_sprite_frame_width = 32 @@ -167,6 +168,7 @@ $inventory_name = Backpack $name = archer @$scripts = RunnerDefault.as; StandardControls.as; + NoMenuBuying.as; ScreenShakeOnHit.as; StandardPickup.as; ActivateHeldObject.as; diff --git a/Base/Entities/Characters/Builder/Builder.cfg b/Base/Entities/Characters/Builder/Builder.cfg index 24bbc282..c9bb4692 100644 --- a/Base/Entities/Characters/Builder/Builder.cfg +++ b/Base/Entities/Characters/Builder/Builder.cfg @@ -22,6 +22,7 @@ $sprite_factory = generic_sprite DrawHoverMessages.as; ItemNerf.as; RotateSpriteOnMove.as; + NoMenuBuying.as; $sprite_texture = BuilderMale.png s32_sprite_frame_width = 32 @@ -222,6 +223,7 @@ $inventory_name = Backpack $name = builder @$scripts = RunnerDefault.as; StandardControls.as; + NoMenuBuying.as; ScreenShakeOnHit.as; StandardPickup.as; ActivateHeldObject.as; diff --git a/Base/Entities/Characters/Knight/Knight.cfg b/Base/Entities/Characters/Knight/Knight.cfg index 37bc518d..a6b8ef75 100644 --- a/Base/Entities/Characters/Knight/Knight.cfg +++ b/Base/Entities/Characters/Knight/Knight.cfg @@ -20,6 +20,7 @@ $sprite_factory = generic_sprite DrawHoverMessages.as; ItemNerf.as; RotateSpriteOnMove.as; + NoMenuBuying.as; $sprite_texture = KnightMale.png s32_sprite_frame_width = 32 @@ -322,6 +323,7 @@ $inventory_name = Backpack $name = knight @$scripts = RunnerDefault.as; StandardControls.as; + NoMenuBuying.as; ScreenShakeOnHit.as; StandardPickup.as; ActivateHeldObject.as; diff --git a/Base/Scripts/Emotes/EmoteHotkeys.as b/Base/Scripts/Emotes/EmoteHotkeys.as index d2fa647a..f9ba4ce4 100755 --- a/Base/Scripts/Emotes/EmoteHotkeys.as +++ b/Base/Scripts/Emotes/EmoteHotkeys.as @@ -29,6 +29,11 @@ void onTick(CBlob@ this) return; } + if (getGameTime() - this.get_u32("boughtitemx") < 3) + { + return; + } + CControls@ controls = getControls(); for (uint i = 0; i < 9; i++) diff --git a/Modules/BindingsModule/BindingsCommon.as b/Modules/BindingsModule/BindingsCommon.as index 4afe3aa0..85a69a28 100644 --- a/Modules/BindingsModule/BindingsCommon.as +++ b/Modules/BindingsModule/BindingsCommon.as @@ -12,7 +12,11 @@ string[] page_texts = Names::emotemenu, Names::actionsmenu, Names::settingsmenu, - Names::vsettingsmenu + Names::vsettingsmenu, + Names::knightnmb, + Names::archernmb, + Names::buildernmb, + Names::quartersnmb }; string[][] button_texts = @@ -59,6 +63,47 @@ string[][] button_texts = Names::cancelarrowschargingcommand, Names::markbuildercommand, Names::activateorthrowbomb + }, + { + "Go away" // TECHNICAL LINE DONT TOUCH PLEASE + }, + { + "Why you fucking reading this???" // TECHNICAL LINE DONT TOUCH PLEASE + }, + { // KNIGHT SHOP + Names::bombnmb, + Names::waterbombnmb, + Names::minenmb, + Names::kegnmb, + Names::drillnmb, + Names::satchelnmb + }, + { // ARCHER SHOP + Names::arrowsnmb, + Names::waterarrowsnmb, + Names::firearrowsnmb, + Names::bombarrowsnmb, + Names::blockarrowsnmb + }, + { // BUILDER SHOP + Names::drillbnmb, + Names::spongebnmb, + Names::bucketwnmb, + Names::bouldernmb, + Names::lanternnmb, + Names::bucketnnmb, + Names::trampolinenmb, + Names::sawnmb, + Names::cratewoodnmb, + Names::cratecoinsnmb + }, + { // QUARTERS + Names::beernmb, + Names::mealnmb, + Names::eggnmb, + Names::burgernmb, + Names::pearnmb, + Names::sleepnmb } }; @@ -108,6 +153,47 @@ string[][] button_file_names = "cancel_charging", "mark_team_builder", "activate_or_throw_bomb" + }, + { + "go away" // TECHNICAL LINE DONT TOUCH PLEASE + }, + { + "why you fucking reading this???" // TECHNICAL LINE DONT TOUCH PLEASE + }, + { + "k_bomb", + "k_waterbomb", + "k_mine", + "k_keg", + "k_drill", + "k_satchel" + }, + { + "a_arrows", + "a_waterarrows", + "a_firearrows", + "a_bombarrows", + "a_blockarrows" + }, + { + "b_drill", + "b_sponge", + "b_bucketw", + "b_boulder", + "b_lantern", + "b_bucketn", + "b_trampoline", + "b_saw", + "b_crate_wood", + "b_crate_coins" + }, + { + "kfc_beer", + "kfc_meal", + "kfc_egg", + "kfc_burger", + "kfc_pear", + "kfc_sleep" } }; @@ -121,7 +207,9 @@ string[][] setting_texts = Names::drillbuilder, Names::drillarcher, Names::bombbuilder, - Names::bombarcher + Names::bombarcher, + Names::nomenubuyingset, + Names::nomenubuyingboldarset } }; @@ -134,7 +222,9 @@ string[][] setting_file_names = "pickdrill_builder", "pickdrill_archer", "pickbomb_builder", - "pickbomb_archer" + "pickbomb_archer", + "nomenubuying", + "nomenubuying_b", } }; @@ -168,6 +258,14 @@ string[][][] setting_options = { Descriptions::universalno, // 10 BOMB AUTOPICKUP FOR ARCHER Descriptions::universalyes // 20 + }, + { + Descriptions::universalno, // 10 NO MENU BUYING + Descriptions::universalyes // 20 + }, + { + Descriptions::universalno, // 10 NO MENU BUYING (BOLDAR) + Descriptions::universalyes // 20 } } }; @@ -202,6 +300,14 @@ string[][][] setting_option_names = { "no", // 10 BOMB AUTOPICKUP FOR ARCHER "yes" // 20 + }, + { + "no", // 10 NO MENU BUYING + "yes" // 20 + }, + { + "no", // 10 NO MENU BUYING (BOLDAR) + "yes" // 20 } } }; @@ -211,6 +317,8 @@ string[][] vsetting_texts = { { Names::blockbar, + Names::shownomenubuyingpan, + Names::dsewnmb, Names::camerasw, Names::bodytilt, Names::headrotating, @@ -229,6 +337,8 @@ string[][] vsetting_file_names = { { "blockbar_hud", + "shownomenupanel", + "dse_while_using_nomenu_buying", "camera_sway", "body_tilting", "head_rotating", @@ -250,6 +360,14 @@ string[][][] vsetting_options = Descriptions::universalno, // 10 BLOCKBAR ON HUD Descriptions::universalyes // 20 }, + { + Descriptions::universalno, // 10 SHOW NOMENU BUYING PANEL + Descriptions::universalyes // 20 + }, + { + Descriptions::universalno, // 10 DONT SHOW EMOTES WHILE USING NOMENU BUYING + Descriptions::universalyes // 20 + }, { "1", // 1 CAMERA SWAY "2", // 2 @@ -307,6 +425,14 @@ string[][][] vsetting_option_names = "no", // 10 BLOCKBAR "yes" // 20 }, + { + "no", // 10 SHOW NOMENU BUYING PANEL + "yes" // 20 + }, + { + "no", // 10 DONT SHOW EMOTES WHILE USING NOMENU BUYING + "yes" // 20 + }, { "1", // 1 CAMERA SWAY "2", // 2 @@ -1364,6 +1490,22 @@ class ClickableButtonTwo params.ResetBitIndex(); //getRules().SendCommand(cmd_id, params); fakeCommand(getRules(), cmd_id, @params); + + BindingGUI.current_page = cmd_subid; + + for (int i=0; i