mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 13:52:34 +00:00
Added Into the Deep field
This commit is contained in:
@@ -38,7 +38,7 @@ module TAC
|
|||||||
refresh_panel
|
refresh_panel
|
||||||
end
|
end
|
||||||
|
|
||||||
list_box items: ["CENTERSTAGE", "Power Play", "Freight Frenzy", "Ultimate Goal", "Skystone"], width: 200, height: 1.0 do |item|
|
list_box items: ["Into the Deep", "CENTERSTAGE", "Power Play", "Freight Frenzy", "Ultimate Goal", "Skystone"], width: 200, height: 1.0 do |item|
|
||||||
season = item.downcase.gsub(" ", "_").to_sym
|
season = item.downcase.gsub(" ", "_").to_sym
|
||||||
@field = TAC::Simulator::Field.new(container: @field_container, season: season, simulation: nil)
|
@field = TAC::Simulator::Field.new(container: @field_container, season: season, simulation: nil)
|
||||||
end
|
end
|
||||||
@@ -68,7 +68,7 @@ module TAC
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@field = TAC::Simulator::Field.new(container: @field_container, season: :centerstage, simulation: nil)
|
@field = TAC::Simulator::Field.new(container: @field_container, season: :into_the_deep, simulation: nil)
|
||||||
@nodes ||= []
|
@nodes ||= []
|
||||||
@unit = :inches
|
@unit = :inches
|
||||||
@total_distance = 0
|
@total_distance = 0
|
||||||
|
|||||||
@@ -336,9 +336,7 @@ module TAC
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
###########################
|
|
||||||
### --- CENTERSTAGE --- ###
|
|
||||||
###########################
|
|
||||||
def draw_field_centerstage
|
def draw_field_centerstage
|
||||||
# Corner TAPE
|
# Corner TAPE
|
||||||
2.times do |i|
|
2.times do |i|
|
||||||
@@ -441,6 +439,140 @@ module TAC
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#############################
|
||||||
|
### --- Into the Deep --- ###
|
||||||
|
#############################
|
||||||
|
def draw_field_into_the_deep
|
||||||
|
# Observation and net zones
|
||||||
|
2.times do |i|
|
||||||
|
Gosu.rotate(i * 180.0, 72, 72) do
|
||||||
|
Gosu.draw_quad(
|
||||||
|
24 - 2, 0, i.odd? ? @red : @blue,
|
||||||
|
24, 0, i.odd? ? @red : @blue,
|
||||||
|
0, 24 - 2, i.odd? ? @red : @blue,
|
||||||
|
0, 24, i.odd? ? @red : @blue,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
|
||||||
|
Gosu.draw_rect(
|
||||||
|
12, 144 - 24,
|
||||||
|
2, 24,
|
||||||
|
i.odd? ? @red : @blue,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
|
||||||
|
Gosu.draw_quad(
|
||||||
|
12, 144 - 24, i.odd? ? @red : @blue,
|
||||||
|
14, 144 - 24, i.odd? ? @red : @blue,
|
||||||
|
0, 144 - 36, i.odd? ? @red : @blue,
|
||||||
|
0, 144 - 38, i.odd? ? @red : @blue,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
faint_white = Gosu::Color.rgb(240, 240, 240)
|
||||||
|
|
||||||
|
# spike marks, white
|
||||||
|
3.times do |i|
|
||||||
|
Gosu.draw_rect(
|
||||||
|
48 - 3.5, 22 - i * 10,
|
||||||
|
3.5, 2,
|
||||||
|
faint_white,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
end
|
||||||
|
#spike marks, red
|
||||||
|
3.times do |i|
|
||||||
|
Gosu.draw_rect(
|
||||||
|
(144 - 48), 22 - i * 10,
|
||||||
|
3.5, 2,
|
||||||
|
@red,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
end
|
||||||
|
# spike marks, blue
|
||||||
|
3.times do |i|
|
||||||
|
Gosu.draw_rect(
|
||||||
|
48 - 3.5, 144 - 24 + i * 10,
|
||||||
|
3.5, 2,
|
||||||
|
@blue,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
end
|
||||||
|
# spike marks, yellow
|
||||||
|
3.times do |i|
|
||||||
|
Gosu.draw_rect(
|
||||||
|
(144 - 48), 144 - 24 + i * 10,
|
||||||
|
3.5, 2,
|
||||||
|
faint_white,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Accent Zone Triangle TAPE
|
||||||
|
2.times do |i|
|
||||||
|
Gosu.rotate(i * 180.0, 72, 72) do
|
||||||
|
Gosu.draw_quad(
|
||||||
|
48, 48, faint_white,
|
||||||
|
72, 48 - 10, faint_white,
|
||||||
|
72, 49 - 10, faint_white,
|
||||||
|
50, 48, faint_white,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
|
||||||
|
Gosu.draw_quad(
|
||||||
|
96, 48, faint_white,
|
||||||
|
72, 48 - 10, faint_white,
|
||||||
|
72, 49 - 10, faint_white,
|
||||||
|
94, 48, faint_white,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# submersible
|
||||||
|
bar_gray = 0xff_656565 #Gosu::Color.rgb(50, 50, 50)
|
||||||
|
|
||||||
|
2.times do |i|
|
||||||
|
# left and right edges of submersible
|
||||||
|
Gosu.draw_rect(
|
||||||
|
72 - 24 + i * 46, 72 - 24,
|
||||||
|
2, 48,
|
||||||
|
bar_gray,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
|
||||||
|
# top and bottom edges of submersible
|
||||||
|
Gosu.draw_rect(
|
||||||
|
72 - 24, 72 - 15 + i * 28,
|
||||||
|
48, 2,
|
||||||
|
bar_gray,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
|
||||||
|
# alliance rungs of submersible
|
||||||
|
Gosu.draw_rect(
|
||||||
|
72 - 24 + i * 46, 72 - 13,
|
||||||
|
2, 26,
|
||||||
|
i.even? ? @blue : @red,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
# alliance bar bars
|
||||||
|
2.times do |i|
|
||||||
|
3.times do |x|
|
||||||
|
Gosu.draw_rect(
|
||||||
|
72 - 21.5 + x * 21, 72 - 15 + i * 28,
|
||||||
|
1, 2,
|
||||||
|
i.even? ? @blue : @red,
|
||||||
|
@z
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def draw_tile_box(color)
|
def draw_tile_box(color)
|
||||||
Gosu.draw_rect(0, 0, 24, 2, color, @z)
|
Gosu.draw_rect(0, 0, 24, 2, color, @z)
|
||||||
Gosu.draw_rect(22, 2, 2, 22, color, @z)
|
Gosu.draw_rect(22, 2, 2, 22, color, @z)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ module TAC
|
|||||||
@field_container = field_container
|
@field_container = field_container
|
||||||
|
|
||||||
@robots = []
|
@robots = []
|
||||||
@field = Field.new(simulation: self, season: :centerstage, container: @field_container)
|
@field = Field.new(simulation: self, season: :into_the_deep, container: @field_container)
|
||||||
@show_paths = false
|
@show_paths = false
|
||||||
|
|
||||||
@last_milliseconds = Gosu.milliseconds
|
@last_milliseconds = Gosu.milliseconds
|
||||||
|
|||||||
Reference in New Issue
Block a user