diff --git a/baystation12.dme b/baystation12.dme index 6bded644ac..f09b367b43 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1002,6 +1002,7 @@ #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\bees.dm" diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 61784e98c3..0f72177ca1 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -109,6 +109,10 @@ name = "Circuit board (Robotics Control)" build_path = "/obj/machinery/computer/robotics" origin_tech = "programming=3" +/obj/item/weapon/circuitboard/drone_control + name = "Circuit board (Drone Control)" + build_path = "/obj/machinery/computer/drone_control" + origin_tech = "programming=3" /obj/item/weapon/circuitboard/cloning name = "Circuit board (Cloning)" build_path = "/obj/machinery/computer/cloning" diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm index 043e98aaa5..801dce4c2e 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_console.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/computer.dmi' icon_state = "power" req_access = list(access_engine_equip) - circuit = "/obj/item/weapon/circuitboard/robotics" + circuit = "/obj/item/weapon/circuitboard/drone_control" //Used when pinging drones. var/drone_call_area = "Engineering" diff --git a/code/modules/mob/living/silicon/robot/drone/drone_damage.dm b/code/modules/mob/living/silicon/robot/drone/drone_damage.dm new file mode 100644 index 0000000000..57ffc89887 --- /dev/null +++ b/code/modules/mob/living/silicon/robot/drone/drone_damage.dm @@ -0,0 +1,24 @@ +//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(var/brute = 0, var/burn = 0, var/sharp = 0, var/used_weapon = null) + bruteloss += brute + fireloss += burn + +/mob/living/silicon/robot/drone/heal_overall_damage(var/brute, var/burn) + + bruteloss -= brute + fireloss -= burn + + if(bruteloss<0) bruteloss = 0 + if(fireloss<0) fireloss = 0 + +/mob/living/silicon/robot/drone/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0) + take_overall_damage(brute,burn) + +/mob/living/silicon/robot/drone/heal_organ_damage(var/brute, var/burn) + heal_overall_damage(brute,burn) + +/mob/living/silicon/robot/drone/getFireLoss() + return fireloss + +/mob/living/silicon/robot/drone/getBruteLoss() + return bruteloss \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 17025ed4d8..12b9ab83ae 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -104,6 +104,23 @@ else user << "\red Your gripper cannot hold \the [target]." + else if(istype(target,/obj/machinery/power/apc)) + var/obj/machinery/power/apc/A = target + if(A.opened) + if(A.cell) + + wrapped = A.cell + + A.cell.add_fingerprint(user) + A.cell.updateicon() + A.cell.loc = src + A.cell = null + + A.charging = 0 + A.update_icon() + + user.visible_message("\red [user] removes the power cell from [A]!", "You remove the power cell.") + //TODO: Matter decompiler. /obj/item/weapon/matter_decompiler @@ -140,12 +157,41 @@ stored_comms["plastic"]++ stored_comms["plastic"]++ return + + else if(istype(M,/mob/living/silicon/robot/drone) && M.stat == 2 && !M.client) + + var/mob/living/silicon/robot/drone/D = src.loc + + if(!istype(D)) + return + + D << "\red You begin decompiling the other drone." + + if(!do_after(D,50)) + D << "\red You need to remain still while decompiling such a large object." + return + + if(!M || !D) return + + D << "\red You carefully and thoroughly decompile your downed fellow, storing as much of its resources as you can within yourself." + + del(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 for(var/obj/W in T) //Different classes of items give different commodities. - if(istype(W,/obj/effect/spider/spiderling)) + if (istype(W,/obj/item/weapon/cigbutt)) + stored_comms["plastic"]++ + else if(istype(W,/obj/effect/spider/spiderling)) stored_comms["wood"]++ stored_comms["wood"]++ stored_comms["plastic"]++ diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index db0ccea0a7..6b3bea036b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -613,7 +613,7 @@ user << "Need more welding fuel!" return - else if(istype(W, /obj/item/weapon/cable_coil) && wiresexposed) + else if(istype(W, /obj/item/weapon/cable_coil) && (wiresexposed || istype(src,/mob/living/silicon/robot/drone))) if (!getFireLoss()) user << "Nothing to fix here!" return diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 8959bd1734..63d48df758 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -596,7 +596,7 @@ opened = 1 update_icon() else - if ( ((stat & BROKEN) || malfhack) \ + if (((stat & BROKEN) || malfhack) \ && !opened \ && W.force >= 5 \ && W.w_class >= 3.0 \ diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index c050941ea7..da3031ca92 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -610,8 +610,17 @@ // called when player tries to move while in a pipe relaymove(mob/user as mob) - if (user.stat) + + if(!istype(user,/mob/living)) return + + var/mob/living/U = user + + if (U.stat || U.last_special <= world.time) + return + + U.last_special = world.time+100 + if (src.loc) for (var/mob/M in hearers(src.loc.loc)) M << "CLONG, clong!" diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index f63a1c5f6c..0ce3f5b011 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -223,6 +223,15 @@ datum/design/robocontrol materials = list("$glass" = 2000, "sacid" = 20) build_path = "/obj/item/weapon/circuitboard/robotics" +datum/design/dronecontrol + name = "Circuit Design (Drone Control Console)" + desc = "Allows for the construction of circuit boards used to build a Drone Control console." + id = "dronecontrol" + req_tech = list("programming" = 4) + build_type = IMPRINTER + materials = list("$glass" = 2000, "sacid" = 20) + build_path = "/obj/item/weapon/circuitboard/drone_control" + datum/design/clonecontrol name = "Circuit Design (Cloning Machine Console)" desc = "Allows for the construction of circuit boards used to build a new Cloning Machine console." diff --git a/icons/obj/objects.dmi b/icons/obj/objects.dmi index 5fc98795d1..7fac7d1a03 100644 Binary files a/icons/obj/objects.dmi and b/icons/obj/objects.dmi differ