Merge pull request #2346 from Fox-McCloud/suspicious-dereferencing

More Dereferencing
This commit is contained in:
TheDZD
2015-10-12 16:36:14 -04:00
17 changed files with 76 additions and 38 deletions
+36 -27
View File
@@ -3,34 +3,43 @@
desc = "A small electronic device able to ignite combustable substances."
icon_state = "igniter"
materials = list(MAT_METAL=500, MAT_GLASS=50)
w_amt = 10
origin_tech = "magnets=1"
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread
describe()
return "The igniter is [secured?"secured.":"unsecured."]"
/obj/item/device/assembly/igniter/New()
..()
sparks.set_up(2, 0, src)
sparks.attach(src)
/obj/item/device/assembly/igniter/Destroy()
qdel(sparks)
sparks = null
return ..()
/obj/item/device/assembly/igniter/describe()
return "The igniter is [secured?"secured.":"unsecured."]"
/obj/item/device/assembly/igniter/activate()
if(!..()) return 0//Cooldown check
var/turf/location = get_turf(loc)
if(location) location.hotspot_expose(1000,1000)
if (istype(src.loc,/obj/item/device/assembly_holder))
if (istype(src.loc.loc, /obj/structure/reagent_dispensers/fueltank/))
var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc
if (tank)
tank.explode()
if (istype(src.loc.loc, /obj/item/weapon/reagent_containers/glass/beaker/))
var/obj/item/weapon/reagent_containers/glass/beaker/beakerbomb = src.loc.loc
if(beakerbomb)
beakerbomb.heat_beaker()
sparks.start()
return 1
/obj/item/device/assembly/igniter/attack_self(mob/user as mob)
activate()
if(!..()) return 0//Cooldown check
var/turf/location = get_turf(loc)
if(location) location.hotspot_expose(1000,1000)
if (istype(src.loc,/obj/item/device/assembly_holder))
if (istype(src.loc.loc, /obj/structure/reagent_dispensers/fueltank/))
var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc
if (tank)
tank.explode()
if (istype(src.loc.loc, /obj/item/weapon/reagent_containers/glass/beaker/))
var/obj/item/weapon/reagent_containers/glass/beaker/beakerbomb = src.loc.loc
if(beakerbomb)
beakerbomb.heat_beaker()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
return 1
attack_self(mob/user as mob)
activate()
add_fingerprint(user)
return
add_fingerprint(user)
return
+2
View File
@@ -11,7 +11,9 @@
/obj/item/assembly/shock_kit/Destroy()
qdel(part1)
part1 = null
qdel(part2)
part2 = null
return ..()
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
+6
View File
@@ -27,6 +27,12 @@
spawn(1) // For things that set the frequency directly
set_frequency(frequency)
return
Destroy()
if(radio_controller)
radio_controller.remove_object(src,frequency)
return ..()
describe()
return "\The [src]'s power light is [receiving?"on":"off"]"
@@ -1,4 +1,4 @@
/obj/machinery/power/supermatter
/obj/machinery/power/supermatter_shard
description_info = "When energized by a laser (or something hitting it), it emits radiation and heat. If the heat reaches above 7000 kelvin, it will send an alert and start taking damage. \
After integrity falls to zero percent, it will delaminate, causing a massive explosion, station-wide radiation spikes, and hallucinations. \
Supermatter reacts badly to oxygen in the atmosphere. It'll also heat up really quick if it is in vacuum.<br>\
@@ -161,7 +161,7 @@
..()
qdel(src)
/mob/living/simple_animal/hostile/retaliate/malf_drone/Destroy()
/mob/living/simple_animal/hostile/retaliate/malf_drone/Destroy() //Seriously, what the actual hell.
//some random debris left behind
if(has_loot)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+3 -1
View File
@@ -30,7 +30,9 @@
client.images = null //remove the images such as AIs being unable to see runes
client.screen = list() //remove hud items just in case
if(hud_used) qdel(hud_used) //remove the hud objects
if(hud_used)
qdel(hud_used) //remove the hud objects
hud_used = null
hud_used = new /datum/hud(src)
next_move = 1
+1
View File
@@ -3,6 +3,7 @@
dead_mob_list -= src
living_mob_list -= src
qdel(hud_used)
hud_used = null
if(mind && mind.current == src)
spellremove(src)
ghostize()
@@ -45,6 +45,7 @@
/obj/singularity/Destroy()
processing_objects.Remove(src)
singularities -= src
target = null
return ..()
/obj/singularity/Move(atom/newloc, direct)
@@ -72,6 +72,7 @@
/obj/machinery/power/supermatter_shard/Destroy()
investigate_log("has been destroyed.", "supermatter")
qdel(radio)
radio = null
return ..()
/obj/machinery/power/supermatter_shard/proc/explode()
@@ -233,7 +234,7 @@
/obj/machinery/power/supermatter_shard/attack_ai(mob/user as mob)
ui_interact(user)
/obj/machinery/power/supermatter_shard/attack_ghost(mob/user as mob)
ui_interact(user)
@@ -242,16 +243,16 @@
"<span class=\"danger\">You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>",\
"<span class=\"warning\">You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.</span>")
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
Consume(user)
/obj/machinery/power/supermatter_shard/proc/get_integrity()
var/integrity = damage / explosion_point
integrity = round(100 - integrity * 100)
integrity = integrity < 0 ? 0 : integrity
return integrity
// This is purely informational UI that may be accessed by AIs or robots
/obj/machinery/power/supermatter_shard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]