Merge pull request #9505 from Thalpy/Smartdart-QoL
[READY] Tweaks smartdarts with a few quality of life functions, and add a few new things.
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.</span>")
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
if (round(reagents.total_volume, 0.1) >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You soak the [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.</span>")
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
if (round(reagents.total_volume,1) >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
@@ -323,8 +323,9 @@
|
||||
|
||||
rounded_vol = "empty"
|
||||
if(reagents && reagents.total_volume)
|
||||
if(volume/reagents.total_volume == 1)
|
||||
if(volume/round(reagents.total_volume, 1) == 1)
|
||||
rounded_vol="full"
|
||||
mode = SYRINGE_INJECT
|
||||
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
|
||||
Reference in New Issue
Block a user