diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 514a5b38f9..d15f9dc58d 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -48,6 +48,10 @@ latejoin_cryo += loc del(src) + if("JoinLateCyborg") + latejoin_cyborg += loc + del(src) + //prisoners if("prisonwarp") prisonwarp += loc diff --git a/code/global.dm b/code/global.dm index f6076c600c..07d83a8ca7 100644 --- a/code/global.dm +++ b/code/global.dm @@ -129,6 +129,7 @@ var/list/newplayer_start = list() var/list/latejoin = list() var/list/latejoin_gateway = list() var/list/latejoin_cryo = list() +var/list/latejoin_cyborg = list() var/list/prisonwarp = list() //prisoners go to these var/list/holdingfacility = list() //captured people go here diff --git a/code/modules/client/preferences_spawnpoints.dm b/code/modules/client/preferences_spawnpoints.dm index 504a962049..ac0d5447e6 100644 --- a/code/modules/client/preferences_spawnpoints.dm +++ b/code/modules/client/preferences_spawnpoints.dm @@ -10,6 +10,17 @@ var/list/spawntypes = list() var/msg //Message to display on the arrivals computer. var/list/turfs //List of turfs to spawn on. var/display_name //Name used in preference setup. + var/list/restrict_job = null + var/list/disallow_job = null + + proc/check_job_spawning(job) + if(restrict_job && !(job in restrict_job)) + return 0 + + if(disallow_job && (job in disallow_job)) + return 0 + + return 1 /datum/spawnpoint/arrivals display_name = "Arrivals Shuttle" @@ -30,7 +41,17 @@ var/list/spawntypes = list() /datum/spawnpoint/cryo display_name = "Cryogenic Storage" msg = "has completed cryogenic revival" + disallow_job = list("Cyborg") /datum/spawnpoint/cryo/New() ..() - turfs = latejoin_cryo \ No newline at end of file + turfs = latejoin_cryo + +/datum/spawnpoint/cyborg + display_name = "Cyborg Storage" + msg = "has been activated from storage" + restrict_job = list("Cyborg") + +/datum/spawnpoint/cyborg/New() + ..() + turfs = latejoin_cyborg \ No newline at end of file diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index e8de6468c5..0d8fdd7659 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -315,8 +315,13 @@ S = spawntypes[spawning_at] if(S && istype(S)) - character.loc = pick(S.turfs) - join_message = S.msg + if(S.check_job_spawning(rank)) + character.loc = pick(S.turfs) + join_message = S.msg + else + character << "Your chosen spawnpoint ([S.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead." + character.loc = pick(latejoin) + join_message = "has arrived on the station" else character.loc = pick(latejoin) join_message = "has arrived on the station" @@ -338,6 +343,8 @@ //Grab some data from the character prefs for use in random news procs. AnnounceArrival(character, rank, join_message) + else + AnnounceCyborg(character, rank, join_message) del(src) @@ -349,6 +356,15 @@ a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer") del(a) + proc/AnnounceCyborg(var/mob/living/character, var/rank, var/join_message) + if (ticker.current_state == GAME_STATE_PLAYING) + var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI. + if(character.mind.role_alt_title) + rank = character.mind.role_alt_title + // can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc. + a.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer") + del(a) + proc/LateChoices() var/mills = world.time // 1/10 of a second, not real milliseconds but whatever //var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something