From 6a3b0df0946a74caf5aebe1e1fa50c6f3031bcf4 Mon Sep 17 00:00:00 2001 From: grilledham Date: Tue, 26 Feb 2019 17:36:20 +0000 Subject: [PATCH 1/2] fixes --- features/gui/info.lua | 30 +++++++++++++++--------------- features/gui/player_list.lua | 26 +++++++++++++------------- features/gui/poll.lua | 8 ++++---- features/gui/popup.lua | 8 ++++---- features/gui/tag_group.lua | 8 ++++---- resources/player_sprites.lua | 2 -- resources/tag_groups.lua | 2 +- 7 files changed, 41 insertions(+), 43 deletions(-) diff --git a/features/gui/info.lua b/features/gui/info.lua index 8d87727d..a1121984 100644 --- a/features/gui/info.lua +++ b/features/gui/info.lua @@ -133,12 +133,12 @@ end local function centered_label(parent, string) local flow = parent.add {type = 'flow'} local flow_style = flow.style - flow_style.align = 'center' + flow_style.horizontal_align = 'center' flow_style.horizontally_stretchable = true local label = flow.add {type = 'label', caption = string} local label_style = label.style - label_style.align = 'center' + label_style.horizontal_align = 'center' label_style.single_line = false return label @@ -147,14 +147,14 @@ end local function header_label(parent, string) local flow = parent.add {type = 'flow'} local flow_style = flow.style - flow_style.align = 'center' + flow_style.horizontal_align = 'center' flow_style.horizontally_stretchable = true local label = flow.add {type = 'label', caption = string} local label_style = label.style - label_style.align = 'center' + label_style.horizontal_align = 'center' label_style.single_line = false - label_style.font = 'default-frame' + label_style.font = 'default-dialog-button' return label end @@ -205,7 +205,7 @@ This can be changed in options -> controls -> "toggle lua console". centered_label(parent, [[Check out our discord for new map info and to suggest new maps / ideas.]]) local discord_textbox_flow = parent.add {type = 'flow'} local discord_textbox_flow_style = discord_textbox_flow.style - discord_textbox_flow_style.align = 'center' + discord_textbox_flow_style.horizontal_align = 'center' discord_textbox_flow_style.horizontally_stretchable = true discord_textbox_flow.add({type = 'label', caption = 'Discord: '}).style.font = 'default-bold' local discord_textbox = discord_textbox_flow.add {type = 'text-box', text = 'redmew.com/discord '} @@ -213,7 +213,7 @@ This can be changed in options -> controls -> "toggle lua console". centered_label(parent, 'Contribute to our Patreon to receive special perks and help maintain our servers.') local patreon_flow = parent.add {type = 'flow', direction = 'horizontal'} local patreon_flow_style = patreon_flow.style - patreon_flow_style.align = 'center' + patreon_flow_style.horizontal_align = 'center' patreon_flow_style.horizontally_stretchable = true patreon_flow.add({type = 'label', caption = 'Patreon:'}).style.font = 'default-bold' local patreon_textbox = patreon_flow.add {type = 'text-box', text = 'patreon.com/redmew '} @@ -221,7 +221,7 @@ This can be changed in options -> controls -> "toggle lua console". centered_label(parent, 'Download our maps, start and finish state, from our website.') local save_textbox_flow = parent.add {type = 'flow'} local save_textbox_flow_style = save_textbox_flow.style - save_textbox_flow_style.align = 'center' + save_textbox_flow_style.horizontal_align = 'center' save_textbox_flow_style.horizontally_stretchable = true save_textbox_flow.add({type = 'label', caption = 'Saves: '}).style.font = 'default-bold' local save_textbox = save_textbox_flow.add {type = 'text-box', text = 'http://www.redmew.com/saves/ '} @@ -230,7 +230,7 @@ This can be changed in options -> controls -> "toggle lua console". centered_label(parent, 'View our past maps as a Google Map.') local maps_textbox_flow = parent.add {type = 'flow'} local maps_textbox_flow_style = maps_textbox_flow.style - maps_textbox_flow_style.align = 'center' + maps_textbox_flow_style.horizontal_align = 'center' maps_textbox_flow_style.horizontally_stretchable = true maps_textbox_flow.add({type = 'label', caption = 'Maps: '}).style.font = 'default-bold' local maps_textbox = maps_textbox_flow.add {type = 'text-box', text = 'https://factoriomaps.com/browse/redmew.html '} @@ -270,12 +270,12 @@ If you suspect someone is griefing, notify the admin team by using /report or by local top_flow = parent.add {type = 'flow'} local top_flow_style = top_flow.style - top_flow_style.align = 'center' + top_flow_style.horizontal_align = 'center' top_flow_style.horizontally_stretchable = true local top_label = top_flow.add {type = 'label', caption = 'Map Infomation'} local top_label_style = top_label.style - top_label_style.font = 'default-frame' + top_label_style.font = 'default-dialog-button' local grid = parent.add {type = 'table', column_count = 2} local grid_style = grid.style @@ -518,7 +518,7 @@ Shows number of rockets launched and biters liberated.]] header_label(parent, 'New Features') local new_info_flow = parent.add {type = 'flow'} - new_info_flow.style.align = 'center' + new_info_flow.style.horizontal_align = 'center' local new_info_textbox = new_info_flow.add { @@ -548,7 +548,7 @@ local function draw_main_frame(center, player) local top_flow = frame.add {type = 'flow'} local top_flow_style = top_flow.style - top_flow_style.align = 'center' + top_flow_style.horizontal_align = 'center' top_flow_style.top_padding = 8 top_flow_style.horizontally_stretchable = true @@ -584,7 +584,7 @@ local function draw_main_frame(center, player) local tab_flow = frame.add {type = 'flow', direction = 'horizontal'} local tab_flow_style = tab_flow.style - tab_flow_style.align = 'center' + tab_flow_style.horizontal_align = 'center' tab_flow_style.horizontally_stretchable = true for index, page in ipairs(pages) do @@ -618,7 +618,7 @@ local function draw_main_frame(center, player) local bottom_flow = frame.add {type = 'flow'} local bottom_flow_style = bottom_flow.style - bottom_flow_style.align = 'center' + bottom_flow_style.horizontal_align = 'center' bottom_flow_style.top_padding = 8 bottom_flow_style.horizontally_stretchable = true diff --git a/features/gui/player_list.lua b/features/gui/player_list.lua index 2345fa18..1b44a2b5 100644 --- a/features/gui/player_list.lua +++ b/features/gui/player_list.lua @@ -104,7 +104,7 @@ end local function apply_heading_style(style) style.font_color = focus_color style.font = 'default-bold' - style.align = 'center' + style.horizontal_align = 'center' end local column_builders = { @@ -135,7 +135,7 @@ local column_builders = { sprite = player_sprites[cell_data] } local label_style = label.style - label_style.align = 'center' + label_style.horizontal_align = 'center' label_style.width = 32 return label @@ -169,7 +169,7 @@ local column_builders = { } local label_style = label.style label_style.font_color = color - label_style.align = 'left' + label_style.horizontal_align = 'left' label_style.width = 150 return label @@ -195,7 +195,7 @@ local column_builders = { local label = parent.add {type = 'label', name = time_cell_name, caption = text} local label_style = label.style - label_style.align = 'left' + label_style.horizontal_align = 'left' label_style.width = 125 return label @@ -230,7 +230,7 @@ local column_builders = { if is_donator then local flow = parent.add {type = 'flow', name = rank_cell_name, direction = 'horizontal'} local flow_style = flow.style - flow_style.align = 'left' + flow_style.horizontal_align = 'left' flow_style.width = rank_column_width local label_rank = flow.add {type = 'label', caption = get_rank_name(rank)} @@ -243,7 +243,7 @@ local column_builders = { else local label = parent.add {type = 'label', name = rank_cell_name, caption = get_rank_name(rank)} local label_style = label.style - label_style.align = 'left' + label_style.horizontal_align = 'left' label_style.font_color = get_rank_color(rank) label_style.width = rank_column_width @@ -271,7 +271,7 @@ local column_builders = { local label = parent.add {type = 'label', name = distance_cell_name, caption = text} local label_style = label.style - label_style.align = 'center' + label_style.horizontal_align = 'center' label_style.width = 70 return label @@ -312,7 +312,7 @@ local column_builders = { local label = parent.add {type = 'label', name = coin_cell_name, caption = text} local label_style = label.style - label_style.align = 'center' + label_style.horizontal_align = 'center' label_style.width = 80 return label @@ -351,7 +351,7 @@ local column_builders = { local label = parent.add {type = 'label', name = deaths_cell_name, caption = cell_data.count, tooltip = tooltip} local label_style = label.style - label_style.align = 'center' + label_style.horizontal_align = 'center' label_style.width = 60 return label @@ -379,11 +379,11 @@ local column_builders = { local parent_style = parent.style parent_style.width = 64 - parent_style.align = 'center' + parent_style.horizontal_align = 'center' local label = parent.add {type = 'button', name = poke_cell_name, caption = cell_data.poke_count} local label_style = label.style - label_style.align = 'center' + label_style.horizontal_align = 'center' label_style.minimal_width = 32 label_style.height = 24 label_style.font = 'default-bold' @@ -423,7 +423,7 @@ local column_builders = { draw_cell = function(parent, cell_data) local parent_style = parent.style parent_style.width = 58 - parent_style.align = 'center' + parent_style.horizontal_align = 'center' local label = parent.add { @@ -433,7 +433,7 @@ local column_builders = { tooltip = 'Report ' .. cell_data.name } local label_style = label.style - label_style.align = 'center' + label_style.horizontal_align = 'center' label_style.minimal_width = 32 label_style.height = 24 label_style.font = 'default-bold' diff --git a/features/gui/poll.lua b/features/gui/poll.lua index 6ae10460..b1124b26 100644 --- a/features/gui/poll.lua +++ b/features/gui/poll.lua @@ -364,14 +364,14 @@ local function draw_main_frame(left, player) local bottom_flow = frame.add {type = 'flow', direction = 'horizontal'} local left_flow = bottom_flow.add {type = 'flow'} - left_flow.style.align = 'left' + left_flow.style.horizontal_align = 'left' left_flow.style.horizontally_stretchable = true local close_button = left_flow.add {type = 'button', name = main_button_name, caption = 'Close'} apply_button_style(close_button) local right_flow = bottom_flow.add {type = 'flow'} - right_flow.style.align = 'right' + right_flow.style.horizontal_align = 'right' if Rank.equal_or_greater_than(player.name, Ranks.regular) then local create_poll_button = @@ -599,7 +599,7 @@ local function draw_create_poll_frame(parent, player, previous_data) local bottom_flow = frame.add {type = 'flow', direction = 'horizontal'} local left_flow = bottom_flow.add {type = 'flow'} - left_flow.style.align = 'left' + left_flow.style.horizontal_align = 'left' left_flow.style.horizontally_stretchable = true local close_button = left_flow.add {type = 'button', name = create_poll_close_name, caption = 'Close'} @@ -611,7 +611,7 @@ local function draw_create_poll_frame(parent, player, previous_data) Gui.set_data(clear_button, data) local right_flow = bottom_flow.add {type = 'flow'} - right_flow.style.align = 'right' + right_flow.style.horizontal_align = 'right' if edit_mode then local delete_button = right_flow.add {type = 'button', name = create_poll_delete_name, caption = 'Delete'} diff --git a/features/gui/popup.lua b/features/gui/popup.lua index 96f81f9d..d92b764b 100644 --- a/features/gui/popup.lua +++ b/features/gui/popup.lua @@ -49,7 +49,7 @@ local function show_popup(player, message, title_text, sprite_path, popup_name) local top_flow = frame.add {type = 'flow', direction = 'horizontal'} local title_flow = top_flow.add {type = 'flow'} - title_flow.style.align = 'center' + title_flow.style.horizontal_align = 'center' title_flow.style.left_padding = 32 title_flow.style.top_padding = 8 title_flow.style.horizontally_stretchable = true @@ -58,7 +58,7 @@ local function show_popup(player, message, title_text, sprite_path, popup_name) title.style.font = 'default-large-bold' local close_button_flow = top_flow.add {type = 'flow'} - close_button_flow.style.align = 'right' + close_button_flow.style.horizontal_align = 'right' local content_flow = frame.add {type = 'flow', direction = 'horizontal'} content_flow.style.top_padding = 16 @@ -74,7 +74,7 @@ local function show_popup(player, message, title_text, sprite_path, popup_name) sprite_flow.add {type = 'sprite', sprite = sprite_path} local label_flow = content_flow.add {type = 'flow'} - label_flow.style.align = 'left' + label_flow.style.horizontal_align = 'left' label_flow.style.top_padding = 10 label_flow.style.left_padding = 24 @@ -85,7 +85,7 @@ local function show_popup(player, message, title_text, sprite_path, popup_name) local ok_button_flow = frame.add {type = 'flow'} ok_button_flow.style.horizontally_stretchable = true - ok_button_flow.style.align = 'center' + ok_button_flow.style.horizontal_align = 'center' local ok_button = ok_button_flow.add {type = 'button', name = close_name, caption = 'OK'} Gui.set_data(ok_button, frame) diff --git a/features/gui/tag_group.lua b/features/gui/tag_group.lua index a26d4540..e1125c80 100644 --- a/features/gui/tag_group.lua +++ b/features/gui/tag_group.lua @@ -230,13 +230,13 @@ local function draw_main_frame(player) local bottom_flow = main_frame.add {type = 'flow', direction = 'horizontal'} local left_flow = bottom_flow.add {type = 'flow', direction = 'horizontal'} - left_flow.style.align = 'left' + left_flow.style.horizontal_align = 'left' left_flow.style.horizontally_stretchable = true left_flow.add {type = 'button', name = main_button_name, caption = 'Close'} local right_flow = bottom_flow.add {type = 'flow', direction = 'horizontal'} - right_flow.style.align = 'right' + right_flow.style.horizontal_align = 'right' right_flow.add {type = 'button', name = clear_button_name, caption = 'Clear Tag'} @@ -385,14 +385,14 @@ local function draw_create_tag_frame(event, tag_data) local bottom_flow = frame.add {type = 'flow', direction = 'horizontal'} local left_flow = bottom_flow.add {type = 'flow', direction = 'horizontal'} - left_flow.style.align = 'left' + left_flow.style.horizontal_align = 'left' left_flow.style.horizontally_stretchable = true local close_button = left_flow.add {type = 'button', name = close_create_tag_name, caption = 'Close'} Gui.set_data(close_button, frame) local right_flow = bottom_flow.add {type = 'flow', direction = 'horizontal'} - right_flow.style.align = 'right' + right_flow.style.horizontal_align = 'right' if tag_data then local delete_button = right_flow.add {type = 'button', name = delete_tag_name, caption = 'Delete'} diff --git a/resources/player_sprites.lua b/resources/player_sprites.lua index 4977d9fb..5d1e226a 100644 --- a/resources/player_sprites.lua +++ b/resources/player_sprites.lua @@ -1,5 +1,4 @@ return { - 'item/iron-axe', 'item/burner-mining-drill', 'item/burner-inserter', 'item/stone-furnace', @@ -15,7 +14,6 @@ return { 'item/electric-mining-drill', 'item/heavy-armor', 'item/steel-furnace', - 'item/steel-axe', 'item/gun-turret', 'item/fast-transport-belt', 'item/fast-underground-belt', diff --git a/resources/tag_groups.lua b/resources/tag_groups.lua index 527a9bf0..6ed02334 100644 --- a/resources/tag_groups.lua +++ b/resources/tag_groups.lua @@ -19,7 +19,7 @@ return { verb = 'enhanced' }, ['Science'] = { - path = 'item/science-pack-3', + path = 'item/chemical-science-pack', verb = 'advanced' }, ['Wizard'] = { From bd5bbcbd21895da5a5dc7c2b818bf9ad4a8af623 Mon Sep 17 00:00:00 2001 From: grilledham Date: Tue, 26 Feb 2019 17:38:28 +0000 Subject: [PATCH 2/2] removed steel axe from market --- resources/market_items.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/market_items.lua b/resources/market_items.lua index e63da3b4..1bc276d0 100644 --- a/resources/market_items.lua +++ b/resources/market_items.lua @@ -30,7 +30,6 @@ return { {price = 3, name = 'arithmetic-combinator'}, {price = 3, name = 'constant-combinator'}, {price = 7, name = 'programmable-speaker'}, - {price = 15, name = 'steel-axe'}, {price = 15, name = 'submachine-gun'}, {price = 15, name = 'shotgun'}, {price = 250, name = 'combat-shotgun'},