Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nanite changes #8141

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ef2baac
temp commit
RikuTheKiller Apr 25, 2023
b9a07d0
removed effect multiplier from entering bloodstream
RikuTheKiller Apr 25, 2023
e2dd709
changed some names around
RikuTheKiller Apr 25, 2023
f1337fb
made it not dumb
RikuTheKiller Apr 25, 2023
4e8d375
woo changed stuff
RikuTheKiller Apr 25, 2023
eb2a432
extraordinarily small change
RikuTheKiller Apr 25, 2023
a5351c8
sped up transfer
RikuTheKiller Apr 28, 2023
b9906af
made cbu and cbc obey the rules
RikuTheKiller Apr 28, 2023
b5c4056
removed all uncapped nanite subtyping
RikuTheKiller Apr 28, 2023
b3ec6f2
fixed some remaining type paths
RikuTheKiller Apr 28, 2023
b1bd082
moved the transfer code, made it instant
RikuTheKiller Apr 28, 2023
a838b9e
doubled the metabolism of mechanites
RikuTheKiller Apr 28, 2023
239bba1
significantly cut down on the cost of repairing emp damage
RikuTheKiller Apr 28, 2023
16fcb6e
realized a major mistake
RikuTheKiller Apr 28, 2023
1524607
i give up, makes it less dumb
RikuTheKiller Apr 28, 2023
8549b16
github moment
RikuTheKiller Apr 28, 2023
6d80add
cleans up leftovers
RikuTheKiller Apr 28, 2023
e6da0ff
wh
RikuTheKiller Apr 28, 2023
77ef7bc
changed burn requirement, OCD'd a comment
RikuTheKiller Apr 28, 2023
9b01524
makes the metabolism of mechanites in line with the others
RikuTheKiller Apr 28, 2023
145ee77
forgot to add the effect multiplier
RikuTheKiller Apr 28, 2023
933deb0
added damage repair to mechanites, removed effect multiplier from CE_…
RikuTheKiller Apr 29, 2023
130e3fa
made the repair less fucked once more
RikuTheKiller Apr 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
if(!islist(H.internal_organs_by_efficiency[process]))
H.internal_organs_by_efficiency[process] = list()
H.internal_organs_by_efficiency[process] |= O

