summaryrefslogtreecommitdiff
path: root/godot
diff options
context:
space:
mode:
authorAnson Bridges <bridges.anson@gmail.com>2022-09-15 16:43:08 -0400
committerAnson Bridges <bridges.anson@gmail.com>2022-09-15 16:43:08 -0400
commit7a52122ef736a9525f98c37d3e56c4c3095b61e5 (patch)
tree4eda6ebf8ed300bb32559a1cdbe8c4015f3f77d6 /godot
parentaad319ddb5be108e9ca81d407bd90c843bae502d (diff)
Script for converting properly formatted .gd to a c++ template
Diffstat (limited to 'godot')
-rw-r--r--godot/default_env.tres8
-rw-r--r--godot/maps/Main.tscn2
-rw-r--r--godot/project.godot4
-rw-r--r--godot/scenes/vehicles/Airplane.tscn2
-rw-r--r--godot/scripts/machines/NetworkedMachineGDS.gd20
5 files changed, 24 insertions, 12 deletions
diff --git a/godot/default_env.tres b/godot/default_env.tres
index 55082ac..a10be49 100644
--- a/godot/default_env.tres
+++ b/godot/default_env.tres
@@ -1,9 +1,17 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
+sky_top_color = Color( 0.74902, 0.819608, 0.890196, 1 )
+sky_horizon_color = Color( 0.501961, 0.6, 0.701961, 1 )
ground_bottom_color = Color( 0.00392157, 0.0862745, 0.172549, 1 )
ground_horizon_color = Color( 0.00392157, 0.733333, 0.901961, 1 )
[resource]
background_mode = 2
background_sky = SubResource( 1 )
+fog_enabled = true
+fog_color = Color( 0.501961, 0.6, 0.701961, 1 )
+fog_sun_color = Color( 0.615686, 0.964706, 1, 1 )
+fog_depth_begin = 170.9
+fog_depth_end = 476.2
+fog_transmit_enabled = true
diff --git a/godot/maps/Main.tscn b/godot/maps/Main.tscn
index e6e8c27..68ad166 100644
--- a/godot/maps/Main.tscn
+++ b/godot/maps/Main.tscn
@@ -100,7 +100,7 @@ transform = Transform( -0.854422, 0, 0.519579, 0, 1, 0, -0.519579, 0, -0.854422,
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 30.8999, 5.13129, -8.23008 )
[node name="Gunbrig" parent="MACHINES" instance=ExtResource( 15 )]
-transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -15.9478, 0.974679, 31.6985 )
+transform = Transform( 0.313296, 0, -0.949655, 0, 1, 0, 0.949655, 0, 0.313296, -15.9478, 0.974679, 31.6985 )
[node name="BALLISTICS" type="Spatial" parent="."]
diff --git a/godot/project.godot b/godot/project.godot
index c8de89c..995213a 100644
--- a/godot/project.godot
+++ b/godot/project.godot
@@ -15,6 +15,10 @@ run/main_scene="res://ui/MainMenu.tscn"
boot_splash/show_image=false
config/icon="res://icon.png"
+[audio]
+
+default_bus_layout=""
+
[display]
window/vsync/use_vsync=false
diff --git a/godot/scenes/vehicles/Airplane.tscn b/godot/scenes/vehicles/Airplane.tscn
index ec79c66..43c3a17 100644
--- a/godot/scenes/vehicles/Airplane.tscn
+++ b/godot/scenes/vehicles/Airplane.tscn
@@ -161,4 +161,4 @@ shape = SubResource( 9 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.72698, -0.196514, 0 )
[node name="PilotExit" type="Spatial" parent="."]
-transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 6.1653, -0.196514, 0 )
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.50863, 2.36377, 0 )
diff --git a/godot/scripts/machines/NetworkedMachineGDS.gd b/godot/scripts/machines/NetworkedMachineGDS.gd
index 3f2d420..c1d755d 100644
--- a/godot/scripts/machines/NetworkedMachineGDS.gd
+++ b/godot/scripts/machines/NetworkedMachineGDS.gd
@@ -1,26 +1,26 @@
extends RigidBody
-var in_use : bool = false
-var user = null
-var world = null
+var in_use: bool = false
+var user: RigidBody = null
+var world: Spatial = null
func _ready():
print("net machine loads world")
world = get_tree().get_root().find_node("GAMEWORLD", true, false)
-remote func update_phys_transform(t, lv, av):
+remote func update_phys_transform(t: Transform, lv: Vector3, av: Vector3):
transform = t
linear_velocity = lv
angular_velocity = av
-remotesync func net_apply_impulse(impulse_v):
+remotesync func net_apply_impulse(impulse_v: Vector3):
apply_central_impulse(impulse_v)
-func _integrate_forces(_state):
+func _integrate_forces(_state: PhysicsDirectBodyState):
if is_network_master() and mode == MODE_RIGID:
rpc("update_phys_transform", transform, linear_velocity, angular_velocity)
-remotesync func set_net_owner(id, char_name):
+remotesync func set_net_owner(id: int, char_name: String):
set_network_master(id)
if id == 1 and char_name == "NONE": #not under control
on_no_control()
@@ -51,11 +51,11 @@ func attack1():
func attack2():
pass
-func direction_input(_fwd,_bwd,_left,_right,_left2,_right2):
+func direction_input(_fwd: float,_bwd: float,_left: float,_right: float,_left2: float,_right2: float):
pass
-func misc_input(_ctrl,_space,_shift):
+func misc_input(_ctrl: float,_space: float,_shift: float):
pass
-func mouse_input(_m1,_m3,_m2): #used for long-press actions
+func mouse_input(_m1: float,_m3: float,_m2: float): #used for long-press actions
pass