Sound FX, major work on set schedule, and some new concepts for items and portraits

This commit is contained in:
2025-09-11 08:10:07 -04:00
parent ef9e5c2664
commit d64859cf35
106 changed files with 2226 additions and 221 deletions

View File

@@ -5,11 +5,11 @@ var panel : GamePanel = null
var player_profile : Window = null
var quest_log : QuestLog = null
var top_menu : TopMenu = null
var open : bool = true
var open : bool = false
var end_shift_confirmation : ConfirmationDialog
var end_shift_confirm_template = preload("res://templates/end_shift_confirmation.tscn")
var player_profile_template = preload("res://templates/player_profile_window.tscn")
var last_screenshot : Image
func _ready() -> void:
DisplayServer.register_additional_output(self)
end_shift_confirmation = end_shift_confirm_template.instantiate()
@@ -44,6 +44,7 @@ func toggle_player_profile():
func end_shift() -> void:
take_screenshot()
open = false
if player_profile != null:
toggle_player_profile()
@@ -73,11 +74,15 @@ func notice(msg : String, time : float = 1) -> void:
func calculate_kill_exp(killer : QuestSprite, killed : QuestSprite) -> int:
return clamp(1, (killed.level - killer.level) * 5, 100)
func take_screenshot() -> void:
last_screenshot = get_viewport().get_texture().get_image()
func test_save() -> void:
var image : Image = get_viewport().get_texture().get_image()
if open:
take_screenshot()
var save_dict = {
"savetime": Time.get_datetime_string_from_system(),
"screenshot": image.save_png_to_buffer().hex_encode()
"screenshot": last_screenshot
}
#Save the guild data
save_dict["guildname"] = Guild.name
@@ -122,4 +127,9 @@ func test_load(filename : String) -> void:
if not parse_result == OK:
printerr("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line())
return
func switch_scenes(scene_name : String) -> void:
get_tree().change_scene_to_file("res://scenes/" + scene_name + ".tscn")
func switch_dialogue(timeline_name : String, label : String) -> void:
Dialogic.start("res://dialogic/timelines/" + timeline_name + ".dtl", label)