Skip to content

Commit

Permalink
Add inrange check to removing vehicle parts (#5734)
Browse files Browse the repository at this point in the history
# About the pull request
Closes #5731

# Explain why it's good for the game
Bugs are bad

# Changelog
:cl:
fix: You can no longer remove vehicle parts from a vehicle at a distance
/:cl:
  • Loading branch information
Zonespace27 authored Feb 19, 2024
1 parent 9158b56 commit 618be98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/vehicles/multitile/multitile_hardpoints.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
hps += H

var/chosen_hp = tgui_input_list(usr, "Select a hardpoint to remove", "Hardpoint Removal", (hps + "Cancel"))
if(chosen_hp == "Cancel" || !chosen_hp)
if(chosen_hp == "Cancel" || !chosen_hp || !in_range(src, user))
return

var/obj/item/hardpoint/old = chosen_hp
Expand Down

0 comments on commit 618be98

Please sign in to comment.