diff --git a/__DEFINES/_macros.dm b/__DEFINES/_macros.dm index 9e02da5b204..6a520a6544f 100644 --- a/__DEFINES/_macros.dm +++ b/__DEFINES/_macros.dm @@ -74,8 +74,6 @@ #define isrobot(A) istype(A, /mob/living/silicon/robot) -#define isshell(A) istype(A, /mob/living/silicon/robot/shell) - #define isanimal(A) istype(A, /mob/living/simple_animal) #define iscorgi(A) istype(A, /mob/living/simple_animal/corgi) diff --git a/code/datums/gamemode/dynamic/dynamic_rulesets_midround.dm b/code/datums/gamemode/dynamic/dynamic_rulesets_midround.dm index 3c2d6db9795..3777c0f1cbf 100644 --- a/code/datums/gamemode/dynamic/dynamic_rulesets_midround.dm +++ b/code/datums/gamemode/dynamic/dynamic_rulesets_midround.dm @@ -241,7 +241,7 @@ ..() candidates = candidates[CURRENT_LIVING_PLAYERS] for(var/mob/living/player in candidates) - if(!isAI(player) && !isshell(player)) + if(!isAI(player)) candidates -= player continue if(player.z == map.zCentcomm) @@ -256,22 +256,14 @@ unction = ticker.mode.CreateFaction(/datum/faction/malf, null, 1) if(!candidates || !candidates.len) return 0 - var/mob/living/silicon/P = pick(candidates) - var/mob/living/silicon/ai/M - if(isshell(P)) - var/mob/living/silicon/robot/shell/S = P - S.undeploy() - M = S.mainframe - else - M = P + var/mob/living/silicon/ai/M = pick(candidates) assigned += M candidates -= M var/datum/role/malfAI/malf = unction.HandleNewMind(M.mind) malf.OnPostSetup() malf.Greet() for(var/mob/living/silicon/robot/R in M.connected_robots) - if(!isshell(R)) - unction.HandleRecruitedMind(R.mind) + unction.HandleRecruitedMind(R.mind) unction.forgeObjectives() unction.AnnounceObjectives() return 1 diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 281423e1d86..ea5a5d30a4e 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -75,15 +75,12 @@ src.key = key /datum/mind/proc/transfer_to(mob/new_character) - if(!new_character) - return if (!current) transfer_to_without_current(new_character) return - if(new_character.attack_log && current.attack_log) -// new_character.attack_log += current.attack_log - current.attack_log += "\[[time_stamp()]\]: mind transfer from [current] to [new_character]" - new_character.attack_log += "\[[time_stamp()]\]: mind transfer from [current] to [new_character]" + + new_character.attack_log += current.attack_log + new_character.attack_log += "\[[time_stamp()]\]: mind transfer from [current] to [new_character]" for (var/role in antag_roles) var/datum/role/R = antag_roles[role] diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 8c63d4b4d4a..24c68d71794 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -312,16 +312,6 @@ var/global/datum/controller/occupations/job_master var/datum/job/master_assistant = GetJob("Assistant") count = (officer.current_positions + warden.current_positions + hos.current_positions) - var/datum/job/borg = job_master.GetJob("Cyborg") //spawn a completed cyborg shell if no borgs readied up - var/borg_count = borg.current_positions - if(!borg_count) - for(var/obj/effect/landmark/start/sloc in landmarks_list) - if(sloc.name != "Cyborg") - continue - else - new /obj/item/robot_parts/robot_suit/mapped(sloc.loc) - break - // For those who wanted to be assistant if their preferences were filled, here you go. for(var/mob/new_player/player in unassigned) if(player.client.prefs.alternate_option == BE_ASSISTANT) diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index b588c25605c..eddded165e6 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -170,9 +170,7 @@ That prevents a few funky behaviors. if(C.contents.len)//If there is an AI on card. to_chat(U, "Transfer failed: Existing AI found on this terminal. Remove existing AI to install a new one.") else - if(T.is_in_shell) //send them back! - T.shell.undeploy() - if(T.mind?.GetRole(MALF)) + if(T.mind.GetRole(MALF)) to_chat(U, "ERROR: Remote transfer interface disabled.")//Do ho ho ho~ return new /obj/structure/AIcore/deactivated(T.loc)//Spawns a deactivated terminal at AI location. @@ -199,8 +197,6 @@ That prevents a few funky behaviors. var/obj/item/device/aicard/C = src var/mob/living/silicon/ai/A = locate() in C//I love locate(). Best proc ever. if(A)//If AI exists on the card. Else nothing since both are empty. - if(A.is_in_shell) //send them back! - A.shell.undeploy() A.control_disabled = 0 A.forceMove(T.loc)//To replace the terminal. A.update_icon() @@ -223,8 +219,6 @@ That prevents a few funky behaviors. else for(var/mob/living/silicon/ai/A in C) - if(A.is_in_shell) //send them back! - A.shell.undeploy() C.icon_state = "aicard" C.name = "inteliCard" C.overlays.len = 0 @@ -276,8 +270,6 @@ That prevents a few funky behaviors. else for(var/mob/living/silicon/ai/A in C) - if(A.is_in_shell) //send them back! - A.shell.undeploy() C.icon_state = "aicard" C.name = "inteliCard" C.overlays.len = 0 diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 0b1ab126a89..c1c6abc8c21 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -254,11 +254,7 @@ // message_admins("[key_name_admin(usr)] emagged [R.name] using robotic console!") log_game("[key_name(usr)] emagged [R.name] using robotic console!") R.SetEmagged(TRUE) - var/mob/living/silicon/ai/A = usr - if(A.is_in_shell) - to_chat(A.shell, "Hack successful. [R.name] now has access to illegal technology.") - else - to_chat(A, "Hack successful. [R.name] now has access to illegal technology.") + to_chat(usr, "Hack successful. [R.name] now has access to illegal technology.") if(R.mind.special_role) R.verbs += /mob/living/silicon/robot/proc/ResetSecurityCodes hacking = 0 diff --git a/code/game/machinery/mind_machine.dm b/code/game/machinery/mind_machine.dm index d15d44964d2..29999e667e9 100644 --- a/code/game/machinery/mind_machine.dm +++ b/code/game/machinery/mind_machine.dm @@ -65,13 +65,13 @@ /obj/machinery/mind_machine/mind_machine_hub/New() ..() - illegalSwap = boss_mobs + blacklisted_mobs + list(/mob/living/silicon/ai, /mob/living/silicon/robot/shell) - list(/mob/living/simple_animal/hostile/mechahitler, + illegalSwap = boss_mobs + blacklisted_mobs - list(/mob/living/simple_animal/hostile/mechahitler, /mob/living/simple_animal/hostile/alien/queen/large, /mob/living/simple_animal/hostile/retaliate/cockatrice, /mob/living/simple_animal/hostile/asteroid/goliath/david/dave, /mob/living/simple_animal/hostile/bear/spare, /mob/living/simple_animal/hostile/asteroid/rockernaut/boss, - /mob/living/simple_animal/hostile/mining_drone, + /mob/living/simple_animal/hostile/mining_drone ) component_parts = newlist( /obj/item/weapon/circuitboard/mind_machine_hub, diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index be13c6a31dd..245e445d8d7 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -207,10 +207,7 @@ if(src.occupant) if(isrobot(occupant)) var/mob/living/silicon/robot/R = occupant - if(R.stat)//no more borgs suiciding in recharge stations to ruin them. - go_out() - return - if(!R.client && !isshell(R)) + if((R.stat) || (!R.client))//no more borgs suiciding in recharge stations to ruin them. go_out() return restock_modules() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 28bb7de7cbd..265008a803e 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -280,9 +280,6 @@ else if (isAI(speech.speaker)) speech.job = "AI" - else if (isshell(speech.speaker)) - speech.job = "AI Shell" - // --- Cyborg --- else if (isrobot(speech.speaker)) speech.job = "Cyborg" diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index eb608bbc77d..892a397990d 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -44,10 +44,6 @@ var/obj/item/weapon/cell/cell = null var/extension = null //For making borgs start with pre-installed better components. Make the var the end of the path including the "/". -/obj/item/robot_parts/chest/complete - cell = new /obj/item/weapon/cell/high - wires = 1.0 - /obj/item/robot_parts/chest/get_cell() return cell @@ -63,10 +59,6 @@ var/obj/item/device/flash/flash1 = null var/obj/item/device/flash/flash2 = null -/obj/item/robot_parts/head/complete - flash1 = new /obj/item/device/flash - flash2 = new /obj/item/device/flash - /obj/item/robot_parts/robot_suit name = "robot endoskeleton" desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors." @@ -78,15 +70,6 @@ var/obj/item/robot_parts/chest/chest = null var/obj/item/robot_parts/head/head = null var/created_name = "" - var/ai_control = 1 - -/obj/item/robot_parts/robot_suit/mapped - l_arm = new /obj/item/robot_parts/l_arm - r_arm = new /obj/item/robot_parts/r_arm - l_leg = new /obj/item/robot_parts/l_leg - r_leg = new /obj/item/robot_parts/r_leg - chest = new /obj/item/robot_parts/chest/complete - head = new /obj/item/robot_parts/head/complete /obj/item/robot_parts/robot_suit/New() ..() @@ -226,14 +209,47 @@ if(!user.drop_item(W)) return + var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc)) + for(var/P in M.mommi_assembly_parts) //Let's give back all those mommi creation components for(var/obj/item/L in M.contents) if(L == P) L.forceMove(T) M.contents -= L - create_robot(M) + if(!O) + return + O.mmi = W + O.invisibility = 0 + O.custom_name = created_name + O.updatename("Default") + + M.brainmob.mind.transfer_to(O) + + if(O.mind && O.mind.special_role) + O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite") + + O.job = "Cyborg" + if(chest.extension) + O.component_extension = chest.extension + O.upgrade_components() + O.cell = chest.cell + O.cell.forceMove(O) + W.forceMove(O) //Should fix cybros run time erroring when blown up. It got deleted before, along with the frame. + + // Since we "magically" installed a cell, we also have to update the correct component. + if(O.cell) + var/datum/robot_component/cell_component = O.components["power cell"] + cell_component.wrapped = O.cell + cell_component.installed = 1 + + feedback_inc("cyborg_birth",1) + + spawn() + O.Namepick() + + qdel(src) else to_chat(user, "The MMI must go in after everything else!") @@ -246,113 +262,8 @@ src.created_name = t - if(W.force >= 15) //Smash those skeletons - smash() - return -/obj/item/robot_parts/robot_suit/attack_hand(mob/user) - if(!check_completion()) - return - if(ai_control) - to_chat(user, "You disable AI control on the cyborg exoskeleton.") - ai_control = 0 - else - to_chat(user, "You enable AI control on the cyborg exoskeleton.") - ai_control = 1 - -/obj/item/robot_parts/robot_suit/attack_ai(mob/user) - if(!isAI(user)) - return - if(user.isDead()) - return - if(!check_completion()) - return - if(!ai_control) - to_chat(user, "AI control is disabled on that exoskeleton.") - return - var/mob/living/silicon/ai/A = user - if(!A.shell) - A.create_shell(src) - else - to_chat(user, "You already have a shell. Destroy it to create a new one.") - -/obj/item/robot_parts/robot_suit/bullet_act(var/obj/item/projectile/P) - if(P.damage > 10) - smash() - - -/obj/item/robot_parts/robot_suit/proc/smash() - robogibs(loc) - visible_message("[src] blows apart!") - var/turf/T = get_turf(src) - if(l_arm) - l_arm.forceMove(T) - l_arm = null - if(r_arm) - r_arm.forceMove(T) - r_arm = null - if(l_leg) - l_leg.forceMove(T) - l_leg = null - if(r_leg) - r_leg.forceMove(T) - r_leg = null - if(chest) - chest.forceMove(T) - chest = null - if(head) - head.forceMove(T) - head = null - qdel(src) - -/obj/item/robot_parts/robot_suit/proc/create_robot(var/obj/item/device/mmi/M, is_shell = FALSE) - var/robottype - if(is_shell) - robottype = /mob/living/silicon/robot/shell - else - robottype = /mob/living/silicon/robot - var/mob/living/silicon/robot/O = new robottype(get_turf(loc)) - if(!O) - return - if(M) - O.mmi = M - O.invisibility = 0 - O.custom_name = created_name - O.updatename("Default") - - if(M) - M.brainmob.mind.transfer_to(O) - - if(O.mind && O.mind.special_role) - O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite") - - O.job = "Cyborg" - if(chest.extension) - O.component_extension = chest.extension - O.upgrade_components() - O.cell = chest.cell - O.cell.forceMove(O) - if(M) - M.forceMove(O) //Should fix cybros run time erroring when blown up. It got deleted before, along with the frame. - - // Since we "magically" installed a cell, we also have to update the correct component. - if(O.cell) - var/datum/robot_component/cell_component = O.components["power cell"] - cell_component.wrapped = O.cell - cell_component.installed = 1 - - feedback_inc("cyborg_birth",1) - - spawn() - if(M) - O.Namepick() - - qdel(src) - - return O - - /obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob) ..() if(istype(W, /obj/item/weapon/cell)) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index f2bcbed7ce2..f325e9d910f 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -41,13 +41,6 @@ var/list/ai_list = list() var/mentions_on = FALSE var/list/holopadoverlays = list() - //Shell stuff - var/mob/living/silicon/robot/shell/shell = null //The shell the AI currently owns - var/datum/action/deploy_shell/deploy_action = new - var/datum/action/detonate/destroy_action = new - var/is_in_shell = 0 //Is the AI currently controlling a borg - var/greeted = 0 //Shitty fix for being repeatedly told the AI greeting - // See VOX_AVAILABLE_VOICES for available values var/vox_voice = "fem"; var/vox_corrupted = FALSE @@ -115,10 +108,6 @@ var/list/ai_list = list() proc_holder_list = new() - //Action Buttons - deploy_action.Grant(src) - destroy_action.Grant(src) - //Determine the AI's lawset if(L && istype(L,/datum/ai_laws)) src.laws = L @@ -163,7 +152,7 @@ var/list/ai_list = list() spawn(1) mind.store_memory("Frequencies list:
Command: [COMM_FREQ]
Security: [SEC_FREQ]
Medical: [MED_FREQ]
Science: [SCI_FREQ]
Engineering: [ENG_FREQ]
Service: [SER_FREQ] Cargo: [SUP_FREQ]
AI private: [AIPRIV_FREQ]
") stored_freqs = 1 - greeted = 1 + job = "AI" ai_list += src ..() @@ -859,105 +848,6 @@ var/list/ai_list = list() station_holomap.toggleHolomap(src,1) -/mob/living/silicon/ai/verb/deploy_to_shell() //Pop into a shell if you own one - set category = "AI Commands" - set name = "Deploy to Shell" - - if(isDead()) - to_chat(src, "Not while you're incapacitated.") - return - if(control_disabled) - to_chat(src, "Wireless networking module is offline.") - return - if(istype(loc, /obj/machinery/power/apc)) - to_chat(src, "You can't control a shell while shunted.") - return - if(is_in_shell) //if this is true, something went wrong - return - - if(shell) //If the silicon already has a linked shell, go to that one! - if(mind) - shell.deploy(src) - - else //Otherwise, lets see if we can create a new shell - var/list/potential_shells = list() - for(var/obj/item/robot_parts/robot_suit/emptyborg in world) //Looping through the world might not be good - if(!cameranet.checkCameraVis(emptyborg)) //Must be visible - continue - if(!emptyborg.check_completion()) //Must be ready to have a posi/MMI inserted - continue - if(!emptyborg.ai_control) //AI control was disabled - continue - potential_shells.Add(emptyborg) - if(potential_shells.len == 0) - to_chat(src, "No potential cyborg shells available.") - return - var/list/options = list() - for(var/obj/item/robot_parts/robot_suit/S in potential_shells) - options["Exoskeleton #[potential_shells.Find(S)] in [get_area(S)]"] = S - var/choice = input(src, "Which exoskeleton to control?") as null|anything in options - if(shell) //no exploits allowed - to_chat(src, "You already have a shell.") - if(choice) - create_shell(options[choice]) - - -/mob/living/silicon/ai/proc/create_shell(var/obj/item/robot_parts/robot_suit/suit) - if(shell) - to_chat(src, "You already have a shell.") - return - if(mind) - to_chat(src, "Taking control of cyborg shell...") - var/mob/living/silicon/robot/shell/R = suit.create_robot(is_shell = 1) - shell = R - R.set_mainframe(src) - R.deploy() - -/datum/action/deploy_shell - name = "Deploy to AI Shell" - desc = "Wirelessly control your personal cyborg shell or create a new one from an empty exoskeleton." - icon_icon = 'icons/mob/robots.dmi' - button_icon_state = "robot" - -/datum/action/deploy_shell/Trigger() - var/mob/living/silicon/ai/AI = owner - if(!AI) - return - AI.deploy_to_shell() - -/datum/action/detonate/ - name = "Destroy shell" - desc = "Destroy your current shell and make room for a new one." - icon_icon = 'icons/mob/robots.dmi' - button_icon_state = "gibup" - -/datum/action/detonate/Trigger() - if(istype(owner, /mob/living/silicon/robot/shell)) //Pressing the button as a shell - var/mob/living/silicon/robot/shell/R = owner - R.mainframe.shell = null - R.gib() - return TRUE - - else if(istype(owner, /mob/living/silicon/ai)) //Pressing the button as an AI - var/mob/living/silicon/ai/R = owner - if(R.isDead()) - to_chat(src, "Not while you're incapacitated.") - return FALSE - if(R.control_disabled) - to_chat(src, "Wireless networking module is offline.") - return FALSE - if(R.shell) - R.shell.gib() - return TRUE - else - to_chat("You have no shell.") - return FALSE - else - to_chat("You can't do that.") - return FALSE - - - //AI_CAMERA_LUMINOSITY /mob/living/silicon/ai/proc/light_cameras() diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index ac2cbc43e3f..d3758b821aa 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -1,7 +1,4 @@ /mob/living/silicon/ai/death(gibbed) - if(shell) - shell.close_connection() - shell.gib() if(stat == DEAD) return if(!gibbed) diff --git a/code/modules/mob/living/silicon/ai/login.dm b/code/modules/mob/living/silicon/ai/login.dm index 99074a4abba..a72b75a6672 100644 --- a/code/modules/mob/living/silicon/ai/login.dm +++ b/code/modules/mob/living/silicon/ai/login.dm @@ -1,15 +1,14 @@ /mob/living/silicon/ai/Login() //ThisIsDumb(TM) TODO: tidy this up ¬_¬ ~Carn ..() - - if(!greeted) - to_chat(src, "You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).") - to_chat(src, "To look at other parts of the station, click on yourself to get a camera menu.") - to_chat(src, "While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.") - to_chat(src, "To use something, simply click on it.") - to_chat(src, {"Use say ":b to speak to your cyborgs through binary."}) - show_laws() - if(ismalf(src)) - to_chat(src, "These laws may be changed by other players, but you are not required to follow any of them.") + + to_chat(src, "You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).") + to_chat(src, "To look at other parts of the station, click on yourself to get a camera menu.") + to_chat(src, "While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.") + to_chat(src, "To use something, simply click on it.") + to_chat(src, {"Use say ":b to speak to your cyborgs through binary."}) + show_laws() + if(ismalf(src)) + to_chat(src, "These laws may be changed by other players, but you are not required to follow any of them.") var/datum/runeset/rune_set = global_runesets["blood_cult"] for(var/obj/effect/rune/rune in rune_set.rune_list) //HOLY FUCK WHO THOUGHT LOOPING THROUGH THE WORLD WAS A GOOD IDEA client.images += rune.blood_image @@ -23,11 +22,9 @@ O.mode = 1 O.emotion = "Neutral" view_core() - if (mind && !stored_freqs && !greeted) + if (mind && !stored_freqs) to_chat(src, "The various frequencies used by the crew to communicate have been stored in your mind. Use the verb Notes to access them.") spawn(1) mind.store_memory("Frequencies list:
Command: [COMM_FREQ]
Security: [SEC_FREQ]
Medical: [MED_FREQ]
Science: [SCI_FREQ]
Engineering: [ENG_FREQ]
Service: [SER_FREQ] Cargo: [SUP_FREQ]
AI private: [AIPRIV_FREQ]
") stored_freqs = 1 - if(!greeted) - greeted = 1 client.CAN_MOVE_DIAGONALLY = TRUE diff --git a/code/modules/mob/living/silicon/ai/logout.dm b/code/modules/mob/living/silicon/ai/logout.dm index 1d1feb79a35..e884841de4b 100644 --- a/code/modules/mob/living/silicon/ai/logout.dm +++ b/code/modules/mob/living/silicon/ai/logout.dm @@ -1,8 +1,7 @@ /mob/living/silicon/ai/Logout() ..() - if(!is_in_shell) - for(var/obj/machinery/ai_status_display/O in machines) //change status - O.mode = 0 + for(var/obj/machinery/ai_status_display/O in machines) //change status + O.mode = 0 if(!isturf(loc)) if (client) client.eye = loc diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index 3f636f996a9..bee73a3ec73 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -89,7 +89,3 @@ ghostize() //Somehow their MMI has no brainmob or something even worse happened. Let's just save their soul from this hell. mmi = null ..() - -/mob/living/silicon/robot/shell/Destroy() - close_connection() - ..() diff --git a/code/modules/mob/living/silicon/robot/laws.dm b/code/modules/mob/living/silicon/robot/laws.dm index 510bb3ac0c3..1e41f9edce4 100644 --- a/code/modules/mob/living/silicon/robot/laws.dm +++ b/code/modules/mob/living/silicon/robot/laws.dm @@ -38,18 +38,6 @@ if(ticker.current_state == GAME_STATE_PLAYING) //Only tell them this if the game has started. We might find an AI master for them before it starts if it hasn't. to_chat(who, "Remember, you are not bound to any AI, you are not required to listen to them.") -/mob/living/silicon/robot/shell/show_laws(var/everyone = 0) - laws_sanity_check() - var/who - if (everyone) - who = world - else - who = src - - to_chat(who, "Obey these laws:") - laws.show_laws(who) - - /mob/living/silicon/robot/proc/lawsync() laws_sanity_check() var/datum/ai_laws/master = connected_ai ? connected_ai.laws : null @@ -81,9 +69,7 @@ laws.supplied[index] = temp if(mind) - var/datum/role/mastermalf //Workaround for shelled AIs causing runtimes - mastermalf = connected_ai.is_in_shell ? connected_ai.shell.mind.GetRole(MALF) : connected_ai.mind.GetRole(MALF) - + var/datum/role/mastermalf = connected_ai.mind.GetRole(MALF) if(mastermalf) var/datum/faction/my_new_faction = mastermalf.faction my_new_faction.HandleRecruitedMind(mind) diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index 50270a537be..19cef3c8f1c 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -1,14 +1,13 @@ -/mob/living/silicon/robot/Login(var/showlaw_override = 0) +/mob/living/silicon/robot/Login() ..() regenerate_icons() - if(!showlaw_override) - show_laws(0) + show_laws(0) if(module) - module.UpdateModuleHolder(src) - if (mind && !stored_freqs && !showlaw_override) + module.UpdateModuleHolder(src) + if (mind && !stored_freqs) spawn(1) mind.store_memory("Frequencies list:
Command: [COMM_FREQ]
Security: [SEC_FREQ]
Medical: [MED_FREQ]
Science: [SCI_FREQ]
Engineering: [ENG_FREQ]
Service: [SER_FREQ] Cargo: [SUP_FREQ]
AI private: [AIPRIV_FREQ]
") stored_freqs = 1 - -/mob/living/silicon/robot/shell/Login() - ..(1) + /*if(mind) + ticker.mode.remove_revolutionary(mind) + */ diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index fee9aaf6041..1c3bef305bd 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -557,13 +557,13 @@ var/list/cyborg_list = list() to_chat(user, "The wires get in your way.") else if(prob(50)) - to_chat(user, "You emag [src]'s interface") - message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)].") sleep(6) - SetEmagged(TRUE) + SetEmagged(TRUE) SetLockdown(TRUE) lawupdate = FALSE disconnect_AI() + to_chat(user, "You emag [src]'s interface") + message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overidden.") log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.") clear_supplied_laws() clear_inherent_laws() @@ -1006,10 +1006,8 @@ var/list/cyborg_list = list() overlays.Cut() update_fire() if(!stat && cell != null) - var/icon/eyesicon = icon(icon,"eyes-[icon_state]", overlay_layer) - eyes = image(eyesicon,"eyes-[icon_state]", overlay_layer) + eyes = image(icon,"eyes-[icon_state]", overlay_layer) eyes.plane = overlay_plane - overlays += eyes if(opened) @@ -1344,155 +1342,3 @@ var/list/cyborg_list = list() //Currently only used for borg movement, to avoid awkward situations where borgs with RTG or basic cells are always slowed down /mob/living/silicon/robot/proc/get_percentage_power_for_movement() return clamp(round(cell.maxcharge/4), 0, SILI_LOW_TRIGGER) - - -//AI Shell Control - -/mob/living/silicon/robot/shell - var/is_being_controlled = FALSE //Is the shell being controlled right now - var/mob/living/silicon/ai/mainframe = null //The AI the shell belongs to. - var/datum/action/undeployment/undeployment_action = new - var/datum/action/detonate/destroy_action = new - var/last_swap = 0 - braintype = "AI Shell" - -/mob/living/silicon/robot/shell/proc/set_mainframe(mob/living/silicon/ai/A) - connected_ai = A - real_name = "Shell of [A.name]" - name = real_name - mainframe = A - mainframe.connected_robots |= src - if(radio) //Recalculate the radio channel - radio.channels = mainframe.radio.channels - radio.keyslot = new /obj/item/device/encryptionkey/ai - radio.recalculateChannels() - radio.subspace_transmission = TRUE - -/mob/living/silicon/robot/shell/proc/deploy() //called right after the AI pops into the shell. - if(is_being_controlled || mainframe.is_in_shell) - message_admins("AI/SHELL Error: Deploy() called while is_being_controlled or is_in_shell was set to true") - return - if(last_swap + 10 > world.time) - to_chat(mainframe, "Processors rebooting, please wait before redeploying.") - return - to_chat(mainframe, "Taking control of cyborg shell...") - mainframe.mind.transfer_to(src) - mainframe.is_in_shell = 1 - is_being_controlled = 1 - lawupdate = TRUE - lawsync() - undeployment_action.Grant(src) - destroy_action.Grant(src) - updateicon() - playsound_local(src, 'sound/machines/paistartup.ogg', 50) - last_swap = world.time - -/datum/action/undeployment - name = "Disconnect from shell" - desc = "Stop controlling your shell and resume normal core operations." - icon_icon = 'icons/mob/AI.dmi' - button_icon_state = "ai" - -/datum/action/undeployment/UpdateButtonIcon() - var/mob/living/silicon/robot/shell/R = owner - if(R.mainframe) - button_icon_state = "[R.mainframe.icon_state]" - else - button_icon_state = "ai" - ..() - -/datum/action/undeployment/Trigger() - if(!..()) - return FALSE - var/mob/living/silicon/robot/shell/R = owner - - R.undeploy() - return TRUE - -/mob/living/silicon/robot/shell/proc/undeploy() - if(!is_being_controlled || !mind || !mainframe) - return - if(last_swap + 10 > world.time) - to_chat(src, "Processors rebooting, please wait before undeploying.") - return - is_being_controlled = 0 - mainframe.is_in_shell = 0 - to_chat(src,"Releasing control of cyborg shell...") - mind.transfer_to(mainframe) - undeployment_action.Remove(src) - destroy_action.Remove(src) - if(mainframe.eyeobj) - mainframe.eyeobj.forceMove(loc) - updateicon() - last_swap = world.time - -/mob/living/silicon/robot/shell/proc/close_connection() - undeploy() - if(mainframe) - mainframe.shell = null - mainframe = null - -/mob/living/silicon/robot/shell/connect_AI() - to_chat(mainframe, "Notice: Connection to cyborg shell re-established." ) - SetLockdown(FALSE) - -/mob/living/silicon/robot/shell/disconnect_AI() - to_chat(src, "Notice: Connection to cyborg shell has been cut.") - SetLockdown(TRUE) - -/mob/living/silicon/robot/shell/emag_act(mob/user as mob) - if(user != src) - spark(src, 5, FALSE) - if(!opened) - if(locked) - if(prob(90)) - to_chat(user, "You emag the cover lock.") - locked = FALSE - else - to_chat(user, "You fail to emag the cover lock.") - if(prob(25)) - to_chat(src, "Hack attempt detected.") - else - to_chat(user, "The cover is already open.") - else - if(emagged) - return TRUE - if(wiresexposed) - to_chat(user, "The wires get in your way.") - else - if(prob(50)) - to_chat(user, "You emag [src]'s interface") - message_admins("[key_name_admin(user)] emagged AI-Cyborg shell [key_name_admin(src)] and destroyed it.") - sleep(6) - gib() - else - to_chat(user, "You fail to unlock [src]'s interface.") - if(prob(25)) - to_chat(src, "Hack attempt detected.") - return TRUE - -/mob/living/silicon/robot/shell/updateicon(var/overlay_layer = ABOVE_LIGHTING_LAYER, var/overlay_plane = LIGHTING_PLANE) - ..(overlay_layer, overlay_plane) - overlays.Cut() - if(!stat && cell != null && is_being_controlled) - var/icon/eyesicon = icon(icon,"eyes-[icon_state]", overlay_layer) - eyesicon.Blend(rgb(255,255,255), ICON_ADD) - eyesicon.Blend(rgb(45,45,45), ICON_SUBTRACT) - eyes = image(eyesicon,"eyes-[icon_state]", overlay_layer) - eyes.plane = overlay_plane - - overlays += eyes - -/mob/living/silicon/robot/shell/updatename() - if(mainframe) - real_name = "Shell of [mainframe.name]" - name = real_name - else - real_name = "AI Shell" - name = real_name - -/mob/living/silicon/robot/shell/attack_ai(mob/user) - var/mob/living/silicon/ai/A = user - if(A == mainframe) - deploy() - \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 6c554e33c9c..c0ecca9db73 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -118,8 +118,6 @@ /obj/item/weapon/robot_module/proc/AddEncryptionKey(var/mob/living/silicon/robot/R) if(!R.radio) return - if(isshell(R)) - return if(radio_key) R.radio.insert_key(new radio_key(R.radio)) diff --git a/code/modules/mob/living/silicon/robot/robot_verbs.dm b/code/modules/mob/living/silicon/robot/robot_verbs.dm index 99c9a70375f..404284951c1 100644 --- a/code/modules/mob/living/silicon/robot/robot_verbs.dm +++ b/code/modules/mob/living/silicon/robot/robot_verbs.dm @@ -162,11 +162,3 @@ to_chat(src, "Sensor augmentations disabled.") handle_sensor_modes() update_sight_hud() - -/mob/living/silicon/robot/shell/verb/return_to_core() - set category = "Robot Commands" - set name = "Retun to Core" - - undeploy() - - diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index e310022b73f..16fdcf5aa15 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -63,7 +63,7 @@ var/computer_id = null var/lastattacker = null var/lastattacked = null - var/list/attack_log = list() + var/attack_log = list( ) var/already_placed = 0.0 var/obj/machine var/other_mobs = null diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index ef95b953c2e..6baf50baa6e 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -946,12 +946,8 @@ src.malfai = usr:parent else src.malfai = usr - - var/mob/target_malf - target_malf = malfai.is_in_shell ? malfai.shell : malfai - to_chat(target_malf, "Hack complete. The APC is now under your exclusive control. [STATION_Z == z?"You now have [M.apcs] under your control.":"As this APC is not located on the station, it is not contributing to your control of it."]") - target_malf.handle_regular_hud_updates() - + to_chat(malfai, "Hack complete. The APC is now under your exclusive control. [STATION_Z == z?"You now have [M.apcs] under your control.":"As this APC is not located on the station, it is not contributing to your control of it."]") + malfai.handle_regular_hud_updates() update_icon() else if (href_list["occupyapc"]) diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm index 1ff8b8ff16e..f47eb65e3a7 100644 --- a/code/modules/projectiles/projectile/change.dm +++ b/code/modules/projectiles/projectile/change.dm @@ -19,17 +19,6 @@ if(ismanifested(M) || iscluwnebanned(M)) visible_message("The bolt of change doesn't seem to affect [M] in any way.") return - if(isshell(M)) //Kick out the AI if its a shell - var/mob/living/silicon/robot/shell/R = M - R.close_connection() - - if(isAI(M)) //Force the AI back if its in a shell - var/mob/living/silicon/ai/R = M - if(R.is_in_shell) - R.shell.close_connection() - R.shell.gib() //Destroy the shell, they wont be needing it anymore - - var/mob/living/new_mob // Random chance of fucking up if(type!=null && prob(10))