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
+10 -4
View File
@@ -24,6 +24,7 @@
anchored = 1
use_power = 0
req_access = list(access_engine_equip)
var/spooky=0
var/area/area
var/areastring = null
var/obj/item/weapon/cell/cell
@@ -165,7 +166,7 @@
icon_state = "[basestate]-nocover"
else if (stat & BROKEN)
icon_state = "apc-b"
else if(emagged || malfai)
else if(emagged || malfai || spooky)
icon_state = "apcemag"
else if(wiresexposed)
icon_state = "apcewires"
@@ -187,8 +188,15 @@
update_icon()
updating_icon = 0
//attack with an item - open/close cover, insert cell, or (un)lock interface
/obj/machinery/power/apc/proc/spookify()
if(spooky) return // Fuck you we're already spooky
spooky=1
update_icon()
spawn(10)
spooky=0
update_icon()
//attack with an item - open/close cover, insert cell, or (un)lock interface
/obj/machinery/power/apc/attackby(obj/item/W, mob/user)
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
@@ -836,7 +844,6 @@
if(!area.requires_power)
return
/*
if (equipment > 1) // off=0, off auto=1, on=2, on auto=3
use_power(src.equip_consumption, EQUIP)
@@ -985,7 +992,6 @@
area.poweralert(0, src)
// update icon & area power if anything changed
if(last_lt != lighting || last_eq != equipment || last_en != environ)
queue_icon_update()
update()
-1
View File
@@ -448,7 +448,6 @@
flickering = 0
// ai attack - make lights flicker, because why not
/obj/machinery/light/attack_ai(mob/user)
src.flicker(1)
return