diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 067a3dcc75..a675c8d750 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -170,6 +170,7 @@ ..() beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) @@ -179,7 +180,49 @@ component_parts += new /obj/item/weapon/reagent_containers/syringe(src) component_parts += new /obj/item/stack/material/glass/reinforced(src, 2) - RefreshParts() + RefreshParts(0) + +/obj/machinery/sleeper/RefreshParts(var/limited = 1) + var/man_rating = 0 + var/cap_rating = 0 + + available_chemicals = initial(available_chemicals) + idle_power_usage = initial(idle_power_usage) + active_power_usage = initial(active_power_usage) + + for(var/obj/item/weapon/stock_parts/P in component_parts) + if(istype(P, /obj/item/weapon/stock_parts/capacitor)) + cap_rating += P.rating + + cap_rating = max(1, round(cap_rating / 2)) + + idle_power_usage /= cap_rating + active_power_usage /= cap_rating + + if(!limited) + for(var/obj/item/weapon/stock_parts/P in component_parts) + if(istype(P, /obj/item/weapon/stock_parts/manipulator)) + man_rating += P.rating - 1 + + var/new_chemicals = list() + + if(man_rating >= 4) // Alien tech. + var/reag_ID = pickweight( + "healing_nanites" = 10, + "shredding_nanites" = 5, + "irradiated_nanites" = 5, + "neurophage_nanites" = 2 + ) + new_chemicals[reag_ID] = "Nanite" + if(man_rating >= 3) // Anomalous tech. + new_chemicals["immunosuprizine"] = "Immunosuprizine" + if(man_rating >= 2) // Tier 3. + new_chemicals["spaceacillin"] = "Spaceacillin" + if(man_rating >= 1) // Tier 2. + new_chemicals["leporazine"] = "Leporazine" + + available_chemicals += new_chemicals + return /obj/machinery/sleeper/Initialize() . = ..() @@ -351,3 +394,7 @@ desc = "A limited functionality sleeper, all it can do is put patients into stasis. It lacks the medication and configuration of the larger units." icon_state = "sleeper" stasis_level = 100 //Just one setting + +/obj/machinery/sleeper/survival_pod/Initialize() + ..() + RefreshParts() diff --git a/code/game/objects/items/weapons/circuitboards/frame.dm b/code/game/objects/items/weapons/circuitboards/frame.dm index b22c4ca649..913506c9e6 100644 --- a/code/game/objects/items/weapons/circuitboards/frame.dm +++ b/code/game/objects/items/weapons/circuitboards/frame.dm @@ -197,6 +197,7 @@ board_type = new /datum/frame/frame_types/medical_pod origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) req_components = list( + /obj/item/weapon/stock_parts/manipulator = 1, /obj/item/weapon/stock_parts/scanning_module = 1, /obj/item/weapon/reagent_containers/glass/beaker = 3, /obj/item/weapon/reagent_containers/syringe = 3, diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 1ec5e6e334..6595343169 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -879,3 +879,47 @@ datum/reagent/talum_quem/affect_blood(var/mob/living/carbon/M, var/alien, var/re randmuti(M) M << "You feel odd!" M.apply_effect(6 * removed, IRRADIATE, 0) + +/* + * Hostile nanomachines. + * Unscannable, and commonly all look the same. + */ + +/datum/reagent/shredding_nanites + name = "Restorative Nanites" + id = "shredding_nanites" + description = "Miniature medical robots that swiftly restore bodily damage. These ones seem to be malfunctioning." + taste_description = "metal" + reagent_state = SOLID + color = "#555555" + metabolism = REM * 4 // Nanomachines. Fast. + +/datum/reagent/shredding_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + M.adjustBruteLoss(4 * removed) + M.adjustOxyLoss(4 * removed) + +/datum/reagent/irradiated_nanites + name = "Restorative Nanites" + id = "irradiated_nanites" + description = "Miniature medical robots that swiftly restore bodily damage. These ones seem to be malfunctioning." + taste_description = "metal" + reagent_state = SOLID + color = "#555555" + metabolism = REM * 4 + +/datum/reagent/irradiated_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + radiation_repository.radiate(get_turf(M), 20) // Irradiate people around you. + M.radiation = max(M.radiation + 5 * removed, 0) // Irradiate you. Because it's inside you. + +/datum/reagent/neurophage_nanites + name = "Restorative Nanites" + id = "neurophage_nanites" + description = "Miniature medical robots that swiftly restore bodily damage. These ones seem to be completely hostile." + taste_description = "metal" + reagent_state = SOLID + color = "#555555" + metabolism = REM * 4 + +/datum/reagent/neurophage_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + M.adjustBrainLoss(2 * removed) // Their job is to give you a bad time. + M.adjustBruteLoss(2 * removed)