Merge conflict fix

This commit is contained in:
Artur
2020-05-13 12:37:18 +03:00
985 changed files with 295527 additions and 16121 deletions
@@ -16,7 +16,7 @@
value = text2num(value)
if(!value || !isnum(value))
return
src.value = CLAMP(value, min, max)
src.value = clamp(value, min, max)
/datum/nanite_extra_setting/number/get_copy()
return new /datum/nanite_extra_setting/number(value, min, max, unit)
@@ -174,7 +174,7 @@
var/cloud_id = new_backup_id
if(!isnull(cloud_id))
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
cloud_id = CLAMP(round(cloud_id, 1),1,100)
cloud_id = clamp(round(cloud_id, 1),1,100)
generate_backup(cloud_id, usr)
. = TRUE
if("delete_backup")
@@ -21,7 +21,7 @@
list(name = "Augmentation Nanites"),
list(name = "Suppression Nanites"),
list(name = "Weaponized Nanites"),
//list(name = "Protocols") B.E.P.I.S Content, which we dont have
list(name = "Protocols") //Moved to default techweb from B.E.P.I.S. research, for now
)
/obj/machinery/nanite_program_hub/Initialize()
@@ -86,13 +86,13 @@
var/target_code = params["target_code"]
switch(target_code)
if("activation")
program.activation_code = CLAMP(round(new_code, 1),0,9999)
program.activation_code = clamp(round(new_code, 1),0,9999)
if("deactivation")
program.deactivation_code = CLAMP(round(new_code, 1),0,9999)
program.deactivation_code = clamp(round(new_code, 1),0,9999)
if("kill")
program.kill_code = CLAMP(round(new_code, 1),0,9999)
program.kill_code = clamp(round(new_code, 1),0,9999)
if("trigger")
program.trigger_code = CLAMP(round(new_code, 1),0,9999)
program.trigger_code = clamp(round(new_code, 1),0,9999)
. = TRUE
if("set_extra_setting")
program.set_extra_setting(params["target_setting"], params["value"])
@@ -102,7 +102,7 @@
var/timer = text2num(params["delay"])
if(!isnull(timer))
playsound(src, "terminal_type", 25, FALSE)
timer = CLAMP(round(timer, 1), 0, 3600)
timer = clamp(round(timer, 1), 0, 3600)
timer *= 10 //convert to deciseconds
program.timer_restart = timer
. = TRUE
@@ -110,7 +110,7 @@
var/timer = text2num(params["delay"])
if(!isnull(timer))
playsound(src, "terminal_type", 25, FALSE)
timer = CLAMP(round(timer, 1), 0, 3600)
timer = clamp(round(timer, 1), 0, 3600)
timer *= 10 //convert to deciseconds
program.timer_shutdown = timer
. = TRUE
@@ -118,7 +118,7 @@
var/timer = text2num(params["delay"])
if(!isnull(timer))
playsound(src, "terminal_type", 25, FALSE)
timer = CLAMP(round(timer, 1), 0, 3600)
timer = clamp(round(timer, 1), 0, 3600)
timer *= 10 //convert to deciseconds
program.timer_trigger = timer
. = TRUE
@@ -126,7 +126,7 @@
var/timer = text2num(params["delay"])
if(!isnull(timer))
playsound(src, "terminal_type", 25, FALSE)
timer = CLAMP(round(timer, 1), 0, 3600)
timer = clamp(round(timer, 1), 0, 3600)
timer *= 10 //convert to deciseconds
program.timer_trigger_delay = timer
. = TRUE
@@ -290,7 +290,7 @@
qdel(src)
///A nanite program containing a behaviour protocol. Only one protocol of each class can be active at once.
//Currently unused due to us lacking the B.E.P.I.S
//Moved to being 'normally' researched due to lack of B.E.P.I.S.
/datum/nanite_program/protocol
name = "Nanite Protocol"
var/protocol_class = NONE
@@ -76,7 +76,8 @@
var/problems = FALSE
if(iscarbon(host_mob))
var/mob/living/carbon/C = host_mob
if(length(C.get_traumas()))
var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN)
if(length(B?.get_traumas_type(TRAUMA_RESILIENCE_BASIC)))
problems = TRUE
if(host_mob.getOrganLoss(ORGAN_SLOT_BRAIN) > 0)
problems = TRUE
@@ -198,7 +199,8 @@
var/problems = FALSE
if(iscarbon(host_mob))
var/mob/living/carbon/C = host_mob
if(length(C.get_traumas()))
var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN)
if(length(B?.get_traumas_type(TRAUMA_RESILIENCE_SURGERY)))
problems = TRUE
if(host_mob.getOrganLoss(ORGAN_SLOT_BRAIN) > 0)
problems = TRUE
@@ -208,7 +210,7 @@
host_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2)
if(iscarbon(host_mob) && prob(10))
var/mob/living/carbon/C = host_mob
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_LOBOTOMY)
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_SURGERY)
/datum/nanite_program/defib
name = "Defibrillation"
@@ -105,3 +105,14 @@
/datum/nanite_program/protocol/offline/active_effect()
nanites.adjust_nanites(null, boost)
/datum/nanite_program/protocol/synergy
name = "Synergy Protocol"
desc = "Replication Protocol: the nanites syncronize their tasks and processes within a host, leading to an increase in replication speed proportional to the current nanite volume."
use_rate = 0
rogue_types = list(/datum/nanite_program/necrotic)
protocol_class = NANITE_PROTOCOL_REPLICATION
var/max_boost = 2 //The maximum boost this program applies to the nanite replication, multiplied with the current nanite 'saturation' percentage
/datum/nanite_program/protocol/synergy/active_effect()
nanites.adjust_nanites(null, round(max_boost * (nanites.nanite_volume / nanites.max_nanites), 0.1))
@@ -160,7 +160,7 @@
if(!host_mob.client) //less brainpower
points *= 0.25
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points))
/datum/nanite_program/researchplus
name = "Neural Network"
desc = "The nanites link the host's brains together forming a neural research network, that becomes more efficient with the amount of total hosts."
@@ -184,7 +184,7 @@
SSnanites.neural_network_count--
else
SSnanites.neural_network_count -= 0.25
/datum/nanite_program/researchplus/active_effect()
if(!iscarbon(host_mob))
return
@@ -234,7 +234,7 @@
var/spread_cooldown = 0
/datum/nanite_program/spreading/active_effect()
if(spread_cooldown < world.time)
if(world.time < spread_cooldown)
return
spread_cooldown = world.time + 50
var/list/mob/living/target_hosts = list()
@@ -84,7 +84,7 @@
/datum/nanite_program/explosive/on_trigger(comm_message)
host_mob.visible_message("<span class='warning'>[host_mob] starts emitting a high-pitched buzzing, and [host_mob.p_their()] skin begins to glow...</span>",\
"<span class='userdanger'>You start emitting a high-pitched buzzing, and your skin begins to glow...</span>")
addtimer(CALLBACK(src, .proc/boom), CLAMP((nanites.nanite_volume * 0.35), 25, 150))
addtimer(CALLBACK(src, .proc/boom), clamp((nanites.nanite_volume * 0.35), 25, 150))
/datum/nanite_program/explosive/proc/boom()
var/nanite_amount = nanites.nanite_volume
@@ -106,7 +106,7 @@
return
var/new_code = text2num(params["code"])
if(!isnull(new_code))
new_code = CLAMP(round(new_code, 1),0,9999)
new_code = clamp(round(new_code, 1),0,9999)
code = new_code
. = TRUE
if("set_relay_code")
@@ -114,7 +114,7 @@
return
var/new_code = text2num(params["code"])
if(!isnull(new_code))
new_code = CLAMP(round(new_code, 1),0,9999)
new_code = clamp(round(new_code, 1),0,9999)
relay_code = new_code
. = TRUE
if("update_name")