Merge branch 'Citadel-Station-13:master' into Projectile_Rework

This commit is contained in:
Solaris-Shade
2022-03-19 11:23:16 -04:00
committed by GitHub
32 changed files with 542 additions and 337 deletions
@@ -73,7 +73,7 @@
brainwash(C, objectives)
var/obj_list = english_list(objectives)
message_admins("[key_name_admin(admin)] has brainwashed [key_name_admin(C)] with the following objectives: [obj_list].")
C.log_message("has been force-brainwashed with the objective '[obj_list]' by admin [key_name(admin)]", LOG_ATTACK, log_globally = FALSE)
C.log_message("has been force-brainwashed with the objective '[obj_list]' by admin [key_name(admin)]", LOG_VICTIM)
log_admin("[key_name(admin)] has brainwashed [key_name(C)] with the following objectives: [obj_list].")
/datum/objective/brainwashing
+4 -4
View File
@@ -845,16 +845,16 @@
update_inv_handcuffed()
update_hud_handcuffed()
/mob/living/carbon/proc/can_defib()
/mob/living/carbon/proc/can_revive(ignore_timelimit = FALSE, maximum_brute_dam = MAX_REVIVE_BRUTE_DAMAGE, maximum_fire_dam = MAX_REVIVE_FIRE_DAMAGE, ignore_heart = FALSE)
var/tlimit = DEFIB_TIME_LIMIT * 10
var/obj/item/organ/heart = getorgan(/obj/item/organ/heart)
if(suiciding || hellbound || HAS_TRAIT(src, TRAIT_HUSK) || AmBloodsucker(src))
return
if((world.time - timeofdeath) > tlimit)
if(!ignore_timelimit && (world.time - timeofdeath) > tlimit)
return
if((getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE))
if((getBruteLoss() >= maximum_brute_dam) || (getFireLoss() >= maximum_fire_dam))
return
if(!heart || (heart.organ_flags & ORGAN_FAILING))
if(!ignore_heart && (!heart || (heart.organ_flags & ORGAN_FAILING)))
return
var/obj/item/organ/brain/BR = getorgan(/obj/item/organ/brain)
if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || suiciding)
@@ -79,7 +79,6 @@
if(id_card?.registered_account)
if((ACCESS_HEADS in id_card.access) || (ACCESS_QM in id_card.access))
requestonly = FALSE
buyer = SSeconomy.get_dep_account(id_card.registered_account.account_job.paycheck_department)
can_approve_requests = TRUE
else
requestonly = TRUE
@@ -236,8 +235,7 @@
return
if(!self_paid && ishuman(usr) && !account)
var/obj/item/card/id/id_card = card_slot?.GetID()
account = SSeconomy.get_dep_account(id_card?.registered_account?.account_job.paycheck_department)
account = SSeconomy.get_dep_account(ACCOUNT_CAR)
var/turf/T = get_turf(src)
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason, account)
@@ -263,9 +261,7 @@
var/id = text2num(params["id"])
for(var/datum/supply_order/SO in SSshuttle.requestlist)
if(SO.id == id)
var/obj/item/card/id/id_card = card_slot?.GetID()
if(id_card && id_card?.registered_account)
SO.paying_account = SSeconomy.get_dep_account(id_card?.registered_account?.account_job.paycheck_department)
SO.paying_account = SSeconomy.get_dep_account(ACCOUNT_CAR)
SSshuttle.requestlist -= SO
SSshuttle.shoppinglist += SO
. = TRUE
@@ -469,15 +469,20 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//((((some value between 0.5 and 1 * temp - ((273.15 + 40) * some values between 1 and 10)) * some number between 0.25 and knock your socks off / 150) * 0.25
//Heat and mols account for each other, a lot of hot mols are more damaging then a few
//Mols start to have a positive effect on damage after 350
var/spaced = 0
for(var/turf/open/space/_space_turf in range(2,src))
spaced++
damage = max(damage + (max(clamp(removed.total_moles() / 200, 0.5, 1) * removed.return_temperature() - ((T0C + HEAT_PENALTY_THRESHOLD)*dynamic_heat_resistance), 0) * mole_heat_penalty / 150 ) * DAMAGE_INCREASE_MULTIPLIER, 0)
//Power only starts affecting damage when it is above 5000
damage = max(damage + (max(power - POWER_PENALTY_THRESHOLD, 0)/500) * DAMAGE_INCREASE_MULTIPLIER, 0)
//Molar count only starts affecting damage when it is above 1800
damage = max(damage + (max(combined_gas - MOLE_PENALTY_THRESHOLD, 0)/80) * DAMAGE_INCREASE_MULTIPLIER, 0)
damage = max(damage + spaced * 0.1 * DAMAGE_INCREASE_MULTIPLIER, 0)
//There might be a way to integrate healing and hurting via heat
//healing damage
if(combined_gas < MOLE_PENALTY_THRESHOLD)
if(combined_gas < MOLE_PENALTY_THRESHOLD && !spaced)
//Only has a net positive effect when the temp is below 313.15, heals up to 2 damage. Psycologists increase this temp min by up to 45
damage = max(damage + (min(removed.return_temperature() - (T0C + HEAT_PENALTY_THRESHOLD), 0) / 150), 0)
+10 -2
View File
@@ -234,6 +234,7 @@
var/transfer_amount = T.volume * part
if(preserve_data)
trans_data = copy_data(T)
post_copy_data(T)
transferred += "[T] - [transfer_amount]"
R.add_reagent(T.type, transfer_amount * multiplier, trans_data, chem_temp, T.purity, pH, no_react = TRUE, ignore_pH = TRUE) //we only handle reaction after every reagent has been transfered.
@@ -274,7 +275,8 @@
var/datum/reagent/T = reagent
var/copy_amount = T.volume * part
if(preserve_data)
trans_data = T.data
trans_data = copy_data(T)
post_copy_data(T)
R.add_reagent(T.type, copy_amount * multiplier, trans_data)
src.update_total()
@@ -301,7 +303,8 @@
var/datum/reagent/current_reagent = CR
if(current_reagent.type == reagent)
if(preserve_data)
trans_data = current_reagent.data
trans_data = copy_data(current_reagent)
post_copy_data(current_reagent)
R.add_reagent(current_reagent.type, amount, trans_data, chem_temp, current_reagent.purity, pH, no_react = TRUE)
remove_reagent(current_reagent.type, amount, 1)
if(log && amount > 0)
@@ -1152,6 +1155,11 @@
return trans_data
///
// Should be ran after using copy_data. Calls the reagent's post_copy_data, which usually does nothing.
/datum/reagents/proc/post_copy_data(datum/reagent/current_reagent)
return current_reagent.post_copy_data()
/datum/reagents/proc/get_reagent(type)
var/list/cached_reagents = reagent_list
. = locate(type) in cached_reagents
@@ -199,6 +199,10 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
log_reagent("MOB ADD: on_merge() (mixed purity): merged [volume - impureVol] of [type] and [volume] of [impure_chem]")
//Ran by a reagent holder on a specific reagent after copying its data.
/datum/reagent/proc/post_copy_data()
return
/datum/reagent/proc/on_update(atom/A)
return
@@ -997,11 +997,11 @@
if(M.stat == DEAD)
if(M.suiciding || M.hellbound) //they are never coming back
M.visible_message("<span class='warning'>[M]'s body does not react...</span>")
return
return ..()
if(M.getBruteLoss() >= 100 || M.getFireLoss() >= 100 || HAS_TRAIT(M, TRAIT_HUSK)) //body is too damaged to be revived
M.visible_message("<span class='warning'>[M]'s body convulses a bit, and then falls still once more.</span>")
M.do_jitter_animation(10)
return
return ..()
else
M.visible_message("<span class='warning'>[M]'s body starts convulsing!</span>")
M.notify_ghost_cloning(source = M)
@@ -1013,27 +1013,31 @@
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!(C.dna && C.dna.species && (NOBLOOD in C.dna.species.species_traits)))
C.blood_volume = max(C.blood_volume, BLOOD_VOLUME_NORMAL*C.blood_ratio) //so you don't instantly re-die from a lack of blood
for(var/organ in C.internal_organs)
var/obj/item/organ/O = organ
if(O.damage > O.maxHealth/2)
O.setOrganDamage(O.maxHealth/2) //so you don't instantly die from organ damage when being revived
C.blood_volume = max(C.blood_volume, BLOOD_VOLUME_BAD*C.blood_ratio) //so you don't instantly re-die from a lack of blood. You'll still need help if you had none though.
var/obj/item/organ/heart/H = C.getorganslot(ORGAN_SLOT_HEART)
if(H && H.organ_flags & ORGAN_FAILING)
H.applyOrganDamage(-15)
for(var/obj/item/organ/O as anything in C.internal_organs)
if(O.organ_flags & ORGAN_FAILING)
O.applyOrganDamage(-5)
M.adjustOxyLoss(-20, 0)
M.adjustToxLoss(-20, 0)
M.updatehealth()
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.can_revive(ignore_timelimit = TRUE, maximum_brute_dam = 100, maximum_fire_dam = 100, ignore_heart = TRUE))
return
var/tplus = world.time - M.timeofdeath
if(M.revive())
M.grab_ghost()
M.emote("gasp")
log_combat(M, M, "revived", src)
var/list/policies = CONFIG_GET(keyed_list/policy)
var/timelimit = CONFIG_GET(number/defib_cmd_time_limit) * 10 //the config is in seconds, not deciseconds
var/late = timelimit && (tplus > timelimit)
var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
var/policy = policies[POLICYCONFIG_ON_DEFIB_LATE] //Always causes memory loss due to the nature of strange reagent.
if(policy)
to_chat(M, policy)
M.log_message("revived using strange reagent, [tplus] deciseconds from time of death, considered [late? "late" : "memory-intact"] revival under configured policy limits.", LOG_GAME)
M.log_message("revived using strange reagent, [tplus] deciseconds from time of death, considered late revival due to usage of strange reagent.", LOG_GAME)
..()
@@ -491,7 +491,7 @@
return
var/fp_verb = mode == HYPO_SPRAY ? "spray" : "inject"
var/method = mode == HYPO_SPRAY ? TOUCH : INJECT
var/method = mode == HYPO_SPRAY ? PATCH : INJECT //Medsprays use patch when spraying, feels like an inconsistancy here.
if(L != user)
L.visible_message("<span class='danger'>[user] is trying to [fp_verb] [L] with [src]!</span>", \
@@ -1,4 +1,4 @@
#define MAX_RADIUS_REQUIRED 8000 //tritbomb
#define MAX_RADIUS_REQUIRED 175 //tritbomb
#define MIN_RADIUS_REQUIRED 20 //maxcap
/**
* # Explosive compressor machines
@@ -234,7 +234,7 @@
var/mob/living/carbon/C = host_mob
if(C.get_ghost())
return FALSE
return C.can_defib()
return C.can_revive()
/datum/nanite_program/defib/proc/zap()
var/mob/living/carbon/C = host_mob
@@ -49,6 +49,8 @@
to_chat(target, "<span class='userdanger'>A new compulsion fills your mind... you feel forced to obey it!</span>")
brainwash(target, objective)
message_admins("[ADMIN_LOOKUPFLW(user)] surgically brainwashed [ADMIN_LOOKUPFLW(target)] with the objective '[objective]'.")
user.log_message("has brainwashed [key_name(target)] with the objective '[objective]' using brainwashing surgery.", LOG_ATTACK)
target.log_message("has been brainwashed with the objective '[objective]' by [key_name(user)] using brainwashing surgery.", LOG_VICTIM, log_globally=FALSE)
log_game("[key_name(user)] surgically brainwashed [key_name(target)] with the objective '[objective]'.")
return TRUE
@@ -156,12 +156,14 @@
return FALSE
if(organ_flags & ORGAN_SYNTHETIC_EMP) //Synthetic organ has been emped, is now failing.
applyOrganDamage(maxHealth * decay_factor)
return
return FALSE
if(organ_flags & ORGAN_SYNTHETIC)
return TRUE
if(!is_cold() && damage)
///Damage decrements by a percent of its maxhealth
var/healing_amount = -(maxHealth * healing_factor)
///Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's satiety
healing_amount -= owner.satiety > 0 ? 4 * healing_factor * owner.satiety / MAX_SATIETY : 0
healing_amount -= owner.satiety > 0 ? 4 * (maxHealth * healing_factor) * (owner.satiety / MAX_SATIETY) : 0
if(healing_amount)
applyOrganDamage(healing_amount) //to FERMI_TWEAK
return TRUE
+7
View File
@@ -131,6 +131,13 @@
name = "ipc cell"
icon_state = "stomach-ipc"
/obj/item/organ/stomach/ipc/on_life()
. = ..()
if(!.)
return
if(HAS_TRAIT(owner, TRAIT_ROBOTIC_ORGANISM) && owner.nutrition >= NUTRITION_LEVEL_FED)
owner.satiety += 5 //We don't need to cap the value as it's already automatically capped during nutrition level handling. Also effectively only +4 as you lose 1 per life tick. 300 seconds of sufficient charge to reach full satiety.
/obj/item/organ/stomach/ipc/emp_act(severity)
. = ..()
if(!owner || . & EMP_PROTECT_SELF)