mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
## About The Pull Request Our modular folders weren't being checked for this lint because the search directories were defined in a separate var whoops ## Why It's Good For The Game Syntax that's been deprecated for years should be linted for ## Proof Of Testing The green check mark will say all
187 lines
7.1 KiB
Plaintext
187 lines
7.1 KiB
Plaintext
//Programs specifically engineered to cause harm to either the user or its surroundings (as opposed to ones that only do it due to broken programming)
|
|
//Very dangerous!
|
|
|
|
/datum/nanite_program/flesh_eating
|
|
name = "Cellular Breakdown"
|
|
desc = "The nanites destroy cellular structures in the host's body, causing brute damage."
|
|
use_rate = 1.5
|
|
rogue_types = list(/datum/nanite_program/necrotic)
|
|
|
|
/datum/nanite_program/flesh_eating/active_effect()
|
|
if(iscarbon(host_mob))
|
|
var/mob/living/carbon/C = host_mob
|
|
C.take_bodypart_damage(1, 0, TRUE)
|
|
else
|
|
host_mob.adjust_brute_loss(1, TRUE)
|
|
if(prob(3))
|
|
to_chat(host_mob, span_warning("You feel a stab of pain from somewhere inside you."))
|
|
|
|
/datum/nanite_program/poison
|
|
name = "Poisoning"
|
|
desc = "The nanites deliver poisonous chemicals to the host's internal organs, causing toxin damage and vomiting."
|
|
use_rate = 1.5
|
|
rogue_types = list(/datum/nanite_program/toxic)
|
|
|
|
/datum/nanite_program/poison/active_effect()
|
|
host_mob.adjust_tox_loss(1)
|
|
if(prob(2))
|
|
to_chat(host_mob, span_warning("You feel nauseous."))
|
|
if(iscarbon(host_mob))
|
|
var/mob/living/carbon/C = host_mob
|
|
C.vomit(20)
|
|
|
|
/datum/nanite_program/memory_leak
|
|
name = "Memory Leak"
|
|
desc = "This program invades the memory space used by other programs, causing frequent corruptions and errors."
|
|
use_rate = 0
|
|
rogue_types = list(/datum/nanite_program/toxic)
|
|
|
|
/datum/nanite_program/memory_leak/active_effect()
|
|
if(prob(6))
|
|
var/datum/nanite_program/target = pick(nanites.programs)
|
|
if(target == src)
|
|
return
|
|
target.software_error()
|
|
host_mob.investigate_log("[target] nanite program received a software error due to Memory Leak program.", INVESTIGATE_NANITES)
|
|
|
|
/datum/nanite_program/aggressive_replication
|
|
name = "Aggressive Replication"
|
|
desc = "Nanites will consume organic matter to improve their replication rate, damaging the host. The efficiency increases with the volume of nanites, requiring 200 to break even, \
|
|
and scaling linearly for a net positive of 0.1 production rate per 20 nanite volume beyond that."
|
|
use_rate = 1
|
|
rogue_types = list(/datum/nanite_program/necrotic)
|
|
|
|
/datum/nanite_program/aggressive_replication/active_effect()
|
|
var/extra_regen = round(nanites.nanite_volume / 200, 0.1)
|
|
nanites.adjust_nanites(null, extra_regen)
|
|
host_mob.adjust_brute_loss(extra_regen / 2, TRUE)
|
|
|
|
/datum/nanite_program/meltdown
|
|
name = "Meltdown"
|
|
desc = "Causes an internal meltdown inside the nanites, causing internal burns inside the host as well as rapidly destroying the nanite population.\
|
|
Sets the nanites' safety threshold to 0 when activated."
|
|
use_rate = 10
|
|
rogue_types = list(/datum/nanite_program/glitch)
|
|
|
|
/datum/nanite_program/meltdown/active_effect()
|
|
host_mob.adjust_fire_loss(3.5)
|
|
|
|
/datum/nanite_program/meltdown/enable_passive_effect()
|
|
. = ..()
|
|
to_chat(host_mob, span_userdanger("Your blood is burning!"))
|
|
nanites.safety_threshold = 0
|
|
|
|
/datum/nanite_program/meltdown/disable_passive_effect()
|
|
. = ..()
|
|
to_chat(host_mob, span_warning("Your blood cools down, and the pain gradually fades."))
|
|
|
|
/datum/nanite_program/explosive
|
|
name = "Chain Detonation"
|
|
desc = "Detonates all the nanites inside the host in a chain reaction when triggered."
|
|
can_trigger = TRUE
|
|
trigger_cost = 25 //plus every idle nanite left afterwards
|
|
trigger_cooldown = 100 //Just to avoid double-triggering
|
|
rogue_types = list(/datum/nanite_program/toxic)
|
|
|
|
/datum/nanite_program/explosive/on_trigger(comm_message)
|
|
host_mob.visible_message(span_warning("[host_mob] starts emitting a high-pitched buzzing, and [host_mob.p_their()] skin begins to glow..."),\
|
|
span_userdanger("You start emitting a high-pitched buzzing, and your skin begins to glow..."))
|
|
addtimer(CALLBACK(src, PROC_REF(boom)), clamp((nanites.nanite_volume * 0.35), 25, 150))
|
|
|
|
/datum/nanite_program/explosive/proc/boom()
|
|
dyn_explosion(host_mob, nanites.nanite_volume / 50)
|
|
qdel(nanites)
|
|
|
|
//TODO make it defuse if triggered again
|
|
|
|
/datum/nanite_program/heart_stop
|
|
name = "Heart-Stopper"
|
|
desc = "Stops the host's heart when triggered; restarts it if triggered again."
|
|
can_trigger = TRUE
|
|
trigger_cost = 12
|
|
trigger_cooldown = 10
|
|
rogue_types = list(/datum/nanite_program/nerve_decay)
|
|
|
|
/datum/nanite_program/heart_stop/on_trigger(comm_message)
|
|
if(iscarbon(host_mob))
|
|
var/mob/living/carbon/carbon = host_mob
|
|
var/obj/item/organ/heart/heart = carbon.get_organ_slot(ORGAN_SLOT_HEART)
|
|
if(heart)
|
|
if(heart.is_beating())
|
|
heart.Stop()
|
|
else
|
|
heart.Restart()
|
|
|
|
/datum/nanite_program/emp
|
|
name = "Electromagnetic Resonance"
|
|
desc = "The nanites cause an electromagnetic pulse around the host when triggered. Will corrupt other nanite programs!"
|
|
can_trigger = TRUE
|
|
trigger_cost = 10
|
|
trigger_cooldown = 50
|
|
program_flags = NANITE_EMP_IMMUNE
|
|
rogue_types = list(/datum/nanite_program/toxic)
|
|
|
|
/datum/nanite_program/emp/on_trigger(comm_message)
|
|
empulse(host_mob, 1, 2)
|
|
|
|
/datum/nanite_program/pyro
|
|
name = "Sub-Dermal Combustion"
|
|
desc = "The nanites cause buildup of flammable fluids under the host's skin, then ignites them."
|
|
use_rate = 4
|
|
rogue_types = list(/datum/nanite_program/skin_decay, /datum/nanite_program/cryo)
|
|
|
|
/datum/nanite_program/pyro/check_conditions()
|
|
if(host_mob.fire_stacks >= 10 && host_mob.on_fire)
|
|
return FALSE
|
|
return ..()
|
|
|
|
/datum/nanite_program/pyro/active_effect()
|
|
host_mob.adjust_fire_stacks(1)
|
|
host_mob.ignite_mob()
|
|
|
|
/datum/nanite_program/cryo
|
|
name = "Cryogenic Treatment"
|
|
desc = "The nanites rapidly sink heat through the host's skin, lowering their temperature."
|
|
use_rate = 1
|
|
rogue_types = list(/datum/nanite_program/skin_decay, /datum/nanite_program/pyro)
|
|
|
|
/datum/nanite_program/cryo/check_conditions()
|
|
if(host_mob.bodytemperature <= 70)
|
|
return FALSE
|
|
return ..()
|
|
|
|
/datum/nanite_program/cryo/active_effect()
|
|
host_mob.adjust_bodytemperature(-rand(15,25), 50)
|
|
|
|
/datum/nanite_program/comm/mind_control
|
|
name = "Mind Control"
|
|
desc = "The nanites imprint an absolute directive onto the host's brain for one minute when triggered."
|
|
trigger_cost = 30
|
|
trigger_cooldown = 1800
|
|
rogue_types = list(/datum/nanite_program/brain_decay, /datum/nanite_program/brain_misfire)
|
|
|
|
/datum/nanite_program/comm/mind_control/register_extra_settings()
|
|
. = ..()
|
|
extra_settings[NES_DIRECTIVE] = new /datum/nanite_extra_setting/text("...")
|
|
|
|
/datum/nanite_program/comm/mind_control/on_trigger(comm_message)
|
|
if(host_mob.stat == DEAD)
|
|
return
|
|
var/sent_directive = comm_message
|
|
if(!comm_message)
|
|
var/datum/nanite_extra_setting/ES = extra_settings[NES_DIRECTIVE]
|
|
sent_directive = ES.get_value()
|
|
brainwash(host_mob, sent_directive)
|
|
log_game("A mind control nanite program brainwashed [key_name(host_mob)] with the objective '[sent_directive]'.")
|
|
host_mob.log_message("has been brainwashed with the objective '[sent_directive]' triggered by a mind control nanite program.", LOG_ATTACK)
|
|
addtimer(CALLBACK(src, PROC_REF(end_brainwashing)), 600)
|
|
|
|
/datum/nanite_program/comm/mind_control/proc/end_brainwashing()
|
|
if(host_mob.mind && host_mob.mind.has_antag_datum(/datum/antagonist/brainwashed))
|
|
host_mob.mind.remove_antag_datum(/datum/antagonist/brainwashed)
|
|
log_game("[key_name(host_mob)] is no longer brainwashed by nanites.")
|
|
|
|
/datum/nanite_program/comm/mind_control/disable_passive_effect()
|
|
. = ..()
|
|
end_brainwashing()
|