diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm
index 436ee80e7b..eeb452dbb5 100644
--- a/code/modules/reagents/chemistry/machinery/chem_heater.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm
@@ -77,6 +77,16 @@
updateUsrDialog()
update_icon()
return
+
+ if(beaker)
+ if(istype(I, /obj/item/reagent_containers/dropper))
+ var/obj/item/reagent_containers/dropper/D = I
+ D.afterattack(beaker, user, 1)
+
+ if(istype(I, /obj/item/reagent_containers/syringe))
+ var/obj/item/reagent_containers/syringe/S = I
+ S.afterattack(beaker, user, 1)
+
return ..()
/obj/machinery/chem_heater/on_deconstruction()
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index 48abfcb649..305856f7b4 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -17,6 +17,7 @@
var/spillable = FALSE
var/beaker_weakness_bitflag = NONE//Bitflag!
var/container_HP = 2
+ var/cached_icon
/obj/item/reagent_containers/Initialize(mapload, vol)
. = ..()
@@ -148,30 +149,71 @@
/obj/item/reagent_containers/proc/temp_check()
if(beaker_weakness_bitflag & TEMP_WEAK)
if(reagents.chem_temp >= 444)//assuming polypropylene
- var/list/seen = viewers(5, get_turf(src))
- var/iconhtml = icon2html(src, seen)
- for(var/mob/M in seen)
- to_chat(M, "[iconhtml] \The [src]'s melts from the temperature!")
- playsound(get_turf(src), 'sound/FermiChem/heatmelt.ogg', 80, 1)
- to_chat(M, "[iconhtml] Have you tried using glass or meta beakers for high temperature reactions? These are immune to temperature effects.")
- SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted from temperature")
- qdel(src)
+ START_PROCESSING(SSobj, src)
//melts glass beakers
/obj/item/reagent_containers/proc/pH_check()
if(beaker_weakness_bitflag & PH_WEAK)
- if((reagents.pH < 0.5) || (reagents.pH > 13.5))
- var/list/seen = viewers(5, get_turf(src))
- var/iconhtml = icon2html(src, seen)
- container_HP--
- if(container_HP <= 0)
- for(var/mob/M in seen)
- to_chat(M, "[iconhtml] \The [src]'s melts from the extreme pH!")
- playsound(get_turf(src), 'sound/FermiChem/acidmelt.ogg', 80, 1)
- SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted from pH")
- qdel(src)
+ if((reagents.pH < 2) || (reagents.pH > 12))
+ START_PROCESSING(SSobj, src)
+
+
+/obj/item/reagent_containers/process()
+ if(!cached_icon)
+ cached_icon = icon_state
+ var/damage
+ var/cause
+ if(beaker_weakness_bitflag & PH_WEAK)
+ if(reagents.pH < 1.5)
+ damage = (2 - reagents.pH)/20
+ cause = "from the extreme pH"
+ playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1)
+
+ if(reagents.pH > 12.5)
+ damage = (reagents.pH - 12)/20
+ cause = "from the extreme pH"
+ playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1)
+
+ if(beaker_weakness_bitflag & TEMP_WEAK)
+ if(reagents.chem_temp >= 444)
+ if(damage)
+ damage += (reagents.chem_temp/444)/5
else
- for(var/mob/M in seen)
- to_chat(M, "[iconhtml] \The [src]'s is damaged by the extreme pH and begins to deform!")
- playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1)
- to_chat(M, "[iconhtml] Have you tried using plastic beakers (XL) or metabeakers for high pH reactions? These beakers are immune to pH effects.")
+ damage = (reagents.chem_temp/444)/5
+ if(cause)
+ cause += " and "
+ cause += "from the high temperature"
+ playsound(get_turf(src), 'sound/FermiChem/heatdam.ogg', 50, 1)
+
+ if(!damage || damage <= 0)
+ STOP_PROCESSING(SSobj, src)
+
+ container_HP -= damage
+
+ var/list/seen = viewers(5, get_turf(src))
+ var/iconhtml = icon2html(src, seen)
+
+ var/damage_percent = ((container_HP / initial(container_HP)*100))
+ switch(damage_percent)
+ if(-INFINITY to 0)
+ for(var/mob/M in seen)
+ to_chat(M, "[iconhtml] \The [src]'s melts [cause]!")
+ playsound(get_turf(src), 'sound/FermiChem/acidmelt.ogg', 80, 1)
+ SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted")
+ STOP_PROCESSING(SSobj, src)
+ qdel(src)
+ return
+ if(0 to 35)
+ icon_state = "[cached_icon]_m3"
+ desc = "[initial(desc)] It is severely deformed."
+ if(35 to 70)
+ icon_state = "[cached_icon]_m2"
+ desc = "[initial(desc)] It is deformed."
+ if(70 to 85)
+ desc = "[initial(desc)] It is mildly deformed."
+ icon_state = "[cached_icon]_m1"
+
+ update_icon()
+ if(prob(25))
+ for(var/mob/M in seen)
+ to_chat(M, "[iconhtml] \The [src]'s is damaged by [cause] and begins to deform!")
diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm
index 014401b72c..257106aaa7 100644
--- a/code/modules/reagents/reagent_containers/glass.dm
+++ b/code/modules/reagents/reagent_containers/glass.dm
@@ -6,7 +6,7 @@
reagent_flags = OPENCONTAINER
spillable = TRUE
resistance_flags = ACID_PROOF
- container_HP = 3
+ container_HP = 2
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
@@ -115,7 +115,6 @@
item_state = "beaker"
materials = list(MAT_GLASS=500)
beaker_weakness_bitflag = PH_WEAK
- container_HP = 5
/obj/item/reagent_containers/glass/beaker/Initialize()
. = ..()
@@ -128,27 +127,29 @@
update_icon()
/obj/item/reagent_containers/glass/beaker/update_icon()
+ if(!cached_icon)
+ cached_icon = icon_state
cut_overlays()
if(reagents.total_volume)
- var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]10")
+ var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[cached_icon]10")
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 9)
- filling.icon_state = "[icon_state]-10"
+ filling.icon_state = "[cached_icon]-10"
if(10 to 24)
- filling.icon_state = "[icon_state]10"
+ filling.icon_state = "[cached_icon]10"
if(25 to 49)
- filling.icon_state = "[icon_state]25"
+ filling.icon_state = "[cached_icon]25"
if(50 to 74)
- filling.icon_state = "[icon_state]50"
+ filling.icon_state = "[cached_icon]50"
if(75 to 79)
- filling.icon_state = "[icon_state]75"
+ filling.icon_state = "[cached_icon]75"
if(80 to 90)
- filling.icon_state = "[icon_state]80"
+ filling.icon_state = "[cached_icon]80"
if(91 to INFINITY)
- filling.icon_state = "[icon_state]100"
+ filling.icon_state = "[cached_icon]100"
filling.color = mix_color_from_reagents(reagents.reagent_list)
add_overlay(filling)
@@ -167,7 +168,7 @@
volume = 100
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
- container_HP = 6
+ container_HP = 3
/obj/item/reagent_containers/glass/beaker/plastic
name = "x-large beaker"
@@ -227,7 +228,7 @@
volume = 300
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300)
- container_HP = 8
+ container_HP = 4
/obj/item/reagent_containers/glass/beaker/cryoxadone
list_reagents = list("cryoxadone" = 30)
@@ -284,7 +285,7 @@
SLOT_L_STORE, SLOT_R_STORE,\
SLOT_GENERC_DEXTROUS_STORAGE
)
- container_HP = 2
+ container_HP = 1
/obj/item/reagent_containers/glass/bucket/Initialize()
beaker_weakness_bitflag |= TEMP_WEAK
@@ -338,7 +339,7 @@
materials = list(MAT_GLASS=0)
volume = 50
amount_per_transfer_from_this = 10
- container_HP = 2
+ container_HP = 1
/obj/item/reagent_containers/glass/beaker/waterbottle/Initialize()
beaker_weakness_bitflag |= TEMP_WEAK
@@ -354,7 +355,7 @@
list_reagents = list("water" = 100)
volume = 100
amount_per_transfer_from_this = 20
- container_HP = 2
+ container_HP = 1
/obj/item/reagent_containers/glass/beaker/waterbottle/large/empty
list_reagents = list()
diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi
index b63e9344f1..d59598822d 100644
Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ
diff --git a/icons/obj/drinks.dmi b/icons/obj/drinks.dmi
index c255e0a104..aa14734c7c 100644
Binary files a/icons/obj/drinks.dmi and b/icons/obj/drinks.dmi differ
diff --git a/icons/obj/janitor.dmi b/icons/obj/janitor.dmi
index 687fef6065..c0a31411df 100644
Binary files a/icons/obj/janitor.dmi and b/icons/obj/janitor.dmi differ
diff --git a/sound/FermiChem/SoundSources.txt b/sound/FermiChem/SoundSources.txt
index bd45f866f5..1420814d4a 100644
--- a/sound/FermiChem/SoundSources.txt
+++ b/sound/FermiChem/SoundSources.txt
@@ -6,5 +6,6 @@ heatacid.ogg - from https://freesound.org/people/klankbeeld/sounds/233697/
from bubbles2.ogg
from fuse.ogg
bufferadd.ogg- https://freesound.org/people/toiletrolltube/sounds/181483/
+heatdamn.ogg - from https://freesound.org/people/klankbeeld/sounds/233697/
Work is licensed under the Creative Commons and Attribution License.
\ No newline at end of file
diff --git a/sound/FermiChem/heatdam.ogg b/sound/FermiChem/heatdam.ogg
new file mode 100644
index 0000000000..ab8492e966
Binary files /dev/null and b/sound/FermiChem/heatdam.ogg differ