Skip to content

Commit

Permalink
[MIRROR] Suit sensors can now be quick-maxed by ctrl clicking (#2534)
Browse files Browse the repository at this point in the history
* Suit sensors can now be quick-maxed by ctrl clicking (#83265)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Ctrl clicking your jumpsuit will max its suit sensors



https://github.com/tgstation/tgstation/assets/96586172/3b7275ee-404a-49d1-b378-63de794d22ee


<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
Nice little change that makes maxing your sensors easier
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

:cl: grungussuss
qol: suit sensors can now be maxed by ctrl clicking your jumpsuit
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

* Suit sensors can now be quick-maxed by ctrl clicking

---------

Co-authored-by: Sadboysuss <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed May 17, 2024
1 parent f0b81b9 commit 9e7a4fb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions code/modules/clothing/under/_under.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@

if(isnull(held_item) && has_sensor == HAS_SENSORS)
context[SCREENTIP_CONTEXT_RMB] = "Toggle suit sensors"
context[SCREENTIP_CONTEXT_CTRL_LMB] = "Set suit sensors to tracking"
changed = TRUE

if(istype(held_item, /obj/item/clothing/accessory) && length(attached_accessories) < max_number_of_accessories)
Expand Down Expand Up @@ -339,6 +340,16 @@
if(H.w_uniform == src)
H.update_suit_sensors()

/obj/item/clothing/under/CtrlClick(mob/user)
. = ..()
if(!.)
return
if(!can_toggle_sensors(user))
return

sensor_mode = SENSOR_COORDS
balloon_alert(user, "set to tracking")

/// Checks if the toggler is allowed to toggle suit sensors currently
/obj/item/clothing/under/proc/can_toggle_sensors(mob/toggler)
if(!can_use(toggler) || toggler.stat == DEAD) //make sure they didn't hold the window open.
Expand Down

0 comments on commit 9e7a4fb

Please sign in to comment.