From ee8f1022ccb781a184e4034adeed14dd7acbe782 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Tue, 24 Sep 2019 02:02:24 +0200 Subject: [PATCH 1/3] Fixes advanced med scanner upgrades, and other cyborg upgrades' incompatibility with dogborgs. --- .../objects/items/robot/robot_upgrades.dm | 65 +++++++++++++++---- .../objects/items/robot/robot_upgrades.dm | 29 --------- 2 files changed, 51 insertions(+), 43 deletions(-) delete mode 100644 modular_citadel/code/game/objects/items/robot/robot_upgrades.dm diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index d5806494e6..41a4619eb4 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -9,7 +9,7 @@ var/locked = FALSE var/installed = 0 var/require_module = 0 - var/module_type = null + var/list/module_type // if true, is not stored in the robot to be ejected // if module is reset var/one_use = FALSE @@ -18,7 +18,7 @@ if(R.stat == DEAD) to_chat(user, "[src] will not function on a deceased cyborg.") return FALSE - if(module_type && !istype(R.module, module_type)) + if(module_type && !is_type_in_list(R.module, module_type)) to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!") to_chat(user, "There's no mounting point for the module!") return FALSE @@ -93,7 +93,6 @@ desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate." icon_state = "cyborg_upgrade3" require_module = 1 - //module_type = /obj/item/robot_module/security /obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -141,7 +140,7 @@ desc = "A diamond drill replacement for the mining module's standard drill." icon_state = "cyborg_upgrade3" require_module = 1 - module_type = /obj/item/robot_module/miner + module_type = list(/obj/item/robot_module/miner) /obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -173,7 +172,7 @@ desc = "A satchel of holding replacement for mining cyborg's ore satchel module." icon_state = "cyborg_upgrade3" require_module = 1 - module_type = /obj/item/robot_module/miner + module_type = list(/obj/item/robot_module/miner) /obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R) . = ..() @@ -200,7 +199,7 @@ desc = "A trash bag of holding replacement for the janiborg's standard trash bag." icon_state = "cyborg_upgrade3" require_module = 1 - module_type = /obj/item/robot_module/janitor + module_type = list(/obj/item/robot_module/janitor, /obj/item/robot_module/scrubpup) /obj/item/borg/upgrade/tboh/action(mob/living/silicon/robot/R) . = ..() @@ -227,7 +226,7 @@ desc = "An advanced mop replacement for the janiborg's standard mop." icon_state = "cyborg_upgrade3" require_module = 1 - module_type = /obj/item/robot_module/janitor + module_type = list(/obj/item/robot_module/janitor, /obj/item/robot_module/scrubpup) /obj/item/borg/upgrade/amop/action(mob/living/silicon/robot/R) . = ..() @@ -276,7 +275,7 @@ icon_state = "ash_plating" resistance_flags = LAVA_PROOF | FIRE_PROOF require_module = 1 - module_type = /obj/item/robot_module/miner + module_type = list(/obj/item/robot_module/miner) /obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -405,7 +404,9 @@ to produce more advanced and complex medical reagents." icon_state = "cyborg_upgrade3" require_module = 1 - module_type = /obj/item/robot_module/medical + module_type = list(/obj/item/robot_module/medical + /obj/item/robot_module/syndicate_medical, + /obj/item/robot_module/medihound) var/list/additional_reagents = list() /obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R, user = usr) @@ -467,7 +468,9 @@ defibrillator, for on the scene revival." icon_state = "cyborg_upgrade3" require_module = 1 - module_type = /obj/item/robot_module/medical + module_type = list(/obj/item/robot_module/medical, + /obj/item/robot_module/syndicate_medical, + /obj/item/robot_module/medihound) /obj/item/borg/upgrade/defib/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -489,7 +492,9 @@ out procedures" icon_state = "cyborg_upgrade3" require_module = 1 - module_type = /obj/item/robot_module/medical + module_type = list(/obj/item/robot_module/medical, + /obj/item/robot_module/syndicate_medical, + /obj/item/robot_module/medihound) /obj/item/borg/upgrade/processor/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -514,7 +519,7 @@ /obj/item/robot_module/medical, /obj/item/robot_module/syndicate_medical, /obj/item/robot_module/medihound, - /obj/item/robot_module/borgi) + /obj/item/robot_module/borgi) /obj/item/borg/upgrade/advhealth/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -598,7 +603,7 @@ icon = 'icons/obj/storage.dmi' icon_state = "borgrped" require_module = TRUE - module_type = /obj/item/robot_module/engineering + module_type = list(/obj/item/robot_module/engineering) /obj/item/borg/upgrade/rped/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -626,7 +631,9 @@ icon = 'icons/obj/device.dmi' icon_state = "pinpointer_crew" require_module = TRUE - module_type = /obj/item/robot_module/medical + module_type = list(/obj/item/robot_module/medical, + /obj/item/robot_module/syndicate_medical, + /obj/item/robot_module/medihound) /obj/item/borg/upgrade/pinpointer/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -664,3 +671,33 @@ desc = "Allows you to to turn a cyborg into a clown, honk." icon_state = "cyborg_upgrade3" new_module = /obj/item/robot_module/clown + +// Citadel's Vtech Controller +/obj/effect/proc_holder/silicon/cyborg/vtecControl + name = "vTec Control" + desc = "Allows finer-grained control of the vTec speed boost." + action_icon = 'icons/mob/actions.dmi' + action_icon_state = "Chevron_State_0" + + var/currentState = 0 + var/maxReduction = 2 + + +/obj/effect/proc_holder/silicon/cyborg/vtecControl/Click(mob/living/silicon/robot/user) + var/mob/living/silicon/robot/self = usr + + currentState = (currentState + 1) % 3 + + if(usr) + switch(currentState) + if (0) + self.speed = maxReduction + if (1) + self.speed -= maxReduction*0.5 + if (2) + self.speed -= maxReduction*1.25 + + action.button_icon_state = "Chevron_State_[currentState]" + action.UpdateButtonIcon() + + return diff --git a/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm b/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm deleted file mode 100644 index 5f65b97173..0000000000 --- a/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm +++ /dev/null @@ -1,29 +0,0 @@ -// Citadel's Vtech Controller -/obj/effect/proc_holder/silicon/cyborg/vtecControl - name = "vTec Control" - desc = "Allows finer-grained control of the vTec speed boost." - action_icon = 'icons/mob/actions.dmi' - action_icon_state = "Chevron_State_0" - - var/currentState = 0 - var/maxReduction = 2 - - -/obj/effect/proc_holder/silicon/cyborg/vtecControl/Click(mob/living/silicon/robot/user) - var/mob/living/silicon/robot/self = usr - - currentState = (currentState + 1) % 3 - - if(usr) - switch(currentState) - if (0) - self.speed = maxReduction - if (1) - self.speed -= maxReduction*0.5 - if (2) - self.speed -= maxReduction*1.25 - - action.button_icon_state = "Chevron_State_[currentState]" - action.UpdateButtonIcon() - - return From 0389293d4af8792fa11bd9dddd383b9dc8423ef0 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Tue, 24 Sep 2019 02:40:43 +0200 Subject: [PATCH 2/3] comma --- code/game/objects/items/robot/robot_upgrades.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 41a4619eb4..9c929a6ebf 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -404,7 +404,7 @@ to produce more advanced and complex medical reagents." icon_state = "cyborg_upgrade3" require_module = 1 - module_type = list(/obj/item/robot_module/medical + module_type = list(/obj/item/robot_module/medical, /obj/item/robot_module/syndicate_medical, /obj/item/robot_module/medihound) var/list/additional_reagents = list() From 6d49b551401f5cb19d6d510b40f64b74eb5282da Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Tue, 24 Sep 2019 03:11:22 +0200 Subject: [PATCH 3/3] the .dme --- tgstation.dme | 1 - 1 file changed, 1 deletion(-) diff --git a/tgstation.dme b/tgstation.dme index f1430cebf2..fffea66ab5 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2952,7 +2952,6 @@ #include "modular_citadel\code\game\objects\items\devices\radio\headset.dm" #include "modular_citadel\code\game\objects\items\devices\radio\shockcollar.dm" #include "modular_citadel\code\game\objects\items\melee\eutactic_blades.dm" -#include "modular_citadel\code\game\objects\items\robot\robot_upgrades.dm" #include "modular_citadel\code\game\objects\items\storage\firstaid.dm" #include "modular_citadel\code\game\objects\structures\tables_racks.dm" #include "modular_citadel\code\game\objects\structures\beds_chairs\chair.dm"