Merge pull request #2091 from Fox-McCloud/destroy-them-all

Fixes up a few Destroys
This commit is contained in:
TheDZD
2015-09-18 22:30:49 -04:00
28 changed files with 155 additions and 98 deletions
+4 -3
View File
@@ -107,6 +107,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/simple/Destroy()
if(target.client) target.client.images.Remove(current_image)
active = 0
return ..()
#define FAKE_FLOOD_EXPAND_TIME 30
#define FAKE_FLOOD_MAX_RADIUS 7
@@ -156,11 +157,11 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/fake_flood/Destroy()
processing_objects -= src
del(flood_turfs)
qdel(flood_turfs)
if(target.client) target.client.images.Remove(flood_images)
target = null
del(flood_images)
return
qdel(flood_images)
return ..()
/obj/effect/hallucination/simple/xeno
image_icon = 'icons/mob/alien.dmi'
+5
View File
@@ -127,6 +127,11 @@
var/attacher = "UNKNOWN"
var/datum/wires/explosive/gibtonite/wires
/obj/item/weapon/twohanded/required/gibtonite/Destroy()
qdel(wires)
wires = null
return ..()
/obj/item/weapon/twohanded/required/gibtonite/attackby(obj/item/I, mob/user, params)
if(!wires && istype(I, /obj/item/device/assembly/igniter))
user.visible_message("[user] attaches [I] to [src].", "<span class='notice'>You attach [I] to [src].</span>")
@@ -202,6 +202,8 @@ var/list/robot_verbs_default = list(
mmi = null
if(connected_ai)
connected_ai.connected_robots -= src
qdel(wires)
wires = null
return ..()
/mob/living/silicon/robot/proc/pick_module()
+2
View File
@@ -426,6 +426,7 @@
/obj/item/weapon/grab/dropped()
qdel(src)
/obj/item/weapon/grab/Destroy()
if(affecting)
affecting.pixel_x = 0
@@ -435,6 +436,7 @@
qdel(hud)
return ..()
#undef EAT_TIME_XENO
#undef EAT_TIME_FAT
+20
View File
@@ -22,6 +22,26 @@ var/list/organ_cache = list()
// links chemical IDs to number of ticks for which they'll stay in the blood
germ_level = 0
/obj/item/organ/Destroy()
if(!owner)
return ..()
if(istype(owner, /mob/living/carbon))
if((owner.internal_organs) && (src in owner.internal_organs))
owner.internal_organs -= src
if(istype(owner, /mob/living/carbon/human))
if((owner.internal_organs_by_name) && (src in owner.internal_organs_by_name))
owner.internal_organs_by_name -= src
if((owner.organs) && (src in owner.organs))
owner.organs -= src
if((owner.organs_by_name) && (src in owner.organs_by_name))
owner.organs_by_name -= src
if(src in owner.contents)
owner.contents -= src
return ..()
/obj/item/organ/attack_self(mob/user as mob)
// Convert it to an edible form, yum yum.
+23 -10
View File
@@ -7,10 +7,10 @@
max_damage = 0
dir = SOUTH
organ_tag = "limb"
var/brute_mod = 1
var/burn_mod = 1
var/icon_name = null
var/body_part = null
var/icon_position = 0
@@ -61,6 +61,19 @@
var/can_grasp
var/can_stand
/obj/item/organ/external/Destroy()
if(parent && parent.children)
parent.children -= src
if(children)
for(var/obj/item/organ/external/C in children)
qdel(C)
if(internal_organs)
for(var/obj/item/organ/O in internal_organs)
qdel(O)
return ..()
/obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/user as mob)
switch(stage)
@@ -120,7 +133,7 @@
if(!parent.children)
parent.children = list()
parent.children.Add(src)
/obj/item/organ/external/robotize()
..()
//robot limbs take reduced damage
@@ -137,7 +150,7 @@
if(status & ORGAN_DESTROYED)
return 0
brute *= brute_mod
burn *= burn_mod
@@ -311,7 +324,7 @@ This function completely restores a damaged organ to perfect condition.
"<span class='alert'>The wound on your [name] widens with a nasty ripping noise.</span>",\
"You hear a nasty ripping noise, as if flesh is being torn apart.")
return
//Creating wound
var/wound_type = get_wound_type(type, damage)
@@ -536,8 +549,8 @@ Note that amputating the affected organ does in fact remove the infection from t
var/mob/living/carbon/human/H
if(istype(owner,/mob/living/carbon/human))
H = owner
H = owner
for(var/datum/wound/W in wounds)
if(W.damage_type == CUT || W.damage_type == BRUISE)
brute_dam += W.damage
@@ -554,7 +567,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if (open && !clamped && (H && !(H.species.flags & NO_BLOOD)))
status |= ORGAN_BLEEDING
//Bone fractures
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
src.fracture()
@@ -723,7 +736,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/fracture()
if(status & ORGAN_ROBOT)
return //ORGAN_BROKEN doesn't have the same meaning for robot limbs
if((status & ORGAN_BROKEN) || cannot_break)
return
if(owner)
@@ -787,7 +800,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/is_usable()
if((status & ORGAN_ROBOT) && get_damage() >= max_damage) //robot limbs just become inoperable at max damage
return
return
return !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
/obj/item/organ/external/proc/is_malfunctioning()
+1
View File
@@ -157,6 +157,7 @@
if(occupier)
malfvacate(1)
qdel(wires)
wires = null
if(cell)
qdel(cell) // qdel
if(terminal)
+8 -8
View File
@@ -123,7 +123,7 @@
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
component_parts += new board_path(null)
RefreshParts()
/obj/machinery/power/port_gen/pacman/upgraded/New()
..()
component_parts = list()
@@ -137,7 +137,7 @@
/obj/machinery/power/port_gen/pacman/Destroy()
DropFuel()
..()
return ..()
/obj/machinery/power/port_gen/pacman/RefreshParts()
var/temp_rating = 0
@@ -255,11 +255,11 @@
sheets = 0
sheet_left = 0
..()
/obj/machinery/power/port_gen/pacman/emag_act(var/remaining_charges, var/mob/user)
if (active && prob(25))
explode() //if they're foolish enough to emag while it's running
if (!emagged)
emagged = 1
return 1
@@ -311,7 +311,7 @@
/obj/machinery/power/port_gen/pacman/attack_ai(var/mob/user as mob)
src.add_hiddenprint(user)
return src.attack_hand(user)
/obj/machinery/power/port_gen/pacman/attack_ghost(var/mob/user)
return src.attack_hand(user)
@@ -370,7 +370,7 @@
if (href_list["action"] == "higher_power")
if (power_output < max_power_output || (emagged && power_output < round(max_power_output*2.5)))
power_output++
nanomanager.update_uis(src)
/obj/machinery/power/port_gen/pacman/super
@@ -381,7 +381,7 @@
sheet_name = "Uranium Sheets"
time_per_sheet = 576 //same power output, but a 50 sheet stack will last 2 hours at max safe power
board_path = /obj/item/weapon/circuitboard/pacman/super
/obj/machinery/power/port_gen/pacman/super/upgraded/New()
..()
component_parts = list()
@@ -427,7 +427,7 @@
max_temperature = 800
temperature_gain = 90
board_path = /obj/item/weapon/circuitboard/pacman/mrs
/obj/machinery/power/port_gen/pacman/mrs/upgraded/New()
..()
component_parts = list()
@@ -29,8 +29,10 @@
/obj/machinery/particle_accelerator/control_box/Destroy()
if(active)
toggle_power()
qdel(wires)
wires = null
return ..()
/obj/machinery/particle_accelerator/control_box/attack_ghost(user as mob)
return src.attack_hand(user)
@@ -126,7 +128,7 @@
log_game("PA Control Computer increased to [strength] by [key_name(usr)] in ([x],[y],[z])")
investigate_log("increased to <font color='red'>[strength]</font> by [key_name(usr)]","singulo")
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([key_name(usr)]) has increased the PA Control Computer to [strength].</font>")
investigate_log("increased to <font color='red'>[strength]</font> by [usr.key]","singulo")
strength_change()
@@ -139,7 +141,7 @@
message_admins("PA Control Computer decreased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("PA Control Computer decreased to [strength] by [key_name(usr)] in ([x],[y],[z])")
investigate_log("decreased to <font color='green'>[strength]</font> by [key_name(usr)]","singulo")
use_log += text("\[[time_stamp()]\] <font color='orange'>[usr.name] ([key_name(usr)]) has decreased the PA Control Computer to [strength].</font>")
use_log += text("\[[time_stamp()]\] <font color='orange'>[usr.name] ([key_name(usr)]) has decreased the PA Control Computer to [strength].</font>")
strength_change()