From 64f9a502f9cf3500ab501905184f4c114a37b65f Mon Sep 17 00:00:00 2001 From: Atlantiscze Date: Mon, 1 Dec 2014 05:11:35 +0100 Subject: [PATCH] Mining robot module upgrade - Mining cyborgs can now properly work with drills. - Mining cyborgs have received ore scanner, crowbar, and limited version of magnetic gripper. - Mining cyborgs can now swap power cells inside mining drills, as well as upgrade them if provided better parts. - As a bonus, cyborgs can now see how much ore is in ore boxes (because it makes sense that cyborg which mined ton of ore can check how much ore it mined) --- code/game/machinery/cell_charger.dm | 11 ++++++++++- code/modules/mining/satchel_ore_boxdm.dm | 3 ++- .../mob/living/silicon/robot/drone/drone_items.dm | 7 +++++++ .../modules/mob/living/silicon/robot/robot_modules.dm | 3 +++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 171646c4b1..a02553cc77 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -79,7 +79,16 @@ updateicon() /obj/machinery/cell_charger/attack_ai(mob/user) - return + if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough + if(!src.charging) + return + + charging.loc = src.loc + charging.updateicon() + charging = null + update_icon() + user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.") + /obj/machinery/cell_charger/emp_act(severity) if(stat & (BROKEN|NOPOWER)) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 2ef5725d70..eb59630915 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -40,7 +40,8 @@ user << "That's an [src]." user << desc - if(!istype(user, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can check the contents of ore boxes. + // Borgs can now check contents too. + if((!istype(user, /mob/living/carbon/human)) && (!istype(user, /mob/living/silicon/robot))) return if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them. 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 1b25858215..e651b70b43 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -29,6 +29,13 @@ //Item currently being held. var/obj/item/wrapped = null +// VEEEEERY limited version for mining borgs. Basically only for swapping cells and upgrading the drills. +/obj/item/weapon/gripper/miner + can_hold = list( + /obj/item/weapon/cell, + /obj/item/weapon/stock_parts + ) + /obj/item/weapon/gripper/paperwork name = "paperwork gripper" desc = "A simple grasping tool for clerical work." diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 176b8c471b..9dddac9cca 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -367,6 +367,9 @@ src.modules += new /obj/item/weapon/storage/bag/ore(src) src.modules += new /obj/item/weapon/pickaxe/borgdrill(src) src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src) + src.modules += new /obj/item/weapon/gripper/miner(src) + src.modules += new /obj/item/weapon/mining_scanner(src) + src.modules += new /obj/item/weapon/crowbar(src) src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src) return