Skip to content

Commit

Permalink
You can no longer add mecha parts (and exosuit tracking beacons) when…
Browse files Browse the repository at this point in the history
… someone is driving it (yogstation13#14884)

* Cannot add mecha parts when someone is piloting

* fixes up code

* fixes code harder

* change || to &&

* removes unnecessary ?

* makes comment more readable

* include MMIs not just posi
  • Loading branch information
ynot01 authored Jul 23, 2022
1 parent 48145f0 commit 72b477b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/game/mecha/mecha_parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
if(!user.transferItemToLoc(src, M))
to_chat(user, span_warning("\The [src] is stuck to your hand, you cannot put it in \the [M]!"))
return FALSE

// If there is an occupant and it is not a posibrain
if(M.occupant && !istype(M.occupant.loc, /obj/item/mmi))
to_chat(user, span_warning("Someone is driving \the [M]!"))
return FALSE
user.visible_message("[user] attaches [src] to [M].", span_notice("You attach [src] to [M]."))
return TRUE

Expand Down

0 comments on commit 72b477b

Please sign in to comment.