Skip to content

Commit 1151c89

Browse files
committed
Factorio 0.16 update
- simple stuff: - most styles named `XXX_style` now named `XXX` - `description_flow_style` seems to have disappeared, but I was just making my own, so... - replaced with `YARM_buttons_v` and `*_h` - for some reason, I can't just use a single `flow_style`, but have to specify `horizontal_*` or `vertical_*`? - table `colspan` now named `column_count` - key "icon_size" not found in property tree at ROOT.container.resource-monitor - so added icon_size = 32 to everyone that didn't have it Easier than the EvoGUI update...
1 parent 60f0b48 commit 1151c89

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.7.206
1+
0.7.301

info.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "{{MOD_NAME}}",
33
"version": "{{VERSION}}",
4-
"factorio_version": "0.15",
4+
"factorio_version": "0.16",
55
"title": "YARM - Resource Monitor",
66
"author": "Octav 'narc' Sandulescu, based on work by drs, jorgenRe, and L0771",
77
"homepage": "https://github.com/narc0tiq/YARM",
8-
"dependencies": ["base >= 0.15.0"],
8+
"dependencies": ["base >= 0.16.1"],
99
"description": "This mod helps you to keep track of your mining sites."
1010
}

prototypes/prototypes.lua

+16-6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ data:extend(
44
type = "item",
55
name = "resource-monitor",
66
icon = "__{{MOD_NAME}}__/graphics/resource-monitor.png",
7+
icon_size = 32,
78
flags = {"goes-to-quickbar"},
89
damage_radius = 5,
910
subgroup = "tool",
@@ -16,6 +17,7 @@ data:extend(
1617
type = "container",
1718
name = "resource-monitor",
1819
icon = "__{{MOD_NAME}}__/graphics/resource-monitor.png",
20+
icon_size = 32,
1921
flags = {"placeable-neutral", "player-creation"},
2022
minable = {mining_time = 1, result = "resource-monitor"},
2123
max_health = 100,
@@ -73,6 +75,7 @@ data:extend(
7375
name = "rm_overlay",
7476
flags = {"placeable-neutral", "player-creation", "not-repairable"},
7577
icon = "__{{MOD_NAME}}__/graphics/rm_Overlay.png",
78+
icon_size = 32,
7679

7780
max_health = 1,
7881
order = 'z[resource-monitor]',
@@ -157,7 +160,7 @@ local default_gui = data.raw["gui-style"].default
157160

158161
local red_label = {
159162
type = "label_style",
160-
parent = "label_style",
163+
parent = "label",
161164
font_color = {r=1, g=0.2, b=0.2}
162165
}
163166
default_gui.YARM_err_label = red_label
@@ -185,7 +188,7 @@ end
185188

186189
default_gui.YARM_button_with_icon = {
187190
type = "button_style",
188-
parent = "slot_button_style",
191+
parent = "slot_button",
189192

190193
scalable = true,
191194

@@ -317,12 +320,19 @@ default_gui.YARM_site_table = {
317320
vertical_spacing = 1,
318321
}
319322

320-
default_gui.YARM_buttons = {
321-
type = "flow_style",
322-
parent = "description_flow_style",
323+
324+
default_gui.YARM_buttons_h = {
325+
type = "horizontal_flow_style",
326+
parent = "horizontal_flow",
323327
horizontal_spacing = 1,
324328
vertical_spacing = 5,
325329
top_padding = 4,
326330
}
327331

328-
332+
default_gui.YARM_buttons_v = {
333+
type = "vertical_flow_style",
334+
parent = "vertical_flow",
335+
horizontal_spacing = 1,
336+
vertical_spacing = 5,
337+
top_padding = 4,
338+
}

resmon.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -520,20 +520,20 @@ function resmon.update_ui(player)
520520
root = player.gui.left.add{type="frame",
521521
name="YARM_root",
522522
direction="horizontal",
523-
style="outer_frame_style"}
523+
style="outer_frame"}
524524

525525
local buttons = root.add{type="flow",
526526
name="buttons",
527527
direction="vertical",
528-
style="YARM_buttons"}
528+
style="YARM_buttons_v"}
529529

530530
buttons.add{type="button", name="YARM_expando", style="YARM_expando_short"}
531531
end
532532

533533
if root.sites and root.sites.valid then
534534
root.sites.destroy()
535535
end
536-
local sites_gui = root.add{type="table", colspan=7, name="sites", style="YARM_site_table"}
536+
local sites_gui = root.add{type="table", column_count=7, name="sites", style="YARM_site_table"}
537537

538538
if force_data and force_data.ore_sites then
539539
for site in ascending_by_ratio(force_data.ore_sites) do
@@ -574,7 +574,7 @@ function resmon.update_ui(player)
574574

575575

576576
local site_buttons = sites_gui.add{type="flow", name="YARM_site_buttons_"..site.name,
577-
direction="horizontal", style="YARM_buttons"}
577+
direction="horizontal", style="YARM_buttons_h"}
578578

579579
if site.deleting_since then
580580
site_buttons.add{type="button",

0 commit comments

Comments
 (0)