fixed a crash when exiting pipes, and restored the LL font cause apparently i accidentily deleted it last commit, whoops, also wrote a quick optimization into the font updater to speed up load times

This commit is contained in:
JoeMama
2025-10-17 09:48:04 +01:00
parent 77b91b3840
commit 80faeadafc
8 changed files with 402 additions and 5 deletions

View File

@@ -159,6 +159,7 @@ func get_resource(json_file: JSON) -> Resource:
ResourceMode.FONT:
resource = FontFile.new()
resource.load_bitmap_font(source_resource_path)
resource.set_meta("base_path", source_resource_path)
if cache.has(json_file.resource_path) == false and use_cache and not is_random:
cache[json_file.resource_path] = resource
return resource

View File

@@ -67,6 +67,7 @@ func exit_pipe() -> void:
can_enter = false
pipe_exited.emit()
for i in get_tree().get_nodes_in_group("Players"):
await i.ready
i.go_to_exit_pipe(self)
for i in get_tree().get_nodes_in_group("Players"):
await get_tree().create_timer(0.5, false).timeout

View File

@@ -299,5 +299,5 @@ func get_animation_name() -> String:
return "Fall"
func exit() -> void:
player.on_hammer_timeout()
player.skidding = false
owner.on_hammer_timeout()
owner.skidding = false

View File

@@ -1,8 +1,8 @@
class_name FontUpdater
extends Node
var main_font: Resource = null
var score_font: Resource = null
var main_font: FontFile = null
var score_font: FontFile = null
var ga_font: Resource = null
var jp_font: Resource = null
@@ -17,5 +17,7 @@ func _ready() -> void:
Global.level_theme_changed.connect(update_fonts)
func update_fonts() -> void:
FONT_MAIN.base_font = main_font
if FONT_MAIN.base_font.get_meta("base_path", "") != main_font.get_meta("base_path", "null"):
print([FONT_MAIN.base_font.get_meta("base_path"), main_font.get_meta("base_path")])
FONT_MAIN.base_font = main_font
SCORE_FONT.base_font = score_font