mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 05:42:35 +00:00
Updated practice clock to use a zero exclusive display (matches offical clock better), tweaked sound timings a bit to match, disabled color changing on clock to match offical clock, misc. tweaks.
This commit is contained in:
@@ -57,10 +57,9 @@ module TAC
|
|||||||
end
|
end
|
||||||
|
|
||||||
def clock_time(time_left)
|
def clock_time(time_left)
|
||||||
minutes = ((time_left + 0.5) / 60.0).floor
|
minutes = ((time_left + 1.0) / 60.0).floor
|
||||||
|
|
||||||
seconds = time_left.round % 60
|
seconds = format("%02d", time_left.ceil % 60)
|
||||||
seconds = "0#{seconds}" if seconds < 10
|
|
||||||
|
|
||||||
return "#{minutes}:#{seconds}" if time_left.round.even?
|
return "#{minutes}:#{seconds}" if time_left.round.even?
|
||||||
return "#{minutes}<c=999999>:</c>#{seconds}" if time_left.round.odd?
|
return "#{minutes}<c=999999>:</c>#{seconds}" if time_left.round.odd?
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ module TAC
|
|||||||
create_event(:change_countdown, 33.0, "0:08"),
|
create_event(:change_countdown, 33.0, "0:08"),
|
||||||
create_event(:change_display, 33.0, :countdown),
|
create_event(:change_display, 33.0, :countdown),
|
||||||
create_event(:start_countdown, 33.0),
|
create_event(:start_countdown, 33.0),
|
||||||
create_event(:play_sound, 34.5, :teleop_pickup_controllers),
|
create_event(:play_sound, 35.0, :teleop_pickup_controllers),
|
||||||
create_event(:change_color, 37.0, :red),
|
create_event(:change_color, 38.0, :red),
|
||||||
create_event(:play_sound, 38.0, :teleop_countdown),
|
create_event(:play_sound, 38.0, :teleop_countdown),
|
||||||
create_event(:stop_countdown, 41.0),
|
create_event(:stop_countdown, 41.0),
|
||||||
].freeze
|
].freeze
|
||||||
@@ -44,7 +44,7 @@ module TAC
|
|||||||
create_event(:change_clock, 131.0, "0:30"),
|
create_event(:change_clock, 131.0, "0:30"),
|
||||||
create_event(:start_clock, 131.0),
|
create_event(:start_clock, 131.0),
|
||||||
create_event(:play_sound, 131.0, :end_game),
|
create_event(:play_sound, 131.0, :end_game),
|
||||||
create_event(:play_sound, 158.0, :autonomous_countdown),
|
# create_event(:play_sound, 158.0, :autonomous_countdown), # Not played here anymore
|
||||||
create_event(:play_sound, 161.0, :end_match),
|
create_event(:play_sound, 161.0, :end_match),
|
||||||
create_event(:stop_clock, 161.0),
|
create_event(:stop_clock, 161.0),
|
||||||
].freeze
|
].freeze
|
||||||
@@ -128,7 +128,7 @@ module TAC
|
|||||||
elsif @countdown_running
|
elsif @countdown_running
|
||||||
return @countdown_time
|
return @countdown_time
|
||||||
else
|
else
|
||||||
return 60 * 2 + 30
|
return 0 # Clock defaults to showing "0:00" if there is no clock or countdown
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ module TAC
|
|||||||
Gosu::Color.rgb(150, 0, 0)
|
Gosu::Color.rgb(150, 0, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
### --- ###
|
||||||
|
# OVERRIDE: offical CenterStage game clock no longer has colors
|
||||||
|
### --- ###
|
||||||
|
|
||||||
|
out = Gosu::Color::WHITE
|
||||||
|
|
||||||
@display_color = out
|
@display_color = out
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ module TAC
|
|||||||
|
|
||||||
button "Open Folder", tip: "Open folder containing configurations", height: 1.0 do
|
button "Open Folder", tip: "Open folder containing configurations", height: 1.0 do
|
||||||
if RUBY_PLATFORM =~ /mingw/
|
if RUBY_PLATFORM =~ /mingw/
|
||||||
system("start \"#{TAC::CONFIGS_PATH}\"")
|
system("explorer \"#{TAC::CONFIGS_PATH.gsub("/", "\\")}\"")
|
||||||
elsif RUBY_PLATFORM =~ /darwin/
|
elsif RUBY_PLATFORM =~ /darwin/
|
||||||
system("open \"#{TAC::CONFIGS_PATH}\"")
|
system("open \"#{TAC::CONFIGS_PATH}\"")
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -9,11 +9,12 @@ module TAC
|
|||||||
@roster ||= [
|
@roster ||= [
|
||||||
"Aubrey",
|
"Aubrey",
|
||||||
"Cayden",
|
"Cayden",
|
||||||
|
"Connor",
|
||||||
|
"Ben",
|
||||||
"Dan",
|
"Dan",
|
||||||
"Gabe",
|
"Gabe",
|
||||||
"Spencer",
|
"Spencer",
|
||||||
"Sodi",
|
"Sodi"
|
||||||
"Trent"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@roles ||= [
|
@roles ||= [
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ module TAC
|
|||||||
def button_down(id)
|
def button_down(id)
|
||||||
super
|
super
|
||||||
|
|
||||||
|
pop_state
|
||||||
push_state(@next_state)
|
push_state(@next_state)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ module TAC
|
|||||||
|
|
||||||
self.caption = "#{TAC::NAME} v#{TAC::VERSION} (#{TAC::RELEASE_NAME})"
|
self.caption = "#{TAC::NAME} v#{TAC::VERSION} (#{TAC::RELEASE_NAME})"
|
||||||
@backend = Backend.new
|
@backend = Backend.new
|
||||||
@notification_manager = GosuNotifications::NotificationManager.new(window: self, edge: :bottom)
|
@notification_manager = CyberarmEngine::NotificationManager.new(window: self, edge: :bottom)
|
||||||
|
|
||||||
if ARGV.join.include?("--game-clock-remote-display")
|
if ARGV.join.include?("--game-clock-remote-display")
|
||||||
push_state(PracticeGameClock::View, remote_control_mode: true)
|
push_state(PracticeGameClock::View, remote_control_mode: true)
|
||||||
@@ -26,9 +26,9 @@ module TAC
|
|||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
super
|
|
||||||
|
|
||||||
@notification_manager.update
|
@notification_manager.update
|
||||||
|
|
||||||
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def needs_redraw?
|
def needs_redraw?
|
||||||
@@ -37,7 +37,7 @@ module TAC
|
|||||||
|
|
||||||
def toast(title, message = nil)
|
def toast(title, message = nil)
|
||||||
@notification_manager.create_notification(
|
@notification_manager.create_notification(
|
||||||
priority: GosuNotifications::Notification::PRIORITY_HIGH,
|
priority: CyberarmEngine::Notification::PRIORITY_HIGH,
|
||||||
title: title,
|
title: title,
|
||||||
|
|
||||||
tagline: message ? message : "",
|
tagline: message ? message : "",
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ begin
|
|||||||
rescue LoadError
|
rescue LoadError
|
||||||
require "cyberarm_engine"
|
require "cyberarm_engine"
|
||||||
end
|
end
|
||||||
require "gosu_notifications"
|
|
||||||
require "socket"
|
require "socket"
|
||||||
require "securerandom"
|
require "securerandom"
|
||||||
require "json"
|
require "json"
|
||||||
|
|||||||
Reference in New Issue
Block a user