mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Refactor /mob/unEquip. (#27720)
* Refactor /mob/unEquip. * fix things found in testing * more fixes from testing * fix removal of hooded suits * fix flayers inability to deploy swarmprod * fix changeling blade activation * unnecessary parens * pass default unequip args to proc overrides * fix belts being able to forceMove into full hands
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/shard))
|
||||
if(!user.unEquip(I))
|
||||
if(!user.drop_item_to_ground(I))
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
|
||||
return
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
if(istype(I, /obj/item/light))
|
||||
var/obj/item/light/L = I
|
||||
if(!user.unEquip(L))
|
||||
if(!user.drop_item_to_ground(L))
|
||||
to_chat(user, "<span class='warning'>[L] is stuck to your hand!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -48,16 +48,15 @@
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit(user)
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
|
||||
if(!user.unEquip(W))
|
||||
if(!user.unequip(W))
|
||||
to_chat(user, "<span class='notice'>\the [W] is stuck to your hand, you cannot attach it to \the [src]!</span>")
|
||||
return
|
||||
|
||||
W.loc = A
|
||||
W.forceMove(A)
|
||||
W.master = A
|
||||
A.part1 = W
|
||||
|
||||
user.unEquip(src)
|
||||
loc = A
|
||||
user.transfer_item_to(src, A)
|
||||
master = A
|
||||
A.part2 = src
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
to_chat(user, "The headset can't hold another key!")
|
||||
return
|
||||
|
||||
if(!user.unEquip(key))
|
||||
if(!user.drop_item_to_ground(key))
|
||||
to_chat(user, "<span class='warning'>[key] is stuck to your hand, you can't insert it in [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ SLIME SCANNER
|
||||
to_chat(user, "<span class='notice'>An upgrade is already installed on [src].</span>")
|
||||
return
|
||||
|
||||
if(!user.unEquip(I))
|
||||
if(!user.unequip(I))
|
||||
to_chat(user, "<span class='warning'>[src] is stuck to your hand!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -32,18 +32,16 @@
|
||||
return
|
||||
|
||||
if(!tank_one)
|
||||
if(!user.unEquip(I))
|
||||
if(!user.transfer_item_to(I, src))
|
||||
return
|
||||
tank_one = I
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
|
||||
if(I.w_class > w_class)
|
||||
w_class = I.w_class
|
||||
else if(!tank_two)
|
||||
if(!user.unEquip(I))
|
||||
if(!user.transfer_item_to(I, src))
|
||||
return
|
||||
tank_two = I
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
|
||||
if(I.w_class > w_class)
|
||||
w_class = I.w_class
|
||||
@@ -59,9 +57,9 @@
|
||||
if(attached_device)
|
||||
to_chat(user, "<span class='warning'>There is already a device attached to the valve, remove it first.</span>")
|
||||
return
|
||||
user.remove_from_mob(A)
|
||||
if(!user.transfer_item_to(A, src))
|
||||
return
|
||||
attached_device = A
|
||||
A.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You attach [A] to the valve controls and secure it.</span>")
|
||||
A.holder = src
|
||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
||||
|
||||
Reference in New Issue
Block a user