Revert "AI Cyborg-Shells (#27708)" (#27890)

This reverts commit e75d6b6a79.
This commit is contained in:
jknpj
2020-09-21 23:32:57 -03:00
committed by GitHub
parent bce02fc5e2
commit 466c76dcbc
18 changed files with 68 additions and 470 deletions

View File

@@ -74,8 +74,6 @@
#define isrobot(A) istype(A, /mob/living/silicon/robot) #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 isanimal(A) istype(A, /mob/living/simple_animal)
#define iscorgi(A) istype(A, /mob/living/simple_animal/corgi) #define iscorgi(A) istype(A, /mob/living/simple_animal/corgi)

View File

@@ -241,7 +241,7 @@
..() ..()
candidates = candidates[CURRENT_LIVING_PLAYERS] candidates = candidates[CURRENT_LIVING_PLAYERS]
for(var/mob/living/player in candidates) for(var/mob/living/player in candidates)
if(!isAI(player) && !isshell(player)) if(!isAI(player))
candidates -= player candidates -= player
continue continue
if(player.z == map.zCentcomm) if(player.z == map.zCentcomm)
@@ -256,14 +256,7 @@
unction = ticker.mode.CreateFaction(/datum/faction/malf, null, 1) unction = ticker.mode.CreateFaction(/datum/faction/malf, null, 1)
if(!candidates || !candidates.len) if(!candidates || !candidates.len)
return 0 return 0
var/mob/living/silicon/P = pick(candidates) var/mob/living/silicon/ai/M = 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
assigned += M assigned += M
candidates -= M candidates -= M
var/datum/role/malfAI/malf = unction.HandleNewMind(M.mind) var/datum/role/malfAI/malf = unction.HandleNewMind(M.mind)

View File

@@ -39,7 +39,7 @@
for (var/datum/role/R in members) for (var/datum/role/R in members)
if(!R.antag.current) if(!R.antag.current)
continue continue
if((isAI(R.antag.current) || isshell(R.antag.current)) && !R.antag.current.isDead()) if(isAI(R.antag.current) && !R.antag.current.isDead())
living_ais++ living_ais++
if(!living_ais && stage<MALF_CHOOSING_NUKE) if(!living_ais && stage<MALF_CHOOSING_NUKE)
command_alert(/datum/command_alert/malf_destroyed) command_alert(/datum/command_alert/malf_destroyed)
@@ -76,11 +76,8 @@
to_chat(malfAI.antag.current, {"<span class='notice'>Congratulations! The station is now under your exclusive control.<br> to_chat(malfAI.antag.current, {"<span class='notice'>Congratulations! The station is now under your exclusive control.<br>
You may decide to blow up the station. You have 60 seconds to choose.<br> You may decide to blow up the station. You have 60 seconds to choose.<br>
You should now be able to use your Explode spell to interface with the nuclear fission device.</span>"}) You should now be able to use your Explode spell to interface with the nuclear fission device.</span>"})
if(isshell(malfAI.antag.current)) malfAI.antag.current.add_spell(new /spell/targeted/ai_win, "malf_spell_ready", /obj/abstract/screen/movable/spell_master/malf)
var/mob/living/silicon/robot/shell/S = malfAI.antag.current
S.mainframe.add_spell(new /spell/targeted/ai_win, "malf_spell_ready", /obj/abstract/screen/movable/spell_master/malf)
else
malfAI.antag.current.add_spell(new /spell/targeted/ai_win, "malf_spell_ready", /obj/abstract/screen/movable/spell_master/malf)
return return
/datum/faction/malf/get_statpanel_addition() /datum/faction/malf/get_statpanel_addition()

View File

@@ -312,16 +312,6 @@ var/global/datum/controller/occupations/job_master
var/datum/job/master_assistant = GetJob("Assistant") var/datum/job/master_assistant = GetJob("Assistant")
count = (officer.current_positions + warden.current_positions + hos.current_positions) 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 those who wanted to be assistant if their preferences were filled, here you go.
for(var/mob/new_player/player in unassigned) for(var/mob/new_player/player in unassigned)
if(player.client.prefs.alternate_option == BE_ASSISTANT) if(player.client.prefs.alternate_option == BE_ASSISTANT)

View File

@@ -170,9 +170,7 @@ That prevents a few funky behaviors.
if(C.contents.len)//If there is an AI on card. if(C.contents.len)//If there is an AI on card.
to_chat(U, "<span class='danger'>Transfer failed:</span> Existing AI found on this terminal. Remove existing AI to install a new one.") to_chat(U, "<span class='danger'>Transfer failed:</span> Existing AI found on this terminal. Remove existing AI to install a new one.")
else else
if(T.deployed) //send them back! if(T.mind.GetRole(MALF))
T.shell.undeploy()
if(T.mind?.GetRole(MALF))
to_chat(U, "<span class='danger'>ERROR:</span> Remote transfer interface disabled.")//Do ho ho ho~ to_chat(U, "<span class='danger'>ERROR:</span> Remote transfer interface disabled.")//Do ho ho ho~
return return
new /obj/structure/AIcore/deactivated(T.loc)//Spawns a deactivated terminal at AI location. 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/obj/item/device/aicard/C = src
var/mob/living/silicon/ai/A = locate() in C//I love locate(). Best proc ever. 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)//If AI exists on the card. Else nothing since both are empty.
if(A.deployed) //send them back!
A.shell.undeploy()
A.control_disabled = 0 A.control_disabled = 0
A.forceMove(T.loc)//To replace the terminal. A.forceMove(T.loc)//To replace the terminal.
A.update_icon() A.update_icon()
@@ -223,8 +219,6 @@ That prevents a few funky behaviors.
else else
for(var/mob/living/silicon/ai/A in C) for(var/mob/living/silicon/ai/A in C)
if(A.deployed) //send them back!
A.shell.undeploy()
C.icon_state = "aicard" C.icon_state = "aicard"
C.name = "inteliCard" C.name = "inteliCard"
C.overlays.len = 0 C.overlays.len = 0
@@ -276,8 +270,6 @@ That prevents a few funky behaviors.
else else
for(var/mob/living/silicon/ai/A in C) for(var/mob/living/silicon/ai/A in C)
if(A.deployed) //send them back!
A.shell.undeploy()
C.icon_state = "aicard" C.icon_state = "aicard"
C.name = "inteliCard" C.name = "inteliCard"
C.overlays.len = 0 C.overlays.len = 0

View File

@@ -254,11 +254,7 @@
// message_admins("<span class='notice'>[key_name_admin(usr)] emagged [R.name] using robotic console!</span>") // message_admins("<span class='notice'>[key_name_admin(usr)] emagged [R.name] using robotic console!</span>")
log_game("[key_name(usr)] emagged [R.name] using robotic console!") log_game("[key_name(usr)] emagged [R.name] using robotic console!")
R.SetEmagged(TRUE) R.SetEmagged(TRUE)
var/mob/living/silicon/ai/A = usr to_chat(usr, "Hack successful. [R.name] now has access to illegal technology.")
if(A.deployed)
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.")
if(R.mind.special_role) if(R.mind.special_role)
R.verbs += /mob/living/silicon/robot/proc/ResetSecurityCodes R.verbs += /mob/living/silicon/robot/proc/ResetSecurityCodes
hacking = 0 hacking = 0

View File

@@ -280,9 +280,6 @@
else if (isAI(speech.speaker)) else if (isAI(speech.speaker))
speech.job = "AI" speech.job = "AI"
else if (isshell(speech.speaker))
speech.job = "AI Shell"
// --- Cyborg --- // --- Cyborg ---
else if (isrobot(speech.speaker)) else if (isrobot(speech.speaker))
speech.job = "Cyborg" speech.job = "Cyborg"

View File

@@ -44,10 +44,6 @@
var/obj/item/weapon/cell/cell = null 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 "/". 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() /obj/item/robot_parts/chest/get_cell()
return cell return cell
@@ -63,10 +59,6 @@
var/obj/item/device/flash/flash1 = null var/obj/item/device/flash/flash1 = null
var/obj/item/device/flash/flash2 = 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 /obj/item/robot_parts/robot_suit
name = "robot endoskeleton" name = "robot endoskeleton"
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors." 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/chest/chest = null
var/obj/item/robot_parts/head/head = null var/obj/item/robot_parts/head/head = null
var/created_name = "" 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() /obj/item/robot_parts/robot_suit/New()
..() ..()
@@ -226,15 +209,47 @@
if(!user.drop_item(W)) if(!user.drop_item(W))
return 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/P in M.mommi_assembly_parts) //Let's give back all those mommi creation components
for(var/obj/item/L in M.contents) for(var/obj/item/L in M.contents)
if(L == P) if(L == P)
L.forceMove(T) L.forceMove(T)
M.contents -= L 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 else
to_chat(user, "<span class='notice'>The MMI must go in after everything else!</span>") to_chat(user, "<span class='notice'>The MMI must go in after everything else!</span>")
@@ -247,109 +262,8 @@
src.created_name = t src.created_name = t
if(W.force >= 15) //Smash those skeletons
smash()
return return
/obj/item/robot_parts/robot_suit/attack_hand(mob/user)
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(!check_completion())
return
if(!ai_control)
to_chat(user, "<span class='warning'>AI control is disabled on that exoskeleton.</span>")
return
var/mob/living/silicon/ai/A = user
if(!A.shell)
A.create_shell(src)
else
to_chat(user, "<span class='warning'>You already have a shell. Destroy it to create a new one.</span>")
/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("<span class='danger'>[src] blows apart!</span>")
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) /obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob)
..() ..()
if(istype(W, /obj/item/weapon/cell)) if(istype(W, /obj/item/weapon/cell))

