From 431bd259609b92cbbfd717f0e2235f16f2bfb1da Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 9 May 2023 03:54:12 +0100 Subject: [PATCH] [MIRROR] the game is no longer mad every time a new emote gets added [MDB IGNORE] (#21028) * the game is no longer mad every time a new emote gets added (#75244) ## About The Pull Request makes it so stuff thats unbound isnt screamed at in the prefs check ## Why It's Good For The Game ![image](https://user-images.githubusercontent.com/23585223/236709145-006d8ee3-f929-4fb2-9052-08404a34ce7c.png) idc bruh ## Changelog :cl: fix: new hotkeys unbound by default (like emotes) no longer scream at you when added /:cl: * the game is no longer mad every time a new emote gets added --------- Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com> --- code/modules/client/preferences_savefile.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 169557537a5..2d921508301 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -118,12 +118,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(parent.hotkeys) for(var/hotkeytobind in kb.hotkey_keys) - if(!length(binds_by_key[hotkeytobind]) && hotkeytobind != "Unbound") //Only bind to the key if nothing else is bound expect for Unbound + if(hotkeytobind == "Unbound") + addedbind = TRUE + else if(!length(binds_by_key[hotkeytobind])) //Only bind to the key if nothing else is bound key_bindings[kb.name] |= hotkeytobind addedbind = TRUE else for(var/classickeytobind in kb.classic_keys) - if(!length(binds_by_key[classickeytobind]) && classickeytobind != "Unbound") //Only bind to the key if nothing else is bound expect for Unbound + if(classickeytobind == "Unbound") + addedbind = TRUE + else if(!length(binds_by_key[classickeytobind])) //Only bind to the key if nothing else is bound key_bindings[kb.name] |= classickeytobind addedbind = TRUE