NEW BOO SYSTEM!

Conflicts:
	code/datums/spell.dm
	code/modules/mob/dead/observer/observer.dm
This commit is contained in:
Rob Nelson
2014-01-18 23:28:21 -08:00
committed by ZomgPonies
parent ef2586a3e7
commit cd2c20a6fe
9 changed files with 166 additions and 32 deletions
+60 -4
View File
@@ -30,6 +30,9 @@
see_in_dark = 100
verbs += /mob/dead/observer/proc/dead_tele
// Our new boo spell.
spell_list += new /obj/effect/proc_holder/spell/aoe_turf/boo(src)
can_reenter_corpse = flags & GHOST_CAN_REENTER
started_as_observer = flags & GHOST_IS_OBSERVER
@@ -432,18 +435,19 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
A.loc = T
else
A << "This mob is not located in the game world."
/*
/* Now a spell. See spells.dm
/mob/dead/observer/verb/boo()
set category = "Ghost"
set name = "Boo!"
set desc= "Scare your crew members because of boredom!"
if(bootime > world.time) return
bootime = world.time + 600
var/obj/machinery/light/L = locate(/obj/machinery/light) in view(1, src)
if(L)
L.flicker()
bootime = world.time + 600
return
//Maybe in the future we can add more <i>spooky</i> code here!
return
*/
@@ -456,6 +460,58 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set hidden = 1
src << "\red You are dead! You have no mind to store memory!"
/mob/dead/observer/verb/analyze_air()
set name = "Analyze Air"
set category = "Ghost"
if(!istype(usr, /mob/dead/observer)) return
// Shamelessly copied from the Gas Analyzers
if (!( istype(usr.loc, /turf) ))
return
var/datum/gas_mixture/environment = usr.loc.return_air()
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles()
src << "\blue <B>Results:</B>"
if(abs(pressure - ONE_ATMOSPHERE) < 10)
src << "\blue Pressure: [round(pressure,0.1)] kPa"
else
src << "\red Pressure: [round(pressure,0.1)] kPa"
if(total_moles)
var/o2_concentration = environment.oxygen/total_moles
var/n2_concentration = environment.nitrogen/total_moles
var/co2_concentration = environment.carbon_dioxide/total_moles
var/plasma_concentration = environment.toxins/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
if(abs(n2_concentration - N2STANDARD) < 20)
src << "\blue Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)"
else
src << "\red Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)"
if(abs(o2_concentration - O2STANDARD) < 2)
src << "\blue Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)"
else
src << "\red Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)"
if(co2_concentration > 0.01)
src << "\red CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)"
else
src << "\blue CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)"
if(plasma_concentration > 0.01)
src << "\red Plasma: [round(plasma_concentration*100)]% ([round(environment.toxins,0.01)] moles)"
if(unknown_concentration > 0.01)
src << "\red Unknown: [round(unknown_concentration*100)]% ([round(unknown_concentration*total_moles,0.01)] moles)"
src << "\blue Temperature: [round(environment.temperature-T0C,0.1)]&deg;C"
src << "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]"
/mob/dead/observer/verb/toggle_darkness()
set name = "Toggle Darkness"
set category = "Ghost"
@@ -504,4 +560,4 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
sleep(15)
following = null
..()
//END TELEPORT HREF CODE
//END TELEPORT HREF CODE
+51
View File
@@ -0,0 +1,51 @@
var/global/list/boo_phrases=list(
"You feel a chill run down your spine.",
"You think you see a figure in your peripheral vision.",
"What was that?",
"The hairs stand up on the back of your neck.",
"You are filled with a great sadness.",
"Something doesn't feel right...",
"You feel a presence in the room.",
"It feels like someone's standing behind you.",
)
/obj/effect/proc_holder/spell/aoe_turf/boo
name = "Boo!"
desc = "Fuck with the living."
ghost = 1
school = "transmutation"
charge_max = 600
clothes_req = 0
invocation = ""
invocation_type = "none"
range = 1 // Or maybe 3?
/obj/effect/proc_holder/spell/aoe_turf/boo/cast(list/targets)
for(var/turf/T in targets)
for(var/atom/A in T.contents)
// Bug humans
if(ishuman(A))
var/mob/living/carbon/human/H = A
if(H && H.client)
H << "<i>[pick(boo_phrases)]</i>"
// Flicker unblessed lights in range
if(istype(A,/obj/machinery/light))
var/obj/machinery/light/L = A
if(L)
L.flicker()
// OH GOD BLUE APC (single animation cycle)
if(istype(A, /obj/machinery/power/apc))
A:spookify()
if(istype(A, /obj/machinery/status_display))
A:spookymode=1
if(istype(A, /obj/machinery/ai_status_display))
A:spookymode=1