Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
silicons committed Dec 27, 2024
1 parent 9965bdb commit 7527c95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions code/modules/food/machinery/appliance/fryer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@
//That would really require coding some sort of filter or better replacement mechanism first
//So for now, restrict to oil only
var/amount = 0
for (var/datum/reagent/R in I.reagents.reagent_list)
for (var/datum/reagent/R in I.reagents.get_reagent_datums())
if (istype(R, /datum/reagent/nutriment/triglyceride/oil))
var/delta = oil.available_volume()
delta = min(delta, R.volume)
delta = min(delta, I.reagents.get_reagent_amount(R))
oil.add_reagent(R.id, delta)
I.reagents.remove_reagent(R.id, delta)
amount += delta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
. = 0
else
return -1
if ((reagents?(reagents.len):(0)) < avail_reagents.reagent_list.len)
if ((reagents?(reagents.len):(0)) < length(avail_reagents.reagent_volumes))
return 0
return .

Expand Down
10 changes: 5 additions & 5 deletions code/modules/reagents/chemistry/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
if(!(machine_stat & (NOPOWER|BROKEN)) && (!no_panel))
. += "<span class='notice'>The status display reads:</span>\n"
if(beaker)
for(var/datum/reagent/R in beaker.reagents.reagent_list)
. += "<span class='notice'>- [R.volume] units of [R.name].</span>"
for(var/datum/reagent/R in beaker.reagents.get_reagent_datums())
. += "<span class='notice'>- [beaker.reagents.get_reagent_amount(R)] units of [R.name].</span>"

/obj/machinery/reagentgrinder/update_icon()
icon_state = "juicer"+num2text(!isnull(beaker))
Expand Down Expand Up @@ -325,12 +325,12 @@
I.identify(IDENTITY_FULL, user)

// Now tell us everything that is inside.
if(I.reagents && I.reagents.reagent_list.len)
if(length(I.reagents?.reagent_volumes))
to_chat(user, "<br>") // To add padding between regular chat and the output.
for(var/datum/reagent/R in I.reagents.reagent_list)
for(var/datum/reagent/R in I.reagents.get_reagent_datums())
if(!R.name)
continue
to_chat(user, SPAN_NOTICE("Contains [R.volume]u of <b>[R.name]</b>.<br>[R.description]<br>"))
to_chat(user, SPAN_NOTICE("Contains [I.reagents.get_reagent_amount(R)]u of <b>[R.name]</b>.<br>[R.description]<br>"))

// Last, unseal it if it's an autoinjector.
if(istype(I,/obj/item/reagent_containers/hypospray/autoinjector/biginjector) && !(I.atom_flags & OPENCONTAINER))
Expand Down

0 comments on commit 7527c95

Please sign in to comment.