Bleeding edgy refresh (#303)
* not code stuff * other things * global vars, defines, helpers * onclick hud stuff, orphans, world.dm * controllers and datums * game folder * everything not client/mobs in modules * client folder * stage 1 mob stuff * simple animal things * silicons * carbon things * ayylmaos and monkeys * hyoomahn * icons n shit * sprite fixes * compile fixes * some fixes I cherrypicked. * qdel fixes * forgot brain refractors
This commit is contained in:
@@ -2,6 +2,9 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
|
||||
var/list/image/ghost_images_full = list() //this is a list of full images of the ghosts themselves
|
||||
var/list/image/ghost_images_default = list() //this is a list of the default (non-accessorized, non-dir) images of the ghosts themselves
|
||||
var/list/image/ghost_images_simple = list() //this is a list of all ghost images as the simple white ghost
|
||||
|
||||
var/global/static/observer_default_invisibility = INVISIBILITY_OBSERVER
|
||||
|
||||
/mob/dead/observer
|
||||
name = "ghost"
|
||||
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
|
||||
@@ -56,10 +59,12 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
|
||||
// of the mob
|
||||
var/deadchat_name
|
||||
|
||||
/mob/dead/observer/New(mob/body)
|
||||
/mob/dead/observer/Initialize()
|
||||
invisibility = observer_default_invisibility
|
||||
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
|
||||
if(global.cross_allowed)
|
||||
if(config.cross_allowed)
|
||||
verbs += /mob/dead/observer/proc/server_hop
|
||||
|
||||
ghostimage = image(src.icon,src,src.icon_state)
|
||||
@@ -74,9 +79,10 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
|
||||
updateallghostimages()
|
||||
|
||||
var/turf/T
|
||||
var/mob/body = loc
|
||||
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
|
||||
logging = body.logging //preserve our logs by copying them to our ghost
|
||||
|
||||
gender = body.gender
|
||||
if(body.mind && body.mind.name)
|
||||
@@ -100,7 +106,12 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
|
||||
update_icon()
|
||||
|
||||
if(!T)
|
||||
T = pick(latejoin) //Safety in case we cannot find the body's position
|
||||
var/list/turfs = get_area_turfs(/area/shuttle/arrival)
|
||||
if(turfs.len)
|
||||
T = pick(turfs)
|
||||
else
|
||||
T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION) //middle of the station
|
||||
|
||||
loc = T
|
||||
|
||||
if(!name) //To prevent nameless ghosts
|
||||
@@ -314,13 +325,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(!client)
|
||||
return
|
||||
if(!(mind && mind.current))
|
||||
src << "<span class='warning'>You have no body.</span>"
|
||||
to_chat(src, "<span class='warning'>You have no body.</span>")
|
||||
return
|
||||
if(!can_reenter_corpse)
|
||||
src << "<span class='warning'>You cannot re-enter your body.</span>"
|
||||
to_chat(src, "<span class='warning'>You cannot re-enter your body.</span>")
|
||||
return
|
||||
if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients
|
||||
usr << "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>"
|
||||
to_chat(usr, "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>")
|
||||
return
|
||||
client.view = world.view
|
||||
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
|
||||
@@ -331,7 +342,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(flashwindow)
|
||||
window_flash(client)
|
||||
if(message)
|
||||
src << "<span class='ghostalert'>[message]</span>"
|
||||
to_chat(src, "<span class='ghostalert'>[message]</span>")
|
||||
if(source)
|
||||
var/obj/screen/alert/A = throw_alert("\ref[source]_notify_cloning", /obj/screen/alert/notify_cloning)
|
||||
if(A)
|
||||
@@ -345,7 +356,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
A.add_overlay(source)
|
||||
source.layer = old_layer
|
||||
source.plane = old_plane
|
||||
src << "<span class='ghostalert'><a href=?src=\ref[src];reenter=1>(Click to re-enter)</a></span>"
|
||||
to_chat(src, "<span class='ghostalert'><a href=?src=\ref[src];reenter=1>(Click to re-enter)</a></span>")
|
||||
if(sound)
|
||||
src << sound(sound)
|
||||
|
||||
@@ -354,7 +365,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Teleport"
|
||||
set desc= "Teleport to a location"
|
||||
if(!isobserver(usr))
|
||||
usr << "Not when you're not dead!"
|
||||
to_chat(usr, "Not when you're not dead!")
|
||||
return
|
||||
var/A
|
||||
A = input("Area to jump to", "BOOYEA", A) as null|anything in sortedAreas
|
||||
@@ -367,7 +378,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
L+=T
|
||||
|
||||
if(!L || !L.len)
|
||||
usr << "No area available."
|
||||
to_chat(usr, "No area available.")
|
||||
|
||||
usr.loc = pick(L)
|
||||
update_parallax_contents()
|
||||
@@ -393,7 +404,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25)
|
||||
|
||||
if(orbiting && orbiting.orbiting != target)
|
||||
src << "<span class='notice'>Now orbiting [target].</span>"
|
||||
to_chat(src, "<span class='notice'>Now orbiting [target].</span>")
|
||||
|
||||
var/rot_seg
|
||||
|
||||
@@ -446,7 +457,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
A.loc = T
|
||||
A.update_parallax_contents()
|
||||
else
|
||||
A << "This mob is not located in the game world."
|
||||
to_chat(A, "This mob is not located in the game world.")
|
||||
|
||||
/mob/dead/observer/verb/change_view_range()
|
||||
set category = "Ghost"
|
||||
@@ -488,11 +499,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/dead/observer/memory()
|
||||
set hidden = 1
|
||||
src << "<span class='danger'>You are dead! You have no mind to store memory!</span>"
|
||||
to_chat(src, "<span class='danger'>You are dead! You have no mind to store memory!</span>")
|
||||
|
||||
/mob/dead/observer/add_memory()
|
||||
set hidden = 1
|
||||
src << "<span class='danger'>You are dead! You have no mind to store memory!</span>"
|
||||
to_chat(src, "<span class='danger'>You are dead! You have no mind to store memory!</span>")
|
||||
|
||||
/mob/dead/observer/verb/toggle_ghostsee()
|
||||
set name = "Toggle Ghost Vision"
|
||||
@@ -500,7 +511,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set category = "Ghost"
|
||||
ghostvision = !(ghostvision)
|
||||
updateghostsight()
|
||||
usr << "You [(ghostvision?"now":"no longer")] have ghost vision."
|
||||
to_chat(usr, "You [(ghostvision?"now":"no longer")] have ghost vision.")
|
||||
|
||||
/mob/dead/observer/verb/toggle_darkness()
|
||||
set name = "Toggle Darkness"
|
||||
@@ -581,14 +592,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
return 0
|
||||
|
||||
if(ismegafauna(target))
|
||||
src << "<span class='warning'>This creature is too powerful for you to possess!</span>"
|
||||
to_chat(src, "<span class='warning'>This creature is too powerful for you to possess!</span>")
|
||||
return 0
|
||||
|
||||
if(can_reenter_corpse || (mind && mind.current))
|
||||
if(alert(src, "Your soul is still tied to your former life as [mind.current.name], if you go forward there is no going back to that life. Are you sure you wish to continue?", "Move On", "Yes", "No") == "No")
|
||||
return 0
|
||||
if(target.key)
|
||||
src << "<span class='warning'>Someone has taken this body while you were choosing!</span>"
|
||||
to_chat(src, "<span class='warning'>Someone has taken this body while you were choosing!</span>")
|
||||
return 0
|
||||
|
||||
target.key = key
|
||||
@@ -599,14 +610,32 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set category = "Ghost"
|
||||
set name = "Server Hop!"
|
||||
set desc= "Jump to the other server"
|
||||
if (alert(src, "Jump to server running at [global.cross_address]?", "Server Hop", "Yes", "No") != "Yes")
|
||||
if(notransform)
|
||||
return
|
||||
if(!config.cross_allowed)
|
||||
verbs -= /mob/dead/observer/proc/server_hop
|
||||
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
|
||||
return
|
||||
if (alert(src, "Jump to server running at [config.cross_address]?", "Server Hop", "Yes", "No") != "Yes")
|
||||
return 0
|
||||
if (client && global.cross_allowed)
|
||||
src << "<span class='notice'>Sending you to [global.cross_address].</span>"
|
||||
if (client && config.cross_allowed)
|
||||
to_chat(src, "<span class='notice'>Sending you to [config.cross_address].</span>")
|
||||
new /obj/screen/splash(client)
|
||||
notransform = TRUE
|
||||
sleep(29) //let the animation play
|
||||
notransform = FALSE
|
||||
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
|
||||
client << link(global.cross_address)
|
||||
client << link(config.cross_address + "?server_hop=[key]")
|
||||
else
|
||||
src << "<span class='error'>There is no other server configured!</span>"
|
||||
to_chat(src, "<span class='error'>There is no other server configured!</span>")
|
||||
|
||||
/proc/show_server_hop_transfer_screen(expected_key)
|
||||
//only show it to incoming ghosts
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(O.key == expected_key)
|
||||
if(O.client)
|
||||
new /obj/screen/splash(O.client, TRUE)
|
||||
break
|
||||
|
||||
//this is a mob verb instead of atom for performance reasons
|
||||
//see /mob/verb/examinate() in mob.dm for more info
|
||||
@@ -643,8 +672,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/atom/movable/target = locate(href_list["follow"])
|
||||
if(istype(target) && (target != src))
|
||||
ManualFollow(target)
|
||||
return
|
||||
if(href_list["x"] && href_list["y"] && href_list["z"])
|
||||
var/tx = text2num(href_list["x"])
|
||||
var/ty = text2num(href_list["y"])
|
||||
var/tz = text2num(href_list["z"])
|
||||
var/turf/target = locate(tx, ty, tz)
|
||||
if(istype(target))
|
||||
forceMove(target)
|
||||
return
|
||||
if(href_list["reenter"])
|
||||
reenter_corpse()
|
||||
return
|
||||
|
||||
//We don't want to update the current var
|
||||
//But we will still carry a mind.
|
||||
@@ -668,11 +707,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
if(data_huds_on) //remove old huds
|
||||
remove_data_huds()
|
||||
src << "<span class='notice'>Data HUDs disabled.</span>"
|
||||
to_chat(src, "<span class='notice'>Data HUDs disabled.</span>")
|
||||
data_huds_on = 0
|
||||
else
|
||||
show_data_huds()
|
||||
src << "<span class='notice'>Data HUDs enabled.</span>"
|
||||
to_chat(src, "<span class='notice'>Data HUDs enabled.</span>")
|
||||
data_huds_on = 1
|
||||
|
||||
/mob/dead/observer/verb/restore_ghost_apperance()
|
||||
@@ -781,9 +820,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(SSpai)
|
||||
SSpai.recruitWindow(src)
|
||||
else
|
||||
usr << "Can't become a pAI candidate while not dead!"
|
||||
to_chat(usr, "Can't become a pAI candidate while not dead!")
|
||||
|
||||
/mob/dead/observer/CtrlShiftClick(mob/user)
|
||||
if(isobserver(user) && check_rights(R_SPAWN))
|
||||
change_mob_type( /mob/living/carbon/human , null, null, TRUE) //always delmob, ghosts shouldn't be left lingering
|
||||
|
||||
/proc/set_observer_default_invisibility(amount, message=null)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
G.invisibility = amount
|
||||
if(message)
|
||||
to_chat(G, message)
|
||||
observer_default_invisibility = amount
|
||||
|
||||
@@ -18,5 +18,5 @@
|
||||
else
|
||||
speaker = V.source
|
||||
var/link = FOLLOW_LINK(src, speaker)
|
||||
src << "[link] [message]"
|
||||
to_chat(src, "[link] [message]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user