From 89df78efc455cfaf3c42a58590ac8ad60f1a95a1 Mon Sep 17 00:00:00 2001 From: jack-fractal Date: Wed, 22 Jul 2015 19:37:31 -0400 Subject: [PATCH 1/2] Adding HoloCarp Adding holocarp to the holodeck. They spark before disappearing on death. No more random carp corpses from a holodeck. They also look like holograms. --- .../machinery/computer/HolodeckControl.dm | 2 +- .../mob/living/simple_animal/hostile/carp.dm | 36 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index d059e310..72533e80 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -370,7 +370,7 @@ T.temperature = 5000 T.hotspot_expose(50000,50000,1) if(L.name=="Holocarp Spawn") - new /mob/living/simple_animal/hostile/carp(L.loc) + new /mob/living/simple_animal/hostile/carp/hologram(L.loc) /obj/machinery/computer/HolodeckControl/proc/emergencyShutdown() diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index e67a884e..4f411067 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -66,4 +66,38 @@ icon_state = "critter" icon_living = "critter" icon_dead = "critter_dead" - attackv = "swoops" \ No newline at end of file + attackv = "swoops" + +// Holographic carp for the holodeck + +/mob/living/simple_animal/hostile/carp/hologram + name = "space carp" + desc = "A solid light image of a ferocious, fang-bearing creature resembling a fish. It flickers inconsistently but appears to be able to affect solid matter." + icon_state = "holocarp" + icon_living = "holocarp" + icon_dead = "carp_dead" + icon_gib = "carp_gib" + meat_type = null + var/datum/effect/effect/system/spark_spread/spark_system // for when they die + + +/mob/living/simple_animal/hostile/carp/hologram/New(loc) + var/result = ..(loc) + spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, src) + spark_system.attach(src) + return result + + +/mob/living/simple_animal/hostile/carp/hologram/death() + src.spark_system.start() // sparks for holograms! Hurray! + stat = DEAD + density = 0 + var/result=..() + src.visible_message("[src] sparks and then flickers out of existence.") + del(src) + return result + + +/mob/living/simple_animal/hostile/carp/hologram/gib() + return death() \ No newline at end of file From 760d7e098ec917a6df0b2132ed935d793b61f553 Mon Sep 17 00:00:00 2001 From: jack-fractal Date: Thu, 23 Jul 2015 22:01:34 -0400 Subject: [PATCH 2/2] Simplifying code This is interesting! --- code/modules/mob/living/simple_animal/hostile/carp.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index 4f411067..d5512d32 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -82,21 +82,19 @@ /mob/living/simple_animal/hostile/carp/hologram/New(loc) - var/result = ..(loc) + . = ..(loc) spark_system = new /datum/effect/effect/system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) - return result /mob/living/simple_animal/hostile/carp/hologram/death() src.spark_system.start() // sparks for holograms! Hurray! stat = DEAD density = 0 - var/result=..() + . = ..() src.visible_message("[src] sparks and then flickers out of existence.") del(src) - return result /mob/living/simple_animal/hostile/carp/hologram/gib()