1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-16 02:47:48 +02:00

linter cleanups

This commit is contained in:
danielmartin0 2024-09-07 22:26:53 +01:00
parent 8f1bd0e002
commit c4afbd6dff
5 changed files with 13 additions and 6 deletions

View File

@ -1718,6 +1718,10 @@ function Public.pick_random_price(tier, scale, tech_tier)
end
local item_stacks = LootRaffle.roll(math.floor(scale * (tier ^ 2 + 10 * tier)), 20, Public.get_item_blacklist(tech_tier))
if not item_stacks then
return
end
local price = {}
for _, item_stack in pairs(item_stacks) do
price[#price + 1] = {name = item_stack.name, amount = item_stack.count}

View File

@ -260,7 +260,7 @@ function Public.join_spectators(player, crewid)
-- end
Common.send_important_items_from_player_to_crew(player, true)
char.die(memory.force_name)
player.set_controller{type = defines.controllers.spectator}
@ -517,7 +517,7 @@ function Public.leave_crew(player, to_lobby, quiet)
if Common.autodisband_ticks and not exists_disband_tick then
memory.crew_disband_tick = game.tick + Common.autodisband_ticks
end
-- if _DEBUG then memory.crew_disband_tick = game.tick + 30*60*60 end
end
end

View File

@ -531,6 +531,8 @@ function Public.process_etaframe_update(player, flow1, bools)
if bools.cost_bool or bools.atsea_loading_bool or bools.atsea_waiting_bool or bools.eta_bool or bools.retreating_bool or bools.leave_anytime_bool then
flow1.visible = true
---@type string|table
local tooltip = ''
flow2 = flow1.etaframe_piratebutton_flow_2
@ -830,6 +832,7 @@ function Public.process_siloframe_and_questframe_updates(flowsilo, flowquest, bo
if quest_type then
---@type string|table
local tooltip = ''
if quest_complete and quest_reward then

View File

@ -527,7 +527,7 @@ function Public.full_update(player)
local crewid
if bool1 then
crewid = tonumber((flow.ongoing_runs.body.ongoing_runs_listbox.get_item(flow.ongoing_runs.body.ongoing_runs_listbox.selected_index))[2])
selected_joinable_bool = bool1 and crewid and (global_memory.crew_memories[crewid].crewstatus == Crew.enum.ADVENTURING)
selected_joinable_bool = bool1 and crewid ~= nil and global_memory.crew_memories[crewid] ~= nil and (global_memory.crew_memories[crewid].crewstatus == Crew.enum.ADVENTURING)
end
flow.ongoing_runs.body.helpful_tip.visible = not (playercrew_status.leaving or playercrew_status.adventuring or playercrew_status.spectating)

View File

@ -17,7 +17,7 @@ function Public.show_welcome_window(player)
title_flow.style.horizontal_align = 'center'
title_flow.style.top_margin = 10
title_flow.style.width = 220
local colors = {
{r=1, g=0.5, b=0.5},
{r=1, g=0.7, b=0.5},
@ -26,7 +26,7 @@ function Public.show_welcome_window(player)
{r=0.5, g=0.7, b=1},
{r=0.7, g=0.5, b=1}
}
-- Todo: Localize
local welcome = {'W', 'E', 'L', 'C', 'O', 'M', 'E', '!'}
@ -44,7 +44,7 @@ function Public.show_welcome_window(player)
message.style.width = 220
message.style.rich_text_setting = defines.rich_text_setting.enabled
local message = frame.add{type = 'label', caption = {'pirates.welcome_main_2'}}
message = frame.add{type = 'label', caption = {'pirates.welcome_main_2'}}
message.style.font = 'default'
message.style.horizontal_align = 'center'
message.style.single_line = false