mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Merge pull request #20171 from Cruix/protolathe_stuff
Fixed rdconsole search function not showing required reagents.
This commit is contained in:
@@ -882,13 +882,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
var/temp_material
|
||||
var/c = 50
|
||||
var/t
|
||||
for(var/M in D.materials)
|
||||
var/all_materials = D.materials + D.reagents
|
||||
for(var/M in all_materials)
|
||||
t = linked_lathe.check_mat(D, M)
|
||||
temp_material += " | "
|
||||
if (t < 1)
|
||||
temp_material += "<span class='bad'>[D.materials[M]*coeff] [CallMaterialName(M)]</span>"
|
||||
temp_material += "<span class='bad'>[all_materials[M]*coeff] [CallMaterialName(M)]</span>"
|
||||
else
|
||||
temp_material += " [D.materials[M]*coeff] [CallMaterialName(M)]"
|
||||
temp_material += " [all_materials[M]*coeff] [CallMaterialName(M)]"
|
||||
c = min(c,t)
|
||||
|
||||
if (c >= 1)
|
||||
@@ -992,13 +993,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
for(var/datum/design/D in matching_designs)
|
||||
var/temp_materials
|
||||
var/check_materials = 1
|
||||
for(var/M in D.materials)
|
||||
var/all_materials = D.materials + D.reagents
|
||||
for(var/M in all_materials)
|
||||
temp_materials += " | "
|
||||
if (!linked_imprinter.check_mat(D, M))
|
||||
check_materials = 0
|
||||
temp_materials += " <span class='bad'>[D.materials[M]/coeff] [CallMaterialName(M)]</span>"
|
||||
temp_materials += " <span class='bad'>[all_materials[M]/coeff] [CallMaterialName(M)]</span>"
|
||||
else
|
||||
temp_materials += " [D.materials[M]/coeff] [CallMaterialName(M)]"
|
||||
temp_materials += " [all_materials[M]/coeff] [CallMaterialName(M)]"
|
||||
if (check_materials)
|
||||
dat += "<A href='?src=\ref[src];imprint=[D.id]'>[D.name]</A>[temp_materials]<BR>"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user