View File

@@ -534,7 +534,6 @@
if (sterile) if (sterile)
to_chat(user, "<span class='danger'>It looks like \the [src]'s has been de-beaked.</span>") to_chat(user, "<span class='danger'>It looks like \the [src]'s has been de-beaked.</span>")
return return
/obj/item/clothing/mask/facehugger/headcrab/Attach(mob/living/L) /obj/item/clothing/mask/facehugger/headcrab/Attach(mob/living/L)
if(escaping) if(escaping)
return FALSE return FALSE

View File

@@ -41,13 +41,6 @@ var/list/ai_list = list()
var/mentions_on = FALSE var/mentions_on = FALSE
var/list/holopadoverlays = list() 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/deployed = 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 // See VOX_AVAILABLE_VOICES for available values
var/vox_voice = "fem"; var/vox_voice = "fem";
var/vox_corrupted = FALSE var/vox_corrupted = FALSE
@@ -115,10 +108,6 @@ var/list/ai_list = list()
proc_holder_list = new() proc_holder_list = new()
//Action Buttons
deploy_action.Grant(src)
destroy_action.Grant(src)
//Determine the AI's lawset //Determine the AI's lawset
if(L && istype(L,/datum/ai_laws)) if(L && istype(L,/datum/ai_laws))
src.laws = L src.laws = L
@@ -163,7 +152,7 @@ var/list/ai_list = list()
spawn(1) spawn(1)
mind.store_memory("Frequencies list: <br/><b>Command:</b> [COMM_FREQ] <br/> <b>Security:</b> [SEC_FREQ] <br/> <b>Medical:</b> [MED_FREQ] <br/> <b>Science:</b> [SCI_FREQ] <br/> <b>Engineering:</b> [ENG_FREQ] <br/> <b>Service:</b> [SER_FREQ] <b>Cargo:</b> [SUP_FREQ]<br/> <b>AI private:</b> [AIPRIV_FREQ]<br/>") mind.store_memory("Frequencies list: <br/><b>Command:</b> [COMM_FREQ] <br/> <b>Security:</b> [SEC_FREQ] <br/> <b>Medical:</b> [MED_FREQ] <br/> <b>Science:</b> [SCI_FREQ] <br/> <b>Engineering:</b> [ENG_FREQ] <br/> <b>Service:</b> [SER_FREQ] <b>Cargo:</b> [SUP_FREQ]<br/> <b>AI private:</b> [AIPRIV_FREQ]<br/>")
stored_freqs = 1 stored_freqs = 1
greeted = 1
job = "AI" job = "AI"
ai_list += src ai_list += src
..() ..()
@@ -859,107 +848,6 @@ var/list/ai_list = list()
station_holomap.toggleHolomap(src,1) 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(incapacitated())
to_chat(src, "<span class='warning'>Not while you're incapacitated.</span>")
return
if(control_disabled)
to_chat(src, "<span class='warning'>Wireless networking module is offline.</span>")
return
if(istype(loc, /obj/machinery/power/apc))
to_chat(src, "<span class='warning'>You can't control a shell while shunted.</span>")
return
if(shell) //If the silicon already has a linked shell, go to that one!
sleep(1) //spamming the verb breaks things
if (shell.deployed || shell.mainframe != src)
return
if(mind)
to_chat(src, "Taking control of cyborg shell...")
deployed = 1
mind.transfer_to(shell)
shell.deploy_init(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, "<span class='warning'>No potential cyborg shells available.</span>")
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, "<span class='warning'>You already have a shell.</span>")
if(choice)
create_shell(options[choice])
/mob/living/silicon/ai/proc/create_shell(var/obj/item/robot_parts/robot_suit/suit)
if(mind && !shell)
deployed = 1
to_chat(src, "Taking control of cyborg shell...")
var/mob/living/silicon/robot/shell/R = suit.create_robot(is_shell = 1)
shell = R
mind.transfer_to(R)
R.deploy_init(src)
/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.incapacitated())
to_chat(src, "<span class='warning'>Not while you're incapacitated.</span>")
return FALSE
if(R.control_disabled)
to_chat(src, "<span class='warning'>Wireless networking module is offline.</span>")
return FALSE
if(R.shell)
R.shell.gib()
return TRUE
else
to_chat("<span class='warning'>You have no shell.</span>")
return FALSE
else
to_chat("<span class='warning'>You can't do that.</span>")
return FALSE
//AI_CAMERA_LUMINOSITY //AI_CAMERA_LUMINOSITY
/mob/living/silicon/ai/proc/light_cameras() /mob/living/silicon/ai/proc/light_cameras()

