diff --git a/code/datums/diseases/advance/symptoms/sensory.dm b/code/datums/diseases/advance/symptoms/sensory.dm index e3e50ba468f..c3095a69e08 100644 --- a/code/datums/diseases/advance/symptoms/sensory.dm +++ b/code/datums/diseases/advance/symptoms/sensory.dm @@ -24,35 +24,31 @@ Bonus level = 5 severity = 0 -/datum/symptom/sensory_restoration/proc/check_and_add(reagent, check, add, mob/living/M) - if(M.reagents.get_reagent_amount(reagent) < check) - M.reagents.add_reagent(reagent, add) - return 1 - /datum/symptom/sensory_restoration/Activate(var/datum/disease/advance/A) ..() if(prob(SYMPTOM_ACTIVATION_PROB * 3)) var/mob/living/M = A.affected_mob + var/datum/reagents/RD = M.reagents switch(A.stage) if(2) - if(check_and_add("oculine", 10, 10, M)) + if(RD.check_and_add("oculine", 10, 10)) to_chat(M, "Your hearing feels clearer and crisp.") if(3) - if(check_and_add("antihol", 10, 10, M)) + if(RD.check_and_add("antihol", 10, 10)) to_chat(M, "You feel sober.") - check_and_add("oculine", 10, 10, M) + RD.check_and_add("oculine", 10, 10) if(4) - if(check_and_add("synaphydramine", 10, 5, M)) + if(RD.check_and_add("synaphydramine", 10, 5)) to_chat(M, "You feel focused.") - check_and_add("antihol", 10, 10, M) - check_and_add("oculine", 10, 10, M) + RD.check_and_add("antihol", 10, 10) + RD.check_and_add("oculine", 10, 10) if(5) - if(check_and_add("mannitol", 10, 10, M)) + if(RD.check_and_add("mannitol", 10, 10)) to_chat(M, "Your mind feels relaxed.") - check_and_add("synaphydramine", 10, 5, M) - check_and_add("antihol", 10, 10, M) - check_and_add("oculine", 10, 10, M) + RD.check_and_add("synaphydramine", 10, 5) + RD.check_and_add("antihol", 10, 10) + RD.check_and_add("oculine", 10, 10) return diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 8cde8a9d3d1..28f6fd4544a 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -736,6 +736,8 @@ Congratulations! You are now trained for invasive xenobiology research!"} icon_state = "bed" no_icon_updates = 1 //no icon updates for this; it's static. injected_reagents = list("corazone","spaceacillin") + reagent_target_amount = 31 //the patient needs at least 30u of spaceacillin to prevent necrotization. + inject_amount = 10 /obj/structure/closet/abductor name = "alien locker" diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 70afe02762a..2ee1e93683d 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -15,6 +15,8 @@ buckle_lying = 90 var/no_icon_updates = 0 //set this to 1 if you don't want the icons ever changing var/list/injected_reagents = list() + var/reagent_target_amount = 1 + var/inject_amount = 1 /obj/machinery/optable/New() ..() @@ -106,9 +108,9 @@ check_victim() if(LAZYLEN(injected_reagents)) for(var/mob/living/carbon/C in get_turf(src)) + var/datum/reagents/R = C.reagents for(var/chemical in injected_reagents) - if(C.reagents.get_reagent_amount(chemical) < 1) - C.reagents.add_reagent(chemical, 1) + R.check_and_add(chemical,reagent_target_amount,inject_amount) /obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob) if(C == user) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 491cb93018e..a712e033afd 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -241,8 +241,12 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co data["censored"] = viewing_channel.censored var/list/messages = list() data["messages"] = messages + var/message_number = 0 for(var/datum/feed_message/M in viewing_channel.messages) - messages[++messages.len] = list("title" = M.title, "body" = M.body, "img" = M.img ? icon2base64(M.img) : null, "message_type" = M.message_type, "author" = M.author, "view_count" = M.view_count) + if(M.img) + user << browse_rsc(M.img, "tmp_photo[message_number].png") + messages[++messages.len] = list("title" = M.title, "body" = M.body, "img" = M.img ? M.img : null, "message_type" = M.message_type, "author" = M.author, "view_count" = M.view_count, "message_number" = message_number) + message_number += 1 if(8, 9) data["channel_name"] = viewing_channel.channel_name data["ref"] = "\ref[viewing_channel]" @@ -273,7 +277,9 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co data["author"] = news_network.wanted_issue.backup_author data["criminal"] = news_network.wanted_issue.author data["description"] = news_network.wanted_issue.body - data["photo"] = news_network.wanted_issue.img ? icon2base64(news_network.wanted_issue.img) : 0 + if(news_network.wanted_issue.img) + user << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png") + data["photo"] = news_network.wanted_issue.img ? news_network.wanted_issue.img : 0 if(12) var/list/jobs = list() data["jobs"] = jobs diff --git a/code/modules/assembly/voice.dm b/code/modules/assembly/voice.dm index 8228e490a38..2dc6749bd73 100644 --- a/code/modules/assembly/voice.dm +++ b/code/modules/assembly/voice.dm @@ -70,7 +70,7 @@ /obj/item/assembly/voice/noise/hear_talk(mob/living/M as mob, msg) return -/obj/item/assembly/voice/hear_message(mob/living/M as mob, msg) +/obj/item/assembly/voice/noise/hear_message(mob/living/M as mob, msg) pulse(0) var/turf/T = get_turf(src) //otherwise it won't work in hand T.visible_message("[bicon(src)] beeps!") \ No newline at end of file diff --git a/code/modules/martial_arts/brawling.dm b/code/modules/martial_arts/brawling.dm index 520f4c1a96a..7869e101505 100644 --- a/code/modules/martial_arts/brawling.dm +++ b/code/modules/martial_arts/brawling.dm @@ -14,12 +14,12 @@ A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) var/atk_verb = pick("left hook","right hook","straight punch") - + var/damage = rand(5, 8) + A.dna.species.punchdamagelow if(!damage) playsound(D.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) D.visible_message("[A] has attempted to hit [D] with a [atk_verb]!") - add_attack_logs(A, D, "Melee attacked with [src] (miss/block)") + add_attack_logs(A, D, "Melee attacked with [src] (miss/block)", ATKLOG_ALL) return 0 @@ -32,7 +32,7 @@ "[A] has hit [D] with a [atk_verb]!") D.apply_damage(damage, STAMINA, affecting, armor_block) - add_attack_logs(A, D, "Melee attacked with [src]") + add_attack_logs(A, D, "Melee attacked with [src]", ATKLOG_ALL) if(D.getStaminaLoss() > 50) var/knockout_prob = D.getStaminaLoss() + rand(-15,15) if((D.stat != DEAD) && prob(knockout_prob)) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index ea2d66745f0..e9b09ba1f2b 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1019,7 +1019,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, return 1 /mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user) - add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagents.log_list(toEat)]", ATKLOG_FEW) + add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagents.log_list(toEat)]", ATKLOG_MOST) if(!iscarbon(user)) LAssailant = null else diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index d82fc719d88..d4c14bda32a 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -29,7 +29,7 @@ if(dna.species && dna.species.has_organ["brain"]) var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain) if(sponge) - if(dna.species) + if(dna.species && amount > 0) amount = amount * dna.species.brain_mod sponge.receive_damage(amount, 1) if(updating) @@ -43,7 +43,7 @@ if(dna.species && dna.species.has_organ["brain"]) var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain) if(sponge) - if(dna.species) + if(dna.species && amount > 0) amount = amount * dna.species.brain_mod sponge.damage = min(max(amount, 0), (maxHealth*2)) if(updating) @@ -76,11 +76,10 @@ amount += O.burn_dam return amount - /mob/living/carbon/human/adjustBruteLoss(amount, updating_health = TRUE, damage_source = null, robotic = FALSE) - if(dna.species) - amount = amount * dna.species.brute_mod if(amount > 0) + if(dna.species) + amount = amount * dna.species.brute_mod take_overall_damage(amount, 0, updating_health, used_weapon = damage_source) else heal_overall_damage(-amount, 0, updating_health, FALSE, robotic) @@ -88,9 +87,9 @@ return STATUS_UPDATE_HEALTH /mob/living/carbon/human/adjustFireLoss(amount, updating_health = TRUE, damage_source = null, robotic = FALSE) - if(dna.species) - amount = amount * dna.species.burn_mod if(amount > 0) + if(dna.species) + amount = amount * dna.species.burn_mod take_overall_damage(0, amount, updating_health, used_weapon = damage_source) else heal_overall_damage(0, -amount, updating_health, FALSE, robotic) @@ -98,9 +97,8 @@ return STATUS_UPDATE_HEALTH /mob/living/carbon/human/proc/adjustBruteLossByPart(amount, organ_name, obj/damage_source = null, updating_health = TRUE) - if(dna.species) + if(dna.species && amount > 0) amount = amount * dna.species.brute_mod - if(organ_name in bodyparts_by_name) var/obj/item/organ/external/O = get_organ(organ_name) @@ -111,9 +109,8 @@ O.heal_damage(-amount, 0, internal = 0, robo_repair = O.is_robotic(), updating_health = updating_health) return STATUS_UPDATE_HEALTH - /mob/living/carbon/human/proc/adjustFireLossByPart(amount, organ_name, obj/damage_source = null, updating_health = TRUE) - if(dna.species) + if(dna.species && amount > 0) amount = amount * dna.species.burn_mod if(organ_name in bodyparts_by_name) @@ -134,7 +131,7 @@ return ..() /mob/living/carbon/human/adjustCloneLoss(amount) - if(dna.species) + if(dna.species && amount > 0) amount = amount * dna.species.clone_mod . = ..() @@ -174,22 +171,22 @@ // Defined here solely to take species flags into account without having to recast at mob/living level. /mob/living/carbon/human/adjustOxyLoss(amount) - if(dna.species) + if(dna.species && amount > 0) amount = amount * dna.species.oxy_mod . = ..() /mob/living/carbon/human/setOxyLoss(amount) - if(dna.species) + if(dna.species && amount > 0) amount = amount * dna.species.oxy_mod . = ..() /mob/living/carbon/human/adjustToxLoss(amount) - if(dna.species) + if(dna.species && amount > 0) amount = amount * dna.species.tox_mod . = ..() /mob/living/carbon/human/setToxLoss(amount) - if(dna.species) + if(dna.species && amount > 0) amount = amount * dna.species.tox_mod . = ..() diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index e54c9689be2..4a6bf2bdcb1 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -594,6 +594,11 @@ var/const/INGEST = 2 return 1 +/datum/reagents/proc/check_and_add(reagent, check, add) + if(get_reagent_amount(reagent) < check) + add_reagent(reagent, add) + return TRUE + /datum/reagents/proc/remove_reagent(reagent, amount, safety)//Added a safety check for the trans_id_to if(!isnum(amount)) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 2a7dac0f48d..d6dc8f91806 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -20,7 +20,7 @@ /obj/machinery/chem_master/New() create_reagents(100) - overlays += "waitlight" + update_icon() /obj/machinery/chem_master/ex_act(severity) switch(severity) @@ -32,6 +32,12 @@ qdel(src) return +/obj/machinery/chem_master/update_icon() + overlays.Cut() + icon_state = "mixer[beaker ? "1" : "0"][powered() ? "" : "_nopower"]" + if(powered()) + overlays += "waitlight" + /obj/machinery/chem_master/blob_act() if(prob(50)) qdel(src) @@ -57,7 +63,7 @@ B.forceMove(src) to_chat(user, "You add the beaker to the machine!") SSnanoui.update_uis(src) - icon_state = "mixer1" + update_icon() else if(istype(B, /obj/item/storage/pill_bottle)) @@ -184,7 +190,7 @@ beaker.forceMove(get_turf(src)) beaker = null reagents.clear_reagents() - icon_state = "mixer0" + update_icon() else if(href_list["createpill"] || href_list["createpill_multiple"]) if(!condi) var/count = 1 diff --git a/code/modules/response_team/ert_outfits.dm b/code/modules/response_team/ert_outfits.dm index 93227849f1f..be0a6808c39 100644 --- a/code/modules/response_team/ert_outfits.dm +++ b/code/modules/response_team/ert_outfits.dm @@ -411,6 +411,7 @@ l_pocket = /obj/item/grenade/clusterbuster/holy shoes = /obj/item/clothing/shoes/magboots/advance glasses = /obj/item/clothing/glasses/night + r_pocket = /obj/item/nullrod cybernetic_implants = list( /obj/item/organ/internal/cyberimp/chest/nutriment/plus, diff --git a/html/changelog.html b/html/changelog.html index 1d19c855ad3..622f5b0825c 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,36 @@ -->
+ {{:value.title}}
+

+ {{:value.body}}
+
