mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Moves destroy_on_drop to TG style and adds signal (#11640)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e62583c5c4
commit
e97dd3d6e2
@@ -129,7 +129,6 @@
|
||||
var/list/warned_of_possession //Checks to see who has been informed this item is possessed.
|
||||
var/cleaving = FALSE // Used to avoid infinite cleaving.
|
||||
var/list/tool_qualities
|
||||
var/destroy_on_drop = FALSE // Used by augments to determine if the item should destroy itself when dropped, or return to its master.
|
||||
var/obj/item/organ/my_augment = null // Used to reference the object's host organ.
|
||||
var/datum/identification/identity = null
|
||||
var/identity_type = /datum/identification
|
||||
@@ -429,6 +428,14 @@
|
||||
for(var/datum/action/action_item_has as anything in actions)
|
||||
action_item_has.Remove(user)
|
||||
|
||||
if((item_flags & DROPDEL) && !QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED, user)
|
||||
|
||||
if(my_augment && !QDELETED(src))
|
||||
forceMove(my_augment)
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
|
||||
|
||||
@@ -301,6 +301,7 @@ var/last_chew = 0
|
||||
use_time = 0
|
||||
breakouttime = 30
|
||||
cuff_sound = 'sound/weapons/towelwipe.ogg' //Is there anything this sound can't do?
|
||||
item_flags = DROPDEL
|
||||
|
||||
/obj/item/handcuffs/legcuffs/bola/can_place(var/mob/target, var/mob/user)
|
||||
if(user) //A ranged legcuff, until proper implementation as items it remains a projectile-only thing.
|
||||
@@ -309,7 +310,6 @@ var/last_chew = 0
|
||||
/obj/item/handcuffs/legcuffs/bola/dropped(mob/user)
|
||||
..()
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " falls apart!"))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/handcuffs/legcuffs/bola/place_legcuffs(var/mob/living/carbon/target, var/mob/user)
|
||||
playsound(src, cuff_sound, 30, 1, -2)
|
||||
|
||||
@@ -407,6 +407,7 @@
|
||||
active_armourpen = 25
|
||||
projectile_parry_chance = 40
|
||||
colorable = TRUE
|
||||
item_flags = DROPDEL | NOSTRIP
|
||||
|
||||
hitcost = 75
|
||||
|
||||
@@ -422,6 +423,7 @@
|
||||
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
|
||||
icon_state = "blade"
|
||||
item_state = "blade"
|
||||
item_flags = DROPDEL | NOSTRIP
|
||||
force = 40 //Normal attacks deal very high damage - about the same as wielded fire axe
|
||||
armor_penetration = 100
|
||||
sharp = TRUE
|
||||
@@ -455,10 +457,6 @@
|
||||
user.drop_from_inventory(src)
|
||||
QDEL_IN(src, 1)
|
||||
|
||||
/obj/item/melee/energy/blade/dropped(mob/user)
|
||||
..()
|
||||
QDEL_IN(src, 1)
|
||||
|
||||
/obj/item/melee/energy/blade/process()
|
||||
if(!creator || loc != creator || !creator.item_is_in_hands(src))
|
||||
// Tidy up a bit.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "Deployable mop."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mop"
|
||||
item_flags = DROPDEL | NOSTRIP
|
||||
force = 3
|
||||
anchored = TRUE // Never spawned outside of inventory, should be fine.
|
||||
throwforce = 1 //Throwing or dropping the item deletes it.
|
||||
@@ -57,10 +58,6 @@
|
||||
user.drop_from_inventory(src)
|
||||
spawn(1) if(!QDELETED(src)) qdel(src)
|
||||
|
||||
/obj/item/mop_deploy/dropped(mob/user)
|
||||
..()
|
||||
spawn(1) if(!QDELETED(src)) qdel(src)
|
||||
|
||||
/obj/item/mop_deploy/process()
|
||||
if(!creator || loc != creator || !creator.item_is_in_hands(src))
|
||||
// Tidy up a bit.
|
||||
|
||||
@@ -612,9 +612,6 @@
|
||||
W.add_fingerprint(user)
|
||||
return handle_item_insertion(W)
|
||||
|
||||
/obj/item/storage/dropped(mob/user)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/attack_hand(mob/user as mob)
|
||||
if(ishuman(user) && !pocketable)
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
Reference in New Issue
Block a user