Skip to content

Commit

Permalink
[MIRROR] Fixes standard RPEDs not working on machines (#1919) (#2839)
Browse files Browse the repository at this point in the history
* Fixes standard RPEDs not working on machines (#82528)

## About The Pull Request

Previously, `exchange_parts(...)` would cancel if both the
`NO_DECONSTRUCTION` flag was set and you couldn't use your part replacer
from a distance.

https://github.com/tgstation/tgstation/blob/1583cf0cc968cd9f5da2398035feb8d70d58bcf2/code/game/machinery/_machinery.dm#L958-L959
Our recent removal of `NO_DECONSTRUCTION`, however, has left this to
_only_ be the latter.

https://github.com/tgstation/tgstation/blob/f0ed4ba4ce6b114509c10ee2f36ab0af6d7c81d2/code/game/machinery/_machinery.dm#L956-L957
Buuuuut this makes it unconditionally cancel for normal RPEDs, instead
of only blocking them if `NO_DECONSTRUCTION` was set.

As `NO_DECONSTRUCTION` is very much no longer relevant for this purpose,
we simply remove the ranged RPED check altogether.
This fixes our issue.
## Why It's Good For The Game

Fixes #82525.
## Changelog
:cl:
fix: Standard RPEDs work on machines again.
/:cl:

* Fixes standard RPEDs not working on machines

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: _0Steven <[email protected]>
  • Loading branch information
3 people authored Apr 11, 2024
1 parent 6ebf66e commit d9195e9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions code/game/machinery/_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -954,9 +954,6 @@
if(!istype(replacer_tool))
return FALSE

if(!replacer_tool.works_from_distance)
return FALSE

var/shouldplaysound = FALSE
if(!component_parts)
return FALSE
Expand Down
2 changes: 0 additions & 2 deletions code/modules/vending/_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1142,8 +1142,6 @@ GLOBAL_LIST_EMPTY(vending_machines_to_restock)
/obj/machinery/vending/exchange_parts(mob/user, obj/item/storage/part_replacer/replacer)
if(!istype(replacer))
return FALSE
if(!replacer.works_from_distance)
return FALSE
if(!component_parts || !refill_canister)
return FALSE

Expand Down

0 comments on commit d9195e9

Please sign in to comment.