Organizes robot_upgrades.dm (#23683)

* Reorder

* spacing

* Spacing

* another one
This commit is contained in:
Deniz
2024-01-14 12:32:05 +00:00
committed by GitHub
parent 746bba0040
commit a7fd57e2a3
+201 -167
View File
@@ -80,6 +80,11 @@
R.module?.rebuild_modules()
return TRUE
/*******************/
/**** COMMON ****/
/*******************/
/obj/item/borg/upgrade/reset
name = "cyborg module reset board"
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
@@ -136,59 +141,6 @@
return TRUE
/obj/item/borg/upgrade/vtec
name = "robotic VTEC Module"
desc = "Used to activate a cyborg's VTEC systems, increasing their speed."
icon_state = "cyborg_upgrade2"
require_module = TRUE
origin_tech = "engineering=4;materials=5;programming=4"
/obj/item/borg/upgrade/vtec/do_install(mob/living/silicon/robot/R)
for(var/obj/item/borg/upgrade/vtec/U in R.contents)
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another VTEC unit!</span>")
return
for(var/obj/item/borg/upgrade/floorbuffer/U in R.contents)
if(R.floorbuffer)
R.floorbuffer = FALSE
R.speed -= U.buffer_speed
for(var/datum/action/innate/robot_magpulse/magpulse in R.module_actions)
if(magpulse.active)
REMOVE_TRAIT(R, TRAIT_MAGPULSE, "innate boots")
to_chat(R, "You turn your magboots off.")
R.speed -= magpulse.slowdown_active
magpulse.button_icon_state = initial(magpulse.button_icon_state)
magpulse.active = FALSE
R.speed = -1 // Gotta go fast.
return TRUE
/obj/item/borg/upgrade/disablercooler
name = "cyborg rapid disabler cooling module"
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;powerstorage=4;combat=4"
require_module = TRUE
module_type = /obj/item/robot_module/security
/obj/item/borg/upgrade/disablercooler/do_install(mob/living/silicon/robot/R)
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules
if(!T)
to_chat(usr, "<span class='notice'>There's no disabler in this unit!</span>")
return
if(T.charge_delay <= 2)
to_chat(R, "<span class='notice'>A cooling unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another cooling unit!</span>")
return
T.charge_delay = max(2 , T.charge_delay - 4)
return TRUE
/obj/item/borg/upgrade/thrusters
name = "ion thruster upgrade"
desc = "A energy-operated thruster system for cyborgs."
@@ -203,100 +155,6 @@
R.ionpulse = TRUE
return TRUE
/obj/item/borg/upgrade/ddrill
name = "mining cyborg diamond drill"
desc = "A diamond drill replacement for the mining cyborg's standard drill."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=5"
require_module = TRUE
module_type = /obj/item/robot_module/miner
items_to_replace = list(
/obj/item/pickaxe/drill/cyborg = /obj/item/pickaxe/drill/cyborg/diamond
)
/obj/item/borg/upgrade/soh
name = "mining cyborg satchel of holding"
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=4;bluespace=4"
require_module = TRUE
module_type = /obj/item/robot_module/miner
items_to_replace = list(
/obj/item/storage/bag/ore/cyborg = /obj/item/storage/bag/ore/holding
)
/obj/item/borg/upgrade/abductor_engi
name = "engineering cyborg abductor upgrade"
desc = "An experimental upgrade that replaces an engineering cyborg's tools with the abductor versions."
icon_state = "abductor_mod"
origin_tech = "engineering=6;materials=6;abductor=3"
require_module = TRUE
module_type = /obj/item/robot_module/engineering
items_to_replace = list(
/obj/item/weldingtool = /obj/item/weldingtool/abductor,
/obj/item/wrench = /obj/item/wrench/abductor,
/obj/item/screwdriver = /obj/item/screwdriver/abductor,
/obj/item/crowbar = /obj/item/crowbar/abductor,
/obj/item/wirecutters = /obj/item/wirecutters/abductor,
/obj/item/multitool = /obj/item/multitool/abductor
)
special_rechargables = list(
/obj/item/weldingtool/abductor
)
/obj/item/borg/upgrade/abductor_medi
name = "medical cyborg abductor upgrade"
desc = "An experimental upgrade that replaces a medical cyborg's tools with the abductor versions."
icon_state = "abductor_mod"
origin_tech = "biotech=6;materials=6;abductor=2"
require_module = TRUE
module_type = /obj/item/robot_module/medical
items_to_replace = list(
/obj/item/scalpel/laser/laser1 = /obj/item/scalpel/laser/laser3, // No abductor laser scalpel, so next best thing.
/obj/item/hemostat = /obj/item/hemostat/alien,
/obj/item/retractor = /obj/item/retractor/alien,
/obj/item/bonegel = /obj/item/bonegel/alien,
/obj/item/FixOVein = /obj/item/FixOVein/alien,
/obj/item/bonesetter = /obj/item/bonesetter/alien,
/obj/item/circular_saw = /obj/item/circular_saw/alien,
/obj/item/surgicaldrill = /obj/item/surgicaldrill/alien,
/obj/item/reagent_containers/borghypo = /obj/item/reagent_containers/borghypo/abductor
)
/obj/item/borg/upgrade/abductor_medi/after_install(mob/living/silicon/robot/R)
. = ..()
if(!R.emagged) // Emagged Mediborgs that are upgraded need the evil chems.
return
for(var/obj/item/reagent_containers/borghypo/F in R.module.modules)
F.emag_act()
/obj/item/borg/upgrade/syndicate
name = "safety override module"
desc = "Unlocks the hidden, deadlier functions of a cyborg."
icon_state = "cyborg_upgrade3"
origin_tech = "combat=6;materials=6"
require_module = TRUE
/obj/item/borg/upgrade/syndicate/do_install(mob/living/silicon/robot/R)
if(R.weapons_unlock)
return // They already had the safety override upgrade, or they're a cyborg type which has this by default.
R.weapons_unlock = TRUE
to_chat(R, "<span class='warning'>Warning: safety protocols have been disabled!</span>")
return TRUE
/obj/item/borg/upgrade/lavaproof
name = "mining cyborg lavaproof chassis"
desc = "An upgrade kit to apply specialized coolant systems and insulation layers to a mining cyborg's chassis, enabling them to withstand exposure to molten rock."
icon_state = "ash_plating"
resistance_flags = LAVA_PROOF | FIRE_PROOF
require_module = TRUE
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/lavaproof/do_install(mob/living/silicon/robot/R)
if(istype(R))
R.weather_immunities += "lava"
return TRUE
/obj/item/borg/upgrade/selfrepair
name = "self-repair module"
desc = "This module will repair the cyborg over time."
@@ -391,6 +249,128 @@
else
deactivate()
/obj/item/borg/upgrade/vtec
name = "robotic VTEC Module"
desc = "Used to activate a cyborg's VTEC systems, increasing their speed."
icon_state = "cyborg_upgrade2"
require_module = TRUE
origin_tech = "engineering=4;materials=5;programming=4"
/obj/item/borg/upgrade/vtec/do_install(mob/living/silicon/robot/R)
for(var/obj/item/borg/upgrade/vtec/U in R.contents)
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another VTEC unit!</span>")
return
for(var/obj/item/borg/upgrade/floorbuffer/U in R.contents)
if(R.floorbuffer)
R.floorbuffer = FALSE
R.speed -= U.buffer_speed
for(var/datum/action/innate/robot_magpulse/magpulse in R.module_actions)
if(magpulse.active)
REMOVE_TRAIT(R, TRAIT_MAGPULSE, "innate boots")
to_chat(R, "You turn your magboots off.")
R.speed -= magpulse.slowdown_active
magpulse.button_icon_state = initial(magpulse.button_icon_state)
magpulse.active = FALSE
R.speed = -1 // Gotta go fast.
return TRUE
/***********************/
/**** SECURITY ****/
/***********************/
/obj/item/borg/upgrade/disablercooler
name = "cyborg rapid disabler cooling module"
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;powerstorage=4;combat=4"
require_module = TRUE
module_type = /obj/item/robot_module/security
/obj/item/borg/upgrade/disablercooler/do_install(mob/living/silicon/robot/R)
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules
if(!T)
to_chat(usr, "<span class='notice'>There's no disabler in this unit!</span>")
return
if(T.charge_delay <= 2)
to_chat(R, "<span class='notice'>A cooling unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another cooling unit!</span>")
return
T.charge_delay = max(2 , T.charge_delay - 4)
return TRUE
/*******************/
/**** MINING ****/
/*******************/
/obj/item/borg/upgrade/ddrill
name = "mining cyborg diamond drill"
desc = "A diamond drill replacement for the mining cyborg's standard drill."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=5"
require_module = TRUE
module_type = /obj/item/robot_module/miner
items_to_replace = list(
/obj/item/pickaxe/drill/cyborg = /obj/item/pickaxe/drill/cyborg/diamond
)
/obj/item/borg/upgrade/soh
name = "mining cyborg satchel of holding"
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=4;bluespace=4"
require_module = TRUE
module_type = /obj/item/robot_module/miner
items_to_replace = list(
/obj/item/storage/bag/ore/cyborg = /obj/item/storage/bag/ore/holding
)
/obj/item/borg/upgrade/lavaproof
name = "mining cyborg lavaproof chassis"
desc = "An upgrade kit to apply specialized coolant systems and insulation layers to a mining cyborg's chassis, enabling them to withstand exposure to molten rock."
icon_state = "ash_plating"
resistance_flags = LAVA_PROOF | FIRE_PROOF
require_module = TRUE
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/lavaproof/do_install(mob/living/silicon/robot/R)
if(istype(R))
R.weather_immunities += "lava"
return TRUE
/***********************/
/**** ENGINEER ****/
/***********************/
/obj/item/borg/upgrade/rcd
name = "R.C.D. upgrade"
desc = "A modified Rapid Construction Device, able to pull energy directly from a cyborg's internal power cell."
icon_state = "cyborg_upgrade5"
origin_tech = "engineering=4;materials=5;powerstorage=4"
require_module = TRUE
module_type = /obj/item/robot_module/engineering
items_to_add = list(/obj/item/rcd/borg)
/obj/item/borg/upgrade/rcd/after_install(mob/living/silicon/robot/R)
if(R.emagged) // Emagged engi-borgs have already have the RCD added.
return
R.module.remove_item_from_lists(/obj/item/rcd) // So emagging them in the future won't grant another RCD.
..()
/***********************/
/**** JANITOR ****/
/***********************/
/obj/item/borg/upgrade/floorbuffer
name = "janitor cyborg floor buffer upgrade"
desc = "A floor buffer upgrade kit that can be attached to janitor cyborgs."
@@ -427,16 +407,6 @@
cyborg = null
return ..()
/obj/item/borg/upgrade/syndie_soap
name = "janitor cyborg syndicate soap"
desc = "Using forbidden technology and some red dye, upgrade a janitorial cyborg's soap performance by 90 percent!"
icon_state = "cyborg_upgrade4"
require_module = TRUE
module_type = /obj/item/robot_module/janitor
items_to_replace = list(
/obj/item/soap/nanotrasen = /obj/item/soap/syndie
)
/obj/item/borg/upgrade/bluespace_trash_bag
name = "janitor cyborg trash bag of holding upgrade"
desc = "An advanced trash bag upgrade board with bluespace properties that can be attached to janitorial cyborgs."
@@ -447,17 +417,81 @@
/obj/item/storage/bag/trash/cyborg = /obj/item/storage/bag/trash/bluespace/cyborg
)
/obj/item/borg/upgrade/rcd
name = "R.C.D. upgrade"
desc = "A modified Rapid Construction Device, able to pull energy directly from a cyborg's internal power cell."
icon_state = "cyborg_upgrade5"
origin_tech = "engineering=4;materials=5;powerstorage=4"
/***********************/
/**** SYNDIE ****/
/***********************/
/obj/item/borg/upgrade/syndicate
name = "safety override module"
desc = "Unlocks the hidden, deadlier functions of a cyborg."
icon_state = "cyborg_upgrade3"
origin_tech = "combat=6;materials=6"
require_module = TRUE
/obj/item/borg/upgrade/syndicate/do_install(mob/living/silicon/robot/R)
if(R.weapons_unlock)
return // They already had the safety override upgrade, or they're a cyborg type which has this by default.
R.weapons_unlock = TRUE
to_chat(R, "<span class='warning'>Warning: safety protocols have been disabled!</span>")
return TRUE
/obj/item/borg/upgrade/syndie_soap
name = "janitor cyborg syndicate soap"
desc = "Using forbidden technology and some red dye, upgrade a janitorial cyborg's soap performance by 90 percent!"
icon_state = "cyborg_upgrade4"
require_module = TRUE
module_type = /obj/item/robot_module/janitor
items_to_replace = list(
/obj/item/soap/nanotrasen = /obj/item/soap/syndie
)
/***********************/
/**** ABDUCTOR ****/
/***********************/
/obj/item/borg/upgrade/abductor_engi
name = "engineering cyborg abductor upgrade"
desc = "An experimental upgrade that replaces an engineering cyborg's tools with the abductor versions."
icon_state = "abductor_mod"
origin_tech = "engineering=6;materials=6;abductor=3"
require_module = TRUE
module_type = /obj/item/robot_module/engineering
items_to_add = list(/obj/item/rcd/borg)
items_to_replace = list(
/obj/item/weldingtool = /obj/item/weldingtool/abductor,
/obj/item/wrench = /obj/item/wrench/abductor,
/obj/item/screwdriver = /obj/item/screwdriver/abductor,
/obj/item/crowbar = /obj/item/crowbar/abductor,
/obj/item/wirecutters = /obj/item/wirecutters/abductor,
/obj/item/multitool = /obj/item/multitool/abductor
)
special_rechargables = list(
/obj/item/weldingtool/abductor
)
/obj/item/borg/upgrade/rcd/after_install(mob/living/silicon/robot/R)
if(R.emagged) // Emagged engi-borgs have already have the RCD added.
/obj/item/borg/upgrade/abductor_medi
name = "medical cyborg abductor upgrade"
desc = "An experimental upgrade that replaces a medical cyborg's tools with the abductor versions."
icon_state = "abductor_mod"
origin_tech = "biotech=6;materials=6;abductor=2"
require_module = TRUE
module_type = /obj/item/robot_module/medical
items_to_replace = list(
/obj/item/scalpel/laser/laser1 = /obj/item/scalpel/laser/laser3, // No abductor laser scalpel, so next best thing.
/obj/item/hemostat = /obj/item/hemostat/alien,
/obj/item/retractor = /obj/item/retractor/alien,
/obj/item/bonegel = /obj/item/bonegel/alien,
/obj/item/FixOVein = /obj/item/FixOVein/alien,
/obj/item/bonesetter = /obj/item/bonesetter/alien,
/obj/item/circular_saw = /obj/item/circular_saw/alien,
/obj/item/surgicaldrill = /obj/item/surgicaldrill/alien,
/obj/item/reagent_containers/borghypo = /obj/item/reagent_containers/borghypo/abductor
)
/obj/item/borg/upgrade/abductor_medi/after_install(mob/living/silicon/robot/R)
. = ..()
if(!R.emagged) // Emagged Mediborgs that are upgraded need the evil chems.
return
R.module.remove_item_from_lists(/obj/item/rcd) // So emagging them in the future won't grant another RCD.
..()
for(var/obj/item/reagent_containers/borghypo/F in R.module.modules)
F.emag_act()