diff --git a/code/__DEFINES/typecheck/mobs_generic.dm b/code/__DEFINES/typecheck/mobs_generic.dm index 1d848decda4e..aed270cdca25 100644 --- a/code/__DEFINES/typecheck/mobs_generic.dm +++ b/code/__DEFINES/typecheck/mobs_generic.dm @@ -1,11 +1,8 @@ -#define isAI(A) (istype(A, /mob/living/silicon/ai)) #define isARES(A) (istype(A, /mob/living/silicon/decoy/ship_ai)) #define isSilicon(A) (istype(A, /mob/living/silicon)) #define isRemoteControlling(M) (M && M.client && M.client.remote_control) -#define isRemoteControllingOrAI(M) ((M && M.client && M.client.remote_control) || (istype(M, /mob/living/silicon/ai))) #define isbrain(A) (istype(A, /mob/living/brain)) -#define isrobot(A) (istype(A, /mob/living/silicon/robot)) #define isanimal(A) (istype(A, /mob/living/simple_animal)) #define isanimalhostile(A) (istype(A, /mob/living/simple_animal/hostile)) #define isanimalretaliate(A) (istype(A, /mob/living/simple_animal/hostile/retaliate)) @@ -17,12 +14,9 @@ #define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp)) #define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown)) #define iscarbon(A) (istype(A, /mob/living/carbon)) -#define isborg(A) (isrobot(A) && !ismaintdrone(A)) -#define ishighersilicon(A) (isborg(A) || isRemoteControllingOrAI(A)) #define isliving(A) (istype(A, /mob/living)) #define isobserver(A) (istype(A, /mob/dead/observer)) #define isorgan(A) (istype(A, /obj/limb)) #define isnewplayer(A) (istype(A, /mob/new_player)) -#define ismaintdrone(A) (istype(A,/mob/living/silicon/robot/drone)) #define isHellhound(A) (istype(A, /mob/living/carbon/xenomorph/hellhound)) #define isaghost(A) (copytext(A.key, 1, 2) == "@") diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 5ef9ff7e35c3..8b11a3797627 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -151,16 +151,6 @@ var/list/speaker_coverage = list() for(var/obj/item/device/radio/R in radios) if(R) - //Cyborg checks. Receiving message uses a bit of cyborg's charge. - var/obj/item/device/radio/borg/BR = R - if(istype(BR) && BR.myborg) - var/mob/living/silicon/robot/borg = BR.myborg - var/datum/robot_component/CO = borg.get_component("radio") - if(!CO) - continue //No radio component (Shouldn't happen) - if(!borg.is_component_functioning("radio") || !borg.cell_use_power(CO.active_usage)) - continue //No power. - var/turf/speaker = get_turf(R) if(speaker) for(var/turf/T in hear(R.canhear_range,speaker)) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index a7af9d7f6324..259c15891938 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -330,56 +330,17 @@ if(!newname) //we'll stick with the oldname then return - if(cmptext("ai",role)) - if(isAI(src)) - var/mob/living/silicon/ai/A = src - oldname = null//don't bother with the records update crap - A.SetName(newname) - fully_replace_character_name(oldname,newname) - - -//When a borg is activated, it can choose which AI it wants to be slaved to -/proc/active_ais() - . = list() - for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list) - if(A.stat == DEAD) - continue - if(A.control_disabled == 1) - continue - . += A - return . - -//Find an active ai with the least borgs. VERBOSE PROCNAME HUH! -/proc/select_active_ai_with_fewest_borgs() - var/mob/living/silicon/ai/selected - var/list/active = active_ais() - for(var/mob/living/silicon/ai/A in active) - if(!selected || (selected.connected_robots > A.connected_robots)) - selected = A - - return selected - -/proc/select_active_ai(mob/user) - var/list/ais = active_ais() - if(ais.len) - if(user) . = tgui_input_list(usr,"AI signals detected:", "AI selection", ais) - else . = pick(ais) - return . - /proc/get_sorted_mobs() var/list/old_list = getmobs() - var/list/AI_list = list() var/list/Dead_list = list() var/list/keyclient_list = list() var/list/key_list = list() var/list/logged_list = list() for(var/named in old_list) var/mob/M = old_list[named] - if(isSilicon(M)) - AI_list |= M - else if(isobserver(M) || M.stat == 2) + if(isobserver(M) || M.stat == 2) Dead_list |= M else if(M.key && M.client) keyclient_list |= M @@ -389,7 +350,6 @@ logged_list |= M old_list.Remove(named) var/list/new_list = list() - new_list += AI_list new_list += keyclient_list new_list += key_list new_list += logged_list diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index 0b7a4af0f05f..5d7955d85013 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -35,10 +35,6 @@ GLOBAL_LIST_INIT(reverse_dir, list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13 GLOBAL_VAR(join_motd) GLOBAL_VAR(current_tms) -GLOBAL_LIST_INIT(BorgWireColorToFlag, RandomBorgWires()) -GLOBAL_LIST(BorgIndexToFlag) -GLOBAL_LIST(BorgIndexToWireColor) -GLOBAL_LIST(BorgWireColorToIndex) GLOBAL_LIST_INIT(AAlarmWireColorToFlag, RandomAAlarmWires()) GLOBAL_LIST(AAlarmIndexToFlag) GLOBAL_LIST(AAlarmIndexToWireColor) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm deleted file mode 100644 index c3056ed5af5f..000000000000 --- a/code/_onclick/cyborg.dm +++ /dev/null @@ -1,143 +0,0 @@ -/* - Cyborg ClickOn() - - Cyborgs have no range restriction on attack_robot(), because it is basically an AI click. - However, they do have a range restriction on item use, so they cannot do without the - adjacency code. -*/ - -/mob/living/silicon/robot/click(atom/A, mods) - if(lockcharge || is_mob_incapacitated(TRUE)) - return 1 - - if(mods["middle"]) - cycle_modules() - return 1 - - if (mods["ctrl"] && mods["shift"]) - if (!A.BorgCtrlShiftClick(src)) - return 1 - - else if (mods["ctrl"]) - if (!A.BorgCtrlClick(src)) - return 1 - - else if(mods["shift"]) - return A.BorgShiftClick(src) - - if(mods["alt"]) // alt and alt-gr (rightalt) - if (!A.BorgAltClick(src)) - return 1 - - - if(aiCamera.in_camera_mode) - aiCamera.camera_mode_off() - if(is_component_functioning("camera")) - aiCamera.captureimage(A, usr) - else - to_chat(src, SPAN_DANGER("Your camera isn't functional.")) - return 1 - - face_atom(A) - if (world.time <= next_move) return - var/obj/item/W = get_active_hand() - - // Cyborgs have no range-checking unless there is item use - if(!W) - A.add_hiddenprint(src) - A.attack_robot(src) - return 1 - - // buckled cannot prevent machine interlinking but stops arm movement - if( buckled ) - return 1 - - if(W == A) - next_move = world.time + 8 - - W.attack_self(src) - return 1 - - // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents) - if(A == loc || (A in loc) || (A in contents)) - // No adjacency checks - next_move = world.time + 8 - - var/resolved = A.attackby(W,src) - if(!resolved && A && W) - W.afterattack(A, src, 1, mods) - return 1 - - if(!isturf(loc)) - return 1 - - // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc)) - if(isturf(A) || isturf(A.loc)) - if(A.Adjacent(src)) // see adjacent.dm - next_move = world.time + 10 - - var/resolved = A.attackby(W, src) - if(!resolved && A && W) - W.afterattack(A, src, 1, mods) - return 1 - else - next_move = world.time + 10 - W.afterattack(A, src, 0, mods) - return 1 - return 0 - - - -//Give cyborgs hotkey clicks without breaking existing uses of hotkey clicks -// for non-doors/apcs - -/atom/proc/BorgCtrlShiftClick(mob/living/silicon/robot/user) //forward to human click if not overriden - return 1 - -/obj/structure/machinery/door/airlock/BorgCtrlShiftClick() - AICtrlShiftClick() - -/atom/proc/BorgShiftClick(mob/living/silicon/robot/user) //this should only return 1 if it is not overridden. this prevents things like examining objects also clicking them with an activated module. - return 1 - -/obj/structure/machinery/door/airlock/BorgShiftClick() // Opens and closes doors! Forwards to AI code. - AIShiftClick() - - -/atom/proc/BorgCtrlClick(mob/living/silicon/robot/user) //forward to human click if not overriden - return 1 - -/obj/structure/machinery/door/airlock/BorgCtrlClick() // Bolts doors. Forwards to AI code. - AICtrlClick() - -/obj/structure/machinery/power/apc/BorgCtrlClick() // turns off/on APCs. Forwards to AI code. - AICtrlClick() - -/obj/structure/machinery/turretid/BorgCtrlClick() //turret control on/off. Forwards to AI code. - AICtrlClick() - -/atom/proc/BorgAltClick(mob/living/silicon/robot/user) - return 1 - -/obj/structure/machinery/door/airlock/BorgAltClick() // Eletrifies doors. Forwards to AI code. - AIAltClick() - -/obj/structure/machinery/turretid/BorgAltClick() //turret lethal on/off. Forwards to AI code. - AIAltClick() - -/* - As with AI, these are not used in click code, - because the code for robots is specific, not generic. - - If you would like to add advanced features to robot - clicks, you can do so here, but you will have to - change attack_robot() above to the proper function -*/ -/mob/living/silicon/robot/UnarmedAttack(atom/A) - A.attack_robot(src) -/mob/living/silicon/robot/RangedAttack(atom/A) - A.attack_robot(src) - -/atom/proc/attack_robot(mob/user as mob) - attack_remote(user) - return diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm deleted file mode 100644 index af961f82bab2..000000000000 --- a/code/_onclick/hud/robot.dm +++ /dev/null @@ -1,151 +0,0 @@ -/datum/hud/robot - var/datum/custom_hud/robot/ui_robot_datum - -/datum/hud/robot/New(mob/living/silicon/robot/owner) - ..() - var/atom/movable/screen/using - - ui_robot_datum = GLOB.custom_huds_list[HUD_ROBOT] - -//Radio - using = new /atom/movable/screen() - using.name = "radio" - using.setDir(SOUTHWEST) - using.icon = ui_robot_datum.ui_style_icon - using.icon_state = "radio" - using.screen_loc = ui_robot_datum.ui_movi - using.layer = ABOVE_HUD_LAYER - using.plane = ABOVE_HUD_PLANE - static_inventory += using - -//Module select - - using = new /atom/movable/screen() - using.name = "module1" - using.setDir(SOUTHWEST) - using.icon = ui_robot_datum.ui_style_icon - using.icon_state = "inv1" - using.screen_loc = ui_robot_datum.ui_inv1 - using.layer = ABOVE_HUD_LAYER - using.plane = ABOVE_HUD_PLANE - owner.inv1 = using - static_inventory += using - - using = new /atom/movable/screen() - using.name = "module2" - using.setDir(SOUTHWEST) - using.icon = ui_robot_datum.ui_style_icon - using.icon_state = "inv2" - using.screen_loc = ui_robot_datum.ui_inv2 - using.layer = ABOVE_HUD_LAYER - using.plane = ABOVE_HUD_PLANE - owner.inv2 = using - static_inventory += using - - using = new /atom/movable/screen() - using.name = "module3" - using.setDir(SOUTHWEST) - using.icon = ui_robot_datum.ui_style_icon - using.icon_state = "inv3" - using.screen_loc = ui_robot_datum.ui_inv3 - using.layer = ABOVE_HUD_LAYER - using.plane = ABOVE_HUD_PLANE - owner.inv3 = using - static_inventory += using - -//End of module select - -//Intent - using = new /atom/movable/screen/act_intent() - using.icon = ui_robot_datum.ui_style_icon - using.icon_state = "intent_"+ intent_text(owner.a_intent) - static_inventory += using - action_intent = using - -//Cell - owner.cells = new /atom/movable/screen() - owner.cells.icon = ui_robot_datum.ui_style_icon - owner.cells.icon_state = "charge-empty" - owner.cells.name = "cell" - owner.cells.screen_loc = ui_robot_datum.ui_toxin - infodisplay += owner.cells - -//Health - healths = new /atom/movable/screen/healths() - healths.icon = ui_robot_datum.ui_style_icon - healths.screen_loc = ui_robot_datum.ui_borg_health - infodisplay += healths - -//Installed Module - owner.hands = new /atom/movable/screen() - owner.hands.icon = ui_robot_datum.ui_style_icon - owner.hands.icon_state = "nomod" - owner.hands.name = "module" - owner.hands.screen_loc = ui_robot_datum.ui_borg_module - static_inventory += owner.hands - -//Module Panel - using = new /atom/movable/screen() - using.name = "panel" - using.icon = ui_robot_datum.ui_style_icon - using.icon_state = "panel" - using.screen_loc = ui_robot_datum.ui_borg_panel - using.layer = HUD_LAYER - static_inventory += using - -//Store - module_store_icon = new /atom/movable/screen() - module_store_icon.icon = ui_robot_datum.ui_style_icon - module_store_icon.icon_state = "store" - module_store_icon.name = "store" - module_store_icon.screen_loc = ui_robot_datum.ui_borg_store - static_inventory += module_store_icon - -//Temp - bodytemp_icon = new /atom/movable/screen/bodytemp() - bodytemp_icon.screen_loc = ui_robot_datum.ui_borg_temp - infodisplay += bodytemp_icon - - oxygen_icon = new /atom/movable/screen/oxygen() - oxygen_icon.icon = ui_robot_datum.ui_style_icon - oxygen_icon.screen_loc = ui_robot_datum.UI_OXYGEN_LOC - infodisplay += oxygen_icon - - pull_icon = new /atom/movable/screen/pull() - pull_icon.icon = ui_robot_datum.ui_style_icon - pull_icon.screen_loc = ui_robot_datum.ui_borg_pull - static_inventory += pull_icon - - zone_sel = new /atom/movable/screen/zone_sel/robot() - zone_sel.screen_loc = ui_robot_datum.ui_zonesel - zone_sel.update_icon(owner) - static_inventory += zone_sel - -/mob/living/silicon/robot/create_hud() - if(!hud_used) - hud_used = new /datum/hud/robot(src) - - - -/datum/hud/robot/persistent_inventory_update() - if(!mymob || !ui_robot_datum) - return - var/mob/living/silicon/robot/R = mymob - if(hud_shown) - if(R.module_state_1) - R.module_state_1.screen_loc = ui_robot_datum.ui_inv1 - R.client.add_to_screen(R.module_state_1) - if(R.module_state_2) - R.module_state_2.screen_loc = ui_robot_datum.ui_inv2 - R.client.add_to_screen(R.module_state_2) - if(R.module_state_3) - R.module_state_3.screen_loc = ui_robot_datum.ui_inv3 - R.client.add_to_screen(R.module_state_3) - else - if(R.module_state_1) - R.module_state_1.screen_loc = null - if(R.module_state_2) - R.module_state_2.screen_loc = null - if(R.module_state_3) - R.module_state_3.screen_loc = null - diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index d114aff6b7cb..08844851de62 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -211,9 +211,6 @@ update_icon(user) return 1 -/atom/movable/screen/zone_sel/robot - icon = 'icons/mob/hud/screen1_robot.dmi' - /atom/movable/screen/clicked(mob/user) if(!user) return TRUE @@ -232,42 +229,6 @@ user.unset_interaction() return 1 - if("module") - if(isSilicon(user)) - if(user:module) - return 1 - user:pick_module() - return 1 - - if("radio") - if(isSilicon(user)) - user:radio_menu() - return 1 - if("panel") - if(isSilicon(user)) - user:installed_modules() - return 1 - - if("store") - if(isSilicon(user)) - user:uneq_active() - return 1 - - if("module1") - if(isrobot(user)) - user:toggle_module(1) - return 1 - - if("module2") - if(isrobot(user)) - user:toggle_module(2) - return 1 - - if("module3") - if(isrobot(user)) - user:toggle_module(3) - return 1 - if("Activate weapon attachment") var/obj/item/weapon/gun/held_item = user.get_held_item() if(istype(held_item)) diff --git a/code/datums/diseases/magnitis.dm b/code/datums/diseases/magnitis.dm index 4b6e685e447c..d4ba54597862 100644 --- a/code/datums/diseases/magnitis.dm +++ b/code/datums/diseases/magnitis.dm @@ -22,7 +22,6 @@ if(!M.anchored && (M.flags_atom & CONDUCT)) step_towards(M,affected_mob) for(var/mob/living/silicon/S in orange(2,affected_mob)) - if(isAI(S)) continue step_towards(S,affected_mob) /* if(M.x > affected_mob.x) @@ -47,7 +46,6 @@ for(i=0,i= 2) for(var/obj/structure/machinery/camera/C in src) C.network.Remove(CAMERA_NET_ATMOSPHERE_ALARMS) - for(var/mob/living/silicon/aiPlayer in GLOB.ai_mob_list) - aiPlayer.cancelAlarm("Atmosphere", src, src) for(var/obj/structure/machinery/computer/station_alert/a in GLOB.machines) a.cancelAlarm("Atmosphere", src, src) @@ -180,8 +172,6 @@ for(var/obj/structure/machinery/camera/C in src) cameras += C C.network.Add(CAMERA_NET_ATMOSPHERE_ALARMS) - for(var/mob/living/silicon/aiPlayer in GLOB.ai_mob_list) - aiPlayer.triggerAlarm("Atmosphere", src, cameras, src) for(var/obj/structure/machinery/computer/station_alert/a in GLOB.machines) a.triggerAlarm("Atmosphere", src, cameras, src) air_doors_close() @@ -231,8 +221,6 @@ for (var/obj/structure/machinery/camera/C in src) cameras.Add(C) C.network.Add(CAMERA_NET_FIRE_ALARMS) - for (var/mob/living/silicon/ai/aiPlayer in GLOB.ai_mob_list) - aiPlayer.triggerAlarm("Fire", src, cameras, src) for (var/obj/structure/machinery/computer/station_alert/a in GLOB.machines) a.triggerAlarm("Fire", src, cameras, src) @@ -249,8 +237,6 @@ INVOKE_ASYNC(D, TYPE_PROC_REF(/obj/structure/machinery/door, open)) for (var/obj/structure/machinery/camera/C in src) C.network.Remove(CAMERA_NET_FIRE_ALARMS) - for (var/mob/living/silicon/ai/aiPlayer in GLOB.ai_mob_list) - aiPlayer.cancelAlarm("Fire", src, src) for (var/obj/structure/machinery/computer/station_alert/a in GLOB.machines) a.cancelAlarm("Fire", src, src) diff --git a/code/game/gamemodes/colonialmarines/whiskey_outpost.dm b/code/game/gamemodes/colonialmarines/whiskey_outpost.dm index 6ebda633a19b..7b7ca73972bf 100644 --- a/code/game/gamemodes/colonialmarines/whiskey_outpost.dm +++ b/code/game/gamemodes/colonialmarines/whiskey_outpost.dm @@ -520,8 +520,7 @@ return if(user.is_mob_incapacitated()) return - if(ismaintdrone(usr) || \ - istype(usr, /mob/living/carbon/xenomorph)) + if(istype(usr, /mob/living/carbon/xenomorph)) to_chat(usr, SPAN_DANGER("You don't have the dexterity to do this!")) return if(working) diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 08437d35a8e3..0686759f0edd 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -284,7 +284,7 @@ return if (usr.stat) return - if ((in_range(src, usr) && istype(src.loc, /turf)) || (ishighersilicon(usr))) + if ((in_range(src, usr) && istype(src.loc, /turf)) || (isSilicon(usr))) usr.set_interaction(src) switch(href_list["op"]) @@ -756,13 +756,10 @@ if(!(wires & WIRE_MOBAVOID)) //usually just bumps, but if avoidance disabled knock over mobs var/mob/M = A if(ismob(M)) - if(isborg(M)) - src.visible_message(SPAN_DANGER("[src] bumps into [M]!")) - else - src.visible_message(SPAN_DANGER("[src] knocks over [M]!")) - M.stop_pulling() - M.apply_effect(8, STUN) - M.apply_effect(5, WEAKEN) + src.visible_message(SPAN_DANGER("[src] knocks over [M]!")) + M.stop_pulling() + M.apply_effect(8, STUN) + M.apply_effect(5, WEAKEN) ..() /obj/structure/machinery/bot/mulebot/alter_health() diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index acb6d26bf0d5..4ef9be82e8bf 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -38,8 +38,10 @@ /// If this camera should have innate EMP-proofing var/emp_proof = FALSE +GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera) /obj/structure/machinery/camera/Initialize(mapload, ...) . = ..() + GLOB.all_cameras += src WireColorToFlag = randomCameraWires() assembly = new(src) assembly.state = 4 @@ -59,6 +61,7 @@ update_icon() /obj/structure/machinery/camera/Destroy() + GLOB.all_cameras -= src . = ..() QDEL_NULL(assembly) @@ -81,7 +84,6 @@ icon_state = "[initial(icon_state)]emp" var/list/previous_network = network network = list() - GLOB.cameranet.removeCamera(src) stat |= EMPED set_light(0) triggerCameraAlarm() @@ -90,8 +92,6 @@ icon_state = initial(icon_state) stat &= ~EMPED cancelCameraAlarm() - if(can_use()) - GLOB.cameranet.addCamera(src) kick_viewers() @@ -104,7 +104,6 @@ /obj/structure/machinery/camera/proc/setViewRange(num = 7) src.view_range = num - GLOB.cameranet.updateVisibility(src, 0) /obj/structure/machinery/camera/attack_hand(mob/living/carbon/human/user as mob) @@ -166,16 +165,6 @@ if (S.current == src) to_chat(O, "[U] holds \a [itemname] up to one of the cameras ...") show_browser(O, info, itemname, itemname) - else if (istype(W, /obj/item/device/camera_bug)) - if (!src.can_use()) - to_chat(user, SPAN_NOTICE(" Camera non-functional")) - return - if (src.bugged) - to_chat(user, SPAN_NOTICE(" Camera bug removed.")) - src.bugged = 0 - else - to_chat(user, SPAN_NOTICE(" Camera bugged.")) - src.bugged = 1 else ..() return @@ -209,15 +198,10 @@ to_chat(O, "The screen bursts into static.") /obj/structure/machinery/camera/proc/triggerCameraAlarm() - alarm_on = 1 - for(var/mob/living/silicon/S in GLOB.mob_list) - S.triggerAlarm("Camera", get_area(src), list(src), src) - + alarm_on = TRUE /obj/structure/machinery/camera/proc/cancelCameraAlarm() - alarm_on = 0 - for(var/mob/living/silicon/S in GLOB.mob_list) - S.cancelAlarm("Camera", get_area(src), src) + alarm_on = FALSE /obj/structure/machinery/camera/proc/can_use() if(!status) diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index 5a0a41fdc9bf..6a869f443d12 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -23,7 +23,6 @@ // If not detecting with motion camera... /obj/structure/machinery/camera/proc/newTarget(mob/target) - if (isAI(target)) return 0 if (detectTime == 0) detectTime = world.time // start the clock if (!(target in motionTargets)) @@ -39,9 +38,6 @@ /obj/structure/machinery/camera/proc/cancelAlarm() if (!status || (stat & NOPOWER)) return 0 - if (detectTime == -1) - for (var/mob/living/silicon/aiPlayer in GLOB.ai_mob_list) - aiPlayer.cancelAlarm("Motion", get_area(src), src) detectTime = 0 return 1 @@ -49,7 +45,5 @@ if (!status || (stat & NOPOWER)) return 0 if (!detectTime) return 0 - for (var/mob/living/silicon/aiPlayer in GLOB.ai_mob_list) - aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src) detectTime = -1 return 1 diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm deleted file mode 100644 index b9ea018ba98f..000000000000 --- a/code/game/machinery/camera/tracking.dm +++ /dev/null @@ -1,247 +0,0 @@ -/mob/living/silicon/ai/var/max_locations = 10 -/mob/living/silicon/ai/var/stored_locations[0] - -/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf) - if(!T) - return 1 - if(is_admin_level(T.z)) - return 1 - if(T.z > 6) - return 1 - return 0 - -/mob/living/silicon/ai/proc/get_camera_list() - - if(src.stat == 2) - return - - var/list/L = list() - for (var/obj/structure/machinery/camera/C in GLOB.cameranet.cameras) - L.Add(C) - - camera_sort(L) - - var/list/T = list() - T["Cancel"] = "Cancel" - for (var/obj/structure/machinery/camera/C in L) - T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C - - track = new() - track.cameras = T - return T - - -/mob/living/silicon/ai/proc/ai_camera_list(camera in get_camera_list()) - set category = "AI Commands" - set name = "Show Camera List" - - if(src.stat == 2) - to_chat(src, "You can't list the cameras because you are dead!") - return - - if (!camera || camera == "Cancel") - return 0 - - var/obj/structure/machinery/camera/C = track.cameras[camera] - src.eyeobj.setLoc(C) - - return - -/mob/living/silicon/ai/proc/ai_store_location(newloc as text) - set category = "AI Commands" - set name = "Store Camera Location" - set desc = "Stores your current camera location by the given name" - - newloc = copytext(sanitize(loc), 1, MAX_MESSAGE_LEN) - if(!newloc) - to_chat(src, SPAN_DANGER("Must supply a location name")) - return - - if(stored_locations.len >= max_locations) - to_chat(src, SPAN_DANGER("Cannot store additional locations. Remove one first")) - return - - if(newloc in stored_locations) - to_chat(src, SPAN_DANGER("There is already a stored location by this name")) - return - - var/L = src.eyeobj.getLoc() - if (InvalidTurf(get_turf(L))) - to_chat(src, SPAN_DANGER("Unable to store this location")) - return - - stored_locations[newloc] = L - to_chat(src, "Location '[newloc]' stored") - -/mob/living/silicon/ai/proc/sorted_stored_locations() - return sortList(stored_locations) - -/mob/living/silicon/ai/proc/ai_goto_location(loc in sorted_stored_locations()) - set category = "AI Commands" - set name = "Goto Camera Location" - set desc = "Returns to the selected camera location" - - if (!(loc in stored_locations)) - to_chat(src, SPAN_DANGER("Location [loc] not found")) - return - - var/L = stored_locations[loc] - src.eyeobj.setLoc(L) - -/mob/living/silicon/ai/proc/ai_remove_location(loc in sorted_stored_locations()) - set category = "AI Commands" - set name = "Delete Camera Location" - set desc = "Deletes the selected camera location" - - if (!(loc in stored_locations)) - to_chat(src, SPAN_DANGER("Location [loc] not found")) - return - - stored_locations.Remove(loc) - to_chat(src, "Location [loc] removed") - -// Used to allow the AI is write in mob names/camera name from the CMD line. -/datum/trackable - var/list/names = list() - var/list/namecounts = list() - var/list/humans = list() - var/list/others = list() - var/list/cameras = list() - -/mob/living/silicon/ai/proc/trackable_mobs() - - if(usr.stat == 2) - return list() - - var/datum/trackable/TB = new() - for(var/i in GLOB.living_mob_list) - var/mob/living/M = i - // Easy checks first. - // Don't detect mobs on Centcom. Since the wizard den is on Centcomm, we only need this. - if(InvalidTurf(get_turf(M))) - continue - if(M == usr) - continue - if(M.invisibility)//cloaked - continue - - // Human check - var/human = 0 - if(istype(M, /mob/living/carbon/human)) - human = 1 - var/mob/living/carbon/human/H = M - //Cameras can't track people wearing an agent card or a ninja hood. - if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/card/id/syndicate)) - continue - - // Now, are they viewable by a camera? (This is last because it's the most intensive check) - if(!near_camera(M)) - continue - - var/name = M.name - if (name in TB.names) - TB.namecounts[name]++ - name = text("[] ([])", name, TB.namecounts[name]) - else - TB.names.Add(name) - TB.namecounts[name] = 1 - if(human) - TB.humans[name] = M - else - TB.others[name] = M - - var/list/targets = sortList(TB.humans) + sortList(TB.others) - src.track = TB - return targets - -/mob/living/silicon/ai/proc/ai_camera_track(target_name in trackable_mobs()) - set category = "AI Commands" - set name = "Track With Camera" - set desc = "Select who you would like to track." - - if(src.stat == 2) - to_chat(src, "You can't track with camera because you are dead!") - return - if(!target_name) - src.cameraFollow = null - - var/mob/target = (isnull(track.humans[target_name]) ? track.others[target_name] : track.humans[target_name]) - src.track = null - ai_actual_track(target) - -/mob/living/silicon/ai/proc/ai_cancel_tracking(forced = 0) - if(!cameraFollow) - return - - to_chat(src, "Follow camera mode [forced ? "terminated" : "ended"].") - cameraFollow = null - -/mob/living/silicon/ai/proc/ai_actual_track(mob/living/target as mob) - if(!istype(target)) return - var/mob/living/silicon/ai/U = usr - - U.cameraFollow = target - //U << text("Now tracking [] on camera.", target.name) - //if (U.interactee == null) - // U.set_interaction(U) - to_chat(U, "Now tracking [target.name] on camera.") - - spawn (0) - while (U.cameraFollow == target) - if (U.cameraFollow == null) - return - if (istype(target, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = target - if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/card/id/syndicate)) - U.ai_cancel_tracking(1) - return - - if (!near_camera(target)) - to_chat(U, "Target is not near any active cameras.") - sleep(100) - continue - - if(U.eyeobj) - U.eyeobj.setLoc(get_turf(target), 0) - else - view_core() - return - sleep(10) - -/proc/near_camera(mob/living/M) - if (!isturf(M.loc)) - return 0 - if(isrobot(M)) - var/mob/living/silicon/robot/R = M - if(!(R.camera && R.camera.can_use()) && !GLOB.cameranet.checkCameraVis(M)) - return 0 - else if(!GLOB.cameranet.checkCameraVis(M)) - return 0 - return 1 - -/obj/structure/machinery/camera/attack_remote(mob/living/silicon/ai/user as mob) - if (!istype(user)) - return - if (!src.can_use()) - return - user.eyeobj.setLoc(get_turf(src)) - - -/mob/living/silicon/ai/attack_remote(mob/user as mob) - ai_camera_list() - -/proc/camera_sort(list/L) // TODO: replace this bubblesort with a mergesort - spookydonut - var/obj/structure/machinery/camera/a - var/obj/structure/machinery/camera/b - - for (var/i = L.len, i > 0, i--) - for (var/j = 1 to i - 1) - a = L[j] - b = L[j + 1] - if (a.c_tag_order != b.c_tag_order) - if (a.c_tag_order > b.c_tag_order) - L.Swap(j, j + 1) - else - if (sorttext(a.c_tag, b.c_tag) < 0) - L.Swap(j, j + 1) - return L diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 55df45c70ccc..58b3d8ea5e64 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -77,9 +77,6 @@ to_chat(user, "It's a holotable! There are no bolts!") return - if(isborg(user)) - return - ..() /obj/structure/surface/table/holotable/wood diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm deleted file mode 100644 index bb6972a58ac3..000000000000 --- a/code/game/machinery/computer/ai_core.dm +++ /dev/null @@ -1,256 +0,0 @@ -/obj/structure/AIcore - density = TRUE - anchored = FALSE - name = "AI core" - icon = 'icons/obj/structures/machinery/AI.dmi' - icon_state = "hydra-off" - var/state = 0 - var/obj/item/circuitboard/aicore/circuit = null - var/obj/item/device/mmi/brain = null - - -/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob) - switch(state) - if(0) - if(HAS_TRAIT(P, TRAIT_TOOL_WRENCH)) - playsound(loc, 'sound/items/Ratchet.ogg', 25, 1) - if(do_after(user, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) - to_chat(user, SPAN_NOTICE(" You wrench the frame into place.")) - anchored = TRUE - state = 1 - if(iswelder(P)) - var/obj/item/tool/weldingtool/WT = P - if(!HAS_TRAIT(P, TRAIT_TOOL_BLOWTORCH)) - to_chat(user, SPAN_WARNING("You need a stronger blowtorch!")) - return - if(!WT.isOn()) - to_chat(user, "The welder must be on for this task.") - return - playsound(loc, 'sound/items/Welder.ogg', 25, 1) - if(do_after(user, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) - if(!src || !WT.remove_fuel(0, user)) return - to_chat(user, SPAN_NOTICE(" You deconstruct the frame.")) - new /obj/item/stack/sheet/plasteel( loc, 4) - qdel(src) - if(1) - if(HAS_TRAIT(P, TRAIT_TOOL_WRENCH)) - playsound(loc, 'sound/items/Ratchet.ogg', 25, 1) - if(do_after(user, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) - to_chat(user, SPAN_NOTICE(" You unfasten the frame.")) - anchored = FALSE - state = 0 - if(istype(P, /obj/item/circuitboard/aicore) && !circuit) - if(user.drop_held_item()) - playsound(loc, 'sound/items/Deconstruct.ogg', 25, 1) - to_chat(user, SPAN_NOTICE(" You place the circuit board inside the frame.")) - icon_state = "1" - circuit = P - P.forceMove(src) - if(HAS_TRAIT(P, TRAIT_TOOL_SCREWDRIVER) && circuit) - playsound(loc, 'sound/items/Screwdriver.ogg', 25, 1) - to_chat(user, SPAN_NOTICE(" You screw the circuit board into place.")) - state = 2 - icon_state = "2" - if(HAS_TRAIT(P, TRAIT_TOOL_CROWBAR) && circuit) - playsound(loc, 'sound/items/Crowbar.ogg', 25, 1) - to_chat(user, SPAN_NOTICE(" You remove the circuit board.")) - state = 1 - icon_state = "0" - circuit.forceMove(loc) - circuit = null - if(2) - if(HAS_TRAIT(P, TRAIT_TOOL_SCREWDRIVER) && circuit) - playsound(loc, 'sound/items/Screwdriver.ogg', 25, 1) - to_chat(user, SPAN_NOTICE(" You unfasten the circuit board.")) - state = 1 - icon_state = "1" - if(istype(P, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/C = P - if (C.get_amount() < 5) - to_chat(user, SPAN_WARNING("You need five coils of wire to add them to the frame.")) - return - to_chat(user, SPAN_NOTICE("You start to add cables to the frame.")) - playsound(loc, 'sound/items/Deconstruct.ogg', 25, 1) - if (do_after(user, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD) && state == 2) - if (C.use(5)) - state = 3 - icon_state = "3" - to_chat(user, SPAN_NOTICE("You add cables to the frame.")) - return - if(3) - if(HAS_TRAIT(P, TRAIT_TOOL_WIRECUTTERS)) - if (brain) - to_chat(user, "Get that brain out of there first") - else - playsound(loc, 'sound/items/Wirecutter.ogg', 25, 1) - to_chat(user, SPAN_NOTICE(" You remove the cables.")) - state = 2 - icon_state = "2" - var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc ) - A.amount = 5 - - if(istype(P, /obj/item/stack/sheet/glass/reinforced)) - var/obj/item/stack/sheet/glass/reinforced/RG = P - if (RG.get_amount() < 2) - to_chat(user, SPAN_WARNING("You need two sheets of glass to put in the glass panel.")) - return - to_chat(user, SPAN_NOTICE("You start to put in the glass panel.")) - playsound(loc, 'sound/items/Deconstruct.ogg', 25, 1) - if (do_after(user, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD) && state == 3) - if(RG.use(2)) - to_chat(user, SPAN_NOTICE("You put in the glass panel.")) - state = 4 - icon_state = "4" - - if(istype(P, /obj/item/device/mmi)) - var/obj/item/device/mmi/mmi - if(!mmi.brainmob) - to_chat(user, SPAN_DANGER("Sticking an empty [mmi] into the frame would sort of defeat the purpose.")) - return - if(mmi.brainmob.stat == 2) - to_chat(user, SPAN_DANGER("Sticking a dead [mmi] into the frame would sort of defeat the purpose.")) - return - - if(jobban_isbanned(mmi.brainmob, "AI")) - to_chat(user, SPAN_DANGER("This [mmi] does not seem to fit.")) - return - - if(user.drop_held_item()) - mmi.forceMove(src) - brain = mmi - to_chat(usr, "Added [mmi].") - icon_state = "3b" - - if(HAS_TRAIT(P, TRAIT_TOOL_CROWBAR) && brain) - playsound(loc, 'sound/items/Crowbar.ogg', 25, 1) - to_chat(user, SPAN_NOTICE(" You remove the brain.")) - brain.forceMove(loc) - brain = null - icon_state = "3" - - if(4) - if(HAS_TRAIT(P, TRAIT_TOOL_CROWBAR)) - playsound(loc, 'sound/items/Crowbar.ogg', 25, 1) - to_chat(user, SPAN_NOTICE(" You remove the glass panel.")) - state = 3 - if (brain) - icon_state = "3b" - else - icon_state = "3" - new /obj/item/stack/sheet/glass/reinforced( loc, 2 ) - return - - if(HAS_TRAIT(P, TRAIT_TOOL_SCREWDRIVER)) - playsound(loc, 'sound/items/Screwdriver.ogg', 25, 1) - to_chat(user, SPAN_NOTICE(" You connect the monitor.")) - var/mob/living/silicon/ai/A = new /mob/living/silicon/ai (loc, brain) - if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created - A.rename_self("ai", 1) - qdel(src) - -/obj/structure/AIcore/deactivated - name = "Inactive AI" - icon = 'icons/obj/structures/machinery/AI.dmi' - icon_state = "hydra-off" - anchored = TRUE - state = 20//So it doesn't interact based on the above. Not really necessary. - -/obj/structure/AIcore/deactivated/attackby(obj/item/device/aicard/A as obj, mob/user as mob) - if(istype(A, /obj/item/device/aicard))//Is it? - A.transfer_ai("INACTIVE","AICARD",src,user) - return - -/* -This is a good place for AI-related object verbs so I'm sticking it here. -If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location. -That prevents a few funky behaviors. -*/ -//What operation to perform based on target, what ineraction to perform based on object used, target itself, user. The object used is src and calls this proc. -/obj/item/proc/transfer_ai(choice as text, interaction as text, target, mob/U as mob) - if(!src:flush) - switch(choice) - if("AICORE")//AI mob. - var/mob/living/silicon/ai/T = target - switch(interaction) - if("AICARD") - var/obj/item/device/aicard/C = src - if(C.contents.len)//If there is an AI on card. - to_chat(U, SPAN_WARNING("Transfer failed: \black Existing AI found on this terminal. Remove existing AI to install a new one.")) - else - new /obj/structure/AIcore/deactivated(T.loc)//Spawns a deactivated terminal at AI location. - T.aiRestorePowerRoutine = 0//So the AI initially has power. - T.control_disabled = 1//Can't control things remotely if you're stuck in a card! - T.forceMove(C)//Throw AI into the card. - C.name = "inteliCard - [T.name]" - if (T.stat == 2) - C.icon_state = "aicard-404" - else - C.icon_state = "aicard-full" - T.cancel_camera() - to_chat(T, "You have been downloaded to a mobile storage device. Remote device connection severed.") - to_chat(U, SPAN_NOTICE(" Transfer successful: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory.")) - - if("INACTIVE")//Inactive AI object. - var/obj/structure/AIcore/deactivated/T = target - switch(interaction) - if("AICARD") - 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. - A.control_disabled = 0 - A.aiRadio.disabledAi = 0 - A.forceMove(T.loc)//To replace the terminal. - C.icon_state = "aicard" - C.name = "inteliCard" - C.overlays.Cut() - A.cancel_camera() - to_chat(A, "You have been uploaded to a stationary terminal. Remote device connection restored.") - to_chat(U, SPAN_NOTICE(" Transfer successful: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed.")) - qdel(T) - if("AIFIXER")//AI Fixer terminal. - var/obj/structure/machinery/computer/aifixer/T = target - switch(interaction) - if("AICARD") - var/obj/item/device/aicard/C = src - if(!T.contents.len) - if (!C.contents.len) - to_chat(U, "No AI to copy over!")//Well duh - else for(var/mob/living/silicon/ai/A in C) - C.icon_state = "aicard" - C.name = "inteliCard" - C.overlays.Cut() - A.forceMove(T) - T.occupant = A - A.control_disabled = 1 - if (A.stat == 2) - T.overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-404") - else - T.overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-full") - T.overlays -= image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-empty") - A.cancel_camera() - to_chat(A, "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here.") - to_chat(U, SPAN_NOTICE(" Transfer successful: \black [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")) - else - if(!C.contents.len && T.occupant && !T.active) - C.name = "inteliCard - [T.occupant.name]" - T.overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-empty") - if (T.occupant.stat == 2) - C.icon_state = "aicard-404" - T.overlays -= image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-404") - else - C.icon_state = "aicard-full" - T.overlays -= image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-full") - to_chat(T.occupant, "You have been downloaded to a mobile storage device. Still no remote access.") - to_chat(U, SPAN_NOTICE(" Transfer successful: \black [T.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory.")) - T.occupant.forceMove(C) - T.occupant.cancel_camera() - T.occupant = null - else if (C.contents.len) - to_chat(U, SPAN_WARNING("ERROR: \black Artificial intelligence detected on terminal.")) - else if (T.active) - to_chat(U, SPAN_WARNING("ERROR: \black Reconstruction in progress.")) - else if (!T.occupant) - to_chat(U, SPAN_WARNING("ERROR: \black Unable to locate artificial intelligence.")) - else - to_chat(U, SPAN_WARNING("ERROR: \black AI flush is in progress, cannot execute transfer protocol.")) - return diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm deleted file mode 100644 index 3a809620d7e6..000000000000 --- a/code/game/machinery/computer/aifixer.dm +++ /dev/null @@ -1,103 +0,0 @@ -/obj/structure/machinery/computer/aifixer - name = "AI System Integrity Restorer" - icon = 'icons/obj/structures/machinery/computer.dmi' - icon_state = "ai-fixer" - circuit = /obj/item/circuitboard/computer/aifixer - req_one_access = list(ACCESS_CIVILIAN_ENGINEERING) - var/mob/living/silicon/ai/occupant = null - var/active = 0 - processing = TRUE - -/obj/structure/machinery/computer/aifixer/New() - ..() - src.overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-empty") - - -/obj/structure/machinery/computer/aifixer/attackby(I as obj, user as mob) - if(istype(I, /obj/item/device/aicard)) - if(inoperable()) - to_chat(user, "This terminal isn't functioning right now, get it working!") - return - I:transfer_ai("AIFIXER","AICARD",src,user) - - ..() - return - -/obj/structure/machinery/computer/aifixer/attack_remote(mob/user as mob) - return attack_hand(user) - -/obj/structure/machinery/computer/aifixer/attack_hand(mob/user as mob) - if(..()) - return - - user.set_interaction(src) - var/dat - - if (src.occupant) - dat += "Stored AI: [src.occupant.name]
System integrity: [(src.occupant.health+100)/2]%
" - - if (src.occupant.stat == 2) - dat += "AI nonfunctional" - else - dat += "AI functional" - if (!src.active) - dat += {"

Begin Reconstruction"} - else - dat += "

Reconstruction in process, please wait.
" - dat += {" Close"} - - show_browser(user, dat, "AI System Integrity Restorer", "computer", "size=400x500") - return - -/obj/structure/machinery/computer/aifixer/process() - if(..()) - src.updateDialog() - return - -/obj/structure/machinery/computer/aifixer/Topic(href, href_list) - if(..()) - return - if (href_list["fix"]) - src.active = 1 - src.overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-on") - while (src.occupant.health < 100) - src.occupant.apply_damage(-1, OXY) - src.occupant.apply_damage(-1, BURN) - src.occupant.apply_damage(-1, TOX) - src.occupant.apply_damage(-1, BRUTE) - src.occupant.updatehealth() - if (src.occupant.health >= 0 && src.occupant.stat == DEAD) - src.occupant.set_stat(CONSCIOUS) - GLOB.dead_mob_list -= src.occupant - GLOB.alive_mob_list += src.occupant - occupant.reload_fullscreens() - src.overlays -= image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-404") - src.overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-full") - src.occupant.add_ai_verbs() - src.updateUsrDialog() - sleep(10) - src.active = 0 - src.overlays -= image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-on") - - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/structure/machinery/computer/aifixer/update_icon() - ..() - // Broken / Unpowered - if(inoperable()) - overlays.Cut() - - // Working / Powered - else - if (occupant) - switch (occupant.stat) - if (0) - overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-full") - if (2) - overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-404") - else - overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-empty") diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index ca8c8b2f1a34..55f0a0fc42d8 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -228,7 +228,7 @@ // Returns the list of cameras accessible from this computer /obj/structure/machinery/computer/cameras/proc/get_available_cameras() var/list/D = list() - for(var/obj/structure/machinery/camera/C in GLOB.cameranet.cameras) + for(var/obj/structure/machinery/camera/C in GLOB.all_cameras) if(!C.network) stack_trace("Camera in a cameranet has no camera network") continue diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 20aa6925d0b4..40b23667636f 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -182,14 +182,6 @@ src.rank = "AI" src.screen = 1 - else if (isrobot(usr)) - src.active1 = null - src.active2 = null - src.authenticated = usr.name - var/mob/living/silicon/robot/R = usr - src.rank = "[R.modtype] [R.braintype]" - src.screen = 1 - else if (istype(src.scan, /obj/item/card/id)) src.active1 = null src.active2 = null diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 19e3ac900af6..1a8dcf2efdf8 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -8,207 +8,3 @@ icon_state = "robot" req_access = list(ACCESS_MARINE_RESEARCH) circuit = /obj/item/circuitboard/computer/robotics - - var/id = 0 - var/temp = null - var/status = 0 - var/timeleft = 60 - var/stop = 0 - var/screen = 0 // 0 - Main Menu, 1 - Cyborg Status, 2 - Kill 'em All! -- In text - - -/obj/structure/machinery/computer/robotics/attack_remote(mob/user as mob) - return src.attack_hand(user) - -/obj/structure/machinery/computer/robotics/attack_hand(mob/user as mob) - if(..()) - return - if (src.z > 6) - to_chat(user, SPAN_DANGER("Unable to establish a connection: \black You're too far away from the station!")) - return - user.set_interaction(src) - var/dat - if (src.temp) - dat = "[src.temp]

Clear Screen" - else - if(screen == 0) - dat += "

Cyborg Control Console


" - dat += "1. Cyborg Status
" - dat += "2. Emergency Full Destruct
" - if(screen == 1) - for(var/mob/living/silicon/robot/R in GLOB.mob_list) - if(istype(R, /mob/living/silicon/robot/drone)) - continue //There's a specific console for drones. - if(isRemoteControlling(user)) - if (R.connected_ai != user) - continue - if(isrobot(user)) - if (R != user) - continue - if(R.scrambledcodes) - continue - - dat += "[R.name] |" - if(R.stat) - dat += " Not Responding |" - else if (HAS_TRAIT_FROM(R, TRAIT_IMMOBILIZED, HACKED_TRAIT)) - dat += " Locked Down |" - else - dat += " Operating Normally |" - if(R.cell) - dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |" - else - dat += " No Cell Installed |" - if(R.module) - dat += " Module Installed ([R.module.name]) |" - else - dat += " No Module Installed |" - if(R.connected_ai) - dat += " Slaved to [R.connected_ai.name] |" - else - dat += " Independent from AI |" - if (isRemoteControlling(user)) - if((user.mind.original == user)) - dat += "(Hack) " - var/canmove = HAS_TRAIT_FROM(src, TRAIT_IMMOBILIZED, HACKED_TRAIT) - dat += "([canmove ? "Lockdown" : "Release"]) " - dat += "(Destroy)" - dat += "
" - dat += "(Return to Main Menu)
" - if(screen == 2) - if(!src.status) - dat += {"
Emergency Robot Self-Destruct
\nStatus: Off
- \n
- \nCountdown: [src.timeleft]/60 \[Reset\]
- \n
- \nStart Sequence
- \n
- \nClose"} - else - dat = {"Emergency Robot Self-Destruct
\nStatus: Activated
- \n
- \nCountdown: [src.timeleft]/60 \[Reset\]
- \n
\nStop Sequence
- \n
- \nClose"} - dat += "(Return to Main Menu)
" - - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/structure/machinery/computer/robotics/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (isRemoteControlling(usr))) - usr.set_interaction(src) - - if (href_list["eject"]) - src.temp = {"Destroy Robots?
-
\[Swipe ID to initiate destruction sequence\]
- Cancel"} - - else if (href_list["eject2"]) - var/obj/item/card/id/I = usr.get_active_hand() - if (istype(I)) - if(src.check_access(I)) - if (!status) - message_admins("[key_name_admin(usr)] has initiated the global cyborg killswitch!") - log_game(SPAN_NOTICE("[key_name(usr)] has initiated the global cyborg killswitch!")) - src.status = 1 - src.start_sequence() - src.temp = null - - else - to_chat(usr, SPAN_DANGER("Access Denied.")) - - else if (href_list["stop"]) - src.temp = {" - Stop Robot Destruction Sequence?
-
Yes
- No"} - - else if (href_list["stop2"]) - src.stop = 1 - src.temp = null - src.status = 0 - - else if (href_list["reset"]) - src.timeleft = 60 - - else if (href_list["temp"]) - src.temp = null - else if (href_list["screen"]) - switch(href_list["screen"]) - if("0") - screen = 0 - if("1") - screen = 1 - if("2") - screen = 2 - else if (href_list["killbot"]) - if(src.allowed(usr)) - var/mob/living/silicon/robot/R = locate(href_list["killbot"]) - if(R) - var/choice = tgui_input_list(usr, "Are you certain you wish to detonate [R.name]?", "Hack machine", list("Confirm", "Abort")) - if(choice == "Confirm") - if(R && istype(R)) - message_admins("[key_name_admin(usr)] detonated [R.name]!") - log_game(SPAN_NOTICE("[key_name_admin(usr)] detonated [R.name]!")) - R.self_destruct() - else - to_chat(usr, SPAN_DANGER("Access Denied.")) - - else if (href_list["stopbot"]) - if(src.allowed(usr)) - var/mob/living/silicon/robot/R = locate(href_list["stopbot"]) - var/canmove = HAS_TRAIT_FROM(src, TRAIT_IMMOBILIZED, HACKED_TRAIT) - if(R && istype(R)) // Extra sancheck because of input var references - var/choice = tgui_input_list(usr, "Are you certain you wish to [canmove ? "lock down" : "release"] [R.name]?", "Hack machine", list("Confirm", "Abort")) - if(choice == "Confirm") - if(R && istype(R)) - message_admins("[key_name_admin(usr)] [canmove ? "locked down" : "released"] [R.name]!") - log_game("[key_name(usr)] [canmove ? "locked down" : "released"] [R.name]!") - if(canmove) - ADD_TRAIT(src, TRAIT_IMMOBILIZED, HACKED_TRAIT) - else - REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, HACKED_TRAIT) - if (R.lockcharge) - R.lockcharge = !R.lockcharge - to_chat(R, "Your lockdown has been lifted!") - else - R.lockcharge = !R.lockcharge - to_chat(R, "You have been locked down!") - - else - to_chat(usr, SPAN_DANGER("Access Denied.")) - - else if (href_list["magbot"]) - if(src.allowed(usr)) - var/mob/living/silicon/robot/R = locate(href_list["magbot"]) - - // whatever weirdness this is supposed to be, but that is how the href gets added, so here it is again - if(istype(R) && isRemoteControlling(usr) && (usr.mind.original == usr)) - - var/choice = tgui_input_list(usr, "Are you certain you wish to hack [R.name]?", "Hack machine", list("Confirm", "Abort")) - if(choice == "Confirm") - if(R && istype(R)) - log_game("[key_name(usr)] emagged [R.name] using robotic console!") - add_verb(R, /mob/living/silicon/robot/proc/ResetSecurityCodes) - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/structure/machinery/computer/robotics/proc/start_sequence() - while(src.timeleft) - if(src.stop) - src.stop = 0 - return - src.timeleft-- - sleep(10) - for(var/mob/living/silicon/robot/R in GLOB.mob_list) - if(!R.scrambledcodes && !istype(R, /mob/living/silicon/robot/drone)) - R.self_destruct() - - return diff --git a/code/game/machinery/computer/robots_props.dm b/code/game/machinery/computer/robots_props.dm new file mode 100644 index 000000000000..2026e1e54af1 --- /dev/null +++ b/code/game/machinery/computer/robots_props.dm @@ -0,0 +1,18 @@ +/obj/structure/machinery/computer/aifixer + name = "AI System Integrity Restorer" + icon = 'icons/obj/structures/machinery/computer.dmi' + icon_state = "ai-fixer" + circuit = /obj/item/circuitboard/computer/aifixer + req_one_access = list(ACCESS_CIVILIAN_ENGINEERING) + processing = TRUE + +/obj/structure/machinery/computer/aifixer/New() + ..() + src.overlays += image('icons/obj/structures/machinery/computer.dmi', "ai-fixer-empty") + +/obj/structure/machinery/computer/drone_control + name = "Maintenance Drone Control" + desc = "Used to monitor the station's drone population and the assembler that services them." + icon = 'icons/obj/structures/machinery/computer.dmi' + icon_state = "power" + circuit = /obj/item/circuitboard/computer/drone_control diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 8090f802b1d0..f3d61251e232 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -217,7 +217,7 @@ What a mess.*/ active1 = null if (!( GLOB.data_core.security.Find(active2) )) active2 = null - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (ishighersilicon(usr))) + if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (isSilicon(usr))) usr.set_interaction(src) switch(href_list["choice"]) // SORTING! @@ -361,16 +361,13 @@ What a mess.*/ return var/a2 = active2 var/t1 = copytext(trim(strip_html(input("Your name and time will be added to this new comment.", "Add a comment", null, null) as message)),1,MAX_MESSAGE_LEN) - if((!t1 || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!ishighersilicon(usr))) || active2 != a2)) + if((!t1 || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isSilicon(usr))) || active2 != a2)) return var/created_at = text("[]  []  []", time2text(world.realtime, "MMM DD"), time2text(world.time, "[worldtime2text()]:ss"), GLOB.game_year) var/new_comment = list("entry" = t1, "created_by" = list("name" = "", "rank" = ""), "deleted_by" = null, "deleted_at" = null, "created_at" = created_at) if(istype(usr,/mob/living/carbon/human)) var/mob/living/carbon/human/U = usr new_comment["created_by"] = list("name" = U.get_authentification_name(), "rank" = U.get_assignment()) - else if(istype(usr,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/U = usr - new_comment["created_by"] = list("name" = U.name, "rank" = "[U.modtype] [U.braintype]") if(!islist(active2.fields["comments"])) active2.fields["comments"] = list("1" = new_comment) else @@ -387,9 +384,6 @@ What a mess.*/ if(istype(usr,/mob/living/carbon/human)) var/mob/living/carbon/human/U = usr deleter = "[U.get_authentification_name()] ([U.get_assignment()])" - else if(istype(usr,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/U = usr - deleter = "[U.name] ([U.modtype] [U.braintype])" updated_comments[href_list["del_c"]]["deleted_by"] = deleter updated_comments[href_list["del_c"]]["deleted_at"] = text("[]  []  []", time2text(world.realtime, "MMM DD"), time2text(world.time, "[worldtime2text()]:ss"), GLOB.game_year) active2.fields["comments"] = updated_comments @@ -511,17 +505,12 @@ What a mess.*/ return dat /obj/structure/machinery/computer/secure_data/proc/is_not_allowed(mob/user) - return user.stat || user.is_mob_restrained() || (!in_range(src, user) && (!ishighersilicon(user))) + return user.stat || user.is_mob_restrained() || (!in_range(src, user) && (!isSilicon(user))) /obj/structure/machinery/computer/secure_data/proc/get_photo(mob/user) if(istype(user.get_active_hand(), /obj/item/photo)) var/obj/item/photo/photo = user.get_active_hand() return photo.img - if(ishighersilicon(user)) - var/mob/living/silicon/tempAI = usr - var/datum/picture/selection = tempAI.GetPicture() - if (selection) - return selection.fields["img"] /obj/structure/machinery/computer/secure_data/emp_act(severity) . = ..() diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 6e35d147ff38..2cbc4e82d3e9 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -188,12 +188,6 @@ What a mess.*/ src.authenticated = usr.name src.rank = "AI" src.screen = 1 - else if (isborg(usr)) - src.active1 = null - src.authenticated = usr.name - var/mob/living/silicon/robot/R = usr - src.rank = R.braintype - src.screen = 1 else if (istype(scan, /obj/item/card/id)) active1 = null if(check_access(scan)) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index b03ba1e8e195..fae926ea297d 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -754,9 +754,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( for(var/turf/turf in locs) for(var/mob/living/M in turf) - if(isborg(M)) - M.apply_damage(DOOR_CRUSH_DAMAGE, BRUTE) - else if(HAS_TRAIT(M, TRAIT_SUPER_STRONG)) + if(HAS_TRAIT(M, TRAIT_SUPER_STRONG)) M.apply_damage(DOOR_CRUSH_DAMAGE, BRUTE) else M.apply_damage(DOOR_CRUSH_DAMAGE, BRUTE) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 9ce3cb89bf79..fe8243704a72 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -45,157 +45,12 @@ * Holopad */ -/* -Revised. Original based on space ninja hologram code. Which is also mine. /N -How it works: -AI clicks on holopad in camera view. View centers on holopad. -AI clicks again on the holopad to display a hologram. Hologram stays as long as AI is looking at the pad and it (the hologram) is in range of the pad. -AI can use the directional keys to move the hologram around, provided the above conditions are met and the AI in question is the holopad's master. -Only one AI may project from a holopad at any given time. -AI may cancel the hologram at any time by clicking on the holopad once more. - -Possible to do for anyone motivated enough: - Give an AI variable for different hologram icons. - Itegrate EMP effect to disable the unit. -*/ - /obj/structure/machinery/hologram/holopad name = "\improper AI holopad" desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely." icon_state = "holopad0" layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them. - - var/mob/living/silicon/ai/master //Which AI, if any, is controlling the object? Only one AI may control a hologram at any time. - var/last_request = 0 //to prevent request spam. ~Carn - var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating. - -/obj/structure/machinery/hologram/holopad/Initialize() - . = ..() - flags_atom |= USES_HEARING - -/obj/structure/machinery/hologram/holopad/Destroy() - QDEL_NULL(master) - . = ..() - -/obj/structure/machinery/hologram/holopad/attack_hand(mob/living/carbon/human/user) //Carn: Hologram requests. - if(!istype(user)) - return - if(alert(user,"Would you like to request an AI's presence?",,"Yes","No") == "Yes") - if(last_request + 200 < world.time) //don't spam the AI with requests you jerk! - last_request = world.time - to_chat(user, SPAN_NOTICE("You request an AI's presence.")) - var/area/area = get_area(src) - for(var/mob/living/silicon/ai/AI in GLOB.alive_mob_list) - if(!AI.client) continue - to_chat(AI, SPAN_INFO("Your presence is requested at \the [area].")) - else - to_chat(user, SPAN_NOTICE("A request for AI presence was already sent recently.")) - -/obj/structure/machinery/hologram/holopad/attack_remote(mob/living/silicon/ai/user) - if (!istype(user)) - return - /*There are pretty much only three ways to interact here. - I don't need to check for client since they're clicking on an object. - This may change in the future but for now will suffice.*/ - if(user.eyeobj.loc != src.loc)//Set client eye on the object if it's not already. - user.eyeobj.setLoc(get_turf(src)) - else if(!hologram)//If there is no hologram, possibly make one. - activate_holo(user) - else if(master==user)//If there is a hologram, remove it. But only if the user is the master. Otherwise do nothing. - clear_holo() - return - -/obj/structure/machinery/hologram/holopad/proc/activate_holo(mob/living/silicon/ai/user) - if(!(stat & NOPOWER) && user.eyeobj.loc == src.loc)//If the projector has power and client eye is on it. - if(!hologram)//If there is not already a hologram. - create_holo(user)//Create one. - src.visible_message("A holographic image of [user] flicks to life right before your eyes!") - else - to_chat(user, SPAN_DANGER("ERROR: \black Image feed in progress.")) - else - to_chat(user, SPAN_DANGER("ERROR: \black Unable to project hologram.")) - return - -/*This is the proc for special two-way communication between AI and holopad/people talking near holopad. -For the other part of the code, check silicon say.dm. Particularly robot talk.*/ -/obj/structure/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb) - if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something. - if(!master.say_understands(M))//The AI will be able to understand most mobs talking through the holopad. - text = stars(text) - var/name_used = M.GetVoice() - //This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only. - var/rendered = "Holopad received, [name_used] [verb], \"[text]\"" - master.show_message(rendered, SHOW_MESSAGE_AUDIBLE) - return - -/obj/structure/machinery/hologram/holopad/proc/create_holo(mob/living/silicon/ai/A, turf/T = loc) - hologram = new(T)//Spawn a blank effect at the location. - hologram.icon = A.holo_icon - hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it. - hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them. - hologram.anchored = TRUE//So space wind cannot drag it. - hologram.name = "[A.name] (Hologram)"//If someone decides to right click. - hologram.set_light(2) //hologram lighting - set_light(2) //pad lighting - icon_state = "holopad1" - A.holo = src - master = A//AI is the master. - use_power = USE_POWER_ACTIVE//Active power usage. - return 1 - -/obj/structure/machinery/hologram/holopad/clear_holo() -// hologram.set_light(0)//Clear lighting. //handled by the lighting controller when its ower is deleted - if(hologram) - qdel(hologram)//Get rid of hologram. - hologram = null - if(master.holo == src) - master.holo = null - master = null//Null the master, since no-one is using it now. - set_light(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted) - icon_state = "holopad0" - use_power = USE_POWER_IDLE//Passive power usage. - return 1 - -/obj/structure/machinery/hologram/holopad/process() - if(hologram)//If there is a hologram. - if(master && !master.stat && master.client && master.eyeobj)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector. - if(!(stat & NOPOWER))//If the machine has power. - if(get_dist(master.eyeobj, src) <= holo_range) - return 1 - - clear_holo()//If not, we want to get rid of the hologram. - return 1 - -/obj/structure/machinery/hologram/holopad/proc/move_hologram() - if(hologram) - step_to(hologram, master.eyeobj) // So it turns. - hologram.forceMove(get_turf(master.eyeobj)) - - return 1 - - -/* -Holographic project of everything else. - -/mob/verb/hologram_test() - set name = "Hologram Debug New" - set category = "CURRENT DEBUG" - - var/obj/effect/overlay/hologram = new(loc)//Spawn a blank effect at the location. - var/icon/flat_icon = icon(getFlatIcon(src,0))//Need to make sure it's a new icon so the old one is not reused. - flat_icon.ColorTone(rgb(125,180,225))//Let's make it bluish. - flat_icon.ChangeOpacity(0.5)//Make it half transparent. - var/input = input("Select what icon state to use in effect.",,"") - if(input) - var/icon/alpha_mask = new('icons/effects/effects.dmi', "[input]") - flat_icon.AddAlphaMask(alpha_mask)//Finally, let's mix in a distortion effect. - hologram.icon = flat_icon - - to_world("Your icon should appear now.") - return -*/ - /* * Other Stuff: Is this even used? */ diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index c5eaa14e05b5..e08970ce54ca 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -247,13 +247,7 @@ Class Procs: return (user.IsAdvancedToolUser(user) || isRemoteControlling(user)) /obj/structure/machinery/attack_remote(mob/user as mob) - if(isrobot(user)) - // For some reason attack_robot doesn't work - // This is to stop robots from using cameras to remotely control machines. - if(user.client && user.client.eye == user) - return src.attack_hand(user) - else - return src.attack_hand(user) + return src.attack_hand(user) /obj/structure/machinery/attack_hand(mob/living/user as mob) if(inoperable(MAINT)) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 9bd7e5f5e965..d9aa42dbd1f1 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -732,15 +732,6 @@ GLOBAL_LIST_INIT_TYPED(allCasters, /obj/structure/machinery/newscaster, list()) if(istype(PH)) if(user.drop_inv_item_to_loc(photo, src)) photo = PH - else if(istype(user,/mob/living/silicon)) - var/mob/living/silicon/tempAI = user - var/datum/picture/selection = tempAI.GetPicture() - if (!selection) - return - - var/obj/item/photo/P = new/obj/item/photo() - P.construct(selection) - photo = P //######################################################################################################################## diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 56b782cd77a4..e87bb56da489 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -143,21 +143,6 @@ /obj/structure/machinery/recharge_station/proc/process_occupant() if(src.occupant) var/doing_stuff = FALSE - if (isrobot(occupant)) - var/mob/living/silicon/robot/R = occupant - if(R.module) - R.module.respawn_consumable(R) - if(!R.cell) - return - if(!R.cell.fully_charged()) - var/diff = min(R.cell.maxcharge - R.cell.charge, 500) // 500 charge / tick is about 2% every 3 seconds - diff = min(diff, current_internal_charge) // No over-discharging - R.cell.give(diff) - current_internal_charge = max(current_internal_charge - diff, 0) - to_chat(occupant, "Recharging...") - doing_stuff = TRUE - else - update_use_power(USE_POWER_IDLE) if (issynth(occupant)) var/mob/living/carbon/human/humanoid_occupant = occupant //for special synth surgeries if(occupant.getBruteLoss() > 0 || occupant.getFireLoss() > 0 || occupant.getBrainLoss() > 0) @@ -226,14 +211,10 @@ return move_mob_inside(target) /obj/structure/machinery/recharge_station/verb/move_mob_inside(mob/living/M) - if (!isrobot(M) && !issynth(M)) + if (!issynth(M)) return FALSE if (occupant) return FALSE - if (isrobot(M)) - var/mob/living/silicon/robot/R = M - if(QDELETED(R.cell)) - return FALSE M.stop_pulling() if(M && M.client) M.client.perspective = EYE_PERSPECTIVE @@ -254,18 +235,12 @@ if (usr.stat == 2) //Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO return - if (!isrobot(usr) && !issynth(usr)) + if (!issynth(usr)) to_chat(usr, SPAN_NOTICE(" Only non-organics may enter the recharge and repair station!")) return if (src.occupant) to_chat(usr, SPAN_NOTICE(" The cell is already occupied!")) return - if (isrobot(usr)) - var/mob/living/silicon/robot/R = usr - if(QDELETED(R.cell)) - to_chat(usr, SPAN_NOTICE("Without a powercell, you can't be recharged.")) - //Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO - return move_mob_inside(usr) return @@ -275,7 +250,7 @@ var/obj/item/grab/G = W if(!ismob(G.grabbed_thing)) return - if(!issynth(G.grabbed_thing) && !isrobot(G.grabbed_thing)) + if(!issynth(G.grabbed_thing)) return if(occupant) diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index f8250fad271c..246e1c3d1a19 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -150,8 +150,6 @@ var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!") if(M) - if(isAI(M)) - volume = RADIO_VOLUME_CRITICAL if(ishuman(M)) var/mob/living/carbon/human/H = M if(skillcheck(H, SKILL_LEADERSHIP, SKILL_LEAD_EXPERT)) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 942d70f80705..1e022d5a1049 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -102,7 +102,7 @@ /obj/structure/machinery/telecomms/attack_hand(mob/user as mob) // You need a multitool to use this, or be silicon - if(!ishighersilicon(user)) + if(!isSilicon(user)) if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) to_chat(user, SPAN_WARNING("You stare at \the [src] cluelessly...")) return @@ -182,24 +182,6 @@ return 1 return 0 -// Returns a multitool from a user depending on their mobtype. - -/obj/structure/machinery/telecomms/proc/get_multitool(mob/user as mob) - - var/obj/item/device/multitool/P = null - // Let's double check - var/obj/item/held_item = user.get_active_hand() - if(!ishighersilicon(user) && held_item && HAS_TRAIT(held_item, TRAIT_TOOL_MULTITOOL)) - P = user.get_active_hand() - else if(isAI(user)) - var/mob/living/silicon/ai/U = user - P = U.aiMulti - else if(isborg(user) && in_range(user, src)) - var/obj/item/borg_held_item = user.get_active_hand() - if(held_item && HAS_TRAIT(borg_held_item, TRAIT_TOOL_MULTITOOL)) - P = user.get_active_hand() - return P - // Additional Options for certain GLOB.machines. Use this when you want to add an option to a specific machine. // Example of how to use below. @@ -279,7 +261,7 @@ . = ..() if(.) return - if(!ishighersilicon(usr)) + if(!isSilicon(usr)) var/obj/item/held_item = usr.get_held_item() if (!held_item || !HAS_TRAIT(held_item, TRAIT_TOOL_MULTITOOL)) return diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm index 7621d55e3645..89a7d591a691 100644 --- a/code/game/machinery/telecomms/presets.dm +++ b/code/game/machinery/telecomms/presets.dm @@ -147,7 +147,7 @@ else return ..() /obj/structure/machinery/telecomms/relay/preset/tower/attack_hand(mob/user) - if(ishighersilicon(user)) + if(isSilicon(user)) return ..() if(on) to_chat(user, SPAN_WARNING("\The [src.name] blinks and beeps incomprehensibly as it operates, better not touch this...")) diff --git a/code/game/objects/items/circuitboards/robot_modules.dm b/code/game/objects/items/circuitboards/robot_modules.dm index 04fcff10fa2b..93bd1ad2b902 100644 --- a/code/game/objects/items/circuitboards/robot_modules.dm +++ b/code/game/objects/items/circuitboards/robot_modules.dm @@ -2,365 +2,16 @@ name = "robot module" icon_state = "std_mod" flags_atom = FPRINT|CONDUCT - var/channels = list() - var/list/modules = list() - var/obj/item/emag = null - var/obj/item/robot/upgrade/jetpack = null - var/list/stacktypes - -/obj/item/circuitboard/robot_module/emp_act(severity) - . = ..() - if(modules) - for(var/obj/O in modules) - O.emp_act(severity) - if(emag) - emag.emp_act(severity) - - -/obj/item/circuitboard/robot_module/Initialize() - . = ..() -// src.modules += new /obj/item/device/flashlight(src) // Replaced by verb and integrated light which uses power. - src.modules += new /obj/item/device/flash(src) - src.emag = new /obj/item/toy/sword(src) - src.emag.name = "Placeholder Emag Item" -// src.jetpack = new /obj/item/toy/sword(src) -// src.jetpack.name = "Placeholder Upgrade Item" - -/obj/item/circuitboard/robot_module/Destroy() - . = ..() - QDEL_NULL(emag) - QDEL_NULL(jetpack) - QDEL_NULL_LIST(modules) - -/obj/item/circuitboard/robot_module/proc/respawn_consumable(mob/living/silicon/robot/R) - - if(!stacktypes || !stacktypes.len) return - - for(var/T in stacktypes) - var/O = locate(T) in src.modules - var/obj/item/stack/S = O - - if(!S) - src.modules -= null - S = new T(src) - src.modules += S - S.amount = 1 - - if(S && S.amount < stacktypes[T]) - S.amount++ - -/obj/item/circuitboard/robot_module/proc/rebuild()//Rebuilds the list so it's possible to add/remove items from the module - var/list/temp_list = modules - modules = list() - for(var/obj/O in temp_list) - if(O) - modules += O - -/obj/item/circuitboard/robot_module/proc/add_languages(mob/living/silicon/robot/R) - //full set of languages - R.add_language(LANGUAGE_RUSSIAN, 1) - R.add_language(LANGUAGE_JAPANESE, 1) - - -/obj/item/circuitboard/robot_module/standard - name = "standard robot module" - -/obj/item/circuitboard/robot_module/standard/New() - src.modules += new /obj/item/device/flashlight(src) - src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/tool/extinguisher(src) - src.modules += new /obj/item/tool/wrench(src) - src.modules += new /obj/item/tool/crowbar(src) - src.modules += new /obj/item/device/healthanalyzer(src) - src.modules += new /obj/item/robot/stun(src) - src.emag = new /obj/item/weapon/energy/sword(src) - return /obj/item/circuitboard/robot_module/surgeon name = "surgeon robot module" - stacktypes = list( - /obj/item/stack/medical/advanced/bruise_pack = 5, - /obj/item/stack/nanopaste = 5, - ) - -/obj/item/circuitboard/robot_module/surgeon/Initialize() - . = ..() - src.modules += new /obj/item/device/flashlight(src) - src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/device/healthanalyzer(src) - src.modules += new /obj/item/reagent_container/borghypo(src) - src.modules += new /obj/item/tool/surgery/scalpel(src) - src.modules += new /obj/item/tool/surgery/hemostat(src) - src.modules += new /obj/item/tool/surgery/retractor(src) - src.modules += new /obj/item/tool/surgery/cautery(src) - src.modules += new /obj/item/tool/surgery/bonegel(src) - src.modules += new /obj/item/tool/surgery/FixOVein(src) - src.modules += new /obj/item/tool/surgery/bonesetter(src) - src.modules += new /obj/item/tool/surgery/circular_saw(src) - src.modules += new /obj/item/tool/surgery/surgicaldrill(src) - src.modules += new /obj/item/tool/extinguisher/mini(src) - src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src) - src.modules += new /obj/item/stack/nanopaste(src) - src.modules += new /obj/item/tool/weldingtool/largetank(src) - src.modules += new /obj/item/tool/crowbar(src) - src.modules += new /obj/item/robot/stun(src) - - src.emag = new /obj/item/reagent_container/spray(src) - - src.emag.reagents.add_reagent("pacid", 250) - src.emag.name = "Polyacid spray" - -/obj/item/circuitboard/robot_module/surgeon/respawn_consumable(mob/living/silicon/robot/R) - if(src.emag) - var/obj/item/reagent_container/spray/PS = src.emag - PS.reagents.add_reagent("pacid", 2) - ..() - /obj/item/circuitboard/robot_module/medic name = "medic robot module" - stacktypes = list( - /obj/item/stack/medical/ointment = 15, - /obj/item/stack/medical/advanced/bruise_pack = 15, - /obj/item/stack/medical/splint = 15, - ) - -/obj/item/circuitboard/robot_module/medic/Initialize() - . = ..() - src.modules += new /obj/item/device/flashlight(src) - src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/robot/sight/hud/med(src) - src.modules += new /obj/item/device/healthanalyzer(src) - src.modules += new /obj/item/device/reagent_scanner/adv(src) - src.modules += new /obj/item/roller_holder(src) - src.modules += new /obj/item/stack/medical/ointment(src) - src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src) - src.modules += new /obj/item/stack/medical/splint(src) - src.modules += new /obj/item/reagent_container/borghypo(src) - src.modules += new /obj/item/reagent_container/glass/beaker/large(src) - src.modules += new /obj/item/reagent_container/robodropper(src) - src.modules += new /obj/item/reagent_container/syringe(src) - src.modules += new /obj/item/tool/extinguisher/mini(src) - src.modules += new /obj/item/reagent_container/spray/cleaner(src) - src.modules += new /obj/item/tool/weldingtool/largetank(src) - src.modules += new /obj/item/tool/crowbar(src) - src.modules += new /obj/item/robot/stun(src) - - src.emag = new /obj/item/reagent_container/spray(src) - - src.emag.reagents.add_reagent("pacid", 250) - src.emag.name = "Polyacid spray" - -/obj/item/circuitboard/robot_module/medic/respawn_consumable(mob/living/silicon/robot/R) - var/obj/item/reagent_container/syringe/S = locate() in src.modules - if(S.mode == 2) - S.reagents.clear_reagents() - S.mode = initial(S.mode) - S.desc = initial(S.desc) - S.update_icon() - - var/obj/item/reagent_container/spray/cleaner/C = locate() in src.modules - C.reagents.add_reagent("cleaner", C.volume) - - if(src.emag) - var/obj/item/reagent_container/spray/PS = src.emag - PS.reagents.add_reagent("pacid", 2) - - ..() - /obj/item/circuitboard/robot_module/engineering name = "engineering robot module" - - stacktypes = list( - /obj/item/stack/sheet/metal = 50, - /obj/item/stack/sheet/glass = 50, - /obj/item/stack/sheet/glass/reinforced = 50, - /obj/item/stack/cable_coil = 50, - /obj/item/stack/rods = 50, - /obj/item/stack/tile/plasteel = 20, - ) - -/obj/item/circuitboard/robot_module/engineering/Initialize() - . = ..() - src.modules += new /obj/item/device/flashlight(src) - src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/robot/sight/meson(src) - src.modules += new /obj/item/tool/extinguisher(src) - src.modules += new /obj/item/device/rcd/borg(src) - src.modules += new /obj/item/tool/weldingtool/largetank(src) - src.modules += new /obj/item/tool/screwdriver(src) - src.modules += new /obj/item/tool/wrench(src) - src.modules += new /obj/item/tool/crowbar(src) - src.modules += new /obj/item/tool/wirecutters(src) - src.modules += new /obj/item/device/multitool(src) - src.modules += new /obj/item/device/t_scanner(src) - src.modules += new /obj/item/device/analyzer(src) - src.modules += new /obj/item/device/gripper(src) - src.modules += new /obj/item/device/matter_decompiler(src) - src.modules += new /obj/item/device/lightreplacer(src) - src.modules += new /obj/item/robot/stun(src) - - for(var/T in stacktypes) - var/obj/item/stack/sheet/W = new T(src) - W.amount = stacktypes[T] - src.modules += W - -/obj/item/circuitboard/robot_module/engineering/respawn_consumable(mob/living/silicon/robot/R) - var/obj/item/device/lightreplacer/L = locate() in src.modules - L.uses = L.max_uses - - ..() - /obj/item/circuitboard/robot_module/security name = "security robot module" - -/obj/item/circuitboard/robot_module/security/Initialize() - . = ..() - src.modules += new /obj/item/device/flashlight(src) - src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/robot/sight/hud/sec(src) - src.modules += new /obj/item/handcuffs/cyborg(src) - src.modules += new /obj/item/robot/stun(src) - src.modules += new /obj/item/tool/crowbar(src) -// src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src) -// src.emag = new /obj/item/weapon/gun/energy/laser/cyborg(src) - -/obj/item/circuitboard/robot_module/security/respawn_consumable(mob/living/silicon/robot/R) - var/obj/item/device/flash/F = locate() in src.modules - if(F.broken) - F.broken = 0 - F.flashes_stored = F.max_flashes_stored - F.icon_state = "flash" - else if(F.flashes_stored > F.max_flashes_stored) - F.flashes_stored++ - // var/obj/item/weapon/gun/energy/taser/cyborg/T = locate() in src.modules - // if(T.power_supply.charge < T.power_supply.maxcharge) - // T.power_supply.give(T.charge_cost) - // T.update_icon() - // else - // T.charge_tick = 0 - /obj/item/circuitboard/robot_module/janitor name = "janitorial robot module" - -/obj/item/circuitboard/robot_module/janitor/Initialize() - . = ..() - src.modules += new /obj/item/device/flashlight(src) - src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/tool/soap/nanotrasen(src) - src.modules += new /obj/item/storage/bag/trash(src) - src.modules += new /obj/item/tool/mop(src) - src.modules += new /obj/item/device/lightreplacer(src) - src.modules += new /obj/item/tool/crowbar(src) - src.modules += new /obj/item/robot/stun(src) - src.emag = new /obj/item/reagent_container/spray(src) - - src.emag.reagents.add_reagent("cleaner", 250) - src.emag.name = "space cleaner" - -/obj/item/circuitboard/robot_module/janitor/respawn_consumable(mob/living/silicon/robot/R) - var/obj/item/device/lightreplacer/LR = locate() in src.modules - LR.Charge(R) - if(src.emag) - var/obj/item/reagent_container/spray/S = src.emag - S.reagents.add_reagent("cleaner", 2) - /obj/item/circuitboard/robot_module/butler name = "service robot module" - -/obj/item/circuitboard/robot_module/butler/Initialize() - . = ..() - src.modules += new /obj/item/device/flashlight(src) - src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/reagent_container/food/drinks/cans/beer(src) - src.modules += new /obj/item/reagent_container/food/condiment/enzyme(src) - src.modules += new /obj/item/tool/crowbar(src) - src.modules += new /obj/item/robot/stun(src) - - var/obj/item/device/rsf/M = new /obj/item/device/rsf(src) - M.stored_matter = 30 - src.modules += M - - src.modules += new /obj/item/reagent_container/robodropper(src) - - var/obj/item/tool/lighter/zippo/L = new /obj/item/tool/lighter/zippo(src) - L.heat_source = 1000 - src.modules += L - - src.modules += new /obj/item/reagent_container/food/drinks/shaker(src) - -/obj/item/circuitboard/robot_module/butler/add_languages(mob/living/silicon/robot/R) - //full set of languages - R.add_language(LANGUAGE_JAPANESE, 1) - -/obj/item/circuitboard/robot_module/butler/respawn_consumable(mob/living/silicon/robot/R) - var/obj/item/reagent_container/food/condiment/enzyme/E = locate() in src.modules - E.reagents.add_reagent("enzyme", 2) - if(src.emag) - var/obj/item/reagent_container/food/drinks/cans/beer/B = src.emag - B.reagents.add_reagent("beer2", 2) - -/obj/item/circuitboard/robot_module/syndicate - name = "syndicate robot module" - -/obj/item/circuitboard/robot_module/syndicate/Initialize() - . = ..() - src.modules += new /obj/item/device/flashlight(src) - src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/weapon/energy/sword(src) - -/obj/item/circuitboard/robot_module/drone - name = "drone module" - stacktypes = list( - /obj/item/stack/sheet/wood = 1, - /obj/item/stack/sheet/mineral/plastic = 1, - /obj/item/stack/sheet/glass/reinforced = 5, - /obj/item/stack/tile/wood = 5, - /obj/item/stack/rods = 15, - /obj/item/stack/tile/plasteel = 15, - /obj/item/stack/sheet/metal = 20, - /obj/item/stack/sheet/glass = 20, - /obj/item/stack/cable_coil = 30, - ) - -/obj/item/circuitboard/robot_module/drone/Initialize() - . = ..() - src.modules += new /obj/item/tool/weldingtool(src) - src.modules += new /obj/item/tool/screwdriver(src) - src.modules += new /obj/item/tool/wrench(src) - src.modules += new /obj/item/tool/crowbar(src) - src.modules += new /obj/item/tool/wirecutters(src) - src.modules += new /obj/item/device/multitool(src) - src.modules += new /obj/item/device/lightreplacer(src) - src.modules += new /obj/item/device/gripper(src) - src.modules += new /obj/item/device/matter_decompiler(src) - src.modules += new /obj/item/reagent_container/spray/cleaner/drone(src) - - src.emag = new /obj/item/tool/pickaxe/plasmacutter(src) - src.emag.name = "Plasma Cutter" - - for(var/T in stacktypes) - var/obj/item/stack/sheet/W = new T(src) - W.amount = stacktypes[T] - src.modules += W - -/obj/item/circuitboard/robot_module/drone/add_languages(mob/living/silicon/robot/R) - return //not much ROM to spare in that tiny microprocessor! - -/obj/item/circuitboard/robot_module/drone/respawn_consumable(mob/living/silicon/robot/R) - var/obj/item/reagent_container/spray/cleaner/C = locate() in src.modules - C.reagents.add_reagent("cleaner", 3) - - var/obj/item/device/lightreplacer/LR = locate() in src.modules - LR.Charge(R) - - ..() - return - -//checks whether this item is a module of the robot it is located in. -/obj/item/proc/is_robot_module() - if (!isrobot(src.loc)) - return 0 - - var/mob/living/silicon/robot/R = src.loc - - return (src in R.module.modules) diff --git a/code/game/objects/items/devices/RCD.dm b/code/game/objects/items/devices/RCD.dm index 55965533c48b..00e569800314 100644 --- a/code/game/objects/items/devices/RCD.dm +++ b/code/game/objects/items/devices/RCD.dm @@ -86,7 +86,7 @@ RCD /obj/item/device/rcd/afterattack(atom/A, mob/user, proximity) if(!proximity) return - if(disabled && !isrobot(user)) + if(disabled) return 0 if(istype(A,/area/shuttle) || istype(A,/turf/open/space/transit)) return 0 @@ -180,20 +180,6 @@ RCD /obj/item/device/rcd/proc/checkResource(amount, mob/user) return stored_matter >= amount -/obj/item/device/rcd/borg/useResource(amount, mob/user) - if(!isrobot(user)) - return 0 - return user:cell:use(amount * 30) - -/obj/item/device/rcd/borg/checkResource(amount, mob/user) - if(!isrobot(user)) - return 0 - return user:cell:charge >= (amount * 30) - -/obj/item/device/rcd/borg/New() - ..() - desc = "A device used to rapidly build walls/floor." - canRwall = 1 /obj/item/ammo_rcd name = "compressed matter cartridge" diff --git a/code/game/objects/items/devices/RSF.dm b/code/game/objects/items/devices/RSF.dm index ac87cd6dfc86..29f84c7c6d0c 100644 --- a/code/game/objects/items/devices/RSF.dm +++ b/code/game/objects/items/devices/RSF.dm @@ -68,48 +68,31 @@ RSF if(!proximity) return - if(istype(user,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/R = user - if(R.stat || !R.cell || R.cell.charge <= 0) - return - else - if(stored_matter <= 0) - return + if(stored_matter <= 0) + return if(!istype(A, /obj/structure/surface/table) && !istype(A, /turf/open/floor)) return playsound(src.loc, 'sound/machines/click.ogg', 25, 1) - var/used_energy = 0 var/obj/product switch(mode) if(1) product = new /obj/item/spacecash/c10() - used_energy = 200 if(2) product = new /obj/item/reagent_container/food/drinks/drinkingglass() - used_energy = 50 if(3) product = new /obj/item/paper() - used_energy = 10 if(4) product = new /obj/item/tool/pen() - used_energy = 50 if(5) product = new /obj/item/storage/pill_bottle/dice() - used_energy = 200 if(6) product = new /obj/item/clothing/mask/cigarette() - used_energy = 10 to_chat(user, "Dispensing [product ? product : "product"]...") product.forceMove(get_turf(A)) - if(isrobot(user)) - var/mob/living/silicon/robot/R = user - if(R.cell) - R.cell.use(used_energy) - else - stored_matter-- - to_chat(user, "The RSF now holds [stored_matter]/30 fabrication-units.") + stored_matter-- + to_chat(user, "The RSF now holds [stored_matter]/30 fabrication-units.") diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 6dad79e4af5a..cc36eb9be02c 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -6,103 +6,3 @@ w_class = SIZE_SMALL flags_atom = FPRINT|CONDUCT flags_equip_slot = SLOT_WAIST - var/flush = null - - - -/obj/item/device/aicard/attack(mob/living/silicon/ai/M as mob, mob/user as mob) - if(!isAI(M))//If target is not an AI. - return ..() - - M.attack_log += text("\[[time_stamp()]\] Has been carded with [src.name] by [user.name] ([user.ckey])") - M.last_damage_data = create_cause_data(initial(name), user) - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to card [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to card [M.name] ([M.ckey]) in [get_area(user)] ([user.x],[user.y],[user.z]).", user.x, user.y, user.z) - - transfer_ai("AICORE", "AICARD", M, user) - return - -/obj/item/device/aicard/attack(mob/living/silicon/decoy/M as mob, mob/user as mob) - if (!istype (M, /mob/living/silicon/decoy)) - return ..() - else - M.death() - to_chat(user, "ERROR ERROR ERROR") - -/obj/item/device/aicard/attack_self(mob/user) - ..() - - if (!in_range(src, user)) - return - - user.set_interaction(src) - var/dat = "Intelicard
" - for(var/mob/living/silicon/ai/A in src) - dat += "Stored AI: [A.name]
System integrity: [(A.health+100)/2]%
" - - if (A.stat == 2) - dat += "AI nonfunctional" - else - if (!src.flush) - dat += {"Wipe AI"} - else - dat += "Wipe in progress" - dat += "
" - dat += {"[A.control_disabled ? "Enable" : "Disable"] Wireless Activity"} - dat += "
" - dat += "Subspace Transceiver is: [A.aiRadio.disabledAi ? "Disabled" : "Enabled"]" - dat += "
" - dat += {"[A.aiRadio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver"} - dat += "
" - dat += {" Close"} - user << browse(dat, "window=aicard") - onclose(user, "aicard") - return - -/obj/item/device/aicard/Topic(href, href_list) - . = ..() - if(.) - return - var/mob/U = usr - if (!in_range(src, U)||U.interactee!=src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else). - close_browser(U, "aicard") - U.unset_interaction() - return - - add_fingerprint(U) - U.set_interaction(src) - - switch(href_list["choice"])//Now we switch based on choice. - if ("Close") - close_browser(U, "aicard") - U.unset_interaction() - return - - if ("Radio") - for(var/mob/living/silicon/ai/A in src) - A.aiRadio.disabledAi = !A.aiRadio.disabledAi - if ("Wipe") - var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No") - if(confirm == "Yes") - if(QDELETED(src)||!in_range(src, U)||U.interactee!=src) - close_browser(U, "aicard") - U.unset_interaction() - return - else - flush = 1 - for(var/mob/living/silicon/ai/A in src) - to_chat(A, "Your core files are being wiped!") - while (A.stat != 2) - A.apply_damage(2, OXY) - A.updatehealth() - sleep(10) - flush = 0 - - if ("Wireless") - for(var/mob/living/silicon/ai/A in src) - A.control_disabled = !A.control_disabled - if (A.control_disabled) - overlays -= image('icons/obj/items/robot_component.dmi', "aicard-on") - else - overlays += image('icons/obj/items/robot_component.dmi', "aicard-on") - attack_self(U) diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm deleted file mode 100644 index 1549fbd3739b..000000000000 --- a/code/game/objects/items/devices/camera_bug.dm +++ /dev/null @@ -1,34 +0,0 @@ -/obj/item/device/camera_bug - name = "camera bug" - icon_state = "flash" - w_class = SIZE_TINY - item_state = "electronic" - throw_speed = SPEED_VERY_FAST - throw_range = 20 - -/obj/item/device/camera_bug/attack_self(mob/usr as mob) - ..() - - var/list/cameras = new/list() - for (var/obj/structure/machinery/camera/C in GLOB.cameranet.cameras) - if (C.bugged && C.status) - cameras.Add(C) - if (length(cameras) == 0) - to_chat(usr, SPAN_DANGER("No bugged functioning cameras found.")) - return - - var/list/friendly_cameras = new/list() - - for (var/obj/structure/machinery/camera/C in cameras) - friendly_cameras.Add(C.c_tag) - - var/target = tgui_input_list(usr, "Select the camera to observe", "Camera to Observe", friendly_cameras) - if (!target) - return - for (var/obj/structure/machinery/camera/C in cameras) - if (C.c_tag == target) - target = C - break - if (usr.stat == 2) return - - usr.client.eye = target diff --git a/code/game/objects/items/devices/drone_devices.dm b/code/game/objects/items/devices/drone_devices.dm index 121a3c0aabc9..0e22b64bf67f 100644 --- a/code/game/objects/items/devices/drone_devices.dm +++ b/code/game/objects/items/devices/drone_devices.dm @@ -173,33 +173,6 @@ stored_comms["plastic"]++ stored_comms["plastic"]++ return - - else if(ismaintdrone(M) && !M.client) - - var/mob/living/silicon/robot/drone/D = src.loc - - if(!istype(D)) - return - - to_chat(D, SPAN_DANGER("You begin decompiling the other drone.")) - - if(!do_after(D, 50, INTERRUPT_NO_NEEDHAND, BUSY_ICON_GENERIC)) - to_chat(D, SPAN_DANGER("You need to remain still while decompiling such a large object.")) - return - - if(!M || !D) return - - to_chat(D, SPAN_DANGER("You carefully and thoroughly decompile your downed fellow, storing as much of its resources as you can within yourself.")) - - qdel(M) - new/obj/effect/decal/cleanable/blood/oil(get_turf(src)) - - stored_comms["metal"] += 15 - stored_comms["glass"] += 15 - stored_comms["wood"] += 5 - stored_comms["plastic"] += 5 - - return else continue diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 33a93ed18db5..56d363774a62 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -102,17 +102,6 @@ else //if not carbon or sillicn flashfail = TRUE - if(isrobot(user)) - spawn(0) - var/atom/movable/overlay/animation = new(user.loc) - animation.layer = user.layer + 1 - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = user - flick("blspell", animation) - sleep(5) - qdel(animation) - if(!flashfail) if(!isSilicon(M)) user.visible_message(SPAN_DANGER("[user] blinds [M] with \the [src]!")) diff --git a/code/game/objects/items/devices/motion_detector.dm b/code/game/objects/items/devices/motion_detector.dm index 9776eae11c8f..f8b3eaff4d51 100644 --- a/code/game/objects/items/devices/motion_detector.dm +++ b/code/game/objects/items/devices/motion_detector.dm @@ -220,7 +220,6 @@ var/mob/living/M = A //do this to skip the unnecessary istype() check; everything in ping_candidate is a mob already if(M == loc) continue //device user isn't detected if(world.time > M.l_move_time + 20) continue //hasn't moved recently - if(isrobot(M)) continue if(M.get_target_lock(iff_signal)) continue diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index c628758c74e8..261ac245509e 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -252,12 +252,6 @@ // --- Carbon Nonhuman --- else if(iscarbon(M)) // Nonhuman carbon mob jobname = "No id" - // --- AI --- - else if(isAI(M)) - jobname = "AI" - // --- Cyborg --- - else if(isrobot(M)) - jobname = "Cyborg" // --- Unidentifiable mob --- else jobname = "Unknown" @@ -431,136 +425,6 @@ for (var/ch_name in channels) channels[ch_name] = 0 -/////////////////////////////// -//////////Borg Radios////////// -/////////////////////////////// -//Giving borgs their own radio to have some more room to work with -Sieve - -/obj/item/device/radio/borg - var/mob/living/silicon/robot/myborg = null // Cyborg which owns this radio. Used for power checks - var/obj/item/device/encryptionkey/keyslot = null//Borg radios can handle a single encryption key - var/shut_up = 0 - icon = 'icons/obj/items/robot_component.dmi' // Cyborgs radio icons should look like the component. - icon_state = "radio" - canhear_range = 3 - -/obj/item/device/radio/borg/talk_into() - ..() - if (isrobot(src.loc)) - var/mob/living/silicon/robot/R = src.loc - var/datum/robot_component/C = R.components["radio"] - R.cell_use_power(C.active_usage) - -/obj/item/device/radio/borg/attackby(obj/item/W as obj, mob/user as mob) -// ..() - if (!(HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER) || (istype(W, /obj/item/device/encryptionkey)))) - return - - if(HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER)) - if(keyslot) - - - for(var/ch_name in channels) - SSradio.remove_object(src, GLOB.radiochannels[ch_name]) - secure_radio_connections[ch_name] = null - - - if(keyslot) - var/turf/T = get_turf(user) - if(T) - keyslot.forceMove(T) - keyslot = null - - recalculateChannels() - to_chat(user, "You pop out the encryption key in the radio!") - - else - to_chat(user, "This radio doesn't have any encryption keys!") - - if(istype(W, /obj/item/device/encryptionkey/)) - if(keyslot) - to_chat(user, "The radio can't hold another key!") - return - - if(!keyslot) - if(user.drop_held_item()) - W.forceMove(src) - keyslot = W - - recalculateChannels() - - return - -/obj/item/device/radio/borg/proc/recalculateChannels() - src.channels = list() - - var/mob/living/silicon/robot/D = src.loc - if(D.module) - for(var/ch_name in D.module.channels) - if(ch_name in src.channels) - continue - src.channels += ch_name - src.channels[ch_name] += D.module.channels[ch_name] - if(keyslot) - for(var/ch_name in keyslot.channels) - if(ch_name in src.channels) - continue - src.channels += ch_name - src.channels[ch_name] += keyslot.channels[ch_name] - - for (var/ch_name in src.channels) - secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT) - - SStgui.update_uis(src) - -/obj/item/device/radio/borg/Topic(href, href_list) - if(usr.stat || !on) - return - if (href_list["mode"]) - if(subspace_transmission != 1) - subspace_transmission = 1 - to_chat(usr, "Subspace Transmission is disabled") - else - subspace_transmission = 0 - to_chat(usr, "Subspace Transmission is enabled") - if(subspace_transmission == 1)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled - channels = list() - else - recalculateChannels() - if (href_list["shutup"]) // Toggle loudspeaker mode, AKA everyone around you hearing your radio. - shut_up = !shut_up - if(shut_up) - canhear_range = 0 - else - canhear_range = 3 - - ..() - -/obj/item/device/radio/borg/interact(mob/user as mob) - if(!on) - return - - var/dat = "[src]" - dat += {" - Speaker: [listening ? "Engaged" : "Disengaged"]
- Frequency: - - - - - [format_frequency(frequency)] - + - +
- Toggle Broadcast Mode
- Toggle Loudspeaker
- "} - - if(!subspace_transmission)//Don't even bother if subspace isn't turned on - for (var/ch_name in channels) - dat+=text_sec_channel(ch_name, channels[ch_name]) - dat+={"[text_wires()]
"} - show_browser(user, dat, name, "radio") - return - - /obj/item/device/radio/proc/config(op) for (var/ch_name in channels) SSradio.remove_object(src, GLOB.radiochannels[ch_name]) diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm index 4eb61a48b903..d017a430b88a 100644 --- a/code/game/objects/items/devices/whistle.dm +++ b/code/game/objects/items/devices/whistle.dm @@ -38,7 +38,7 @@ addtimer(VARSET_CALLBACK(src, spamcheck, FALSE), 3 SECONDS) /obj/item/device/whistle/MouseDrop(obj/over_object) - if(ishuman(usr) || isrobot(usr)) + if(ishuman(usr)) if(!usr.is_mob_restrained() && !usr.stat && usr.wear_mask == src) switch(over_object.name) diff --git a/code/game/objects/items/explosives/mine.dm b/code/game/objects/items/explosives/mine.dm index 768a32c003fa..70a2bba6056d 100644 --- a/code/game/objects/items/explosives/mine.dm +++ b/code/game/objects/items/explosives/mine.dm @@ -197,7 +197,7 @@ return if(L.stat == DEAD) return - if(L.get_target_lock(iff_signal) || isrobot(L)) + if(L.get_target_lock(iff_signal)) return if(HAS_TRAIT(L, TRAIT_ABILITY_BURROWED)) return diff --git a/code/game/objects/items/frames/camera.dm b/code/game/objects/items/frames/camera.dm index efe697c3944b..6b6061df8af0 100644 --- a/code/game/objects/items/frames/camera.dm +++ b/code/game/objects/items/frames/camera.dm @@ -103,12 +103,7 @@ C.assembly = src C.auto_turn() - C.network = uniquelist(tempnetwork) - tempnetwork = difflist(C.network,GLOB.RESTRICTED_CAMERA_NETWORKS) - if(!tempnetwork.len)//Camera isn't on any open network - remove its chunk from AI visibility. - GLOB.cameranet.removeCamera(C) - C.c_tag = input for(var/i = 5; i >= 0; i -= 1) diff --git a/code/game/objects/items/reagent_containers/borghydro.dm b/code/game/objects/items/reagent_containers/borghydro.dm deleted file mode 100644 index 4f1f5540988b..000000000000 --- a/code/game/objects/items/reagent_containers/borghydro.dm +++ /dev/null @@ -1,86 +0,0 @@ - -/obj/item/reagent_container/borghypo - name = "Robot Hypospray" - desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment." - icon = 'icons/obj/items/syringe.dmi' - item_state = "hypo" - icon_state = "borghypo" - amount_per_transfer_from_this = 5 - volume = 30 - possible_transfer_amounts = null - var/mode = 1 - var/charge_cost = 50 - var/charge_tick = 0 - var/recharge_time = 2 SECONDS //Time it takes for shots to recharge - - var/list/reagent_ids = list("tricordrazine", "bicaridine", "kelotane", "dexalinp", "anti_toxin", "inaprovaline", "tramadol", "imidazoline", "spaceacillin") - var/list/reagent_volumes = list() - var/list/reagent_names = list() - -/obj/item/reagent_container/borghypo/Initialize() - . = ..() - - for(var/T in reagent_ids) - reagent_volumes[T] = volume - var/datum/reagent/R = GLOB.chemical_reagents_list[T] - reagent_names += R.name - - START_PROCESSING(SSobj, src) - - -/obj/item/reagent_container/borghypo/Destroy() - STOP_PROCESSING(SSobj, src) - . = ..() - -/obj/item/reagent_container/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg+ - if(++charge_tick < recharge_time) - return 0 - charge_tick = 0 - - if(isrobot(loc)) - var/mob/living/silicon/robot/R = loc - if(R && R.cell) - for(var/T in reagent_ids) - if(reagent_volumes[T] < volume) - R.cell.use(charge_cost) - reagent_volumes[T] = min(reagent_volumes[T] + 5, volume) - return 1 - -/obj/item/reagent_container/borghypo/attack(mob/living/M as mob, mob/user as mob) - if(!istype(M)) - return - - if(!reagent_volumes[reagent_ids[mode]]) - to_chat(user, SPAN_WARNING("The injector is empty.")) - return - - to_chat(user, SPAN_NOTICE(" You inject [M] with the injector.")) - to_chat(M, SPAN_NOTICE(" [user] injects you with the injector.")) - playsound(loc, 'sound/items/hypospray.ogg', 50, 1) - - if(M.reagents) - var/t = min(amount_per_transfer_from_this, reagent_volumes[reagent_ids[mode]]) - M.reagents.add_reagent(reagent_ids[mode], t) - reagent_volumes[reagent_ids[mode]] -= t - // to_chat(user, SPAN_NOTICE("[t] units injected. [reagent_volumes[reagent_ids[mode]]] units remaining.")) - to_chat(user, SPAN_NOTICE(" [t] units of \red [reagent_ids[mode]] \blue injected for a total of \red [round(M.reagents.get_reagent_amount(reagent_ids[mode]))]\blue. [reagent_volumes[reagent_ids[mode]]] units remaining.")) - - return - -/obj/item/reagent_container/borghypo/attack_self(mob/user) - ..() - var/selection = tgui_input_list(usr, "Please select a reagent:", "Reagent", reagent_ids) - if(!selection) return - var/datum/reagent/R = GLOB.chemical_reagents_list[selection] - to_chat(user, SPAN_NOTICE(" Synthesizer is now producing '[R.name]'.")) - mode = reagent_ids.Find(selection) - playsound(src.loc, 'sound/effects/pop.ogg', 15, 0) - return - -/obj/item/reagent_container/borghypo/get_examine_text(mob/user) - . = ..() - if (user != loc) return - - var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_ids[mode]] - - . += SPAN_NOTICE("It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left.") diff --git a/code/game/objects/items/reagent_containers/food/cans.dm b/code/game/objects/items/reagent_containers/food/cans.dm index aab2ee066e12..8cf28a9d560c 100644 --- a/code/game/objects/items/reagent_containers/food/cans.dm +++ b/code/game/objects/items/reagent_containers/food/cans.dm @@ -38,7 +38,6 @@ to_chat(user, SPAN_NOTICE("You need to open the drink!")) return var/datum/reagents/R = src.reagents - var/fillevel = gulp_size if(!R.total_volume || !R) if(M == user && M.a_intent == INTENT_HARM && M.zone_selected == "head") @@ -80,13 +79,6 @@ reagents.set_source_mob(user) reagents.trans_to_ingest(M, gulp_size) - if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell - var/mob/living/silicon/robot/bro = user - bro.cell.use(30) - var/refill = R.get_master_reagent_id() - spawn(1 MINUTES) - R.add_reagent(refill, fillevel) - playsound(M.loc,'sound/items/drink.ogg', 15, 1) return 1 @@ -270,7 +262,7 @@ /obj/item/reagent_container/food/drinks/cans/boda name = "\improper Boda" desc = "State regulated soda beverage. Enjoy comrades." - desc_lore = "Designed back in 2159, the advertising campaign for BODA started out as an attempt by the UPP to win the hearts and minds of colonists and settlers across the galaxy. Soon after, the ubiquitous cyan vendors and large supplies of the drink began to crop up in UA warehouses with seemingly no clear origin. Despite some concerns, after initial testing determined that the stored products were safe for consumption and surprisingly popular when blind-tested with focus groups, the strange surplus of BODA was authorized for usage within the UA-associated colonies. Subsequently, it enjoyed a relative popularity before falling into obscurity in the coming decades as supplies dwindled." + desc_lore = "Designed back in 2159, the advertising campaign for BODA started out as an attempt by the UPP to win the hearts and minds of colonists and settlers across the galaxy. Soon after, the ubiquitous cyan vendors and large supplies of the drink began to crop up in UA warehouses with seemingly no clear origin. Despite some concerns, after initial testing determined that the stored products were safe for consumption and surprisingly popular when blind-tested with focus groups, the strange surplus of BODA was authorized for usage within the UA-associated colonies. Subsequently, it enjoyed a relative popularity before falling into obscurity in the coming decades as supplies dwindled." icon_state = "boda" center_of_mass = "x=16;y=10" diff --git a/code/game/objects/items/reagent_containers/food/drinks.dm b/code/game/objects/items/reagent_containers/food/drinks.dm index 9f88990e5350..d2089e427c5a 100644 --- a/code/game/objects/items/reagent_containers/food/drinks.dm +++ b/code/game/objects/items/reagent_containers/food/drinks.dm @@ -17,7 +17,6 @@ /obj/item/reagent_container/food/drinks/attack(mob/M, mob/user) var/datum/reagents/R = src.reagents - var/fillevel = gulp_size if(!R.total_volume || !R) to_chat(user, SPAN_DANGER("The [src.name] is empty!")) @@ -55,13 +54,6 @@ reagents.set_source_mob(user) reagents.trans_to_ingest(M, gulp_size) - if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell - var/mob/living/silicon/robot/bro = user - bro.cell.use(30) - var/refill = R.get_master_reagent_id() - spawn(1 MINUTES) - R.add_reagent(refill, fillevel) - playsound(M.loc,'sound/items/drink.ogg', 15, 1) return TRUE @@ -98,28 +90,9 @@ to_chat(user, SPAN_DANGER("[target] is full.")) return - - - var/datum/reagent/refill - var/datum/reagent/refillName - if(isrobot(user)) - refill = reagents.get_master_reagent_id() - refillName = reagents.get_master_reagent_name() - var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) to_chat(user, SPAN_NOTICE(" You transfer [trans] units of the solution to [target].")) - if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell - var/mob/living/silicon/robot/bro = user - var/chargeAmount = max(30,4*trans) - bro.cell.use(chargeAmount) - to_chat(user, "Now synthesizing [trans] units of [refillName]...") - - - spawn(30 SECONDS) - reagents.add_reagent(refill, trans) - to_chat(user, "Cyborg [src] refilled.") - return ..() /obj/item/reagent_container/food/drinks/get_examine_text(mob/user) diff --git a/code/game/objects/items/reagent_containers/food/snacks.dm b/code/game/objects/items/reagent_containers/food/snacks.dm index 2892eb1113e7..aca76d8efb42 100644 --- a/code/game/objects/items/reagent_containers/food/snacks.dm +++ b/code/game/objects/items/reagent_containers/food/snacks.dm @@ -828,13 +828,6 @@ reagents.add_reagent("iron", 3) bitesize = 2 -/// Vanilla roburger - the nanites turn people into cyborgs -/obj/item/reagent_container/food/snacks/roburger/unsafe -/obj/item/reagent_container/food/snacks/roburger/unsafe/Initialize(mapload, ...) - . = ..() - if(prob(5)) - reagents.add_reagent("nanites", 2) - /obj/item/reagent_container/food/snacks/roburgerbig name = "roburger" desc = "This massive patty looks like poison. Beep." @@ -844,7 +837,6 @@ /obj/item/reagent_container/food/snacks/roburgerbig/Initialize() . = ..() - reagents.add_reagent("nanites", 100) bitesize = 0.1 /obj/item/reagent_container/food/snacks/xenoburger diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/reagent_containers/robot_parts.dm similarity index 76% rename from code/game/objects/items/robot/robot_parts.dm rename to code/game/objects/items/reagent_containers/robot_parts.dm index b853b24d1013..3a188bda6a50 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/reagent_containers/robot_parts.dm @@ -164,72 +164,6 @@ else to_chat(user, SPAN_NOTICE(" You need to attach a flash to it first!")) - if(istype(W, /obj/item/device/mmi)) - var/obj/item/device/mmi/M = W - if(check_completion()) - if(!istype(loc,/turf)) - to_chat(user, SPAN_DANGER("You can't put \the [W] in, the frame has to be standing on the ground to be perfectly precise.")) - return - if(!M.brainmob) - to_chat(user, SPAN_DANGER("Sticking an empty [W] into the frame would sort of defeat the purpose.")) - return - if(!M.brainmob.key) - var/ghost_can_reenter = 0 - if(M.brainmob.mind) - for(var/mob/dead/observer/G in GLOB.observer_list) - if(G.can_reenter_corpse && G.mind == M.brainmob.mind) - ghost_can_reenter = 1 - break - if(!ghost_can_reenter) - to_chat(user, SPAN_NOTICE("\The [W] is completely unresponsive; there's no point.")) - return - - if(M.brainmob.stat == DEAD) - to_chat(user, SPAN_DANGER("Sticking a dead [W] into the frame would sort of defeat the purpose.")) - return - - if(jobban_isbanned(M.brainmob, "Cyborg")) - to_chat(user, SPAN_DANGER("This [W] does not seem to fit.")) - return - - var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1) - if(!O) return - - user.drop_held_item() - - O.mmi = W - O.invisibility = 0 - O.custom_name = created_name - O.updatename("Default") - - M.brainmob.mind.transfer_to(O) - - O.job = "Cyborg" - - 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 - O.Namepick() - - qdel(src) - else - to_chat(user, SPAN_NOTICE(" The MMI must go in after everything else!")) - - if (HAS_TRAIT(W, TRAIT_TOOL_PEN)) - var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN) - if (!t) - return - if (!in_range(src, usr) && src.loc != usr) - return - - src.created_name = t - return /obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob) diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm deleted file mode 100644 index 476390fda6e8..000000000000 --- a/code/game/objects/items/robot/robot_items.dm +++ /dev/null @@ -1,83 +0,0 @@ -//********************************************************************** -// Cyborg Spec Items -//***********************************************************************/ -//Might want to move this into several files later but for now it works here -/obj/item/robot/stun - name = "electrified arm" - icon = 'icons/obj/structures/props/decals.dmi' - icon_state = "shock" - -/obj/item/robot/stun/attack(mob/M as mob, mob/living/silicon/robot/user as mob) - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) in [get_area(user)] ([user.loc.x],[user.loc.y],[user.loc.z]).", user.loc.x, user.loc.y, user.loc.z) - - user.cell.charge -= 30 - - playsound(M.loc, 'sound/weapons/Egloves.ogg', 25, 1, 4) - M.apply_effect(5, WEAKEN) - if (M.stuttering < 5) - M.stuttering = 5 - M.apply_effect(5, STUN) - - for(var/mob/O in viewers(M, null)) - if (O.client) - O.show_message(SPAN_DANGER("[user] has prodded [M] with an electrically-charged arm!"), SHOW_MESSAGE_VISIBLE, SPAN_DANGER("You hear someone fall"), SHOW_MESSAGE_AUDIBLE) - -/obj/item/robot/overdrive - name = "overdrive" - icon = 'icons/obj/structures/props/decals.dmi' - icon_state = "shock" - -//********************************************************************** -// HUD/SIGHT things -//***********************************************************************/ -/obj/item/robot/sight - icon = 'icons/obj/structures/props/decals.dmi' - icon_state = "securearea" - var/sight_mode = null - - -/obj/item/robot/sight/xray - name = "\proper x-ray Vision" - sight_mode = BORGXRAY - - -/obj/item/robot/sight/thermal - name = "\proper thermal vision" - sight_mode = BORGTHERM - icon_state = "thermal" - icon = 'icons/obj/items/clothing/glasses.dmi' - - -/obj/item/robot/sight/meson - name = "\proper meson vision" - sight_mode = BORGMESON - icon_state = "meson" - icon = 'icons/obj/items/clothing/glasses.dmi' - -/obj/item/robot/sight/hud - name = "hud" - var/obj/item/clothing/glasses/hud/hud = null - - -/obj/item/robot/sight/hud/med - name = "medical hud" - icon_state = "healthhud" - icon = 'icons/obj/items/clothing/glasses.dmi' - -/obj/item/robot/sight/hud/sec/New() - ..() - hud = new /obj/item/clothing/glasses/hud/health(src) - return - - -/obj/item/robot/sight/hud/sec - name = "security hud" - icon_state = "securityhud" - icon = 'icons/obj/items/clothing/glasses.dmi' - -/obj/item/robot/sight/hud/sec/New() - ..() - hud = new /obj/item/clothing/glasses/hud/security(src) - return diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm deleted file mode 100644 index 34debd7c60cf..000000000000 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ /dev/null @@ -1,149 +0,0 @@ -// robot_upgrades.dm -// Contains various borg upgrades. - -/obj/item/robot/upgrade - name = "borg upgrade module." - desc = "Protected by FRM." - icon = 'icons/obj/items/circuitboards.dmi' - icon_state = "cyborg_upgrade" - var/locked = 0 - var/require_module = 0 - var/installed = 0 - -/obj/item/robot/upgrade/proc/action(mob/living/silicon/robot/R) - if(R.stat == DEAD) - to_chat(usr, SPAN_DANGER("The [src] will not function on a deceased robot.")) - return 1 - return 0 - - -/obj/item/robot/upgrade/reset - name = "robotic module reset board" - desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the robot." - icon_state = "cyborg_upgrade1" - require_module = 1 - -/obj/item/robot/upgrade/reset/action(mob/living/silicon/robot/R) - if(..()) return 0 - R.uneq_all() - R.hands.icon_state = "nomod" - R.icon_state = "robot" - QDEL_NULL(R.module) - R.camera.network.Remove(list("Engineering","Medical","MINE")) - R.updatename("Default") - R.status_flags |= CANPUSH - R.update_icons() - - return 1 - -/obj/item/robot/upgrade/rename - name = "robot reclassification board" - desc = "Used to rename a cyborg." - icon_state = "cyborg_upgrade1" - var/heldname = "default name" - -/obj/item/robot/upgrade/rename/attack_self(mob/user) - ..() - heldname = stripped_input(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN) - -/obj/item/robot/upgrade/rename/action(mob/living/silicon/robot/R) - if(..()) return 0 - R.custom_name = heldname - R.change_real_name(R, heldname) - - return 1 - -/obj/item/robot/upgrade/restart - name = "robot emergency restart module" - desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online." - icon_state = "cyborg_upgrade1" - - -/obj/item/robot/upgrade/restart/action(mob/living/silicon/robot/R) - if(R.health < 0) - to_chat(usr, "You have to repair the robot before using this module!") - return 0 - - if(!R.key) - for(var/mob/dead/observer/ghost in GLOB.observer_list) - if(ghost.mind && ghost.mind.original == R) - R.key = ghost.key - if(R.client) R.client.change_view(GLOB.world_view_size) - break - - R.set_stat(CONSCIOUS) - return 1 - - -/obj/item/robot/upgrade/vtec - name = "robotic VTEC Module" - desc = "Used to kick in a robot's VTEC systems, increasing their speed." - icon_state = "cyborg_upgrade2" - require_module = 1 - -/obj/item/robot/upgrade/vtec/action(mob/living/silicon/robot/R) - if(..()) return 0 - - if(R.speed == -1) - return 0 - - R.speed-- - return 1 - - -/obj/item/robot/upgrade/tasercooler - name = "robotic Rapid Taser Cooling Module" - desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate." - icon_state = "cyborg_upgrade3" - require_module = 1 - - -/obj/item/robot/upgrade/tasercooler/action(mob/living/silicon/robot/R) - if(..()) return 0 -/* - - if(!istype(R.module, /obj/item/circuitboard/robot_module/security)) - to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!") - to_chat(usr, "There's no mounting point for the module!") - return 0 - - var/obj/item/weapon/gun/energy/taser/cyborg/T = locate() in R.module - if(!T) - T = locate() in R.module.contents - if(!T) - T = locate() in R.module.modules - if(!T) - to_chat(usr, "This robot has had its taser removed!") - return 0 - - if(T.recharge_time <= 2) - to_chat(R, "Maximum cooling achieved for this hardpoint!") - to_chat(usr, "There's no room for another cooling unit!") - return 0 - - else - T.recharge_time = max(2 , T.recharge_time - 4) -*/ - return 1 - -/obj/item/robot/upgrade/jetpack - name = "mining robot jetpack" - desc = "A carbon dioxide jetpack suitable for low-gravity mining operations." - icon_state = "cyborg_upgrade3" - require_module = 1 - -/obj/item/robot/upgrade/jetpack/action(mob/living/silicon/robot/R) - if(..()) return 0 - - R.module.modules += new/obj/item/tank/jetpack/carbondioxide - for(var/obj/item/tank/jetpack/carbondioxide in R.module.modules) - R.internal = src - //R.icon_state="Miner+j" - return 1 - - -/obj/item/robot/upgrade/syndicate - name = "illegal equipment module" - desc = "Unlocks the hidden, deadlier functions of a robot" - icon_state = "cyborg_upgrade3" - require_module = 1 diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index f96903cfb687..1dc755bf2a1e 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -21,7 +21,7 @@ to_chat(user, SPAN_DANGER("\The [src] cannot be applied to [M]!")) return 1 - if(!ishuman(user) && !isrobot(user)) + if(!ishuman(user)) to_chat(user, SPAN_WARNING("You don't have the dexterity to do this!")) return 1 diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 754a36c6012a..156fbf548f5f 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -15,17 +15,6 @@ /obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob) if (!istype(M) || !istype(user)) return 0 - if (isrobot(M)) //Repairing cyborgs - var/mob/living/silicon/robot/R = M - if (R.getBruteLoss() || R.getFireLoss() ) - R.apply_damage(-15, BRUTE) - R.apply_damage(-15, BURN) - R.updatehealth() - use(1) - user.visible_message(SPAN_NOTICE("\The [user] applied some [src] at [R]'s damaged areas."),\ - SPAN_NOTICE("You apply some [src] at [R]'s damaged areas.")) - else - to_chat(user, SPAN_NOTICE("All [R]'s systems are nominal.")) if (istype(M,/mob/living/carbon/human)) //Repairing robolimbs var/mob/living/carbon/human/H = M diff --git a/code/game/objects/items/storage/storage.dm b/code/game/objects/items/storage/storage.dm index 6e7e891d6ba8..51a73d2f0444 100644 --- a/code/game/objects/items/storage/storage.dm +++ b/code/game/objects/items/storage/storage.dm @@ -559,11 +559,6 @@ W is always an item. stop_warning prevents messaging. user may be null.**/ //This proc is called when you want to place an item into the storage item. /obj/item/storage/attackby(obj/item/W as obj, mob/user as mob) ..() - - if(isrobot(user)) - to_chat(user, SPAN_NOTICE(" You're a robot. No.")) - return //Robots can't interact with storage items. - return attempt_item_insertion(W, FALSE, user) /obj/item/storage/equipped(mob/user, slot, silent) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 82fdf30f0fc4..768718e9c6a3 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -137,10 +137,6 @@ to_chat(user, SPAN_WARNING("You don't seem to know how to use [src]...")) return - if(isrobot(M)) - ..() - return - var/stun = stunforce var/mob/living/L = M @@ -201,17 +197,6 @@ if(bcell) bcell.emp_act(severity) //let's not duplicate code everywhere if we don't have to please. -//secborg stun baton module -/obj/item/weapon/baton/robot/attack_self(mob/user) - //try to find our power cell - var/mob/living/silicon/robot/R = loc - if (istype(R)) - bcell = R.cell - return ..() - -/obj/item/weapon/baton/robot/attackby(obj/item/W, mob/user) - return - //Makeshift stun baton. Replacement for stun gloves. /obj/item/weapon/baton/cattleprod name = "stunprod" diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 9d730c71970b..eb5e5abafd49 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -150,7 +150,7 @@ if ((M.client && M.interactee == src)) is_in_use = 1 attack_hand(M) - if (ishighersilicon(usr)) + if (isSilicon(usr)) if (!(usr in nearby)) if (usr.client && usr.interactee==src) // && M.interactee == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. is_in_use = 1 @@ -166,10 +166,7 @@ if ((M.client && M.interactee == src)) is_in_use = 1 src.interact(M) - var/ai_in_use = AutoUpdateAI(src) - - if(!ai_in_use && !is_in_use) - in_use = 0 + in_use = is_in_use /obj/proc/interact(mob/user) return diff --git a/code/game/objects/structures/barricade/barricade.dm b/code/game/objects/structures/barricade/barricade.dm index 5a72ec33ea2a..cef28fa255c2 100644 --- a/code/game/objects/structures/barricade/barricade.dm +++ b/code/game/objects/structures/barricade/barricade.dm @@ -176,9 +176,6 @@ return FALSE return prob(max(30,(100.0*health)/maxhealth)) -/obj/structure/barricade/attack_robot(mob/user as mob) - return attack_hand(user) - /obj/structure/barricade/attack_animal(mob/user as mob) return attack_alien(user) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 2efd8e4e81e9..9c79a4761d95 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -244,8 +244,6 @@ user.visible_message(SPAN_NOTICE("[user] has pried apart [src] with [W]."), "You pry apart [src].") qdel(src) return - if(isrobot(user)) - return user.drop_inv_item_to_loc(W,loc) else if(istype(W, /obj/item/packageWrap) || istype(W, /obj/item/explosive/plastic)) diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index ab9dade9ed3e..113d17f30dce 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -21,7 +21,7 @@ if(fireaxe) hasaxe = 1 - if (isrobot(usr) || src.locked) + if (src.locked) if(HAS_TRAIT(O, TRAIT_TOOL_MULTITOOL)) to_chat(user, SPAN_DANGER("Resetting circuitry...")) playsound(user, 'sound/machines/lockreset.ogg', 25, 1) @@ -140,7 +140,7 @@ set name = "Open/Close" set category = "Object" - if (isrobot(usr) || src.locked || src.smashed) + if (src.locked || src.smashed) if(src.locked) to_chat(usr, SPAN_DANGER("The cabinet won't budge!")) else if(src.smashed) @@ -154,9 +154,6 @@ set name = "Remove Fire Axe" set category = "Object" - if (isrobot(usr)) - return - if (istype(usr, /mob/living/carbon/xenomorph)) return diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index ba974a8e722a..e65d28e96f33 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -90,7 +90,7 @@ else to_chat(user, SPAN_NOTICE("The locker is too small to stuff [W:affecting] into!")) return - if(isrobot(user) || iszombie(user)) + if(iszombie(user)) return user.drop_inv_item_to_loc(W, loc) else if(istype(W, /obj/item/packageWrap) || istype(W, /obj/item/explosive/plastic)) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 119615ab7aed..cfb62812f0c6 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -101,8 +101,6 @@ /obj/structure/closet/crate/attackby(obj/item/W as obj, mob/user as mob) if(W.flags_item & ITEM_ABSTRACT) return if(opened) - if(isrobot(user)) - return user.drop_inv_item_to_loc(W, loc) else if(istype(W, /obj/item/packageWrap) || istype(W, /obj/item/stack/fulton)) return diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index e4ee4a1b662b..e754478dda0b 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -24,8 +24,6 @@ icon_state = "extinguisher_alt" /obj/structure/extinguisher_cabinet/attackby(obj/item/item, mob/user) - if(isrobot(user)) - return if(istype(item, /obj/item/tool/extinguisher)) if(!has_extinguisher && opened) user.drop_held_item() @@ -40,9 +38,6 @@ /obj/structure/extinguisher_cabinet/attack_hand(mob/user) - if(isrobot(user)) - return - if(has_extinguisher) user.put_in_hands(has_extinguisher) to_chat(user, SPAN_NOTICE("You take [has_extinguisher] from [src].")) diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index c67c7381f723..b3a330ca36b0 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -179,9 +179,6 @@ /obj/structure/inflatable/door/attack_remote(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral if(isRemoteControlling(user)) //so the AI can't open it return - else if(isrobot(user)) //but cyborgs can - if(get_dist(user,src) <= 1) //not remotely though - return TryToSwitchState(user) /obj/structure/inflatable/door/attack_hand(mob/user as mob) return TryToSwitchState(user) diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index da6d4f1a8254..92d1f3f2e7ce 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -178,9 +178,6 @@ add_fingerprint(usr) -/obj/structure/ladder/attack_robot(mob/user as mob) - return attack_hand(user) - /obj/structure/ladder/ex_act(severity) return diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 21d66efce270..25dc0040e2ac 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -32,9 +32,6 @@ /obj/structure/mineral_door/attack_remote(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral if(isRemoteControlling(user)) //so the AI can't open it return - else if(isrobot(user)) //but cyborgs can - if(get_dist(user,src) <= 1) //not remotely though - return TryToSwitchState(user) /obj/structure/mineral_door/attack_hand(mob/user as mob) return TryToSwitchState(user) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index df6bb5c69ecc..507a79ad5e31 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -254,8 +254,6 @@ /obj/structure/surface/table/MouseDrop_T(obj/item/I, mob/user) if (!istype(I) || user.get_active_hand() != I) return ..() - if(isrobot(user)) - return user.drop_held_item() if(I.loc != loc) step(I, get_dir(I, src)) @@ -299,7 +297,7 @@ deconstruct(TRUE) return - if((W.flags_item & ITEM_ABSTRACT) || isrobot(user)) + if(W.flags_item & ITEM_ABSTRACT) return if(istype(W, /obj/item/weapon/wristblades)) @@ -655,8 +653,6 @@ /obj/structure/surface/rack/MouseDrop_T(obj/item/I, mob/user) if (!istype(I) || user.get_active_hand() != I) return ..() - if(isrobot(user)) - return user.drop_held_item() if(I.loc != loc) step(I, get_dir(I, src)) @@ -666,7 +662,7 @@ deconstruct(TRUE) playsound(src.loc, 'sound/items/Ratchet.ogg', 25, 1) return - if((W.flags_item & ITEM_ABSTRACT) || isrobot(user)) + if(W.flags_item & ITEM_ABSTRACT) return ..() diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 60c37fcdc607..2fd42d724a63 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -493,11 +493,7 @@ user.apply_effect(10, STUN) user.stuttering = 10 user.apply_effect(10, WEAKEN) - if(isrobot(user)) - var/mob/living/silicon/robot/R = user - R.cell.charge -= 20 - else - B.deductcharge(B.hitcost) + B.deductcharge(B.hitcost) user.visible_message( \ SPAN_DANGER("[user] was stunned by \his wet [O]!"), \ SPAN_DANGER("You were stunned by your wet [O]!")) diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index e4e4923173bf..a69841ec29bd 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -727,7 +727,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) if(..()) return - if( isturf(loc) && (in_range(src, usr) || ishighersilicon(usr)) ) + if( isturf(loc) && (in_range(src, usr) || isSilicon(usr)) ) usr.set_interaction(src) if(href_list["order"]) @@ -774,7 +774,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) var/mob/living/carbon/human/H = usr idname = H.get_authentification_name() idrank = H.get_assignment() - else if(ishighersilicon(usr)) + else if(isSilicon(usr)) idname = usr.real_name GLOB.supply_controller.ordernum++ @@ -896,10 +896,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) if(..()) return - if(ismaintdrone(usr)) - return - - if(isturf(loc) && ( in_range(src, usr) || ishighersilicon(usr) ) ) + if(isturf(loc) && in_range(src, usr) ) usr.set_interaction(src) //Calling the shuttle @@ -1420,10 +1417,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) to_chat(usr, SPAN_WARNING("The elevator needs to be in the cargo bay dock to call a vehicle up. Ask someone to send it away.")) return - if(ismaintdrone(usr)) - return - - if(isturf(loc) && ( in_range(src, usr) || ishighersilicon(usr) ) ) + if(isturf(loc) && ( in_range(src, usr) || isSilicon(usr) ) ) usr.set_interaction(src) if(href_list["get_vehicle"]) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 22fe85bdde65..be58259e17ba 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -79,8 +79,6 @@ levelupdate() - visibilityChanged() - pass_flags = GLOB.pass_flags_cache[type] if (isnull(pass_flags)) pass_flags = new() @@ -127,7 +125,6 @@ for(var/I in B.vars) B.vars[I] = null return - visibilityChanged() flags_atom &= ~INITIALIZED ..() diff --git a/code/game/turfs/walls/r_wall.dm b/code/game/turfs/walls/r_wall.dm index 8933ad31c0e8..98ec3881600f 100644 --- a/code/game/turfs/walls/r_wall.dm +++ b/code/game/turfs/walls/r_wall.dm @@ -16,10 +16,6 @@ if(hull) return - if (!(istype(user, /mob/living/carbon/human) || isrobot(user) || SSticker) && SSticker.mode.name != "monkey") - to_chat(user, SPAN_WARNING("You don't have the dexterity to do this!")) - return - //get the user's location if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such diff --git a/code/game/turfs/walls/walls.dm b/code/game/turfs/walls/walls.dm index 303a9a7655e8..c9ae3d7cfd82 100644 --- a/code/game/turfs/walls/walls.dm +++ b/code/game/turfs/walls/walls.dm @@ -330,7 +330,7 @@ var/mob/living/carbon/xenomorph/user_as_xenomorph = user user_as_xenomorph.do_nesting_host(attacker_grab.grabbed_thing, src) - if(!ishuman(user) && !isrobot(user)) + if(!ishuman(user)) to_chat(user, SPAN_WARNING("You don't have the dexterity to do this!")) return diff --git a/code/modules/admin/player_panel/player_panel.dm b/code/modules/admin/player_panel/player_panel.dm index bead55f994ab..bc2d390692d8 100644 --- a/code/modules/admin/player_panel/player_panel.dm +++ b/code/modules/admin/player_panel/player_panel.dm @@ -204,12 +204,7 @@ else M_job = "Carbon-based" else if(isSilicon(M)) //silicon - if(isAI(M)) - M_job = "AI" - else if(isrobot(M)) - M_job = "Cyborg" - else - M_job = "Silicon-based" + M_job = "Silicon-based" else if(isanimal(M)) //simple animals if(iscorgi(M)) M_job = "Corgi" @@ -290,10 +285,8 @@ dat += "[(M.client ? "[M.client]" : "No client")]" dat += "[M.name]" - if(isAI(M)) + if(isSilicon(M)) dat += "AI" - else if(isrobot(M)) - dat += "Cyborg" else if(ishuman(M)) dat += "[M.real_name]" else if(istype(M, /mob/new_player)) diff --git a/code/modules/admin/topic/topic.dm b/code/modules/admin/topic/topic.dm index a0e9e8b787aa..81b1f6767cc6 100644 --- a/code/modules/admin/topic/topic.dm +++ b/code/modules/admin/topic/topic.dm @@ -745,9 +745,6 @@ if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return - if(isAI(M)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") - return for(var/obj/item/I in M) M.drop_inv_item_on_ground(I) @@ -769,9 +766,6 @@ if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return - if(isAI(M)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") - return for(var/obj/item/I in M) M.drop_inv_item_on_ground(I) @@ -793,9 +787,6 @@ if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return - if(isAI(M)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") - return M.apply_effect(5, PARALYZE) sleep(5) @@ -814,9 +805,6 @@ if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return - if(isAI(M)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") - return for(var/obj/item/I in M) M.drop_inv_item_on_ground(I) @@ -854,17 +842,6 @@ usr.client.cmd_admin_alienize(H) - else if(href_list["makeai"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["makeai"]) - if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") - return - - message_admins(SPAN_DANGER("Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!"), 1) - H.AIize() - else if(href_list["changehivenumber"]) if(!check_rights(R_DEBUG|R_ADMIN)) return @@ -930,16 +907,6 @@ return - else if(href_list["makerobot"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["makerobot"]) - if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") - return - - usr.client.cmd_admin_robotize(H) - else if(href_list["makeanimal"]) if(!check_rights(R_SPAWN)) return diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index c776a12eb330..535a55ca47b3 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -18,21 +18,6 @@ usr.show_message(t, SHOW_MESSAGE_VISIBLE) -/client/proc/cmd_admin_robotize(mob/M in GLOB.mob_list) - set category = null - set name = "Make Robot" - - if(!SSticker.mode) - alert("Wait until the game starts") - return - if(istype(M, /mob/living/carbon/human)) - log_admin("[key_name(src)] has robotized [M.key].") - spawn(10) - M:Robotize() - - else - alert("Invalid mob") - /client/proc/cmd_admin_animalize(mob/M in GLOB.mob_list) set category = null set name = "Make Simple Animal" diff --git a/code/modules/cm_marines/NonLethalRestraints.dm b/code/modules/cm_marines/NonLethalRestraints.dm index a7f0277c8aaa..59ff4e8dcbe2 100644 --- a/code/modules/cm_marines/NonLethalRestraints.dm +++ b/code/modules/cm_marines/NonLethalRestraints.dm @@ -32,10 +32,6 @@ add_fingerprint(user) /obj/item/weapon/stunprod/attack(mob/M, mob/user) - if(isrobot(M)) - ..() - return - if(user.a_intent == INTENT_HARM) return else if(!status) diff --git a/code/modules/cm_marines/marines_consoles.dm b/code/modules/cm_marines/marines_consoles.dm index 994e9f1ddcb2..a26e3ab508f9 100644 --- a/code/modules/cm_marines/marines_consoles.dm +++ b/code/modules/cm_marines/marines_consoles.dm @@ -798,7 +798,7 @@ GLOBAL_LIST_EMPTY_TYPED(crewmonitor, /datum/crewmonitor) /datum/crewmonitor/ui_data(mob/user) . = list( "sensors" = update_data(), - "link_allowed" = isAI(user), + "link_allowed" = isSilicon(user), ) /datum/crewmonitor/proc/update_data() @@ -868,26 +868,17 @@ GLOBAL_LIST_EMPTY_TYPED(crewmonitor, /datum/crewmonitor) return results +/* + * Unimplemented. Was for AIs tracking but we never had them working. + * /datum/crewmonitor/ui_act(action,params) . = ..() if(.) return switch (action) if ("select_person") - // May work badly cause currently there is no player-controlled AI - var/mob/living/silicon/ai/AI = usr - if(!istype(AI)) - return - var/mob/living/carbon/human/H - for(var/entry in data) - if(entry["name"] == params["name"]) - H = locate(entry["ref"]) - break - if(!H) // Sanity check - to_chat(AI, SPAN_NOTICE("ERROR: unable to track subject with ID '[params["name"]]'")) - else - // We do not care is there camera or no - we just know his location - AI.ai_actual_track(H) + +*/ /datum/crewmonitor/proc/setup_for_faction(set_faction = FACTION_MARINE) switch(set_faction) diff --git a/code/modules/cm_marines/overwatch.dm b/code/modules/cm_marines/overwatch.dm index c5b296772c79..270fee4ab61e 100644 --- a/code/modules/cm_marines/overwatch.dm +++ b/code/modules/cm_marines/overwatch.dm @@ -56,8 +56,7 @@ return FALSE /obj/structure/machinery/computer/overwatch/attack_remote(mob/user as mob) - if(!ismaintdrone(user)) - return attack_hand(user) + return attack_hand(user) /obj/structure/machinery/computer/overwatch/attack_hand(mob/user) if(..()) //Checks for power outages @@ -66,7 +65,7 @@ if(istype(src, /obj/structure/machinery/computer/overwatch/almayer/broken)) return - if(!ishighersilicon(usr) && !skillcheck(user, SKILL_OVERWATCH, SKILL_OVERWATCH_TRAINED) && SSmapping.configs[GROUND_MAP].map_name != MAP_WHISKEY_OUTPOST) + if(!isSilicon(usr) && !skillcheck(user, SKILL_OVERWATCH, SKILL_OVERWATCH_TRAINED) && SSmapping.configs[GROUND_MAP].map_name != MAP_WHISKEY_OUTPOST) to_chat(user, SPAN_WARNING("You don't have the training to use [src].")) return @@ -335,7 +334,7 @@ var/mob/user = usr - if((user.contents.Find(src) || (in_range(src, user) && istype(loc, /turf))) || (ishighersilicon(user))) + if((user.contents.Find(src) || (in_range(src, user) && istype(loc, /turf))) || (isSilicon(user))) user.set_interaction(src) switch(action) @@ -360,7 +359,7 @@ return TRUE if("logout") if(current_squad?.release_overwatch()) - if(ishighersilicon(user)) + if(isSilicon(user)) current_squad.send_squad_message("Attention. [operator.name] has released overwatch system control. Overwatch functions deactivated.", displayed_icon = src) to_chat(user, "[icon2html(src, user)] [SPAN_BOLDNOTICE("Overwatch system control override disengaged.")]") else @@ -370,7 +369,7 @@ visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("Overwatch systems deactivated. Goodbye, [ID ? "[ID.rank] ":""][operator ? "[operator.name]":"sysadmin"].")]") operator = null current_squad = null - if(cam && !ishighersilicon(user)) + if(cam && !isSilicon(user)) user.reset_view(null) user.UnregisterSignal(cam, COMSIG_PARENT_QDELETING) cam = null @@ -516,12 +515,12 @@ user.RegisterSignal(cam, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/mob, reset_observer_view_on_deletion)) if("change_operator") if(operator != user) - if(operator && ishighersilicon(operator)) + if(operator && isSilicon(operator)) visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("AI override in progress. Access denied.")]") return if(!current_squad || current_squad.assume_overwatch(user)) operator = user - if(ishighersilicon(user)) + if(isSilicon(user)) to_chat(user, "[icon2html(src, usr)] [SPAN_BOLDNOTICE("Overwatch system AI override protocol successful.")]") current_squad?.send_squad_message("Attention. [operator.name] has engaged overwatch system control override.", displayed_icon = src) else diff --git a/code/modules/defenses/tesla_coil.dm b/code/modules/defenses/tesla_coil.dm index 8dc8e6498ba1..e466421c8b31 100644 --- a/code/modules/defenses/tesla_coil.dm +++ b/code/modules/defenses/tesla_coil.dm @@ -71,7 +71,7 @@ targets = list() for(var/mob/living/M in oview(tesla_range, src)) - if(M.stat == DEAD || isrobot(M)) + if(M.stat == DEAD) continue if(HAS_TRAIT(M, TRAIT_CHARGING)) to_chat(M, SPAN_WARNING("You ignore some weird noises as you charge.")) diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm index 5fe27c5e5167..91d70769bf29 100644 --- a/code/modules/mob/dead/observer/orbit.dm +++ b/code/modules/mob/dead/observer/orbit.dm @@ -148,9 +148,6 @@ if(isanimal(player)) animals += list(serialized) - else if(isAI(M)) - humans += list(serialized) - data["humans"] = humans data["marines"] = marines data["survivors"] = survivors diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index c66d096c6c68..f3dacaa886df 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -106,54 +106,8 @@ speaker_name = "unknown" comm_paygrade = "" - var/changed_voice - - if(isAI(src) && !hard_to_hear) - var/jobname // the mob's "job" - var/mob/living/carbon/human/impersonating //The crewmember being impersonated, if any. - - if (ishuman(speaker)) - var/mob/living/carbon/human/H = speaker - - if((H.wear_id && istype(H.wear_id,/obj/item/card/id/syndicate)) && (H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice))) - - changed_voice = 1 - var/mob/living/carbon/human/I = locate(speaker_name) - - if(I) - impersonating = I - jobname = impersonating.get_assignment() - comm_paygrade = impersonating.get_paygrade() - else - jobname = "Unknown" - comm_paygrade = "" - else - jobname = H.get_assignment() - comm_paygrade = H.get_paygrade() - - else if (iscarbon(speaker)) // Nonhuman carbon mob - jobname = "No id" - comm_paygrade = "" - else if (isAI(speaker)) - jobname = "AI" - comm_paygrade = "" - else if (isrobot(speaker)) - jobname = "Cyborg" - comm_paygrade = "" - else - jobname = "Unknown" - comm_paygrade = "" - - if(changed_voice) - if(impersonating) - track = "[speaker_name] ([jobname])" - else - track = "[speaker_name] ([jobname])" - else - track = "[speaker_name] ([jobname])" - if(istype(src, /mob/dead/observer)) - if(speaker_name != speaker.real_name && !isAI(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs. + if(speaker_name != speaker.real_name) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs. speaker_name = "[speaker.real_name] ([speaker_name])" track = "[speaker_name] (F)" diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index d71a908d627a..5d18b223abf7 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -254,15 +254,10 @@ //proc to get the item in the active hand. /mob/proc/get_held_item() - if(isSilicon(src)) - if(isrobot(src)) - if(src:module_active) - return src:module_active + if (hand) + return l_hand else - if (hand) - return l_hand - else - return r_hand + return r_hand /mob/living/carbon/human/proc/equip_if_possible(obj/item/W, slot, del_on_fail = 1) // since byond doesn't seem to have pointers, this seems like the best way to do this :/ //warning: icky code diff --git a/code/modules/mob/language/languages.dm b/code/modules/mob/language/languages.dm index 2844b5841781..86a96e3d160c 100644 --- a/code/modules/mob/language/languages.dm +++ b/code/modules/mob/language/languages.dm @@ -196,12 +196,6 @@ continue M.show_message("synthesised voice beeps, \"beep beep beep\"",2) - //robot binary xmitter component power usage - if (isrobot(speaker)) - var/mob/living/silicon/robot/R = speaker - var/datum/robot_component/C = R.components["comms"] - R.cell_use_power(C.active_usage) - /datum/language/event_hivemind name = LANGUAGE_TELEPATH desc = "An event only language that provides a hivemind for its users." diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm index b815fe4e3621..0930d02f3601 100644 --- a/code/modules/mob/living/brain/brain.dm +++ b/code/modules/mob/living/brain/brain.dm @@ -22,17 +22,7 @@ . = ..() /mob/living/brain/say_understands(mob/other)//Goddamn is this hackish, but this say code is so odd - if (isAI(other)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if (istype(other, /mob/living/silicon/decoy)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if (isrobot(other)) + if (isSilicon(other)) if(!(container && istype(container, /obj/item/device/mmi))) return 0 else diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 62fbd1da09fa..124fe47bd5d1 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -546,14 +546,5 @@ return TRUE else return 0 - else if(isrobot(passed_mob)) - var/mob/living/silicon/robot/R = passed_mob - switch(hudtype) - if("security") - return istype(R.module_state_1, /obj/item/robot/sight/hud/sec) || istype(R.module_state_2, /obj/item/robot/sight/hud/sec) || istype(R.module_state_3, /obj/item/robot/sight/hud/sec) - if("medical") - return istype(R.module_state_1, /obj/item/robot/sight/hud/med) || istype(R.module_state_2, /obj/item/robot/sight/hud/med) || istype(R.module_state_3, /obj/item/robot/sight/hud/med) - else - return 0 else return 0 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6170aec3031c..41d1a9a25d7f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -273,8 +273,6 @@ /mob/living/carbon/human/show_inv(mob/living/user) - if(ismaintdrone(user)) - return var/obj/item/clothing/under/suit = null if(istype(w_uniform, /obj/item/clothing/under)) suit = w_uniform @@ -694,10 +692,6 @@ var/mob/living/carbon/human/U = usr new_comment["created_by"]["name"] = U.get_authentification_name() new_comment["created_by"]["rank"] = U.get_assignment() - else if(istype(usr,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/U = usr - new_comment["created_by"]["name"] = U.name - new_comment["created_by"]["rank"] = "[U.modtype] [U.braintype]" if(!islist(R.fields["comments"])) R.fields["comments"] = list("1" = new_comment) else @@ -732,9 +726,6 @@ if(istype(usr,/mob/living/carbon/human)) var/mob/living/carbon/human/U = usr U.handle_regular_hud_updates() - if(istype(usr,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/U = usr - U.handle_regular_hud_updates() if(!modified) to_chat(usr, SPAN_DANGER("Unable to locate a data core entry for this person.")) @@ -818,9 +809,6 @@ if(istype(usr,/mob/living/carbon/human)) var/mob/living/carbon/human/U = usr R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
[t1]") - if(istype(usr,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
[t1]") if(href_list["medholocard"]) if(!skillcheck(usr, SKILL_MEDICAL, SKILL_MEDICAL_MEDIC)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 4e4d65e485ef..4df0987f7a55 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -256,7 +256,7 @@ Contains most of the procs that are called when a mob is attacked by something add_blood(get_blood_color(), BLOOD_BODY) //Melee weapon embedded object code. - if (I.damtype == BRUTE && !I.is_robot_module() && !(I.flags_item & (NODROP|DELONDROP))) + if (I.damtype == BRUTE && !(I.flags_item & (NODROP|DELONDROP))) damage = I.force if(damage > 40) damage = 40 //Some sanity, mostly for yautja weapons. CONSTANT STICKY ICKY if (weapon_sharp && prob(3) && !isyautja(user)) // make yautja less likely to get their weapon stuck @@ -346,16 +346,15 @@ Contains most of the procs that are called when a mob is attacked by something //thrown weapon embedded object code. if (dtype == BRUTE && istype(O,/obj/item)) var/obj/item/I = O - if (!I.is_robot_module()) - var/sharp = is_sharp(I) - //blunt objects should really not be embedding in things unless a huge amount of force is involved - var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3) - var/embed_threshold = sharp? 5*I.w_class : 15*I.w_class - - //Sharp objects will always embed if they do enough damage. - //Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold - if (!isyautja(src) && ((sharp && prob(damage/(10*I.w_class)*100)) || (damage > embed_threshold && prob(embed_chance)))) - affecting.embed(I) + var/sharp = is_sharp(I) + //blunt objects should really not be embedding in things unless a huge amount of force is involved + var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3) + var/embed_threshold = sharp? 5*I.w_class : 15*I.w_class + + //Sharp objects will always embed if they do enough damage. + //Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold + if (!isyautja(src) && ((sharp && prob(damage/(10*I.w_class)*100)) || (damage > embed_threshold && prob(embed_chance)))) + affecting.embed(I) /mob/living/carbon/human/proc/get_id_faction_group() var/obj/item/card/id/C = wear_id diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 6205c4f919a4..446eee3018b5 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -63,9 +63,6 @@ H.updatehealth() return 1 - else if(isAI(src)) - return 0 - /mob/living/proc/adjustBodyTemp(actual, desired, incrementboost) var/temperature = actual var/difference = abs(actual-desired) //get difference diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm deleted file mode 100644 index 6782e3174579..000000000000 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ /dev/null @@ -1,627 +0,0 @@ -#define AI_CHECK_WIRELESS 1 -#define AI_CHECK_RADIO 2 - -GLOBAL_LIST_EMPTY(ai_list) -GLOBAL_LIST_INIT(ai_verbs_default, list( - /mob/living/silicon/ai/proc/ai_alerts, - /mob/living/silicon/ai/proc/ai_announcement, - // /mob/living/silicon/ai/proc/ai_recall_shuttle, - /mob/living/silicon/ai/proc/ai_camera_track, - /mob/living/silicon/ai/proc/ai_camera_list, - /mob/living/silicon/ai/proc/ai_goto_location, - /mob/living/silicon/ai/proc/ai_remove_location, - /mob/living/silicon/ai/proc/ai_roster, - /mob/living/silicon/ai/proc/ai_store_location, - /mob/living/silicon/ai/proc/control_integrated_radio, - /mob/living/silicon/ai/proc/core, - /mob/living/silicon/ai/proc/pick_icon, - /mob/living/silicon/ai/proc/sensor_mode, - /mob/living/silicon/ai/proc/toggle_acceleration -)) - - - //mob/living/silicon/ai/proc/ai_hologram_change, - - //mob/living/silicon/ai/proc/ai_network_change - //mob/living/silicon/ai/proc/ai_statuschange, - //mob/living/silicon/ai/proc/toggle_camera_light - -//Not sure why this is necessary... -/proc/AutoUpdateAI(obj/subject) - var/is_in_use = 0 - if (subject!=null) - for(var/A in GLOB.ai_list) - var/mob/living/silicon/ai/M = A - if ((M.client && M.interactee == subject)) - is_in_use = 1 - subject.attack_remote(M) - return is_in_use - - -/mob/living/silicon/ai - name = "AI" - icon = 'icons/mob/AI.dmi'// - icon_state = "ai" - anchored = TRUE // -- TLE - density = TRUE - status_flags = CANSTUN|CANKNOCKOUT - med_hud = MOB_HUD_MEDICAL_BASIC - sec_hud = MOB_HUD_SECURITY_BASIC - var/list/network = list(CAMERA_NET_ALMAYER) - var/obj/structure/machinery/camera/camera = null - var/list/connected_robots = list() - var/aiRestorePowerRoutine = 0 - //var/list/laws = list() - var/viewalerts = 0 - var/lawcheck[1] - var/ioncheck[1] - var/lawchannel = "Common" // Default channel on which to state laws - var/icon/holo_icon//Default is assigned when AI is created. -// var/obj/item/device/pda/ai/aiPDA = null - var/obj/item/device/multitool/aiMulti = null - var/obj/item/device/radio/headset/ai_integrated/aiRadio = null -//Hud stuff - - //MALFUNCTION - var/datum/AI_Module/module_picker/malf_picker - var/processing_time = 100 - var/list/datum/AI_Module/current_modules = list() - var/fire_res_on_core = 0 - - var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE - var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite - - var/obj/structure/machinery/power/apc/malfhack = null - var/explosive = 0 //does the AI explode when it dies? - - var/mob/living/silicon/ai/parent = null - - var/camera_light_on = 0 //Defines if the AI toggled the light on the camera it's looking through. - var/datum/trackable/track = null - var/last_announcement = "" - var/datum/announcement/priority/announcement - -/mob/living/silicon/ai/proc/add_ai_verbs() - add_verb(src, GLOB.ai_verbs_default) - -/mob/living/silicon/ai/proc/remove_ai_verbs() - remove_verb(src, GLOB.ai_verbs_default) - -/mob/living/silicon/ai/New(loc, obj/item/device/mmi/B, safety = 0) - var/list/possibleNames = GLOB.ai_names - - var/pickedName = null - while(!pickedName) - pickedName = pick(GLOB.ai_names) - for (var/mob/living/silicon/ai/A in GLOB.mob_list) - if (A.real_name == pickedName && possibleNames.len > 1) //fixing the theoretically possible infinite loop - possibleNames -= pickedName - pickedName = null - -// aiPDA = new/obj/item/device/pda/ai(src) - SetName(pickedName) - anchored = TRUE - ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_INHERENT) - set_density(TRUE) - forceMove(loc) - - holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1")) - - aiMulti = new(src) - aiRadio = new(src) - aiRadio.myAi = src - aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src) - - if (istype(loc, /turf)) - add_ai_verbs(src) - - //Languages - add_language(LANGUAGE_ENGLISH, 1) - add_language(LANGUAGE_RUSSIAN, 1) - add_language(LANGUAGE_XENOMORPH, 0) - - - if(!safety)//Only used by AIize() to successfully spawn an AI. - if (!B)//If there is no player/brain inside. - new/obj/structure/AIcore/deactivated(loc)//New empty terminal. - qdel(src)//Delete AI. - return - else - if (B.brainmob.mind) - B.brainmob.mind.transfer_to(src) - - 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() - to_chat(src, "These laws may be changed by other players, or by you being the traitor.") - - job = "AI" - - spawn(5) - new /obj/structure/machinery/ai_powersupply(src) - - GLOB.ai_list += src - ..() - return - -/mob/living/silicon/ai/Destroy() - GLOB.ai_list -= src - QDEL_NULL(aiMulti) - if(aiRadio) - aiRadio.myAi = null - QDEL_NULL(aiRadio) - QDEL_NULL(aiCamera) - . = ..() - -/mob/living/silicon/ai/proc/SetName(pickedName as text) - change_real_name(src, pickedName) - - if(eyeobj) - eyeobj.name = "[pickedName] (AI Eye)" - - // Set ai pda name - /* - if(aiPDA) - aiPDA.ownjob = "AI" - aiPDA.owner = pickedName - aiPDA.name = pickedName + " (" + aiPDA.ownjob + ")" - Fuck PDAs */ - -/* - The AI Power supply is a dummy object used for powering the AI since only machinery should be using power. - The alternative was to rewrite a bunch of AI code instead here we are. -*/ -/obj/structure/machinery/ai_powersupply - name="Power Supply" - active_power_usage=1000 - use_power = USE_POWER_ACTIVE - power_channel = POWER_CHANNEL_EQUIP - var/mob/living/silicon/ai/powered_ai = null - invisibility = 100 - -/obj/structure/machinery/ai_powersupply/New(mob/living/silicon/ai/ai) - powered_ai = ai - if(isnull(powered_ai)) - qdel(src) - return - forceMove(powered_ai.loc) - use_power(1) // Just incase we need to wake up the power system. - //start_processing() - //..() - -/obj/structure/machinery/ai_powersupply/process() - if(!powered_ai || powered_ai.stat & DEAD) - qdel(src) - return - if(!powered_ai.anchored) - forceMove(powered_ai.loc) - update_use_power(USE_POWER_NONE) - if(powered_ai.anchored) - update_use_power(USE_POWER_ACTIVE) - -/mob/living/silicon/ai/proc/pick_icon() - set category = "AI Commands" - set name = "Set AI Core Display" - if(stat || aiRestorePowerRoutine) - return - - //if(icon_state == initial(icon_state)) - var/icontype = tgui_input_list(usr, "Select an icon!", "AI", list("Monochrome", "Rainbow", "Blue", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static", "Soviet", "Trapped", "Heartline", "Chatterbox")) - switch(icontype) - if("Rainbow") icon_state = "ai-clown" - if("Monochrome") icon_state = "ai-mono" - if("Inverted") icon_state = "ai-u" - if("Firewall") icon_state = "ai-magma" - if("Green") icon_state = "ai-wierd" - if("Red") icon_state = "ai-red" - if("Static") icon_state = "ai-static" - if("Text") icon_state = "ai-text" - if("Smiley") icon_state = "ai-smiley" - if("Matrix") icon_state = "ai-matrix" - if("Angry") icon_state = "ai-angryface" - if("Dorf") icon_state = "ai-dorf" - if("Bliss") icon_state = "ai-bliss" - if("Triumvirate") icon_state = "ai-triumvirate" - if("Triumvirate Static") icon_state = "ai-triumvirate-malf" - if("Soviet") icon_state = "ai-redoctober" - if("Trapped") icon_state = "ai-hades" - if("Heartline") icon_state = "ai-heartline" - if("Chatterbox") icon_state = "ai-president" - else icon_state = "ai" - -/mob/living/silicon/ai/proc/ai_alerts() - set category = "AI Commands" - set name = "Show Alerts" - - var/dat = "Current Station Alerts\n" - dat += "Close

" - for (var/cat in alarms) - dat += text("[]
\n", cat) - var/list/alarmlist = alarms[cat] - if (alarmlist.len) - for (var/area_name in alarmlist) - var/datum/alarm/alarm = alarmlist[area_name] - dat += "" - - var/cameratext = "" - if (alarm.cameras) - for (var/obj/structure/machinery/camera/I in alarm.cameras) - cameratext += text("[][]", (cameratext=="") ? "" : "|", src, I, I.c_tag) - dat += text("-- [] ([])", alarm.area.name, (cameratext)? cameratext : "No Camera") - - if (alarm.sources.len > 1) - dat += text(" - [] sources", alarm.sources.len) - dat += "
\n" - else - dat += "-- All Systems Nominal
\n" - dat += "
\n" - - viewalerts = 1 - src << browse(dat, "window=aialerts&can_close=0") - -// this verb lets the ai see the stations manifest -/mob/living/silicon/ai/proc/ai_roster() - set category = "AI Commands" - set name = "Show Crew Manifest" - show_station_manifest() - -/mob/living/silicon/ai/var/message_cooldown = 0 -/mob/living/silicon/ai/proc/ai_announcement() - set category = "AI Commands" - set name = "Make Station Announcement" - - if(check_unable(AI_CHECK_WIRELESS|AI_CHECK_RADIO)) - return - - if(message_cooldown) - to_chat(src, "Please allow one minute to pass between announcements.") - return - var/input = stripped_multiline_input(usr, "Please write a message to announce to the station crew.", "A.I. Announcement") - if(!input) - return - - if(check_unable(AI_CHECK_WIRELESS|AI_CHECK_RADIO)) - return - - ai_announcement(input) - message_cooldown = 1 - spawn(1 MINUTES)//One minute cooldown - message_cooldown = 0 - -/mob/living/silicon/ai/check_eye(mob/user) - if (!camera) - user.reset_view(null) - return - user.reset_view(camera) - -/mob/living/silicon/ai/is_mob_restrained() - return 0 - -/mob/living/silicon/ai/emp_act(severity) - . = ..() - if (prob(30)) view_core() - -/mob/living/silicon/ai/Topic(href, href_list) - if(usr != src) - return - ..() - if (href_list["mach_close"]) - if (href_list["mach_close"] == "aialerts") - viewalerts = 0 - var/t1 = text("window=[]", href_list["mach_close"]) - unset_interaction() - src << browse(null, t1) - if (href_list["switchcamera"]) - switchCamera(locate(href_list["switchcamera"])) in GLOB.cameranet.cameras - if (href_list["showalerts"]) - ai_alerts() - //Carn: holopad requests - if (href_list["jumptoholopad"]) - var/obj/structure/machinery/hologram/holopad/H = locate(href_list["jumptoholopad"]) - if(stat == CONSCIOUS) - if(H) - H.attack_remote(src) //may as well recycle - else - to_chat(src, SPAN_NOTICE("Unable to locate the holopad.")) - - if (href_list["track"]) - var/mob/target = locate(href_list["track"]) in GLOB.mob_list - - if(target && (!istype(target, /mob/living/carbon/human) || html_decode(href_list["trackname"]) == target:get_face_name())) - ai_actual_track(target) - else - to_chat(src, "System error. Cannot locate.") - return - - return - -/mob/living/silicon/ai/attack_animal(mob/living/M as mob) - if(M.melee_damage_upper == 0) - M.emote("[M.friendly] [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 25, 1) - for(var/mob/O in viewers(src, null)) - O.show_message(SPAN_DANGER("[M] [M.attacktext] [src]!"), SHOW_MESSAGE_VISIBLE) - last_damage_data = create_cause_data(initial(M.name), M) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - apply_damage(damage, BRUTE) - updatehealth() - -/mob/living/silicon/ai/reset_view(atom/A) - if(camera) - camera.set_light(0) - if(istype(A,/obj/structure/machinery/camera)) - camera = A - ..() - if(istype(A,/obj/structure/machinery/camera)) - if(camera_light_on) A.set_light(AI_CAMERA_LUMINOSITY) - else A.set_light(0) - - -/mob/living/silicon/ai/proc/switchCamera(obj/structure/machinery/camera/C) - if (!C || stat == DEAD) //C.can_use()) - return 0 - - if(!src.eyeobj) - view_core() - return - // ok, we're alive, camera is good and in our network... - eyeobj.setLoc(get_turf(C)) - //machine = src - - return 1 - -/mob/living/silicon/ai/triggerAlarm(class, area/A, list/cameralist, source) - if (stat == 2) - return 1 - - ..() - - var/cameratext = "" - for (var/obj/structure/machinery/camera/C in cameralist) - cameratext += "[(cameratext == "")? "" : "|"][C.c_tag]" - - queueAlarm("--- [class] alarm detected in [A.name]! ([(cameratext)? cameratext : "No Camera"])", class) - - if (viewalerts) ai_alerts() - -/mob/living/silicon/ai/cancelAlarm(class, area/A as area, source) - var/has_alarm = ..() - - if (!has_alarm) - queueAlarm(text("--- [] alarm in [] has been cleared.", class, A.name), class, 0) - if (viewalerts) ai_alerts() - - return has_alarm - -/mob/living/silicon/ai/cancel_camera() - set category = "AI Commands" - set name = "Cancel Camera View" - - //src.cameraFollow = null - src.view_core() - - -//Replaces /mob/living/silicon/ai/verb/change_network() in ai.dm & camera.dm -//Adds in /mob/living/silicon/ai/proc/ai_network_change() instead -//Addition by Mord_Sith to define AI's network change ability -/mob/living/silicon/ai/proc/ai_network_change() - set category = "AI Commands" - set name = "Jump To Network" - unset_interaction() - var/cameralist[0] - - if(check_unable()) - return - - var/mob/living/silicon/ai/U = usr - - for (var/obj/structure/machinery/camera/C in GLOB.cameranet.cameras) - if(!C.can_use()) - continue - - var/list/tempnetwork = difflist(C.network,GLOB.RESTRICTED_CAMERA_NETWORKS,1) - if(tempnetwork.len) - for(var/i in tempnetwork) - cameralist[i] = i - var/old_network = network - network = tgui_input_list(U, "Which network would you like to view?", "View network", cameralist) - - if(!U.eyeobj) - U.view_core() - return - - if(isnull(network)) - network = old_network // If nothing is selected - else - for(var/obj/structure/machinery/camera/C in GLOB.cameranet.cameras) - if(!C.can_use()) - continue - if(network in C.network) - U.eyeobj.setLoc(get_turf(C)) - break - to_chat(src, SPAN_NOTICE(" Switched to [network] camera network.")) -//End of code by Mord_Sith - -/mob/living/silicon/ai/proc/ai_statuschange() - set category = "AI Commands" - set name = "AI Status" - - if(check_unable(AI_CHECK_WIRELESS)) - return - - var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Surprised", "Sad", "Upset", "Angry", "Awesome", "BSOD", "Blank", "Problems?", "Facepalm", "Friend Computer") - var/emote = tgui_input_list(usr, "Please, select a status!", "AI Status", ai_emotions) - for (var/obj/structure/machinery/M in GLOB.machines) //change status - if(istype(M, /obj/structure/machinery/ai_status_display)) - var/obj/structure/machinery/ai_status_display/AISD = M - AISD.emotion = emote - //if Friend Computer, change ALL displays - else if(istype(M, /obj/structure/machinery/status_display)) - - var/obj/structure/machinery/status_display/SD = M - if(emote=="Friend Computer") - SD.friendc = 1 - else - SD.friendc = 0 - return - -//I am the icon meister. Bow fefore me. //>fefore -/mob/living/silicon/ai/proc/ai_hologram_change() - set name = "Change Hologram" - set desc = "Change the default hologram available to AI to something else." - set category = "AI Commands" - - if(check_unable()) - return - - var/input - if(alert("Would you like to select a hologram based on a crew member or switch to unique avatar?",,"Crew Member","Unique")=="Crew Member") - - var/personnel_list[] = list() - - for(var/datum/data/record/t in GLOB.data_core.locked)//Look in data core locked. - personnel_list["[t.fields["name"]]: [t.fields["rank"]]"] = t.fields["image"]//Pull names, rank, and image. - - if(personnel_list.len) - input = tgui_input_list(usr, "Select a crew member:", "Change hologram", personnel_list) - var/icon/character_icon = personnel_list[input] - if(character_icon) - qdel(holo_icon)//Clear old icon so we're not storing it in memory. - holo_icon = getHologramIcon(icon(character_icon)) - else - alert("No suitable records found. Aborting.") - - else - var/icon_list[] = list( - "default", - "floating face", - "carp" - ) - input = tgui_input_list(usr, "Please select a hologram:", "Select hologram", icon_list) - if(input) - QDEL_NULL(holo_icon) - switch(input) - if("default") - holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1")) - if("floating face") - holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo2")) - if("carp") - holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo4")) - return - -/*/mob/living/silicon/ai/proc/corereturn() - set category = "Malfunction" - set name = "Return to Main Core" - - var/obj/structure/machinery/power/apc/apc = src.loc - if(!istype(apc)) - to_chat(src, SPAN_NOTICE(" You are already in your Main Core.")) - return - apc.malfvacate()*/ - -//Toggles the luminosity and applies it by re-entereing the camera. -/mob/living/silicon/ai/proc/toggle_camera_light() - set name = "Toggle Camera Light" - set desc = "Toggles the light on the camera the AI is looking through." - set category = "AI Commands" - - if(check_unable()) - return - - camera_light_on = !camera_light_on - to_chat(src, "Camera lights [camera_light_on ? "activated" : "deactivated"].") - if(!camera_light_on) - if(camera) - camera.set_light(0) - camera = null - else - lightNearbyCamera() - - - -// Handled camera lighting, when toggled. -// It will get the nearest camera from the eyeobj, lighting it. - -/mob/living/silicon/ai/proc/lightNearbyCamera() - if(camera_light_on && camera_light_on < world.timeofday) - if(src.camera) - var/obj/structure/machinery/camera/camera = near_range_camera(src.eyeobj) - if(camera && src.camera != camera) - src.camera.set_light(0) - if(!camera.light_disabled) - src.camera = camera - src.camera.set_light(AI_CAMERA_LUMINOSITY) - else - src.camera = null - else if(isnull(camera)) - src.camera.set_light(0) - src.camera = null - else - var/obj/structure/machinery/camera/camera = near_range_camera(src.eyeobj) - if(camera && !camera.light_disabled) - src.camera = camera - src.camera.set_light(AI_CAMERA_LUMINOSITY) - camera_light_on = world.timeofday + 1 * 20 // Update the light every 2 seconds. - - -/mob/living/silicon/ai/attackby(obj/item/W as obj, mob/user as mob) - if(HAS_TRAIT(W, TRAIT_TOOL_WRENCH)) - if(anchored) - user.visible_message(SPAN_NOTICE("\The [user] starts to unbolt \the [src] from the plating...")) - if(!do_after(user, 40, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) - user.visible_message(SPAN_NOTICE("\The [user] decides not to unbolt \the [src].")) - return - user.visible_message(SPAN_NOTICE("\The [user] finishes unfastening \the [src]!")) - anchored = FALSE - return - else - user.visible_message(SPAN_NOTICE("\The [user] starts to bolt \the [src] to the plating...")) - if(!do_after(user, 40, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) - user.visible_message(SPAN_NOTICE("\The [user] decides not to bolt \the [src].")) - return - user.visible_message(SPAN_NOTICE("\The [user] finishes fastening down \the [src]!")) - anchored = TRUE - return - else - return ..() - -/mob/living/silicon/ai/proc/control_integrated_radio() - set name = "Radio Settings" - set desc = "Allows you to change settings of your radio." - set category = "AI Commands" - - if(check_unable(AI_CHECK_RADIO)) - return - - to_chat(src, "Accessing Subspace Transceiver control...") - if (src.aiRadio) - src.aiRadio.interact(src) - -/mob/living/silicon/ai/proc/sensor_mode() - set name = "Set Sensor Augmentation" - set category = "AI Commands" - set desc = "Augment visual feed with internal sensor overlays" - toggle_sensor_mode() - -/mob/living/silicon/ai/proc/check_unable(flags = 0) - if(stat == DEAD) - to_chat(usr, SPAN_DANGER("You are dead!")) - return 1 - - if((flags & AI_CHECK_WIRELESS) && src.control_disabled) - to_chat(usr, SPAN_DANGER("Wireless control is disabled!")) - return 1 - if((flags & AI_CHECK_RADIO) && src.aiRadio.disabledAi) - to_chat(src, SPAN_DANGER("System Error - Transceiver Disabled!")) - return 1 - return 0 - -#undef AI_CHECK_WIRELESS -#undef AI_CHECK_RADIO diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm deleted file mode 100644 index 1555fc9c2b7b..000000000000 --- a/code/modules/mob/living/silicon/ai/death.dm +++ /dev/null @@ -1,22 +0,0 @@ -/mob/living/silicon/ai/death(cause, gibbed) - - if(stat == DEAD) - return - - icon_state = "ai-crash" - - if(src.eyeobj) - src.eyeobj.setLoc(get_turf(src)) - - remove_ai_verbs(src) - - if(explosive) - addtimer(CALLBACK(src, PROC_REF(explosion), src.loc, 3, 6, 12, 15), 10) - - for(var/obj/structure/machinery/ai_status_display/O in GLOB.machines) - spawn( 0 ) - O.mode = 2 - if (istype(loc, /obj/item/device/aicard)) - loc.icon_state = "aicard-404" - - return ..(cause, gibbed,"gives one shrill beep before falling lifeless.") diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm deleted file mode 100644 index 1fb41e022960..000000000000 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ /dev/null @@ -1,26 +0,0 @@ -/mob/living/silicon/ai/get_examine_text(mob/user) - if( (user.sdisabilities & DISABILITY_BLIND || user.blinded || user.stat) && !istype(user,/mob/dead/observer) ) - return list(SPAN_NOTICE("Something is there but you can't see it.")) - - var/msg = "*---------*\nThis is [icon2html(src)] [src]!\n" - if (src.stat == DEAD) - msg += "It appears to be powered-down.\n" - else - msg += "" - if (src.getBruteLoss()) - if (src.getBruteLoss() < 30) - msg += "It looks slightly dented.\n" - else - msg += "It looks severely dented!\n" - if (src.getFireLoss()) - if (src.getFireLoss() < 30) - msg += "It looks slightly charred.\n" - else - msg += "Its casing is melted and heat-warped!\n" - - if (src.stat == UNCONSCIOUS) - msg += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".\n" - msg += "" - msg += "*---------*" - - . += msg diff --git a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm deleted file mode 100644 index 808ad653b73c..000000000000 --- a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm +++ /dev/null @@ -1,148 +0,0 @@ -// CAMERA NET -// -// The datum containing all the chunks. - -GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new()) - -/datum/cameranet - // The cameras on the map, no matter if they work or not. Updated in obj/structure/machinery/camera/New() and Dispose(). - var/list/cameras = list() - // The chunks of the map, mapping the areas that the cameras can see. - var/list/chunks = list() - var/ready = 0 - -// Checks if a chunk has been Generated in x, y, z. -/datum/cameranet/proc/chunkGenerated(x, y, z) - x &= ~0xf - y &= ~0xf - var/key = "[x],[y],[z]" - return (chunks[key]) - -// Returns the chunk in the x, y, z. -// If there is no chunk, it creates a new chunk and returns that. -/datum/cameranet/proc/getCameraChunk(x, y, z) - x &= ~0xf - y &= ~0xf - var/key = "[x],[y],[z]" - if(!chunks[key]) - chunks[key] = new /datum/camerachunk(null, x, y, z) - - return chunks[key] - -// Updates what the aiEye can see. It is recommended you use this when the aiEye moves or it's location is set. - -/datum/cameranet/proc/visibility(mob/aiEye/ai) - // 0xf = 15 - var/x1 = max(0, ai.x - 16) & ~0xf - var/y1 = max(0, ai.y - 16) & ~0xf - var/x2 = min(world.maxx, ai.x + 16) & ~0xf - var/y2 = min(world.maxy, ai.y + 16) & ~0xf - - var/list/visibleChunks = list() - - for(var/x = x1; x <= x2; x += 16) - for(var/y = y1; y <= y2; y += 16) - visibleChunks += getCameraChunk(x, y, ai.z) - - var/list/remove = ai.visibleCameraChunks - visibleChunks - var/list/add = visibleChunks - ai.visibleCameraChunks - - for(var/chunk in remove) - var/datum/camerachunk/c = chunk - c.remove(ai) - - for(var/chunk in add) - var/datum/camerachunk/c = chunk - c.add(ai) - -// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open. - -/datum/cameranet/proc/updateVisibility(atom/A, opacity_check = 1) - - if(opacity_check && !A.opacity) - return - majorChunkChange(A, 2) - -/datum/cameranet/proc/updateChunk(x, y, z) - // 0xf = 15 - if(!chunkGenerated(x, y, z)) - return - var/datum/camerachunk/chunk = getCameraChunk(x, y, z) - chunk.hasChanged() - -// Removes a camera from a chunk. - -/datum/cameranet/proc/removeCamera(obj/structure/machinery/camera/c) - if(c.can_use()) - majorChunkChange(c, 0) - -// Add a camera to a chunk. - -/datum/cameranet/proc/addCamera(obj/structure/machinery/camera/c) - if(c.can_use()) - majorChunkChange(c, 1) - -// Used for Cyborg cameras. Since portable cameras can be in ANY chunk. - -/datum/cameranet/proc/updatePortableCamera(obj/structure/machinery/camera/c) - if(c.can_use()) - majorChunkChange(c, 1) - //else - // majorChunkChange(c, 0) - -// Never access this proc directly!!!! -// This will update the chunk and all the surrounding chunks. -// It will also add the atom to the cameras list if you set the choice to 1. -// Setting the choice to 0 will remove the camera from the chunks. -// If you want to update the chunks around an object, without adding/removing a camera, use choice 2. - -/datum/cameranet/proc/majorChunkChange(atom/c, choice) - // 0xf = 15 - if(!c) - return - - var/turf/T = get_turf(c) - if(T) - var/x1 = max(0, T.x - 8) & ~0xf - var/y1 = max(0, T.y - 8) & ~0xf - var/x2 = min(world.maxx, T.x + 8) & ~0xf - var/y2 = min(world.maxy, T.y + 8) & ~0xf - - for(var/x = x1; x <= x2; x += 16) - for(var/y = y1; y <= y2; y += 16) - if(chunkGenerated(x, y, T.z)) - var/datum/camerachunk/chunk = getCameraChunk(x, y, T.z) - if(choice == 0) - // Remove the camera. - chunk.cameras -= c - else if(choice == 1) - // You can't have the same camera in the list twice. - chunk.cameras |= c - chunk.hasChanged() - -// Will check if a mob is on a viewable turf. Returns 1 if it is, otherwise returns 0. - -/datum/cameranet/proc/checkCameraVis(mob/living/target as mob) - - // 0xf = 15 - var/turf/position = get_turf(target) - return checkTurfVis(position) - -/datum/cameranet/proc/checkTurfVis(turf/position) - var/datum/camerachunk/chunk = getCameraChunk(position.x, position.y, position.z) - if(chunk) - if(chunk.changed) - chunk.hasChanged(1) // Update now, no matter if it's visible or not. - if(chunk.visibleTurfs[position]) - return 1 - return 0 - -// Debug verb for VVing the chunk that the turf is in. -/* -/turf/verb/view_chunk() - set src in world - - if(GLOB.cameranet.chunkGenerated(x, y, z)) - var/datum/camerachunk/chunk = GLOB.cameranet.getCameraChunk(x, y, z) - usr.client.debug_variables(chunk) -*/ diff --git a/code/modules/mob/living/silicon/ai/freelook/chunk.dm b/code/modules/mob/living/silicon/ai/freelook/chunk.dm deleted file mode 100644 index 2113e70aa22f..000000000000 --- a/code/modules/mob/living/silicon/ai/freelook/chunk.dm +++ /dev/null @@ -1,168 +0,0 @@ -#define UPDATE_BUFFER 25 // 2.5 seconds - -// CAMERA CHUNK -// -// A 16x16 grid of the map with a list of turfs that can be seen, are visible and are dimmed. -// Allows the AI Eye to stream these chunks and know what it can and cannot see. - -/datum/camerachunk - var/list/obscuredTurfs = list() - var/list/visibleTurfs = list() - var/list/obscured = list() - var/list/cameras = list() - var/list/turfs = list() - var/list/seenby = list() - var/visible = 0 - var/changed = 0 - var/updating = 0 - var/x = 0 - var/y = 0 - var/z = 0 - -// Add an AI eye to the chunk, then update if changed. - -/datum/camerachunk/proc/add(mob/aiEye/ai) - if(!ai.ai) - return - ai.visibleCameraChunks += src - if(ai.ai.client) - ai.ai.client.images += obscured - visible++ - seenby += ai - if(changed && !updating) - update() - -// Remove an AI eye from the chunk, then update if changed. - -/datum/camerachunk/proc/remove(mob/aiEye/ai) - if(!ai.ai) - return - ai.visibleCameraChunks -= src - if(ai.ai.client) - ai.ai.client.images -= obscured - seenby -= ai - if(visible > 0) - visible-- - -// Called when a chunk has changed. I.E: A wall was deleted. - -/datum/camerachunk/proc/visibilityChanged(turf/loc) - if(!visibleTurfs[loc]) - return - hasChanged() - -// Updates the chunk, makes sure that it doesn't update too much. If the chunk isn't being watched it will -// instead be flagged to update the next time an AI Eye moves near it. - -/datum/camerachunk/proc/hasChanged(update_now = 0) - if(visible || update_now) - if(!updating) - updating = 1 - spawn(UPDATE_BUFFER) // Batch large changes, such as many doors opening or closing at once - update() - updating = 0 - else - changed = 1 - -// The actual updating. It gathers the visible turfs from cameras and puts them into the appropiate lists. - -/datum/camerachunk/proc/update() - - set background = 1 - - var/list/newVisibleTurfs = list() - - for(var/camera in cameras) - var/obj/structure/machinery/camera/c = camera - - if(!c) - continue - - if(!c.can_use()) - continue - - var/turf/point = locate(src.x + 8, src.y + 8, src.z) - if(get_dist(point, c) > 24) - continue - - for(var/turf/t in c.can_see()) - newVisibleTurfs[t] = t - - // Removes turf that isn't in turfs. - newVisibleTurfs &= turfs - - var/list/visAdded = newVisibleTurfs - visibleTurfs - var/list/visRemoved = visibleTurfs - newVisibleTurfs - - visibleTurfs = newVisibleTurfs - obscuredTurfs = turfs - newVisibleTurfs - - for(var/turf in visAdded) - var/turf/t = turf - if(t.obscured) - obscured -= t.obscured - for(var/eye in seenby) - var/mob/aiEye/m = eye - if(!m || !m.ai) - continue - if(m.ai.client) - m.ai.client.images -= t.obscured - - for(var/turf in visRemoved) - var/turf/t = turf - if(obscuredTurfs[t]) - if(!t.obscured) - t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) - - obscured += t.obscured - for(var/eye in seenby) - var/mob/aiEye/m = eye - if(!m || !m.ai) - seenby -= m - continue - if(m.ai.client) - m.ai.client.images += t.obscured - -// Create a new camera chunk, since the chunks are made as they are needed. - -/datum/camerachunk/New(loc, x, y, z) - - // 0xf = 15 - x &= ~0xf - y &= ~0xf - - src.x = x - src.y = y - src.z = z - - for(var/obj/structure/machinery/camera/c in range(16, locate(x + 8, y + 8, z))) - if(c.can_use()) - cameras += c - - for(var/turf/t in range(10, locate(x + 8, y + 8, z))) - if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16) - turfs[t] = t - - for(var/camera in cameras) - var/obj/structure/machinery/camera/c = camera - if(!c) - continue - - if(!c.can_use()) - continue - - for(var/turf/t in c.can_see()) - visibleTurfs[t] = t - - // Removes turf that isn't in turfs. - visibleTurfs &= turfs - - obscuredTurfs = turfs - visibleTurfs - - for(var/turf in obscuredTurfs) - var/turf/t = turf - if(!t.obscured) - t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) - obscured += t.obscured - -#undef UPDATE_BUFFER diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm deleted file mode 100644 index 22e2bf05aa2c..000000000000 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ /dev/null @@ -1,139 +0,0 @@ -// AI EYE -// -// An invisible (no icon) mob that the AI controls to look around the station with. -// It streams chunks as it moves around, which will show it what the AI can and cannot see. - -/mob/aiEye - name = "Inactive AI Eye" - icon = 'icons/obj/structures/machinery/status_display.dmi' // For AI friend secret shh :o - var/list/visibleCameraChunks = list() - var/mob/living/silicon/ai/ai = null - density = FALSE - status_flags = GODMODE // You can't damage it. - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - see_in_dark = 7 - -// Movement code. Returns 0 to stop air movement from moving it. -/mob/aiEye/Move() - return 0 - -// Use this when setting the aiEye's location. -// It will also stream the chunk that the new loc is in. -/mob/aiEye/proc/setLoc(T, cancel_tracking = 1) - - if(ai) - if(!isturf(ai.loc)) - return - - if(cancel_tracking) - ai.ai_cancel_tracking() - - T = get_turf(T) - forceMove(T) - GLOB.cameranet.visibility(src) - if(ai.client) - ai.client.eye = src - //Holopad - if(ai.holo) - ai.holo.move_hologram() - -/mob/aiEye/proc/getLoc() - - if(ai) - if(!isturf(ai.loc) || !ai.client) - return - if(ai.eyeobj) - return ai.eyeobj.loc - -// AI MOVEMENT - -// The AI's "eye". Described on the top of the page. - -/mob/living/silicon/ai - var/mob/aiEye/eyeobj = new() - var/sprint = 10 - var/cooldown = 0 - var/acceleration = 1 - var/obj/structure/machinery/hologram/holopad/holo = null - -// Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us. -/mob/living/silicon/ai/Initialize() - . = ..() - if(eyeobj) - eyeobj.ai = src - eyeobj.name = "[src.name] (AI Eye)" // Give it a name - spawn(5) - if(eyeobj) - eyeobj.forceMove(src.loc) - -/mob/living/silicon/ai/Destroy() - if(eyeobj) - eyeobj.ai = null - QDEL_NULL(eyeobj) - . = ..() - -/atom/proc/move_camera_by_click() - if(isRemoteControlling(usr)) - var/mob/living/silicon/ai/AI = usr - if(AI.eyeobj && AI.client.eye == AI.eyeobj) - AI.eyeobj.setLoc(src) - -// This will move the AIEye. It will also cause lights near the eye to light up, if toggled. -// This is handled in the proc below this one. - -/mob/living/silicon/ai/Move(n, direct) - - var/initial = initial(sprint) - var/max_sprint = 50 - - if(cooldown && cooldown < world.timeofday) // 3 seconds - sprint = initial - - if(eyeobj) - for(var/i = 0; i < max(sprint, initial); i += 20) - var/turf/step = get_turf(get_step(eyeobj, direct)) - if(step) - eyeobj.setLoc(step) - - cooldown = world.timeofday + 5 - if(acceleration) - sprint = min(sprint + 0.5, max_sprint) - else - sprint = initial - - //user.unset_interaction() //Uncomment this if it causes problems. - //user.lightNearbyCamera() - - -// Return to the Core. - -/mob/living/silicon/ai/proc/core() - set category = "AI Commands" - set name = "AI Core" - - view_core() - - -/mob/living/silicon/ai/proc/view_core() - camera = null - unset_interaction() - - if(!src.eyeobj) - to_chat(src, "ERROR: Eyeobj not found. Creating new eye...") - src.eyeobj = new(src.loc) - src.eyeobj.ai = src - src.SetName(src.name) - - if(client && client.eye) - client.eye = src - for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks) - c.remove(eyeobj) - if(eyeobj) - src.eyeobj.setLoc(src) - -/mob/living/silicon/ai/proc/toggle_acceleration() - set category = "AI Commands" - set name = "Toggle Camera Acceleration" - - acceleration = !acceleration - to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].") diff --git a/code/modules/mob/living/silicon/ai/freelook/read_me.dm b/code/modules/mob/living/silicon/ai/freelook/read_me.dm deleted file mode 100644 index 4d255772981e..000000000000 --- a/code/modules/mob/living/silicon/ai/freelook/read_me.dm +++ /dev/null @@ -1,51 +0,0 @@ -// CREDITS -/* -Initial code credit for this goes to Uristqwerty. -Debugging, functionality, all comments and porting by Giacom. - -Everything about freelook (or what we can put in here) will be stored here. - - -WHAT IS THIS? - -This is a replacement for the current camera movement system, of the AI. Before this, the AI had to move between cameras and could -only see what the cameras could see. Not only this but the cameras could see through walls, which created problems. -With this, the AI controls an "AI Eye" mob, which moves just like a ghost; such as moving through walls and being invisible to players. -The AI's eye is set to this mob and then we use a system (explained below) to determine what the cameras around the AI Eye can and -cannot see. If the camera cannot see a turf, it will black it out, otherwise it won't and the AI will be able to see it. -This creates several features, such as... no more see-through-wall cameras, easier to control camera movement, easier tracking, -the AI only being able to track mobs which are visible to a camera, only trackable mobs appearing on the mob list and many more. - - -HOW IT WORKS - -It works by first creating a camera network datum. Inside of this camera network are "chunks" (which will be -explained later) and "cameras". The cameras list is kept up to date by obj/structure/machinery/camera/New() and Dispose(). - -Next the camera network has chunks. These chunks are a 16x16 tile block of turfs and cameras contained inside the chunk. -These turfs are then sorted out based on what the cameras can and cannot see. If none of the cameras can see the turf, inside -the 16x16 block, it is listed as an "obscured" turf. Meaning the AI won't be able to see it. - - -HOW IT UPDATES - -The camera network uses a streaming method in order to effeciently update chunks. Since the server will have doors opening, doors closing, -turf being destroyed and other lag inducing stuff, we want to update it under certain conditions and not every tick. - -The chunks are not created straight away, only when an AI eye moves into it's area is when it gets created. -One a chunk is created, when a non glass door opens/closes or an opacity turf is destroyed, we check to see if an AI Eye is looking in the area. -We do this with the "seenby" list, which updates everytime an AI is near a chunk. If there is an AI eye inside the area, we update the chunk -that the changed atom is inside and all surrounding chunks, since a camera's vision could leak onto another chunk. If there is no AI Eye, we instead -flag the chunk to update whenever it is loaded by an AI Eye. This is basically how the chunks update and keep it in sync. We then add some lag reducing -measures, such as an UPDATE_BUFFER which stops a chunk from updating too many times in a certain time-frame, only updating if the changed atom was blocking -sight; for example, we don't update glass airlocks or floors. - - -WHERE IS EVERYTHING? - -cameranet.dm = Everything about the cameranet datum. -chunk.dm = Everything about the chunk datum. -eye.dm = Everything about the AI and the AIEye. -updating.dm = Everything about triggers that will update chunks. - -*/ diff --git a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm b/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm deleted file mode 100644 index 7ecaab1c3e79..000000000000 --- a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm +++ /dev/null @@ -1,117 +0,0 @@ -#define BORG_CAMERA_BUFFER 5 - -//UPDATE TRIGGERS, when the chunk (and the surrounding chunks) should update. - -// TURFS - -/turf - var/image/obscured - -/turf/proc/visibilityChanged() - if(z && SSatoms.initialized != INITIALIZATION_INSSATOMS) - GLOB.cameranet.updateVisibility(src) - -/obj/structure/machinery/door/poddoor/shutters/open() - if(z && SSatoms.initialized != INITIALIZATION_INSSATOMS) - GLOB.cameranet.updateVisibility(src) - . = ..() - - -/obj/structure/machinery/door/poddoor/shutters/close() - if(z && SSatoms.initialized != INITIALIZATION_INSSATOMS) - GLOB.cameranet.updateVisibility(src) - . = ..() - - -/obj/structure/machinery/door/poddoor/shutters/Destroy() - if(z && SSatoms.initialized != INITIALIZATION_INSSATOMS) - GLOB.cameranet.updateVisibility(src) - . = ..() -// STRUCTURES - -/obj/structure/Destroy(force) - if(z && SSatoms.initialized != INITIALIZATION_INSSATOMS) - GLOB.cameranet.updateVisibility(src) - . = ..() - -/obj/structure/Initialize(mapload, ...) - . = ..() - if(z && SSatoms.initialized != INITIALIZATION_INSSATOMS) - GLOB.cameranet.updateVisibility(src) - -// EFFECTS - -/obj/effect/Destroy() - if(z && SSatoms.initialized != INITIALIZATION_INSSATOMS) - GLOB.cameranet.updateVisibility(src) - . = ..() - -/obj/effect/Initialize(mapload, ...) - . = ..() - if(z && SSatoms.initialized != INITIALIZATION_INSSATOMS) - GLOB.cameranet.updateVisibility(src) - - - -// ROBOT MOVEMENT - -// Update the portable camera everytime the Robot moves. -// This might be laggy, comment it out if there are problems. -/mob/living/silicon/robot/var/updating = 0 - -/mob/living/silicon/robot/Move() - var/oldLoc = src.loc - . = ..() - if(.) - if(src.camera && src.camera.network.len) - if(!updating) - updating = 1 - spawn(BORG_CAMERA_BUFFER) - if(oldLoc != src.loc) - GLOB.cameranet.updatePortableCamera(src.camera) - updating = 0 - -/mob/living/carbon/human/var/updating = 0 - -/mob/living/carbon/human/Move(NewLoc, direction) - var/oldLoc = src.loc - . = ..() - if (.) - for (var/obj/item/clothing/head/helmet/marine/H in src) - if (!H.camera || !H.camera.network.len) - continue - if (updating) - continue - updating = TRUE - spawn(BORG_CAMERA_BUFFER) - if (oldLoc != loc) - GLOB.cameranet.updatePortableCamera(H.camera) - updating = FALSE - -// CAMERA - -// An addition to deactivate which removes/adds the camera from the chunk list based on if it works or not. - -/obj/structure/machinery/camera/toggle_cam_status(mob/user, silent) - ..() - if(can_use()) - GLOB.cameranet.addCamera(src) - else - set_light(0) - GLOB.cameranet.removeCamera(src) - -/obj/structure/machinery/camera/Initialize() - . = ..() - GLOB.cameranet.cameras += src //Camera must be added to global list of all cameras no matter what... - var/list/open_networks = difflist(network,GLOB.RESTRICTED_CAMERA_NETWORKS) //...but if all of camera's networks are restricted, it only works for specific camera consoles. - if(open_networks.len) //If there is at least one open network, chunk is available for AI usage. - GLOB.cameranet.addCamera(src) - -/obj/structure/machinery/camera/Destroy() - GLOB.cameranet.cameras -= src - var/list/open_networks = difflist(network,GLOB.RESTRICTED_CAMERA_NETWORKS) - if(open_networks.len) - GLOB.cameranet.removeCamera(src) - . = ..() - -//#undef BORG_CAMERA_BUFFER diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm deleted file mode 100644 index 5b190143f5bc..000000000000 --- a/code/modules/mob/living/silicon/ai/life.dm +++ /dev/null @@ -1,182 +0,0 @@ -/mob/living/silicon/ai/Life(delta_time) - if (src.stat == 2) - return - else //I'm not removing that shitton of tabs, unneeded as they are. -- Urist - //Being dead doesn't mean your temperature never changes - var/turf/T = get_turf(src) - - if (src.stat!=0) - src.cameraFollow = null - src.reset_view(null) - src.unset_interaction() - - src.updatehealth() - - if (src.malfhack) - if (src.malfhack.aidisabled) - to_chat(src, SPAN_DANGER("ERROR: APC access disabled, hack attempt canceled.")) - src.malfhacking = 0 - src.malfhack = null - - - if (health <= HEALTH_THRESHOLD_DEAD) - death() - return - - if (interactee) - interactee.check_eye(src) - - // Handle power damage (oxy) - if(src:aiRestorePowerRoutine != 0) - // Lost power - apply_damage(1, OXY) - else - // Gain Power - apply_damage(-1, OXY) - - // Handle EMP-stun - handle_stunned() - - //stage = 1 - //if (isRemoteControlling(src)) // Are we not sure what we are? - var/blind = 0 - //stage = 2 - var/area/loc = null - if (istype(T, /turf)) - //stage = 3 - forceMove(T.loc) - if (istype(loc, /area)) - //stage = 4 - if (!loc.power_equip && !istype(src.loc,/obj/item)) - //stage = 5 - blind = 1 - - if (!blind) //lol? if(!blind) #if(src.blind.layer) <--something here is clearly wrong :P - //I'll get back to this when I find out how this is -supposed- to work ~Carn //removed this shit since it was confusing as all hell --39kk9t - //stage = 4.5 - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - - - //Congratulations! You've found a way for AI's to run without using power! - //Todo: Without snowflaking up master_controller procs find a way to make AI use_power but only when APC's clear the area usage the tick prior - // since mobs are in master_controller before machinery. We also have to do it in a manner where we don't reset the entire area's need to update - // the power usage. - // - // We can probably create a new machine that resides inside of the AI contents that uses power using the idle_usage of 1000 and nothing else and - // be fine. -/* - var/area/home = get_area(src) - if(!home) return//something to do with malf fucking things up I guess. <-- aisat is gone. is this still necessary? ~Carn - if(home.powered(EQUIP)) - home.use_power(1000) -*/ - - if (src:aiRestorePowerRoutine==2) - to_chat(src, "Alert cancelled. Power has been restored without our assistance.") - src:aiRestorePowerRoutine = 0 - clear_fullscreen("blind") - return - else if (src:aiRestorePowerRoutine==3) - to_chat(src, "Alert cancelled. Power has been restored.") - src:aiRestorePowerRoutine = 0 - clear_fullscreen("blind") - return - else - - //stage = 6 - overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind) - src.sight = src.sight&~SEE_TURFS - src.sight = src.sight&~SEE_MOBS - src.sight = src.sight&~SEE_OBJS - src.see_in_dark = 0 - src.see_invisible = SEE_INVISIBLE_LIVING - - if (((!loc.power_equip) || istype(T, /turf/open/space)) && !istype(src.loc,/obj/item)) - if (src:aiRestorePowerRoutine==0) - src:aiRestorePowerRoutine = 1 - - to_chat(src, "You've lost power!") - //src.clear_supplied_laws() // Don't reset our laws. - //var/time = time2text(world.realtime,"hh:mm:ss") - //lawchanges.Add("[time] : [src.name]'s noncore laws have been reset due to power failure") - spawn(20) - to_chat(src, "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection.") - sleep(50) - if (loc.power_equip) - if (!istype(T, /turf/open/space)) - to_chat(src, "Alert cancelled. Power has been restored without our assistance.") - src:aiRestorePowerRoutine = 0 - clear_fullscreen("blind") - return - to_chat(src, "Fault confirmed: missing external power. Shutting down main control system to save power.") - sleep(20) - to_chat(src, "Emergency control system online. Verifying connection to power network.") - sleep(50) - if (istype(T, /turf/open/space)) - to_chat(src, "Unable to verify! No power connection detected!") - src:aiRestorePowerRoutine = 2 - return - to_chat(src, "Connection verified. Searching for APC in power network.") - sleep(50) - var/obj/structure/machinery/power/apc/theAPC = null -/* - for (var/something in loc) - if (istype(something, /obj/structure/machinery/power/apc)) - if (!(something:stat & BROKEN)) - theAPC = something - break -*/ - var/PRP //like ERP with the code, at least this stuff is no more 4x sametext - for (PRP=1, PRP<=4, PRP++) - var/area/AIarea = get_area(src) - for (var/obj/structure/machinery/power/apc/APC in AIarea) - if (!(APC.stat & BROKEN)) - theAPC = APC - break - if (!theAPC) - switch(PRP) - if (1) to_chat(src, "Unable to locate APC!") - else to_chat(src, "Lost connection with the APC!") - src:aiRestorePowerRoutine = 2 - return - if (loc.power_equip) - if (!istype(T, /turf/open/space)) - to_chat(src, "Alert cancelled. Power has been restored without our assistance.") - src:aiRestorePowerRoutine = 0 - clear_fullscreen("blind") - return - switch(PRP) - if (1) to_chat(src, "APC located. Optimizing route to APC to avoid needless power waste.") - if (2) to_chat(src, "Best route identified. Hacking offline APC power port.") - if (3) to_chat(src, "Power port upload access confirmed. Loading control program into APC power port software.") - if (4) - to_chat(src, "Transfer complete. Forcing APC to execute program.") - sleep(50) - to_chat(src, "Receiving control information from APC.") - sleep(2) - //bring up APC dialog - theAPC.attack_remote(src) - src:aiRestorePowerRoutine = 3 - to_chat(src, "Here are your current laws:") - src.show_laws() - sleep(50) - theAPC = null - - -/mob/living/silicon/ai/updatehealth() - if(status_flags & GODMODE) - health = 100 - set_stat(CONSCIOUS) - else - if(fire_res_on_core) - health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss() - else - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - -/mob/living/silicon/ai/rejuvenate() - ..() - add_ai_verbs(src) diff --git a/code/modules/mob/living/silicon/ai/login.dm b/code/modules/mob/living/silicon/ai/login.dm deleted file mode 100644 index 7a8d6ba9585f..000000000000 --- a/code/modules/mob/living/silicon/ai/login.dm +++ /dev/null @@ -1,10 +0,0 @@ -/mob/living/silicon/ai/Login() //ThisIsDumb(TM) TODO: tidy this up �_� ~Carn - ..() - regenerate_icons() - - if(stat != DEAD) - for(var/obj/structure/machinery/ai_status_display/O in GLOB.machines) //change status - O.mode = 1 - O.emotion = "Neutral" - src.view_core() - return diff --git a/code/modules/mob/living/silicon/ai/logout.dm b/code/modules/mob/living/silicon/ai/logout.dm deleted file mode 100644 index 62964915c33a..000000000000 --- a/code/modules/mob/living/silicon/ai/logout.dm +++ /dev/null @@ -1,10 +0,0 @@ -/mob/living/silicon/ai/Logout() - ..() - for(var/obj/structure/machinery/ai_status_display/O in GLOB.machines) //change status - O.mode = 0 - if(!isturf(loc)) - if (client) - client.eye = loc - client.perspective = EYE_PERSPECTIVE - src.view_core() - return diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm deleted file mode 100644 index 0f8684063a94..000000000000 --- a/code/modules/mob/living/silicon/ai/say.dm +++ /dev/null @@ -1,5 +0,0 @@ -/mob/living/silicon/ai/say(message) - if(parent && istype(parent) && parent.stat != 2) - return parent.say(message) - //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. - return ..(message) diff --git a/code/modules/mob/living/silicon/alarm.dm b/code/modules/mob/living/silicon/alarm.dm deleted file mode 100644 index c5e0081b9895..000000000000 --- a/code/modules/mob/living/silicon/alarm.dm +++ /dev/null @@ -1,111 +0,0 @@ -/datum/alarm - var/area/area //the area associated with the alarm. Used to identify the alarm - var/list/sources //list of things triggering the alarm. Used to determine when the alarm should be cleared. - var/list/cameras //list of cameras that can be switched to, if the player has that capability. - -/datum/alarm/New(area/A, list/sourcelist=list(), list/cameralist=list()) - area = A - sources = sourcelist - cameras = cameralist - -/mob/living/silicon - var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list()) //each sublist stores alarms keyed by the area name - var/list/alarms_to_show = list() - var/list/alarms_to_clear = list() - var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0) - var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0) - -/mob/living/silicon/proc/triggerAlarm(class, area/A, list/cameralist, source) - var/list/alarmlist = alarms[class] - - //see if there is already an alarm of this class for this area - if (A.name in alarmlist) - var/datum/alarm/existing = alarmlist[A.name] - existing.sources += source - existing.cameras |= cameralist - else - alarmlist[A.name] = new /datum/alarm(A, list(source), cameralist) - -/mob/living/silicon/proc/cancelAlarm(class, area/A as area, source) - var/cleared = 0 - var/list/alarmlist = alarms[class] - - if (A.name in alarmlist) - var/datum/alarm/alarm = alarmlist[A.name] - alarm.sources -= source - - if (!(alarm.sources.len)) - cleared = 1 - alarmlist -= A.name - - return !cleared - -/mob/living/silicon/proc/queueAlarm(message, type, incoming = 1) - var/in_cooldown = (alarms_to_show.len > 0 || alarms_to_clear.len > 0) - if(incoming) - alarms_to_show += message - alarm_types_show[type]++ - else - alarms_to_clear += message - alarm_types_clear[type]++ - - if(!in_cooldown) - spawn(10 * 10) // 10 seconds - - if(alarms_to_show.len < 5) - for(var/msg in alarms_to_show) - to_chat(src, msg) - else if(alarms_to_show.len) - - var/msg = "--- " - - if(alarm_types_show["Motion"]) - msg += "MOTION: [alarm_types_show["Motion"]] alarms detected. - " - - if(alarm_types_show["Fire"]) - msg += "FIRE: [alarm_types_show["Fire"]] alarms detected. - " - - if(alarm_types_show["Atmosphere"]) - msg += "ATMOSPHERE: [alarm_types_show["Atmosphere"]] alarms detected. - " - - if(alarm_types_show["Power"]) - msg += "POWER: [alarm_types_show["Power"]] alarms detected. - " - - if(alarm_types_show["Camera"]) - msg += "CAMERA: [alarm_types_show["Power"]] alarms detected. - " - - msg += "\[Show Alerts\]" - src << msg - - if(alarms_to_clear.len < 3) - for(var/msg in alarms_to_clear) - src << msg - - else if(alarms_to_clear.len) - var/msg = "--- " - - if(alarm_types_clear["Motion"]) - msg += "MOTION: [alarm_types_clear["Motion"]] alarms cleared. - " - - if(alarm_types_clear["Fire"]) - msg += "FIRE: [alarm_types_clear["Fire"]] alarms cleared. - " - - if(alarm_types_clear["Atmosphere"]) - msg += "ATMOSPHERE: [alarm_types_clear["Atmosphere"]] alarms cleared. - " - - if(alarm_types_clear["Power"]) - msg += "POWER: [alarm_types_clear["Power"]] alarms cleared. - " - - if(alarm_types_show["Camera"]) - msg += "CAMERA: [alarm_types_show["Power"]] alarms detected. - " - - msg += "\[Show Alerts\]" - src << msg - - - alarms_to_show = list() - alarms_to_clear = list() - for(var/i = 1; i < alarm_types_show.len; i++) - alarm_types_show[i] = 0 - for(var/i = 1; i < alarm_types_clear.len; i++) - alarm_types_clear[i] = 0 diff --git a/code/modules/mob/living/silicon/death.dm b/code/modules/mob/living/silicon/death.dm index ed2f01c725e5..0b3b371083e4 100644 --- a/code/modules/mob/living/silicon/death.dm +++ b/code/modules/mob/living/silicon/death.dm @@ -16,7 +16,4 @@ /mob/living/silicon/death(cause, gibbed, deathmessage) SSmob.living_misc_mobs -= src - if(in_contents_of(/obj/structure/machinery/recharge_station))//exit the recharge station - var/obj/structure/machinery/recharge_station/RC = loc - RC.go_out() - return ..(cause, gibbed, deathmessage) + return ..() diff --git a/code/modules/mob/living/silicon/robot/analyzer.dm b/code/modules/mob/living/silicon/robot/analyzer.dm deleted file mode 100644 index fd88125fc0b6..000000000000 --- a/code/modules/mob/living/silicon/robot/analyzer.dm +++ /dev/null @@ -1,77 +0,0 @@ -// -//Robotic Component Analyser, basically a health analyser for robots -// -/obj/item/device/robotanalyzer - name = "cyborg analyzer" - icon_state = "robotanalyzer" - item_state = "analyzer" - desc = "A hand-held scanner able to diagnose robotic injuries." - flags_atom = FPRINT|CONDUCT - flags_equip_slot = SLOT_WAIST - throwforce = 3 - w_class = SIZE_SMALL - throw_speed = SPEED_VERY_FAST - throw_range = 10 - matter = list("metal" = 200) - - var/mode = 1; - -/obj/item/device/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob) - if((user.getBrainLoss() >= 60) && prob(50)) - to_chat(user, (SPAN_DANGER("You try to analyze the floor's vitals!"))) - for(var/mob/O in viewers(M, null)) - O.show_message(text(SPAN_DANGER("[user] has analyzed the floor's vitals!")), 1) - user.show_message(text(SPAN_NOTICE("Analyzing Results for The floor:\n\t Overall Status: Healthy")), 1) - user.show_message(text(SPAN_NOTICE("\t Damage Specifics: [0]-[0]-[0]-[0]")), 1) - user.show_message(SPAN_NOTICE("Key: Suffocation/Toxin/Burns/Brute"), 1) - user.show_message(SPAN_NOTICE("Body Temperature: ???"), 1) - return - if(!(istype(user, /mob/living/carbon/human) || SSticker) && SSticker.mode.name != "monkey") - to_chat(user, SPAN_DANGER("You don't have the dexterity to do this!")) - return - if(!isrobot(M) && !issynth(M)) - to_chat(user, SPAN_DANGER("You can't analyze non-robotic things!")) - return - - user.visible_message(SPAN_NOTICE("[user] has analyzed [M]'s components."), SPAN_NOTICE("You have analyzed [M]'s components.")) - var/BU = M.getFireLoss() > 50 ? "[M.getFireLoss()]" : M.getFireLoss() - var/BR = M.getBruteLoss() > 50 ? "[M.getBruteLoss()]" : M.getBruteLoss() - user.show_message(SPAN_NOTICE("Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]")) - user.show_message("\t Key: Electronics/Brute", 1) - user.show_message("\t Damage Specifics: [BU] - [BR]") - if(M.tod && M.stat == DEAD) - user.show_message(SPAN_NOTICE("Time of Disable: [M.tod]")) - - if (isrobot(M)) - var/mob/living/silicon/robot/H = M - var/list/damaged = H.get_damaged_components(1,1,1) - user.show_message(SPAN_NOTICE("Localized Damage:"),1) - if(length(damaged)>0) - for(var/datum/robot_component/org in damaged) - var/organ_name = capitalize(org.name) - var/organ_destroyed_msg = (org.installed == -1) ? "DESTROYED ":"" - var/organ_elec_dmg_msg = (org.electronics_damage > 0) ? "[org.electronics_damage]":0 - var/organ_brute_dmg_msg = (org.brute_damage > 0) ? "[org.brute_damage]":0 - var/organ_toggled_msg = (org.toggled) ? "Toggled ON" : "Toggled OFF" - var/organ_powered_msg = (org.powered) ? "Power ON" : "Power OFF" - user.show_message(SPAN_NOTICE("\t [organ_name]: [organ_destroyed_msg][organ_elec_dmg_msg] - [organ_brute_dmg_msg] - [organ_toggled_msg] - [organ_powered_msg]"), 1) - else - user.show_message(SPAN_NOTICE("\t Components are OK."),1) - - if (issynth(M)) - var/mob/living/carbon/human/H = M - var/list/damaged = H.get_damaged_limbs(1,1) - user.show_message(SPAN_NOTICE("Localized Damage, Brute/Electronics:"),1) - if(length(damaged)>0) - for(var/obj/limb/org in damaged) - var/msg_display_name = "[capitalize(org.display_name)]" // Here for now until we purge this useless shitcode - var/msg_brute_dmg = "[(org.brute_dam > 0) ? SPAN_DANGER("[org.brute_dam]") : "0"]" - var/msg_burn_dmg = "[(org.brute_dam > 0) ? SPAN_DANGER("[org.brute_dam]") : "0"]" - user.show_message(SPAN_NOTICE("\t [msg_display_name]: [msg_brute_dmg] - [msg_burn_dmg]"), 1) - else - user.show_message(SPAN_NOTICE("\t Components are OK."),1) - - user.show_message(SPAN_NOTICE("Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)"), 1) - - src.add_fingerprint(user) - return diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm deleted file mode 100644 index 1baec99bb0a9..000000000000 --- a/code/modules/mob/living/silicon/robot/component.dm +++ /dev/null @@ -1,257 +0,0 @@ -// TODO: remove the robot.mmi and robot.cell variables and completely rely on the robot component system - -/datum/robot_component/var/name -/datum/robot_component/var/installed = 0 -/datum/robot_component/var/powered = 0 -/datum/robot_component/var/toggled = 1 -/datum/robot_component/var/brute_damage = 0 -/datum/robot_component/var/electronics_damage = 0 -/datum/robot_component/var/idle_usage = 0 // Amount of power used every MC tick. In joules. -/datum/robot_component/var/active_usage = 0 // Amount of power used for every action. Actions are module-specific. Actuator for each tile moved, etc. -/datum/robot_component/var/max_damage = 30 // HP of this component. -/datum/robot_component/var/mob/living/silicon/robot/owner - -// The actual device object that has to be installed for this. -/datum/robot_component/var/external_type = null - -// The wrapped device(e.g. radio), only set if external_type isn't null -/datum/robot_component/var/obj/item/wrapped = null - -/datum/robot_component/New(mob/living/silicon/robot/R) - src.owner = R - -/datum/robot_component/Destroy(force, ...) - . = ..() - owner = null - QDEL_NULL(wrapped) - -/datum/robot_component/proc/install() -/datum/robot_component/proc/uninstall() - -/datum/robot_component/proc/destroy() - var/brokenstate = "broken" // Generic icon - if (istype(wrapped, /obj/item/robot_parts/robot_component)) - var/obj/item/robot_parts/robot_component/comp = wrapped - brokenstate = comp.icon_state_broken - if(wrapped) - qdel(wrapped) - - - wrapped = new/obj/item/broken_device - wrapped.icon_state = brokenstate // Module-specific broken icons! Yay! - - // The thing itself isn't there anymore, but some fried remains are. - installed = -1 - uninstall() - -/datum/robot_component/proc/take_damage(brute, electronics, sharp, edge) - if(installed != 1) return - - brute_damage += brute - electronics_damage += electronics - - // if(brute_damage + electronics_damage >= max_damage) destroy() - -/datum/robot_component/proc/heal_damage(brute, electronics) - if(installed != 1) - // If it's not installed, can't repair it. - return 0 - - brute_damage = max(0, brute_damage - brute) - electronics_damage = max(0, electronics_damage - electronics) - -/datum/robot_component/proc/is_powered() - return (installed == 1) && (brute_damage + electronics_damage < max_damage) && (!idle_usage || powered) - -/datum/robot_component/proc/update_power_state() - if(toggled == 0) - powered = 0 - return - if(owner.cell && owner.cell.charge >= idle_usage) - owner.cell_use_power(idle_usage) - powered = 1 - else - powered = 0 - - -// ARMOUR -// Protects the cyborg from damage. Usually first module to be hit -// No power usage -/datum/robot_component/armour - name = "armour plating" - external_type = /obj/item/robot_parts/robot_component/armour - max_damage = 60 - - -// ACTUATOR -// Enables movement. -// Uses no power when idle. Uses 200J for each tile the cyborg moves. -/datum/robot_component/actuator - name = "actuator" - idle_usage = 0 - active_usage = 200 - external_type = /obj/item/robot_parts/robot_component/actuator - max_damage = 50 - - -//A fixed and much cleaner implementation of /tg/'s special snowflake code. -/datum/robot_component/actuator/is_powered() - return (installed == 1) && (brute_damage + electronics_damage < max_damage) - - -// POWER CELL -// Stores power (how unexpected..) -// No power usage -/datum/robot_component/cell - name = "power cell" - max_damage = 50 - -/datum/robot_component/cell/destroy() - ..() - owner.cell = null - - -// RADIO -// Enables radio communications -// Uses no power when idle. Uses 10J for each received radio message, 50 for each transmitted message. -/datum/robot_component/radio - name = "radio" - external_type = /obj/item/robot_parts/robot_component/radio - idle_usage = 15 //it's not actually possible to tell when we receive a message over our radio, so just use 10W every tick for passive listening - active_usage = 75 //transmit power - max_damage = 40 - - -// BINARY RADIO -// Enables binary communications with other cyborgs/AIs -// Uses no power when idle. Uses 10J for each received radio message, 50 for each transmitted message -/datum/robot_component/binary_communication - name = "binary communication device" - external_type = /obj/item/robot_parts/robot_component/binary_communication_device - idle_usage = 5 - active_usage = 25 - max_damage = 30 - - -// CAMERA -// Enables cyborg vision. Can also be remotely accessed via consoles. -// Uses 10J constantly -/datum/robot_component/camera - name = "camera" - external_type = /obj/item/robot_parts/robot_component/camera - idle_usage = 10 - max_damage = 40 - var/obj/structure/machinery/camera/camera - -/datum/robot_component/camera/New(mob/living/silicon/robot/R) - ..() - camera = R.camera - -/datum/robot_component/camera/update_power_state() - ..() - if (camera) - //check if camera component was deactivated - if (!powered && camera.status != powered) - camera.kick_viewers() - camera.status = powered - -/datum/robot_component/camera/install() - if (camera) - camera.status = 1 - -/datum/robot_component/camera/uninstall() - if (camera) - camera.status = 0 - camera.kick_viewers() - -/datum/robot_component/camera/destroy() - if (camera) - camera.status = 0 - camera.kick_viewers() - -// SELF DIAGNOSIS MODULE -// Analyses cyborg's modules, providing damage readouts and basic information -// Uses 1kJ burst when analysis is done -/datum/robot_component/diagnosis_unit - name = "self-diagnosis unit" - active_usage = 1000 - external_type = /obj/item/robot_parts/robot_component/diagnosis_unit - max_damage = 30 - - - - -// HELPER STUFF - - - -// Initializes cyborg's components. Technically, adds default set of components to new borgs -/mob/living/silicon/robot/proc/initialize_components() - components["actuator"] = new/datum/robot_component/actuator(src) - components["radio"] = new/datum/robot_component/radio(src) - components["power cell"] = new/datum/robot_component/cell(src) - components["diagnosis unit"] = new/datum/robot_component/diagnosis_unit(src) - components["camera"] = new/datum/robot_component/camera(src) - components["comms"] = new/datum/robot_component/binary_communication(src) - components["armour"] = new/datum/robot_component/armour(src) - -// Checks if component is functioning -/mob/living/silicon/robot/proc/is_component_functioning(module_name) - var/datum/robot_component/C = components[module_name] - return C && C.installed == 1 && C.toggled && C.is_powered() - -// Returns component by it's string name -/mob/living/silicon/robot/proc/get_component(component_name) - var/datum/robot_component/C = components[component_name] - return C - - - -// COMPONENT OBJECTS - - - -// Component Objects -// These objects are visual representation of modules - -/obj/item/broken_device - name = "broken component" - icon = 'icons/obj/items/robot_component.dmi' - icon_state = "broken" - -/obj/item/robot_parts/robot_component - icon = 'icons/obj/items/robot_component.dmi' - icon_state = "working" - var/brute = 0 - var/burn = 0 - var/icon_state_broken = "broken" - -/obj/item/robot_parts/robot_component/binary_communication_device - name = "binary communication device" - icon_state = "binradio" - icon_state_broken = "binradio_broken" - -/obj/item/robot_parts/robot_component/actuator - name = "actuator" - icon_state = "motor" - icon_state_broken = "motor_broken" - -/obj/item/robot_parts/robot_component/armour - name = "armour plating" - icon_state = "armor" - icon_state_broken = "armor_broken" - -/obj/item/robot_parts/robot_component/camera - name = "camera" - icon_state = "camera" - icon_state_broken = "camera_broken" - -/obj/item/robot_parts/robot_component/diagnosis_unit - name = "diagnosis unit" - icon_state = "analyser" - icon_state_broken = "analyser_broken" - -/obj/item/robot_parts/robot_component/radio - name = "radio" - icon_state = "radio" - icon_state_broken = "radio_broken" diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm deleted file mode 100644 index d664f5be8767..000000000000 --- a/code/modules/mob/living/silicon/robot/death.dm +++ /dev/null @@ -1,16 +0,0 @@ -/mob/living/silicon/robot/dust() - //Delete the MMI first so that it won't go popping out. - QDEL_NULL(mmi) - ..() - -/mob/living/silicon/robot/death(cause, gibbed) - if(camera) - camera.status = 0 - if(module) - var/obj/item/device/gripper/G = locate(/obj/item/device/gripper) in module - if(G) G.drop_item() - remove_robot_verbs() - ..(gibbed,"is destroyed!") - playsound(src.loc, 'sound/effects/metal_crash.ogg', 100) - robogibs(src) - qdel(src) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm deleted file mode 100644 index 6bb01661fbd5..000000000000 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ /dev/null @@ -1,258 +0,0 @@ -/mob/living/silicon/robot/drone - name = "drone" - real_name = "drone" - icon = 'icons/mob/robots.dmi' - icon_state = "repairbot" - maxHealth = 35 - health = 35 - universal_speak = 0 - universal_understand = 1 - gender = NEUTER - braintype = "Robot" - lawupdate = 0 - density = TRUE - req_access = list(ACCESS_MARINE_ENGINEERING, ACCESS_MARINE_RESEARCH) - integrated_light_power = 2 - local_transmit = 1 - layer = ABOVE_LYING_MOB_LAYER - var/nicknumber = 0 - - // We need to keep track of a few module items so we don't need to do list operations - // every time we need them. These get set in Initialize() after the module is chosen. - var/obj/item/stack/sheet/metal/cyborg/stack_metal = null - var/obj/item/stack/sheet/wood/cyborg/stack_wood = null - var/obj/item/stack/sheet/glass/cyborg/stack_glass = null - var/obj/item/stack/sheet/mineral/plastic/cyborg/stack_plastic = null - var/obj/item/device/matter_decompiler/decompiler = null - - //Used for self-mailing. - var/mail_destination = "" - - holder_type = /obj/item/holder/drone - -/mob/living/silicon/robot/drone/Initialize() - nicknumber = rand(100,999) - - . = ..() - - - add_verb(src, /mob/living/proc/hide) - - if(camera && ("Robots" in camera.network)) - camera.network.Add("Engineering") - - //They are unable to be upgraded, so let's give them a bit of a better battery. - cell.maxcharge = 50000 - cell.charge = 50000 - - // NO BRAIN. - mmi = null - - //We need to screw with their HP a bit. They have around one fifth as much HP as a full borg. - for(var/V in components) if(V != "power cell") - var/datum/robot_component/C = components[V] - C.max_damage = 10 - - remove_verb(src, list( - /mob/living/silicon/robot/verb/Namepick, - /mob/living/silicon/robot/drone/verb/set_mail_tag, // we dont have mail tubes - )) - add_verb(src, list( - /mob/living/silicon/robot/drone/verb/Drone_name_pick, - /mob/living/silicon/robot/drone/verb/Power_up, - )) - - module = new /obj/item/circuitboard/robot_module/drone(src) - - //Grab stacks. - stack_metal = locate(/obj/item/stack/sheet/metal/cyborg) in src.module - stack_wood = locate(/obj/item/stack/sheet/wood/cyborg) in src.module - stack_glass = locate(/obj/item/stack/sheet/glass/cyborg) in src.module - stack_plastic = locate(/obj/item/stack/sheet/mineral/plastic/cyborg) in src.module - - //Grab decompiler. - decompiler = locate(/obj/item/device/matter_decompiler) in src.module - - //Some tidying-up. - flavor_text = "This is an XP-45 Engineering Drone, one of the many fancy things that come out of the Weyland-Yutani Research Department. It's designed to assist both ship repairs as well as ground missions. Shiny!" - update_icons() - -/mob/living/silicon/robot/drone/initialize_pass_flags(datum/pass_flags_container/PF) - ..() - if (PF) - PF.flags_pass = PASS_MOB_THRU|PASS_FLAGS_CRAWLER - -/mob/living/silicon/robot/drone/init() - connected_ai = null - - aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src) - playsound(src.loc, 'sound/machines/twobeep.ogg', 25, 0) - -/mob/living/silicon/robot/drone/Destroy() - QDEL_NULL(aiCamera) - stack_metal = null - stack_wood = null - stack_glass = null - stack_plastic = null - decompiler = null - return ..() - -//Redefining some robot procs... -/mob/living/silicon/robot/drone/updatename() - var/new_name = "XP-45 Engineering Drone ([nicknumber])" - change_real_name(src, new_name) - -/mob/living/silicon/robot/drone/update_icons() - - overlays.Cut() - if(stat == 0) - overlays += "eyes-[icon_state]" - else - overlays -= "eyes" - -/mob/living/silicon/robot/drone/choose_icon() - return - -/mob/living/silicon/robot/drone/pick_module() - return - -//Drones cannot be upgraded with borg modules so we need to catch some items before they get used in ..(). -/mob/living/silicon/robot/drone/attackby(obj/item/W, mob/living/user) - - if(istype(W, /obj/item/robot/upgrade/)) - to_chat(user, SPAN_DANGER("The maintenance drone chassis not compatible with \the [W].")) - return - - else if (HAS_TRAIT(W, TRAIT_TOOL_CROWBAR)) - to_chat(user, "The machine is hermetically sealed. You can't open the case.") - return - - ..() - -//DRONE LIFE/DEATH - -//For some goddamn reason robots have this hardcoded. Redefining it for our fragile friends here. -/mob/living/silicon/robot/drone/updatehealth() - if(status_flags & GODMODE) - health = health - set_stat(CONSCIOUS) - return - health = health - (getBruteLoss() + getFireLoss()) - return - -//Easiest to check this here, then check again in the robot proc. -//Standard robots use config for crit, which is somewhat excessive for these guys. -//Drones killed by damage will gib. -/mob/living/silicon/robot/drone/handle_regular_status_updates() - - if(health <= -35 && src.stat != 2) - timeofdeath = world.time - death(last_damage_data) //Possibly redundant, having trouble making death() cooperate. - gib(last_damage_data) - return - ..() - -//DRONE MOVEMENT. -/mob/living/silicon/robot/drone/Process_Spaceslipping(prob_slip) - //TODO: Consider making a magboot item for drones to equip. ~Z - return 0 - -//CONSOLE PROCS -/mob/living/silicon/robot/drone/proc/shut_down() - if(stat != 2) - to_chat(src, SPAN_DANGER("You feel a system kill order percolate through your tiny brain, and you obediently destroy yourself.")) - death() - -//Reboot procs. - -/mob/living/silicon/robot/drone/proc/request_player() - for(var/mob/dead/observer/O in GLOB.observer_list) - if(jobban_isbanned(O, "Cyborg")) - continue - -/mob/living/silicon/robot/drone/proc/question(client/C) - spawn(0) - if(!C || jobban_isbanned(C,"Cyborg")) return - var/response = alert(C, "Someone is attempting to reboot a maintenance drone. Would you like to play as one?", "Maintenance drone reboot", "Yes", "No", "Never for this round.") - if(!C || ckey) - return - else if(response == "Yes") - transfer_personality(C) - -/mob/living/silicon/robot/drone/proc/transfer_personality(client/player) - - if(!player) return - player.change_view(GLOB.world_view_size) - src.ckey = player.ckey - - if(player.mob && player.mob.mind) - player.mob.mind.transfer_to(src) - - lawupdate = 0 - to_chat(src, "Systems rebooted. Loading base pattern maintenance protocol... loaded.") - to_chat(src, "
You are a maintenance drone, a tiny-brained robotic repair machine.") - to_chat(src, "You have no individual will, no personality, and no drives or urges other than your laws.") - to_chat(src, "Use :d to talk to other drones and say to speak silently to your nearby fellows.") - to_chat(src, "Remember, you are lawed against interference with the crew.") - to_chat(src, "Don't invade their worksites and don't steal their resources.") - to_chat(src, "If a crewmember has noticed you, you are probably breaking your third law.") - -/mob/living/silicon/robot/drone/Collide(atom/A) - if (!istype(A,/obj/structure/machinery/door) && \ - !istype(A,/obj/structure/machinery/recharge_station) && \ - !istype(A,/obj/structure/machinery/disposal/deliveryChute) && \ - !istype(A,/obj/structure/machinery/teleport/hub) && \ - !istype(A,/obj/effect/portal) - ) return - ..() - return - -/mob/living/silicon/robot/drone/Collided(atom/movable/AM) - return - -/mob/living/silicon/robot/drone/start_pulling(atom/movable/AM) - - if(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct)) - ..() - else if(istype(AM,/obj/item)) - var/obj/item/O = AM - if(O.w_class > SIZE_SMALL) - to_chat(src, SPAN_WARNING("You are too small to pull that.")) - return - else - ..() - else - to_chat(src, SPAN_WARNING("You are too small to pull that.")) - return - -/mob/living/silicon/robot/drone/add_robot_verbs() - -/mob/living/silicon/robot/drone/remove_robot_verbs() - -/mob/living/silicon/robot/drone/verb/Drone_name_pick() - set category = "Robot Commands" - if(custom_name) - return 0 - - spawn(0) - var/newname - newname = tgui_input_list(src,"You are drone. Pick a name, no duplicates allowed.", "Drone name pick", GLOB.greek_letters) - if(custom_name) - return - - for (var/mob/living/silicon/robot/drone/A in GLOB.mob_list) - if(newname == A.nicknumber) - to_chat(src, SPAN_WARNING("That identifier is taken, pick again.")) - return - - custom_name = newname - nicknumber = newname - - updatename() - update_icons() - -/mob/living/silicon/robot/drone/verb/Power_up() - set category = "Robot Commands" - if(resting) - resting = 0 - to_chat(src, SPAN_NOTICE("You begin powering up.")) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm deleted file mode 100644 index 261e6ffc7623..000000000000 --- a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm +++ /dev/null @@ -1,29 +0,0 @@ -// DRONE ABILITIES -/mob/living/silicon/robot/drone/verb/set_mail_tag() - set name = "Set Mail Tag" - set desc = "Tag yourself for delivery through the disposals system." - set category = "Drone" - - var/new_tag = tgui_input_list(usr, "Select the desired destination.", "Set Mail Tag", null, GLOB.tagger_locations) - - if(!new_tag) - mail_destination = "" - return - - to_chat(src, SPAN_NOTICE(" You configure your internal beacon, tagging yourself for delivery to '[new_tag]'.")) - mail_destination = new_tag - - //Auto flush if we use this verb inside a disposal chute. - var/obj/structure/machinery/disposal/D = src.loc - if(istype(D)) - to_chat(src, SPAN_NOTICE(" \The [D] acknowledges your signal.")) - D.flush_count = D.flush_after_ticks - - return - -//Actual picking-up event. -/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob) - - if(M.a_intent == INTENT_HELP) - get_scooped(M) - ..() diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm deleted file mode 100644 index 2433720d23c1..000000000000 --- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm +++ /dev/null @@ -1,111 +0,0 @@ -/obj/structure/machinery/computer/drone_control - name = "Maintenance Drone Control" - desc = "Used to monitor the station's drone population and the assembler that services them." - icon = 'icons/obj/structures/machinery/computer.dmi' - icon_state = "power" - req_one_access = list(ACCESS_MARINE_ENGINEERING, ACCESS_CIVILIAN_ENGINEERING) - circuit = /obj/item/circuitboard/computer/drone_control - - //Used when pinging drones. - var/drone_call_area = "Engineering" - //Used to enable or disable drone fabrication. - var/obj/structure/machinery/drone_fabricator/dronefab - -/obj/structure/machinery/computer/drone_control/attack_remote(mob/user as mob) - return src.attack_hand(user) - -/obj/structure/machinery/computer/drone_control/attack_hand(mob/user as mob) - if(..()) - return - - if(!allowed(user)) - to_chat(user, SPAN_DANGER("Access denied.")) - return - - user.set_interaction(src) - var/dat - dat += "Maintenance Units
" - - for(var/mob/living/silicon/robot/drone/D in GLOB.mob_list) - dat += "
[D.real_name] ([D.stat == 2 ? "INACTIVE" : "ACTIVE"])" - dat += "
Cell charge: [D.cell.charge]/[D.cell.maxcharge]." - dat += "
Currently located in: [get_area(D)]." - dat += "
Resync|Shutdown
" - - dat += "

Request drone presence in area: [drone_call_area] (Send ping)" - - dat += "

Drone fabricator: " - dat += "[dronefab ? "[(dronefab.produce_drones && !(dronefab.stat & NOPOWER)) ? "ACTIVE" : "INACTIVE"]" : "FABRICATOR NOT DETECTED. (search)"]" - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - - -/obj/structure/machinery/computer/drone_control/Topic(href, href_list) - if(..()) - return - - if(!allowed(usr)) - to_chat(usr, SPAN_DANGER("Access denied.")) - return - - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (isRemoteControlling(usr))) - usr.set_interaction(src) - - if (href_list["setarea"]) - - //Probably should consider using another list, but this one will do. - var/t_area = tgui_input_list(usr, "Select the area to ping.", "Set Target Area", null, GLOB.tagger_locations) - - if(!t_area) - return - - drone_call_area = t_area - to_chat(usr, SPAN_NOTICE(" You set the area selector to [drone_call_area].")) - - else if (href_list["ping"]) - - to_chat(usr, SPAN_NOTICE(" You issue a maintenance request for all active drones, highlighting [drone_call_area].")) - for(var/mob/living/silicon/robot/drone/D in GLOB.mob_list) - if(D.client && D.stat == 0) - to_chat(D, "-- Maintenance drone presence requested in: [drone_call_area].") - - else if (href_list["shutdown"]) - - var/mob/living/silicon/robot/drone/D = locate(href_list["shutdown"]) - - if(D.stat != 2) - to_chat(usr, SPAN_DANGER("You issue a kill command for the unfortunate drone.")) - message_admins("[key_name_admin(usr)] issued kill order for drone [key_name_admin(D)] from control console.") - log_game("[key_name(usr)] issued kill order for [key_name(src)] from control console.") - D.shut_down() - - else if (href_list["search_fab"]) - if(dronefab) - return - - for(var/obj/structure/machinery/drone_fabricator/fab in oview(3,src)) - - if(fab.stat & NOPOWER) - continue - - dronefab = fab - to_chat(usr, SPAN_NOTICE(" Drone fabricator located.")) - return - - to_chat(usr, SPAN_DANGER("Unable to locate drone fabricator.")) - - else if (href_list["toggle_fab"]) - - if(!dronefab) - return - - if(get_dist(src,dronefab) > 3) - dronefab = null - to_chat(usr, SPAN_DANGER("Unable to locate drone fabricator.")) - return - - dronefab.produce_drones = !dronefab.produce_drones - to_chat(usr, SPAN_NOTICE(" You [dronefab.produce_drones ? "enable" : "disable"] drone production in the nearby fabricator.")) - - src.updateUsrDialog() diff --git a/code/modules/mob/living/silicon/robot/drone/drone_damage.dm b/code/modules/mob/living/silicon/robot/drone/drone_damage.dm deleted file mode 100644 index a0245d8c8cab..000000000000 --- a/code/modules/mob/living/silicon/robot/drone/drone_damage.dm +++ /dev/null @@ -1,24 +0,0 @@ -//Redefining some robot procs, since drones can't be repaired and really shouldn't take component damage. -/mob/living/silicon/robot/drone/take_overall_damage(brute = 0, burn = 0, sharp = 0, used_weapon = null) - bruteloss += brute - fireloss += burn - -/mob/living/silicon/robot/drone/heal_overall_damage(brute, burn) - - bruteloss -= brute - fireloss -= burn - - if(bruteloss<0) bruteloss = 0 - if(fireloss<0) fireloss = 0 - -/mob/living/silicon/robot/drone/take_limb_damage(brute = 0, burn = 0, sharp = 0) - take_overall_damage(brute,burn) - -/mob/living/silicon/robot/drone/heal_limb_damage(brute, burn) - heal_overall_damage(brute,burn) - -/mob/living/silicon/robot/drone/getFireLoss() - return fireloss - -/mob/living/silicon/robot/drone/getBruteLoss() - return bruteloss diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm deleted file mode 100644 index bfe2a5bd7a39..000000000000 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ /dev/null @@ -1,83 +0,0 @@ - - -//PRETTIER TOOL LIST. -/mob/living/silicon/robot/drone/installed_modules() - - if(weapon_lock) - to_chat(src, SPAN_DANGER("Weapon lock active, unable to use modules! Count:[weaponlock_time]")) - return - - if(!module) - module = new /obj/item/circuitboard/robot_module/drone(src) - - var/dat = "Drone modules\n" - dat += {" - Activated Modules -
- Module 1: [module_state_1 ? "[module_state_1]" : "No Module"]
- Module 2: [module_state_2 ? "
[module_state_2]" : "No Module"]
- Module 3: [module_state_3 ? "
[module_state_3]" : "No Module"]
-
- Installed Modules

"} - - - var/tools = "Tools and devices
" - var/resources = "
Resources
" - - for (var/O in module.modules) - - var/module_string = "" - - if (!O) - module_string += text("Resource depleted
") - else if(activated(O)) - module_string += text("[O]: Activated
") - else - module_string += text("[O]:
Activate
") - - if((istype(O,/obj/item) || istype(O,/obj/item/device)) && !(istype(O,/obj/item/stack/cable_coil))) - tools += module_string - else - resources += module_string - - dat += tools - - dat += resources - - src << browse(dat, "window=robotmod") - -//Putting the decompiler here to avoid doing list checks every tick. -/mob/living/silicon/robot/drone/use_power() - - ..() - if(!src.has_power || !decompiler) - return - - //The decompiler replenishes drone stores from hoovered-up junk each tick. - for(var/type in decompiler.stored_comms) - if(decompiler.stored_comms[type] > 0) - var/obj/item/stack/sheet/stack - switch(type) - if("metal") - if(!stack_metal) - stack_metal = new /obj/item/stack/sheet/metal/cyborg(src.module) - stack_metal.amount = 1 - stack = stack_metal - if("glass") - if(!stack_glass) - stack_glass = new /obj/item/stack/sheet/glass/cyborg(src.module) - stack_glass.amount = 1 - stack = stack_glass - if("wood") - if(!stack_wood) - stack_wood = new /obj/item/stack/sheet/wood/cyborg(src.module) - stack_wood.amount = 1 - stack = stack_wood - if("plastic") - if(!stack_plastic) - stack_plastic = new /obj/item/stack/sheet/mineral/plastic/cyborg(src.module) - stack_plastic.amount = 1 - stack = stack_plastic - - stack.amount++ - decompiler.stored_comms[type]--; diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm deleted file mode 100644 index 63c0e69a9835..000000000000 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ /dev/null @@ -1,77 +0,0 @@ -/obj/structure/machinery/drone_fabricator - name = "drone fabricator" - desc = "A large automated factory for producing maintenance drones." - - density = TRUE - anchored = TRUE - use_power = USE_POWER_IDLE - idle_power_usage = 20 - active_power_usage = 5000 - - var/drone_progress = 0 - var/produce_drones = 1 - var/time_last_drone = 500 - - icon = 'icons/obj/structures/machinery/drone_fab.dmi' - icon_state = "drone_fab_idle" - -/obj/structure/machinery/drone_fabricator/New() - ..() - start_processing() - -/obj/structure/machinery/drone_fabricator/power_change() - ..() - if (stat & NOPOWER) - icon_state = "drone_fab_nopower" - -/obj/structure/machinery/drone_fabricator/process() - - if(SSticker.current_state < GAME_STATE_PLAYING) - return - - if(stat & NOPOWER || !produce_drones) - if(icon_state != "drone_fab_nopower") icon_state = "drone_fab_nopower" - return - - if(drone_progress >= 100) - icon_state = "drone_fab_idle" - return - - icon_state = "drone_fab_active" - var/elapsed = world.time - time_last_drone - drone_progress = round((elapsed/CONFIG_GET(number/drone_build_time))*100) - - if(drone_progress >= 100) - visible_message("\The [src] voices a strident beep, indicating a drone chassis is prepared.") - -/obj/structure/machinery/drone_fabricator/get_examine_text(mob/user) - . = ..() - if(produce_drones && drone_progress >= 100 && istype(user,/mob/dead) && CONFIG_GET(flag/allow_drone_spawn) && count_drones() < CONFIG_GET(number/max_maint_drones)) - . += "
A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone." - -/obj/structure/machinery/drone_fabricator/proc/count_drones() - var/drones = 0 - for(var/mob/living/silicon/robot/drone/D in GLOB.player_list) - if(D.key && D.client) - drones++ - return drones - -/obj/structure/machinery/drone_fabricator/proc/create_drone(client/player) - - if(stat & NOPOWER) - return - - if(!produce_drones || !CONFIG_GET(flag/allow_drone_spawn) || count_drones() >= CONFIG_GET(number/max_maint_drones)) - return - - if(!player || !istype(player.mob,/mob/dead)) - return - - visible_message("\The [src] churns and grinds as it lurches into motion, disgorging a shiny new drone after a few moments.") - flick("h_lathe_leave",src) - - time_last_drone = world.time - var/mob/living/silicon/robot/drone/new_drone = new(get_turf(src)) - new_drone.transfer_personality(player) - - drone_progress = 0 diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm deleted file mode 100644 index b349b42c809a..000000000000 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ /dev/null @@ -1,43 +0,0 @@ -/mob/living/silicon/robot/get_examine_text(mob/user) - if( (user.sdisabilities & DISABILITY_BLIND || user.blinded || user.stat) && !istype(user,/mob/dead/observer) ) - return list(SPAN_NOTICE("Something is there but you can't see it.")) - - var/msg = "*---------*\nThis is [icon2html(src)] \a [src][custom_name ? ", [modtype] [braintype]" : ""]!\n" - msg += "" - if (src.getBruteLoss()) - if (src.getBruteLoss() < maxHealth*0.5) - msg += "It looks slightly dented. A welding tool would buff that out in no time.\n" - else - msg += "It looks severely dented! A welding tool would buff that out in no time.\n" - if (src.getFireLoss()) - if (src.getFireLoss() < maxHealth*0.5) - msg += "It looks slightly charred. Its internal wiring will need to be repaired with a cable coil.\n" - else - msg += "It looks severely burnt and heat-warped! Its internal wiring will need to be repaired with a cable coil.\n" - msg += "" - - if(opened) - msg += SPAN_WARNING("Its cover is open and the power cell is [cell ? "installed" : "missing"].\n") - else - msg += "Its cover is closed[locked ? "" : ", and looks unlocked"].\n" - - if(cell && cell.charge <= 0) - msg += SPAN_WARNING("Its battery indicator is blinking red!
\n") - if(!has_power) - msg += SPAN_WARNING("It appears to be running on backup power.\n") - - switch(src.stat) - if(CONSCIOUS) - if(!src.client) msg += "It appears to be in stand-by mode.\n" //afk - if(UNCONSCIOUS) msg += SPAN_WARNING("It doesn't seem to be responding.\n") - if(DEAD) msg += "It looks completely unsalvageable.\n" - msg += "*---------*" - - if(print_flavor_text()) msg += "\n[print_flavor_text()]\n" - - if (pose) - if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 ) - pose = addtext(pose,".") //Makes sure all emotes end with a period. - msg += "\nIt is [pose]" - - return list(msg) diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm deleted file mode 100644 index 51bbfd24ccb0..000000000000 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ /dev/null @@ -1,198 +0,0 @@ -//These procs handle putting s tuff in your hand. It's probably best to use these rather than setting stuff manually -//as they handle all relevant stuff like adding it to the player's screen and such - -//Returns the thing in our active hand (whatever is in our active module-slot, in this case) -/mob/living/silicon/robot/get_active_hand() - return module_active - -/*-------TODOOOOOOOOOO--------*/ -/mob/living/silicon/robot/proc/uneq_active() - if(isnull(module_active)) - return - if(module_state_1 == module_active) - if(istype(module_state_1,/obj/item/robot/sight)) - sight_mode &= ~module_state_1:sight_mode - if (client) - client.remove_from_screen(module_state_1) - contents -= module_state_1 - module_active = null - module_state_1 = null - inv1.icon_state = "inv1" - else if(module_state_2 == module_active) - if(istype(module_state_2,/obj/item/robot/sight)) - sight_mode &= ~module_state_2:sight_mode - if (client) - client.remove_from_screen(module_state_2) - contents -= module_state_2 - module_active = null - module_state_2 = null - inv2.icon_state = "inv2" - else if(module_state_3 == module_active) - if(istype(module_state_3,/obj/item/robot/sight)) - sight_mode &= ~module_state_3:sight_mode - if (client) - client.remove_from_screen(module_state_3) - contents -= module_state_3 - module_active = null - module_state_3 = null - inv3.icon_state = "inv3" - update_icons() - -/mob/living/silicon/robot/proc/uneq_all() - module_active = null - - if(module_state_1) - if(istype(module_state_1,/obj/item/robot/sight)) - sight_mode &= ~module_state_1:sight_mode - if (client) - client.remove_from_screen(module_state_1) - contents -= module_state_1 - module_state_1 = null - inv1.icon_state = "inv1" - if(module_state_2) - if(istype(module_state_2,/obj/item/robot/sight)) - sight_mode &= ~module_state_2:sight_mode - if (client) - client.remove_from_screen(module_state_2) - contents -= module_state_2 - module_state_2 = null - inv2.icon_state = "inv2" - if(module_state_3) - if(istype(module_state_3,/obj/item/robot/sight)) - sight_mode &= ~module_state_3:sight_mode - if (client) - client.remove_from_screen(module_state_3) - contents -= module_state_3 - module_state_3 = null - inv3.icon_state = "inv3" - update_icons() - -/mob/living/silicon/robot/proc/activated(obj/item/O) - if(module_state_1 == O) - return 1 - else if(module_state_2 == O) - return 1 - else if(module_state_3 == O) - return 1 - else - return 0 - -//Helper procs for cyborg modules on the UI. -//These are hackish but they help clean up code elsewhere. - -//module_selected(module) - Checks whether the module slot specified by "module" is currently selected. -/mob/living/silicon/robot/proc/module_selected(module) //Module is 1-3 - return module == get_selected_module() - -//module_active(module) - Checks whether there is a module active in the slot specified by "module". -/mob/living/silicon/robot/proc/module_active(module) //Module is 1-3 - if(module < 1 || module > 3) return 0 - - switch(module) - if(1) - if(module_state_1) - return 1 - if(2) - if(module_state_2) - return 1 - if(3) - if(module_state_3) - return 1 - return 0 - -//get_selected_module() - Returns the slot number of the currently selected module. Returns 0 if no modules are selected. -/mob/living/silicon/robot/proc/get_selected_module() - if(module_state_1 && module_active == module_state_1) - return 1 - else if(module_state_2 && module_active == module_state_2) - return 2 - else if(module_state_3 && module_active == module_state_3) - return 3 - - return 0 - -//select_module(module) - Selects the module slot specified by "module" -/mob/living/silicon/robot/proc/select_module(module) //Module is 1-3 - if(module < 1 || module > 3) return - - if(!module_active(module)) return - - switch(module) - if(1) - if(module_active != module_state_1) - inv1.icon_state = "inv1 +a" - inv2.icon_state = "inv2" - inv3.icon_state = "inv3" - module_active = module_state_1 - return - if(2) - if(module_active != module_state_2) - inv1.icon_state = "inv1" - inv2.icon_state = "inv2 +a" - inv3.icon_state = "inv3" - module_active = module_state_2 - return - if(3) - if(module_active != module_state_3) - inv1.icon_state = "inv1" - inv2.icon_state = "inv2" - inv3.icon_state = "inv3 +a" - module_active = module_state_3 - return - return - -//deselect_module(module) - Deselects the module slot specified by "module" -/mob/living/silicon/robot/proc/deselect_module(module) //Module is 1-3 - if(module < 1 || module > 3) return - - switch(module) - if(1) - if(module_active == module_state_1) - inv1.icon_state = "inv1" - module_active = null - return - if(2) - if(module_active == module_state_2) - inv2.icon_state = "inv2" - module_active = null - return - if(3) - if(module_active == module_state_3) - inv3.icon_state = "inv3" - module_active = null - return - return - -//toggle_module(module) - Toggles the selection of the module slot specified by "module". -/mob/living/silicon/robot/proc/toggle_module(module) //Module is 1-3 - if(module < 1 || module > 3) return - - if(module_selected(module)) - deselect_module(module) - else - if(module_active(module)) - select_module(module) - else - deselect_module(get_selected_module()) //If we can't do select anything, at least deselect the current module. - return - -//cycle_modules() - Cycles through the list of selected modules. -/mob/living/silicon/robot/proc/cycle_modules() - var/slot_start = get_selected_module() - if(slot_start) deselect_module(slot_start) //Only deselect if we have a selected slot. - - var/slot_num - if(slot_start == 0) - slot_num = 1 - slot_start = 2 - else - slot_num = slot_start + 1 - - while(slot_start != slot_num) //If we wrap around without finding any free slots, just give up. - if(module_active(slot_num)) - select_module(slot_num) - return - slot_num++ - if(slot_num > 3) slot_num = 1 //Wrap around. - - return diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm deleted file mode 100644 index b4a6e59e52e2..000000000000 --- a/code/modules/mob/living/silicon/robot/life.dm +++ /dev/null @@ -1,270 +0,0 @@ -/mob/living/silicon/robot/Life(delta_time) - set invisibility = 0 - set background = 1 - - if (src.monkeyizing) - return - - src.blinded = FALSE - - //Status updates, death etc. - clamp_values() - handle_regular_status_updates() - - if(client) - handle_regular_hud_updates() - update_items() - if (src.stat != DEAD) //still using power - use_power() - process_killswitch() - process_locks() - -/mob/living/silicon/robot/proc/clamp_values() - -// set_effect(min(stunned, 30), STUN) - set_effect(min(knocked_out, 30), PARALYZE) -// set_effect(min(knocked_down, 20), WEAKEN) - sleeping = 0 - apply_damage(0, BRUTE) - apply_damage(0, TOX) - apply_damage(0, OXY) - apply_damage(0, BURN) - -/mob/living/silicon/robot/proc/use_power() - // Debug only - used_power_this_tick = 0 - for(var/V in components) - var/datum/robot_component/C = components[V] - C.update_power_state() - - if ( cell && is_component_functioning("power cell") && src.cell.charge > 0 ) - if(src.module_state_1) - cell_use_power(50) // 50W load for every enabled tool TODO: tool-specific loads - if(src.module_state_2) - cell_use_power(50) - if(src.module_state_3) - cell_use_power(50) - - if(lights_on) - cell_use_power(30) // 30W light. Normal lights would use ~15W, but increased for balance reasons. - - src.has_power = 1 - else - if (src.has_power) - to_chat(src, SPAN_DANGER("You are now running on emergency backup power.")) - src.has_power = 0 - if(lights_on) // Light is on but there is no power! - lights_on = 0 - set_light(0) - -/mob/living/silicon/robot/handle_regular_status_updates(regular_update = TRUE) - - if(src.camera && !scrambledcodes) - if(src.stat == 2 || isWireCut(5)) - src.camera.status = 0 - else - src.camera.status = 1 - - updatehealth() - - if(regular_update && src.sleeping) - apply_effect(3, PARALYZE) - src.sleeping-- - - if(regular_update && src.resting) - apply_effect(5, WEAKEN) - - if(health < HEALTH_THRESHOLD_DEAD && stat != DEAD) //die only once - death() - - if (stat != DEAD) //Alive. - if (HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || HAS_TRAIT(src, TRAIT_INCAPACITATED) || !has_power) //Stunned etc. - set_stat(UNCONSCIOUS) - if(regular_update) - if (HAS_TRAIT(src, TRAIT_INCAPACITATED)) - adjust_effect(-1, STUN) - if (HAS_TRAIT(src, TRAIT_FLOORED)) - adjust_effect(-1, WEAKEN) - if (HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) - adjust_effect(-1, PARALYZE) - src.blinded = TRUE - else - src.blinded = FALSE - - else //Not stunned. - src.set_stat(CONSCIOUS) - - else //Dead. - src.blinded = TRUE - src.set_stat(DEAD) - - if(!regular_update) - return - - if (src.stuttering) src.stuttering-- - - if (src.eye_blind) - src.ReduceEyeBlind(1) - src.blinded = TRUE - - if (src.ear_deaf > 0) src.ear_deaf-- - if (src.ear_damage < 25) - src.ear_damage -= 0.05 - src.ear_damage = max(src.ear_damage, 0) - - if ((src.sdisabilities & DISABILITY_BLIND)) - src.blinded = TRUE - if ((src.sdisabilities & DISABILITY_DEAF)) - SetEarDeafness(1) - - if (src.eye_blurry > 0) - src.ReduceEyeBlur(1) - - if (src.druggy > 0) - src.druggy-- - src.druggy = max(0, src.druggy) - - //update the state of modules and components here - if (src.stat != 0) - uneq_all() - - if(!is_component_functioning("radio")) - radio.on = 0 - else - radio.on = 1 - - if(is_component_functioning("camera")) - src.blinded = FALSE - else - src.blinded = TRUE - - return 1 - -/mob/living/silicon/robot/proc/handle_regular_hud_updates() - - if (hud_used && hud_used.healths) - if (src.stat != DEAD) - if(ismaintdrone(src)) - switch(round(health * 100 / maxHealth)) - if(100 to INFINITY) - hud_used.healths.icon_state = "health0" - if(75 to 99) - hud_used.healths.icon_state = "health1" - if(50 to 74) - hud_used.healths.icon_state = "health2" - if(25 to 49) - hud_used.healths.icon_state = "health3" - if(10 to 24) - hud_used.healths.icon_state = "health4" - if(0 to 9) - hud_used.healths.icon_state = "health5" - else - hud_used.healths.icon_state = "health6" - else - switch(round(health * 100 / maxHealth)) - if(100 to INFINITY) - hud_used.healths.icon_state = "health0" - if(75 to 99) - hud_used.healths.icon_state = "health1" - if(50 to 74) - hud_used.healths.icon_state = "health2" - if(25 to 49) - hud_used.healths.icon_state = "health3" - if(10 to 24) - hud_used.healths.icon_state = "health4" - if(0 to 9) - hud_used.healths.icon_state = "health5" - else - hud_used.healths.icon_state = "health6" - else - hud_used.healths.icon_state = "health7" - - if (src.cells) - if (src.cell) - var/cellcharge = src.cell.charge/src.cell.maxcharge - switch(cellcharge) - if(0.75 to INFINITY) - src.cells.icon_state = "charge4" - if(0.5 to 0.75) - src.cells.icon_state = "charge3" - if(0.25 to 0.5) - src.cells.icon_state = "charge2" - if(0 to 0.25) - src.cells.icon_state = "charge1" - else - src.cells.icon_state = "charge0" - else - src.cells.icon_state = "charge-empty" - - if(hud_used && hud_used.bodytemp_icon) - switch(src.bodytemperature) //310.055 optimal body temp - if(335 to INFINITY) - hud_used.bodytemp_icon.icon_state = "temp2" - if(320 to 335) - hud_used.bodytemp_icon.icon_state = "temp1" - if(300 to 320) - hud_used.bodytemp_icon.icon_state = "temp0" - if(260 to 300) - hud_used.bodytemp_icon.icon_state = "temp-1" - else - hud_used.bodytemp_icon.icon_state = "temp-2" - - -//Oxygen and fire does nothing yet!! -// if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]" -// if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]" - - if(stat != DEAD) //the dead get zero fullscreens - if(blinded) - overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind) - else - clear_fullscreen("blind") - - if(druggy) - overlay_fullscreen("high", /atom/movable/screen/fullscreen/high) - else - clear_fullscreen("high") - - - if(interactee) - interactee.check_eye(src) - else - if(client && !client.adminobs) - reset_view(null) - - return 1 - -/mob/living/silicon/robot/proc/update_items() - if (client) - client.remove_from_screen(contents) - for(var/obj/I in contents) - if(I && !(istype(I,/obj/item/cell) || istype(I,/obj/item/device/radio) || istype(I,/obj/structure/machinery/camera) || istype(I,/obj/item/device/mmi))) - client.add_to_screen(I) - var/datum/custom_hud/robot/ui_datum = GLOB.custom_huds_list[HUD_ROBOT] - if(module_state_1) - module_state_1.screen_loc = ui_datum.ui_inv1 - if(module_state_2) - module_state_2.screen_loc = ui_datum.ui_inv2 - if(module_state_3) - module_state_3.screen_loc = ui_datum.ui_inv3 - update_icons() - -/mob/living/silicon/robot/proc/process_killswitch() - if(killswitch) - killswitch_time -- - if(killswitch_time <= 0) - if(src.client) - to_chat(src, SPAN_DANGER("Killswitch Activated")) - killswitch = 0 - spawn(5) - gib() - -/mob/living/silicon/robot/proc/process_locks() - if(weapon_lock) - uneq_all() - weaponlock_time -- - if(weaponlock_time <= 0) - if(src.client) - to_chat(src, SPAN_DANGER("Weapon Lock Timed Out!")) - weapon_lock = 0 - weaponlock_time = 120 diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm deleted file mode 100644 index 0a3225011d83..000000000000 --- a/code/modules/mob/living/silicon/robot/login.dm +++ /dev/null @@ -1,4 +0,0 @@ -/mob/living/silicon/robot/Login() - ..() - regenerate_icons() - show_laws(0) diff --git a/code/modules/mob/living/silicon/robot/photos.dm b/code/modules/mob/living/silicon/robot/photos.dm deleted file mode 100644 index bc8d3793c5ad..000000000000 --- a/code/modules/mob/living/silicon/robot/photos.dm +++ /dev/null @@ -1,13 +0,0 @@ -/mob/living/silicon/robot/proc/photosync() - var/obj/item/device/camera/siliconcam/master_cam = connected_ai ? connected_ai.aiCamera : null - if (!master_cam) - return - - var/synced - synced = 0 - for(var/datum/picture/z in aiCamera.aipictures) - if (!(master_cam.aipictures.Find(z))) - aiCamera.printpicture(null, z) - synced = 1 - if(synced) - to_chat(src, SPAN_NOTICE("Locally saved images synced with AI. Images were retained in local database in case of loss of connection with the AI.")) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm deleted file mode 100644 index 888b484fab06..000000000000 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ /dev/null @@ -1,994 +0,0 @@ -GLOBAL_LIST_INIT(robot_verbs_default, list( - /mob/living/silicon/robot/proc/sensor_mode -)) - -#define CYBORG_POWER_USAGE_MULTIPLIER 2.5 // Multiplier for amount of power cyborgs use. - -/mob/living/silicon/robot - name = "Robot" - real_name = "Robot" - icon = 'icons/mob/robots.dmi' - icon_state = "robot" - maxHealth = 500 - health = 500 - - var/lights_on = 0 // Is our integrated light on? - var/used_power_this_tick = 0 - var/sight_mode = 0 - var/custom_name = "" - var/crisis //Admin-settable for combat module use. - var/crisis_override = 0 - var/integrated_light_power = 6 - -//Hud stuff - - var/atom/movable/screen/cells = null - var/atom/movable/screen/inv1 = null - var/atom/movable/screen/inv2 = null - var/atom/movable/screen/inv3 = null - -//3 Modules can be activated at any one time. - var/obj/item/circuitboard/robot_module/module = null - var/obj/module_active = null - var/obj/module_state_1 = null - var/obj/module_state_2 = null - var/obj/module_state_3 = null - - var/obj/item/device/radio/borg/radio = null - var/mob/living/silicon/ai/connected_ai = null - var/obj/item/cell/cell = null - var/obj/structure/machinery/camera/camera = null - - // Components are basically robot organs. - var/list/components = list() - - var/obj/item/device/mmi/mmi = null - - //var/obj/item/device/pda/ai/rbPDA = null - - var/opened = 0 - var/wiresexposed = 0 - var/locked = 1 - var/has_power = 1 - var/list/req_access = list(ACCESS_MARINE_ENGINEERING, ACCESS_CIVILIAN_ENGINEERING) - var/ident = 0 - //var/list/laws = list() - var/viewalerts = 0 - var/modtype = "Default" - var/lower_mod = 0 - var/jetpack = 0 - var/datum/effect_system/ion_trail_follow/ion_trail = null - var/datum/effect_system/spark_spread/spark_system //So they can initialize sparks whenever/N - var/jeton = 0 - var/borgwires = 31 // 0b11111 - var/killswitch = 0 - var/killswitch_time = 60 - var/weapon_lock = 0 - var/weaponlock_time = 120 - var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default - var/lawcheck[1] //For stating laws. - var/ioncheck[1] //Ditto. - var/lockcharge //Used when locking down a borg to preserve cell charge - speed = 0 //Cause sec borgs gotta go fast //No they dont! - var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them. - var/braintype = "Cyborg" - -/mob/living/silicon/robot/New(loc, syndie = 0, unfinished = 0) - spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(5, 0, src) - spark_system.attach(src) - - add_language(LANGUAGE_APOLLO, 1) - - ident = rand(1, 999) - updatename("Default") - update_icons() - - if(syndie) - if(!cell) - cell = new /obj/item/cell(src) - - lawupdate = 0 - scrambledcodes = 1 - cell.maxcharge = 25000 - cell.charge = 25000 - module = new /obj/item/circuitboard/robot_module/syndicate(src) - hands.icon_state = "standard" - icon_state = "secborg" - modtype = "Security" - init() - - radio = new /obj/item/device/radio/borg(src) - if(!scrambledcodes && !camera) - camera = new /obj/structure/machinery/camera(src) - camera.c_tag = real_name - camera.network = list("SS13","Robots") - if(isWireCut(5)) // 5 = BORG CAMERA - camera.status = 0 - - initialize_components() - //if(!unfinished) - // Create all the robot parts. - for(var/V in components) if(V != "power cell") - var/datum/robot_component/C = components[V] - C.installed = 1 - C.wrapped = new C.external_type - - if(!cell) - cell = new /obj/item/cell(src) - cell.maxcharge = 25000 - cell.charge = 25000 - - ..() - - if(cell) - var/datum/robot_component/cell_component = components["power cell"] - cell_component.wrapped = cell - cell_component.installed = 1 - - add_robot_verbs() - -/mob/living/silicon/robot/proc/init() - aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src) - connected_ai = select_active_ai_with_fewest_borgs() - if(connected_ai) - connected_ai.connected_robots += src - photosync() - lawupdate = 1 - else - lawupdate = 0 - - // playsound(loc, 'sound/voice/liveagain.ogg', 75, 1) - -// setup the PDA and its name -/*/mob/living/silicon/robot/proc/setup_PDA() - if (!rbPDA) - rbPDA = new/obj/item/device/pda/ai(src) - rbPDA.set_name_and_job(custom_name,"[modtype] [braintype]")*/ - -//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO -//Improved /N -/mob/living/silicon/robot/Destroy() - if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside. - var/turf/turf = get_turf(loc)//To hopefully prevent run time errors. - if(turf) mmi.forceMove(turf) - if(mind) mind.transfer_to(mmi.brainmob) - mmi = null - QDEL_NULL(aiCamera) - QDEL_NULL(spark_system) - QDEL_NULL(module) - module_active = null - module_state_1 = null - module_state_2 = null - module_state_3 = null - QDEL_NULL(radio) - connected_ai = null - QDEL_NULL(cell) - QDEL_NULL(camera) - QDEL_LIST_ASSOC_VAL(components) - . = ..() - -/mob/living/silicon/robot/proc/pick_module() - if(module) - return - var/list/modules = list("Standard", "Engineering", "Surgeon", "Medic", "Janitor", "Service", "Security") - modtype = tgui_input_list(usr, "Please, select a module!", "Robot", modules) - - var/module_sprites[0] //Used to store the associations between sprite names and sprite index. - - if(module) - return - - switch(modtype) - if("Standard") - module = new /obj/item/circuitboard/robot_module/standard(src) - module.channels = list(RADIO_CHANNEL_COMMAND = 1, RADIO_CHANNEL_MP = 0, SQUAD_MARINE_1 = 0, SQUAD_MARINE_2 = 0, SQUAD_MARINE_3 = 0, SQUAD_MARINE_4 = 0, RADIO_CHANNEL_ENGI = 0, RADIO_CHANNEL_MEDSCI = 0, RADIO_CHANNEL_REQ = 0 ) - module_sprites["Default"] = "robot" - module_sprites["Droid"] = "droid" - module_sprites["Drone"] = "drone-standard" - - if("Service") - module = new /obj/item/circuitboard/robot_module/butler(src) - module.channels = list(RADIO_CHANNEL_COMMAND = 1, RADIO_CHANNEL_MP = 0, SQUAD_MARINE_1 = 0, SQUAD_MARINE_2 = 0, SQUAD_MARINE_3 = 0, SQUAD_MARINE_4 = 0, RADIO_CHANNEL_ENGI = 0, RADIO_CHANNEL_MEDSCI = 0, RADIO_CHANNEL_REQ = 0 ) - module_sprites["Default"] = "Service2" - module_sprites["Rich"] = "maximillion" - module_sprites["Drone"] = "drone-service" - - if("Medic") - module = new /obj/item/circuitboard/robot_module/medic(src) - module.channels = list(RADIO_CHANNEL_COMMAND = 1, RADIO_CHANNEL_MP = 0, SQUAD_MARINE_1 = 0, SQUAD_MARINE_2 = 0, SQUAD_MARINE_3 = 0, SQUAD_MARINE_4 = 0, RADIO_CHANNEL_ENGI = 0, RADIO_CHANNEL_MEDSCI = 1, RADIO_CHANNEL_REQ = 0 ) - if(camera && ("Robots" in camera.network)) - camera.network.Add("Medical") - module_sprites["Standard"] = "surgeon" - module_sprites["Advanced Droid"] = "droid-medical" - module_sprites["Needles"] = "medicalrobot" - module_sprites["Drone"] = "drone-medical" - - if("Surgeon") - module = new /obj/item/circuitboard/robot_module/surgeon(src) - module.channels = list(RADIO_CHANNEL_COMMAND = 1, RADIO_CHANNEL_MP = 0, SQUAD_MARINE_1 = 0, SQUAD_MARINE_2 = 0, SQUAD_MARINE_3 = 0, SQUAD_MARINE_4 = 0, RADIO_CHANNEL_ENGI = 0, RADIO_CHANNEL_MEDSCI = 1, RADIO_CHANNEL_REQ = 0 ) - if(camera && ("Robots" in camera.network)) - camera.network.Add("Medical") - module_sprites["Standard"] = "surgeon" - module_sprites["Advanced Droid"] = "droid-medical" - module_sprites["Needles"] = "medicalrobot" - module_sprites["Drone"] = "drone-medical" - - if("Security") - module = new /obj/item/circuitboard/robot_module/security(src) - module.channels = list(RADIO_CHANNEL_COMMAND = 1, RADIO_CHANNEL_MP = 1, SQUAD_MARINE_1 = 0, SQUAD_MARINE_2 = 0, SQUAD_MARINE_3 = 0, SQUAD_MARINE_4 = 0, RADIO_CHANNEL_ENGI = 0, RADIO_CHANNEL_MEDSCI = 0, RADIO_CHANNEL_REQ = 0 ) - module_sprites["Bloodhound"] = "bloodhound" - module_sprites["Bloodhound - Treaded"] = "secborg+tread" - module_sprites["Drone"] = "drone-sec" - - if("Engineering") - module = new /obj/item/circuitboard/robot_module/engineering(src) - module.channels = list(RADIO_CHANNEL_COMMAND = 1, RADIO_CHANNEL_MP = 0, SQUAD_MARINE_1 = 0, SQUAD_MARINE_2 = 0, SQUAD_MARINE_3 = 0, SQUAD_MARINE_4 = 0, RADIO_CHANNEL_ENGI = 1, RADIO_CHANNEL_MEDSCI = 0, RADIO_CHANNEL_REQ = 0 ) - if(camera && ("Robots" in camera.network)) - camera.network.Add("Engineering") - module_sprites["Landmate"] = "landmate" - module_sprites["Landmate - Treaded"] = "engiborg+tread" - module_sprites["Drone"] = "drone-engineer" - - if("Janitor") - module = new /obj/item/circuitboard/robot_module/janitor(src) - module.channels = list(RADIO_CHANNEL_COMMAND = 1, RADIO_CHANNEL_MP = 0, SQUAD_MARINE_1 = 0, SQUAD_MARINE_2 = 0, SQUAD_MARINE_3 = 0, SQUAD_MARINE_4 = 0, RADIO_CHANNEL_ENGI = 0, RADIO_CHANNEL_MEDSCI = 0, RADIO_CHANNEL_REQ = 0 ) - module_sprites["Mop Gear Rex"] = "mopgearrex" - module_sprites["Drone"] = "drone-janitor" - - //languages - module.add_languages(src) - - hands.icon_state = lowertext(modtype) - updatename() - - if(modtype == "Medic" || modtype == "Security" || modtype == "Surgeon") - status_flags &= ~CANPUSH - - choose_icon(6,module_sprites) - radio.config(module.channels) - -/mob/living/silicon/robot/proc/updatename(prefix as text) - if(prefix) - modtype = prefix - if(mmi) - braintype = "Cyborg" - else - braintype = "Robot" - - var/changed_name = "" - if(custom_name) - changed_name = custom_name - else - changed_name = "[modtype] [braintype]-[num2text(ident)]" - - change_real_name(src, changed_name) - - // if we've changed our name, we also need to update the display name for our PDA - //setup_PDA() - - //We also need to update name of internal camera. - if (camera) - camera.c_tag = changed_name - - -/mob/living/silicon/robot/verb/Namepick() - set category = "Robot Commands" - if(custom_name) - return 0 - - spawn(0) - var/newname - newname = input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text - if (newname != "") - custom_name = newname - - updatename() - update_icons() - -/mob/living/silicon/robot/verb/cmd_robot_alerts() - set category = "Robot Commands" - set name = "Show Alerts" - robot_alerts() - -// this verb lets cyborgs see the stations manifest -/mob/living/silicon/robot/verb/cmd_station_manifest() - set category = "Robot Commands" - set name = "Show Crew Manifest" - show_station_manifest() - - -/mob/living/silicon/robot/proc/robot_alerts() - var/dat = "Current Station Alerts\n" - dat += "Close

" - for (var/cat in alarms) - dat += text("[cat]
\n") - var/list/alarmlist = alarms[cat] - if (alarmlist.len) - for (var/area_name in alarmlist) - var/datum/alarm/alarm = alarmlist[area_name] - dat += "" - dat += text("-- [area_name]") - if (alarm.sources.len > 1) - dat += text("- [alarm.sources.len] sources") - dat += "
\n" - else - dat += "-- All Systems Nominal
\n" - dat += "
\n" - - viewalerts = 1 - src << browse(dat, "window=robotalerts&can_close=0") - -/mob/living/silicon/robot/proc/self_diagnosis() - if(!is_component_functioning("diagnosis unit")) - return null - - var/dat = "[src.name] Self-Diagnosis Report\n" - for (var/V in components) - var/datum/robot_component/C = components[V] - dat += "[C.name]
Brute Damage:[C.brute_damage]
Electronics Damage:[C.electronics_damage]
Powered:[(!C.idle_usage || C.is_powered()) ? "Yes" : "No"]
Toggled:[ C.toggled ? "Yes" : "No"]

" - - return dat - -/mob/living/silicon/robot/verb/toggle_lights() - set category = "Robot Commands" - set name = "Toggle Lights" - - lights_on = !lights_on - to_chat(usr, "You [lights_on ? "enable" : "disable"] your integrated light.") - if(lights_on) - set_light(integrated_light_power) // 1.5x luminosity of flashlight - else - set_light(0) - -/mob/living/silicon/robot/verb/self_diagnosis_verb() - set category = "Robot Commands" - set name = "Self Diagnosis" - - if(!is_component_functioning("diagnosis unit")) - to_chat(src, SPAN_DANGER("Your self-diagnosis component isn't functioning.")) - - var/datum/robot_component/CO = get_component("diagnosis unit") - if (!cell_use_power(CO.active_usage)) - to_chat(src, SPAN_DANGER("Low Power.")) - var/dat = self_diagnosis() - src << browse(dat, "window=robotdiagnosis") - - -/mob/living/silicon/robot/verb/toggle_component() - set category = "Robot Commands" - set name = "Toggle Component" - set desc = "Toggle a component, conserving power." - - var/list/installed_components = list() - for(var/V in components) - if(V == "power cell") continue - var/datum/robot_component/C = components[V] - if(C.installed) - installed_components += V - - var/toggle = tgui_input_list(src, "Which component do you want to toggle?", "Toggle Component", installed_components) - if(!toggle) - return - - var/datum/robot_component/C = components[toggle] - if(C.toggled) - C.toggled = 0 - to_chat(src, SPAN_DANGER("You disable [C.name].")) - else - C.toggled = 1 - to_chat(src, SPAN_DANGER("You enable [C.name].")) - -// this function displays jetpack pressure in the stat panel -/mob/living/silicon/robot/proc/show_jetpack_pressure() - // if you have a jetpack, show the internal tank pressure - var/obj/item/tank/jetpack/current_jetpack = installed_jetpack() - if (current_jetpack) - stat("Internal Atmosphere Info", current_jetpack.name) - stat("Tank Pressure", current_jetpack.return_pressure()) - - -// this function returns the robots jetpack, if one is installed -/mob/living/silicon/robot/proc/installed_jetpack() - if(module) - return (locate(/obj/item/tank/jetpack) in module.modules) - return 0 - - -// this function displays the cyborgs current cell charge in the stat panel -/mob/living/silicon/robot/proc/show_cell_power() - if(cell) - stat(null, text("Charge Left: [round(cell.percent())]%")) - stat(null, text("Cell Rating: [round(cell.maxcharge)]")) // Round just in case we somehow get crazy values - stat(null, text("Power Cell Load: [round(used_power_this_tick)]W")) - else - stat(null, text("No Cell Inserted!")) - - -/mob/living/silicon/robot/is_mob_restrained() - return 0 - -/mob/living/silicon/robot/bullet_act(obj/projectile/Proj) - ..(Proj) - if(prob(75) && Proj.damage > 0) spark_system.start() - return 2 - -/mob/living/silicon/robot/Collide(atom/A) - ..() - if (istype(A, /obj/structure/machinery/recharge_station)) - var/obj/structure/machinery/recharge_station/F = A - F.move_inside() - return - - -/mob/living/silicon/robot/triggerAlarm(class, area/A, list/cameralist, source) - if (stat == 2) - return 1 - - ..() - - queueAlarm(text("--- [class] alarm detected in [A.name]!"), class) - - -/mob/living/silicon/robot/cancelAlarm(class, area/A as area, obj/origin) - var/has_alarm = ..() - - if (!has_alarm) - queueAlarm(text("--- [class] alarm in [A.name] has been cleared."), class, 0) -// if (viewalerts) robot_alerts() - return has_alarm - - -/mob/living/silicon/robot/attackby(obj/item/W as obj, mob/user as mob) - if (istype(W, /obj/item/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do - return - - if(opened) // Are they trying to insert something? - for(var/V in components) - var/datum/robot_component/C = components[V] - if(!C.installed && istype(W, C.external_type)) - C.installed = 1 - C.wrapped = W - C.install() - if(user.drop_held_item()) - W.moveToNullspace() - var/obj/item/robot_parts/robot_component/WC = W - if(istype(WC)) - C.brute_damage = WC.brute - C.electronics_damage = WC.burn - - to_chat(usr, SPAN_NOTICE(" You install the [W.name].")) - - return - - if (iswelder(W)) - if(!HAS_TRAIT(W, TRAIT_TOOL_BLOWTORCH)) - to_chat(user, SPAN_WARNING("You need a stronger blowtorch!")) - return - if (src == user) - to_chat(user, SPAN_WARNING("You lack the reach to be able to repair yourself.")) - return - - if (!getBruteLoss()) - to_chat(user, "Nothing to fix here!") - return - var/obj/item/tool/weldingtool/WT = W - if (WT.remove_fuel(0)) - apply_damage(-30, BRUTE) - updatehealth() - add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text(SPAN_DANGER("[user] has fixed some of the dents on [src]!")), SHOW_MESSAGE_VISIBLE) - else - to_chat(user, "Need more welding fuel!") - return - - else if(istype(W, /obj/item/stack/cable_coil) && (wiresexposed || ismaintdrone(src))) - if (!getFireLoss()) - to_chat(user, "Nothing to fix here!") - return - var/obj/item/stack/cable_coil/coil = W - if (coil.use(1)) - apply_damage(-30, BURN) - updatehealth() - for(var/mob/O in viewers(user, null)) - O.show_message(text(SPAN_DANGER("[user] has fixed some of the burnt wires on [src]!")), SHOW_MESSAGE_VISIBLE) - - else if (HAS_TRAIT(W, TRAIT_TOOL_CROWBAR)) // crowbar means open or close the cover - if(opened) - if(cell) - to_chat(user, "You close the cover.") - opened = 0 - update_icons() - else if(wiresexposed && isWireCut(1) && isWireCut(2) && isWireCut(3) && isWireCut(4) && isWireCut(5)) - //Cell is out, wires are exposed, remove MMI, produce damaged chassis, baleet original mob. - if(!mmi) - to_chat(user, "\The [src] has no brain to remove.") - return - - to_chat(user, "You jam the crowbar into the robot and begin levering [mmi].") - sleep(30) - to_chat(user, "You damage some parts of the chassis, but eventually manage to rip out [mmi]!") - var/obj/item/robot_parts/robot_suit/C = new/obj/item/robot_parts/robot_suit(loc) - C.l_leg = new/obj/item/robot_parts/leg/l_leg(C) - C.r_leg = new/obj/item/robot_parts/leg/r_leg(C) - C.l_arm = new/obj/item/robot_parts/arm/l_arm(C) - C.r_arm = new/obj/item/robot_parts/arm/r_arm(C) - C.updateicon() - new/obj/item/robot_parts/chest(loc) - qdel(src) - else - // Okay we're not removing the cell or an MMI, but maybe something else? - var/list/removable_components = list() - for(var/V in components) - if(V == "power cell") continue - var/datum/robot_component/C = components[V] - if(C.installed == 1 || C.installed == -1) - removable_components += V - - var/remove = tgui_input_list(user, "Which component do you want to pry out?", "Remove Component", removable_components) - if(!remove) - return - var/datum/robot_component/C = components[remove] - var/obj/item/robot_parts/robot_component/I = C.wrapped - to_chat(user, "You remove \the [I].") - if(istype(I)) - I.brute = C.brute_damage - I.burn = C.electronics_damage - - I.forceMove(src.loc) - - if(C.installed == 1) - C.uninstall() - C.installed = 0 - - else - if(locked) - to_chat(user, "The cover is locked and cannot be opened.") - else - to_chat(user, "You open the cover.") - opened = 1 - update_icons() - - else if (istype(W, /obj/item/cell) && opened) // trying to put a cell inside - var/datum/robot_component/C = components["power cell"] - if(wiresexposed) - to_chat(user, "Secure the wiring with a screwdriver first.") - else if(cell) - to_chat(user, "There is a power cell already installed.") - else - if(user.drop_inv_item_to_loc(W, src)) - cell = W - to_chat(user, "You insert the power cell.") - - C.installed = 1 - C.wrapped = W - C.install() - //This will mean that removing and replacing a power cell will repair the mount, but I don't care at this point. ~Z - C.brute_damage = 0 - C.electronics_damage = 0 - - else if (HAS_TRAIT(W, TRAIT_TOOL_WIRECUTTERS) || HAS_TRAIT(W, TRAIT_TOOL_MULTITOOL)) - if (wiresexposed) - interact(user) - else - to_chat(user, "You can't reach the wiring.") - - else if(HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER) && opened && !cell) // haxing - wiresexposed = !wiresexposed - to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]") - update_icons() - - else if(HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER) && opened && cell) // radio - if(radio) - radio.attackby(W,user)//Push it to the radio to let it handle everything - else - to_chat(user, "Unable to locate a radio.") - update_icons() - - else if(istype(W, /obj/item/device/encryptionkey/) && opened) - if(radio)//sanityyyyyy - radio.attackby(W,user)//GTFO, you have your own procs - else - to_chat(user, "Unable to locate a radio.") - - else if(istype(W, /obj/item/robot/upgrade/)) - var/obj/item/robot/upgrade/U = W - if(!opened) - to_chat(usr, "You must access the borgs internals!") - else if(!src.module && U.require_module) - to_chat(usr, "The borg must choose a module before he can be upgraded!") - else if(U.locked) - to_chat(usr, "The upgrade is locked and cannot be used yet!") - else - if(U.action(src)) - to_chat(usr, "You apply the upgrade to [src]!") - if(usr.drop_held_item()) - U.forceMove(src) - else - to_chat(usr, "Upgrade error!") - - - else - if( !(istype(W, /obj/item/device/robotanalyzer) || istype(W, /obj/item/device/healthanalyzer)) ) - spark_system.start() - return ..() - -/mob/living/silicon/robot/verb/unlock_own_cover() - set category = "Robot Commands" - set name = "Toggle Cover" - set desc = "Toggle your cover open and closed." - if(stat == DEAD) - return //won't work if dead - if(!opened) - opened = 1 - to_chat(usr, "You open your cover.") - else - opened = 0 - to_chat(usr, "You close your cover.") - -/mob/living/silicon/robot/attack_animal(mob/living/M as mob) - if(M.melee_damage_upper == 0) - M.emote("[M.friendly] [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 25, 1) - for(var/mob/O in viewers(src, null)) - O.show_message(SPAN_DANGER("[M] [M.attacktext] [src]!"), SHOW_MESSAGE_VISIBLE) - last_damage_data = create_cause_data(initial(M.name), M) - M.attack_log += text("\[[time_stamp()]\] attacked [key_name(src)]") - src.attack_log += text("\[[time_stamp()]\] was attacked by [key_name(M)]") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - apply_damage(damage, BRUTE) - updatehealth() - - -/mob/living/silicon/robot/attack_hand(mob/user) - - add_fingerprint(user) - - if(opened && !wiresexposed && (!isRemoteControlling(user))) - var/datum/robot_component/cell_component = components["power cell"] - if(cell) - cell.update_icon() - cell.add_fingerprint(user) - user.put_in_active_hand(cell) - to_chat(user, "You remove \the [cell].") - cell = null - cell_component.wrapped = null - cell_component.installed = 0 - update_icons() - else if(cell_component.installed == -1) - cell_component.installed = 0 - var/obj/item/broken_device = cell_component.wrapped - to_chat(user, "You remove \the [broken_device].") - user.put_in_active_hand(broken_device) - -/mob/living/silicon/robot/proc/allowed(mob/M) - //check if it doesn't require any access at all - if(check_access(null)) - return 1 - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - //if they are holding or wearing a card that has access, that works - if(check_access(H.get_active_hand()) || check_access(H.wear_id)) - return 1 - return 0 - -/mob/living/silicon/robot/proc/check_access(obj/item/card/id/I) - if(!istype(req_access, /list)) //something's very wrong - return 1 - - var/list/L = req_access - if(!L.len) //no requirements - return 1 - if(!I || !istype(I, /obj/item/card/id) || !I.access) //not ID or no access - return 0 - for(var/req in req_access) - if(req in I.access) //have one of the required accesses - return 1 - return 0 - -/mob/living/silicon/robot/update_icons() - - overlays.Cut() - if(stat == 0) - overlays += "eyes" - overlays.Cut() - overlays += "eyes-[icon_state]" - else - overlays -= "eyes" - - if(opened) - if(wiresexposed) - overlays += "ov-openpanel +w" - else if(cell) - overlays += "ov-openpanel +c" - else - overlays += "ov-openpanel -c" - -/mob/living/silicon/robot/proc/installed_modules() - if(weapon_lock) - to_chat(src, SPAN_DANGER("Weapon lock active, unable to use modules! Count:[weaponlock_time]")) - return - - if(!module) - pick_module() - return - var/dat = "Modules\n" - dat += {" - Activated Modules -
- Module 1: [module_state_1 ? "[module_state_1]" : "No Module"]
- Module 2: [module_state_2 ? "
[module_state_2]" : "No Module"]
- Module 3: [module_state_3 ? "
[module_state_3]" : "No Module"]
-
- Installed Modules

"} - - - for (var/obj in module.modules) - if (!obj) - dat += text("Resource depleted
") - else if(activated(obj)) - dat += text("[obj]: Activated
") - else - dat += text("[obj]:
Activate
") -/* - if(activated(obj)) - dat += text("[obj]: \[Activated|Deactivate\]
") - else - dat += text("[obj]: \[Activate|Deactivated\]
") -*/ - src << browse(dat, "window=robotmod") - - -/mob/living/silicon/robot/Topic(href, href_list) - ..() - - if(usr != src) - return - - if (href_list["showalerts"]) - robot_alerts() - return - - if (href_list["mod"]) - var/obj/item/O = locate(href_list["mod"]) - if (istype(O) && (O.loc == src)) - O.attack_self(src) - - if (href_list["act"]) - var/obj/item/O = locate(href_list["act"]) - if (!istype(O)) - return - - if(!((O in src.module.modules) || (O == src.module.emag))) - return - - if(activated(O)) - to_chat(src, "Already activated") - return - if(!module_state_1) - module_state_1 = O - O.layer = ABOVE_HUD_LAYER - O.plane = ABOVE_HUD_PLANE - contents += O - if(istype(module_state_1,/obj/item/robot/sight)) - sight_mode |= module_state_1:sight_mode - else if(!module_state_2) - module_state_2 = O - O.layer = ABOVE_HUD_LAYER - O.plane = ABOVE_HUD_PLANE - contents += O - if(istype(module_state_2,/obj/item/robot/sight)) - sight_mode |= module_state_2:sight_mode - else if(!module_state_3) - module_state_3 = O - O.layer = ABOVE_HUD_LAYER - O.plane = ABOVE_HUD_PLANE - contents += O - if(istype(module_state_3,/obj/item/robot/sight)) - sight_mode |= module_state_3:sight_mode - else - to_chat(src, "You need to disable a module first!") - installed_modules() - - if (href_list["deact"]) - var/obj/item/O = locate(href_list["deact"]) - if(activated(O)) - if(module_state_1 == O) - module_state_1 = null - contents -= O - else if(module_state_2 == O) - module_state_2 = null - contents -= O - else if(module_state_3 == O) - module_state_3 = null - contents -= O - else - to_chat(src, "Module isn't activated.") - else - to_chat(src, "Module isn't activated") - installed_modules() - - return - -/mob/living/silicon/robot/proc/radio_menu() - radio.interact(src)//Just use the radio's Topic() instead of bullshit special-snowflake code - - -/mob/living/silicon/robot/Move(a, b, flag) - if (!is_component_functioning("actuator")) - return 0 - - var/datum/robot_component/actuator/AC = get_component("actuator") - if (!cell_use_power(AC.active_usage)) - return 0 - - . = ..() - - if(module) - if(module.type == /obj/item/circuitboard/robot_module/janitor) - var/turf/tile = loc - if(isturf(tile)) - for(var/A in tile) - if(istype(A, /obj/effect)) - if(istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay)) - qdel(A) - else if(istype(A, /obj/item)) - var/obj/item/cleaned_item = A - cleaned_item.clean_blood() - else if(istype(A, /mob/living/carbon/human)) - var/mob/living/carbon/human/cleaned_human = A - if(cleaned_human.body_position == LYING_DOWN) - if(cleaned_human.head) - cleaned_human.head.clean_blood() - cleaned_human.update_inv_head(0) - if(cleaned_human.wear_suit) - cleaned_human.wear_suit.clean_blood() - cleaned_human.update_inv_wear_suit(0) - else if(cleaned_human.w_uniform) - cleaned_human.w_uniform.clean_blood() - cleaned_human.update_inv_w_uniform(0) - if(cleaned_human.shoes) - cleaned_human.shoes.clean_blood() - cleaned_human.update_inv_shoes(0) - cleaned_human.clean_blood(1) - to_chat(cleaned_human, SPAN_WARNING("[src] cleans your face!")) - return - -/mob/living/silicon/robot/proc/self_destruct() - robogibs() - return - -/mob/living/silicon/robot/proc/UnlinkSelf() - if (src.connected_ai) - src.connected_ai = null - lawupdate = 0 - lockcharge = 0 - //canmove = 1 // Yes this will probably break something, whatevver it is - scrambledcodes = 1 - //Disconnect it's camera so it's not so easily tracked. - if(src.camera) - src.camera.network = list() - GLOB.cameranet.removeCamera(src.camera) - - -/mob/living/silicon/robot/proc/ResetSecurityCodes() - set category = "Robot Commands" - set name = "Reset Identity Codes" - set desc = "Scrambles your security and identification codes and resets your current buffers. Unlocks you and but permanently severs you from your AI and the robotics console and will deactivate your camera system." - - var/mob/living/silicon/robot/R = src - - if(R) - R.UnlinkSelf() - to_chat(R, "Buffers flushed and reset. Camera system shutdown. All systems operational.") - remove_verb(src, /mob/living/silicon/robot/proc/ResetSecurityCodes) - -/mob/living/silicon/robot/mode() - set name = "Activate Held Object" - set category = "IC" - set src = usr - - var/obj/item/W = get_active_hand() - if (W) - W.attack_self(src) - - return - -/mob/living/silicon/robot/proc/choose_icon(triesleft, list/module_sprites) - - if(triesleft<1 || !module_sprites.len) - return - else - triesleft-- - - var/icontype = tgui_input_list(usr, "Select an icon! [triesleft ? "You have [triesleft] more chances." : "This is your last try."]", "Robot", module_sprites) - - if(icontype) - icon_state = module_sprites[icontype] - else - to_chat(src, "Something is badly wrong with the sprite selection. Harass a coder.") - icon_state = module_sprites[1] - return - - overlays -= "eyes" - update_icons() - - if (triesleft >= 1) - var/choice = tgui_input_list(usr, "Look at your icon - is this what you want?", "Icon", list("Yes","No")) - if(choice=="No") - choose_icon(triesleft, module_sprites) - else - triesleft = 0 - return - else - to_chat(src, "Your icon has been set. You now require a module reset to change it.") - -/mob/living/silicon/robot/proc/sensor_mode() //Medical/Security HUD controller for borgs - set name = "Set Sensor Augmentation" - set category = "Robot Commands" - set desc = "Augment visual feed with internal sensor overlays." - toggle_sensor_mode() - -/mob/living/silicon/robot/proc/add_robot_verbs() - add_verb(src, GLOB.robot_verbs_default) - -/mob/living/silicon/robot/proc/remove_robot_verbs() - remove_verb(src, GLOB.robot_verbs_default) - -// Uses power from cyborg's cell. Returns 1 on success or 0 on failure. -// Properly converts using CELLRATE now! Amount is in Joules. -/mob/living/silicon/robot/proc/cell_use_power(amount = 0) - // No cell inserted - if(!cell) - return 0 - - // Power cell is empty. - if(cell.charge == 0) - return 0 - - if(cell.use(amount * CELLRATE * CYBORG_POWER_USAGE_MULTIPLIER)) - used_power_this_tick += amount * CYBORG_POWER_USAGE_MULTIPLIER - return 1 - return 0 - -/mob/living/silicon/robot/hear_apollo() - if(is_component_functioning("comms")) - var/datum/robot_component/RC = get_component("comms") - use_power(RC.active_usage) - return TRUE - return FALSE - - - - - - -/mob/living/silicon/robot/update_sight() - if (stat == DEAD || sight_mode & BORGXRAY) - sight |= SEE_TURFS - sight |= SEE_MOBS - sight |= SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM - else if (sight_mode & BORGMESON && sight_mode & BORGTHERM) - sight |= SEE_TURFS - sight |= SEE_MOBS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM - else if (sight_mode & BORGMESON) - sight |= SEE_TURFS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM - else if (sight_mode & BORGTHERM) - sight |= SEE_MOBS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - else if (stat != DEAD) - sight &= ~SEE_MOBS - sight &= ~SEE_TURFS - sight &= ~SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm deleted file mode 100644 index 78b6b78445e0..000000000000 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ /dev/null @@ -1,148 +0,0 @@ -/mob/living/silicon/robot/updatehealth() - if(status_flags & GODMODE) - health = maxHealth - set_stat(CONSCIOUS) - return - health = maxHealth - (getBruteLoss() + getFireLoss()) - return - -/mob/living/silicon/robot/getBruteLoss() - var/amount = 0 - for(var/V in components) - var/datum/robot_component/C = components[V] - if(C.installed != 0) amount += C.brute_damage - return amount - -/mob/living/silicon/robot/getFireLoss() - var/amount = 0 - for(var/V in components) - var/datum/robot_component/C = components[V] - if(C.installed != 0) amount += C.electronics_damage - return amount - -/mob/living/silicon/robot/adjustBruteLoss(amount) - if(amount > 0) - take_overall_damage(amount, 0) - else - heal_overall_damage(-amount, 0) - -/mob/living/silicon/robot/adjustFireLoss(amount) - if(amount > 0) - take_overall_damage(0, amount) - else - heal_overall_damage(0, -amount) - -/mob/living/silicon/robot/proc/get_damaged_components(brute, burn, destroyed = 0) - var/list/datum/robot_component/parts = list() - for(var/V in components) - var/datum/robot_component/C = components[V] - if(C.installed == 1 || (C.installed == -1 && destroyed)) - if((brute && C.brute_damage) || (burn && C.electronics_damage) || (!C.toggled) || (!C.powered && C.toggled)) - parts += C - return parts - -/mob/living/silicon/robot/proc/get_damageable_components() - var/list/rval = new - for(var/V in components) - var/datum/robot_component/C = components[V] - if(C.installed == 1) rval += C - return rval - -/mob/living/silicon/robot/proc/get_armour() - - if(!components.len) return 0 - var/datum/robot_component/C = components["armour"] - if(C && C.installed == 1) - return C - return 0 - -/mob/living/silicon/robot/heal_limb_damage(brute, burn) - var/list/datum/robot_component/parts = get_damaged_components(brute,burn) - if(!parts.len) return - var/datum/robot_component/picked = pick(parts) - picked.heal_damage(brute,burn) - -/mob/living/silicon/robot/take_limb_damage(brute = 0, burn = 0, sharp = 0, edge = 0) - var/list/components = get_damageable_components() - if(!components.len) - return - - //Combat shielding absorbs a percentage of damage directly into the cell. - if(module_active && istype(module_active,/obj/item/robot/combat/shield)) - var/obj/item/robot/combat/shield/shield = module_active - //Shields absorb a certain percentage of damage based on their power setting. - var/absorb_brute = brute*shield.shield_level - var/absorb_burn = burn*shield.shield_level - var/cost = (absorb_brute+absorb_burn)*100 - - cell.charge -= cost - if(cell.charge <= 0) - cell.charge = 0 - to_chat(src, SPAN_DANGER("Your shield has overloaded!")) - else - brute -= absorb_brute - burn -= absorb_burn - to_chat(src, SPAN_DANGER("Your shield absorbs some of the impact!")) - - var/datum/robot_component/armour/A = get_armour() - if(A) - A.take_damage(brute,burn,sharp,edge) - return - - var/datum/robot_component/C = pick(components) - C.take_damage(brute,burn,sharp,edge) - -/mob/living/silicon/robot/heal_overall_damage(brute, burn) - var/list/datum/robot_component/parts = get_damaged_components(brute,burn) - - while(parts.len && (brute>0 || burn>0) ) - var/datum/robot_component/picked = pick(parts) - - var/brute_was = picked.brute_damage - var/burn_was = picked.electronics_damage - - picked.heal_damage(brute,burn) - - brute -= (brute_was-picked.brute_damage) - burn -= (burn_was-picked.electronics_damage) - - parts -= picked - -/mob/living/silicon/robot/take_overall_damage(brute = 0, burn = 0, sharp = 0, used_weapon = null) - if(status_flags & GODMODE) return //godmode - var/list/datum/robot_component/parts = get_damageable_components() - - //Combat shielding absorbs a percentage of damage directly into the cell. - if(module_active && istype(module_active,/obj/item/robot/combat/shield)) - var/obj/item/robot/combat/shield/shield = module_active - //Shields absorb a certain percentage of damage based on their power setting. - var/absorb_brute = brute*shield.shield_level - var/absorb_burn = burn*shield.shield_level - var/cost = (absorb_brute+absorb_burn)*100 - - cell.charge -= cost - if(cell.charge <= 0) - cell.charge = 0 - to_chat(src, SPAN_DANGER("Your shield has overloaded!")) - else - brute -= absorb_brute - burn -= absorb_burn - to_chat(src, SPAN_DANGER("Your shield absorbs some of the impact!")) - - var/datum/robot_component/armour/A = get_armour() - if(A) - A.take_damage(brute,burn,sharp) - return - - while(parts.len && (brute>0 || burn>0) ) - var/datum/robot_component/picked = pick(parts) - - var/brute_was = picked.brute_damage - var/burn_was = picked.electronics_damage - - picked.take_damage(brute,burn) - - brute -= (picked.brute_damage - brute_was) - burn -= (picked.electronics_damage - burn_was) - - parts -= picked diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm deleted file mode 100644 index 6b29a47be3ea..000000000000 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ /dev/null @@ -1,93 +0,0 @@ -// A special pen for service droids. Can be toggled to switch between normal writting mode, and paper rename mode -// Allows service droids to rename paper items. - -/obj/item/tool/pen/robopen - desc = "A black ink printing attachment with a paper naming mode." - name = "Printing Pen" - var/mode = 1 - -/obj/item/tool/pen/robopen/attack_self(mob/user) - ..() - - var/choice = tgui_input_list(usr, "Would you like to change color or mode?", "Change Mode", list("Colour","Mode")) - if(!choice) - return - - playsound(src.loc, 'sound/effects/pop.ogg', 25, FALSE) - - switch(choice) - if("Colour") - var/newcolour = tgui_input_list(usr, "Which color would you like to use?", list("black","blue","red","green","yellow")) - if(newcolour) pen_colour = newcolour - if("Mode") - if (mode == 1) - mode = 2 - else - mode = 1 - to_chat(user, "Changed printing mode to '[mode == 2 ? "Rename Paper" : "Write Paper"]'") - -// Copied over from paper's rename verb -// see code\modules\paperwork\paper.dm line 62 - -/obj/item/tool/pen/robopen/proc/RenamePaper(mob/user as mob,obj/paper as obj) - if ( !user || !paper ) - return - var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling", null) as text - if ( !user || !paper ) - return - - n_name = copytext(n_name, 1, 32) - if(( get_dist(user,paper) <= 1 && user.stat == 0)) - paper.name = "paper[(n_name ? text("- '[n_name]'") : null)]" - add_fingerprint(user) - return - -//TODO: Add prewritten forms to dispense when you work out a good way to store the strings. -/obj/item/form_printer - //name = "paperwork printer" - name = "paper dispenser" - icon = 'icons/obj/items/paper.dmi' - icon_state = "paper_bin1" - item_state = "sheet-metal" - -/obj/item/form_printer/attack(mob/living/carbon/M, mob/living/carbon/user) - return - -/obj/item/form_printer/afterattack(atom/target, mob/living/user, flag, params) - if(!target || !flag) - return - - if(istype(target,/obj/structure/surface/table)) - deploy_paper(get_turf(target)) - -/obj/item/form_printer/attack_self(mob/user) - ..() - deploy_paper(get_turf(src)) - -/obj/item/form_printer/proc/deploy_paper(turf/T) - T.visible_message(SPAN_NOTICE("\The [src.loc] dispenses a sheet of crisp white paper.")) - new /obj/item/paper(T) - - -//Personal shielding for the combat module. -/obj/item/robot/combat/shield - name = "personal shielding" - desc = "A powerful experimental module that turns aside or absorbs incoming attacks at the cost of charge." - icon = 'icons/obj/structures/props/decals.dmi' - icon_state = "shock" - var/shield_level = 0.5 //Percentage of damage absorbed by the shield. - -/obj/item/robot/combat/shield/verb/set_shield_level() - set name = "Set shield level" - set category = "Object" - set src in range(0) - - var/N = tgui_input_list(usr, "How much damage should the shield absorb?", "Shield level", list("5","10","25","50","75","100")) - if (N) - shield_level = text2num(N)/100 - -/obj/item/robot/combat/mobility - name = "mobility module" - desc = "By retracting limbs and tucking in its head, a combat android can roll at high speeds." - icon = 'icons/obj/structures/props/decals.dmi' - icon_state = "shock" diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm deleted file mode 100644 index ef8d160cca7c..000000000000 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ /dev/null @@ -1,23 +0,0 @@ -/mob/living/silicon/robot/Process_Spaceslipping(prob_slip) - if(module && (istype(module,/obj/item/circuitboard/robot_module/drone))) - return 0 - ..(prob_slip) - -/mob/living/silicon/robot/Process_Spacemove() - if(module) - for(var/obj/item/tank/jetpack/J in module.modules) - if(J && istype(J, /obj/item/tank/jetpack)) - if(J.allow_thrust(0.01)) return 1 - if(..()) return 1 - return 0 - -//No longer needed, but I'll leave it here incase we plan to re-use it. -/mob/living/silicon/robot/movement_delay() - . = ..() - - if(module_active && istype(module_active, /obj/item/robot/combat/mobility)) - . -= 3 - - . += CONFIG_GET(number/robot_delay) - - move_delay = . diff --git a/code/modules/mob/living/silicon/robot/wires.dm b/code/modules/mob/living/silicon/robot/wires.dm deleted file mode 100644 index 62d05abe6e13..000000000000 --- a/code/modules/mob/living/silicon/robot/wires.dm +++ /dev/null @@ -1,147 +0,0 @@ -#define BORG_WIRE_LAWCHECK 1 -#define BORG_WIRE_MAIN_POWER1 2 -#define BORG_WIRE_MAIN_POWER2 3 -#define BORG_WIRE_AI_CONTROL 4 -#define BORG_WIRE_CAMERA 5 - -/proc/RandomBorgWires() - //to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else). - var/list/Borgwires = list(0, 0, 0, 0, 0) - GLOB.BorgIndexToFlag = list(0, 0, 0, 0, 0) - GLOB.BorgIndexToWireColor = list(0, 0, 0, 0, 0) - GLOB.BorgWireColorToIndex = list(0, 0, 0, 0, 0) - var/flagIndex = 1 - //I think it's easier to read this way, also doesn't rely on the random number generator to land on a new wire. - var/list/colorIndexList = list(BORG_WIRE_LAWCHECK, BORG_WIRE_MAIN_POWER1, BORG_WIRE_MAIN_POWER2, BORG_WIRE_AI_CONTROL, BORG_WIRE_CAMERA) - for (var/flag=1, flag<=16, flag+=flag) - var/colorIndex = pick(colorIndexList) - if (Borgwires[colorIndex]==0) - Borgwires[colorIndex] = flag - GLOB.BorgIndexToFlag[flagIndex] = flag - GLOB.BorgIndexToWireColor[flagIndex] = colorIndex - GLOB.BorgWireColorToIndex[colorIndex] = flagIndex - colorIndexList -= colorIndex // Shortens the list. - //world.log << "Flag: [flag], CIndex: [colorIndex], FIndex: [flagIndex]" - flagIndex+=1 - return Borgwires - -/mob/living/silicon/robot/proc/isWireColorCut(wireColor) - var/wireFlag = GLOB.BorgWireColorToFlag[wireColor] - return ((src.borgwires & wireFlag) == 0) - -/mob/living/silicon/robot/proc/isWireCut(wireIndex) - var/wireFlag = GLOB.BorgIndexToFlag[wireIndex] - return ((src.borgwires & wireFlag) == 0) - -/mob/living/silicon/robot/proc/cut(wireColor) - var/wireFlag = GLOB.BorgWireColorToFlag[wireColor] - var/wireIndex = GLOB.BorgWireColorToIndex[wireColor] - borgwires &= ~wireFlag - switch(wireIndex) - if(BORG_WIRE_LAWCHECK) //Cut the law wire, and the borg will no longer receive law updates from its AI - if (src.lawupdate == 1) - to_chat(src, "LawSync protocol engaged.") - src.show_laws() - if (BORG_WIRE_AI_CONTROL) //Cut the AI wire to reset AI control - if (src.connected_ai) - src.connected_ai = null - if (BORG_WIRE_CAMERA) - if(camera && camera.status && !scrambledcodes) - camera.toggle_cam_status(usr, TRUE) // Will kick anyone who is watching the Cyborg's camera. - - src.interact(usr) - -/mob/living/silicon/robot/proc/mend(wireColor) - var/wireFlag = GLOB.BorgWireColorToFlag[wireColor] - var/wireIndex = GLOB.BorgWireColorToIndex[wireColor] - borgwires |= wireFlag - switch(wireIndex) - if(BORG_WIRE_LAWCHECK) //turns law updates back on assuming the borg hasn't been emagged - if (src.lawupdate == 0) - src.lawupdate = 1 - if(BORG_WIRE_CAMERA) - if(camera && !camera.status && !scrambledcodes) - camera.toggle_cam_status(usr, TRUE) // Will kick anyone who is watching the Cyborg's camera. - - src.interact(usr) - - -/mob/living/silicon/robot/proc/pulse(wireColor) - var/wireIndex = GLOB.BorgWireColorToIndex[wireColor] - switch(wireIndex) - if(BORG_WIRE_LAWCHECK) //Forces a law update if the borg is set to receive them. Since an update would happen when the borg checks its laws anyway, not much use, but eh - if (src.lawupdate) - src.photosync() - - if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI - src.connected_ai = select_active_ai() - - if (BORG_WIRE_CAMERA) - if(camera && camera.status && !scrambledcodes) - camera.toggle_cam_status(src, TRUE) // Kick anyone watching the Cyborg's camera, doesn't display you disconnecting the camera. - to_chat(usr, "[src]'s camera lens focuses loudly.") - to_chat(src, "Your camera lens focuses loudly.") - - src.interact(usr) - -/mob/living/silicon/robot/proc/interact(mob/user) - if(wiresexposed && (!isRemoteControlling(user))) - user.set_interaction(src) - var/t1 = text("Access Panel
\n") - var/list/Borgwires = list( - "Orange" = 1, - "Dark red" = 2, - "White" = 3, - "Yellow" = 4, - "Blue" = 5, - ) - for(var/wiredesc in Borgwires) - var/is_uncut = src.borgwires & GLOB.BorgWireColorToFlag[Borgwires[wiredesc]] - t1 += "[wiredesc] wire: " - if(!is_uncut) - t1 += "Mend" - else - t1 += "Cut " - t1 += "Pulse " - t1 += "
" - t1 += text("
\n[(src.lawupdate ? "The LawSync light is on." : "The LawSync light is off.")]
\n[(src.connected_ai ? "The AI link light is on." : "The AI link light is off.")]") - t1 += text("
\n[((!isnull(src.camera) && src.camera.status == 1) ? "The Camera light is on." : "The Camera light is off.")]
\n") - t1 += text("

Close

\n") - user << browse(t1, "window=borgwires") - onclose(user, "borgwires") - -/mob/living/silicon/robot/Topic(href, href_list) - ..() - if (((in_range(src, usr) && istype(src.loc, /turf))) && !isRemoteControlling(usr)) - usr.set_interaction(src) - if (href_list["borgwires"]) - var/t1 = text2num(href_list["borgwires"]) - var/obj/item/held_item = usr.get_held_item() - if (!held_item || !HAS_TRAIT(held_item, TRAIT_TOOL_WIRECUTTERS)) - to_chat(usr, SPAN_WARNING("You need wirecutters!")) - return - if (src.isWireColorCut(t1)) - src.mend(t1) - else - src.cut(t1) - else if (href_list["pulse"]) - var/t1 = text2num(href_list["pulse"]) - var/obj/item/held_item = usr.get_held_item() - if (!held_item || !HAS_TRAIT(held_item, TRAIT_TOOL_MULTITOOL)) - to_chat(usr, SPAN_WARNING("You need a multitool!")) - return - if (src.isWireColorCut(t1)) - to_chat(usr, SPAN_WARNING("You can't pulse a cut wire.")) - return - else - src.pulse(t1) - else if (href_list["close2"]) - close_browser(usr, "borgwires") - usr.unset_interaction() - return - -#undef BORG_WIRE_LAWCHECK -#undef BORG_WIRE_MAIN_POWER1 -#undef BORG_WIRE_MAIN_POWER2 -#undef BORG_WIRE_AI_CONTROL -#undef BORG_WIRE_CAMERA diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 3ee58585b524..aaf648b00a50 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -8,9 +8,6 @@ return speak_statement -#define IS_AI 1 -#define IS_ROBOT 2 - /mob/living/silicon/say_understands(mob/other, datum/language/speaking = null) //These only pertain to common. Languages are handled by mob/say_understands() if (!speaking) @@ -42,15 +39,6 @@ if(!findtext(message, "*", 2)) //Second asterisk means it is markup for *bold*, not an *emote. return emote(lowertext(copytext(message,2))) - var/bot_type = 0 //Let's not do a fuck ton of type checks, thanks. - if(isAI(src)) - bot_type = IS_AI - else if(isrobot(src)) - bot_type = IS_ROBOT - - var/mob/living/silicon/ai/AI = src //and let's not declare vars over and over and over for these guys. - var/mob/living/silicon/robot/R = src - //Must be concious to speak if (stat) return @@ -91,84 +79,13 @@ if(M.client) to_chat(M, "[src] transmits, \")[message]\"") return - if(message_mode && bot_type == IS_ROBOT && !R.is_component_functioning("radio")) - to_chat(src, SPAN_DANGER("Your radio isn't functional at this time.")) - return - switch(message_mode) if("department") - switch(bot_type) - if(IS_AI) - return AI.holopad_talk(message) - if(IS_ROBOT) - log_say("[key_name(src)] : [message]") - R.radio.talk_into(src,message,message_mode,verb,speaking) return 1 - if("general") - switch(bot_type) - if(IS_AI) - if (AI.aiRadio.disabledAi) - to_chat(src, SPAN_DANGER("System Error - Transceiver Disabled")) - return - else - log_say("[key_name(src)] : [message]") - AI.aiRadio.talk_into(src,message,null,verb,speaking) - if(IS_ROBOT) - log_say("[key_name(src)] : [message]") - R.radio.talk_into(src,message,null,verb,speaking) return 1 - else if(message_mode) - switch(bot_type) - if(IS_AI) - if (AI.aiRadio.disabledAi) - to_chat(src, SPAN_DANGER("System Error - Transceiver Disabled")) - return - else - log_say("[key_name(src)] : [message]") - AI.aiRadio.talk_into(src,message,message_mode,verb,speaking) - if(IS_ROBOT) - log_say("[key_name(src)] : [message]") - R.radio.talk_into(src,message,message_mode,verb,speaking) return 1 return ..(message,speaking,verb) - -//For holopads only. Usable by AI. -/mob/living/silicon/ai/proc/holopad_talk(message) - - log_say("[key_name(src)] : [message]") - - message = trim(message) - - if (!message) - return - - var/obj/structure/machinery/hologram/holopad/T = src.holo - if(T && T.hologram && T.master == src)//If there is a hologram and its master is the user. - var/verb = say_quote(message) - - //Human-like, sorta, heard by those who understand humans. - var/rendered_a = "[name] [verb], \"[message]\"" - //Speach distorted, heard by those who do not understand AIs. - var/message_stars = stars(message) - - var/rendered_b = "[voice_name] [verb], \"[message_stars]\"" - - to_chat(src, "Holopad transmitted, [real_name] [verb], [message]")//The AI can "hear" its own message. - for(var/mob/M in hearers(T.loc))//The location is the object, default distance. - if(M.say_understands(src))//If they understand AI speak. Humans and the like will be able to. - M.show_message(rendered_a, SHOW_MESSAGE_AUDIBLE) - else//If they do not. - M.show_message(rendered_b, SHOW_MESSAGE_AUDIBLE) - /*Radios "filter out" this conversation channel so we don't need to account for them. - This is another way of saying that we won't bother dealing with them.*/ - else - to_chat(src, "No holopad connected.") - return - return 1 - -#undef IS_AI -#undef IS_ROBOT diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 7f95e3d695b5..806c42d809f4 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -61,13 +61,6 @@ /mob/living/silicon/apply_effect(effect = 0, effecttype = STUN, blocked = 0) return 0//The only effect that can hit them atm is flashes and they still directly edit so this works for now -/proc/islinked(mob/living/silicon/robot/bot, mob/living/silicon/ai/ai) - if(!istype(bot) || !istype(ai)) - return 0 - if (bot.connected_ai == ai) - return 1 - return 0 - // this function shows health in the Status panel /mob/living/silicon/proc/show_system_integrity() diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 3e33df1411a6..47ea5c02a3d5 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -204,8 +204,6 @@ alone = 0 break if(alone && ian && puppies < 4) - if(near_camera(src) || near_camera(ian)) - return new /mob/living/simple_animal/corgi/puppy(loc) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 1e1c15d173b7..cb4d02cd28ec 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -6,7 +6,6 @@ minbodytemp = 0 maxbodytemp = 500 - var/obj/item/device/radio/borg/radio = null var/mob/living/silicon/ai/connected_ai = null var/obj/item/cell/cell = null var/obj/structure/machinery/camera/camera = null @@ -174,7 +173,6 @@ /mob/living/simple_animal/spiderbot/New() - radio = new /obj/item/device/radio/borg(src) camera = new /obj/structure/machinery/camera(src) camera.c_tag = "Spiderbot-[real_name]" camera.network = list("SS13") diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index d1b140305d60..a85765e6a507 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -131,7 +131,7 @@ return //Is the usr's mob type able to do this? - if(ishuman(usr) || isrobot(usr)) + if(ishuman(usr)) //Removing from inventory if(href_list["remove_inv"]) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f0e5bc48a855..5fb9dd4ab8ed 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -366,10 +366,6 @@ switch(type) if(/mob/living/carbon/human) possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc) - if(/mob/living/silicon/robot) - possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb) - if(/mob/living/silicon/ai) - possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc) possibleverbs -= verbs possibleverbs += "Cancel" // ...And one for the bottom diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 65489944211a..e0cf62e5ac87 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -56,9 +56,6 @@ if(istype(mob, /mob/living/carbon)) mob.swap_hand() - if(istype(mob,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/R = mob - R.cycle_modules() return @@ -71,8 +68,7 @@ /client/verb/drop_item() set hidden = TRUE - if(!isrobot(mob)) - mob.drop_item_v() + mob.drop_item_v() return diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 032888f26709..95c9227bd3d5 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -117,8 +117,6 @@ return 1 if(other.universal_speak) return 1 - if(isAI(src)) - return 1 if (istype(other, src.type) || istype(src, other.type)) return 1 return 0 diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 6dda93e4d9c2..520b58a30db6 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -50,79 +50,6 @@ return O -/mob/new_player/AIize() - spawning = TRUE - return ..() - -/mob/living/carbon/human/AIize() - if (monkeyizing) - return - for(var/t in limbs) - qdel(t) - - return ..() - -/mob/living/carbon/AIize() - if (monkeyizing) - return - for(var/obj/item/W in src) - drop_inv_item_on_ground(W) - monkeyizing = 1 - ADD_TRAIT(src, TRAIT_INCAPACITATED, "Terminal Monkeyziation") - icon = null - invisibility = 101 - return ..() - -/mob/proc/AIize() - return // this was unmaintained - - -//human -> robot -/mob/living/carbon/human/proc/Robotize() - if (monkeyizing) - return - for(var/obj/item/W in src) - drop_inv_item_on_ground(W) - regenerate_icons() - monkeyizing = 1 - ADD_TRAIT(src, TRAIT_INCAPACITATED, "Terminal Monkeyziation") - icon = null - invisibility = 101 - for(var/t in limbs) - qdel(t) - - var/mob/living/silicon/robot/O = new /mob/living/silicon/robot( loc ) - - // cyborgs produced by Robotize get an automatic power cell - O.cell = new(O) - O.cell.maxcharge = 7500 - O.cell.charge = 7500 - - - O.gender = gender - O.invisibility = 0 - - if(mind) //TODO - mind.transfer_to(O) - if(O.job == "Cyborg") - O.mind.original = O - else - O.key = key - if(O.client) O.client.change_view(GLOB.world_view_size) - - O.forceMove(loc) - O.job = "Cyborg" - if(O.job == "Cyborg") - O.mmi = new /obj/item/device/mmi(O) - - if(O.mmi) - O.mmi.transfer_identity(src) - - O.Namepick() - - qdel(src) - return O - //human -> alien /mob/living/carbon/human/proc/Alienize(list/types) if (monkeyizing) diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 46a30b313bb8..479c958239cf 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -166,7 +166,7 @@ nanoui is used to open and update nano browser uis set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) else if (allowed_user_stat == -1 || user == src_object) set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) - else if (isrobot(user)) + else if (isSilicon(user)) if (src_object in view(7, user)) // robots can see and interact with things they can see within 7 tiles set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) else diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index b572b5d9e87b..92e9766970ca 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -115,10 +115,7 @@ /obj/item/paper/attack_remote(mob/living/silicon/ai/user as mob) var/dist - if(istype(user) && user.camera) //is AI - dist = get_dist(src, user.camera) - else //cyborg or AI not seeing through a camera - dist = get_dist(src, user) + dist = get_dist(src, user) if(dist < 2) read_paper(user) else @@ -409,10 +406,7 @@ if(!p.on) to_chat(user, SPAN_NOTICE("Your pen is not on!")) return - if ( istype(P, /obj/item/tool/pen/robopen) && P:mode == 2 ) - P:RenamePaper(user,src) - else - show_browser(user, "[info_links][stamps]", name, name) // Update the window + show_browser(user, "[info_links][stamps]", name, name) // Update the window //openhelp(user) return diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index b47f630974e6..08711f295085 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -31,8 +31,6 @@ dat += "+

" else if(toner) dat += "Please insert paper to copy.

" - if(istype(user,/mob/living/silicon)) - dat += "Print photo from database

" dat += "Current toner level: [toner]" if(!toner) dat +="
Please insert a new toner cartridge!" @@ -111,27 +109,6 @@ if(copies < maxcopies) copies++ updateUsrDialog() - else if(href_list["aipic"]) - if(!istype(usr,/mob/living/silicon)) return - if(toner >= 5) - var/mob/living/silicon/tempAI = usr - var/obj/item/device/camera/siliconcam/camera = tempAI.aiCamera - - if(!camera) - return - var/datum/picture/selection = camera.selectpicture() - if (!selection) - return - - var/obj/item/photo/p = new /obj/item/photo (src.loc) - p.construct(selection) - if (p.desc == "") - p.desc += "Copied by [tempAI.name]" - else - p.desc += " - Copied by [tempAI.name]" - toner -= 5 - sleep(15) - updateUsrDialog() /obj/structure/machinery/photocopier/attackby(obj/item/O as obj, mob/user as mob) if(istype(O, /obj/item/paper)) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index cebb4ad613b0..c8b2195e3f37 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -17,6 +17,10 @@ item_state = "electropack" w_class = SIZE_TINY +/** Picture metadata */ +/datum/picture + var/name = "image" + var/list/fields = list() /* * photo * diff --git a/code/modules/paperwork/silicon_photography.dm b/code/modules/paperwork/silicon_photography.dm deleted file mode 100644 index 0a82fde5c88b..000000000000 --- a/code/modules/paperwork/silicon_photography.dm +++ /dev/null @@ -1,170 +0,0 @@ -/* -* AI-specific * -**************/ -/datum/picture - var/name = "image" - var/list/fields = list() - -/obj/item/device/camera/siliconcam - var/in_camera_mode = 0 - var/photos_taken = 0 - var/list/aipictures = list() - -/obj/item/device/camera/siliconcam/ai_camera //camera AI can take pictures with - name = "AI photo camera" - -/obj/item/device/camera/siliconcam/robot_camera //camera cyborgs can take pictures with - name = "Cyborg photo camera" - -/obj/item/device/camera/siliconcam/drone_camera //currently doesn't offer the verbs, thus cannot be used - name = "Drone photo camera" - -/obj/item/device/camera/siliconcam/proc/injectaialbum(datum/picture/P, sufix = "") //stores image information to a list similar to that of the datacore - photos_taken++ - P.fields["name"] = "Image [photos_taken][sufix]" - aipictures += P - -/obj/item/device/camera/siliconcam/proc/injectmasteralbum(datum/picture/P) //stores image information to a list similar to that of the datacore - var/mob/living/silicon/robot/C = src.loc - if(C.connected_ai) - var/mob/A = P.fields["author"] - C.connected_ai.aiCamera.injectaialbum(P, " (taken by [A.name])") - to_chat(C.connected_ai, SPAN_UNCONSCIOUS("Image recorded and saved by [name]")) - to_chat(usr, SPAN_UNCONSCIOUS("Image recorded and saved to remote database")) //feedback to the Cyborg player that the picture was taken - else - injectaialbum(P) - to_chat(usr, SPAN_UNCONSCIOUS("Image recorded")) - -/obj/item/device/camera/siliconcam/proc/selectpicture(obj/item/device/camera/siliconcam/cam) - if(!cam) - cam = getsource() - - var/list/nametemp = list() - var/find - if(cam.aipictures.len == 0) - to_chat(usr, SPAN_DANGER("No images saved")) - return - for(var/datum/picture/t in cam.aipictures) - nametemp += t.fields["name"] - find = tgui_input_list(usr, "Select image (numbered in order taken)", "Camera", nametemp) - - for(var/datum/picture/q in cam.aipictures) - if(q.fields["name"] == find) - return q - -/obj/item/device/camera/siliconcam/proc/viewpictures() - var/datum/picture/selection = selectpicture() - - if(!selection) - return - - var/obj/item/photo/P = new/obj/item/photo() - P.construct(selection) - P.show(usr) - to_chat(usr, P.desc) - - // TG uses a special garbage collector... qdel(P) - qdel(P) //so 10 thousand pictures items are not left in memory should an AI take them and then view them all. - -/obj/item/device/camera/siliconcam/proc/deletepicture() - var/datum/picture/selection = selectpicture() - - if(!selection) - return - - aipictures -= selection - to_chat(usr, SPAN_UNCONSCIOUS("Image deleted")) - -/obj/item/device/camera/siliconcam/proc/toggle_camera_mode() - if(in_camera_mode) - camera_mode_off() - else - camera_mode_on() - -/obj/item/device/camera/siliconcam/proc/camera_mode_off() - src.in_camera_mode = 0 - to_chat(usr, "Camera Mode deactivated") - -/obj/item/device/camera/siliconcam/proc/camera_mode_on() - src.in_camera_mode = 1 - to_chat(usr, "Camera Mode activated") - -/obj/item/device/camera/siliconcam/ai_camera/printpicture(mob/user, datum/picture/P) - injectaialbum(P) - to_chat(usr, SPAN_UNCONSCIOUS("Image recorded")) - -/obj/item/device/camera/siliconcam/robot_camera/printpicture(mob/user, datum/picture/P) - injectmasteralbum(P) - -/obj/item/device/camera/siliconcam/ai_camera/verb/take_image() - set category = "AI Commands" - set name = "Images - Snap" - set desc = "Takes an image" - set src in usr - - toggle_camera_mode() - -/obj/item/device/camera/siliconcam/ai_camera/verb/view_images() - set category = "AI Commands" - set name = "Images - View" - set desc = "View images" - set src in usr - - viewpictures() - -/obj/item/device/camera/siliconcam/ai_camera/verb/delete_images() - set category = "AI Commands" - set name = "Images - Delete" - set desc = "Delete image" - set src in usr - - deletepicture() - -/obj/item/device/camera/siliconcam/robot_camera/verb/take_image() - set category ="Robot Commands" - set name = "Images - Snap" - set desc = "Takes an image" - set src in usr - - toggle_camera_mode() - -/obj/item/device/camera/siliconcam/robot_camera/verb/view_images() - set category ="Robot Commands" - set name = "Images - View" - set desc = "View images" - set src in usr - - viewpictures() - -/obj/item/device/camera/siliconcam/robot_camera/verb/delete_images() - set category = "Robot Commands" - set name = "Images - Delete" - set desc = "Delete a local image" - set src in usr - - // Explicitly only allow deletion from the local camera - var/mob/living/silicon/robot/C = src.loc - if(C.connected_ai) - to_chat(C, "Not allowed to delete from the remote database.") - return - - deletepicture() - -/obj/item/device/camera/siliconcam/proc/getsource() - if(ismob(src.loc)) - var/mob/M = src.loc - if(isRemoteControlling(M)) - return src - - var/mob/living/silicon/robot/C = src.loc - var/obj/item/device/camera/siliconcam/Cinfo - if(C.connected_ai) - Cinfo = C.connected_ai.aiCamera - else - Cinfo = src - return Cinfo - -/mob/living/silicon/proc/GetPicture() - if(!aiCamera) - return - return aiCamera.selectpicture() diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm index 8e73124a8b92..d4e7d125094f 100644 --- a/code/modules/projectiles/gun_helpers.dm +++ b/code/modules/projectiles/gun_helpers.dm @@ -526,12 +526,7 @@ DEFINES in setup.dm, referenced here. return FALSE -//For the holster hotkey -/mob/living/silicon/robot/verb/holster_verb(unholster_number_offset = 1 as num) - set name = "holster" - set hidden = TRUE - uneq_active() - +///For the holster hotkey /mob/living/carbon/human/verb/holster_verb(unholster_number_offset = 1 as num) set name = "holster" set hidden = TRUE diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 85ed21543127..62b095ababbe 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -201,9 +201,6 @@ . = TRUE /obj/structure/machinery/chem_dispenser/attackby(obj/item/reagent_container/attacking_object, mob/user) - if(isrobot(user)) - return - if(istype(attacking_object, /obj/item/reagent_container/glass) || istype(attacking_object, /obj/item/reagent_container/food)) if(accept_beaker_only && istype(attacking_object,/obj/item/reagent_container/food)) to_chat(user, SPAN_NOTICE("This machine only accepts beakers")) diff --git a/code/modules/reagents/chemistry_reagents/other.dm b/code/modules/reagents/chemistry_reagents/other.dm index 45e66c182e6a..e334c8741b5a 100644 --- a/code/modules/reagents/chemistry_reagents/other.dm +++ b/code/modules/reagents/chemistry_reagents/other.dm @@ -585,18 +585,6 @@ custom_metabolism = AMOUNT_PER_TIME(1, 200 SECONDS) flags = REAGENT_NO_GENERATION -/datum/reagent/nanites - name = "Nanomachines" - id = "nanites" - description = "Microscopic construction robots." - reagent_state = LIQUID - color = "#535E66" // rgb: 83, 94, 102 - -/datum/reagent/nanites/reaction_mob(mob/M, method=TOUCH, volume) - src = null - if((prob(10) && method==TOUCH) || method==INGEST) - M.contract_disease(new /datum/disease/robotic_transformation(0),1) - /datum/reagent/xenomicrobes name = "Xenomicrobes" id = "xenomicrobes" diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 4c60a9e345e0..8e1390c778f6 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -101,7 +101,6 @@ // attack with item, place item on conveyor /obj/structure/machinery/conveyor/attackby(obj/item/I, mob/user) - if(isrobot(user)) return //Carn: fix for borgs dropping their modules on conveyor belts var/obj/item/grab/G = I if(istype(G)) // handle grabbed mob if(ismob(G.grabbed_thing)) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 1522f0100c4e..486251459e23 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -172,8 +172,6 @@ return TRUE return FALSE - if(isrobot(user)) - return if(!I) return @@ -503,10 +501,6 @@ if(istype(AM, /obj/item/smallDelivery) && !hasmob) var/obj/item/smallDelivery/T = AM destinationTag = T.sortTag - //Drones can mail themselves through maint. - if(istype(AM, /mob/living/silicon/robot/drone)) - var/mob/living/silicon/robot/drone/drone = AM - destinationTag = drone.mail_destination //Start the movement process //Argument is the disposal unit the holder started in diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 5fe3a7989898..7a9f032be444 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -184,11 +184,6 @@ All ShuttleMove procs go here . = ..() if(. & MOVE_AREA) . |= MOVE_CONTENTS - GLOB.cameranet.removeCamera(src) - -/obj/structure/machinery/camera/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation) - . = ..() - GLOB.cameranet.addCamera(src) /obj/structure/machinery/atmospherics/pipe/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation) . = ..() diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index 96cc72970f3b..9f0cfde8b74c 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(shuttle_controls) if(..(user)) return - if(!allowed(user) || ismaintdrone(user)) + if(!allowed(user)) to_chat(user, SPAN_WARNING("Access denied.")) return 1 diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm index e43c5c2375a1..c29f83a981d1 100644 --- a/code/modules/tgui/states.dm +++ b/code/modules/tgui/states.dm @@ -80,13 +80,6 @@ return UI_UPDATE */ -/mob/living/silicon/robot/shared_ui_interaction(src_object) - // Disable UIs if the object isn't installed in the borg AND the borg is either locked, has a dead cell, or no cell. - var/atom/device = src_object - if((istype(device) && device.loc != src) && (!cell || cell.charge <= 0 || lockcharge)) - return UI_DISABLED - return ..() - /** * public * diff --git a/code/modules/tgui/states/default.dm b/code/modules/tgui/states/default.dm index fa0a90f613f4..2ad35ef92143 100644 --- a/code/modules/tgui/states/default.dm +++ b/code/modules/tgui/states/default.dm @@ -25,12 +25,3 @@ GLOBAL_DATUM_INIT(default_state, /datum/ui_state/default, new) //if(. == UI_INTERACTIVE && !src.IsAdvancedToolUser())) // unhandy living mobs can only look, not touch. // return UI_UPDATE -/mob/living/silicon/ai/default_can_use_topic(src_object) - . = shared_ui_interaction(src_object) - if(. < UI_INTERACTIVE) - return - - // The AI can interact with anything it can see nearby, or with cameras while wireless control is enabled. - if(!control_disabled && can_see(src_object)) - return UI_INTERACTIVE - return UI_CLOSE diff --git a/colonialmarines.dme b/colonialmarines.dme index 16b54d55aa98..3c08c12313bc 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -192,7 +192,6 @@ #include "code\_onclick\ai.dm" #include "code\_onclick\click.dm" #include "code\_onclick\click_hold.dm" -#include "code\_onclick\cyborg.dm" #include "code\_onclick\double_click.dm" #include "code\_onclick\drag_drop.dm" #include "code\_onclick\human.dm" @@ -211,7 +210,6 @@ #include "code\_onclick\hud\other_mobs.dm" #include "code\_onclick\hud\radial.dm" #include "code\_onclick\hud\radial_persistent.dm" -#include "code\_onclick\hud\robot.dm" #include "code\_onclick\hud\screen_object_holder.dm" #include "code\_onclick\hud\screen_objects.dm" #include "code\_onclick\hud\yautja.dm" @@ -414,7 +412,6 @@ #include "code\datums\diseases\pierrot_throat.dm" #include "code\datums\diseases\plasmatoid.dm" #include "code\datums\diseases\rhumba_beat.dm" -#include "code\datums\diseases\robotic_transformation.dm" #include "code\datums\diseases\xeno_transformation.dm" #include "code\datums\diseases\advance\advance.dm" #include "code\datums\diseases\advance\presets.dm" @@ -849,10 +846,7 @@ #include "code\game\machinery\camera\camera.dm" #include "code\game\machinery\camera\motion.dm" #include "code\game\machinery\camera\presets.dm" -#include "code\game\machinery\camera\tracking.dm" #include "code\game\machinery\camera\wires.dm" -#include "code\game\machinery\computer\ai_core.dm" -#include "code\game\machinery\computer\aifixer.dm" #include "code\game\machinery\computer\almayer_control.dm" #include "code\game\machinery\computer\arcade.dm" #include "code\game\machinery\computer\area_air_control.dm" @@ -875,6 +869,7 @@ #include "code\game\machinery\computer\prisoner.dm" #include "code\game\machinery\computer\research.dm" #include "code\game\machinery\computer\robot.dm" +#include "code\game\machinery\computer\robots_props.dm" #include "code\game\machinery\computer\security.dm" #include "code\game\machinery\computer\sentencing.dm" #include "code\game\machinery\computer\skills.dm" @@ -1051,7 +1046,6 @@ #include "code\game\objects\items\devices\aicard.dm" #include "code\game\objects\items\devices\autopsy_scanner.dm" #include "code\game\objects\items\devices\binoculars.dm" -#include "code\game\objects\items\devices\camera_bug.dm" #include "code\game\objects\items\devices\cictablet.dm" #include "code\game\objects\items\devices\cloaking.dm" #include "code\game\objects\items\devices\clue_scanner.dm" @@ -1122,7 +1116,6 @@ #include "code\game\objects\items\props\souto_land.dm" #include "code\game\objects\items\reagent_containers\autoinjectors.dm" #include "code\game\objects\items\reagent_containers\blood_pack.dm" -#include "code\game\objects\items\reagent_containers\borghydro.dm" #include "code\game\objects\items\reagent_containers\dropper.dm" #include "code\game\objects\items\reagent_containers\food.dm" #include "code\game\objects\items\reagent_containers\glass.dm" @@ -1130,6 +1123,7 @@ #include "code\game\objects\items\reagent_containers\pill.dm" #include "code\game\objects\items\reagent_containers\reagent_container.dm" #include "code\game\objects\items\reagent_containers\robodropper.dm" +#include "code\game\objects\items\reagent_containers\robot_parts.dm" #include "code\game\objects\items\reagent_containers\spray.dm" #include "code\game\objects\items\reagent_containers\syringes.dm" #include "code\game\objects\items\reagent_containers\food\cans.dm" @@ -1147,9 +1141,6 @@ #include "code\game\objects\items\reagent_containers\food\snacks\meat.dm" #include "code\game\objects\items\reagent_containers\glass\bottle.dm" #include "code\game\objects\items\reagent_containers\glass\bottle\robot.dm" -#include "code\game\objects\items\robot\robot_items.dm" -#include "code\game\objects\items\robot\robot_parts.dm" -#include "code\game\objects\items\robot\robot_upgrades.dm" #include "code\game\objects\items\stacks\barbed_wire.dm" #include "code\game\objects\items\stacks\cable_coil.dm" #include "code\game\objects\items\stacks\catwalk.dm" @@ -2028,43 +2019,11 @@ #include "code\modules\mob\living\carbon\xenomorph\mutators\strains\ravager\berserker.dm" #include "code\modules\mob\living\carbon\xenomorph\mutators\strains\ravager\hedgehog.dm" #include "code\modules\mob\living\carbon\xenomorph\mutators\strains\runner\acid.dm" -#include "code\modules\mob\living\silicon\alarm.dm" #include "code\modules\mob\living\silicon\death.dm" #include "code\modules\mob\living\silicon\login.dm" #include "code\modules\mob\living\silicon\say.dm" #include "code\modules\mob\living\silicon\silicon.dm" -#include "code\modules\mob\living\silicon\ai\ai.dm" -#include "code\modules\mob\living\silicon\ai\death.dm" -#include "code\modules\mob\living\silicon\ai\examine.dm" -#include "code\modules\mob\living\silicon\ai\life.dm" -#include "code\modules\mob\living\silicon\ai\login.dm" -#include "code\modules\mob\living\silicon\ai\logout.dm" -#include "code\modules\mob\living\silicon\ai\say.dm" -#include "code\modules\mob\living\silicon\ai\freelook\cameranet.dm" -#include "code\modules\mob\living\silicon\ai\freelook\chunk.dm" -#include "code\modules\mob\living\silicon\ai\freelook\eye.dm" -#include "code\modules\mob\living\silicon\ai\freelook\read_me.dm" -#include "code\modules\mob\living\silicon\ai\freelook\update_triggers.dm" #include "code\modules\mob\living\silicon\decoy\decoy.dm" -#include "code\modules\mob\living\silicon\robot\analyzer.dm" -#include "code\modules\mob\living\silicon\robot\component.dm" -#include "code\modules\mob\living\silicon\robot\death.dm" -#include "code\modules\mob\living\silicon\robot\examine.dm" -#include "code\modules\mob\living\silicon\robot\inventory.dm" -#include "code\modules\mob\living\silicon\robot\life.dm" -#include "code\modules\mob\living\silicon\robot\login.dm" -#include "code\modules\mob\living\silicon\robot\photos.dm" -#include "code\modules\mob\living\silicon\robot\robot.dm" -#include "code\modules\mob\living\silicon\robot\robot_damage.dm" -#include "code\modules\mob\living\silicon\robot\robot_items.dm" -#include "code\modules\mob\living\silicon\robot\robot_movement.dm" -#include "code\modules\mob\living\silicon\robot\wires.dm" -#include "code\modules\mob\living\silicon\robot\drone\drone.dm" -#include "code\modules\mob\living\silicon\robot\drone\drone_abilities.dm" -#include "code\modules\mob\living\silicon\robot\drone\drone_console.dm" -#include "code\modules\mob\living\silicon\robot\drone\drone_damage.dm" -#include "code\modules\mob\living\silicon\robot\drone\drone_items.dm" -#include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm" #include "code\modules\mob\living\simple_animal\bat.dm" #include "code\modules\mob\living\simple_animal\parrot.dm" #include "code\modules\mob\living\simple_animal\simple_animal.dm" @@ -2149,7 +2108,6 @@ #include "code\modules\paperwork\paperbin.dm" #include "code\modules\paperwork\photocopier.dm" #include "code\modules\paperwork\photography.dm" -#include "code\modules\paperwork\silicon_photography.dm" #include "code\modules\power\apc.dm" #include "code\modules\power\batteryrack.dm" #include "code\modules\power\breaker_box.dm"