De-snowflakes latejoin on-station code, latejoin borgs now sync properly, see #6472 (#7742)

* Revert "aaaa (#6451)"

This reverts commit f11bf3faf0.

* onstation latejoin stuff

* linking to parent AI

* test

* de-snowflaking

* Update code/modules/jobs/job_types/cyborg.dm

* Update code/modules/jobs/job_types/cyborg.dm

* Update modular_skyrat/master_files/code/modules/jobs/job_types/cyborg.dm

* Update modular_skyrat/master_files/code/modules/jobs/job_types/cyborg.dm

* Update cyborg.dm

Co-authored-by: SpaceVampire <46720418+SpaceVampire@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
FlamingLily
2021-08-28 02:02:22 +01:00
committed by GitHub
co-authored by SpaceVampire Gandalf
parent f41edd966e
commit c0b967f2b4
7 changed files with 19 additions and 20 deletions
-7
View File
@@ -763,13 +763,6 @@ SUBSYSTEM_DEF(job)
destination = pick(GLOB.jobspawn_overrides[M.mind.assigned_role.title])
destination.JoinPlayerHere(M, FALSE)
return TRUE
//SKYRAT EDIT ADDITION
if(M.job)
if(M.job == "Prisoner")
destination = locate(/obj/effect/landmark/start/prisoner) in GLOB.landmarks_list
destination.JoinPlayerHere(M, buckle)
return TRUE
//SKYRAT EDIT END
if(latejoin_trackers.len)
destination = pick(latejoin_trackers)
destination.JoinPlayerHere(M, buckle)
+4
View File
@@ -199,6 +199,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark)
/obj/effect/landmark/start/cyborg
name = "Cyborg"
icon_state = "Cyborg"
//SKYRAT EDIT: Start - Makes latejoin cyborgs spawn in the station instead of on the interlink.
jobspawn_override = TRUE
delete_after_roundstart = FALSE
//SKYRAT EDIT: End - Makes latejoin cyborgs spawn in the station instead of on the interlink.
/obj/effect/landmark/start/ai
name = "AI"
+1 -1
View File
@@ -2,7 +2,7 @@
title = "Cyborg"
auto_deadmin_role_flags = DEADMIN_POSITION_SILICON
faction = FACTION_STATION
total_positions = 0
total_positions = 3 // SKYRAT EDIT: Original value (0)
spawn_positions = 3 // SKYRAT EDIT: Original value (1)
supervisors = "your laws and the AI" //Nodrak
selection_color = "#ddffdd"
+3 -1
View File
@@ -70,6 +70,7 @@ Civil Disputes Officer=4,4
#Silicon
AI=1,1
Cyborg=3,3
Cyborg=0,3
#Central Command
@@ -79,4 +80,5 @@ Bridge Officer=3,3
Operations Inspector=1,1
Nanotrasen Representative=1,1
Deck Crewman=5,5
Blueshield=1,1
Blueshield=1,1
@@ -1,11 +1,8 @@
/datum/job/cyborg/after_spawn(mob/living/silicon/robot/R, mob/M)
. = ..()
R.updatename(M.client)
R.gender = NEUTER
for(var/mob/living/silicon/ai/AI in GLOB.silicon_mobs)
if(AI.z == 3)
if(!(R.connected_ai))
R.set_connected_ai(AI)
R.lawsync()
R.show_laws()
/mob/living/silicon/robot/proc/latejoin_find_parent_ai(target_z_level = 3)
if(connected_ai)
return
var/mob/living/silicon/ai/AI = select_active_ai_with_fewest_borgs(target_z_level)
if(AI)
set_connected_ai(AI)
lawsync()
show_laws()
@@ -523,6 +523,9 @@
var/mob/living/spawning_mob = mind.assigned_role.get_spawn_mob(client, destination)
if(QDELETED(src) || !client)
return // Disconnected while checking for the appearance ban.
if(iscyborg(spawning_mob))
var/mob/living/silicon/robot/cyborg = spawning_mob
cyborg.latejoin_find_parent_ai(destination.z)
if(!isAI(spawning_mob)) // Unfortunately there's still snowflake AI code out there.
mind.original_character_slot_index = client.prefs.default_slot
mind.transfer_to(spawning_mob) //won't transfer key since the mind is not active
Regular → Executable
View File