Adding locations micro-service

This commit is contained in:
Zeeshaun Masood
2026-01-20 13:41:38 -06:00
parent a347175e53
commit 196e877711
98 changed files with 4198 additions and 3751 deletions
+22 -22
View File
@@ -1,22 +1,22 @@
extends Node3D
@export var day_length := 120.0 # seconds for full rotation
@export var start_light_angle := -90.0
var end_light_angle = start_light_angle + 360.0
var start_radians = start_light_angle * PI / 180
var time := 0.0
@onready var sun := $DirectionalLight3D
func _process(delta):
time = fmod((time + delta), day_length)
var t = time / day_length
# Rotate sun around X axis
var angle = lerp(start_light_angle, end_light_angle, t) # sunrise → sunset → night → sunrise
sun.rotation_degrees.x = angle
# Adjust intensity
var curSin = -sin((t * TAU) + start_radians)
var energy = clamp((curSin * 1.0) + 0.2, 0.0, 1.2)
sun.light_energy = energy
extends Node3D
@export var day_length := 120.0 # seconds for full rotation
@export var start_light_angle := -90.0
var end_light_angle = start_light_angle + 360.0
var start_radians = start_light_angle * PI / 180
var time := 0.0
@onready var sun := $DirectionalLight3D
func _process(delta):
time = fmod((time + delta), day_length)
var t = time / day_length
# Rotate sun around X axis
var angle = lerp(start_light_angle, end_light_angle, t) # sunrise → sunset → night → sunrise
sun.rotation_degrees.x = angle
# Adjust intensity
var curSin = -sin((t * TAU) + start_radians)
var energy = clamp((curSin * 1.0) + 0.2, 0.0, 1.2)
sun.light_energy = energy
+1 -1
View File
@@ -1 +1 @@
uid://brgmxhhhtakja
uid://brgmxhhhtakja
+170 -170
View File
@@ -1,170 +1,170 @@
[gd_scene load_steps=17 format=3 uid="uid://dchj6g2i8ebph"]
[ext_resource type="Script" uid="uid://brgmxhhhtakja" path="res://scenes/Levels/level.gd" id="1_a4mo8"]
[ext_resource type="PackedScene" uid="uid://bb6hj6l23043x" path="res://assets/models/human.blend" id="1_eg4yq"]
[ext_resource type="Script" uid="uid://bpxggc8nr6tf6" path="res://scenes/player.gd" id="1_muv8p"]
[ext_resource type="PackedScene" uid="uid://c5of6aaxop1hl" path="res://scenes/block.tscn" id="2_tc7dm"]
[ext_resource type="Script" uid="uid://b7fopt7sx74g8" path="res://scenes/Levels/menu.gd" id="3_tc7dm"]
[ext_resource type="PackedScene" path="res://scenes/Characters/repo_bot.tscn" id="4_repo"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_2q6dc"]
bounce = 0.5
[sub_resource type="SphereShape3D" id="SphereShape3D_2q6dc"]
[sub_resource type="SphereMesh" id="SphereMesh_w7c3h"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_w8frs"]
bounce = 0.5
[sub_resource type="SphereShape3D" id="SphereShape3D_mx8sn"]
[sub_resource type="BoxShape3D" id="BoxShape3D_2q6dc"]
size = Vector3(1080, 2, 1080)
[sub_resource type="BoxMesh" id="BoxMesh_w7c3h"]
size = Vector3(1080, 2, 1080)
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_fi66n"]
[sub_resource type="Sky" id="Sky_a4mo8"]
sky_material = SubResource("ProceduralSkyMaterial_fi66n")
[sub_resource type="Environment" id="Environment_a4mo8"]
background_mode = 2
sky = SubResource("Sky_a4mo8")
ambient_light_source = 3
[node name="Node3D" type="Node3D"]
script = ExtResource("1_a4mo8")
[node name="human" parent="." instance=ExtResource("1_eg4yq")]
[node name="RepoBot" parent="." instance=ExtResource("4_repo")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.9426608, 0, -4.4451966)
[node name="Thing" type="RigidBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -3.7986288)
physics_material_override = SubResource("PhysicsMaterial_2q6dc")
gravity_scale = 0.0
contact_monitor = true
max_contacts_reported = 5
[node name="CollisionShape3D" type="CollisionShape3D" parent="Thing"]
shape = SubResource("SphereShape3D_2q6dc")
debug_color = Color(0.29772994, 0.6216631, 0.28140613, 0.41960785)
[node name="MeshInstance3D" type="MeshInstance3D" parent="Thing"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
mesh = SubResource("SphereMesh_w7c3h")
[node name="Player" type="RigidBody3D" parent="."]
physics_material_override = SubResource("PhysicsMaterial_w8frs")
script = ExtResource("1_muv8p")
camera_path = NodePath("Camera3D")
phone_path = NodePath("../PhoneUI")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Player"]
shape = SubResource("SphereShape3D_mx8sn")
[node name="Camera3D" type="Camera3D" parent="Player"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.31670225, 0)
current = true
[node name="SpotLight3D" type="SpotLight3D" parent="Player"]
[node name="Ground" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
shape = SubResource("BoxShape3D_2q6dc")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground"]
mesh = SubResource("BoxMesh_w7c3h")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.5, 0.8660253, 0, -0.8660253, 0.5, 0, 34, 0)
shadow_enabled = true
[node name="Starter Blocks" type="Node3D" parent="."]
[node name="Block" parent="Starter Blocks" instance=ExtResource("2_tc7dm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.298158, -7.0724635)
[node name="Block2" parent="Starter Blocks" instance=ExtResource("2_tc7dm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.63255787, 2.596316, -6.980046)
[node name="Menu" type="CanvasLayer" parent="."]
process_mode = 3
visible = false
script = ExtResource("3_tc7dm")
[node name="PhoneUI" type="CanvasLayer" parent="."]
layer = 5
visible = false
[node name="Control" type="Control" parent="PhoneUI"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PhoneFrame" type="ColorRect" parent="PhoneUI/Control"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -180.0
offset_top = -320.0
offset_right = 180.0
offset_bottom = 320.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.08, 0.08, 0.1, 1)
[node name="Control" type="Control" parent="Menu"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
[node name="VBoxContainer" type="VBoxContainer" parent="Menu/Control"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -39.5
offset_top = -33.0
offset_right = 39.5
offset_bottom = 33.0
grow_horizontal = 2
grow_vertical = 2
[node name="ContinueButton" type="Button" parent="Menu/Control/VBoxContainer"]
layout_mode = 2
text = "Continue"
[node name="MainMenuButton" type="Button" parent="Menu/Control/VBoxContainer"]
layout_mode = 2
text = "Main Menu"
[node name="QuitButton" type="Button" parent="Menu/Control/VBoxContainer"]
layout_mode = 2
text = "Quit"
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_a4mo8")
[connection signal="pressed" from="Menu/Control/VBoxContainer/ContinueButton" to="Menu" method="_on_continue_button_pressed"]
[connection signal="pressed" from="Menu/Control/VBoxContainer/MainMenuButton" to="Menu" method="_on_main_menu_button_pressed"]
[connection signal="pressed" from="Menu/Control/VBoxContainer/QuitButton" to="Menu" method="_on_quit_button_pressed"]
[gd_scene load_steps=17 format=3 uid="uid://dchj6g2i8ebph"]
[ext_resource type="Script" uid="uid://brgmxhhhtakja" path="res://scenes/Levels/level.gd" id="1_a4mo8"]
[ext_resource type="PackedScene" uid="uid://bb6hj6l23043x" path="res://assets/models/human.blend" id="1_eg4yq"]
[ext_resource type="Script" uid="uid://bpxggc8nr6tf6" path="res://scenes/player.gd" id="1_muv8p"]
[ext_resource type="PackedScene" uid="uid://c5of6aaxop1hl" path="res://scenes/block.tscn" id="2_tc7dm"]
[ext_resource type="Script" uid="uid://b7fopt7sx74g8" path="res://scenes/Levels/menu.gd" id="3_tc7dm"]
[ext_resource type="PackedScene" path="res://scenes/Characters/repo_bot.tscn" id="4_repo"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_2q6dc"]
bounce = 0.5
[sub_resource type="SphereShape3D" id="SphereShape3D_2q6dc"]
[sub_resource type="SphereMesh" id="SphereMesh_w7c3h"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_w8frs"]
bounce = 0.5
[sub_resource type="SphereShape3D" id="SphereShape3D_mx8sn"]
[sub_resource type="BoxShape3D" id="BoxShape3D_2q6dc"]
size = Vector3(1080, 2, 1080)
[sub_resource type="BoxMesh" id="BoxMesh_w7c3h"]
size = Vector3(1080, 2, 1080)
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_fi66n"]
[sub_resource type="Sky" id="Sky_a4mo8"]
sky_material = SubResource("ProceduralSkyMaterial_fi66n")
[sub_resource type="Environment" id="Environment_a4mo8"]
background_mode = 2
sky = SubResource("Sky_a4mo8")
ambient_light_source = 3
[node name="Node3D" type="Node3D"]
script = ExtResource("1_a4mo8")
[node name="human" parent="." instance=ExtResource("1_eg4yq")]
[node name="RepoBot" parent="." instance=ExtResource("4_repo")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.9426608, 0, -4.4451966)
[node name="Thing" type="RigidBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -3.7986288)
physics_material_override = SubResource("PhysicsMaterial_2q6dc")
gravity_scale = 0.0
contact_monitor = true
max_contacts_reported = 5
[node name="CollisionShape3D" type="CollisionShape3D" parent="Thing"]
shape = SubResource("SphereShape3D_2q6dc")
debug_color = Color(0.29772994, 0.6216631, 0.28140613, 0.41960785)
[node name="MeshInstance3D" type="MeshInstance3D" parent="Thing"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
mesh = SubResource("SphereMesh_w7c3h")
[node name="Player" type="RigidBody3D" parent="."]
physics_material_override = SubResource("PhysicsMaterial_w8frs")
script = ExtResource("1_muv8p")
camera_path = NodePath("Camera3D")
phone_path = NodePath("../PhoneUI")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Player"]
shape = SubResource("SphereShape3D_mx8sn")
[node name="Camera3D" type="Camera3D" parent="Player"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.31670225, 0)
current = true
[node name="SpotLight3D" type="SpotLight3D" parent="Player"]
[node name="Ground" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
shape = SubResource("BoxShape3D_2q6dc")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground"]
mesh = SubResource("BoxMesh_w7c3h")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.5, 0.8660253, 0, -0.8660253, 0.5, 0, 34, 0)
shadow_enabled = true
[node name="Starter Blocks" type="Node3D" parent="."]
[node name="Block" parent="Starter Blocks" instance=ExtResource("2_tc7dm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.298158, -7.0724635)
[node name="Block2" parent="Starter Blocks" instance=ExtResource("2_tc7dm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.63255787, 2.596316, -6.980046)
[node name="Menu" type="CanvasLayer" parent="."]
process_mode = 3
visible = false
script = ExtResource("3_tc7dm")
[node name="PhoneUI" type="CanvasLayer" parent="."]
layer = 5
visible = false
[node name="Control" type="Control" parent="PhoneUI"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PhoneFrame" type="ColorRect" parent="PhoneUI/Control"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -180.0
offset_top = -320.0
offset_right = 180.0
offset_bottom = 320.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.08, 0.08, 0.1, 1)
[node name="Control" type="Control" parent="Menu"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
[node name="VBoxContainer" type="VBoxContainer" parent="Menu/Control"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -39.5
offset_top = -33.0
offset_right = 39.5
offset_bottom = 33.0
grow_horizontal = 2
grow_vertical = 2
[node name="ContinueButton" type="Button" parent="Menu/Control/VBoxContainer"]
layout_mode = 2
text = "Continue"
[node name="MainMenuButton" type="Button" parent="Menu/Control/VBoxContainer"]
layout_mode = 2
text = "Main Menu"
[node name="QuitButton" type="Button" parent="Menu/Control/VBoxContainer"]
layout_mode = 2
text = "Quit"
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_a4mo8")
[connection signal="pressed" from="Menu/Control/VBoxContainer/ContinueButton" to="Menu" method="_on_continue_button_pressed"]
[connection signal="pressed" from="Menu/Control/VBoxContainer/MainMenuButton" to="Menu" method="_on_main_menu_button_pressed"]
[connection signal="pressed" from="Menu/Control/VBoxContainer/QuitButton" to="Menu" method="_on_quit_button_pressed"]
+51 -51
View File
@@ -1,51 +1,51 @@
extends CanvasLayer
const START_SCREEN_SCENE := "res://scenes/UI/start_screen.tscn"
@onready var pause_menu = $Control
func _ready() -> void:
_register_focus_sounds()
func _input(event):
if event.is_action_pressed("ui_cancel"):
if get_tree().paused:
resume_game()
else:
pause_game()
func pause_game():
get_tree().paused = true
visible = true
func resume_game():
get_tree().paused = false
visible = false
func _on_quit_button_pressed():
get_tree().quit()
func _on_continue_button_pressed():
resume_game()
func _on_main_menu_button_pressed():
resume_game()
get_tree().change_scene_to_file(START_SCREEN_SCENE)
func _register_focus_sounds() -> void:
if pause_menu == null:
return
var vbox := pause_menu.get_node_or_null("VBoxContainer")
if vbox == null:
return
for child in vbox.get_children():
if child is BaseButton:
var button: BaseButton = child
if not button.is_connected("focus_entered", Callable(self, "_on_menu_item_focus")):
button.focus_entered.connect(_on_menu_item_focus)
if not button.is_connected("mouse_entered", Callable(self, "_on_menu_item_focus")):
button.mouse_entered.connect(_on_menu_item_focus)
func _on_menu_item_focus() -> void:
if MenuSfx:
MenuSfx.play_hover()
extends CanvasLayer
const START_SCREEN_SCENE := "res://scenes/UI/start_screen.tscn"
@onready var pause_menu = $Control
func _ready() -> void:
_register_focus_sounds()
func _input(event):
if event.is_action_pressed("ui_cancel"):
if get_tree().paused:
resume_game()
else:
pause_game()
func pause_game():
get_tree().paused = true
visible = true
func resume_game():
get_tree().paused = false
visible = false
func _on_quit_button_pressed():
get_tree().quit()
func _on_continue_button_pressed():
resume_game()
func _on_main_menu_button_pressed():
resume_game()
get_tree().change_scene_to_file(START_SCREEN_SCENE)
func _register_focus_sounds() -> void:
if pause_menu == null:
return
var vbox := pause_menu.get_node_or_null("VBoxContainer")
if vbox == null:
return
for child in vbox.get_children():
if child is BaseButton:
var button: BaseButton = child
if not button.is_connected("focus_entered", Callable(self, "_on_menu_item_focus")):
button.focus_entered.connect(_on_menu_item_focus)
if not button.is_connected("mouse_entered", Callable(self, "_on_menu_item_focus")):
button.mouse_entered.connect(_on_menu_item_focus)
func _on_menu_item_focus() -> void:
if MenuSfx:
MenuSfx.play_hover()
+1 -1
View File
@@ -1 +1 @@
uid://b7fopt7sx74g8
uid://b7fopt7sx74g8