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:
warriorstar-orion
2025-01-09 20:58:35 -05:00
committed by GitHub
parent 17602326bc
commit 0eafad8475
213 changed files with 587 additions and 585 deletions
+8 -13
View File
@@ -231,7 +231,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
QDEL_NULL(hidden_uplink)
if(ismob(loc))
var/mob/m = loc
m.unEquip(src, 1)
m.unequip(src, force = TRUE)
QDEL_LIST_CONTENTS(actions)
master = null
@@ -342,27 +342,22 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
if(affecting && affecting.receive_damage(0, 5)) // 5 burn damage
H.UpdateDamageIcon()
if(isstorage(src.loc))
/// If the item is in a storage item, take it out
var/obj/item/storage/S = src.loc
S.remove_from_storage(src)
if(..())
return
if(throwing)
throwing.finalize(FALSE)
if(loc == user)
if(HAS_TRAIT(user, TRAIT_I_WANT_BRAINS) || !user.unEquip(src, silent = TRUE))
if(isliving(loc))
if(loc == user)
if(HAS_TRAIT(user, TRAIT_I_WANT_BRAINS) || !user.unequip(src))
return FALSE
else
return FALSE
if(flags & ABSTRACT)
return FALSE
else
if(isliving(loc))
return FALSE
pickup(user)
add_fingerprint(user)
if(!user.put_in_active_hand(src))
@@ -376,7 +371,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
if(!A.has_fine_manipulation && !HAS_TRAIT(src, TRAIT_XENO_INTERACTABLE))
if(src in A.contents) // To stop Aliens having items stuck in their pockets
A.unEquip(src)
A.drop_item_to_ground(src)
to_chat(user, "<span class='warning'>Your claws aren't capable of such fine manipulation!</span>")
return
attack_hand(A)
+1 -1
View File
@@ -10,7 +10,7 @@
if(length(contents) >= max_butts)
to_chat(user, "This ashtray is full.")
return
if(!user.unEquip(I))
if(!user.unequip(I))
return
I.forceMove(src)
+1 -1
View File
@@ -100,7 +100,7 @@
new/obj/item/trash/candle(src.loc)
if(ismob(src.loc))
var/mob/M = src.loc
M.unEquip(src, 1) //src is being deleted anyway
M.drop_item_to_ground(src, force = TRUE) //src is being deleted anyway
qdel(src)
if(isturf(loc)) //start a fire if possible
var/turf/T = loc
+1 -1
View File
@@ -411,7 +411,7 @@
)
selected_disguise = disguise_spraypaint_items[selected_disguise][is_cardborg_head]
playsound(user, 'sound/effects/spray.ogg', 5, TRUE, 5)
user.unEquip(target)
user.unequip(target)
user.put_in_hands(new selected_disguise()) // Spawn the desired cardborg item.
qdel(target) // Get rid of the old one.
@@ -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
+1 -1
View File
@@ -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).
+1 -1
View File
@@ -151,7 +151,7 @@
to_chat(user, "You armed the robot frame")
M.use(1)
if(user.get_inactive_hand()==src)
user.unEquip(src)
user.unequip(src)
user.put_in_inactive_hand(B)
qdel(src)
if(istype(W, /obj/item/robot_parts/l_leg))
+1 -1
View File
@@ -20,7 +20,7 @@
return
if(!user.get_inactive_hand()) // We ballin
user.unEquip(src)
user.unequip(src)
user.put_in_inactive_hand(src)
else
to_chat(user, "<span class='warning'>You can't dribble to an occupied hand!</span>")
+1 -1
View File
@@ -87,7 +87,7 @@ GLOBAL_LIST_INIT(rod_recipes, list (
var/replace = user.is_in_inactive_hand(src)
use(2)
if(get_amount() <= 0 && replace)
user.unEquip(src, 1)
user.drop_item_to_ground(src, force = TRUE)
if(new_item)
user.put_in_hands(new_item)
+1 -1
View File
@@ -91,7 +91,7 @@
animate_fading_leap_up(user)
for(var/obj/item/W in user)
user.unEquip(W)
user.drop_item_to_ground(W)
user.dust()
return OBLITERATION
+1 -1
View File
@@ -153,7 +153,7 @@
playsound(loc, 'sound/effects/supermatter.ogg', 50, TRUE, -1)
for(var/obj/item/W in user)
user.unEquip(W)
user.drop_item_to_ground(W)
user.dust()
return OBLITERATION
+1 -1
View File
@@ -85,7 +85,7 @@
new /obj/item/restraints/handcuffs/cable/zipties/used(user.loc)
for(var/obj/item/W in user)
user.unEquip(W)
user.drop_item_to_ground(W)
user.dust()
return OBLITERATION
+1 -1
View File
@@ -118,7 +118,7 @@
return
for(var/obj/item/W in user)
user.unEquip(W)
user.drop_item_to_ground(W)
for(var/mob/living/M in orange(2, src))
// you're close enough, it's pretty fuckin bright
+3 -6
View File
@@ -146,7 +146,7 @@
animate(holder_obj, pixel_z = 1000, time = 50)
for(var/obj/item/W in user)
user.unEquip(W)
user.drop_item_to_ground(W)
user.notransform = TRUE
icon = null
@@ -226,8 +226,6 @@
else
to_chat(user, "<span class='notice'>You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool.</span>")
new /obj/item/dualsaber/toy(user.loc)
user.unEquip(attacking)
user.unEquip(src)
qdel(attacking)
qdel(src)
@@ -287,7 +285,7 @@
"<span class='notice'>You hear a gentle tapping.</span>"
)
playsound(loc, 'sound/weapons/tap.ogg', vary = TRUE)
target.unEquip(cig, TRUE)
target.drop_item_to_ground(cig, TRUE)
return TRUE
/obj/item/toy/sword/chaosprank/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
@@ -1457,8 +1455,7 @@
to_chat(user, "<span class='alert'>\The [attacking] is too far away to feed into \the [src]!</span>")
else
to_chat(user, "<span class='notice'>You feed \the [attacking] [bicon(attacking)] into \the [src]!</span>")
user.unEquip(attacking)
attacking.forceMove(src)
user.transfer_item_to(attacking, src)
stored_minature = attacking
else
to_chat(user, "<span class='warning'>You stop feeding \the [attacking] into \the [src]'s mini-input.</span>")
+1 -1
View File
@@ -351,7 +351,7 @@
return SHAME
user.visible_message("<span class='suicide'>[user] deconstructs [user.p_themselves()] with [src]!</span>")
for(var/obj/item/W in user) // Do not delete all their stuff.
user.unEquip(W) // Dump everything on the floor instead.
user.drop_item_to_ground(W) // Dump everything on the floor instead.
flags &= ~NODROP // NODROP must be removed so the RCD doesn't get dusted along with them. Having this come after the unequipping puts the RCD on top of the pile of stuff.
user.dust() // (held items fall to the floor when dusting).
return OBLITERATION
@@ -41,7 +41,7 @@
if(case)
to_chat(user, "<span class='warning'>There's already a bio-chip in the pad!</span>")
return
user.unEquip(C)
user.unequip(C)
C.forceMove(src)
case = C
update_icon(UPDATE_ICON_STATE)
+1 -2
View File
@@ -210,9 +210,8 @@
if(G.registered_name != registered_name && G.registered_name != "NOT SPECIFIED")
to_chat(user, "The guest pass cannot be attached to this ID.")
return
if(!user.unEquip(G))
if(!user.transfer_item_to(G, src))
return
G.loc = src
guest_pass = G
/obj/item/card/id/GetID()
@@ -80,13 +80,10 @@
to_chat(user, "<span class='notice'>[src] is already full!</span>")
return
if(!user.unEquip(I))
return
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
canisters += I
I.forceMove(src)
update_canister_stats()
if(user.transfer_item_to(I, src))
canisters += I
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
update_canister_stats()
/obj/item/chemical_flamethrower/proc/update_canister_stats()
if(!length(canisters))
+6 -6
View File
@@ -98,7 +98,7 @@ LIGHTERS ARE IN LIGHTERS.DM
// If the target has no cig, try to give them the cig.
var/mob/living/carbon/M = target
if(istype(M) && user.zone_selected == "mouth" && !M.wear_mask && user.a_intent == INTENT_HELP)
user.unEquip(src, TRUE)
user.drop_item_to_ground(src, force = TRUE)
M.equip_to_slot_if_possible(src, ITEM_SLOT_MASK)
if(target != user)
user.visible_message(
@@ -207,7 +207,7 @@ LIGHTERS ARE IN LIGHTERS.DM
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
e.start()
if(ismob(M))
M.unEquip(src, TRUE)
M.drop_item_to_ground(src, force = TRUE)
qdel(src)
return
@@ -217,7 +217,7 @@ LIGHTERS ARE IN LIGHTERS.DM
e.set_up(round(reagents.get_reagent_amount("fuel") / 5, 1), get_turf(src), 0, 0)
e.start()
if(ismob(M))
M.unEquip(src, TRUE)
M.drop_item_to_ground(src, force = TRUE)
qdel(src)
return
@@ -289,7 +289,7 @@ LIGHTERS ARE IN LIGHTERS.DM
if(ismob(loc))
var/mob/living/M = loc
to_chat(M, "<span class='notice'>Your [name] goes out.</span>")
M.unEquip(src, TRUE) //Force the un-equip so the overlays update
M.drop_item_to_ground(src, force = TRUE) //Force the un-equip so the overlays update
STOP_PROCESSING(SSobj, src)
qdel(src)
@@ -390,8 +390,8 @@ LIGHTERS ARE IN LIGHTERS.DM
to_chat(user, "<span class='warning'>You need to dry this first!</span>")
return
user.unEquip(plant, TRUE)
user.unEquip(src, TRUE)
user.unequip(plant, TRUE)
user.unequip(src, TRUE)
var/obj/item/clothing/mask/cigarette/rollie/custom/custom_rollie = new (get_turf(user))
custom_rollie.reagents.maximum_volume = plant.reagents.total_volume
plant.reagents.trans_to(custom_rollie, plant.reagents.total_volume)
+2 -2
View File
@@ -174,7 +174,7 @@
/obj/item/defibrillator/proc/remove_paddles(mob/user) // from your hands
var/mob/living/carbon/human/M = user
if(paddles in get_both_hands(M))
M.unEquip(paddles)
M.drop_item_to_ground(paddles)
paddles_on_defib = TRUE
update_icon(UPDATE_OVERLAYS)
return
@@ -387,7 +387,7 @@
/obj/item/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/human/M, obj/O)
if(!mainunit || !istype(mainunit, /obj/item/defibrillator)) //To avoid weird issues from admin spawns
M?.unEquip(O)
M?.unequip(O)
qdel(O)
return FALSE
else
+1 -1
View File
@@ -165,7 +165,7 @@
/obj/item/dice/d20/fate/equipped(mob/user, slot)
if(!ishuman(user) || !user.mind || iswizard(user))
to_chat(user, "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans! You should leave it alone.</span>")
user.unEquip(src)
user.drop_item_to_ground(src)
/obj/item/dice/d20/fate/proc/create_smoke(amount)
var/datum/effect_system/smoke_spread/smoke = new
@@ -35,11 +35,10 @@
/obj/item/grenade/plastic/attackby__legacy__attackchain(obj/item/I, mob/user, params)
if(!nadeassembly && istype(I, /obj/item/assembly))
var/obj/item/assembly/A = I
if(!user.unEquip(I))
if(!user.transfer_item_to(A, src))
return ..()
nadeassembly = A
A.master = src
A.loc = src
assemblyattacher = user.ckey
to_chat(user, "<span class='notice'>You add [A] to [src].</span>")
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
@@ -86,8 +85,9 @@
to_chat(user, "<span class='notice'>You start planting [src].[isnull(nadeassembly) ? " The timer is set to [det_time]..." : ""]</span>")
if(do_after(user, 1.5 SECONDS * toolspeed, target = AM))
if(!user.unEquip(src))
if(!user.unequip(src))
return
target = AM
loc = null
@@ -119,7 +119,7 @@
if(!ispath(gift_type,/obj/item)) return
var/obj/item/I = new gift_type(M)
M.unEquip(src, 1)
M.unequip(src, force = TRUE)
M.put_in_hands(I)
I.add_fingerprint(M)
qdel(src)
@@ -61,7 +61,7 @@
return TRUE
var/obj/item/grenade/bananade/G = new /obj/item/grenade/bananade
user.unEquip(src)
user.drop_item_to_ground(src)
user.put_in_hands(G)
G.deliveryamt = deliveryamt
to_chat(user, "<span class='notice'>You lock the assembly shut, readying it for HONK.</span>")
@@ -83,7 +83,7 @@
/obj/item/grenade/proc/update_mob()
if(ismob(loc))
var/mob/M = loc
M.unEquip(src)
M.drop_item_to_ground(src)
/obj/item/grenade/screwdriver_act(mob/living/user, obj/item/I)
if(!modifiable_timer)
+5 -3
View File
@@ -26,11 +26,13 @@
/obj/item/restraints/proc/finish_resist_restraints(mob/living/carbon/user, break_cuffs, silent)
if(!silent)
user.visible_message("<span class='danger'>[user] manages to [break_cuffs ? "break" : "remove"] [src]!</span>", "<span class='notice'>You successfully [break_cuffs ? "break" : "remove"] [src].</span>")
user.unEquip(src)
user.unequip(src)
if(break_cuffs)
qdel(src)
return TRUE
else
forceMove(user.drop_location())
//////////////////////////////
// MARK: HANDCUFFS
@@ -273,7 +275,7 @@
if(!R.use(1))
to_chat(user, "<span class='warning'>[R.amount > 1 ? "These rods" : "This rod"] somehow can't be used for crafting!</span>")
return
if(!user.unEquip(src))
if(!user.unequip(src))
return
var/obj/item/wirerod/W = new /obj/item/wirerod(get_turf(src))
if(!remove_item_from_storage(user))
@@ -290,7 +292,7 @@
to_chat(user, "<span class='notice'>You begin to apply [I] to [src]...</span>")
if(do_after(user, 3.5 SECONDS * M.toolspeed, target = src))
if(!M.use(6) || !user.unEquip(src))
if(!M.use(6) || !user.unequip(src))
return
var/obj/item/restraints/legcuffs/bola/S = new /obj/item/restraints/legcuffs/bola(get_turf(src))
to_chat(user, "<span class='notice'>You make some weights out of [I] and tie them to [src].</span>")
@@ -53,7 +53,7 @@
user.adjustBruteLoss(force)
user.adjustFireLoss(sanctify_force)
user.Weaken(10 SECONDS)
user.unEquip(src, 1)
user.drop_item_to_ground(src, force = TRUE)
user.visible_message("<span class='warning'>[src] slips out of the grip of [user] as they try to pick it up, bouncing upwards and smacking [user.p_them()] in the face!</span>", \
"<span class='warning'>[src] slips out of your grip as you pick it up, bouncing upwards and smacking you in the face!</span>")
playsound(get_turf(user), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
@@ -279,8 +279,6 @@
if(src.hacked) // That's right, we'll only check the "original" esword.
newSaber.hacked = TRUE
newSaber.item_color = "rainbow"
user.unEquip(W)
user.unEquip(src)
qdel(W)
qdel(src)
user.put_in_hands(newSaber)
@@ -81,7 +81,7 @@
return
if(I.flags & ABSTRACT)
return
if(!user.unEquip(I))
if(!user.unequip(I))
to_chat(user, "<span class='notice'>[I] doesn't seem to want to go into [src]!</span>")
return
I.forceMove(src)
@@ -56,7 +56,7 @@
if(I.w_class > w_class)
to_chat(user, "<span class='warning'>[I] is too large to fit into [src]!</span>")
return FALSE
if(!user.unEquip(I) || I.flags & (ABSTRACT | NODROP | DROPDEL))
if(!user.unequip(I) || I.flags & (ABSTRACT | NODROP | DROPDEL))
to_chat(user, "<span class='warning'>You can't put [I] into [src]!</span>")
return FALSE
loaded_items.Add(I)
@@ -144,7 +144,7 @@
if(tank)
to_chat(user, "<span class='warning'>[src] already has a tank.</span>")
return
if(!user.unEquip(new_tank))
if(!user.unequip(new_tank))
return
to_chat(user, "<span class='notice'>You hook [new_tank] up to [src].</span>")
new_tank.forceMove(src)
+1 -1
View File
@@ -79,7 +79,7 @@
if(tank)
to_chat(user, "<span class='warning'>[src] already has a tank.</span>")
return
if(!user.unEquip(thetank))
if(!user.unequip(thetank))
return
to_chat(user, "<span class='notice'>As you hook [thetank] up to [src], the fist locks into place around your arm.</span>")
tank = thetank
+1 -1
View File
@@ -52,7 +52,7 @@
/obj/item/staff/broom/attackby__legacy__attackchain(obj/O, mob/user)
if(istype(O, /obj/item/clothing/mask/horsehead))
new/obj/item/staff/broom/horsebroom(get_turf(src))
user.unEquip(O)
user.unequip(O)
qdel(O)
qdel(src)
return
@@ -70,11 +70,17 @@
if(!M.restrained() && !M.stat && can_use())
switch(over_object.name)
if("r_hand")
if(M.unEquip(src, silent = TRUE))
M.put_in_r_hand(src)
if(M.unequip(src))
if(M.r_hand)
M.drop_item_to_ground(src)
else
M.put_in_r_hand(src)
if("l_hand")
if(M.unEquip(src, silent = TRUE))
M.put_in_l_hand(src)
if(M.unequip(src))
if(M.l_hand)
M.drop_item_to_ground(src)
else
M.put_in_l_hand(src)
add_fingerprint(usr)
return
@@ -49,10 +49,10 @@
if(!user.restrained() && !user.stat)
switch(over_object.name)
if("r_hand")
user.unEquip(master_item, silent = TRUE)
user.unequip(master_item)
user.put_in_r_hand(master_item)
if("l_hand")
user.unEquip(master_item, silent = TRUE)
user.unequip(master_item)
user.put_in_l_hand(master_item)
master_item.add_fingerprint(user)
return 0
@@ -150,11 +150,11 @@
if(!M.restrained() && !M.stat)
switch(over_object.name)
if("r_hand")
if(!M.unEquip(src, silent = TRUE))
if(!M.unequip(src))
return
M.put_in_r_hand(src)
if("l_hand")
if(!M.unEquip(src, silent = TRUE))
if(!M.unequip(src))
return
M.put_in_l_hand(src)
add_fingerprint(usr)
@@ -445,7 +445,7 @@
if(user)
if(!Adjacent(user) && !isnewplayer(user))
return FALSE
if(!user.unEquip(I, silent = TRUE))
if(!user.unequip(I))
return FALSE
user.update_icons() //update our overlays
if(QDELING(I))
+1 -1
View File
@@ -130,7 +130,7 @@
if(C.maxcharge < hitcost)
to_chat(user, "<span class='warning'>[src] requires a higher capacity cell!</span>")
return
if(!user.unEquip(I))
if(!user.unequip(I))
return
I.forceMove(src)
cell = I
@@ -70,8 +70,7 @@
return
master = F
F.ptank = src
user.unEquip(src)
loc = F
user.transfer_item_to(src, F)
F.update_icon()
else
return ..()
@@ -68,7 +68,7 @@
/obj/item/watertank/proc/remove_noz()
if(ismob(noz.loc))
var/mob/M = noz.loc
M.unEquip(noz, 1)
M.drop_item_to_ground(noz, force = TRUE)
return
/obj/item/watertank/attack_hand(mob/user)
@@ -84,13 +84,13 @@
if("r_hand")
if(H.r_hand)
return
if(!H.unEquip(src))
if(!H.unequip(src))
return
H.put_in_r_hand(src)
if("l_hand")
if(H.l_hand)
return
if(!H.unEquip(src))
if(!H.unequip(src))
return
H.put_in_l_hand(src)
return
+2 -2
View File
@@ -146,7 +146,7 @@
if(HAS_TRAIT(user, TRAIT_HULK))
to_chat(user, "<span class='warning'>You grip the blade too hard and accidentally drop it!</span>")
if(HAS_TRAIT(src, TRAIT_WIELDED))
user.unEquip(src)
user.drop_item_to_ground(src)
return
..()
if(HAS_TRAIT(user, TRAIT_CLUMSY) && HAS_TRAIT(src, TRAIT_WIELDED) && prob(40) && force)
@@ -385,7 +385,7 @@
//Putting heads on spears
/obj/item/spear/attackby__legacy__attackchain(obj/item/I, mob/living/user)
if(istype(I, /obj/item/organ/external/head))
if(user.unEquip(src) && user.drop_item())
if(user.unequip(src) && user.drop_item())
to_chat(user, "<span class='notice'>You stick [I] onto the spear and stand it upright on the ground.</span>")
var/obj/structure/headspear/HS = new /obj/structure/headspear(get_turf(src))
var/matrix/M = matrix()
+4 -4
View File
@@ -142,8 +142,8 @@
S.add_plasmaglass()
S.update_icon()
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.unequip(src)
user.unequip(I)
user.put_in_hands(S)
to_chat(user, "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>")
@@ -154,8 +154,8 @@
var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.unequip(src)
user.unequip(I)
user.put_in_hands(P)
to_chat(user, "<span class='notice'>You fasten [I] to the top of the rod with the cable.</span>")
+1 -1
View File
@@ -33,7 +33,7 @@
if(do_after(user, 1 SECONDS, target = user) && !QDELETED(src))
to_chat(user, "<span class='notice'>You begin to open the envelope.</span>")
playsound(loc, 'sound/items/poster_ripped.ogg', 50, TRUE)
user.unEquip(src)
user.unequip(src)
for(var/obj/item/I in contents)
user.put_in_hands(I)
qdel(src)
@@ -66,7 +66,7 @@
if(HAS_TRAIT(F, TRAIT_WIELDED))
to_chat(user, "<span class='warning'>Unwield \the [F] first.</span>")
return
if(!user.unEquip(F, FALSE))
if(!user.unequip(F, FALSE))
to_chat(user, "<span class='warning'>\The [F] stays stuck to your hands!</span>")
return
fireaxe = F
+1 -1
View File
@@ -35,7 +35,7 @@
return ..()
/obj/structure/janitorialcart/proc/put_in_cart(mob/user, obj/item/I)
if(!user.unEquip(I)) // We can do this here because everything below wants to
if(!user.unequip(I)) // We can do this here because everything below wants to
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
return
+1 -1
View File
@@ -34,7 +34,7 @@
attacking_mop.wet_mop(src, user)
return
if(!user.unEquip(attacking_mop))
if(!user.drop_item_to_ground(attacking_mop))
to_chat(user, "<span class='notice'>[attacking_mop] is stuck to your hand!</span>")
return
@@ -91,7 +91,7 @@
if(istype(H.shoes, /obj/item/clothing/shoes/slippers))
sleep_ratio *= 2
// take your shoes off first, you filthy animal
H.unEquip(H.shoes)
H.drop_item_to_ground(H.shoes)
var/extinguished_candle = FALSE
for(var/obj/item/candle/C in range(2, src))
@@ -587,7 +587,7 @@
/obj/item/chair/stool/attack__legacy__attackchain(mob/M as mob, mob/user as mob)
if(prob(5) && isliving(M))
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!.</span>")
user.unEquip(src)
user.unequip(src)
var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal
m.loc = get_turf(src)
qdel(src)
+1 -1
View File
@@ -733,7 +733,7 @@
S.anchored = FALSE
S.dir = user.dir
S.update_icon()
user.unEquip(src, 1)
user.unequip(src, force = TRUE)
qdel(src)
if(prob(50))
new /obj/item/stack/sheet/cardboard(T)