Skip to content

Commit

Permalink
Adds shove prefereance to the king (#7671)
Browse files Browse the repository at this point in the history
# About the pull request

adds auto shove preference to the king

# Explain why it's good for the game
#7502

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

:cl:
qol: The king now also has the ability to disable or enable automatic
shoving of things in its way
/:cl:

Co-authored-by: InsaneRed <[email protected]>
  • Loading branch information
Red-byte3D and InsaneRed authored Dec 4, 2024
1 parent 74f4416 commit 406db4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions code/modules/client/preferences_toggles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@
/client/proc/toggle_auto_shove()
prefs.toggle_prefs ^= TOGGLE_AUTO_SHOVE_OFF
if (prefs.toggle_prefs & TOGGLE_AUTO_SHOVE_OFF)
to_chat(src, SPAN_NOTICE("You will no longer automatically shove people in the way as the Queen."))
to_chat(src, SPAN_NOTICE("You will no longer automatically shove people in the way as the Queen or King."))
else
to_chat(src, SPAN_NOTICE("You will now automatically shove people in the way as the Queen."))
to_chat(src, SPAN_NOTICE("You will now automatically shove people in the way as the Queen or King."))
prefs.save_preferences()

/client/proc/toggle_ability_deactivation() // Toggle whether the current ability can be deactivated when re-selected
Expand Down
10 changes: 5 additions & 5 deletions code/modules/mob/living/carbon/xenomorph/castes/King.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@
for(var/mob/living/carbon/carbon in new_loc.contents)
if(isxeno(carbon))
var/mob/living/carbon/xenomorph/xeno = carbon
if(xeno.hivenumber == src.hivenumber)
if(xeno.hivenumber == src.hivenumber && !(king.client?.prefs?.toggle_prefs & TOGGLE_AUTO_SHOVE_OFF))
xeno.KnockDown((5 DECISECONDS) / GLOBAL_STATUS_MULTIPLIER)
else
playsound(src, 'sound/weapons/alien_knockdown.ogg', 25, 1)
else if(xeno.hivenumber != src.hivenumber)
xeno.KnockDown((1 SECONDS) / GLOBAL_STATUS_MULTIPLIER)
playsound(src, 'sound/weapons/alien_knockdown.ogg', 25, 1)
else
if(carbon.stat != DEAD)
carbon.apply_armoured_damage(20)
carbon.KnockDown((1 SECONDS) / GLOBAL_STATUS_MULTIPLIER)

playsound(src, 'sound/weapons/alien_knockdown.ogg', 25, 1)

playsound(src, 'sound/weapons/alien_knockdown.ogg', 25, 1)
/mob/living/carbon/xenomorph/king/gib(datum/cause_data/cause = create_cause_data("gibbing", src))
death(cause, 1)

Expand Down

0 comments on commit 406db4a

Please sign in to comment.