Fix ghost issues and add some shit suggested on the server.

This commit is contained in:
Rob Nelson
2013-12-10 00:02:16 -08:00
parent e00e8b5f49
commit e36ded12dc
8 changed files with 49 additions and 42 deletions

View File

@@ -1,6 +1,3 @@
#define GHOST_DARK_ALPHA 10
#define GHOST_LIGHT_ALPHA 255
#define GHOST_DARK_CUTOFF 1
/mob/dead/observer
name = "ghost"
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
@@ -34,6 +31,7 @@
see_invisible = SEE_INVISIBLE_OBSERVER
see_in_dark = 100
verbs += /mob/dead/observer/proc/dead_tele
stat = DEAD
var/turf/T
@@ -75,11 +73,25 @@
if(!name) //To prevent nameless ghosts
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
real_name = name
ghostMulti = new(src)
..()
/mob/dead/attackby(obj/item/W, mob/user)
if(istype(W,/obj/item/weapon/tome))
var/mob/dead/M = src
if(src.invisibility != 0)
M.invisibility = 0
user.visible_message( \
"\red [user] drags ghost, [M], to our plan of reality!", \
"\red You drag [M] to our plan of reality!" \
)
else
user.visible_message ( \
"\red [user] just tried to smash his book into that ghost! It's not very effective", \
"\red You get the feeling that the ghost can't become any more visible." \
)
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
return 1
/*
@@ -224,34 +236,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
// In darkness over a certain threshold, ghosts become slightly visible for the spooky value.
/mob/dead/observer/proc/amInDarkPlace()
//var/turf/simulated/T = get_turf(src)
//if(!istype(T))
// return 0
//if(T.lighting_lumcount <= GHOST_DARK_CUTOFF)
// return 1
return 0
/mob/dead/observer/proc/updateSpookyAlpha()
if(amInDarkPlace())
alpha=GHOST_DARK_ALPHA
invisibility=0
else
alpha=GHOST_LIGHT_ALPHA
invisibility=INVISIBILITY_OBSERVER
///mob/dead/observer/SetLuminosity(new_luminosity, max_luminosity)
// ..()
// updateSpookyAlpha()
/mob/dead/observer/Move(NewLoc, direct)
dir = direct
if(NewLoc)
loc = NewLoc
for(var/obj/effect/step_trigger/S in NewLoc)
S.HasEntered(src)
updateSpookyAlpha() // Added SetLuminosity above, probably not worth it.
return
loc = get_turf(src) //Get out of closets and such as a ghost
if((direct & NORTH) && y < world.maxy)
@@ -265,7 +256,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
S.HasEntered(src)
updateSpookyAlpha()
/mob/dead/observer/examine()
if(usr)