From 5778e7cca6ecf0ab2ab8cbe7092e06d5c905ae0f Mon Sep 17 00:00:00 2001 From: Red <47158596+Red-byte3D@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:39:00 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/__DEFINES/client_prefs.dm | 4 ++-- code/modules/client/preferences_toggles.dm | 10 +--------- .../mob/living/carbon/xenomorph/castes/Queen.dm | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/code/__DEFINES/client_prefs.dm b/code/__DEFINES/client_prefs.dm index 1db71b5dc542..5bc7ff6c749d 100644 --- a/code/__DEFINES/client_prefs.dm +++ b/code/__DEFINES/client_prefs.dm @@ -35,8 +35,8 @@ #define TOGGLE_START_JOIN_CURRENT_SLOT (1<<16) // Whether joining at roundstart ignores assigned character slot for the job and uses currently selected slot. #define TOGGLE_LATE_JOIN_CURRENT_SLOT (1<<17) //Whether joining during the round ignores assigned character slot for the job and uses currently selected slot. #define TOGGLE_ABILITY_DEACTIVATION_OFF (1<<18) // This toggles whether selecting the same ability again can toggle it off -#define TOGGLE_AMMO_DISPLAY_TYPE (1<<19)/// limit how often the ammo is displayed when using semi-automatic fire -#define TOGGLE_AUTO_SHOVE (1<<20) +#define TOGGLE_AMMO_DISPLAY_TYPE (1<<19) // limit how often the ammo is displayed when using semi-automatic fire +#define TOGGLE_AUTO_SHOVE (1<<20) // Whether a xeno will automatically shove when walking if possible #define JOB_SLOT_RANDOMISED_SLOT -1 #define JOB_SLOT_CURRENT_SLOT 0 diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index 2f4c22369306..55d3fe2d7b5f 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -318,6 +318,7 @@ to_chat(src, SPAN_BOLDNOTICE("You will now automatically shove anyone in your way as the Queen.")) else to_chat(src, SPAN_BOLDNOTICE("You will no longer automatically shove anyone in your way as the Queen")) + prefs.save_preferences() /client/proc/toggle_auto_eject() // Toggle whether guns with auto-ejectors will automatically eject magazines prefs.toggle_prefs ^= TOGGLE_AUTO_EJECT_MAGAZINE_OFF @@ -357,15 +358,6 @@ to_chat(src, SPAN_BOLDNOTICE("The 'Unload Weapon' verb will no longer put magazines in your offhand.")) prefs.save_preferences() -/client/proc/toggle_automatic_shove() - prefs.toggle_prefs ^= TOGGLE_AUTO_SHOVE - if(prefs.toggle_prefs & TOGGLE_AUTO_SHOVE) - to_chat(src, SPAN_BOLDNOTICE("You will now automatically shove people.")) - else - to_chat(src, SPAN_BOLDNOTICE("You will no longer automatically shove people as the Queen")) - prefs.save_preferences() - - /client/proc/toggle_automatic_punctuation() // Toggle whether your sentences are automatically punctuated prefs.toggle_prefs ^= TOGGLE_AUTOMATIC_PUNCTUATION if(prefs.toggle_prefs & TOGGLE_AUTOMATIC_PUNCTUATION) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index 49eaf102cb46..2a2b5a355c25 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -445,7 +445,7 @@ for(var/mob/living/carbon/xenomorph/xeno in new_loc.contents) if(xeno.pass_flags.flags_pass & (PASS_MOB_THRU_XENO|PASS_MOB_THRU) && !(xeno.flags_pass_temp & PASS_MOB_THRU)) continue - if(xeno.hivenumber == hivenumber && queen.client?.prefs && (queen.client?.prefs?.toggle_prefs & TOGGLE_AUTO_SHOVE)) + if(xeno.hivenumber == hivenumber && (queen.client?.prefs?.toggle_prefs & TOGGLE_AUTO_SHOVE)) xeno.KnockDown((5 DECISECONDS) / GLOBAL_STATUS_MULTIPLIER) playsound(src, 'sound/weapons/alien_knockdown.ogg', 25, 1)