From 1a0ae534ddf288138ab66fc6397a80977b5bcf59 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 19 Mar 2019 10:20:17 +0100 Subject: [PATCH] Engineering Power Drones --- .../living/silicon/robot/drone/drone_unify.dm | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_unify.dm b/code/modules/mob/living/silicon/robot/drone/drone_unify.dm index 106c1351c6..535a12fb59 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_unify.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_unify.dm @@ -23,17 +23,43 @@ holder_type = /obj/item/weapon/holder/drone //var/selected_icon = null //Can be compared to "Wideborg" will tell us in the future if we ar eusing non standardized icon. + +/mob/living/silicon/robot/drone/unify/powerengineering + law_type = /datum/ai_laws/powerbank_drone + icon_state = "constructiondrone" + module_type = /obj/item/weapon/robot_module/drone/powerbank + //////////////////////////////////////// //DRONE MODULES //////////////////////////////////////// /obj/item/weapon/robot_module/drone/unify //yup this is nothing for now until we build more drone versions +/obj/item/weapon/robot_module/drone/powerbank + name = "Engineering Power drone module" + hide_on_manifest = 1 + channels = list("Engineering" = 1) + languages = list() + +/obj/item/weapon/robot_module/drone/powerbank/New() //Trading in the RCD for a Powergenerating device + ..() + src.modules += new /obj/item/device/dogborg/sleeper/compactor/drone(src) + cell.maxcharge = 100000 + cell.charge = 100000 //////////////////////////////////////// //DRONE LAWS //////////////////////////////////////// //TODO: Remake drone laws, Add subroutine clause "If no maintenance are active nor maintenance crew your duties include maintenance" //TODO: Unify Drone law system, might be impossible due to how the ..() are structured may need to look into how to add additional laws if add_inherent fails. +/datum/ai_laws/powerbank_drone + name = "Power Protocols" + law_header = "Power Protocols" + +/datum/ai_laws/powerbank_drone/New() + add_inherent_law("Do not interfere with the construction work of non-drones whenever possible.") + add_inherent_law("Repair, refit upgrade and restore power to your assigned vessel.") + add_inherent_law("Prevent unplanned damage to your assigned vessel wherever possible.") + ..() //////////////////////////////////////// //DRONE HELLO WORLD @@ -45,7 +71,14 @@ src << "Use :d to talk to other drones and say to speak silently to your nearby fellows." src << "You do not follow orders from anyone; not the AI, not humans, and not other synthetics.." - +/mob/living/silicon/robot/drone/powerbank/welcome_drone() + src << "You are a power restoration drone, an autonomous engineering and fabrication system.." + src << "You are assigned to a Sol Central construction project. The name is irrelevant. Your task is to complete power restoration and subsystem integration as soon as possible." + src << "Use :d to talk to other drones and say to speak silently to your nearby fellows." + src << "You do not follow orders from anyone; not the AI, not humans, and not other synthetics.." +/mob/living/silicon/robot/drone/unify/powerengineering/init() + ..() + flavor_text = "It's a bulky engineering drone stamped with a Sol Central glyph." //////////////////////////////////////// //DRONE ITEMS (mostly mods of other items) //////////////////////////////////////// @@ -67,6 +100,14 @@ /obj/machinery/computer/drone_control/mining req_access = list(access_mining) +/obj/item/device/dogborg/sleeper/compactor/drone //Janihound gut. But for drones to generate power from garbage + name = "Minor Biocombustion Engine" + desc = "A mounted garbage compactor unit with fuel processor." + icon_state = "compactor" + injection_chems = null //So they don't have all the same chems as the medihound! + compactor = TRUE + max_item_count = 50 //Douibled since its purpose is garbage combustion + //////////////////////////////////////// //DRONE FABRICATOR, ONE FOR ALL SYSTEM. //////////////////////////////////////// @@ -78,6 +119,7 @@ drone_type = null //Gonna try to set this later var/list/possible_drones = list("UNIFY Module (Same as Maintenance)" = /mob/living/silicon/robot/drone/unify, "Construction Module" = /mob/living/silicon/robot/drone/construction, + "Power Restoration Module" = /mob/living/silicon/robot/drone/unify/powerengineering, "Mining Module" = /mob/living/silicon/robot/drone/mining, "Security Module" = /mob/living/silicon/robot/drone/security, "Maintenance Module" = /mob/living/silicon/robot/drone,) @@ -86,6 +128,9 @@ //DRONE PROCS //////////////////////////////////////// //Drone Drone Procs +/mob/living/silicon/robot/drone/unify/powerengineering/updatename() + real_name = "engineering drone ([rand(100,999)])" + name = real_name /mob/living/silicon/robot/drone/unify/updatename() real_name = "Unified Drone Module ([rand(100,999)])" //UDMs, sounds kinda nice, maybe call them this Lore wise? name = real_name