From b8cb208b24a237e1d2e91b83a2d91f56dc6000d6 Mon Sep 17 00:00:00 2001 From: quardbreak <44920739+quardbreak@users.noreply.github.com> Date: Thu, 30 Dec 2021 01:02:09 +0300 Subject: [PATCH] improves fabricator interface --- code/modules/fabrication/fabricator_ui.dm | 12 +- nano/templates/fabricator.tmpl | 249 ++++++++++++---------- 2 files changed, 140 insertions(+), 121 deletions(-) diff --git a/code/modules/fabrication/fabricator_ui.dm b/code/modules/fabrication/fabricator_ui.dm index e1e89cedcefa..2ea0133958e3 100644 --- a/code/modules/fabrication/fabricator_ui.dm +++ b/code/modules/fabrication/fabricator_ui.dm @@ -7,7 +7,7 @@ data["network"] = (D.network_id && D.network_tag) data["category"] = show_category data["functional"] = is_functioning() - data["filtering"] = filter_string || "No filter set." + data["filtering"] = filter_string || "No filter set" if(is_functioning()) data["color_selectable"] = color_selectable @@ -32,7 +32,7 @@ current_build["multiplier"] = currently_building.multiplier current_build["progress"] = "[100-round((currently_building.remaining_time/currently_building.target_recipe.build_time)*100)]%" else - current_build["name"] = "Nothing." + current_build["name"] = "Nothing" current_build["multiplier"] = "-" current_build["progress"] = "-" @@ -46,7 +46,7 @@ data["build_queue"] += list(order_data) else var/list/order_data = list() - order_data["name"] = "Nothing." + order_data["name"] = "Nothing" order_data["multiplier"] = "-" data["build_queue"] += list(order_data) @@ -64,7 +64,7 @@ build_option["reference"] = "\ref[R]" build_option["illegal"] = R.hidden if(!length(R.resources)) - build_option["cost"] = "No resources required." + build_option["cost"] = "No resources required" max_sheets = 100 else //Make sure it's buildable and list required resources. @@ -76,7 +76,7 @@ if(stored_material[material] < round(R.resources[material]*mat_efficiency)) build_option["unavailable"] = 1 material_components += "[round(R.resources[material] * mat_efficiency)][SHEET_UNIT] [stored_substances_to_names[material]]" - build_option["cost"] = "[capitalize(jointext(material_components, ", "))]." + build_option["cost"] = "[capitalize(jointext(material_components, ", "))]" if(R.max_amount >= PRINT_MULTIPLIER_DIVISOR && max_sheets >= PRINT_MULTIPLIER_DIVISOR) build_option["multiplier"] = list() for(var/i = 1 to FLOOR(min(R.max_amount, max_sheets)/PRINT_MULTIPLIER_DIVISOR)) @@ -86,7 +86,7 @@ ui = SSnano.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) - ui = new(user, src, ui_key, "fabricator.tmpl", "[capitalize(name)]", 480, 410, state = state) + ui = new(user, src, ui_key, "fabricator.tmpl", "[capitalize(name)]", 680, 480, state = state) ui.set_initial_data(data) ui.open() ui.set_auto_update(1) diff --git a/nano/templates/fabricator.tmpl b/nano/templates/fabricator.tmpl index 8d9ec5549fbc..ce008190d02b 100644 --- a/nano/templates/fabricator.tmpl +++ b/nano/templates/fabricator.tmpl @@ -1,130 +1,149 @@ {{if data.functional}} - - {{if data.color_selectable}} +
- - + {{if data.network}} + + {{/if}} + {{if data.color_selectable}} + + {{/if}} - {{/if}} - {{if data.network}} - - {{:helper.link(data.network, null, { 'settings': 1 }, null)}} - - - {{/if}} - - - - - +
- Color - - {{:helper.link('(Set)', null, {'color_select' : 1})}} - +
Connected to local network:
+
{{:helper.link(data.network, null, { 'settings': 1 }, null)}}
+
+
Color:
+
{{:helper.link('(Set)', null, {'color_select' : 1})}}
+
- Connected to local network. - -
- - - - - - - {{for data.material_storage}} - - - - - - {{/for}} -
ResourceStorageOptions
{{:value.name}}{{:value.stored}}/{{:value.max}}{{:helper.link(value.eject_label, null, {'eject_mat' : value.eject_key})}}
-
- - - - - - + - - - - - +
Current BuildUnitsProgress
+ - - - - -
{{:data.current_build.name}}{{:data.current_build.multiplier}}{{:data.current_build.progress}}
-
- - - - - - - {{for data.build_queue}} - - - - {{if value.reference}} - - {{else}} - - {{/if}} + - {{/for}} -
PendingUnitsOptions
{{:value.name}}{{:value.multiplier}}{{:helper.link('Cancel', null, {'cancel' : value.reference})}}- + + + + + + + {{for data.material_storage}} + + + + + + {{/for}} +
ResourceStorageOptions
+
+ {{:value.name}} +
+
+
+ {{:value.stored}}/{{:value.max}} +
+
+
+ {{:helper.link(value.eject_label, null, {'eject_mat' : value.eject_key})}} +
+
+
-
+
-
-
- Category -
-
- {{:helper.link(data.category, null, {'change_category' : 1})}} -
-
+
+
+ Category +
+
+ {{:helper.link(data.category, null, {'change_category' : 1})}} +
+
-
-
- Filter -
-
- {{:helper.link(data.filtering, null, {'set_filter' : 1})}} -
-
+
+
+ Filter +
+
+ {{:helper.link(data.filtering, null, {'set_filter' : 1})}} +
+
-
- - - - - - - {{for data.build_options}} + - {{if value.illegal}} - - {{else}} - - {{/if}} - - - {{/for}} -
DesignCostOptions
{{:value.name}}{{:value.name}}{{:value.cost}} - {{if !value.unavailable}} - {{:helper.link('Queue', null, {'make' : value.reference, 'multiplier' : 1})}} - {{for value.multiplier :multValue:multIndex}} - {{:helper.link(multValue.label, null, {'make' : value.reference, 'multiplier' : multValue.multiplier})}} - {{/for}} - {{else}} - Insufficient resources. - {{/if}} + + + + + + + + {{for data.build_options}} + + {{if value.illegal}} + + {{else}} + + {{/if}} + + + + {{/for}} +
DesignCostOptions
+ + {{:value.name}} + + + {{:value.name}} + + {{:value.cost}} + + {{if !value.unavailable}} +
+ {{:helper.link('Queue', null, {'make' : value.reference, 'multiplier' : 1})}} +
+ {{for value.multiplier :multValue:multIndex}} +
+ {{:helper.link(multValue.label, null, {'make' : value.reference, 'multiplier' : multValue.multiplier})}} +
+ {{/for}} + {{else}} + Insufficient resources. + {{/if}} +
-
+
+ + + + + + + + + + + +
Current BuildUnitsProgress
{{:data.current_build.name}}{{:data.current_build.multiplier}}{{:data.current_build.progress}}
+ + + + + + + {{for data.build_queue}} + + + + {{if value.reference}} + + {{else}} + + {{/if}} + + {{/for}} +
PendingUnitsOptions
{{:value.name}}{{:value.multiplier}}{{:helper.link('Cancel', null, {'cancel' : value.reference})}}-
{{else}}