Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into BookClub

This commit is contained in:
Aurorablade
2016-07-21 23:56:34 -04:00
1490 changed files with 46551 additions and 25064 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
/mob/dead/observer/Login()
..()
if (ghostimage)
if(ghostimage)
ghostimage.icon_state = src.icon_state
updateghostimages()
+1 -1
View File
@@ -1,5 +1,5 @@
/mob/dead/observer/Logout()
if (client)
if(client)
client.images -= ghost_darkness_images
..()
spawn(0)
+38 -26
View File
@@ -36,7 +36,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
verbs += /mob/dead/observer/proc/dead_tele
// Our new boo spell.
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/boo(src))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/boo(null))
can_reenter_corpse = flags & GHOST_CAN_REENTER
started_as_observer = flags & GHOST_IS_OBSERVER
@@ -44,16 +44,12 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
stat = DEAD
ghostimage = image(src.icon,src,src.icon_state)
ghost_darkness_images |= ghostimage
updateallghostimages()
var/turf/T
if(ismob(body))
T = get_turf(body) //Where is the body located?
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
if (ishuman(body))
if(ishuman(body))
var/mob/living/carbon/human/H = body
icon = H.stand_icon
overlays = H.overlays_standing
@@ -77,6 +73,14 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
mind = body.mind //we don't transfer the mind but we keep a reference to it.
ghostimage = image(icon = icon, loc = src, icon_state = icon_state)
ghostimage.overlays = overlays
ghostimage.dir = dir
ghostimage.appearance_flags |= KEEP_TOGETHER
ghostimage.alpha = alpha
appearance_flags |= KEEP_TOGETHER
ghost_darkness_images |= ghostimage
updateallghostimages()
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
forceMove(T)
@@ -90,7 +94,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
var/mob/M = following
M.following_mobs -= src
following = null
if (ghostimage)
if(ghostimage)
ghost_darkness_images -= ghostimage
qdel(ghostimage)
ghostimage = null
@@ -131,7 +135,7 @@ Works together with spawning an observer, noted above.
if(ghost.can_reenter_corpse)
respawnable_list += ghost
ghost.key = key
if(!ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
if(!(ghost.client && ghost.client.holder) && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
return ghost
@@ -153,19 +157,24 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
resting = 1
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
var/obj/structure/morgue/Morgue = locate() in M.loc
if(istype(M.loc,/obj/structure/morgue))
if(istype(M.loc, /obj/structure/morgue))
Morgue = M.loc
if(Morgue)
Morgue.update()
if(istype(M.loc, /obj/machinery/cryopod))
var/obj/machinery/cryopod/P = M.loc
if(!P.control_computer)
P.find_control_computer(urgent=1)
if(P.control_computer)
P.despawn_occupant()
return
/mob/dead/observer/Move(NewLoc, direct)
following = null
dir = direct
ghostimage.dir = dir
if(NewLoc)
forceMove(NewLoc)
return
@@ -196,7 +205,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/Stat()
..()
statpanel("Status")
if (client.statpanel == "Status")
if(client.statpanel == "Status")
show_stat_station_time()
if(ticker)
if(ticker.mode)
@@ -248,7 +257,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
source.layer = old_layer
to_chat(src, "<span class='ghostalert'><a href=?src=\ref[src];reenter=1>(Click to re-enter)</a></span>")
if(sound)
to_chat(src, sound(sound))
src << sound(sound)
/mob/dead/observer/proc/show_me_the_hud(hud_index)
var/datum/atom_hud/H = huds[hud_index]
@@ -357,6 +366,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!target)
return
if(!get_turf(target))
return
if(target != src)
if(following && following == target)
return
@@ -406,7 +418,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(istype(usr, /mob/dead/observer)) //Make sure they're an observer!
if (!target)//Make sure we actually have a target
if(!target)//Make sure we actually have a target
return
else
var/mob/M = getmobs()[target] //Destination mob
@@ -449,7 +461,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!istype(usr, /mob/dead/observer)) return
// Shamelessly copied from the Gas Analyzers
if (!( istype(usr.loc, /turf) ))
if(!( istype(usr.loc, /turf) ))
return
var/datum/gas_mixture/environment = usr.loc.return_air()
@@ -506,8 +518,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//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)
if (usr.client.holder.cmd_ghost_drag(src,over))
if(isobserver(usr) && usr.client && usr.client.holder)
if(usr.client.holder.cmd_ghost_drag(src,over))
return
return ..()
@@ -535,17 +547,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
..()
if (href_list["track"])
if(href_list["track"])
var/atom/target = locate(href_list["track"])
if(target)
ManualFollow(target)
if (href_list["follow"])
if(href_list["follow"])
var/atom/target = locate(href_list["follow"])
if(target)
ManualFollow(target)
if (href_list["jump"])
if(href_list["jump"])
var/mob/target = locate(href_list["jump"])
var/mob/A = usr;
to_chat(A, "Teleporting to [target]...")
@@ -594,27 +606,27 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
updateghostsight()
/mob/dead/observer/proc/updateghostsight()
if (!seedarkness)
if(!seedarkness)
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
else
see_invisible = SEE_INVISIBLE_OBSERVER
if (!ghostvision)
if(!ghostvision)
see_invisible = SEE_INVISIBLE_LIVING;
updateghostimages()
/proc/updateallghostimages()
for (var/mob/dead/observer/O in player_list)
for(var/mob/dead/observer/O in player_list)
O.updateghostimages()
/mob/dead/observer/proc/updateghostimages()
if (!client)
if(!client)
return
if (seedarkness || !ghostvision)
if(seedarkness || !ghostvision)
client.images -= ghost_darkness_images
else
//add images for the 60inv things ghosts can normally see when darkness is enabled so they can see them now
client.images |= ghost_darkness_images
if (ghostimage)
if(ghostimage)
client.images -= ghostimage //remove ourself
/mob/proc/can_admin_interact()
+24 -6
View File
@@ -1,21 +1,39 @@
/mob/dead/observer/say(var/message)
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
if (!message)
if(!message)
return
log_say("Ghost/[src.key] : [message]")
if (src.client)
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "\red You cannot talk in deadchat (muted).")
return
if (src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
return
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
. = src.say_dead(message)
/mob/dead/observer/emote(var/act, var/type, var/message)
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
if(!message)
return
if(act != "me")
return
log_emote("Ghost/[src.key] : [message]")
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "\red You cannot emote in deadchat (muted).")
return
if(src.client.handle_spam_prevention(message, MUTE_DEADCHAT))
return
. = src.emote_dead(message)
+1
View File
@@ -20,6 +20,7 @@ var/global/list/boo_phrases=list(
school = "transmutation"
charge_max = 600
clothes_req = 0
stat_allowed = 1
invocation = ""
invocation_type = "none"
range = 1 // Or maybe 3?