mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Adds DROPDEL flag; items will qdel() on dropped()
Pretty self explanatory, replaces writing a dropped() proc that just calls qdel() with a flag that does it for you.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#define FPRINT 256 // takes a fingerprint
|
||||
#define ON_BORDER 512 // item has priority to check when entering or leaving
|
||||
#define HOLOGRAM 32768 // HOlodeck shit should not be used in any fucking things
|
||||
|
||||
#define DROPDEL 1024 // When dropped, it calls qdel on itself
|
||||
|
||||
#define HEADBANGPROTECT 4096
|
||||
#define EARBANGPROTECT 1024
|
||||
|
||||
@@ -68,7 +68,7 @@ var/const/tk_maxrange = 15
|
||||
desc = "Magic"
|
||||
icon = 'icons/obj/magic.dmi'//Needs sprites
|
||||
icon_state = "2"
|
||||
flags = NOBLUDGEON | ABSTRACT
|
||||
flags = NOBLUDGEON | ABSTRACT | DROPDEL
|
||||
//item_state = null
|
||||
w_class = 10
|
||||
layer = ABOVE_HUD_LAYER
|
||||
@@ -82,10 +82,7 @@ var/const/tk_maxrange = 15
|
||||
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
|
||||
if(focus.Adjacent(loc))
|
||||
focus.loc = loc
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
/obj/item/tk_grab/equipped(mob/user, slot)
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "arm_blade"
|
||||
item_state = "arm_blade"
|
||||
flags = ABSTRACT | NODROP
|
||||
flags = ABSTRACT | NODROP | DROPDEL
|
||||
w_class = 5.0
|
||||
force = 25
|
||||
throwforce = 0 //Just to be on the safe side
|
||||
@@ -163,9 +163,6 @@
|
||||
if(ismob(loc) && !silent)
|
||||
loc.visible_message("<span class='warning'>A grotesque blade forms around [loc.name]\'s arm!</span>", "<span class='warning'>Our arm twists and mutates, transforming it into a deadly blade.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
|
||||
/obj/item/weapon/melee/arm_blade/dropped(mob/user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/melee/arm_blade/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
@@ -230,7 +227,7 @@
|
||||
/obj/item/weapon/shield/changeling
|
||||
name = "shield-like mass"
|
||||
desc = "A mass of tough, boney tissue. You can still see the fingers as a twisted pattern in the shield."
|
||||
flags = ABSTRACT | NODROP
|
||||
flags = ABSTRACT | NODROP | DROPDEL
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "ling_shield"
|
||||
block_chance = 50
|
||||
@@ -242,9 +239,6 @@
|
||||
if(ismob(loc))
|
||||
loc.visible_message("<span class='warning'>The end of [loc.name]\'s hand inflates rapidly, forming a huge shield-like mass!</span>", "<span class='warning'>We inflate our hand into a strong shield.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
|
||||
/obj/item/clothing/head/helmet/space/changeling/dropped()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/shield/changeling/hit_reaction()
|
||||
if(remaining_uses < 1)
|
||||
if(ishuman(loc))
|
||||
@@ -282,7 +276,7 @@
|
||||
name = "flesh mass"
|
||||
icon_state = "lingspacesuit"
|
||||
desc = "A huge, bulky mass of pressure and temperature-resistant organic tissue, evolved to facilitate space travel."
|
||||
flags = STOPSPRESSUREDMAGE | NODROP //Not THICKMATERIAL because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff)
|
||||
flags = STOPSPRESSUREDMAGE | NODROP | DROPDEL //Not THICKMATERIAL because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff)
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank/internals/emergency_oxygen, /obj/item/weapon/tank/internals/oxygen)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) //No armor at all.
|
||||
|
||||
@@ -292,9 +286,6 @@
|
||||
loc.visible_message("<span class='warning'>[loc.name]\'s flesh rapidly inflates, forming a bloated mass around their body!</span>", "<span class='warning'>We inflate our flesh, creating a spaceproof suit!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
SSobj.processing += src
|
||||
|
||||
/obj/item/clothing/suit/space/changeling/dropped()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/clothing/suit/space/changeling/process()
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
@@ -304,14 +295,10 @@
|
||||
name = "flesh mass"
|
||||
icon_state = "lingspacehelmet"
|
||||
desc = "A covering of pressure and temperature-resistant organic tissue with a glass-like chitin front."
|
||||
flags = STOPSPRESSUREDMAGE | NODROP //Again, no THICKMATERIAL.
|
||||
flags = STOPSPRESSUREDMAGE | NODROP | DROPDEL //Again, no THICKMATERIAL.
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
|
||||
/obj/item/clothing/head/helmet/space/changeling/dropped()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/***************************************\
|
||||
|*****************ARMOR*****************|
|
||||
\***************************************/
|
||||
@@ -335,7 +322,7 @@
|
||||
name = "chitinous mass"
|
||||
desc = "A tough, hard covering of black chitin."
|
||||
icon_state = "lingarmor"
|
||||
flags = NODROP
|
||||
flags = NODROP | DROPDEL
|
||||
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
armor = list(melee = 40, bullet = 40, laser = 40, energy = 20, bomb = 10, bio = 4, rad = 0)
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
@@ -347,16 +334,10 @@
|
||||
if(ismob(loc))
|
||||
loc.visible_message("<span class='warning'>[loc.name]\'s flesh turns black, quickly transforming into a hard, chitinous mass!</span>", "<span class='warning'>We harden our flesh, creating a suit of armor!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
|
||||
/obj/item/clothing/suit/armor/changeling/dropped()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/clothing/head/helmet/changeling
|
||||
name = "chitinous mass"
|
||||
desc = "A tough, hard covering of black chitin with transparent chitin in front."
|
||||
icon_state = "lingarmorhelmet"
|
||||
flags = NODROP
|
||||
flags = NODROP | DROPDEL
|
||||
armor = list(melee = 30, bullet = 30, laser = 40, energy = 20, bomb = 10, bio = 4, rad = 0)
|
||||
flags_inv = HIDEEARS|HIDEHAIR|HIDEEYES|HIDEFACIALHAIR|HIDEFACE
|
||||
|
||||
/obj/item/clothing/head/helmet/changeling/dropped()
|
||||
qdel(src)
|
||||
|
||||
@@ -408,8 +408,9 @@
|
||||
desc = "Shackles that bind the wrists with sinister magic."
|
||||
trashtype = /obj/item/weapon/restraints/handcuffs/energy/used
|
||||
origin_tech = "materials=2;magnets=5"
|
||||
flags = DROPDEL
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/energy/cult/used/dropped(mob/user)
|
||||
user.visible_message("<span class='danger'>[user]'s shackles shatter in a discharge of dark magic!</span>", \
|
||||
"<span class='userdanger'>Your [src] shatters in a discharge of dark magic!</span>")
|
||||
qdel(src)
|
||||
. = ..()
|
||||
|
||||
@@ -511,6 +511,7 @@ Congratulations! You are now trained for xenobiology research!"}
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/energy/used
|
||||
desc = "energy discharge"
|
||||
flags = DROPDEL
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/energy/used/dropped(mob/user)
|
||||
user.visible_message("<span class='danger'>[user]'s [src] break in a discharge of energy!</span>", \
|
||||
@@ -518,7 +519,7 @@ Congratulations! You are now trained for xenobiology research!"}
|
||||
var/datum/effect_system/spark_spread/S = new
|
||||
S.set_up(4,0,user.loc)
|
||||
S.start()
|
||||
qdel(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/abductor_baton/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -358,6 +358,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(user)
|
||||
if(DROPDEL & flags)
|
||||
qdel(src)
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
icon_state = "chronogun"
|
||||
item_state = "chronogun"
|
||||
w_class = 3
|
||||
flags = NODROP
|
||||
flags = NODROP | DROPDEL
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/chrono_beam)
|
||||
can_charge = 0
|
||||
fire_delay = 50
|
||||
@@ -62,10 +62,6 @@
|
||||
TED = new(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/gun/energy/chrono_gun/dropped()
|
||||
..()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/gun/energy/chrono_gun/update_icon()
|
||||
return
|
||||
|
||||
@@ -264,4 +260,4 @@
|
||||
|
||||
|
||||
#undef CHRONO_BEAM_RANGE
|
||||
#undef CHRONO_FRAME_COUNT
|
||||
#undef CHRONO_FRAME_COUNT
|
||||
|
||||
@@ -290,19 +290,18 @@
|
||||
armed = 1
|
||||
icon_state = "e_snare"
|
||||
trap_damage = 0
|
||||
flags = DROPDEL
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/energy/New()
|
||||
..()
|
||||
spawn(100)
|
||||
if(!istype(loc, /mob))
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
qdel(src)
|
||||
addtimer(src, "dissipate", 100)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/energy/dropped()
|
||||
..()
|
||||
qdel(src)
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/energy/proc/dissipate()
|
||||
if(!istype(loc, /mob))
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
|
||||
Crossed(user) //honk
|
||||
|
||||
@@ -49,15 +49,12 @@
|
||||
item_state = "disintegrate"
|
||||
name = "god hand"
|
||||
desc = "This hand of yours glows with an awesome power!"
|
||||
flags = ABSTRACT | NODROP
|
||||
flags = ABSTRACT | NODROP | DROPDEL
|
||||
w_class = 5
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
damtype = BURN
|
||||
attack_verb = list("punched", "cross countered", "pummeled")
|
||||
|
||||
/obj/item/weapon/nullrod/godhand/dropped(mob/user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/nullrod/staff
|
||||
icon_state = "godstaff-red"
|
||||
item_state = "godstaff-red"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
item_color = "b"
|
||||
var/allow_multiple = 0
|
||||
var/uses = -1
|
||||
flags = DROPDEL
|
||||
|
||||
|
||||
/obj/item/weapon/implant/proc/trigger(emote, mob/source)
|
||||
@@ -73,12 +74,9 @@
|
||||
removed(imp_in)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/implant/proc/get_data()
|
||||
return "No information available"
|
||||
|
||||
/obj/item/weapon/implant/dropped(mob/user)
|
||||
..()
|
||||
. = 1
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -147,7 +147,6 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/minigun/dropped(mob/living/user)
|
||||
ammo_pack.attach_gun(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/minigun/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
..()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
unconcious or dead humans, butchering all other living things to \
|
||||
sustain the zombie, forcing open airlock doors and opening \
|
||||
child-safe caps on bottles."
|
||||
flags = NODROP|ABSTRACT
|
||||
flags = NODROP|ABSTRACT|DROPDEL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "bloodhand_left"
|
||||
var/icon_left = "bloodhand_left"
|
||||
@@ -24,11 +24,6 @@
|
||||
if(slot_r_hand)
|
||||
icon_state = icon_left
|
||||
|
||||
/obj/item/zombie_hand/dropped(mob/user)
|
||||
. = ..()
|
||||
// Zombie hands are force dropped upon species loss
|
||||
qdel(src)
|
||||
|
||||
/obj/item/zombie_hand/afterattack(atom/target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
if(!proximity_flag)
|
||||
|
||||
Reference in New Issue
Block a user