[MIRROR] Fixers for telekinesis and the defibrillator interactions (#149)

* Fixers for telekinesis and the defibrillator interactions (#52571)

* tk and the defib

* fixed range check

* extra check that is not needed

* only show ear damage on threshold pass

* wrong branch am bad

* is living check

* Fixers for telekinesis and the defibrillator interactions

Co-authored-by: NightRed <nightred@gmail.com>
This commit is contained in:
SkyratBot
2020-07-31 14:06:48 +02:00
committed by GitHub
co-authored by NightRed
parent 1e5af70c53
commit 5e92c6f05b
3 changed files with 27 additions and 25 deletions
+17 -15
View File
@@ -203,23 +203,25 @@
// Update icons
parent_item.update_icon()
if(user.get_item_by_slot(ITEM_SLOT_BACK) == parent)
user.update_inv_back()
else
user.update_inv_hands()
// if the item requires two handed drop the item on unwield
if(require_twohands)
user.dropItemToGround(parent, force=TRUE)
// Show message if requested
if(show_message)
if(iscyborg(user))
to_chat(user, "<span class='notice'>You free up your module.</span>")
else if(require_twohands)
to_chat(user, "<span class='notice'>You drop [parent].</span>")
if(istype(user)) // tk showed that we might not have a mob here
if(user.get_item_by_slot(ITEM_SLOT_BACK) == parent)
user.update_inv_back()
else
to_chat(user, "<span class='notice'>You are now carrying [parent] with one hand.</span>")
user.update_inv_hands()
// if the item requires two handed drop the item on unwield
if(require_twohands)
user.dropItemToGround(parent, force=TRUE)
// Show message if requested
if(show_message)
if(iscyborg(user))
to_chat(user, "<span class='notice'>You free up your module.</span>")
else if(require_twohands)
to_chat(user, "<span class='notice'>You drop [parent].</span>")
else
to_chat(user, "<span class='notice'>You are now carrying [parent] with one hand.</span>")
// Play sound if set
if(unwieldsound)