This is a test to see if they all work together

Title
This commit is contained in:
keronshb
2020-01-06 20:29:44 -05:00
parent 1fca1901da
commit a7af5203e7
11 changed files with 1625 additions and 1501 deletions
@@ -380,7 +380,7 @@
name = "Mind Control"
desc = "The nanites imprint an absolute directive onto the host's brain while they're active."
id = "mindcontrol_nanites"
program_type = /datum/nanite_program/mind_control
program_type = /datum/nanite_program/triggered/comm/mind_control
category = list("Weaponized Nanites")
////////////////////SUPPRESSION NANITES//////////////////////////////////////
@@ -462,6 +462,20 @@
program_type = /datum/nanite_program/triggered/comm/hallucination
category = list("Suppression Nanites")
/datum/design/nanites/good_mood
name = "Happiness Enhancer"
desc = "The nanites synthesize serotonin inside the host's brain, creating an artificial sense of happiness."
id = "good_mood_nanites"
program_type = /datum/nanite_program/good_mood
category = list("Suppression Nanites")
/datum/design/nanites/bad_mood
name = "Happiness Suppressor"
desc = "The nanites suppress the production of serotonin inside the host's brain, creating an artificial state of depression."
id = "bad_mood_nanites"
program_type = /datum/nanite_program/bad_mood
category = list("Suppression Nanites")
////////////////////SENSOR NANITES//////////////////////////////////////
/datum/design/nanites/sensor_health
@@ -3,7 +3,7 @@
/datum/nanite_program/regenerative
name = "Accelerated Regeneration"
desc = "The nanites boost the host's natural regeneration, increasing their healing speed. Does not consume nanites if the host is unharmed."
use_rate = 2.5
use_rate = 0.5
rogue_types = list(/datum/nanite_program/necrotic)
/datum/nanite_program/regenerative/check_conditions()
@@ -23,11 +23,11 @@
if(!parts.len)
return
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(1/parts.len, 1/parts.len))
if(L.heal_damage(0.5/parts.len, 0.5/parts.len, null, BODYPART_ORGANIC))
host_mob.update_damage_overlays()
else
host_mob.adjustBruteLoss(-1, TRUE)
host_mob.adjustFireLoss(-1, TRUE)
host_mob.adjustBruteLoss(-0.5, TRUE)
host_mob.adjustFireLoss(-0.5, TRUE)
/datum/nanite_program/temperature
name = "Temperature Adjustment"
@@ -112,7 +112,7 @@
/datum/nanite_program/repairing
name = "Mechanical Repair"
desc = "The nanites fix damage in the host's mechanical limbs."
use_rate = 0.5 //much more efficient than organic healing
use_rate = 0.5
rogue_types = list(/datum/nanite_program/necrotic)
/datum/nanite_program/repairing/check_conditions()
@@ -137,13 +137,13 @@
return
var/update = FALSE
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(1/parts.len, 1/parts.len, only_robotic = TRUE, only_organic = FALSE))
if(L.heal_damage(1.5/parts.len, 1.5/parts.len, null, BODYPART_ROBOTIC)) //much faster than organic healing
update = TRUE
if(update)
host_mob.update_damage_overlays()
else
host_mob.adjustBruteLoss(-1, TRUE)
host_mob.adjustFireLoss(-1, TRUE)
host_mob.adjustBruteLoss(-1.5, TRUE)
host_mob.adjustFireLoss(-1.5, TRUE)
/datum/nanite_program/purging_advanced
name = "Selective Blood Purification"
@@ -358,4 +358,64 @@
/datum/nanite_program/triggered/comm/hallucination/copy_extra_settings_to(datum/nanite_program/triggered/comm/hallucination/target)
target.hal_type = hal_type
target.hal_details = hal_details
target.comm_code = comm_code
target.comm_code = comm_code
/datum/nanite_program/good_mood
name = "Happiness Enhancer"
desc = "The nanites synthesize serotonin inside the host's brain, creating an artificial sense of happiness."
use_rate = 0.1
rogue_types = list(/datum/nanite_program/brain_decay)
extra_settings = list("Mood Message")
var/message = "HAPPINESS ENHANCEMENT"
/datum/nanite_program/good_mood/set_extra_setting(user, setting)
if(setting == "Mood Message")
var/new_message = stripped_input(user, "Choose the message visible on the mood effect.", "Message", message, MAX_NAME_LEN)
if(!new_message)
return
message = new_message
/datum/nanite_program/good_mood/get_extra_setting(setting)
if(setting == "Mood Message")
return message
/datum/nanite_program/good_mood/copy_extra_settings_to(datum/nanite_program/good_mood/target)
target.message = message
/datum/nanite_program/good_mood/enable_passive_effect()
. = ..()
SEND_SIGNAL(host_mob, COMSIG_ADD_MOOD_EVENT, "nanite_happy", /datum/mood_event/nanite_happiness, message)
/datum/nanite_program/good_mood/disable_passive_effect()
. = ..()
SEND_SIGNAL(host_mob, COMSIG_CLEAR_MOOD_EVENT, "nanite_happy")
/datum/nanite_program/bad_mood
name = "Happiness Suppressor"
desc = "The nanites suppress the production of serotonin inside the host's brain, creating an artificial state of depression."
use_rate = 0.1
rogue_types = list(/datum/nanite_program/brain_decay)
extra_settings = list("Mood Message")
var/message = "HAPPINESS SUPPRESSION"
/datum/nanite_program/bad_mood/set_extra_setting(user, setting)
if(setting == "Mood Message")
var/new_message = stripped_input(user, "Choose the message visible on the mood effect.", "Message", message, MAX_NAME_LEN)
if(!new_message)
return
message = new_message
/datum/nanite_program/bad_mood/get_extra_setting(setting)
if(setting == "Mood Message")
return message
/datum/nanite_program/bad_mood/copy_extra_settings_to(datum/nanite_program/bad_mood/target)
target.message = message
/datum/nanite_program/bad_mood/enable_passive_effect()
. = ..()
SEND_SIGNAL(host_mob, COMSIG_ADD_MOOD_EVENT, "nanite_sadness", /datum/mood_event/nanite_sadness, message)
/datum/nanite_program/bad_mood/disable_passive_effect()
. = ..()
SEND_SIGNAL(host_mob, COMSIG_CLEAR_MOOD_EVENT, "nanite_sadness")
@@ -6,6 +6,7 @@
rogue_types = list(/datum/nanite_program/toxic)
extra_settings = list("Program Overwrite","Cloud Overwrite")
var/pulse_cooldown = 0
var/sync_programs = TRUE
var/sync_overwrite = FALSE
var/overwrite_cloud = FALSE
@@ -67,12 +68,16 @@
target.sync_overwrite = sync_overwrite
/datum/nanite_program/viral/active_effect()
if(world.time < pulse_cooldown)
return
for(var/mob/M in orange(host_mob, 5))
if(prob(5))
if(sync_programs)
SEND_SIGNAL(M, COMSIG_NANITE_SYNC, nanites, sync_overwrite)
if(overwrite_cloud)
SEND_SIGNAL(M, COMSIG_NANITE_SET_CLOUD, set_cloud)
if(SEND_SIGNAL(M, COMSIG_NANITE_IS_STEALTHY))
continue
if(sync_programs)
SEND_SIGNAL(M, COMSIG_NANITE_SYNC, nanites, sync_overwrite)
if(overwrite_cloud)
SEND_SIGNAL(M, COMSIG_NANITE_SET_CLOUD, set_cloud)
pulse_cooldown = world.time + 75
/datum/nanite_program/monitoring
name = "Monitoring"
@@ -257,26 +262,27 @@
resulting in an extremely infective strain of nanites."
use_rate = 1.50
rogue_types = list(/datum/nanite_program/aggressive_replication, /datum/nanite_program/necrotic)
var/spread_cooldown = 0
/datum/nanite_program/spreading/active_effect()
if(prob(10))
var/list/mob/living/target_hosts = list()
var/turf/T = get_turf(host_mob)
for(var/mob/living/L in range(5, host_mob))
if(!(MOB_ORGANIC in L.mob_biotypes) && !(MOB_UNDEAD in L.mob_biotypes))
continue
if(!disease_air_spread_walk(T, get_turf(L)))
continue
target_hosts += L
target_hosts -= host_mob
if(!target_hosts.len)
return
var/mob/living/infectee = pick(target_hosts)
if(prob(100 - (infectee.get_permeability_protection() * 100)))
//this will potentially take over existing nanites!
infectee.AddComponent(/datum/component/nanites, 10)
SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites)
infectee.investigate_log("[key_name(infectee)] was infected by spreading nanites by [key_name(host_mob)]", INVESTIGATE_NANITES)
if(spread_cooldown < world.time)
return
spread_cooldown = world.time + 50
var/list/mob/living/target_hosts = list()
for(var/mob/living/L in oview(5, host_mob))
if(!prob(25))
continue
if(!(L.mob_biotypes & (MOB_ORGANIC|MOB_UNDEAD)))
continue
target_hosts += L
if(!target_hosts.len)
return
var/mob/living/infectee = pick(target_hosts)
if(prob(100 - (infectee.get_permeability_protection() * 100)))
//this will potentially take over existing nanites!
infectee.AddComponent(/datum/component/nanites, 10)
SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites)
infectee.investigate_log("was infected by spreading nanites by [key_name(host_mob)] at [AREACOORD(infectee)].", INVESTIGATE_NANITES)
/datum/nanite_program/mitosis
name = "Mitosis"
@@ -160,40 +160,55 @@
/datum/nanite_program/cryo/active_effect()
host_mob.adjust_bodytemperature(-rand(15,25), 50)
/datum/nanite_program/mind_control
/datum/nanite_program/triggered/comm/mind_control
name = "Mind Control"
desc = "The nanites imprint an absolute directive onto the host's brain while they're active."
use_rate = 3
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)
extra_settings = list("Directive")
var/cooldown = 0 //avoids spam when nanites are running low
extra_settings = list("Directive","Comm Code")
var/directive = "..."
/datum/nanite_program/mind_control/set_extra_setting(user, setting)
/datum/nanite_program/triggered/comm/mind_control/set_extra_setting(user, setting)
if(setting == "Directive")
var/new_directive = stripped_input(user, "Choose the directive to imprint with mind control.", "Directive", directive, MAX_MESSAGE_LEN)
if(!new_directive)
return
directive = new_directive
if(setting == "Comm Code")
var/new_code = input(user, "Set the communication code (1-9999) or set to 0 to disable external signals.", name, null) as null|num
if(isnull(new_code))
return
comm_code = CLAMP(round(new_code, 1), 0, 9999)
/datum/nanite_program/mind_control/get_extra_setting(setting)
/datum/nanite_program/triggered/comm/mind_control/get_extra_setting(setting)
if(setting == "Directive")
return directive
if(setting == "Comm Code")
return comm_code
/datum/nanite_program/mind_control/copy_extra_settings_to(datum/nanite_program/mind_control/target)
/datum/nanite_program/triggered/comm/mind_control/copy_extra_settings_to(datum/nanite_program/triggered/comm/mind_control/target)
target.directive = directive
target.comm_code = comm_code
/datum/nanite_program/mind_control/enable_passive_effect()
if(world.time < cooldown)
/datum/nanite_program/triggered/comm/mind_control/trigger(comm_message)
if(!..())
return
. = ..()
brainwash(host_mob, directive)
if(host_mob.stat == DEAD)
return
var/sent_directive = comm_message
if(!comm_message)
sent_directive = directive
brainwash(host_mob, sent_directive)
log_game("A mind control nanite program brainwashed [key_name(host_mob)] with the objective '[directive]'.")
addtimer(CALLBACK(src, .proc/end_brainwashing), 600)
/datum/nanite_program/mind_control/disable_passive_effect()
. = ..()
/datum/nanite_program/triggered/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.")
cooldown = world.time + 450
/datum/nanite_program/triggered/comm/mind_control/disable_passive_effect()
. = ..()
end_brainwashing()
@@ -142,4 +142,10 @@
program_type = /datum/nanite_program/researchplus
/obj/item/disk/nanite_program/reduced_diagnostics
program_type = /datum/nanite_program/reduced_diagnostics
program_type = /datum/nanite_program/reduced_diagnostics
/obj/item/disk/nanite_program/good_mood
program_type = /datum/nanite_program/good_mood
/obj/item/disk/nanite_program/bad_mood
program_type = /datum/nanite_program/bad_mood
File diff suppressed because it is too large Load Diff