[gd_scene load_steps=9 format=2] [ext_resource path="res://scripts/GameTable.gd" type="Script" id=1] [ext_resource path="res://textures/wood_board_knotty.png" type="Texture" id=2] [ext_resource path="res://scripts/Board.gd" type="Script" id=3] [ext_resource path="res://resources/MenuOptions.theme" type="Theme" id=4] [sub_resource type="Environment" id=1] background_mode = 1 background_energy = 0.0 ambient_light_color = Color( 1, 0.960784, 0.921569, 1 ) ambient_light_energy = 0.5 ambient_light_sky_contribution = 0.0 fog_enabled = true fog_color = Color( 0, 0, 0, 1 ) fog_depth_end = 20.0 [sub_resource type="SpatialMaterial" id=2] albedo_color = Color( 0.345098, 0.282353, 0.184314, 1 ) albedo_texture = ExtResource( 2 ) [sub_resource type="QuadMesh" id=3] material = SubResource( 2 ) size = Vector2( 30, 30 ) [sub_resource type="GDScript" id=4] resource_name = "testing_camera" script/source = "extends Camera const max_scroll_distance : float = 10.0 const min_scroll_distance : float = 2.0 onready var scroll_distance : float = transform.origin.z const scroll_step : float = 0.2 var mouse_clicked : bool = false const max_pitch : float = -15.0 # deg const min_pitch : float = -90.0 const pan_factor : float = 0.5 onready var yaw = get_node(\"../..\") onready var pitch = get_node(\"..\") func _ready(): pass func _input(event): if event is InputEventMouseButton: if event.button_index == BUTTON_LEFT: mouse_clicked = event.pressed if event.button_index == BUTTON_WHEEL_UP and event.pressed: if scroll_distance > min_scroll_distance: scroll_distance -= scroll_step if event.button_index == BUTTON_WHEEL_DOWN and event.pressed: if scroll_distance < max_scroll_distance: scroll_distance += scroll_step transform.origin.z = scroll_distance if event is InputEventMouseMotion and mouse_clicked: var mouse_dir : Vector2 = event.get_relative() yaw.rotation_degrees.y -= mouse_dir.x * pan_factor var new_pitch = pitch.rotation_degrees.x - mouse_dir.y * pan_factor*2 if new_pitch < max_pitch and new_pitch > min_pitch: transform.origin.y = -2 * (1 - (new_pitch - max_pitch) / (min_pitch - max_pitch)) pitch.rotation_degrees.x = new_pitch " [node name="GameTable" type="Spatial"] script = ExtResource( 1 ) [node name="Board" type="Spatial" parent="."] script = ExtResource( 3 ) [node name="ActivePieces" type="Spatial" parent="."] [node name="SpotLight" type="SpotLight" parent="."] transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 15.3023, 0 ) light_color = Color( 1, 0.941176, 0.733333, 1 ) light_energy = 1.512 light_specular = 0.0 spot_range = 45.4139 [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource( 1 ) [node name="Tabletop" type="MeshInstance" parent="."] transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0 ) mesh = SubResource( 3 ) [node name="CameraHingeYaw" type="Spatial" parent="."] [node name="CameraHingePitch" type="Spatial" parent="CameraHingeYaw"] transform = Transform( 1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, 0, 0 ) [node name="Camera" type="Camera" parent="CameraHingeYaw/CameraHingePitch"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 7 ) script = SubResource( 4 ) [node name="PregameUI" type="VBoxContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 mouse_filter = 2 [node name="Header" type="HBoxContainer" parent="PregameUI"] margin_right = 1600.0 margin_bottom = 39.0 mouse_filter = 2 size_flags_horizontal = 3 [node name="GameMenuButton" type="Button" parent="PregameUI/Header"] margin_right = 30.0 margin_bottom = 39.0 theme = ExtResource( 4 ) text = "=" [node name="TitleText" type="Label" parent="PregameUI/Header"] margin_left = 34.0 margin_top = 3.0 margin_right = 387.0 margin_bottom = 36.0 mouse_filter = 0 mouse_default_cursor_shape = 2 theme = ExtResource( 4 ) text = "$LOBBY_NAME ($JCODE)" [node name="PregameControls" type="HBoxContainer" parent="PregameUI"] margin_top = 43.0 margin_right = 1600.0 margin_bottom = 443.0 mouse_filter = 2 [node name="PlayerTab" type="VBoxContainer" parent="PregameUI/PregameControls"] margin_right = 186.0 margin_bottom = 400.0 [node name="PlayersLabel" type="Label" parent="PregameUI/PregameControls/PlayerTab"] margin_right = 186.0 margin_bottom = 14.0 text = "Players ($CONNECTED/$MAX)" [node name="HSeparator" type="HSeparator" parent="PregameUI/PregameControls/PlayerTab"] margin_top = 18.0 margin_right = 186.0 margin_bottom = 22.0 [node name="PlayerList" type="VBoxContainer" parent="PregameUI/PregameControls/PlayerTab"] margin_top = 26.0 margin_right = 186.0 margin_bottom = 26.0 [node name="StartButton" type="Button" parent="PregameUI/PregameControls/PlayerTab"] margin_top = 30.0 margin_right = 186.0 margin_bottom = 69.0 theme = ExtResource( 4 ) text = "Start " [node name="ControlsTabContainer" type="TabContainer" parent="PregameUI/PregameControls"] margin_left = 190.0 margin_right = 460.0 margin_bottom = 400.0 rect_min_size = Vector2( 250, 400 ) [node name="Board Params" type="GridContainer" parent="PregameUI/PregameControls/ControlsTabContainer"] anchor_right = 1.0 anchor_bottom = 1.0 margin_left = 4.0 margin_top = 32.0 margin_right = -4.0 margin_bottom = -4.0 columns = 2 [node name="BoardSideLenLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_top = 5.0 margin_right = 112.0 margin_bottom = 19.0 text = "Board Side Lenth:" align = 2 [node name="board_side_length" type="SpinBox" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_left = 116.0 margin_right = 262.0 margin_bottom = 24.0 min_value = 4.0 max_value = 10.0 value = 6.0 [node name="AirportStyleLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_top = 31.0 margin_right = 112.0 margin_bottom = 45.0 text = "Airport Style:" align = 2 [node name="airport_style" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_left = 116.0 margin_top = 28.0 margin_right = 262.0 margin_bottom = 48.0 text = "Colors & Numbers" items = [ "Colors & Numbers", null, false, 0, null, "Names", null, false, 1, null ] selected = 0 [node name="NumAirportsLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_top = 57.0 margin_right = 112.0 margin_bottom = 71.0 text = "# Airports:" align = 2 [node name="num_airports" type="SpinBox" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_left = 116.0 margin_top = 52.0 margin_right = 262.0 margin_bottom = 76.0 min_value = 4.0 max_value = 32.0 value = 18.0 [node name="NumHillsLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_top = 85.0 margin_right = 112.0 margin_bottom = 99.0 text = "# Hills:" align = 2 [node name="num_hills" type="SpinBox" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_left = 116.0 margin_top = 80.0 margin_right = 262.0 margin_bottom = 104.0 max_value = 15.0 value = 8.0 [node name="NumMtnsLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_top = 113.0 margin_right = 112.0 margin_bottom = 127.0 text = "# Mountains:" align = 2 [node name="num_mountains" type="SpinBox" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_left = 116.0 margin_top = 108.0 margin_right = 262.0 margin_bottom = 132.0 max_value = 15.0 value = 4.0 [node name="RunwayCountLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_top = 139.0 margin_right = 112.0 margin_bottom = 153.0 text = "Runway Count:" align = 2 [node name="runways_per_airport" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_left = 116.0 margin_top = 136.0 margin_right = 262.0 margin_bottom = 156.0 text = "Random" items = [ "Random", null, false, 0, null, "1", null, false, 1, null, "2", null, false, 2, null, "3", null, false, 3, null ] selected = 0 [node name="GenerateBoardButton" type="Button" parent="PregameUI/PregameControls/ControlsTabContainer/Board Params"] margin_top = 160.0 margin_right = 112.0 margin_bottom = 180.0 text = "Generate Board" [node name="Game Rules" type="GridContainer" parent="PregameUI/PregameControls/ControlsTabContainer"] visible = false anchor_right = 1.0 anchor_bottom = 1.0 margin_left = 4.0 margin_top = 32.0 margin_right = -4.0 margin_bottom = -4.0 columns = 2 [node name="FlyOverLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 3.0 margin_right = 166.0 margin_bottom = 17.0 text = "Fly Over Airports:" align = 2 [node name="fly_over_airports" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_right = 355.0 margin_bottom = 20.0 text = "No" items = [ "No", null, false, 0, null, "Altitude 2 Only", null, false, 1, null, "All Altitudes", null, false, 2, null ] selected = 0 [node name="MustLandLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 27.0 margin_right = 166.0 margin_bottom = 41.0 text = "Must Land Final Action:" align = 2 [node name="must_land_on_final_action" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 24.0 margin_right = 355.0 margin_bottom = 44.0 text = "No" items = [ "No", null, false, 0, null, "Yes", null, false, 1, null ] selected = 0 [node name="TakeoffActionLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 51.0 margin_right = 166.0 margin_bottom = 65.0 text = "Takeoff Action:" align = 2 [node name="takeoff_action" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 48.0 margin_right = 355.0 margin_bottom = 68.0 text = "3" items = [ "1", null, false, 0, null, "2", null, false, 1, null, "3", null, false, 2, null, "4", null, false, 3, null, "5", null, false, 4, null ] selected = 2 [node name="MoveForwardLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 75.0 margin_right = 166.0 margin_bottom = 89.0 text = "Move Forward:" align = 2 [node name="move_forward_order" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 72.0 margin_right = 355.0 margin_bottom = 92.0 text = "Either" items = [ "Either", null, false, 0, null, "After Action", null, false, 1, null, "Before Action", null, false, 2, null ] selected = 0 [node name="GamemodeLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 99.0 margin_right = 166.0 margin_bottom = 113.0 text = "Gamemode:" align = 2 [node name="gamemode" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 96.0 margin_right = 355.0 margin_bottom = 116.0 text = "Cooperative" items = [ "Cooperative", null, false, 0, null, "Versus", null, false, 1, null ] selected = 0 [node name="PlaneAssignmentLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 123.0 margin_right = 166.0 margin_bottom = 137.0 text = "Plane Assignment:" align = 2 [node name="plane_assignment" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 120.0 margin_right = 355.0 margin_bottom = 140.0 text = "Random" items = [ "Random", null, false, 0, null, "Draft", null, false, 1, null ] selected = 0 [node name="AltitudeChangeLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 147.0 margin_right = 166.0 margin_bottom = 161.0 text = "Altitude Change:" align = 2 [node name="altitude_and_turn" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 144.0 margin_right = 355.0 margin_bottom = 164.0 text = "Turn OR Altitude Change" items = [ "Turn OR Altitude Change", null, false, 0, null, "Turn AND Altitude Change", null, false, 1, null ] selected = 0 [node name="TurnsPerEventLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 173.0 margin_right = 166.0 margin_bottom = 187.0 text = "Turns Per Event:" align = 2 [node name="event_frequency" type="SpinBox" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 168.0 margin_right = 355.0 margin_bottom = 192.0 min_value = 1.0 max_value = 4.0 value = 1.0 [node name="WeatherEnabledLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 199.0 margin_right = 166.0 margin_bottom = 213.0 text = "Weather:" align = 2 [node name="weather_enabled" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 196.0 margin_right = 355.0 margin_bottom = 216.0 text = "Enabled" items = [ "Disabled", null, false, 0, null, "Enabled", null, false, 1, null ] selected = 1 [node name="OtherEventsLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 223.0 margin_right = 166.0 margin_bottom = 237.0 text = "Other Events:" align = 2 [node name="misc_enabled" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 220.0 margin_right = 355.0 margin_bottom = 240.0 text = "Enabled" items = [ "Disabled", null, false, 0, null, "Enabled", null, false, 1, null ] selected = 1 [node name="NewPlanesLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 249.0 margin_right = 166.0 margin_bottom = 263.0 text = "New Planes Per Turn:" align = 2 [node name="new_planes_per_turn" type="SpinBox" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 244.0 margin_right = 355.0 margin_bottom = 268.0 min_value = 1.0 max_value = 7.0 value = 4.0 [node name="NewPlaneRampupLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 275.0 margin_right = 166.0 margin_bottom = 289.0 text = "New Plane Ramp Up:" align = 2 [node name="ramp_up_enabled" type="OptionButton" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 272.0 margin_right = 355.0 margin_bottom = 292.0 text = "Disabled" items = [ "Disabled", null, false, 0, null, "Enabled", null, false, 1, null ] selected = 0 [node name="StartingPlanesLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 301.0 margin_right = 166.0 margin_bottom = 315.0 text = "Starting Planes Per Player:" align = 2 [node name="starting_planes_per_player" type="SpinBox" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 296.0 margin_right = 355.0 margin_bottom = 320.0 min_value = 1.0 max_value = 10.0 value = 3.0 [node name="RoundTimerLabel" type="Label" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_top = 329.0 margin_right = 166.0 margin_bottom = 343.0 text = "Round Timer:" align = 2 [node name="round_timer" type="SpinBox" parent="PregameUI/PregameControls/ControlsTabContainer/Game Rules"] margin_left = 170.0 margin_top = 324.0 margin_right = 355.0 margin_bottom = 348.0 min_value = 15.0 max_value = 300.0 value = 15.0 [connection signal="gui_input" from="PregameUI/Header/TitleText" to="." method="_on_TitleText_gui_input"]