View File

@@ -1,8 +1,4 @@
/mob/living/silicon/ai/death(gibbed) /mob/living/silicon/ai/death(gibbed)
if(deployed)
shell.undeploy()
shell.mainframe = null
shell.gib()
if(stat == DEAD) if(stat == DEAD)
return return
if(!gibbed) if(!gibbed)

View File

@@ -1,15 +1,14 @@
/mob/living/silicon/ai/Login() //ThisIsDumb(TM) TODO: tidy this up ¬_¬ ~Carn /mob/living/silicon/ai/Login() //ThisIsDumb(TM) TODO: tidy this up ¬_¬ ~Carn
..() ..()
if(!greeted) to_chat(src, "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>")
to_chat(src, "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>") to_chat(src, "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>")
to_chat(src, "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>") to_chat(src, "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>")
to_chat(src, "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>") to_chat(src, "To use something, simply click on it.")
to_chat(src, "To use something, simply click on it.") to_chat(src, {"Use say ":b to speak to your cyborgs through binary."})
to_chat(src, {"Use say ":b to speak to your cyborgs through binary."}) show_laws()
show_laws() if(ismalf(src))
if(ismalf(src)) to_chat(src, "<b>These laws may be changed by other players, but you are not required to follow any of them.</b>")
to_chat(src, "<b>These laws may be changed by other players, but you are not required to follow any of them.</b>")
var/datum/runeset/rune_set = global_runesets["blood_cult"] 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 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 client.images += rune.blood_image
@@ -23,11 +22,9 @@
O.mode = 1 O.mode = 1
O.emotion = "Neutral" O.emotion = "Neutral"
view_core() 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 <i>Notes</i> to access them.") to_chat(src, "The various frequencies used by the crew to communicate have been stored in your mind. Use the verb <i>Notes</i> to access them.")
spawn(1) spawn(1)
mind.store_memory("Frequencies list: <br/><b>Command:</b> [COMM_FREQ] <br/> <b>Security:</b> [SEC_FREQ] <br/> <b>Medical:</b> [MED_FREQ] <br/> <b>Science:</b> [SCI_FREQ] <br/> <b>Engineering:</b> [ENG_FREQ] <br/> <b>Service:</b> [SER_FREQ] <b>Cargo:</b> [SUP_FREQ]<br/> <b>AI private:</b> [AIPRIV_FREQ]<br/>") mind.store_memory("Frequencies list: <br/><b>Command:</b> [COMM_FREQ] <br/> <b>Security:</b> [SEC_FREQ] <br/> <b>Medical:</b> [MED_FREQ] <br/> <b>Science:</b> [SCI_FREQ] <br/> <b>Engineering:</b> [ENG_FREQ] <br/> <b>Service:</b> [SER_FREQ] <b>Cargo:</b> [SUP_FREQ]<br/> <b>AI private:</b> [AIPRIV_FREQ]<br/>")
stored_freqs = 1 stored_freqs = 1
if(!greeted)
greeted = 1
client.CAN_MOVE_DIAGONALLY = TRUE client.CAN_MOVE_DIAGONALLY = TRUE

View File

@@ -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. ghostize() //Somehow their MMI has no brainmob or something even worse happened. Let's just save their soul from this hell.
mmi = null mmi = null
..() ..()
/mob/living/silicon/robot/shell/Destroy()
close_connection()
..()

View File

@@ -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. 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, "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>") to_chat(who, "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>")
/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, "<b>Obey these laws:</b>")
laws.show_laws(who)
/mob/living/silicon/robot/proc/lawsync() /mob/living/silicon/robot/proc/lawsync()
laws_sanity_check() laws_sanity_check()
var/datum/ai_laws/master = connected_ai ? connected_ai.laws : null var/datum/ai_laws/master = connected_ai ? connected_ai.laws : null
@@ -81,9 +69,7 @@
laws.supplied[index] = temp laws.supplied[index] = temp
if(mind) if(mind)
var/datum/role/mastermalf //Workaround for shelled AIs causing runtimes var/datum/role/mastermalf = connected_ai.mind.GetRole(MALF)
mastermalf = connected_ai.deployed ? connected_ai.shell.mind.GetRole(MALF) : connected_ai.mind.GetRole(MALF)
if(mastermalf) if(mastermalf)
var/datum/faction/my_new_faction = mastermalf.faction var/datum/faction/my_new_faction = mastermalf.faction
my_new_faction.HandleRecruitedMind(mind) my_new_faction.HandleRecruitedMind(mind)

View File

@@ -1,14 +1,13 @@
/mob/living/silicon/robot/Login(var/showlaw_override = 0) /mob/living/silicon/robot/Login()
..() ..()
regenerate_icons() regenerate_icons()
if(!showlaw_override) show_laws(0)
show_laws(0)
if(module) if(module)
module.UpdateModuleHolder(src) module.UpdateModuleHolder(src)
if (mind && !stored_freqs && !showlaw_override) if (mind && !stored_freqs)
spawn(1) spawn(1)
mind.store_memory("Frequencies list: <br/><b>Command:</b> [COMM_FREQ] <br/> <b>Security:</b> [SEC_FREQ] <br/> <b>Medical:</b> [MED_FREQ] <br/> <b>Science:</b> [SCI_FREQ] <br/> <b>Engineering:</b> [ENG_FREQ] <br/> <b>Service:</b> [SER_FREQ] <b>Cargo:</b> [SUP_FREQ]<br/> <b>AI private:</b> [AIPRIV_FREQ]<br/>") mind.store_memory("Frequencies list: <br/><b>Command:</b> [COMM_FREQ] <br/> <b>Security:</b> [SEC_FREQ] <br/> <b>Medical:</b> [MED_FREQ] <br/> <b>Science:</b> [SCI_FREQ] <br/> <b>Engineering:</b> [ENG_FREQ] <br/> <b>Service:</b> [SER_FREQ] <b>Cargo:</b> [SUP_FREQ]<br/> <b>AI private:</b> [AIPRIV_FREQ]<br/>")
stored_freqs = 1 stored_freqs = 1
/*if(mind)
/mob/living/silicon/robot/shell/Login() ticker.mode.remove_revolutionary(mind)
..(1) */

View File

@@ -557,13 +557,13 @@ var/list/cyborg_list = list()
to_chat(user, "The wires get in your way.") to_chat(user, "The wires get in your way.")
else else
if(prob(50)) 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) sleep(6)
SetEmagged(TRUE) SetEmagged(TRUE)
SetLockdown(TRUE) SetLockdown(TRUE)
lawupdate = FALSE lawupdate = FALSE
disconnect_AI() 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.") log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
clear_supplied_laws() clear_supplied_laws()
clear_inherent_laws() clear_inherent_laws()
@@ -1006,10 +1006,8 @@ var/list/cyborg_list = list()
overlays.Cut() overlays.Cut()
update_fire() update_fire()
if(!stat && cell != null) if(!stat && cell != null)
var/icon/eyesicon = icon(icon,"eyes-[icon_state]", overlay_layer) eyes = image(icon,"eyes-[icon_state]", overlay_layer)
eyes = image(eyesicon,"eyes-[icon_state]", overlay_layer)
eyes.plane = overlay_plane eyes.plane = overlay_plane
overlays += eyes overlays += eyes
if(opened) if(opened)
@@ -1344,126 +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 //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() /mob/living/silicon/robot/proc/get_percentage_power_for_movement()
return clamp(round(cell.maxcharge/4), 0, SILI_LOW_TRIGGER) return clamp(round(cell.maxcharge/4), 0, SILI_LOW_TRIGGER)
//AI Shell Control
/mob/living/silicon/robot/shell
var/deployed = 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
braintype = "AI Shell"
/mob/living/silicon/robot/shell/proc/deploy_init(mob/living/silicon/ai/AI) //called right after the AI pops into the shell.
deployed = TRUE
connected_ai = AI
real_name = "Shell of [AI.name]"
name = real_name
mainframe = AI
mainframe.connected_robots |= src
lawupdate = TRUE
lawsync()
if(radio && AI.radio)
radio.channels = AI.radio.channels
radio.subspace_transmission = TRUE
undeployment_action.Grant(src)
destroy_action.Grant(src)
updateicon()
/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(!deployed || !mind || !mainframe)
return
sleep(1) //spamming this breaks things
to_chat(src,"Releasing control of cyborg shell...")
mind.transfer_to(mainframe)
mainframe.deployed = 0
deployed = FALSE
undeployment_action.Remove(src)
destroy_action.Remove(src)
if(radio) //Recalculate the radio channel
radio.recalculateChannels()
if(mainframe.eyeobj)
mainframe.eyeobj.forceMove(loc)
updateicon()
/mob/living/silicon/robot/shell/proc/close_connection()
if(deployed)
undeploy()
if(mainframe)
mainframe.shell = null
mainframe = null
/mob/living/silicon/robot/shell/connect_AI()
to_chat(mainframe, "<span class='notice' style=\"font-family:Courier\">Notice: Connection to cyborg shell re-established.</span>" )
SetLockdown(FALSE)
/mob/living/silicon/robot/shell/disconnect_AI()
to_chat(src, "<span class='alert' style=\"font-family:Courier\">Notice: Connection to cyborg shell has been cut.</span>")
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, "<span class='danger'><span style=\"font-family:Courier\">Hack attempt detected.</span>")
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, "<span class='danger'><span style=\"font-family:Courier\">Hack attempt detected.</span>")
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 && deployed)
var/icon/eyesicon = icon(icon,"eyes-[icon_state]", overlay_layer)
eyesicon.Blend(rgb(255,255,255), ICON_ADD)
eyesicon.Blend(rgb(65,65,65), ICON_SUBTRACT)
eyes = image(eyesicon,"eyes-[icon_state]", overlay_layer)
eyes.plane = overlay_plane
overlays += eyes

View File

@@ -946,12 +946,8 @@
src.malfai = usr:parent src.malfai = usr:parent
else else
src.malfai = usr src.malfai = usr
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."]")
var/mob/target_malf malfai.handle_regular_hud_updates()
target_malf = malfai.deployed ? 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()
update_icon() update_icon()
else if (href_list["occupyapc"]) else if (href_list["occupyapc"])

View File

@@ -19,17 +19,6 @@
if(ismanifested(M) || iscluwnebanned(M)) if(ismanifested(M) || iscluwnebanned(M))
visible_message("<span class='caution'>The bolt of change doesn't seem to affect [M] in any way.</span>") visible_message("<span class='caution'>The bolt of change doesn't seem to affect [M] in any way.</span>")
return 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.deployed)
R.shell.undeploy()
R.shell.gib() //Destroy the shell, they wont be needing it anymore
var/mob/living/new_mob var/mob/living/new_mob
// Random chance of fucking up // Random chance of fucking up
if(type!=null && prob(10)) if(type!=null && prob(10))