From 3408f63f6df62bd503c2fc073af6f148edf3452a Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Mon, 9 Jan 2017 21:06:04 -0800 Subject: [PATCH] Borgs now have vision actions instead of items to toggle vision modes --- .../silicon/robot/robot_module_actions.dm | 8 +++++- .../mob/living/silicon/robot/robot_modules.dm | 28 +++++++++++++------ 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot_module_actions.dm b/code/modules/mob/living/silicon/robot/robot_module_actions.dm index 59ad0f59bf6..91a4dec8393 100644 --- a/code/modules/mob/living/silicon/robot/robot_module_actions.dm +++ b/code/modules/mob/living/silicon/robot/robot_module_actions.dm @@ -1,5 +1,7 @@ /datum/action/innate/robot_sight var/sight_mode = null + icon_icon = 'icons/obj/decals.dmi' + button_icon_state = "securearea" /datum/action/innate/robot_sight/Activate() var/mob/living/silicon/robot/R = owner @@ -17,10 +19,14 @@ name = "X-ray Vision" sight_mode = BORGXRAY -/datum/action/innate/sight/thermal +/datum/action/innate/robot_sight/thermal name = "Thermal Vision" sight_mode = BORGTHERM + icon_icon = 'icons/obj/clothing/glasses.dmi' + button_icon_state = "thermal" /datum/action/innate/robot_sight/meson name = "Meson Vision" sight_mode = BORGMESON + icon_icon = 'icons/obj/clothing/glasses.dmi' + button_icon_state = "meson" diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index dabb45a8e0c..6ba42633477 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -97,14 +97,15 @@ R.verbs |= subsystems for(var/A in module_actions) var/datum/action/act = new A() - A.grant(R) - R.module_actions += A + act.Grant(R) + R.module_actions += act /obj/item/weapon/robot_module/proc/remove_subsystems_and_actions(mob/living/silicon/robot/R) R.verbs -= subsystems for(var/datum/action/A in R.module_actions) A.Remove(R) - R.module_actions.cut() + qdel(A) + R.module_actions.Cut() /obj/item/weapon/robot_module/standard name = "standard robot module" @@ -174,6 +175,9 @@ name = "engineering robot module" module_type = "Engineer" subsystems = list(/mob/living/silicon/proc/subsystem_power_monitor) + module_actions = list( + /datum/action/innate/robot_sight/meson, + ) stacktypes = list( /obj/item/stack/sheet/metal/cyborg = 50, @@ -186,7 +190,6 @@ /obj/item/weapon/robot_module/engineering/New() ..() - modules += new /obj/item/borg/sight/meson(src) modules += new /obj/item/weapon/rcd/borg(src) modules += new /obj/item/weapon/extinguisher(src) modules += new /obj/item/weapon/weldingtool/largetank/cyborg(src) @@ -305,10 +308,13 @@ /obj/item/weapon/robot_module/miner name = "miner robot module" module_type = "Miner" + module_actions = list( + /datum/action/innate/robot_sight/meson, + ) + /obj/item/weapon/robot_module/miner/New() ..() - modules += new /obj/item/borg/sight/meson(src) modules += new /obj/item/weapon/storage/bag/ore/cyborg(src) modules += new /obj/item/weapon/pickaxe/drill/cyborg(src) modules += new /obj/item/weapon/shovel(src) @@ -325,10 +331,12 @@ /obj/item/weapon/robot_module/deathsquad name = "NT advanced combat module" module_type = "Malf" + module_actions = list( + /datum/action/innate/robot_sight/thermal, + ) /obj/item/weapon/robot_module/deathsquad/New() ..() - modules += new /obj/item/borg/sight/thermal(src) modules += new /obj/item/weapon/melee/energy/sword/cyborg(src) modules += new /obj/item/weapon/gun/energy/pulse/cyborg(src) modules += new /obj/item/weapon/crowbar(src) @@ -393,11 +401,13 @@ /obj/item/weapon/robot_module/combat name = "combat robot module" module_type = "Malf" + module_actions = list( + /datum/action/innate/robot_sight/thermal, + ) /obj/item/weapon/robot_module/combat/New() ..() modules += new /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg(src) - modules += new /obj/item/borg/sight/thermal(src) modules += new /obj/item/weapon/gun/energy/gun/cyborg(src) modules += new /obj/item/weapon/pickaxe/drill/jackhammer(src) modules += new /obj/item/borg/combat/shield(src) @@ -426,11 +436,13 @@ /obj/item/weapon/robot_module/alien/hunter name = "alien hunter module" module_type = "Standard" + module_actions = list( + /datum/action/innate/robot_sight/thermal, + ) /obj/item/weapon/robot_module/alien/hunter/New() modules += new /obj/item/weapon/melee/energy/alien/claws(src) modules += new /obj/item/device/flash/cyborg/alien(src) - modules += new /obj/item/borg/sight/thermal/alien(src) var/obj/item/weapon/reagent_containers/spray/alien/stun/S = new /obj/item/weapon/reagent_containers/spray/alien/stun(src) S.reagents.add_reagent("ether",250) //nerfed to sleeptoxin to make it less instant drop. modules += S