Merge pull request #9467 from shazbot194/KA_fix

Lets you remove KA mods from borgs
This commit is contained in:
variableundefined
2018-09-30 18:22:59 +08:00
committed by GitHub
2 changed files with 17 additions and 1 deletions

View File

@@ -653,10 +653,13 @@ var/list/robot_verbs_default = list(
var/datum/robot_component/C = components[V]
if(C.installed == 1 || C.installed == -1)
removable_components += V
if(module)
removable_components += module.custom_removals
var/remove = input(user, "Which component do you want to pry out?", "Remove Component") as null|anything in removable_components
if(!remove)
return
if(module && module.handle_custom_removal(remove, user, W, params))
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].")

View File

@@ -15,6 +15,7 @@
var/list/stacktypes
var/channels = list()
var/list/custom_removals = list()
/obj/item/robot_module/emp_act(severity)
@@ -103,6 +104,10 @@
qdel(A)
R.module_actions.Cut()
// Return true in an overridden subtype to prevent normal removal handling
/obj/item/robot_module/proc/handle_custom_removal(component_id, mob/living/user, obj/item/W, params)
return FALSE
/obj/item/robot_module/standard
name = "standard robot module"
module_type = "Standard"
@@ -325,6 +330,7 @@
module_actions = list(
/datum/action/innate/robot_sight/meson,
)
custom_removals = list("KA modkits")
/obj/item/robot_module/miner/New()
..()
@@ -341,6 +347,13 @@
fix_modules()
/obj/item/robot_module/miner/handle_custom_removal(component_id, mob/living/user, obj/item/W, params)
if(component_id == "KA modkits")
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/D in src)
D.attackby(W, user, params)
return TRUE
return ..()
/obj/item/robot_module/deathsquad
name = "NT advanced combat module"
module_type = "Malf"