if(organ_efficiency_multiplier)
for(var/organ in O.organ_efficiency)
O.organ_efficiency[organ] = round(O.organ_efficiency[organ] * (1 + organ_efficiency_multiplier), 1)
Expand Down
12 changes: 6 additions & 6 deletions code/modules/organs/internal/internal_wounds/robotic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/datum/component/internal_wound/robotic/blunt
treatments_item = list(/obj/item/stack/nanopaste = 1)
treatments_tool = list(QUALITY_HAMMERING = FAILCHANCE_NORMAL)
treatments_chem = list(CE_MECH_REPAIR = 0.55) // repair nanites + 3 metals OR repair nanite OD + a metal
treatments_chem = list(CE_MECH_REPAIR = 0.5)
severity = 0
severity_max = 5
hal_damage = IWOUND_INSIGNIFICANT_DAMAGE
Expand All @@ -33,7 +33,7 @@
/datum/component/internal_wound/robotic/sharp
treatments_item = list(/obj/item/stack/nanopaste = 1)
treatments_tool = list(QUALITY_SEALING = FAILCHANCE_NORMAL)
treatments_chem = list(CE_MECH_REPAIR = 0.85) // repair nanites + 6 metals OR repair nanite OD + 7 metals
treatments_chem = list(CE_MECH_REPAIR = 0.8)
severity = 0
severity_max = 5
hal_damage = IWOUND_INSIGNIFICANT_DAMAGE
Expand All @@ -59,7 +59,7 @@
/datum/component/internal_wound/robotic/edge
treatments_item = list(/obj/item/stack/cable_coil = 5, /obj/item/stack/nanopaste = 1)
treatments_tool = list(QUALITY_CLAMPING = FAILCHANCE_NORMAL)
treatments_chem = list(CE_MECH_REPAIR = 0.85)
treatments_chem = list(CE_MECH_REPAIR = 0.8)
severity = 0
severity_max = 5
hal_damage = IWOUND_INSIGNIFICANT_DAMAGE
Expand All @@ -85,7 +85,7 @@
/datum/component/internal_wound/robotic/emp_burn
treatments_item = list(/obj/item/stack/cable_coil = 5, /obj/item/stack/nanopaste = 1)
treatments_tool = list(QUALITY_PULSING = FAILCHANCE_NORMAL)
treatments_chem = list(CE_MECH_REPAIR = 0.95) // repair nanite OD + all metals
treatments_chem = list(CE_MECH_REPAIR = 0.6)
severity = 0
severity_max = 5
next_wound = /datum/component/internal_wound/robotic/overheat
Expand Down Expand Up @@ -139,7 +139,7 @@
// Other wounds
/datum/component/internal_wound/robotic/corrosion
treatments_item = list(/obj/item/stack/nanopaste = 2)
treatments_chem = list(CE_MECH_ACID = 1.5) // sulphiric + hydrochloric acid or poly acid
treatments_chem = list(CE_MECH_ACID = 1.5, CE_MECH_REPAIR = 0.5) // sulphiric + hydrochloric acid or poly acid
scar = /datum/component/internal_wound/robotic/blunt // Cleaning corrosion involves removing material
severity = 0
severity_max = 4
Expand All @@ -155,7 +155,7 @@
name = "plastic deformation"
treatments_item = list(/obj/item/stack/nanopaste = 5)
treatments_tool = list(QUALITY_WELDING = FAILCHANCE_NORMAL)
treatments_chem = list(CE_MECH_REPAIR = 0.95) // repair nanite OD + all metals
treatments_chem = list(CE_MECH_REPAIR = 1)
severity = 4
severity_max = 4
hal_damage = IWOUND_INSIGNIFICANT_DAMAGE
Expand Down
3 changes: 0 additions & 3 deletions code/modules/reagents/reagents/dispenser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
/datum/reagent/metal
reagent_type = "Metal"

/datum/reagent/metal/affect_ingest(mob/living/carbon/M, alien, effect_multiplier)
M.add_chemical_effect(CE_MECH_REPAIR, 0.05) // Makes metals useful and stackable for FBPs

/datum/reagent/metal/aluminum
name = "Aluminum"
id = "aluminum"
Expand Down
84 changes: 41 additions & 43 deletions code/modules/reagents/reagents/nanites.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
if(B && B.volume)
B.remove_self(volume * NANOBOTS_BLOOD_DRAIN)

/datum/reagent/nanites/proc/will_occur(mob/living/carbon/M, alien, var/location)
/datum/reagent/nanites/proc/will_occur(mob/living/carbon/M, alien, location)
if(location == CHEM_BLOOD)
return TRUE

/datum/reagent/nanites/consumed_amount(mob/living/carbon/M, alien, var/location)
/datum/reagent/nanites/consumed_amount(mob/living/carbon/M, alien, location)
if(will_occur(M, alien, location))
return ..()
else
return 0
else if(location == CHEM_INGEST)
holder.trans_to_mob(M, volume, CHEM_BLOOD) // Nanites dig through the stomach lining to get into the blood.
return 0

/datum/reagent/nanites/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
eat_blood(M)
Expand Down Expand Up @@ -79,9 +80,7 @@
heating_products = null

/datum/reagent/nanites/uncapped/will_occur(mob/living/carbon/M, alien, var/location)
if(type == /datum/reagent/nanites/uncapped) // only derived classes are consumed
return FALSE
return TRUE
return FALSE

/datum/reagent/nanites/arad
name = "A-rad"
Expand Down Expand Up @@ -160,7 +159,7 @@
/datum/reagent/nanites/nanosymbiotes
name = "Nanosymbiotes"
id = "nanosymbiotes"
description = "Microscopic construction robots programmed to heal body cells."
description = "Microscopic construction robots programmed to heal bodily structures."

