Revert "[SHOULD BE DONE BUT LETS TESTMERGE FIRST] TG SYNC"

This commit is contained in:
LetterJay
2017-12-16 13:08:50 -06:00
committed by GitHub
parent 715960b324
commit 7af461539f
756 changed files with 10062 additions and 11368 deletions
+17 -44
View File
@@ -2,9 +2,6 @@
INITIALIZE_IMMEDIATE(/mob/dead)
/mob/dead
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
/mob/dead/Initialize()
if(initialized)
stack_trace("Warning: [src]([type]) initialized multiple times!")
@@ -14,9 +11,8 @@ INITIALIZE_IMMEDIATE(/mob/dead)
prepare_huds()
if(length(CONFIG_GET(keyed_string_list/cross_server)))
if(CONFIG_GET(string/cross_server_address))
verbs += /mob/dead/proc/server_hop
set_focus(src)
return INITIALIZE_HINT_NORMAL
/mob/dead/dust() //ghosts can't be vaporised.
@@ -28,9 +24,6 @@ INITIALIZE_IMMEDIATE(/mob/dead)
/mob/dead/ConveyorMove() //lol
return
/mob/dead/forceMove(atom/destination)
loc = destination
/mob/dead/Stat()
..()
@@ -49,46 +42,26 @@ INITIALIZE_IMMEDIATE(/mob/dead)
else
stat(null, "Time To Start: SOON")
stat(null, "Players: [SSticker.totalPlayers]")
if(client.holder)
stat(null, "Players Ready: [SSticker.totalPlayersReady]")
/mob/dead/proc/server_hop()
set category = "OOC"
set name = "Server Hop!"
set desc= "Jump to the other server"
if(notransform)
return
var/list/csa = CONFIG_GET(keyed_string_list/cross_server)
var/pick
switch(csa.len)
if(0)
verbs -= /mob/dead/proc/server_hop
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
if(1)
pick = csa[0]
else
pick = input(src, "Pick a server to jump to", "Server Hop") as null|anything in csa
if(!pick)
var/csa = CONFIG_GET(string/cross_server_address)
if(csa)
verbs -= /mob/dead/proc/server_hop
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
return
var/addr = csa[pick]
if(alert(src, "Jump to server [pick] ([addr])?", "Server Hop", "Yes", "No") != "Yes")
return
var/client/C = client
to_chat(C, "<span class='notice'>Sending you to [pick].</span>")
new /obj/screen/splash(C)
notransform = TRUE
sleep(29) //let the animation play
notransform = FALSE
if(!C)
return
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
C << link("[addr]?server_hop=[key]")
if (alert(src, "Jump to server running at [csa]?", "Server Hop", "Yes", "No") != "Yes")
return 0
if (client && csa)
to_chat(src, "<span class='notice'>Sending you to [csa].</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(csa + "?server_hop=[key]")
else
to_chat(src, "<span class='error'>There is no other server configured!</span>")
+26 -4
View File
@@ -21,9 +21,9 @@
S.Fade(TRUE)
if(length(GLOB.newplayer_start))
forceMove(pick(GLOB.newplayer_start))
loc = pick(GLOB.newplayer_start)
else
forceMove(locate(1,1,1))
loc = locate(1,1,1)
ComponentInitialize()
@@ -73,6 +73,26 @@
popup.open(0)
return
/mob/dead/new_player/Stat()
..()
if(statpanel("Lobby"))
stat("Game Mode:", (SSticker.hide_mode) ? "Secret" : "[GLOB.master_mode]")
stat("Map:", SSmapping.config.map_name)
if(SSticker.current_state == GAME_STATE_PREGAME)
var/time_remaining = SSticker.GetTimeLeft()
if(time_remaining > 0)
stat("Time To Start:", "[round(time_remaining/10)]s")
else if(time_remaining == -10)
stat("Time To Start:", "DELAYED")
else
stat("Time To Start:", "SOON")
stat("Players:", "[SSticker.totalPlayers]")
if(client.holder)
stat("Players Ready:", "[SSticker.totalPlayersReady]")
/mob/dead/new_player/Topic(href, href_list[])
if(src != usr)
@@ -262,7 +282,7 @@
var/obj/effect/landmark/observer_start/O = locate(/obj/effect/landmark/observer_start) in GLOB.landmarks_list
to_chat(src, "<span class='notice'>Now teleporting.</span>")
if (O)
observer.forceMove(O.loc)
observer.loc = O.loc
else
to_chat(src, "<span class='notice'>Teleporting failed. Ahelp an admin please</span>")
stack_trace("There's no freaking observer landmark available on this map or you're making observers before the map is initialised")
@@ -297,13 +317,15 @@
return 0
if(job.required_playtime_remaining(client))
return 0
if(CONFIG_GET(flag/enforce_human_authority) && !client.prefs.pref_species.qualifies_for_rank(rank, client.prefs.features))
return 0
return 1
/mob/dead/new_player/proc/AttemptLateSpawn(rank)
if(!IsJobAvailable(rank))
alert(src, "[rank] is not available. Please try another.")
return FALSE
return 0
if(SSticker.late_join_disabled)
alert(src, "An administrator has disabled late join spawning.")
@@ -1,5 +1,4 @@
//The mob should have a gender you want before running this proc. Will run fine without H
//The mob should have a gender you want before running this proc. Will run fine without H
/datum/preferences/proc/random_character(gender_override)
if(gender_override)
gender = gender_override
@@ -20,7 +19,7 @@
features = random_features()
age = rand(AGE_MIN,AGE_MAX)
/datum/preferences/proc/update_preview_icon()
/datum/preferences/proc/update_preview_icon(nude = 0)
// Silicons only need a very basic preview since there is no customization for them.
if(job_engsec_high)
switch(job_engsec_high)
@@ -57,7 +56,7 @@
previewJob = job
break
if(previewJob)
if(previewJob && !nude)
mannequin.job = previewJob.title
previewJob.equip(mannequin, TRUE)
COMPILE_OVERLAYS(mannequin)
+9 -8
View File
@@ -13,6 +13,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
density = FALSE
canmove = 0
anchored = TRUE // don't get pushed around
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
see_invisible = SEE_INVISIBLE_OBSERVER
see_in_dark = 100
invisibility = INVISIBILITY_OBSERVER
@@ -108,7 +109,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
else
T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION_PRIMARY) //middle of the station
forceMove(T)
loc = T
if(!name) //To prevent nameless ghosts
name = random_unique_name(gender)
@@ -135,13 +136,13 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
/mob/dead/observer/narsie_act()
var/old_color = color
color = "#960000"
animate(src, color = old_color, time = 10, flags = ANIMATION_PARALLEL)
animate(src, color = old_color, time = 10, flags_1 = ANIMATION_PARALLEL)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 10)
/mob/dead/observer/ratvar_act()
var/old_color = color
color = "#FAE48C"
animate(src, color = old_color, time = 10, flags = ANIMATION_PARALLEL)
animate(src, color = old_color, time = 10, flags_1 = ANIMATION_PARALLEL)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 10)
/mob/dead/observer/Destroy()
@@ -287,10 +288,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/oldloc = loc
if(NewLoc)
forceMove(NewLoc)
loc = NewLoc
update_parallax_contents()
else
forceMove(get_turf(src)) //Get out of closets and such as a ghost
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)
@@ -370,7 +371,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!L || !L.len)
to_chat(usr, "No area available.")
usr.forceMove(pick(L))
usr.loc = pick(L)
update_parallax_contents()
/mob/dead/observer/verb/follow()
@@ -444,7 +445,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/turf/T = get_turf(M) //Turf of the destination mob
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
A.forceMove(T)
A.loc = T
A.update_parallax_contents()
else
to_chat(A, "This mob is not located in the game world.")
@@ -766,8 +767,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//Istype so we filter out points of interest that are not mobs
if(client && mob_eye && istype(mob_eye))
client.eye = mob_eye
client.screen = list()
if(mob_eye.hud_used)
client.screen = list()
LAZYINITLIST(mob_eye.observers)
mob_eye.observers |= src
mob_eye.hud_used.show_hud(mob_eye.hud_used.hud_version, src)
+24 -24
View File
@@ -1,25 +1,25 @@
/mob/dead/observer/say(message)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if (!message)
return
/mob/dead/observer/say(message)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if (!message)
return
log_talk(src,"Ghost/[src.key] : [message]", LOGSAY)
. = src.say_dead(message)
/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
var/atom/movable/to_follow = speaker
if(radio_freq)
var/atom/movable/virtualspeaker/V = speaker
if(isAI(V.source))
var/mob/living/silicon/ai/S = V.source
to_follow = S.eyeobj
else
to_follow = V.source
var/link = FOLLOW_LINK(src, to_follow)
// Recompose the message, because it's scrambled by default
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
to_chat(src, "[link] [message]")
. = src.say_dead(message)
/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
var/atom/movable/to_follow = speaker
if(radio_freq)
var/atom/movable/virtualspeaker/V = speaker
if(isAI(V.source))
var/mob/living/silicon/ai/S = V.source
to_follow = S.eyeobj
else
to_follow = V.source
var/link = FOLLOW_LINK(src, to_follow)
// Recompose the message, because it's scrambled by default
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
to_chat(src, "[link] [message]")