Nanite Increased Diagnostics Program (#53157)

Makes nanite reduced diagnostic function baseline and adds new increased diagnostics program

* A better way

* Increased Harmonic Nanite research costs by +1000/+1000

* Harmonic nanite passive boost.
This commit is contained in:
Timberpoes
2020-09-06 14:40:56 +03:00
committed by GitHub
parent ca19c4ebe3
commit cced2d5cdc
4 changed files with 27 additions and 29 deletions
+8 -12
View File
@@ -1,3 +1,5 @@
#define HARMONIC_REGEN_BOOST 0.1
/datum/component/nanites
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
@@ -15,7 +17,7 @@
var/list/datum/nanite_program/protocol/protocols = list() ///Separate list of protocol programs, to avoid looping through the whole programs list when cheking for conflicts
var/start_time = 0 ///Timestamp to when the nanites were first inserted in the host
var/stealth = FALSE //if TRUE, does not appear on HUDs and health scans
var/diagnostics = TRUE //if TRUE, displays program list when scanned by nanite scanners
var/diagnostics = FALSE //if TRUE, displays program list when scanned by nanite scanners
/datum/component/nanites/Initialize(amount = 100, cloud = 0)
if(!isliving(parent) && !istype(parent, /datum/nanite_cloud_backup))
@@ -109,7 +111,7 @@
/datum/component/nanites/process()
if(!IS_IN_STASIS(host_mob))
adjust_nanites(null, regen_rate)
adjust_nanites(null, regen_rate + (SSresearch.science_tech.researched_nodes["nanite_harmonic"] ? HARMONIC_REGEN_BOOST : 0))
add_research()
for(var/X in programs)
var/datum/nanite_program/NP = X
@@ -316,14 +318,6 @@
return TRUE //yup i exist
/datum/component/nanites/proc/get_data(list/nanite_data)
nanite_data["nanite_volume"] = nanite_volume
nanite_data["max_nanites"] = max_nanites
nanite_data["cloud_id"] = cloud_id
nanite_data["regen_rate"] = regen_rate
nanite_data["safety_threshold"] = safety_threshold
nanite_data["stealth"] = stealth
/datum/component/nanites/proc/get_programs(datum/source, list/nanite_programs)
SIGNAL_HANDLER
@@ -360,7 +354,7 @@
to_chat(user, "<span class='info'>================</span>")
to_chat(user, "<span class='info'>Program List:</span>")
if(!diagnostics)
to_chat(user, "<span class='alert'>Diagnostics Disabled</span>")
to_chat(user, "<span class='alert'>Nanite debugging disabled.</span>")
else
for(var/X in programs)
var/datum/nanite_program/NP = X
@@ -372,7 +366,7 @@
data["has_nanites"] = TRUE
data["nanite_volume"] = nanite_volume
data["regen_rate"] = regen_rate
data["regen_rate"] = regen_rate + (SSresearch.science_tech.researched_nodes["nanite_harmonic"] ? HARMONIC_REGEN_BOOST : 0)
data["safety_threshold"] = safety_threshold
data["cloud_id"] = cloud_id
data["cloud_active"] = cloud_active
@@ -425,3 +419,5 @@
id++
mob_programs += list(mob_program)
data["mob_programs"] = mob_programs
#undef HARMONIC_REGEN_BOOST
@@ -67,12 +67,12 @@
program_type = /datum/nanite_program/stealth
category = list("Utility Nanites")
/datum/design/nanites/reduced_diagnostics
name = "Reduced Diagnostics"
desc = "Disables some high-cost diagnostics in the nanites, making them unable to communicate their program list to portable scanners. \
Doing so saves some power, slightly increasing their replication speed."
id = "red_diag_nanites"
program_type = /datum/nanite_program/reduced_diagnostics
/datum/design/nanites/nanite_debugging
name = "Nanite Debugging"
desc = "Enables various high-cost diagnostics in the nanites, making them able to communicate their program list to portable scanners. \
Doing so uses some power, slightly decreasing their replication speed."
id = "debugging_nanites"
program_type = /datum/nanite_program/nanite_debugging
category = list("Utility Nanites")
/datum/design/nanites/access
@@ -89,19 +89,21 @@
. = ..()
nanites.stealth = FALSE
/datum/nanite_program/reduced_diagnostics
name = "Reduced Diagnostics"
desc = "Disables some high-cost diagnostics in the nanites, making them unable to communicate their program list to portable scanners."
/datum/nanite_program/nanite_debugging
name = "Nanite Debugging"
desc = "Enables various high-cost diagnostics in the nanites, making them able to communicate their program list to portable scanners. \
Doing so uses some power, slightly decreasing their replication speed."
rogue_types = list(/datum/nanite_program/toxic)
use_rate = 0.1
/datum/nanite_program/reduced_diagnostics/enable_passive_effect()
. = ..()
nanites.diagnostics = FALSE
/datum/nanite_program/reduced_diagnostics/disable_passive_effect()
/datum/nanite_program/nanite_debugging/enable_passive_effect()
. = ..()
nanites.diagnostics = TRUE
/datum/nanite_program/nanite_debugging/disable_passive_effect()
. = ..()
nanites.diagnostics = FALSE
/datum/nanite_program/relay
name = "Relay"
desc = "The nanites receive and relay long-range nanite signals."
+3 -3
View File
@@ -828,7 +828,7 @@
prereq_ids = list("datatheory")
design_ids = list("nanite_disk","nanite_remote","nanite_comm_remote","nanite_scanner",\
"nanite_chamber","public_nanite_chamber","nanite_chamber_control","nanite_programmer","nanite_program_hub","nanite_cloud_control",\
"relay_nanites", "monitoring_nanites", "research_nanites" ,"researchplus_nanites", "access_nanites", "repairing_nanites","sensor_nanite_volume", "repeater_nanites", "relay_repeater_nanites","red_diag_nanites")
"relay_nanites", "monitoring_nanites", "research_nanites" ,"researchplus_nanites", "access_nanites", "repairing_nanites","sensor_nanite_volume", "repeater_nanites", "relay_repeater_nanites","debugging_nanites")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000)
/datum/techweb_node/nanite_smart
@@ -875,10 +875,10 @@
/datum/techweb_node/nanite_harmonic
id = "nanite_harmonic"
display_name = "Harmonic Nanite Programming"
description = "Nanite programs that require seamless integration between nanites and biology."
description = "Nanite programs that require seamless integration between nanites and biology. Passively increases nanite regeneration rate for all clouds upon researching."
prereq_ids = list("nanite_bio","nanite_smart","nanite_mesh")
design_ids = list("fakedeath_nanites","aggressive_nanites","defib_nanites","regenerative_plus_nanites","brainheal_plus_nanites","purging_plus_nanites","adrenaline_nanites")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2000, TECHWEB_POINT_TYPE_NANITES = 2000)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3000, TECHWEB_POINT_TYPE_NANITES = 3000)
/datum/techweb_node/nanite_combat
id = "nanite_military"