/datum/reagent/nanites/nanosymbiotes/will_occur(mob/living/carbon/M, alien, var/location)
if(..() && (M.getBruteLoss() || M.getFireLoss() || M.getToxLoss() || M.getCloneLoss() || M.getBrainLoss()))
Expand All @@ -176,7 +175,7 @@
/datum/reagent/nanites/oxyrush
name = "Oxyrush"
id = "oxyrush"
description = "Microscopic construction robots programmed to keep oxygenation level stable no matter what."
description = "Microscopic construction robots programmed to keep the oxygenation level stable no matter what."

/datum/reagent/nanites/oxyrush/will_occur(mob/living/carbon/M, alien, var/location)
if(..() && M.getOxyLoss())
Expand All @@ -190,19 +189,19 @@
/datum/reagent/nanites/trauma_control_system
name = "Trauma Control System"
id = "trauma_control_system"
description = "Microscopic construction robots programmed to restore vitality of damaged organs."
description = "Microscopic construction robots programmed to restore the vitality of damaged organs. Unable to repair prosthetics."

/datum/reagent/nanites/trauma_control_system/will_occur(mob/living/carbon/M, alien, var/location)
if(..() && ishuman(M))
var/mob/living/carbon/human/H = M
for(var/obj/item/organ/organ in H.organs) //Grab the organ holding the implant.
for(var/obj/item/organ/organ in H.organs)
if(organ.damage > 0 && !BP_IS_ROBOTIC(organ))
return TRUE

/datum/reagent/nanites/trauma_control_system/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
if(..() && ishuman(M))
var/mob/living/carbon/human/H = M
for(var/obj/item/organ/organ in H.organs) //Grab the organ holding the implant.
for(var/obj/item/organ/organ in H.organs)
if (istype(organ, /obj/item/organ/external) && organ.damage > 0 && !BP_IS_ROBOTIC(organ))
organ.heal_damage((2 + organ.damage * 0.03)* effect_multiplier, (2 + organ.damage * 0.03)* effect_multiplier)
else if (istype(organ, /obj/item/organ/internal) && organ.damage > 0 && !BP_IS_ROBOTIC(organ))
Expand All @@ -227,55 +226,55 @@
if(istype(current, /datum/reagent/nanites) && !istype(current, /datum/reagent/nanites/purgers))
R.remove_self(effect_multiplier * 1)

/datum/reagent/nanites/uncapped/control_booster_utility
/datum/reagent/nanites/control_booster_utility
name = "Control Booster Utility"
id = "cbu"
description = "Microscopic construction robots programmed to enchant immensively mental capabilities."
heating_point = 523
heating_products = list("uncap nanites")
reagent_type = "Nanites/Stimulator"

/datum/reagent/nanites/uncapped/control_booster_utility/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
/datum/reagent/nanites/control_booster_utility/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
if(..())
M.stats.addTempStat(STAT_MEC, STAT_LEVEL_ADEPT, STIM_TIME, "CBU")
M.stats.addTempStat(STAT_BIO, STAT_LEVEL_ADEPT, STIM_TIME, "CBU")
M.stats.addTempStat(STAT_COG, STAT_LEVEL_ADEPT, STIM_TIME, "CBU")

/datum/reagent/nanites/uncapped/control_booster_combat
/datum/reagent/nanites/control_booster_combat
name = "Control Booster Combat"
id = "cbc"
description = "Microscopic construction robots programmed to enchant combat capabilites to maximum."
heating_point = 523
heating_products = list("uncap nanites")
reagent_type = "Nanites/Stimulator"

/datum/reagent/nanites/uncapped/control_booster_combat/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
/datum/reagent/nanites/control_booster_combat/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
if(..())
M.stats.addTempStat(STAT_VIG, STAT_LEVEL_ADEPT, STIM_TIME, "CBC")
M.stats.addTempStat(STAT_TGH, STAT_LEVEL_ADEPT, STIM_TIME, "CBC")
M.stats.addTempStat(STAT_ROB, STAT_LEVEL_ADEPT, STIM_TIME, "CBC")

/datum/reagent/nanites/uncapped/voice_mimic
/datum/reagent/nanites/voice_mimic
name = "Voice mimics"
id = "nanovoice"
description = "Microscopic construction robots programmed to change users voice. You should hit them first, just in case..."
var/voiceName = "Unknown"
heating_point = 523
heating_products = list("uncap nanites")

