Skip to content

Commit

Permalink
[MIRROR] Fixes SMES terminal placing under the SMES and not under the…
Browse files Browse the repository at this point in the history
… player (#2908)

* Fixes SMES terminal placing under the SMES and not under the player (#82665)

## About The Pull Request

Changes `src` to`user` to get intended behavior.

* Fixes SMES terminal placing under the SMES and not under the player

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
3 people authored Apr 16, 2024
1 parent e6d4484 commit 7e3905c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/modules/power/smes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
if(!can_place_terminal(user, item, silent = TRUE))
return
var/obj/item/stack/cable_coil/cable = item
var/turf/turf = get_turf(src)
var/turf/turf = get_turf(user)
var/obj/structure/cable/connected_cable = turf.get_cable_node(terminal_cable_layer) //get the connecting node cable, if there's one
if (prob(50) && electrocute_mob(user, connected_cable, connected_cable, 1, TRUE)) //animate the electrocution if uncautious and unlucky
do_sparks(5, TRUE, src)
Expand Down Expand Up @@ -168,12 +168,12 @@
if(set_dir & (set_dir - 1))//we don't want diagonal click
return FALSE

var/turf/smes_turf = get_turf(src)
var/turf/terminal_turf = get_turf(user)
if(!panel_open)
if(!silent && user)
balloon_alert(user, "open the maintenance panel!")
return FALSE
if(smes_turf.underfloor_accessibility < UNDERFLOOR_INTERACTABLE)
if(terminal_turf.underfloor_accessibility < UNDERFLOOR_INTERACTABLE)
if(!silent && user)
balloon_alert(user, "remove the floor plating!")
return FALSE
Expand Down

0 comments on commit 7e3905c

Please sign in to comment.