Add radial command menu for minions
Deploy Promiscuity Auth API / deploy (push) Successful in 51s
Deploy Promiscuity Character API / deploy (push) Successful in 49s
Deploy Promiscuity Crafting API / deploy (push) Successful in 47s
Deploy Promiscuity Inventory API / deploy (push) Successful in 48s
Deploy Promiscuity Locations API / deploy (push) Successful in 47s
Deploy Promiscuity Mail API / deploy (push) Successful in 49s
Deploy Promiscuity World API / deploy (push) Successful in 48s
k8s smoke test / test (push) Successful in 9s

This commit is contained in:
2026-05-01 12:24:54 -05:00
parent 42750356b5
commit 98220921bd
12 changed files with 449 additions and 294 deletions
+62 -62
View File
@@ -3,72 +3,72 @@ extends Control
const AUTH_LOGOUT_URL := "https://pauth.ranaze.com/api/Auth/logout"
const START_LEVEL_SCENE := "res://scenes/Levels/starting_area_level.tscn"
const PLAYGROUND_SCENE := "res://scenes/Levels/level.tscn"
@onready var _login_button: Button = $MarginContainer/CenterContainer/ContentVBox/VBoxContainer/LogInButton
@onready var _logout_request: HTTPRequest = %LogoutRequest
func _ready():
_register_focus_sounds()
_update_login_button()
func _register_focus_sounds() -> void:
var button_container := $MarginContainer/CenterContainer/ContentVBox/VBoxContainer
for child in button_container.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)
@onready var _login_button: Button = $MarginContainer/CenterContainer/ContentVBox/VBoxContainer/LogInButton
@onready var _logout_request: HTTPRequest = %LogoutRequest
func _ready():
_register_focus_sounds()
_update_login_button()
func _register_focus_sounds() -> void:
var button_container := $MarginContainer/CenterContainer/ContentVBox/VBoxContainer
for child in button_container.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_start_button_pressed():
get_tree().change_scene_to_file(START_LEVEL_SCENE)
func _on_playground_button_pressed() -> void:
get_tree().change_scene_to_file(PLAYGROUND_SCENE)
func _on_settings_button_pressed():
get_tree().change_scene_to_file("uid://d3tqrm4ry4l88")
func _on_quit_button_pressed():
get_tree().quit()
func _on_log_in_button_pressed():
if AuthState.is_logged_in:
_request_logout()
else:
get_tree().change_scene_to_file("res://scenes/UI/login_screen.tscn")
func _on_menu_item_focus() -> void:
if MenuSfx:
MenuSfx.play_hover()
func _request_logout() -> void:
if AuthState.access_token.is_empty():
AuthState.clear_session()
_update_login_button()
return
var headers := PackedStringArray([
"Authorization: Bearer %s" % AuthState.access_token,
])
var err := _logout_request.request(AUTH_LOGOUT_URL, headers, HTTPClient.METHOD_POST)
if err != OK:
push_warning("Failed to send logout request: %s" % err)
AuthState.clear_session()
_update_login_button()
func _on_logout_request_completed(result: int, response_code: int, _headers: PackedStringArray, body: PackedByteArray) -> void:
var body_text := body.get_string_from_utf8()
if result != HTTPRequest.RESULT_SUCCESS or response_code < 200 or response_code >= 300:
push_warning("Logout failed (%s/%s): %s" % [result, response_code, body_text])
AuthState.clear_session()
_update_login_button()
func _update_login_button() -> void:
if AuthState.is_logged_in:
_login_button.text = "LOG OUT"
else:
_login_button.text = "LOG IN"
func _on_settings_button_pressed():
get_tree().change_scene_to_file("uid://d3tqrm4ry4l88")
func _on_quit_button_pressed():
get_tree().quit()
func _on_log_in_button_pressed():
if AuthState.is_logged_in:
_request_logout()
else:
get_tree().change_scene_to_file("res://scenes/UI/login_screen.tscn")
func _on_menu_item_focus() -> void:
if MenuSfx:
MenuSfx.play_hover()
func _request_logout() -> void:
if AuthState.access_token.is_empty():
AuthState.clear_session()
_update_login_button()
return
var headers := PackedStringArray([
"Authorization: Bearer %s" % AuthState.access_token,
])
var err := _logout_request.request(AUTH_LOGOUT_URL, headers, HTTPClient.METHOD_POST)
if err != OK:
push_warning("Failed to send logout request: %s" % err)
AuthState.clear_session()
_update_login_button()
func _on_logout_request_completed(result: int, response_code: int, _headers: PackedStringArray, body: PackedByteArray) -> void:
var body_text := body.get_string_from_utf8()
if result != HTTPRequest.RESULT_SUCCESS or response_code < 200 or response_code >= 300:
push_warning("Logout failed (%s/%s): %s" % [result, response_code, body_text])
AuthState.clear_session()
_update_login_button()
func _update_login_button() -> void:
if AuthState.is_logged_in:
_login_button.text = "LOG OUT"
else:
_login_button.text = "LOG IN"
func _on_secret_button_pressed():
get_tree().change_scene_to_file("uid://q4abhlwqdvay")
+92 -92
View File
@@ -1,74 +1,74 @@
[gd_scene load_steps=5 format=3 uid="uid://b4k81taauef4q"]
[ext_resource type="Script" uid="uid://cc8lskf7y74kh" path="res://scenes/UI/start_screen.gd" id="1_o7i0r"]
[ext_resource type="Theme" uid="uid://wpxmub0n2dr3" path="res://themes/button_theme.tres" id="1_tx5wa"]
[ext_resource type="Texture2D" uid="uid://dhuosr0p605gj" path="res://assets/images/pp_start_bg.png" id="2_r2jwc"]
[ext_resource type="Theme" uid="uid://tn8qndst18d6" path="res://themes/title_font_theme.tres" id="4_hm208"]
[node name="StartScreen" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_o7i0r")
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_r2jwc")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="CenterContainer" type="CenterContainer" parent="MarginContainer"]
layout_mode = 2
[node name="ContentVBox" type="VBoxContainer" parent="MarginContainer/CenterContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
theme_override_constants/separation = 10
[node name="Label" type="Label" parent="MarginContainer/CenterContainer/ContentVBox"]
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("4_hm208")
text = "PROJECT
PROMISCUOUS"
horizontal_alignment = 1
[node name="TitleSpacer" type="Control" parent="MarginContainer/CenterContainer/ContentVBox"]
custom_minimum_size = Vector2(0, 40)
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer/ContentVBox"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
theme_override_constants/separation = 6
[node name="LogInButton" type="Button" parent="MarginContainer/CenterContainer/ContentVBox/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme = ExtResource("1_tx5wa")
text = "LOG IN"
[gd_scene load_steps=5 format=3 uid="uid://b4k81taauef4q"]
[ext_resource type="Script" uid="uid://cc8lskf7y74kh" path="res://scenes/UI/start_screen.gd" id="1_o7i0r"]
[ext_resource type="Theme" uid="uid://wpxmub0n2dr3" path="res://themes/button_theme.tres" id="1_tx5wa"]
[ext_resource type="Texture2D" uid="uid://dhuosr0p605gj" path="res://assets/images/pp_start_bg.png" id="2_r2jwc"]
[ext_resource type="Theme" uid="uid://tn8qndst18d6" path="res://themes/title_font_theme.tres" id="4_hm208"]
[node name="StartScreen" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_o7i0r")
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_r2jwc")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="CenterContainer" type="CenterContainer" parent="MarginContainer"]
layout_mode = 2
[node name="ContentVBox" type="VBoxContainer" parent="MarginContainer/CenterContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
theme_override_constants/separation = 10
[node name="Label" type="Label" parent="MarginContainer/CenterContainer/ContentVBox"]
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("4_hm208")
text = "PROJECT
PROMISCUOUS"
horizontal_alignment = 1
[node name="TitleSpacer" type="Control" parent="MarginContainer/CenterContainer/ContentVBox"]
custom_minimum_size = Vector2(0, 40)
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer/ContentVBox"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
theme_override_constants/separation = 6
[node name="LogInButton" type="Button" parent="MarginContainer/CenterContainer/ContentVBox/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme = ExtResource("1_tx5wa")
text = "LOG IN"
[node name="StartButton" type="Button" parent="MarginContainer/CenterContainer/ContentVBox/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
@@ -89,29 +89,29 @@ size_flags_horizontal = 4
size_flags_vertical = 4
theme = ExtResource("1_tx5wa")
text = "SETTINGS"
[node name="QuitButton" type="Button" parent="MarginContainer/CenterContainer/ContentVBox/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme = ExtResource("1_tx5wa")
text = "QUIT"
[node name="SecretButton" type="Button" parent="."]
show_behind_parent = true
layout_mode = 0
offset_left = 840.0
offset_top = 142.0
offset_right = 856.0
offset_bottom = 159.0
[node name="LogoutRequest" type="HTTPRequest" parent="."]
unique_name_in_owner = true
[node name="QuitButton" type="Button" parent="MarginContainer/CenterContainer/ContentVBox/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme = ExtResource("1_tx5wa")
text = "QUIT"
[node name="SecretButton" type="Button" parent="."]
show_behind_parent = true
layout_mode = 0
offset_left = 840.0
offset_top = 142.0
offset_right = 856.0
offset_bottom = 159.0
[node name="LogoutRequest" type="HTTPRequest" parent="."]
unique_name_in_owner = true
[connection signal="pressed" from="MarginContainer/CenterContainer/ContentVBox/VBoxContainer/LogInButton" to="." method="_on_log_in_button_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/ContentVBox/VBoxContainer/StartButton" to="." method="_on_start_button_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/ContentVBox/VBoxContainer/PlaygroundButton" to="." method="_on_playground_button_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/ContentVBox/VBoxContainer/SettingsButton" to="." method="_on_settings_button_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/ContentVBox/VBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]
[connection signal="pressed" from="SecretButton" to="." method="_on_secret_button_pressed"]
[connection signal="request_completed" from="LogoutRequest" to="." method="_on_logout_request_completed"]
[connection signal="pressed" from="SecretButton" to="." method="_on_secret_button_pressed"]
[connection signal="request_completed" from="LogoutRequest" to="." method="_on_logout_request_completed"]