mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
In response to poll and feedback.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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, "<span class='notice'>[iconhtml] \The [src]'s melts from the temperature!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/heatmelt.ogg', 80, 1)
|
||||
to_chat(M, "<span class='warning'><i>[iconhtml] Have you tried using glass or meta beakers for high temperature reactions? These are immune to temperature effects.</i></span>")
|
||||
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, "<span class='notice'>[iconhtml] \The [src]'s melts from the extreme pH!</span>")
|
||||
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, "<span class='notice'>[iconhtml] \The [src]'s is damaged by the extreme pH and begins to deform!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1)
|
||||
to_chat(M, "<span class='warning'><i>[iconhtml] Have you tried using plastic beakers (XL) or metabeakers for high pH reactions? These beakers are immune to pH effects.</i></span>")
|
||||
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, "<span class='notice'>[iconhtml] \The [src]'s melts [cause]!</span>")
|
||||
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, "<span class='notice'>[iconhtml] \The [src]'s is damaged by [cause] and begins to deform!</span>")
|
||||
|
||||
@@ -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()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 86 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
@@ -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.
|
||||
BIN
sound/FermiChem/heatdam.ogg
Normal file
BIN
sound/FermiChem/heatdam.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user