Rig unEquip() amendments.

This commit is contained in:
Zuhayr
2015-12-02 19:55:43 +10:30
parent 1b6282b43f
commit 6623c1650f
2 changed files with 10 additions and 10 deletions
+7 -7
View File
@@ -560,8 +560,8 @@
M.visible_message("<font color='blue'>[M] starts putting on \the [src]...</font>", "<font color='blue'>You start putting on \the [src]...</font>")
if(!do_after(M,seal_delay))
if(M && M.back == src)
M.back = null
M.unEquip(src)
if(!M.unEquip(src))
return
src.forceMove(get_turf(src))
return
@@ -618,7 +618,7 @@
if(use_obj && check_slot == use_obj)
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.</b></font>"
use_obj.canremove = 1
holder.unEquip(use_obj)
holder.drop_from_inventory(use_obj)
use_obj.forceMove(get_turf(src))
use_obj.dropped()
use_obj.canremove = 0
@@ -651,25 +651,25 @@
if(sealed)
if(H.head)
var/obj/item/garbage = H.head
H.unEquip(garbage)
H.drop_from_inventory(garbage)
H.head = null
qdel(garbage)
if(H.gloves)
var/obj/item/garbage = H.gloves
H.unEquip(garbage)
H.drop_from_inventory(garbage)
H.gloves = null
qdel(garbage)
if(H.shoes)
var/obj/item/garbage = H.shoes
H.unEquip(garbage)
H.drop_from_inventory(garbage)
H.shoes = null
qdel(garbage)
if(H.wear_suit)
var/obj/item/garbage = H.wear_suit
H.unEquip(garbage)
H.drop_from_inventory(garbage)
H.wear_suit = null
qdel(garbage)
@@ -56,7 +56,7 @@
user << "\The [src] already has a tank installed."
return
user.unEquip(W)
if(!user.unEquip(W)) return
air_supply = W
W.forceMove(src)
user << "You slot [W] into [src] and tighten the connecting valve."
@@ -84,8 +84,8 @@
return
if(!user || !W)
return
if(!user.unEquip(mod)) return
user << "You install \the [mod] into \the [src]."
user.unEquip(mod)
installed_modules |= mod
mod.forceMove(src)
mod.installed(src)
@@ -94,8 +94,8 @@
else if(!cell && istype(W,/obj/item/weapon/cell))
if(!user.unEquip(W)) return
user << "You jack \the [W] into \the [src]'s battery mount."
user.unEquip(W)
W.forceMove(src)
src.cell = W
return