/datum/reagent/nanites/uncapped/voice_mimic/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
/datum/reagent/nanites/voice_mimic/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
if(..())
M.add_chemical_effect(CE_VOICEMIMIC, voiceName)

/datum/reagent/nanites/uncapped/dynamic_handprints
/datum/reagent/nanites/dynamic_handprints
name = "Handyprints"
id = "nanohands"
description = "Microscopic construction robots programmed to change handprints while in bloodstream."
var/uni_identity
heating_point = 523
heating_products = list("uncap nanites")

/datum/reagent/nanites/uncapped/dynamic_handprints/on_mob_add(mob/living/L)
/datum/reagent/nanites/dynamic_handprints/on_mob_add(mob/living/L)
..()
var/mob/living/carbon/human/host = L
if(istype(host))
Expand All @@ -284,37 +283,36 @@
host.fingers_trace = H.fingers_trace
return

/datum/reagent/nanites/uncapped/dynamic_handprints/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
/datum/reagent/nanites/dynamic_handprints/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
if(..())
M.add_chemical_effect(CE_DYNAMICFINGERS, uni_identity)

// FBP med - simple nanites for dealing with wounds and applying robo-chem effects
/datum/reagent/nanites/fbp
name = "simple nanobots"
description = "Microscopic construction robots. Useless without programming and have limited use."
id = "dont use these either"
constant_metabolism = TRUE

/datum/reagent/nanites/fbp/will_occur(mob/living/carbon/M, alien, var/location)
if(location == CHEM_INGEST)
return TRUE

// "Blood" clot
/datum/reagent/nanites/fbp/repair
name = "repair nanites"
description = "Microscopic construction robots programmed to repair internal components."
id = "fbp_repair"
overdose = REAGENTS_OVERDOSE / 6
/datum/reagent/nanites/repair
name = "Mechanites"
description = "Microscopic construction robots programmed to repair prosthetics."
id = "repair"

/datum/reagent/nanites/fbp/repair/affect_ingest(mob/living/carbon/M, alien, effect_multiplier)
/datum/reagent/nanites/repair/affect_blood(mob/living/carbon/M, alien, effect_multiplier)
if(!..())
return
M.add_chemical_effect(CE_MECH_REPAIR, 0.25)

/datum/reagent/nanites/fbp/repair/overdose(mob/living/carbon/M, alien)
if(!..())
var/mob/living/carbon/human/H = M
if(!istype(H))
return
M.add_chemical_effect(CE_MECH_REPAIR, 0.75)

H.add_chemical_effect(CE_MECH_REPAIR, 1)

var/list/damaged
for(var/obj/item/organ/external/external in H.organs)
if(!BP_IS_ROBOTIC(external))
continue
if(external.brute_dam || external.burn_dam)
damaged += external

var/heal_amount = 5 / damaged.len * effect_multiplier
for(var/obj/item/organ/external/external in damaged)
external.heal_damage(heal_amount, heal_amount, robo_repair = TRUE)


/* Uncomment when CE_MECH_REPLENISH has a use
// "Blood" restore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
/datum/reagent/stim/boxer = offer_data("Boxer bottle (60u)", 3200, 2),
/datum/reagent/stim/turbo = offer_data("TURBO bottle (60u)", 3200, 2),
/obj/item/device/mmi/digital/posibrain = offer_data("positronic brain", 5000, 2),
/datum/reagent/nanites/uncapped/control_booster_utility = offer_data("Control Booster Utility bottle (60u)", 30000, 1),
/datum/reagent/nanites/uncapped/control_booster_combat = offer_data("Control Booster Combat bottle (60u)", 30000, 1),
/datum/reagent/nanites/control_booster_utility = offer_data("Control Booster Utility bottle (60u)", 30000, 1),
/datum/reagent/nanites/control_booster_combat = offer_data("Control Booster Combat bottle (60u)", 30000, 1),
/obj/item/slime_extract/lightpink = offer_data("light pink slime extract", 40000, 1),
/obj/item/slime_extract/black = offer_data("black slime extract", 40000, 1),
/obj/item/slime_extract/oil = offer_data("oil slime extract", 40000, 1),
Expand Down