demo 0.2.3.1 打印全局核心状态信息;部分演出流程微调

This commit is contained in:
cakipaul 2025-07-05 16:40:30 +08:00
parent 3834cf4a8a
commit 9c14e6b516
7 changed files with 46 additions and 27 deletions

View File

@ -174,7 +174,8 @@ c02_一楼疯子互动后,这人有点不正常...最好离他远点。,,,,,
c02_一楼粘鼠板,这里原来放着什么?,,,,,
c02_一楼死老鼠,老鼠被粘住死掉了。,,,,,
c02_获得木头人偶,怎么回事...头...好痛,,,,,
c02_获得小猫玩具,我的头,又开始痛了,,,,,
c02_获得小猫玩具,小猫玩具亮起来了,这光...竟有一丝暖意,,,,,
c02_获得小猫头痛,我的头,又开始痛了,,,,,
c02_小蝉头套文字,吕萍阿姨,我不想死,求你...帮帮我,,,,,
c02_互动小蝉头套,<br>上面怎么有我的名字?!,,,,,
c02_敲门_肉掉落,楼道有东西掉下来了?,,,,,

1 keys zh_CN _character _notes _tags zh_SH en
174 c02_一楼粘鼠板 这里原来放着什么?
175 c02_一楼死老鼠 老鼠被粘住死掉了。
176 c02_获得木头人偶 怎么回事...头...好痛
177 c02_获得小猫玩具 我的头,又开始痛了 小猫玩具亮起来了,这光...竟有一丝暖意
178 c02_获得小猫头痛 我的头,又开始痛了
179 c02_小蝉头套文字 吕萍阿姨,我不想死,求你...帮帮我
180 c02_互动小蝉头套 !!!<br>上面怎么有我的名字?!
181 c02_敲门_肉掉落 楼道有东西掉下来了?

View File

@ -232,7 +232,8 @@
老鼠被粘住死掉了。 [ID:c02_一楼死老鼠]
怎么回事...头...好痛 [ID:c02_获得木头人偶]
#空房间
我的头,又开始痛了 [ID:c02_获得小猫玩具]
小猫玩具亮起来了,这光...竟有一丝暖意[ID:c02_获得小猫玩具]
我的头,又开始痛了 [ID:c02_获得小猫头痛]
吕萍阿姨,我不想死,求你...帮帮我 [ID:c02_小蝉头套文字]
<br>上面怎么有我的名字?![ID:c02_互动小蝉头套]
#敲门_老鼠叼肉

View File

@ -7,6 +7,7 @@ var archive: AssembledArchive:
set(val):
archive = val
if archive:
GlobalConfigManager.print_global_info()
print("use archive ", archive.resource_path)
# current archive

View File

@ -8,7 +8,7 @@ var timer = Timer.new()
func _ready() -> void:
timer.wait_time = 5
timer.wait_time = 5.0
timer.one_shot = false
timer.timeout.connect(_on_timer_timeout)
add_child(timer)
@ -19,6 +19,7 @@ func _set_config(val: GlobalConfig) -> void:
config = val
if Engine.is_editor_hint():
return
# debug)
if config.debug_mode:
GlobalConfig.DEBUG = true
print_rich("[color=orange]Debug mode enabled[/color]")
@ -66,31 +67,35 @@ var _on_timer_timeout_counter := 0
func _on_timer_timeout():
var archive = ArchiveManager.archive
var archive := ArchiveManager.archive
if archive and config:
archive.game_seconds += 5
config.game_total_seconds += 5
# 30s 打印一次
if _on_timer_timeout_counter % 6 == 0:
var time = get_concise_timemark(archive)
prints("[timemark]", Time.get_datetime_string_from_system(), time)
_on_timer_timeout_counter += 1
# 30s 打印一次,无需首次打印
# ArchiveManager 设置 archive 时会调用 print_global_info
if _on_timer_timeout_counter % 6 == 0:
print_global_info()
# for log use
func get_concise_timemark(archive) -> String:
var hour = archive.game_seconds / 3600 as int
var minute = (archive.game_seconds % 3600) / 60 as int
var second = archive.game_seconds % 60
return (
"r"
+ str(config.game_rounds)
+ "_c"
+ str(archive.current_chapter)
+ " "
+ str(hour)
+ ":"
+ str(minute)
+ ":"
+ str(second)
func print_global_info():
var archive := ArchiveManager.archive
if not archive or not config:
return
var hour := archive.game_seconds / 3600
var minute := (archive.game_seconds % 3600) / 60
var second := archive.game_seconds % 60
var round_info = "r" + str(config.game_rounds) + "_c" + str(archive.current_chapter)
var game_time_info = "game:" + str(hour) + ":" + str(minute) + ":" + str(second)
# get ticks since game app run
var ticks = Time.get_ticks_msec()
hour = ticks / 3600000
minute = (ticks % 3600000) / 60000
second = (ticks % 60000) / 1000
var msec = ticks % 1000
var tick_time_info = (
"tick:" + str(hour) + ":" + str(minute) + ":" + str(second) + "." + str(msec)
)
var time_info = game_time_info + " " + tick_time_info
var scene_info = archive.current_scene
prints("[timemark]", Time.get_datetime_string_from_system(), round_info, scene_info, time_info)

View File

@ -267,7 +267,7 @@ func _post_transition():
ResourceLoader.load_threaded_request(GROUND_SCENE_PATH_DICT[scene_name])
if GlobalConfig.DEBUG:
print("preload neighbor scenes:", scene_names)
GlobalConfigManager.print_global_info()
var update_watcher: Timer
var last_modify_time = 0

View File

@ -219,11 +219,12 @@ func _on_pick_catty_head() -> void:
sprite.visible = false
SceneManager.enable_prop_item("prop_小猫玩具完整")
await SceneManager.get_inspector().quit_and_hidden
await SceneManager.pop_os_with_str("c02_获得小猫玩具")
$"Sfx头痛耳鸣".play()
$"../DizzyShader".dizzy()
SceneManager.player_action(17, true)
await SceneManager.get_player().animation_finished
SceneManager.pop_os_with_str("c02_获得小猫玩具")
SceneManager.pop_os_with_str("c02_获得小猫头痛")
SceneManager.unlock_player()
# 进过瞎子卧室后,通道关闭
if not ArchiveManager.get_global_value(&"c02_entered_the_splitted_space"):

View File

@ -91,8 +91,15 @@ data = {
debug_global_data = Dictionary[String, Variant]({
"c02_counter_pushed_out": false,
"c02_counter_x": -1.0,
"c02_entered_the_splitted_space": false,
"c02_the_blind_room_unlocked": false,
"enabled_items": ["prop_火柴", "prop_无头小猫玩具", "prop_木头人偶", "prop_麻将", "prop_锡箔元宝", "prop_奇怪的肉"],
"enabled_items": {
"prop_小猫玩具的脑袋": true,
"prop_小蝉人偶": true,
"prop_无头小猫玩具": true,
"prop_木头人偶": true,
"prop_火柴": true
},
"handnote_c02_xchan_giveHerPuppet": 0,
"handnote_c02_xchan_sheKnowsMe": 0,
"handnote_chapter_stage": 2,
@ -118,6 +125,9 @@ debug_ground_data = Dictionary[String, Variant]({
"Pickable小猫玩具脑袋": {
"picked": false
},
"Pickable小蝉人偶": {
"picked": false
},
"Pickable木头人偶": {
"picked": false
},