Updates all the borg module items paths (#27990)

* Robot updates my beloved

* Update robot_upgrade.dm

* not needed now
This commit is contained in:
Waterpig
2024-06-15 18:12:19 +01:00
committed by GitHub
parent ff7f33088e
commit 8173aec934
2 changed files with 38 additions and 239 deletions
@@ -704,7 +704,6 @@
if (hasShrunk)
hasShrunk = FALSE
update_transform(4/3)
hasAffection = FALSE //Just so they can get the affection modules back if they want them.
//SKYRAT EDIT ADDITION END
logevent("Chassis model has been reset.")
@@ -13,70 +13,16 @@
model_type = list(/obj/item/robot_model/medical)
model_flags = BORG_MODEL_MEDICAL
/obj/item/borg/upgrade/surgerytools/action(mob/living/silicon/robot/borg)
. = ..()
if(.)
for(var/obj/item/retractor/RT in borg.model.modules)
borg.model.remove_module(RT, TRUE)
for(var/obj/item/hemostat/HS in borg.model.modules)
borg.model.remove_module(HS, TRUE)
for(var/obj/item/cautery/CT in borg.model.modules)
borg.model.remove_module(CT, TRUE)
for(var/obj/item/surgicaldrill/SD in borg.model.modules)
borg.model.remove_module(SD, TRUE)
for(var/obj/item/scalpel/SP in borg.model.modules)
borg.model.remove_module(SP, TRUE)
for(var/obj/item/circular_saw/CS in borg.model.modules)
borg.model.remove_module(CS, TRUE)
for(var/obj/item/healthanalyzer/HA in borg.model.modules)
borg.model.remove_module(HA, TRUE)
var/obj/item/scalpel/advanced/AS = new /obj/item/scalpel/advanced(borg.model)
borg.model.basic_modules += AS
borg.model.add_module(AS, FALSE, TRUE)
var/obj/item/retractor/advanced/AR = new /obj/item/retractor/advanced(borg.model)
borg.model.basic_modules += AR
borg.model.add_module(AR, FALSE, TRUE)
var/obj/item/cautery/advanced/AC = new /obj/item/cautery/advanced(borg.model)
borg.model.basic_modules += AC
borg.model.add_module(AC, FALSE, TRUE)
var/obj/item/healthanalyzer/advanced/AHA = new /obj/item/healthanalyzer/advanced(borg.model)
borg.model.basic_modules += AHA
borg.model.add_module(AHA, FALSE, TRUE)
/obj/item/borg/upgrade/surgerytools/deactivate(mob/living/silicon/robot/borg, user = usr)
. = ..()
if(.)
for(var/obj/item/scalpel/advanced/AS in borg.model.modules)
borg.model.remove_module(AS, TRUE)
for(var/obj/item/retractor/advanced/AR in borg.model.modules)
borg.model.remove_module(AR, TRUE)
for(var/obj/item/cautery/advanced/AC in borg.model.modules)
borg.model.remove_module(AC, TRUE)
for(var/obj/item/healthanalyzer/advanced/AHA in borg.model.modules)
borg.model.remove_module(AHA, TRUE)
var/obj/item/retractor/RT = new (borg.model)
borg.model.basic_modules += RT
borg.model.add_module(RT, FALSE, TRUE)
var/obj/item/hemostat/HS = new (borg.model)
borg.model.basic_modules += HS
borg.model.add_module(HS, FALSE, TRUE)
var/obj/item/cautery/CT = new (borg.model)
borg.model.basic_modules += CT
borg.model.add_module(CT, FALSE, TRUE)
var/obj/item/surgicaldrill/SD = new (borg.model)
borg.model.basic_modules += SD
borg.model.add_module(SD, FALSE, TRUE)
var/obj/item/scalpel/SP = new (borg.model)
borg.model.basic_modules += SP
borg.model.add_module(SP, FALSE, TRUE)
var/obj/item/circular_saw/CS = new (borg.model)
borg.model.basic_modules += CS
borg.model.add_module(CS, FALSE, TRUE)
var/obj/item/healthanalyzer/HA = new (borg.model)
borg.model.basic_modules += HA
borg.model.add_module(HA, FALSE, TRUE)
items_to_add = list(/obj/item/scalpel/advanced,
/obj/item/retractor/advanced,
/obj/item/cautery/advanced,
/obj/item/healthanalyzer/advanced,
)
items_to_remove = list(
/obj/item/borg/cyborg_omnitool/medical,
/obj/item/borg/cyborg_omnitool/medical, // Twice because you get two
/obj/item/healthanalyzer,
)
/*
* ADVANCED ENGINEERING CYBORG UPGRADES
@@ -105,6 +51,8 @@
is_cyborg = TRUE
source = /datum/robot_energy_storage/titanium
#undef ENGINEERING_CYBORG_CHARGE_PER_STACK
/obj/item/borg/upgrade/advanced_materials
name = "engineering advanced materials processor"
desc = "allows a cyborg to synthesize and store advanced materials"
@@ -112,34 +60,15 @@
model_type = list(/obj/item/robot_model/engineering)
model_flags = BORG_MODEL_ENGINEERING
/obj/item/borg/upgrade/advanced_materials/action(mob/living/silicon/robot/borgo, user)
. = ..()
if(!.)
return
if(borgo.hasAdvanced)
to_chat(user, span_warning("This unit already has advanced materials installed!"))
return FALSE;
items_to_add = list(/obj/item/stack/sheet/plasteel/cyborg,
/obj/item/stack/sheet/titaniumglass/cyborg,
)
var/obj/item/stack/sheet/plasteel/cyborg/plasteel_holder = new(borgo.model)
var/obj/item/stack/sheet/titaniumglass/cyborg/titanium_holder = new(borgo.model)
borgo.model.basic_modules += plasteel_holder
borgo.model.basic_modules += titanium_holder
borgo.model.add_module(plasteel_holder, FALSE, TRUE)
borgo.model.add_module(titanium_holder, FALSE, TRUE)
borgo.hasAdvanced = TRUE
/obj/item/borg/upgrade/advanced_materials/deactivate(mob/living/silicon/robot/borgo, user)
/obj/item/borg/upgrade/advanced_materials/deactivate(mob/living/silicon/robot/borg, mob/living/user)
. = ..()
if(!.)
return
borgo.hasAdvanced = FALSE
for(var/obj/item/stack/sheet/plasteel/cyborg/plasteel_holder in borgo.model.modules)
borgo.model.remove_module(plasteel_holder, TRUE)
for(var/obj/item/stack/sheet/titaniumglass/cyborg/titanium_holder in borgo.model.modules)
borgo.model.remove_module(titanium_holder, TRUE)
for(var/datum/robot_energy_storage/plasteel/plasteel_energy in borgo.model.storages)
for(var/datum/robot_energy_storage/plasteel/plasteel_energy in borg.model.storages)
qdel(plasteel_energy)
for(var/datum/robot_energy_storage/titanium/titanium_energy in borgo.model.storages)
for(var/datum/robot_energy_storage/titanium/titanium_energy in borg.model.storages)
qdel(titanium_energy)
/*
@@ -155,25 +84,7 @@
model_type = list(/obj/item/robot_model/miner)
model_flags = BORG_MODEL_MINER
/obj/item/borg/upgrade/welder/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/weldingtool/mini/W in R.model)
R.model.remove_module(W, TRUE)
var/obj/item/weldingtool/largetank/cyborg/WW = new /obj/item/weldingtool/largetank/cyborg(R.model)
R.model.basic_modules += WW
R.model.add_module(WW, FALSE, TRUE)
/obj/item/borg/upgrade/welder/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/weldingtool/largetank/cyborg/WW in R.model)
R.model.remove_module(WW, TRUE)
var/obj/item/weldingtool/mini/W = new (R.model)
R.model.basic_modules += W
R.model.add_module(W, FALSE, TRUE)
items_to_add = list(/obj/item/weldingtool/largetank/cyborg)
/*
* ADVANCED CARGO CYBORG UPGRADES
@@ -200,27 +111,7 @@
model_type = list(/obj/item/robot_model/cargo)
model_flags = BORG_MODEL_CARGO
/obj/item/borg/upgrade/better_clamp/action(mob/living/silicon/robot/cyborg, user = usr)
. = ..()
if(!.)
return
var/obj/item/borg/hydraulic_clamp/better/big_clamp = locate() in cyborg.model.modules
if(big_clamp)
to_chat(user, span_warning("This cyborg is already equipped with an improved integrated hydraulic clamp!"))
return FALSE
big_clamp = new(cyborg.model)
cyborg.model.basic_modules += big_clamp
cyborg.model.add_module(big_clamp, FALSE, TRUE)
/obj/item/borg/upgrade/better_clamp/deactivate(mob/living/silicon/robot/cyborg, user = usr)
. = ..()
if(!.)
return
var/obj/item/borg/hydraulic_clamp/better/big_clamp = locate() in cyborg.model.modules
if(big_clamp)
cyborg.model.remove_module(big_clamp, TRUE)
items_to_add = list(/obj/item/borg/hydraulic_clamp/better)
/datum/design/borg_upgrade_cargo_tele
name = "Cargo teleporter module"
@@ -241,28 +132,7 @@
model_type = list(/obj/item/robot_model/cargo)
model_flags = BORG_MODEL_CARGO
/obj/item/borg/upgrade/cargo_tele/action(mob/living/silicon/robot/cyborg, user = usr)
. = ..()
if(!.)
return
var/obj/item/cargo_teleporter/locate_tele = locate() in cyborg.model.modules
if(locate_tele)
to_chat(user, span_warning("This cyborg is already equipped with a cargo teleporter!"))
return FALSE
locate_tele = new(cyborg.model)
cyborg.model.basic_modules += locate_tele
cyborg.model.add_module(locate_tele, FALSE, TRUE)
/obj/item/borg/upgrade/cargo_tele/deactivate(mob/living/silicon/robot/cyborg, user)
. = ..()
if(!.)
return
var/obj/item/cargo_teleporter/locate_tele = locate() in cyborg.model.modules
if(locate_tele)
cyborg.model.remove_module(locate_tele, TRUE)
items_to_add = list(/obj/item/cargo_teleporter)
/datum/design/borg_upgrade_forging
name = "Forging module"
@@ -283,49 +153,11 @@
model_type = list(/obj/item/robot_model/cargo)
model_flags = BORG_MODEL_CARGO
/obj/item/borg/upgrade/forging/action(mob/living/silicon/robot/cyborg, user = usr)
. = ..()
if(!.)
return
var/obj/item/forging/hammer/locate_hammer = locate() in cyborg.model.modules
var/obj/item/forging/billow/locate_billow = locate() in cyborg.model.modules
var/obj/item/forging/tongs/locate_tongs = locate() in cyborg.model.modules
var/obj/item/borg/forging_setup/locate_forge = locate() in cyborg.model.modules
if(locate_hammer || locate_billow || locate_tongs || locate_forge)
to_chat(user, span_warning("This cyborg is already equipped with a forging set!"))
return FALSE
locate_hammer = new(cyborg.model)
locate_billow = new(cyborg.model)
locate_tongs = new(cyborg.model)
locate_forge = new(cyborg.model)
cyborg.model.basic_modules += locate_hammer
cyborg.model.basic_modules += locate_billow
cyborg.model.basic_modules += locate_tongs
cyborg.model.basic_modules += locate_forge
cyborg.model.add_module(locate_hammer, FALSE, TRUE)
cyborg.model.add_module(locate_billow, FALSE, TRUE)
cyborg.model.add_module(locate_tongs, FALSE, TRUE)
cyborg.model.add_module(locate_forge, FALSE, TRUE)
/obj/item/borg/upgrade/forging/deactivate(mob/living/silicon/robot/cyborg, user)
. = ..()
if(!.)
return
var/obj/item/forging/hammer/locate_hammer = locate() in cyborg.model.modules
if(locate_hammer)
cyborg.model.remove_module(locate_hammer, TRUE)
var/obj/item/forging/billow/locate_billow = locate() in cyborg.model.modules
if(locate_billow)
cyborg.model.remove_module(locate_billow, TRUE)
var/obj/item/forging/tongs/locate_tongs = locate() in cyborg.model.modules
if(locate_tongs)
cyborg.model.remove_module(locate_tongs, TRUE)
var/obj/item/borg/forging_setup/locate_forge = locate() in cyborg.model.modules
if(locate_forge)
cyborg.model.remove_module(locate_forge, TRUE)
items_to_add = list(/obj/item/forging/hammer,
/obj/item/forging/billow,
/obj/item/forging/tongs,
/obj/item/borg/forging_setup,
)
/*
* SERVICE CYBORG UPGRADES
@@ -374,6 +206,7 @@
require_model = TRUE
model_type = list(/obj/item/robot_model/service)
model_flags = BORG_MODEL_SERVICE
items_to_add = list(
/obj/item/secateurs,
/obj/item/cultivator,
@@ -392,18 +225,7 @@
desc = "An experimental device which allows a cyborg to disguise themself into another type of cyborg."
icon_state = "cyborg_upgrade3"
/obj/item/borg/upgrade/borg_shapeshifter/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/borg_shapeshifter/BS = new /obj/item/borg_shapeshifter(R.model)
R.model.basic_modules += BS
R.model.add_module(BS, FALSE, TRUE)
/obj/item/borg/upgrade/borg_shapeshifter/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/borg_shapeshifter/BS in R.model)
R.model.remove_module(BS, TRUE)
items_to_add = list(/obj/item/borg_shapeshifter)
/// Quadborg time
/obj/item/borg/upgrade/affectionmodule
@@ -411,40 +233,19 @@
desc = "A module that upgrades the ability of borgs to display affection."
icon_state = "cyborg_upgrade3"
items_to_add = list(/obj/item/quadborg_tongue,
/obj/item/quadborg_nose)
/obj/item/borg/upgrade/affectionmodule/action(mob/living/silicon/robot/borg)
. = ..()
if(!.)
return
if(borg.hasAffection)
to_chat(usr, span_warning("This unit already has a affection module installed!"))
return FALSE
if(!(TRAIT_R_WIDE in borg.model.model_features))
to_chat(usr, span_warning("This unit's chassis does not support this module."))
return FALSE
var/obj/item/quadborg_tongue/quadtongue = new /obj/item/quadborg_tongue(borg.model)
borg.model.basic_modules += quadtongue
borg.model.add_module(quadtongue, FALSE, TRUE)
var/obj/item/quadborg_nose/quadnose = new /obj/item/quadborg_nose(borg.model)
borg.model.basic_modules += quadnose
borg.model.add_module(quadnose, FALSE, TRUE)
borg.hasAffection = TRUE
/obj/item/borg/upgrade/affectionmodule/deactivate(mob/living/silicon/robot/borg, user = usr)
. = ..()
if(.)
return
borg.hasAffection = FALSE
for(var/obj/item/quadborg_tongue/quadtongue in borg.model.modules)
borg.model.remove_module(quadtongue, TRUE)
for(var/obj/item/quadborg_nose/quadnose in borg.model.modules)
borg.model.remove_module(quadnose, TRUE)
/// The Shrinkening
/mob/living/silicon/robot
var/hasShrunk = FALSE
var/hasAffection = FALSE
var/hasAdvanced = FALSE
/obj/item/borg/upgrade/shrink
name = "borg shrinker"
@@ -504,11 +305,10 @@
desc = "A module that greatly upgrades the ability of borgs to display affection."
icon_state = "cyborg_upgrade3"
custom_price = 0
items_to_add = list(
/obj/item/kinky_shocker,
/obj/item/clothing/mask/leatherwhip,
/obj/item/spanking_pad,
/obj/item/tickle_feather,
/obj/item/clothing/erp_leash,
)
items_to_add = list(/obj/item/kinky_shocker,
/obj/item/clothing/mask/leatherwhip,
/obj/item/spanking_pad,
/obj/item/tickle_feather,
/obj/item/clothing/erp_leash,
)