Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into newmalf-merge

This commit is contained in:
Atlantiscze
2015-05-05 22:13:58 +02:00
1007 changed files with 35445 additions and 31335 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
..()
spawn(0)
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
del(src)
qdel(src)
+48 -30
View File
@@ -29,6 +29,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
var/ghostvision = 1 //is the ghost able to see things humans can't?
var/seedarkness = 1
incorporeal_move = 1
/mob/dead/observer/New(mob/body)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
@@ -80,10 +81,10 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
real_name = name
..()
/mob/dead/observer/Del()
/mob/dead/observer/Destroy()
if (ghostimage)
ghost_darkness_images -= ghostimage
del(ghostimage)
qdel(ghostimage)
ghostimage = null
updateallghostimages()
..()
@@ -193,29 +194,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
announce_ghost_joinleave(ghost)
/mob/dead/observer/Move(NewLoc, direct)
following = null
set_dir(direct)
if(NewLoc)
loc = NewLoc
for(var/obj/effect/step_trigger/S in NewLoc)
S.Crossed(src)
return
loc = get_turf(src) //Get out of closets and such as a ghost
if((direct & NORTH) && y < world.maxy)
y++
else if((direct & SOUTH) && y > 1)
y--
if((direct & EAST) && x < world.maxx)
x++
else if((direct & WEST) && x > 1)
x--
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
S.Crossed(src)
/mob/dead/observer/can_use_hands() return 0
/mob/dead/observer/is_active() return 0
@@ -309,11 +287,23 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!thearea) return
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
L+=T
var/holyblock = 0
if(usr.invisibility <= SEE_INVISIBLE_LIVING || (usr.mind in cult.current_antagonists))
for(var/turf/T in get_area_turfs(thearea.type))
if(!T.holy)
L+=T
else
holyblock = 1
else
for(var/turf/T in get_area_turfs(thearea.type))
L+=T
if(!L || !L.len)
usr << "No area available."
if(holyblock)
usr << "<span class='warning'>This area has been entirely made into sacred grounds, you cannot enter it while you are in this plane of existence!</span>"
else
usr << "No area available."
usr.loc = pick(L)
following = null
@@ -329,7 +319,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
// This is the ghost's follow verb with an argument
/mob/dead/observer/proc/ManualFollow(var/atom/movable/target)
if(target && target != src)
if(!target)
return
var/turf/targetloc = get_turf(target)
if(check_holy(targetloc))
usr << "<span class='warning'>You cannot follow a mob standing on holy grounds!</span>"
return
if(target != src)
if(following && following == target)
return
following = target
@@ -344,6 +341,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
loc = T
sleep(15)
/mob/proc/check_holy(var/turf/T)
return 0
/mob/dead/observer/check_holy(var/turf/T)
if(check_rights(R_ADMIN|R_FUN, 0, src))
return 0
return (T && T.holy) && (invisibility <= SEE_INVISIBLE_LIVING || (mind in cult.current_antagonists))
/mob/dead/observer/verb/jumptomob(target in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost"
set name = "Jump to Mob"
@@ -386,6 +392,9 @@ 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/Post_Incorpmove()
following = null
/mob/dead/observer/verb/analyze_air()
set name = "Analyze Air"
set category = "Ghost"
@@ -466,6 +475,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
src << browse(dat, "window=manifest;size=370x420;can_close=1")
//This is called when a ghost is drag clicked to something.
/mob/dead/observer/MouseDrop(atom/over)
if(!usr || !over) return
if (isobserver(usr) && usr.client && usr.client.holder && isliving(over))
if (usr.client.holder.cmd_ghost_drag(src,over))
return
return ..()
//Used for drawing on walls with blood puddles as a spooky ghost.
/mob/dead/verb/bloody_doodle()
@@ -573,7 +591,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
for(var/image/I in client.images)
if(I.icon_state == icon)
iconRemoved = 1
del(I)
qdel(I)
if(!iconRemoved)
var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon)
+1 -1
View File
@@ -18,7 +18,7 @@
/mob/dead/observer/emote(var/act, var/type, var/message)
message = sanitize(message)
//message = sanitize(message) - already sanitized in verb/me_verb()
if(!message)
return