diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index dace889c847..27972b658c0 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -401,7 +401,7 @@ var/datum/subsystem/job/SSjob H << "You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp." if(config.minimal_access_threshold) H << "As this station was initially staffed with a [config.jobs_have_minimal_access ? "full crew, only your job's necessities" : "skeleton crew, additional access may"] have been added to your ID card." - return 1 + return H /datum/subsystem/job/proc/setup_officer_positions() diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 5256c37cd52..e1f1419cb77 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -31,26 +31,7 @@ if(..()) return - R.notify_ai(2) - - R.uneq_all() - R.hands.icon_state = "nomod" - R.icon_state = "robot" - qdel(R.module) - R.module = null - - R.modtype = "robot" - R.designation = "Default" - R.updatename("Default") - - R.update_icons() - R.update_headlamp() - - R.speed = 0 // Remove upgrades. - R.ionpulse = FALSE - R.magpulse = FALSE - - R.status_flags |= CANPUSH + R.ResetModule() return 1 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 1c6a0b6aab1..b19c799ee37 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -78,7 +78,7 @@ var/list/ai_list = list() var/obj/machinery/camera/portable/builtInCamera -/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0) +/mob/living/silicon/ai/New(loc, datum/ai_laws/L, obj/item/device/mmi/B, safety = 0) ..() rename_self("ai") name = real_name @@ -918,3 +918,6 @@ var/list/ai_list = list() src << "Hack complete. \The [apc] is now under your \ exclusive control." apc.update_icon() + +/mob/living/silicon/ai/spawned/New(loc, datum/ai_laws/L, obj/item/device/mmi/B, safety = 0) + ..(loc,L,B,1) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a2773072124..810cca481f8 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1311,3 +1311,30 @@ locked = 1 notify_ai(1) . = 1 + + + +/mob/living/silicon/robot/proc/ResetModule() + + notify_ai(2) + + uneq_all() + hands.icon_state = "nomod" + icon_state = "robot" + qdel(module) + module = null + + modtype = "robot" + designation = "Default" + updatename("Default") + + update_icons() + update_headlamp() + + speed = 0 // Remove upgrades. + ionpulse = FALSE + magpulse = FALSE + + status_flags |= CANPUSH + + return 1 \ 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 e55f2be543d..3c2c95fbbf8 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -302,8 +302,11 @@ SSjob.AssignRole(src, rank, 1) - var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind - SSjob.EquipRank(character, rank, 1) //equips the human + var/mob/living/character = create_character() //creates the human and transfers vars and mind + var/equip = SSjob.EquipRank(character, rank, 1) + if(isrobot(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob. + character = equip + var/D = pick(latejoin) if(!D) @@ -319,24 +322,26 @@ continue character.loc = D + ticker.minds += character.mind - if(character.mind.assigned_role != "Cyborg") - data_core.manifest_inject(character) - ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn - AnnounceArrival(character, rank) - AddEmploymentContract(character) - else - character.Robotize() + var/mob/living/carbon/human/humanc + if(ishuman(character)) + humanc = character //Let's retypecast the var to be human, + + if(humanc) //These procs all expect humans + data_core.manifest_inject(humanc) + AnnounceArrival(humanc, rank) + AddEmploymentContract(humanc) joined_player_list += character.ckey - if(config.allow_latejoin_antagonists) + if(config.allow_latejoin_antagonists && humanc) //Borgs aren't allowed to be antags. Will need to be tweaked if we get true latejoin ais. switch(SSshuttle.emergency.mode) if(SHUTTLE_RECALL, SHUTTLE_IDLE) - ticker.mode.make_antag_chance(character) + ticker.mode.make_antag_chance(humanc) if(SHUTTLE_CALL) if(SSshuttle.emergency.timeLeft(1) > initial(SSshuttle.emergencyCallTime)*0.5) - ticker.mode.make_antag_chance(character) + ticker.mode.make_antag_chance(humanc) qdel(src) /mob/new_player/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)