Allows the robot sheet snatcher to be upgraded (#19149)

* Allosws the robot sheet snatcher to be upgraded

* .

* .

* .

* should be there

* .
This commit is contained in:
Kashargul
2026-02-08 17:45:59 +01:00
committed by GitHub
parent 53a508d192
commit 1ba50d0d5a
7 changed files with 234 additions and 185 deletions
+202 -172
View File
@@ -8,25 +8,25 @@
icon_state = "cyborg_upgrade"
/// Bitflags listing module compatibility. Used in the exosuit fabricator for creating sub-categories.
var/list/module_flags = NONE
var/locked = 0
var/require_module = 0
var/installed = 0
var/locked = FALSE
var/require_module = FALSE
var/installed = FALSE
/obj/item/borg/upgrade/proc/action(var/mob/living/silicon/robot/R)
/obj/item/borg/upgrade/proc/action(mob/user, mob/living/silicon/robot/R)
if(R.stat == DEAD)
to_chat(usr, span_warning("The [src] will not function on a deceased robot."))
return 1
return 0
to_chat(user, span_warning("The [src] will not function on a deceased robot."))
return TRUE
return FALSE
/obj/item/borg/upgrade/proc/generic_error(var/mob/living/silicon/robot/R, var/obj/item/borg/type)
/obj/item/borg/upgrade/proc/generic_error(mob/user, mob/living/silicon/robot/R, obj/item/borg/type)
type = lowertext(initial(type.name))
to_chat(R, span_warning("Upgrade mounting error! No suitable hardpoint for \the \"[type]\" detected!"))
to_chat(usr, span_warning("There's no mounting point for \the \"[type]\" module!"))
to_chat(user, span_warning("There's no mounting point for \the \"[type]\" module!"))
/obj/item/borg/upgrade/proc/software_error(var/mob/living/silicon/robot/R, var/obj/item/borg/type)
/obj/item/borg/upgrade/proc/software_error(mob/user, mob/living/silicon/robot/R, obj/item/borg/type)
type = lowertext(initial(type.name))
to_chat(R, span_warning("Upgrade installation error! Incompatibility with \the \"[type]\" detected!"))
to_chat(usr, span_warning("\The \"[type]\" upgrade is not compatibile!"))
to_chat(user, span_warning("\The \"[type]\" upgrade is not compatibile!"))
/* ######################################################################################################
# Utility section. All reusable upgrades without lasting effects, like renaming, reset, etc. go here.#
@@ -40,13 +40,13 @@
desc = "Used to reset a cyborg's module. Destroys any higher than basic upgrades applied to the robot."
icon_state = "cyborg_upgrade1"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/utility/reset/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/utility/reset/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
R.module_reset()
return 1
return TRUE
/obj/item/borg/upgrade/utility/rename
name = "robot reclassification board"
@@ -63,15 +63,15 @@
if(new_name)
heldname = new_name
/obj/item/borg/upgrade/utility/rename/action(var/mob/living/silicon/robot/R)
if(..()) return 0
if(isshell(R)) return 0
/obj/item/borg/upgrade/utility/rename/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(isshell(R)) return FALSE
R.notify_ai(ROBOT_NOTIFICATION_NEW_NAME, R.name, heldname)
R.name = heldname
R.custom_name = heldname
R.real_name = heldname
return 1
return TRUE
/obj/item/borg/upgrade/utility/restart
name = "robot emergency restart module"
@@ -80,13 +80,13 @@
item_state = "cyborg_upgrade"
/obj/item/borg/upgrade/utility/restart/action(var/mob/living/silicon/robot/R)
/obj/item/borg/upgrade/utility/restart/action(mob/user, mob/living/silicon/robot/R)
if(R.stat == CONSCIOUS)
return 0
return FALSE
if(R.health < 0)
to_chat(usr, span_warning("You have to repair the robot before using this module!"))
return 0
to_chat(user, span_warning("You have to repair the robot before using this module!"))
return FALSE
if(!R.key)
for(var/mob/observer/dead/ghost in GLOB.player_list)
@@ -98,7 +98,7 @@
GLOB.dead_mob_list -= R
GLOB.living_mob_list |= R
R.notify_ai(ROBOT_NOTIFICATION_NEW_UNIT)
return 1
return TRUE
/* ###################################################################################
# Basic section. All upgrades which effect the robot's variables directly go here.#
@@ -112,59 +112,59 @@
desc = "Used to kick in a robot's VTEC systems, increasing their speed."
icon_state = "cyborg_upgrade2"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/basic/vtec/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/basic/vtec/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_basic_upgrade(type))
to_chat(R,span_warning("Actuator already running on overdrive mode!"))
to_chat(usr, span_warning("It'd be unwise to plug another vtec module in!"))
return 0
to_chat(user, span_warning("It'd be unwise to plug another vtec module in!"))
return FALSE
add_verb(R, /mob/living/silicon/robot/proc/toggle_vtec)
R.vtec_active = TRUE
R.hud_used.toggle_vtec_control()
to_chat(R, span_notice("Actuator overdrive enabled!"))
return 1
return TRUE
/obj/item/borg/upgrade/basic/sizeshift
name = "robot size alteration module"
desc = "Using technology similar to one used in sizeguns, allows cyborgs to adjust their own size as neccesary."
icon_state = "cyborg_upgrade2"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/basic/sizeshift/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/basic/sizeshift/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_basic_upgrade(type))
to_chat(R, span_warning("Size alteration module already applied!"))
to_chat(usr, span_warning("There's no space for another size alteration module!"))
return 0
to_chat(user, span_warning("There's no space for another size alteration module!"))
return FALSE
add_verb(R, /mob/living/proc/set_size)
to_chat(R, span_notice("Size adjustments active!"))
return 1
return TRUE
/obj/item/borg/upgrade/basic/syndicate
name = "scrambled equipment module"
desc = "Unlocks new and often deadly module specific items of a robot"
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/basic/syndicate/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/basic/syndicate/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_basic_upgrade(type))
to_chat(R, span_warning("Secret modules already unlocked!"))
to_chat(usr, span_warning("Plugging another scambled module would be useless!"))
return 0
to_chat(user, span_warning("Plugging another scambled module would be useless!"))
return FALSE
R.emag_items = 1
R.emag_items = TRUE
R.robotact.update_static_data_for_all_viewers()
return 1
return TRUE
/obj/item/borg/upgrade/basic/language
name = "language module"
@@ -172,13 +172,13 @@
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
/obj/item/borg/upgrade/basic/language/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/basic/language/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_basic_upgrade(type))
to_chat(R, span_warning("All possible languages already uploaded!"))
to_chat(usr, span_warning("The language database is up to date!"))
return 0
to_chat(user, span_warning("The language database is up to date!"))
return FALSE
R.add_language(LANGUAGE_SOL_COMMON, 1)
R.add_language(LANGUAGE_TRADEBAND, 1)
@@ -222,7 +222,7 @@
*/
to_chat(R, span_notice("Language database updated!"))
return 1
return TRUE
/* ###########################################################################
# Advanced section. All upgrades which effect the robot's modules go here.#
@@ -236,65 +236,65 @@
desc = "Used to double a robohound's belly capacity. This only affects total volume, and won't allow support of more than one patient in case of sleeper bellies. Can only be applied once."
icon_state = "cyborg_upgrade2"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/advanced/bellysizeupgrade/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/advanced/bellysizeupgrade/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
var/obj/T = R.has_upgrade_module(/obj/item/dogborg/sleeper)
if(!T)
to_chat(usr, span_warning("This robot has had its processor removed!"))
return 0
to_chat(user, span_warning("This robot has had its processor removed!"))
return FALSE
if(R.has_advanced_upgrade(type))
to_chat(R, span_warning("Maximum capacity achieved for this hardpoint!"))
to_chat(usr, span_warning("There's no room for another capacity upgrade!"))
return 0
to_chat(user, span_warning("There's no room for another capacity upgrade!"))
return FALSE
var/obj/item/dogborg/sleeper/B = T
var/X = B.max_item_count*2
B.max_item_count = X //I couldn't do T = maxitem*2 for some reason.
to_chat(R, span_notice("Internal capacity doubled."))
to_chat(usr, span_notice("Internal capacity doubled."))
to_chat(user, span_notice("Internal capacity doubled."))
B.upgraded_capacity = TRUE
return 1
return TRUE
/obj/item/borg/upgrade/advanced/jetpack
name = "robot jetpack"
desc = "A carbon dioxide jetpack suitable for low-gravity operations."
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/advanced/jetpack/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/advanced/jetpack/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_advanced_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/tank/jetpack/carbondioxide(R.module)
for(var/obj/item/tank/jetpack/carbondioxide in R.module.modules)
R.internals = src
return 1
return TRUE
/obj/item/borg/upgrade/advanced/advhealth
name = "advanced health analyzer module"
desc = "An Advanced Health Analyzer, optimized for borg mounting."
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/advanced/advhealth/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/advanced/advhealth/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_advanced_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/healthanalyzer/advanced(R.module)
to_chat(R, span_notice("Advanced health analyzer initialized!"))
return 1
return TRUE
//Robot size gun
/obj/item/borg/upgrade/advanced/sizegun
@@ -302,17 +302,17 @@
desc = "A size gun adapted for installation in cyborgs, allows them to turn people pocket-sized among other uses. What could go wrong?"
icon_state = "cyborg_upgrade2"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/advanced/sizegun/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/advanced/sizegun/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_advanced_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/gun/energy/sizegun/mounted(R.module)
return 1
return TRUE
/* ##############################################################################
# Restricted section. All upgrades which only work on specific modules go here.#
@@ -324,33 +324,33 @@
desc = "Used to enable a robohound's sleeper to ingest items. This only affects sleepers, and has no effect on compactor bellies. Can only be applied once."
icon_state = "cyborg_upgrade2"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
module_flags = BORG_MODULE_SECURITY | BORG_MODULE_MEDICAL | BORG_MODULE_COMBAT
/obj/item/borg/upgrade/restricted/bellycapupgrade/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/restricted/bellycapupgrade/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(!R.supports_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
var/obj/T = R.has_upgrade_module(/obj/item/dogborg/sleeper)
if(!T)
to_chat(usr, span_warning("This robot has had its processor removed!"))
return 0
to_chat(user, span_warning("This robot has had its processor removed!"))
return FALSE
if(R.has_restricted_upgrade(type))
to_chat(R, span_warning("Maximum capability achieved for this hardpoint!"))
to_chat(usr, span_warning("There's no room for another capability upgrade!"))
return 0
to_chat(user, span_warning("There's no room for another capability upgrade!"))
return FALSE
var/obj/item/dogborg/sleeper/B = T
var/X = B.max_item_count*2 //double the capacity from 1 to 2 to allow sleepers to store some items, at most 4 with both upgrades
B.max_item_count = X //I couldn't do T = maxitem*2 for some reason.
to_chat(R, span_notice("Internal capability upgraded."))
to_chat(usr, span_notice("Internal capability upgraded."))
to_chat(user, span_notice("Internal capability upgraded."))
B.compactor = TRUE
return 1
return TRUE
/obj/item/borg/upgrade/restricted/tasercooler
name = "robotic Rapid Taser Cooling Module"
@@ -358,30 +358,30 @@
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
module_flags = BORG_MODULE_SECURITY
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/restricted/tasercooler/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/restricted/tasercooler/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(!R.supports_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
var/obj/T = R.has_upgrade_module(/obj/item/gun/energy/robotic/taser)
if(!T)
to_chat(usr, span_warning("This robot has had its taser removed!"))
return 0
to_chat(user, span_warning("This robot has had its taser removed!"))
return FALSE
if(R.has_restricted_upgrade(type))
to_chat(R, span_warning("Maximum cooling achieved for this hardpoint!"))
to_chat(usr, span_warning("There's no room for another cooling unit!"))
return 0
to_chat(user, span_warning("There's no room for another cooling unit!"))
return FALSE
var/obj/item/gun/energy/robotic/taser/B = T
B.recharge_time = max(2 , B.recharge_time - 4)
to_chat(R, span_notice("Taser cooling upgraded!"))
return 1
return TRUE
//Advanced RPED
/obj/item/borg/upgrade/restricted/advrped
@@ -390,21 +390,21 @@
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
module_flags = BORG_MODULE_SCIENCE
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/restricted/advrped/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/restricted/advrped/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(!R.supports_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
if(R.has_restricted_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/storage/part_replacer/adv(R.module)
return 1
return TRUE
//Diamond Drill
/obj/item/borg/upgrade/restricted/diamonddrill
@@ -413,21 +413,21 @@
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
module_flags = BORG_MODULE_MINER
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/restricted/diamonddrill/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/restricted/diamonddrill/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(!R.supports_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
if(R.has_restricted_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/pickaxe/diamonddrill(R.module)
return 1
return TRUE
//PKA
/obj/item/borg/upgrade/restricted/pka
@@ -436,21 +436,21 @@
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
module_flags = BORG_MODULE_MINER
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/restricted/pka/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/restricted/pka/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(!R.supports_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
if(R.has_restricted_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/gun/energy/kinetic_accelerator/cyborg(R.module)
return 1
return TRUE
/obj/item/borg/upgrade/restricted/adv_scanner
name = "robotic Ore Scanning Upgrade Module"
@@ -458,36 +458,66 @@
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
module_flags = BORG_MODULE_MINER
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/restricted/adv_scanner/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/restricted/adv_scanner/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(!R.supports_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
var/obj/target_module = R.has_upgrade_module(/obj/item/mining_scanner/robot)
if(!target_module)
to_chat(usr, span_warning("This robot has had its scanner removed!"))
return 0
to_chat(user, span_warning("This robot has had its scanner removed!"))
return FALSE
if(R.has_restricted_upgrade(type))
to_chat(R, span_warning("Scanner was already upgraded!"))
to_chat(usr, span_warning("There's no room for another scanning upgrade!"))
return 0
to_chat(user, span_warning("There's no room for another scanning upgrade!"))
return FALSE
var/obj/item/mining_scanner/robot/robot_scanner = target_module
robot_scanner.upgrade()
to_chat(R, span_notice("Mining scanner upgraded!"))
return 1
return TRUE
/obj/item/borg/upgrade/restricted/adv_snatcher
name = "robotic Sheet Capacity Module"
desc = "Used to expand the robot sheet storage."
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
module_flags = BORG_MODULE_MINER
require_module = TRUE
/obj/item/borg/upgrade/restricted/adv_snatcher/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(!R.supports_upgrade(type))
generic_error(user, R, type)
return FALSE
var/obj/target_module = R.has_upgrade_module(/obj/item/storage/bag/sheetsnatcher/borg)
if(!target_module)
to_chat(user, span_warning("This robot has had its sheet snatcher removed!"))
return FALSE
if(R.has_restricted_upgrade(type))
to_chat(R, span_warning("Sheet capacity was already upgraded!"))
to_chat(user, span_warning("There's no room for another sheet capacity upgrade!"))
return FALSE
var/obj/item/storage/bag/sheetsnatcher/borg/robot_snatcher = target_module
robot_snatcher.upgrade()
to_chat(R, span_notice("Sheet snatcher upgraded!"))
return TRUE
/* ###############################################
# Unsorted section. All cargo modules go here.#
###############################################*/
/obj/item/borg/upgrade/no_prod
var/hidden_from_scan = 0//use this for unproduceable modules you want to hide from scanning (e.g. event tools / admeme)
var/hidden_from_scan = FALSE//use this for unproduceable modules you want to hide from scanning (e.g. event tools / admeme)
//cyborg foam dart gun
/obj/item/borg/upgrade/no_prod/toygun
@@ -495,104 +525,104 @@
desc = "A foam dart gun designed for mounting into cyborgs. It's Donk or Don't! DISCLAIMER: Donk-Soft bears no responsibility for incidents relating to cyborgs becoming too accustomed to shooting at crew. Installation of the Donk-Soft Cyborg Blaster must be performed only by a licensed roboticist."
icon_state = "cyborg_upgrade5"
item_state = "cyborg_upgrade"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/no_prod/toygun/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/no_prod/toygun/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_no_prod_upgrade(type))
generic_error(R, type)
return 0
generic_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/gun/projectile/cyborgtoy(R.module)
return 1
return TRUE
/obj/item/borg/upgrade/no_prod/vision_xray
name = "Robot x-ray vision module"
desc = "Vision alterantion software to add x-ray sight capabilities."
icon_state = "cyborg_upgrade5"
item_state = "cyborg_upgrade"
require_module = 1
hidden_from_scan = 1
require_module = TRUE
hidden_from_scan = TRUE
/obj/item/borg/upgrade/no_prod/vision_xray/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/no_prod/vision_xray/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_no_prod_upgrade(type))
software_error(R, type)
return 0
software_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/borg/sight/xray(R.module)
return 1
return TRUE
/obj/item/borg/upgrade/no_prod/vision_thermal
name = "Robot thermal vision module"
desc = "Vision alterantion software to add thermal sight capabilities."
icon_state = "cyborg_upgrade5"
item_state = "cyborg_upgrade"
require_module = 1
hidden_from_scan = 1
require_module = TRUE
hidden_from_scan = TRUE
/obj/item/borg/upgrade/no_prod/vision_thermal/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/no_prod/vision_thermal/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_no_prod_upgrade(type))
software_error(R, type)
return 0
software_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/borg/sight/thermal(R.module)
return 1
return TRUE
/obj/item/borg/upgrade/no_prod/vision_meson
name = "Robot meson vision module"
desc = "Vision alterantion software to add meson sight capabilities."
icon_state = "cyborg_upgrade5"
item_state = "cyborg_upgrade"
require_module = 1
hidden_from_scan = 1
require_module = TRUE
hidden_from_scan = TRUE
/obj/item/borg/upgrade/no_prod/vision_meson/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/no_prod/vision_meson/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_no_prod_upgrade(type))
software_error(R, type)
return 0
software_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/borg/sight/meson(R.module)
return 1
return TRUE
/obj/item/borg/upgrade/no_prod/vision_material
name = "Robot material vision module"
desc = "Vision alterantion software to add material sight capabilities."
icon_state = "cyborg_upgrade5"
item_state = "cyborg_upgrade"
require_module = 1
hidden_from_scan = 1
require_module = TRUE
hidden_from_scan = TRUE
/obj/item/borg/upgrade/no_prod/vision_material/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/no_prod/vision_material/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_no_prod_upgrade(type))
software_error(R, type)
return 0
software_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/borg/sight/material(R.module)
return 1
return TRUE
/obj/item/borg/upgrade/no_prod/vision_anomalous
name = "Robot anomalous vision module"
desc = "Vision alterantion software to add anomalous sight capabilities."
icon_state = "cyborg_upgrade5"
item_state = "cyborg_upgrade"
require_module = 1
hidden_from_scan = 1
require_module = TRUE
hidden_from_scan = TRUE
/obj/item/borg/upgrade/no_prod/vision_anomalous/action(var/mob/living/silicon/robot/R)
if(..()) return 0
/obj/item/borg/upgrade/no_prod/vision_anomalous/action(mob/user, mob/living/silicon/robot/R)
if(..()) return FALSE
if(R.has_no_prod_upgrade(type))
software_error(R, type)
return 0
software_error(user, R, type)
return FALSE
R.module.modules += new/obj/item/borg/sight/anomalous(R.module)
return 1
return TRUE
@@ -423,6 +423,10 @@
desc = null
capacity = 700//Borgs get more because >specialization
/obj/item/storage/bag/sheetsnatcher/borg/proc/upgrade()
name += " of holding"
capacity = 5000
// -----------------------------
// Cash Bag
// -----------------------------
+1 -1
View File
@@ -330,7 +330,7 @@
U = UN
if(istype(U, /obj/item/borg/upgrade/restricted))
target.module.supported_upgrades |= new_upgrade
if(!U.action(target))
if(!U.action(ui.user, target))
return FALSE
U.loc = target
target.hud_used?.update_robot_modules_display()
+13 -10
View File
@@ -804,7 +804,7 @@
else if(U.locked)
to_chat(user, span_filter_notice("The upgrade is locked and cannot be used yet!"))
else
if(U.action(src))
if(U.action(user, src))
to_chat(user, span_filter_notice("You apply the upgrade to [src]!"))
user.drop_item()
U.loc = src
@@ -1539,8 +1539,7 @@
return T
else if(!T)
return "" // Return this to have the analyzer show an error if the module is missing. FALSE / NULL are used for missing upgrades themselves
else
return FALSE
return FALSE
if(given_type == /obj/item/borg/upgrade/advanced/jetpack)
return has_upgrade_module(/obj/item/tank/jetpack/carbondioxide)
if(given_type == /obj/item/borg/upgrade/advanced/advhealth)
@@ -1561,24 +1560,28 @@
return T
else if(!T)
return "" // Return this to have the analyzer show an error if the module is missing. FALSE / NULL are used for missing upgrades themselves
else
return FALSE
return FALSE
if(given_type == /obj/item/borg/upgrade/restricted/tasercooler)
var/obj/item/gun/energy/robotic/taser/T = has_upgrade_module(/obj/item/gun/energy/robotic/taser)
if(T && T.recharge_time <= 2)
if(T && T.recharge_time < T::recharge_time)
return T
else if(!T)
return "" // Return this to have the analyzer show an error if the module is missing. FALSE / NULL are used for missing upgrades themselves
else
return FALSE
return FALSE
if(given_type == /obj/item/borg/upgrade/restricted/adv_scanner)
var/obj/item/mining_scanner/robot/robot_scanner = has_upgrade_module(/obj/item/mining_scanner/robot)
if(robot_scanner && robot_scanner.exact)
return robot_scanner
else if(!robot_scanner)
return "" // Return this to have the analyzer show an error if the module is missing. FALSE / NULL are used for missing upgrades themselves
else
return FALSE
return FALSE
if(given_type == /obj/item/borg/upgrade/restricted/adv_snatcher)
var/obj/item/storage/bag/sheetsnatcher/borg/robot_snatcher = has_upgrade_module(/obj/item/storage/bag/sheetsnatcher/borg)
if(robot_snatcher && robot_snatcher.capacity > robot_snatcher::capacity)
return robot_snatcher
else if(!robot_snatcher)
return "" // Return this to have the analyzer show an error if the module is missing. FALSE / NULL are used for missing upgrades themselves
return FALSE
if(given_type == /obj/item/borg/upgrade/restricted/advrped)
return has_upgrade_module(/obj/item/storage/part_replacer/adv)
if(given_type == /obj/item/borg/upgrade/restricted/diamonddrill)
@@ -622,7 +622,7 @@
name = "miner robot module"
channels = list(CHANNEL_SUPPLY = 1)
networks = list(NETWORK_MINE)
supported_upgrades = list(/obj/item/borg/upgrade/restricted/pka, /obj/item/borg/upgrade/restricted/diamonddrill, /obj/item/borg/upgrade/restricted/adv_scanner)
supported_upgrades = list(/obj/item/borg/upgrade/restricted/pka, /obj/item/borg/upgrade/restricted/diamonddrill, /obj/item/borg/upgrade/restricted/adv_scanner, /obj/item/borg/upgrade/restricted/adv_snatcher)
pto_type = PTO_CARGO
/obj/item/robot_module/robot/miner/create_equipment(var/mob/living/silicon/robot/robot)
@@ -488,6 +488,17 @@
materials = list(MAT_STEEL = 6000, MAT_GLASS = 4000, MAT_GOLD = 2000, MAT_VERDANTIUM = 1500, MAT_DIAMOND = 350)
build_path = /obj/item/borg/upgrade/restricted/adv_scanner
/datum/design_techweb/prosfab/robot_upgrade/restricted/adv_snatcher
category = list(
RND_CATEGORY_MECHFAB_CYBORG_MODULES + RND_SUBCATEGORY_MECHFAB_CYBORG_MODULES_RESTRICTED + RND_SUBCATEGORY_MECHFAB_CYBORG_MODULES_MINING
)
name = "Sheet Snatcher Upgrade"
desc = "An upgrade module to expand the robot's sheet storage capacity."
id = "borg_adv_snatcher_module"
// req_tech = list(TECH_ENGINEERING = 7, TECH_MATERIAL = 8, TECH_POWER = 6)
materials = list(MAT_STEEL = 12000, MAT_GLASS = 8000, MAT_PLASTEEL = 2000, MAT_DURASTEEL = 500, MAT_DIAMOND = 700)
build_path = /obj/item/borg/upgrade/restricted/adv_snatcher
/datum/design_techweb/prosfab/robot_upgrade/restricted/tasercooler
category = list(
RND_CATEGORY_MECHFAB_CYBORG_MODULES + RND_SUBCATEGORY_MECHFAB_CYBORG_MODULES_RESTRICTED + RND_SUBCATEGORY_MECHFAB_CYBORG_MODULES_SECURITY
@@ -65,7 +65,6 @@
design_ids = list(
"borg_pka_module",
"pka_mineaoe",
"borg_adv_scanner_module",
// "damagemod",
// "cooldownmod",
// "triggermod",
@@ -102,6 +101,8 @@
"recycler_crusher",
"recycler_sorter",
"recycler_stamper",
"borg_adv_scanner_module",
"borg_adv_snatcher_module",
// "mech_diamond_drill",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_4_POINTS)