mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-01 13:08:05 +02:00
Script error fixes from the logs
This commit is contained in:
parent
2dd3e1523c
commit
7930fdd32c
@ -7,6 +7,7 @@ local Classes = require 'maps.pirates.roles.classes'
|
||||
local GuiCommon = require 'maps.pirates.gui.common'
|
||||
local Public = {}
|
||||
|
||||
local _inspect = require 'utils.inspect'.inspect
|
||||
|
||||
local window_name = 'classes'
|
||||
|
||||
@ -187,6 +188,7 @@ function Public.full_update(player, force_refresh)
|
||||
-- Update current content table
|
||||
for i = 1, memory.class_entry_count do
|
||||
local label = class_list_panel_table['player_label' .. i]
|
||||
if label then
|
||||
local class_entry = memory.unlocked_classes[i]
|
||||
label.caption = class_entry.taken_by and game.players[class_entry.taken_by].name or ''
|
||||
|
||||
@ -216,6 +218,12 @@ function Public.full_update(player, force_refresh)
|
||||
button.style.clicked_font_color = black
|
||||
button.enabled = false
|
||||
end
|
||||
else
|
||||
log('Error: Non-existant label index, here some debug info.')
|
||||
log(_inspect(class_list_panel_table))
|
||||
log(memory.class_entry_count)
|
||||
log(memory.unlocked_classes)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
@ -68,6 +68,7 @@ function Public.reveal(cave_miner, surface, source_surface, position, brushsize)
|
||||
local entity_position = entity.position
|
||||
if (position.x - entity_position.x) ^ 2 + (position.y - entity_position.y) ^ 2 < brushsize_square then
|
||||
local e = entity.clone({position = entity_position, surface = surface})
|
||||
if e and e.valid then
|
||||
if e.name == 'market' then
|
||||
rendering.draw_light(
|
||||
{
|
||||
@ -104,6 +105,7 @@ function Public.reveal(cave_miner, surface, source_surface, position, brushsize)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
source_surface.set_tiles({{name = 'lab-dark-2', position = position}}, false)
|
||||
source_surface.request_to_generate_chunks(position, 3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user