mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +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:
@@ -177,7 +177,7 @@
|
||||
if(isitem(target))
|
||||
if(target in user.tkgrabbed_objects)
|
||||
// Release the old grab first
|
||||
user.unEquip(user.tkgrabbed_objects[target])
|
||||
user.drop_item_to_ground(user.tkgrabbed_objects[target])
|
||||
user.tkgrabbed_objects[target] = src
|
||||
|
||||
/obj/item/tk_grab/proc/release_object()
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
else if(target_direction & SOUTH)
|
||||
x_offset = rand(-12, 12)
|
||||
y_offset = -16
|
||||
if(!user.unEquip(I))
|
||||
if(!user.drop_item_to_ground(I))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You stick [I] to [target_turf].</span>")
|
||||
I.pixel_x = x_offset
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if(!user.canUnEquip(I))
|
||||
return
|
||||
|
||||
INVOKE_ASYNC(user, TYPE_PROC_REF(/mob, unEquip), I)
|
||||
INVOKE_ASYNC(user, TYPE_PROC_REF(/mob, drop_item_to_ground), I)
|
||||
|
||||
var/list/click_params = params2list(params)
|
||||
//Center the icon where the user clicked.
|
||||
|
||||
@@ -178,20 +178,20 @@
|
||||
if(ismonkeybasic(user))
|
||||
if(require_twohands)
|
||||
to_chat(user, "<span class='notice'>[parent] is too heavy and cumbersome for you to carry!</span>")
|
||||
user.unEquip(parent, force = TRUE)
|
||||
user.drop_item_to_ground(parent, force = TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[parent] too heavy for you to wield fully.</span>")
|
||||
return
|
||||
if(user.get_inactive_hand())
|
||||
if(require_twohands)
|
||||
to_chat(user, "<span class='notice'>[parent] is too cumbersome to carry in one hand!</span>")
|
||||
user.unEquip(parent, force = TRUE)
|
||||
user.drop_item_to_ground(parent, force = TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need your other hand to be empty!</span>")
|
||||
return
|
||||
if(!user.has_both_hands())
|
||||
if(require_twohands)
|
||||
user.unEquip(parent, force = TRUE)
|
||||
user.drop_item_to_ground(parent, force = TRUE)
|
||||
to_chat(user, "<span class='warning'>You don't have enough intact hands.</span>")
|
||||
return
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
// if the item requires two handed drop the item on unwield
|
||||
if(require_twohands && can_drop)
|
||||
user.unEquip(parent, force = TRUE)
|
||||
user.drop_item_to_ground(parent, force = TRUE)
|
||||
|
||||
// Show message if requested
|
||||
if(show_message)
|
||||
@@ -393,7 +393,7 @@
|
||||
INVOKE_ASYNC(src, PROC_REF(unwield), user)
|
||||
|
||||
/datum/component/two_handed/proc/try_drop_item(mob/user)
|
||||
if(user.unEquip(parent))
|
||||
if(user.drop_item_to_ground(parent))
|
||||
user.visible_message("<span class='notice'>[user] loses [user.p_their()] grip on [parent]!</span>")
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
var/saved_internals = H.internal
|
||||
|
||||
H.unEquip(H.get_item_by_slot(ITEM_SLOT_MASK))
|
||||
H.drop_item_to_ground(H.get_item_by_slot(ITEM_SLOT_MASK))
|
||||
var/obj/item/clothing/mask/gas/clown_hat/peak_comedy = new
|
||||
peak_comedy.flags |= DROPDEL
|
||||
H.equip_to_slot_or_del(peak_comedy, ITEM_SLOT_MASK)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
var/chosen_slot_ID = pick(eligible_slot_IDs)
|
||||
var/chosen_fashion = magic_fashion[num2text(chosen_slot_ID)]
|
||||
|
||||
H.unEquip(H.get_item_by_slot(chosen_slot_ID))
|
||||
H.drop_item_to_ground(H.get_item_by_slot(chosen_slot_ID))
|
||||
var/obj/item/magic_attire = new chosen_fashion
|
||||
magic_attire.flags |= DROPDEL
|
||||
H.equip_to_slot_or_del(magic_attire, chosen_slot_ID)
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
|
||||
/// A utility function for `/datum/strippable_item`s to finish unequipping an item from a mob.
|
||||
/proc/finish_unequip_mob(obj/item/item, mob/source, mob/user)
|
||||
if(!source.unEquip(item))
|
||||
if(!source.drop_item_to_ground(item))
|
||||
return
|
||||
|
||||
add_attack_logs(user, source, "Stripping of [item]")
|
||||
@@ -427,7 +427,7 @@
|
||||
return
|
||||
|
||||
// make sure to drop the item
|
||||
if(!user.unEquip(held_item))
|
||||
if(!user.drop_item_to_ground(held_item))
|
||||
return
|
||||
|
||||
strippable_item.finish_equip(owner, held_item, user)
|
||||
|
||||
+1
-1
@@ -1521,7 +1521,7 @@
|
||||
switch(href_list["common"])
|
||||
if("undress")
|
||||
for(var/obj/item/I in current)
|
||||
current.unEquip(I, TRUE)
|
||||
current.drop_item_to_ground(I, force = TRUE)
|
||||
log_admin("[key_name(usr)] has unequipped [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has unequipped [key_name_admin(current)]")
|
||||
if("takeuplink")
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
do_jitter_animation(30 SECONDS)
|
||||
|
||||
if(iswizard(src) || (mind && mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE)) //Wizards get non-cursed clown robes and magical mask.
|
||||
unEquip(shoes, TRUE)
|
||||
unEquip(wear_mask, TRUE)
|
||||
unEquip(head, TRUE)
|
||||
unEquip(wear_suit, TRUE)
|
||||
drop_item_to_ground(shoes, force = TRUE)
|
||||
drop_item_to_ground(wear_mask, force = TRUE)
|
||||
drop_item_to_ground(head, force = TRUE)
|
||||
drop_item_to_ground(wear_suit, force = TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/head/wizard/clown, ITEM_SLOT_HEAD, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/suit/wizrobe/clown, ITEM_SLOT_OUTER_SUIT, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/shoes/clown_shoes/magical, ITEM_SLOT_SHOES, TRUE, TRUE)
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
singlemutcheck(src, GLOB.nervousblock, MUTCHK_FORCED)
|
||||
rename_character(real_name, "cluwne")
|
||||
|
||||
unEquip(w_uniform, 1)
|
||||
unEquip(shoes, 1)
|
||||
unEquip(gloves, 1)
|
||||
drop_item_to_ground(w_uniform, force = TRUE)
|
||||
drop_item_to_ground(shoes, force = TRUE)
|
||||
drop_item_to_ground(gloves, force = TRUE)
|
||||
var/obj/item/organ/internal/honktumor/cursed/tumor = new
|
||||
tumor.insert(src)
|
||||
if(!istype(wear_mask, /obj/item/clothing/mask/cursedclown)) //Infinite loops otherwise
|
||||
unEquip(wear_mask, 1)
|
||||
drop_item_to_ground(wear_mask, force = TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/under/cursedclown, ITEM_SLOT_JUMPSUIT, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/gloves/cursedclown, ITEM_SLOT_GLOVES, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/mask/cursedclown, ITEM_SLOT_MASK, TRUE, TRUE)
|
||||
@@ -65,23 +65,14 @@
|
||||
dna.SetSEState(GLOB.nervousblock, FALSE)
|
||||
singlemutcheck(src, GLOB.nervousblock, MUTCHK_FORCED)
|
||||
|
||||
var/obj/item/clothing/under/U = w_uniform
|
||||
unEquip(w_uniform, 1)
|
||||
if(U)
|
||||
qdel(U)
|
||||
|
||||
var/obj/item/clothing/shoes/S = shoes
|
||||
unEquip(shoes, 1)
|
||||
if(S)
|
||||
qdel(S)
|
||||
qdel(w_uniform)
|
||||
qdel(shoes)
|
||||
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/cursedclown))
|
||||
unEquip(wear_mask, 1)
|
||||
qdel(wear_mask)
|
||||
|
||||
if(istype(gloves, /obj/item/clothing/gloves/cursedclown))
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
unEquip(gloves, 1)
|
||||
qdel(G)
|
||||
qdel(gloves)
|
||||
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/procedure/iaa/formal/black, ITEM_SLOT_JUMPSUIT, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/shoes/black, ITEM_SLOT_SHOES, TRUE, TRUE)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
magichead.voicechange = TRUE //NEEEEIIGHH
|
||||
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
|
||||
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
|
||||
if(!target.unEquip(target.wear_mask))
|
||||
if(!target.drop_item_to_ground(target.wear_mask))
|
||||
qdel(target.wear_mask)
|
||||
target.equip_to_slot_if_possible(magichead, ITEM_SLOT_MASK, TRUE, TRUE)
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(iscarbon(current_body))
|
||||
var/mob/living/carbon/C = current_body
|
||||
for(var/obj/item/W in C)
|
||||
C.unEquip(W)
|
||||
C.drop_item_to_ground(W)
|
||||
|
||||
// Give a hint as to where the body is
|
||||
var/wheres_wizdo = dir2text(get_dir(body_turf, item_turf))
|
||||
@@ -116,10 +116,10 @@
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.set_species(/datum/species/skeleton/lich)
|
||||
H.unEquip(H.wear_suit)
|
||||
H.unEquip(H.head)
|
||||
H.unEquip(H.shoes)
|
||||
H.unEquip(H.head)
|
||||
H.drop_item_to_ground(H.wear_suit)
|
||||
H.drop_item_to_ground(H.head)
|
||||
H.drop_item_to_ground(H.shoes)
|
||||
H.drop_item_to_ground(H.head)
|
||||
equip_lich(H)
|
||||
|
||||
to_chat(user, "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>")
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
try_throw_object(user, target, I)
|
||||
|
||||
/datum/spell/charge_up/bounce/magnet/proc/try_throw_object(mob/user, mob/thrower, obj/item/to_throw)
|
||||
if(!(to_throw.flags & CONDUCT) || !thrower.unEquip(to_throw, silent = TRUE))
|
||||
if(!(to_throw.flags & CONDUCT) || !thrower.drop_item_to_ground(to_throw, silent = TRUE))
|
||||
return FALSE
|
||||
thrower.visible_message("<span class='warning'>[to_throw] gets thrown out of [thrower] [thrower.p_their()] hands!</span>",
|
||||
"<span class='danger'>[to_throw] suddenly gets thrown out of your hands!</span>")
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
/mob/living/carbon/human/proc/mimetouched()
|
||||
Weaken(14 SECONDS)
|
||||
if(iswizard(src) || (mind && mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE)) //Wizards get non-cursed mime outfit. Replace with mime robes if we add those.
|
||||
unEquip(wear_mask, TRUE)
|
||||
unEquip(w_uniform, TRUE)
|
||||
unEquip(wear_suit, TRUE)
|
||||
drop_item_to_ground(wear_mask, force = TRUE)
|
||||
drop_item_to_ground(w_uniform, force = TRUE)
|
||||
drop_item_to_ground(wear_suit, force = TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/mime, ITEM_SLOT_MASK, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/civilian/mime, ITEM_SLOT_JUMPSUIT, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/suit/suspenders, ITEM_SLOT_OUTER_SUIT, TRUE, TRUE)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/obj/item/nullrod/scythe/talking/user_sword = user.loc
|
||||
if(ishuman(user_sword.loc))
|
||||
var/mob/living/carbon/holder = user_sword.loc
|
||||
holder.unEquip(user_sword)
|
||||
holder.drop_item_to_ground(user_sword)
|
||||
else if(isstorage(user_sword.loc))
|
||||
if(prob(50))
|
||||
to_chat(user, "<span class='warning'>You fail to break out of [user_sword.loc]!</span>")
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
if(ismob(item_to_retrieve.loc)) //If its on someone, properly drop it
|
||||
var/mob/M = item_to_retrieve.loc
|
||||
|
||||
if(issilicon(M) || !M.unEquip(item_to_retrieve)) //Items in silicons warp the whole silicon
|
||||
if(issilicon(M) || !M.drop_item_to_ground(item_to_retrieve)) //Items in silicons warp the whole silicon
|
||||
M.visible_message("<span class='warning'>[M] suddenly disappears!</span>", "<span class='danger'>A force suddenly pulls you away!</span>")
|
||||
M.forceMove(target.loc)
|
||||
M.loc.visible_message("<span class='caution'>[M] suddenly appears!</span>")
|
||||
|
||||
+1
-1
@@ -300,7 +300,7 @@
|
||||
var/atom/movable/M = A
|
||||
if(isliving(M.loc))
|
||||
var/mob/living/L = M.loc
|
||||
L.unEquip(M)
|
||||
L.drop_item_to_ground(M)
|
||||
M.forceMove(src)
|
||||
|
||||
///Return the air if we can analyze it
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
for(var/obj/item/W in H)
|
||||
if(istype(W, /obj/item/bio_chip))
|
||||
continue
|
||||
H.unEquip(W)
|
||||
H.drop_item_to_ground(W)
|
||||
|
||||
H.regenerate_icons()
|
||||
ADD_TRAIT(H, TRAIT_IMMOBILIZED, TRANSFORMING_TRAIT)
|
||||
@@ -51,7 +51,7 @@
|
||||
continue
|
||||
if(istype(W, /obj/item/bio_chip))
|
||||
continue
|
||||
H.unEquip(W)
|
||||
H.drop_item_to_ground(W)
|
||||
H.regenerate_icons()
|
||||
ADD_TRAIT(H, TRAIT_IMMOBILIZED, TRANSFORMING_TRAIT)
|
||||
ADD_TRAIT(H, TRAIT_HANDS_BLOCKED, TRANSFORMING_TRAIT)
|
||||
|
||||
@@ -472,7 +472,7 @@
|
||||
if(ismob(the_item.loc) && isitem(the_item))
|
||||
var/obj/item/eaten = the_item
|
||||
var/mob/the_owner = the_item.loc
|
||||
if(!the_owner.unEquip(eaten, FALSE, TRUE))
|
||||
if(!the_owner.drop_item_to_ground(eaten, silent = TRUE))
|
||||
to_chat(user, "<span class='warning'>You can't eat [the_item], it won't go down your throat!</span>")
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] eats [the_item].</span>")
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
/datum/action/innate/cult/use_dagger/Activate()
|
||||
var/obj/item/melee/cultblade/dagger/D = owner.find_item(/obj/item/melee/cultblade/dagger)
|
||||
if(D)
|
||||
owner.remove_from_mob(D)
|
||||
owner.unequip(D)
|
||||
owner.put_in_hands(D)
|
||||
D.activate_self(owner)
|
||||
else
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
if(!IS_CULTIST(user))
|
||||
user.Weaken(10 SECONDS)
|
||||
user.unEquip(src, 1)
|
||||
user.drop_item_to_ground(src, force = TRUE)
|
||||
user.visible_message("<span class='warning'>A powerful force shoves [user] away from [target]!</span>",
|
||||
"<span class='cultlarge'>\"You shouldn't play with sharp things. You'll poke someone's eye out.\"</span>")
|
||||
if(ishuman(user))
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_HULK))
|
||||
to_chat(user, "<span class='danger'>You can't seem to hold the blade properly!</span>")
|
||||
user.unEquip(src, TRUE)
|
||||
user.drop_item_to_ground(src, force = TRUE)
|
||||
|
||||
/obj/item/restraints/legcuffs/bola/cult
|
||||
name = "runed bola"
|
||||
@@ -175,7 +175,7 @@
|
||||
if(!IS_CULTIST(user)) // Todo: Make this only happen when actually equipped to the correct slot. (For all cult items)
|
||||
to_chat(user, "<span class='cultlarge'>\"I wouldn't advise that.\"</span>")
|
||||
to_chat(user, "<span class='warning'>An overwhelming sense of nausea overpowers you!</span>")
|
||||
user.unEquip(src, 1)
|
||||
user.drop_item_to_ground(src, force = TRUE)
|
||||
user.Confused(20 SECONDS)
|
||||
user.Weaken(10 SECONDS)
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
if(!IS_CULTIST(user))
|
||||
to_chat(user, "<span class='cultlarge'>\"I wouldn't advise that.\"</span>")
|
||||
to_chat(user, "<span class='warning'>An overwhelming sense of nausea overpowers you!</span>")
|
||||
user.unEquip(src, 1)
|
||||
user.drop_item_to_ground(src, force = TRUE)
|
||||
user.Confused(20 SECONDS)
|
||||
user.Weaken(10 SECONDS)
|
||||
else if(slot == ITEM_SLOT_OUTER_SUIT)
|
||||
@@ -278,7 +278,7 @@
|
||||
..()
|
||||
if(!IS_CULTIST(user))
|
||||
to_chat(user, "<span class='cultlarge'>\"You want to be blind, do you?\"</span>")
|
||||
user.unEquip(src, 1)
|
||||
user.drop_item_to_ground(src, force = TRUE)
|
||||
user.Confused(60 SECONDS)
|
||||
user.Weaken(10 SECONDS)
|
||||
user.EyeBlind(60 SECONDS)
|
||||
@@ -292,7 +292,7 @@
|
||||
|
||||
/obj/item/shuttle_curse/attack_self__legacy__attackchain(mob/living/user)
|
||||
if(!IS_CULTIST(user))
|
||||
user.unEquip(src, 1)
|
||||
user.drop_item_to_ground(src, force = TRUE)
|
||||
user.Weaken(10 SECONDS)
|
||||
to_chat(user, "<span class='warning'>A powerful force shoves you away from [src]!</span>")
|
||||
return
|
||||
@@ -345,7 +345,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] is dull and unmoving in your hands.</span>")
|
||||
return
|
||||
if(!IS_CULTIST(user))
|
||||
user.unEquip(src, TRUE)
|
||||
user.drop_item_to_ground(src, force = TRUE)
|
||||
step(src, pick(GLOB.alldirs))
|
||||
to_chat(user, "<span class='warning'>[src] flickers out of your hands, too eager to move!</span>")
|
||||
return
|
||||
@@ -664,7 +664,7 @@
|
||||
cooldown = world.time + 20
|
||||
if(isliving(spear.loc))
|
||||
var/mob/living/L = spear.loc
|
||||
L.unEquip(spear)
|
||||
L.drop_item_to_ground(spear)
|
||||
L.visible_message("<span class='warning'>An unseen force pulls the blood spear from [L]'s hands!</span>")
|
||||
spear.throw_at(owner, 10, 2, null, dodgeable = FALSE)
|
||||
|
||||
|
||||
@@ -1002,7 +1002,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
new_human.visible_message("<span class='warning'>[new_human] suddenly dissolves into bones and ashes.</span>",
|
||||
"<span class='cultlarge'>Your link to the world fades. Your form breaks apart.</span>")
|
||||
for(var/obj/item/I in new_human.get_all_slots())
|
||||
new_human.unEquip(I)
|
||||
new_human.drop_item_to_ground(I)
|
||||
new_human.mind.remove_antag_datum(/datum/antagonist/cultist, silent_removal = TRUE)
|
||||
new_human.dust()
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ GLOBAL_VAR(bomb_set)
|
||||
return
|
||||
if(istype(O, /obj/item/nuke_core/plutonium) && removal_stage == NUKE_CORE_FULLY_EXPOSED)
|
||||
if(do_after(user, 2 SECONDS, target = src))
|
||||
if(!user.unEquip(O))
|
||||
if(!user.drop_item_to_ground(O))
|
||||
to_chat(user, "<span class='notice'>The [O] is stuck to your hand!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] puts [O] back in [src].</span>", "<span class='notice'>You put [O] back in [src].</span>")
|
||||
|
||||
@@ -752,7 +752,7 @@ GLOBAL_LIST_EMPTY(multiverse)
|
||||
victim.revive()
|
||||
|
||||
for(var/obj/item/item in victim)
|
||||
victim.unEquip(item)
|
||||
victim.drop_item_to_ground(item)
|
||||
|
||||
var/skeleton_type = pick("roman", "pirate", "yand", "clown")
|
||||
|
||||
|
||||
@@ -682,7 +682,7 @@
|
||||
for(var/obj/item/I in H)
|
||||
if(istype(I, /obj/item/bio_chip))
|
||||
continue
|
||||
H.unEquip(I)
|
||||
H.drop_item_to_ground(I)
|
||||
|
||||
/datum/tarot/reversed/the_magician
|
||||
name = "I - The Magician?"
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
to_chat(user, "<span class='notice'><b>Capture successful!</b>:</span> [M.real_name]'s soul has been ripped from [user.p_their()] body and stored within the soul stone.")
|
||||
if(!isrobot(M))
|
||||
for(var/obj/item/I in M)
|
||||
M.unEquip(I)
|
||||
M.drop_item_to_ground(I)
|
||||
|
||||
var/target_body = M
|
||||
if(isbrain(M))
|
||||
|
||||
@@ -1112,7 +1112,7 @@
|
||||
magichead.flags |= NODROP | DROPDEL //curses!
|
||||
magichead.flags_inv = null //so you can still see their face
|
||||
magichead.voicechange = TRUE //NEEEEIIGHH
|
||||
if(!user.unEquip(user.wear_mask))
|
||||
if(!user.drop_item_to_ground(user.wear_mask))
|
||||
qdel(user.wear_mask)
|
||||
user.equip_to_slot_if_possible(magichead, ITEM_SLOT_MASK, TRUE, TRUE)
|
||||
qdel(src)
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
to_chat(user, "<span class='notice'>A spectral hand appears from your spellbook and pulls a brand new plasmaman envirosuit, complete with helmet, from the void, then drops it on the floor.</span>")
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/assistant(get_turf(user))
|
||||
new /obj/item/clothing/under/plasmaman/assistant(get_turf(user))
|
||||
user.unEquip(user.wear_id)
|
||||
user.drop_item_to_ground(user.wear_id)
|
||||
user.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey/glorf, ITEM_SLOT_JUMPSUIT) //Just in case they're naked
|
||||
var/obj/item/card/id/wizid = new /obj/item/card/id(src)
|
||||
user.equip_to_slot_or_del(wizid, ITEM_SLOT_ID)
|
||||
@@ -130,14 +130,8 @@
|
||||
destroy_spellbook = TRUE
|
||||
|
||||
/datum/spellbook_entry/loadout/fireball/OnBuy(mob/living/carbon/human/user, obj/item/spellbook/book)
|
||||
if(user.wear_suit)
|
||||
var/jumpsuit = user.wear_suit
|
||||
user.unEquip(user.wear_suit, TRUE)
|
||||
qdel(jumpsuit)
|
||||
if(user.head)
|
||||
var/head = user.head
|
||||
user.unEquip(user.head, TRUE)
|
||||
qdel(head)
|
||||
qdel(user.wear_suit)
|
||||
qdel(user.head)
|
||||
|
||||
// Part of Sacred Flame
|
||||
to_chat(user, "<span class='notice'>You feel fireproof.</span>")
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
// Upgrades!
|
||||
else if(is_type_in_list(I, possible_upgrades) && !is_type_in_list(I, upgrades)) // Is a possible upgrade and isn't in the camera already.
|
||||
if(!user.unEquip(I))
|
||||
if(!user.drop_item_to_ground(I))
|
||||
to_chat(user, "<span class='warning'>[I] is stuck!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You attach [I] into the assembly inner circuits.</span>")
|
||||
|
||||
@@ -538,10 +538,10 @@
|
||||
var/mob/M = inserted.loc
|
||||
if(!M.get_active_hand() == inserted)
|
||||
return //not sure how this would happen, but smartfridges check for it so
|
||||
if(!M.drop_item())
|
||||
if(!M.unequip(inserted))
|
||||
to_chat(inserter, "<span class='warning'>[inserted] is stuck to you!</span>")
|
||||
return
|
||||
M.unEquip(inserted)
|
||||
|
||||
inserted.forceMove(src)
|
||||
to_chat(inserter, "<span class='notice'>You insert [inserted] into [src]'s organ storage.</span>")
|
||||
SStgui.try_update_ui(inserter, src)
|
||||
|
||||
@@ -131,7 +131,8 @@
|
||||
|
||||
var/mob/M = obj.loc
|
||||
if(istype(M))
|
||||
M.unEquip(obj, TRUE) //Holoweapons should always drop.
|
||||
// Holoweapons should always drop.
|
||||
M.drop_item_to_ground(obj, force = TRUE)
|
||||
|
||||
if(!silent)
|
||||
var/obj/old_obj = obj
|
||||
|
||||
@@ -334,8 +334,7 @@
|
||||
/obj/machinery/cryopod/proc/despawn_occupant()
|
||||
//Drop all items into the pod.
|
||||
for(var/obj/item/I in occupant)
|
||||
occupant.unEquip(I)
|
||||
I.forceMove(src)
|
||||
occupant.transfer_item_to(I, src)
|
||||
handle_contents(I)
|
||||
|
||||
//Delete all items not on the preservation list.
|
||||
|
||||
@@ -1024,12 +1024,11 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
|
||||
if(note)
|
||||
to_chat(user, "<span class='warning'>There's already something pinned to this airlock! Use wirecutters or your hands to remove it.</span>")
|
||||
return
|
||||
if(!user.unEquip(C))
|
||||
if(!user.transfer_item_to(C, src))
|
||||
to_chat(user, "<span class='warning'>For some reason, you can't attach [C]!</span>")
|
||||
return
|
||||
C.add_fingerprint(user)
|
||||
user.create_log(MISC_LOG, "put [C] on", src)
|
||||
C.forceMove(src)
|
||||
user.visible_message("<span class='notice'>[user] pins [C] to [src].</span>", "<span class='notice'>You pin [C] to [src].</span>")
|
||||
note = C
|
||||
update_icon()
|
||||
|
||||
@@ -924,7 +924,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
if(isrobot(user))
|
||||
return
|
||||
var/obj/item/gun/energy/E = I //typecasts the item to an energy gun
|
||||
if(!user.unEquip(I))
|
||||
if(!user.unequip(I))
|
||||
to_chat(user, "<span class='notice'>\the [I] is stuck to your hand, you cannot put it in \the [src]</span>")
|
||||
return
|
||||
if(!E.can_fit_in_turrets)
|
||||
@@ -953,7 +953,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
|
||||
if(4)
|
||||
if(isprox(I))
|
||||
if(!user.unEquip(I))
|
||||
if(!user.unequip(I, src))
|
||||
to_chat(user, "<span class='notice'>\the [I] is stuck to your hand, you cannot put it in \the [src]</span>")
|
||||
return
|
||||
build_step = 5
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
// Remove and recycle the equipped items
|
||||
if(eat_victim_items)
|
||||
for(var/obj/item/I in L.get_equipped_items(TRUE))
|
||||
if(L.unEquip(I))
|
||||
if(L.drop_item_to_ground(I))
|
||||
eat(I, sound = 0)
|
||||
|
||||
// Instantly lie down, also go unconscious from the pain, before you die.
|
||||
|
||||
@@ -51,10 +51,9 @@
|
||||
if(istype(I, /obj/item/gps))
|
||||
var/obj/item/gps/L = I
|
||||
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
|
||||
if(!user.unEquip(L))
|
||||
if(!user.transfer_item_to(L, src))
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand, you cannot put it in [src]</span>")
|
||||
return
|
||||
L.forceMove(src)
|
||||
locked = L
|
||||
to_chat(user, "<span class='caution'>You insert the GPS device into [src]'s slot.</span>")
|
||||
else
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(isobj(H.shoes) && !(H.shoes.flags & NODROP))
|
||||
var/thingy = H.shoes
|
||||
H.unEquip(H.shoes)
|
||||
H.drop_item_to_ground(thingy)
|
||||
walk_away(thingy,chassis,15,2)
|
||||
spawn(20)
|
||||
if(thingy)
|
||||
|
||||
@@ -771,7 +771,7 @@
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/mecha_parts/mecha_tracking))
|
||||
if(!user.unEquip(W))
|
||||
if(!user.drop_item_to_ground(W))
|
||||
to_chat(user, "<span class='notice'>\the [W] is stuck to your hand, you cannot put it in \the [src]</span>")
|
||||
return
|
||||
|
||||
@@ -1232,7 +1232,7 @@
|
||||
else if(mmi_as_oc.brainmob.stat)
|
||||
to_chat(user, "Beta-rhythm below acceptable level.")
|
||||
return FALSE
|
||||
if(!user.unEquip(mmi_as_oc))
|
||||
if(!user.drop_item_to_ground(mmi_as_oc))
|
||||
to_chat(user, "<span class='notice'>\the [mmi_as_oc] is stuck to your hand, you cannot put it in \the [src]</span>")
|
||||
return FALSE
|
||||
var/mob/living/brain/brainmob = mmi_as_oc.brainmob
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1160,7 +1160,7 @@
|
||||
|
||||
//strip their stuff and stick it in the crate
|
||||
for(var/obj/item/I in M)
|
||||
if(M.unEquip(I))
|
||||
if(M.drop_item_to_ground(I))
|
||||
I.loc = locker
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
@@ -1302,7 +1302,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/item/I in M)
|
||||
M.unEquip(I)
|
||||
M.drop_item_to_ground(I)
|
||||
if(I)
|
||||
I.loc = M.loc
|
||||
I.layer = initial(I.layer)
|
||||
@@ -1334,7 +1334,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/item/I in M)
|
||||
M.unEquip(I)
|
||||
M.drop_item_to_ground(I)
|
||||
if(I)
|
||||
I.loc = M.loc
|
||||
I.layer = initial(I.layer)
|
||||
@@ -1390,7 +1390,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/item/I in M)
|
||||
M.unEquip(I)
|
||||
M.drop_item_to_ground(I)
|
||||
if(I)
|
||||
I.loc = M.loc
|
||||
I.layer = initial(I.layer)
|
||||
@@ -2212,7 +2212,7 @@
|
||||
logmsg = "floor cluwne"
|
||||
if("Shamebrero")
|
||||
if(H.head)
|
||||
H.unEquip(H.head, TRUE)
|
||||
H.drop_item_to_ground(H.head, force = TRUE)
|
||||
var/obj/item/clothing/head/sombrero/shamebrero/S = new(H.loc)
|
||||
H.equip_to_slot_or_del(S, ITEM_SLOT_HEAD)
|
||||
logmsg = "shamebrero"
|
||||
@@ -2963,7 +2963,7 @@
|
||||
if(!security)
|
||||
//strip their stuff before they teleport into a cell :downs:
|
||||
for(var/obj/item/W in H)
|
||||
H.unEquip(W)
|
||||
H.drop_item_to_ground(W)
|
||||
if(H.client)
|
||||
H.client.screen -= W
|
||||
if(W)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
var/obj/item/slot_item_ID = H.get_item_by_slot(ITEM_SLOT_ID)
|
||||
qdel(slot_item_ID)
|
||||
var/obj/item/slot_item_hand = H.get_item_by_slot(ITEM_SLOT_RIGHT_HAND)
|
||||
H.unEquip(slot_item_hand)
|
||||
H.drop_item_to_ground(slot_item_hand)
|
||||
|
||||
var/obj/item/multisword/pure_evil/multi = new(H)
|
||||
H.equip_to_slot_or_del(multi, ITEM_SLOT_RIGHT_HAND)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/item/W in M)
|
||||
M.unEquip(W)
|
||||
M.drop_item_to_ground(W)
|
||||
|
||||
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
|
||||
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
|
||||
@@ -28,7 +28,7 @@
|
||||
return
|
||||
//strip their stuff before they teleport into a cell :downs:
|
||||
for(var/obj/item/W in M)
|
||||
M.unEquip(W)
|
||||
M.drop_item_to_ground(W)
|
||||
//teleport person to cell
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
|
||||
@@ -84,9 +84,7 @@
|
||||
|
||||
/datum/action/changeling/biodegrade/proc/dissolve_restraint(mob/living/carbon/human/user, obj/O)
|
||||
if(O && (user.handcuffed == O || user.legcuffed == O || user.wear_suit == O))
|
||||
user.unEquip(O)
|
||||
O.visible_message("<span class='warning'>[O] dissolves into a puddle of sizzling goop.</span>")
|
||||
O.forceMove(get_turf(user))
|
||||
qdel(O)
|
||||
|
||||
/datum/action/changeling/biodegrade/proc/open_closet(mob/living/carbon/human/user, obj/structure/closet/C)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/datum/action/changeling/weapon/sting_action(mob/user)
|
||||
SEND_SIGNAL(user, COMSIG_MOB_WEAPON_APPEARS)
|
||||
if(!user.drop_item())
|
||||
if(user.get_active_hand() && !user.drop_item())
|
||||
to_chat(user, "[user.get_active_hand()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!")
|
||||
return FALSE
|
||||
var/obj/item/W = new weapon_type(user, silent, src)
|
||||
@@ -97,15 +97,14 @@
|
||||
..(H, target)
|
||||
|
||||
/datum/action/changeling/suit/sting_action(mob/living/carbon/human/user)
|
||||
if(!user.unEquip(user.wear_suit))
|
||||
to_chat(user, "\the [user.wear_suit] is stuck to your body, you cannot grow a [suit_name_simple] over it!")
|
||||
return FALSE
|
||||
if(!user.unEquip(user.head))
|
||||
to_chat(user, "\the [user.head] is stuck on your head, you cannot grow a [helmet_name_simple] over it!")
|
||||
return FALSE
|
||||
|
||||
user.unEquip(user.head)
|
||||
user.unEquip(user.wear_suit)
|
||||
if(user.wear_suit)
|
||||
if(!user.drop_item_to_ground(user.wear_suit))
|
||||
to_chat(user, "\the [user.wear_suit] is stuck to your body, you cannot grow a [suit_name_simple] over it!")
|
||||
return FALSE
|
||||
if(user.head)
|
||||
if(!user.drop_item_to_ground(user.head))
|
||||
to_chat(user, "\the [user.head] is stuck on your head, you cannot grow a [helmet_name_simple] over it!")
|
||||
return FALSE
|
||||
|
||||
user.equip_to_slot_if_possible(new suit_type(user), ITEM_SLOT_OUTER_SUIT, TRUE, TRUE)
|
||||
user.equip_to_slot_if_possible(new helmet_type(user), ITEM_SLOT_HEAD, TRUE, TRUE)
|
||||
@@ -438,7 +437,7 @@
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.visible_message("<span class='warning'>With a sickening crunch, [H] reforms [H.p_their()] shield into an arm!</span>", "<span class='notice'>We assimilate our shield into our body</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
playsound(loc, 'sound/effects/bone_break_2.ogg', 100, TRUE)
|
||||
H.unEquip(src, 1)
|
||||
H.unequip(src, force = TRUE)
|
||||
qdel(src)
|
||||
return FALSE
|
||||
else
|
||||
@@ -576,9 +575,9 @@
|
||||
// you've torn it up, get rid of it.
|
||||
new /obj/effect/decal/cleanable/shreds(owner.loc)
|
||||
// just unequip them since they qdel on drop
|
||||
owner.unEquip(src, TRUE, TRUE)
|
||||
owner.drop_item_to_ground(src, force = TRUE, silent = TRUE)
|
||||
if(istype(owner.head, /obj/item/clothing/head/helmet/changeling))
|
||||
owner.unEquip(owner.head, TRUE, TRUE)
|
||||
owner.drop_item_to_ground(owner.head, force = TRUE, silent = TRUE)
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ RESTRICT_TYPE(/datum/antagonist/cultist)
|
||||
if(remove_gear_on_removal)
|
||||
for(var/I in H.contents)
|
||||
if(is_type_in_list(I, CULT_CLOTHING))
|
||||
H.unEquip(I)
|
||||
H.drop_item_to_ground(I)
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
create_new_weapon()
|
||||
weapon_ref.flags |= (ABSTRACT | NODROP) // Just in case the item doesn't start with both of these, or somehow loses them.
|
||||
|
||||
if(!user.drop_item() || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || (user.get_active_hand() && !user.drop_item()))
|
||||
flayer.send_swarm_message("We cannot manifest [weapon_ref] into our active hand...")
|
||||
return FALSE
|
||||
|
||||
@@ -53,8 +53,7 @@
|
||||
SIGNAL_HANDLER // COMSIG_MOB_WILLINGLY_DROP + COMSIG_FLAYER_RETRACT_IMPLANTS
|
||||
if(!any_hand && !istype(owner.get_active_hand(), weapon_type))
|
||||
return
|
||||
INVOKE_ASYNC(owner, TYPE_PROC_REF(/mob, unEquip), weapon_ref, TRUE)
|
||||
INVOKE_ASYNC(weapon_ref, TYPE_PROC_REF(/atom/movable, forceMove), owner) // Just kinda shove it into the user
|
||||
owner.transfer_item_to(weapon_ref, owner, force = TRUE, silent = TRUE)
|
||||
owner.update_inv_l_hand()
|
||||
owner.update_inv_r_hand()
|
||||
playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 25, TRUE, ignore_walls = FALSE)
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
|
||||
if(M.back) //Lets not bork modsuits in funny ways.
|
||||
var/obj/modsuit_safety = M.back
|
||||
M.unEquip(modsuit_safety)
|
||||
M.drop_item_to_ground(modsuit_safety)
|
||||
stuff_to_transfer += modsuit_safety
|
||||
// Regular items get removed in second
|
||||
for(var/obj/item/I in M)
|
||||
@@ -385,14 +385,14 @@
|
||||
qdel(I)
|
||||
continue
|
||||
|
||||
if(M.unEquip(I))
|
||||
if(M.drop_item_to_ground(I))
|
||||
stuff_to_transfer += I
|
||||
|
||||
// Remove accessories from the suit if present
|
||||
if(length(H.w_uniform?.accessories))
|
||||
for(var/obj/item/clothing/accessory/A in H.w_uniform.accessories)
|
||||
H.w_uniform.detach_accessory(A, null)
|
||||
H.unEquip(A)
|
||||
H.drop_item_to_ground(A)
|
||||
stuff_to_transfer += A
|
||||
|
||||
// Transfer it all (or drop it if not possible)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
src.color = pick(GLOB.random_color_list)
|
||||
var/prize_inside = pick(possible_contents)
|
||||
spawn(10)
|
||||
user.unEquip(src)
|
||||
user.unequip(src)
|
||||
if(ispath(prize_inside,/obj/item/stack))
|
||||
var/amount = pick(5, 10, 15, 25, 50)
|
||||
new prize_inside(user.loc, amount)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
/obj/machinery/prize_counter/attackby__legacy__attackchain(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/stack/tickets))
|
||||
var/obj/item/stack/tickets/T = O
|
||||
if(user.unEquip(T)) //Because if you can't drop it for some reason, you shouldn't be increasing the tickets var
|
||||
if(user.drop_item_to_ground(T))
|
||||
tickets += T.amount
|
||||
SStgui.update_uis(src)
|
||||
qdel(T)
|
||||
|
||||
@@ -34,12 +34,14 @@
|
||||
return FALSE
|
||||
if(!A1.remove_item_from_storage(src))
|
||||
if(user)
|
||||
user.remove_from_mob(A1)
|
||||
A1.forceMove(src)
|
||||
user.transfer_item_to(A1, src)
|
||||
else
|
||||
A1.forceMove(src)
|
||||
if(!A2.remove_item_from_storage(src))
|
||||
if(user)
|
||||
user.remove_from_mob(A2)
|
||||
A2.forceMove(src)
|
||||
user.transfer_item_to(A2, src)
|
||||
else
|
||||
A2.forceMove(src)
|
||||
A1.holder = src
|
||||
A2.holder = src
|
||||
a_left = A1
|
||||
@@ -171,7 +173,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return FALSE
|
||||
user.unEquip(src, TRUE, TRUE)
|
||||
user.unequip(src, force = TRUE)
|
||||
if(a_left)
|
||||
a_left.holder = null
|
||||
a_left.forceMove(T)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
var/obj/item/onetankbomb/R = new /obj/item/onetankbomb(loc)
|
||||
|
||||
M.drop_item() //Remove the assembly from your hands
|
||||
M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
|
||||
M.unequip(src) //Remove the tank from your character,in case you were holding it
|
||||
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
|
||||
|
||||
R.bombassembly = S //Tell the bomb about its assembly part
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user