mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 05:42:35 +00:00
Don't load local cyberarm_engine of building release, fixed FieldPlanner and DriverTeamRotationGenerator not excluded from 'no configuration loaded' redirect
This commit is contained in:
@@ -172,14 +172,11 @@ class Editor < CyberarmEngine::GuiState
|
||||
@status_bar.clear
|
||||
@body.clear
|
||||
|
||||
if window.backend.settings.config.empty?
|
||||
if [TAC::Pages::Home, TAC::Pages::TACNET, TAC::Pages::Simulator, TAC::Pages::Configurations].include?(klass)
|
||||
else
|
||||
push_state(TAC::Dialog::AlertDialog, title: "No Config Loaded", message: "A config must be loaded.")
|
||||
page(TAC::Pages::Configurations)
|
||||
if window.backend.settings.config.empty? && page_requires_configuration?(klass)
|
||||
push_state(TAC::Dialog::AlertDialog, title: "No Config Loaded", message: "A config must be loaded.")
|
||||
page(TAC::Pages::Configurations)
|
||||
|
||||
return
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
@page.blur if @page
|
||||
@@ -191,4 +188,12 @@ class Editor < CyberarmEngine::GuiState
|
||||
@page.setup
|
||||
@page.focus
|
||||
end
|
||||
|
||||
def page_requires_configuration?(klass)
|
||||
[
|
||||
TAC::Pages::Editor,
|
||||
TAC::Pages::Presets,
|
||||
TAC::Pages::Search
|
||||
].include?(klass)
|
||||
end
|
||||
end
|
||||
@@ -1,4 +1,5 @@
|
||||
begin
|
||||
raise LoadError if defined?(Ocra)
|
||||
require_relative "../cyberarm_engine/lib/cyberarm_engine"
|
||||
rescue LoadError
|
||||
require "cyberarm_engine"
|
||||
|
||||
Reference in New Issue
Block a user