mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-10 10:00:00 +02:00
Gui.destory when loader_crafter closes + update .luacheckrc
This commit is contained in:
parent
ee2e77fbba
commit
83befd776e
75
.luacheckrc
75
.luacheckrc
@ -1166,6 +1166,81 @@ stds.factorio_defines = {
|
||||
'tutorials'
|
||||
}
|
||||
},
|
||||
relative_gui_position = {
|
||||
fields = {
|
||||
'top',
|
||||
'bottom',
|
||||
'left',
|
||||
'right'
|
||||
}
|
||||
},
|
||||
relative_gui_type = {
|
||||
fields = {
|
||||
'accumulator_gui',
|
||||
'achievement_gui',
|
||||
'additional_entity_info_gui',
|
||||
'admin_gui',
|
||||
'arithmetic_combinator_gui',
|
||||
'armor_gui',
|
||||
'assembling_machine_gui',
|
||||
'assembling_machine_select_recipe_gui',
|
||||
'beacon_gui',
|
||||
'blueprint_book_gui',
|
||||
'blueprint_library_gui',
|
||||
'blueprint_setup_gui',
|
||||
'bonus_gui',
|
||||
'burner_equipment_gui',
|
||||
'car_gui',
|
||||
'constant_combinator_gui',
|
||||
'container_gui',
|
||||
'controller_gui',
|
||||
'decider_combinator_gui',
|
||||
'deconstruction_item_gui',
|
||||
'electric_energy_interface_gui',
|
||||
'electric_network_gui',
|
||||
'entity_variations_gui',
|
||||
'entity_with_energy_source_gui',
|
||||
'equipment_grid_gui',
|
||||
'furnace_gui',
|
||||
'generic_on_off_entity_gui',
|
||||
'heat_interface_gui',
|
||||
'infinity_pipe_gui',
|
||||
'inserter_gui',
|
||||
'item_with_inventory_gui',
|
||||
'lab_gui',
|
||||
'lamp_gui',
|
||||
'linked_container_gui',
|
||||
'loader_gui',
|
||||
'logistic_gui',
|
||||
'market_gui',
|
||||
'mining_drill_gui',
|
||||
'other_player_gui',
|
||||
'permissions_gui',
|
||||
'pipe_gui',
|
||||
'power_switch_gui',
|
||||
'production_gui',
|
||||
'programmable_speaker_gui',
|
||||
'rail_chain_signal_gui',
|
||||
'rail_signal_gui',
|
||||
'reactor_gui',
|
||||
'rename_stop_gui',
|
||||
'resource_entity_gui',
|
||||
'roboport_gui',
|
||||
'rocket_silo_gui',
|
||||
'server_config_gui',
|
||||
'spider_vehicle_gui',
|
||||
'splitter_gui',
|
||||
'standalone_character_gui',
|
||||
'storage_tank_gui',
|
||||
'tile_variations_gui',
|
||||
'train_gui',
|
||||
'train_stop_gui',
|
||||
'trains_gui',
|
||||
'transport_belt_gui',
|
||||
'upgrade_item_gui',
|
||||
'wall_gui
|
||||
}
|
||||
},
|
||||
input_action = {
|
||||
fields = {
|
||||
'activate_copy',
|
||||
|
@ -466,6 +466,18 @@ Event.add(defines.events.on_player_created, function(event)
|
||||
draw_loader_frame_for_player(panel)
|
||||
end)
|
||||
|
||||
Event.add(defines.events.on_gui_closed, function(event)
|
||||
local player = game.get_player(event.player_index)
|
||||
if not player or not player.valid then
|
||||
return
|
||||
end
|
||||
|
||||
local panel = player.gui.relative[loader_crafter_frame_for_assembly_machine_name]
|
||||
if panel and panel.valid then
|
||||
Gui.destroy(panel)
|
||||
end
|
||||
end)
|
||||
|
||||
Event.add(defines.events.on_research_finished, function(event)
|
||||
local research = event.research.name
|
||||
if (research == "logistics") or (research == "logistics-2") or (research == "logistics-3") then
|
||||
|
Loading…
Reference in New Issue
Block a user