Adds a progressbar to heating up reagent containers. (#22594)

* HOTHOTHOTHOT

* Update code/_onclick/item_attack.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* Removes unused brackets

* Now I fix it again

* Remove unused brackets 2.0

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
DGamerL
2023-10-01 11:48:44 +01:00
committed by GitHub
co-authored by Contrabang
parent c78e1aeb8f
commit f4db38ccf6
+5 -2
View File
@@ -27,8 +27,11 @@
if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_CANCEL_ATTACK_CHAIN)
return TRUE
if(is_hot(src) && A.reagents && !ismob(A))
to_chat(user, "<span class='notice'>You heat [A] with [src].</span>")
A.reagents.temperature_reagents(is_hot(src))
var/reagent_temp = A.reagents.chem_temp
var/time = (reagent_temp / 10) / (is_hot(src) / 1000)
if(do_after_once(user, time, TRUE, user, TRUE, attempt_cancel_message = "You stop heating up [A]."))
to_chat(user, "<span class='notice'>You heat [A] with [src].</span>")
A.reagents.temperature_reagents(is_hot(src))
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
// No comment