demo 0.2.3.1 打印全局核心状态信息;部分演出流程微调
This commit is contained in:
parent
3834cf4a8a
commit
9c14e6b516
@ -174,7 +174,8 @@ c02_一楼疯子互动后,这人有点不正常...最好离他远点。,,,,,
|
|||||||
c02_一楼粘鼠板,这里原来放着什么?,,,,,
|
c02_一楼粘鼠板,这里原来放着什么?,,,,,
|
||||||
c02_一楼死老鼠,老鼠被粘住死掉了。,,,,,
|
c02_一楼死老鼠,老鼠被粘住死掉了。,,,,,
|
||||||
c02_获得木头人偶,怎么回事...头...好痛,,,,,
|
c02_获得木头人偶,怎么回事...头...好痛,,,,,
|
||||||
c02_获得小猫玩具,我的头,又开始痛了,,,,,
|
c02_获得小猫玩具,小猫玩具亮起来了,这光...竟有一丝暖意,,,,,
|
||||||
|
c02_获得小猫头痛,我的头,又开始痛了,,,,,
|
||||||
c02_小蝉头套文字,吕萍阿姨,我不想死,求你...帮帮我,,,,,
|
c02_小蝉头套文字,吕萍阿姨,我不想死,求你...帮帮我,,,,,
|
||||||
c02_互动小蝉头套,!!!<br>上面怎么有我的名字?!,,,,,
|
c02_互动小蝉头套,!!!<br>上面怎么有我的名字?!,,,,,
|
||||||
c02_敲门_肉掉落,楼道有东西掉下来了?,,,,,
|
c02_敲门_肉掉落,楼道有东西掉下来了?,,,,,
|
||||||
|
|
@ -232,7 +232,8 @@
|
|||||||
老鼠被粘住死掉了。 [ID:c02_一楼死老鼠]
|
老鼠被粘住死掉了。 [ID:c02_一楼死老鼠]
|
||||||
怎么回事...头...好痛 [ID:c02_获得木头人偶]
|
怎么回事...头...好痛 [ID:c02_获得木头人偶]
|
||||||
#空房间
|
#空房间
|
||||||
我的头,又开始痛了 [ID:c02_获得小猫玩具]
|
小猫玩具亮起来了,这光...竟有一丝暖意[ID:c02_获得小猫玩具]
|
||||||
|
我的头,又开始痛了 [ID:c02_获得小猫头痛]
|
||||||
吕萍阿姨,我不想死,求你...帮帮我 [ID:c02_小蝉头套文字]
|
吕萍阿姨,我不想死,求你...帮帮我 [ID:c02_小蝉头套文字]
|
||||||
!!!<br>上面怎么有我的名字?![ID:c02_互动小蝉头套]
|
!!!<br>上面怎么有我的名字?![ID:c02_互动小蝉头套]
|
||||||
#敲门_老鼠叼肉
|
#敲门_老鼠叼肉
|
||||||
|
@ -7,6 +7,7 @@ var archive: AssembledArchive:
|
|||||||
set(val):
|
set(val):
|
||||||
archive = val
|
archive = val
|
||||||
if archive:
|
if archive:
|
||||||
|
GlobalConfigManager.print_global_info()
|
||||||
print("use archive ", archive.resource_path)
|
print("use archive ", archive.resource_path)
|
||||||
|
|
||||||
# current archive
|
# current archive
|
||||||
|
@ -8,7 +8,7 @@ var timer = Timer.new()
|
|||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
timer.wait_time = 5
|
timer.wait_time = 5.0
|
||||||
timer.one_shot = false
|
timer.one_shot = false
|
||||||
timer.timeout.connect(_on_timer_timeout)
|
timer.timeout.connect(_on_timer_timeout)
|
||||||
add_child(timer)
|
add_child(timer)
|
||||||
@ -19,6 +19,7 @@ func _set_config(val: GlobalConfig) -> void:
|
|||||||
config = val
|
config = val
|
||||||
if Engine.is_editor_hint():
|
if Engine.is_editor_hint():
|
||||||
return
|
return
|
||||||
|
# debug)
|
||||||
if config.debug_mode:
|
if config.debug_mode:
|
||||||
GlobalConfig.DEBUG = true
|
GlobalConfig.DEBUG = true
|
||||||
print_rich("[color=orange]Debug mode enabled[/color]")
|
print_rich("[color=orange]Debug mode enabled[/color]")
|
||||||
@ -66,31 +67,35 @@ var _on_timer_timeout_counter := 0
|
|||||||
|
|
||||||
|
|
||||||
func _on_timer_timeout():
|
func _on_timer_timeout():
|
||||||
var archive = ArchiveManager.archive
|
var archive := ArchiveManager.archive
|
||||||
if archive and config:
|
if archive and config:
|
||||||
archive.game_seconds += 5
|
archive.game_seconds += 5
|
||||||
config.game_total_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
|
_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 print_global_info():
|
||||||
func get_concise_timemark(archive) -> String:
|
var archive := ArchiveManager.archive
|
||||||
var hour = archive.game_seconds / 3600 as int
|
if not archive or not config:
|
||||||
var minute = (archive.game_seconds % 3600) / 60 as int
|
return
|
||||||
var second = archive.game_seconds % 60
|
var hour := archive.game_seconds / 3600
|
||||||
return (
|
var minute := (archive.game_seconds % 3600) / 60
|
||||||
"r"
|
var second := archive.game_seconds % 60
|
||||||
+ str(config.game_rounds)
|
var round_info = "r" + str(config.game_rounds) + "_c" + str(archive.current_chapter)
|
||||||
+ "_c"
|
var game_time_info = "game:" + str(hour) + ":" + str(minute) + ":" + str(second)
|
||||||
+ str(archive.current_chapter)
|
# get ticks since game app run
|
||||||
+ " "
|
var ticks = Time.get_ticks_msec()
|
||||||
+ str(hour)
|
hour = ticks / 3600000
|
||||||
+ ":"
|
minute = (ticks % 3600000) / 60000
|
||||||
+ str(minute)
|
second = (ticks % 60000) / 1000
|
||||||
+ ":"
|
var msec = ticks % 1000
|
||||||
+ str(second)
|
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)
|
||||||
|
@ -267,7 +267,7 @@ func _post_transition():
|
|||||||
ResourceLoader.load_threaded_request(GROUND_SCENE_PATH_DICT[scene_name])
|
ResourceLoader.load_threaded_request(GROUND_SCENE_PATH_DICT[scene_name])
|
||||||
if GlobalConfig.DEBUG:
|
if GlobalConfig.DEBUG:
|
||||||
print("preload neighbor scenes:", scene_names)
|
print("preload neighbor scenes:", scene_names)
|
||||||
|
GlobalConfigManager.print_global_info()
|
||||||
|
|
||||||
var update_watcher: Timer
|
var update_watcher: Timer
|
||||||
var last_modify_time = 0
|
var last_modify_time = 0
|
||||||
|
@ -219,11 +219,12 @@ func _on_pick_catty_head() -> void:
|
|||||||
sprite.visible = false
|
sprite.visible = false
|
||||||
SceneManager.enable_prop_item("prop_小猫玩具完整")
|
SceneManager.enable_prop_item("prop_小猫玩具完整")
|
||||||
await SceneManager.get_inspector().quit_and_hidden
|
await SceneManager.get_inspector().quit_and_hidden
|
||||||
|
await SceneManager.pop_os_with_str("c02_获得小猫玩具")
|
||||||
$"Sfx头痛耳鸣".play()
|
$"Sfx头痛耳鸣".play()
|
||||||
$"../DizzyShader".dizzy()
|
$"../DizzyShader".dizzy()
|
||||||
SceneManager.player_action(17, true)
|
SceneManager.player_action(17, true)
|
||||||
await SceneManager.get_player().animation_finished
|
await SceneManager.get_player().animation_finished
|
||||||
SceneManager.pop_os_with_str("c02_获得小猫玩具")
|
SceneManager.pop_os_with_str("c02_获得小猫头痛")
|
||||||
SceneManager.unlock_player()
|
SceneManager.unlock_player()
|
||||||
# 进过瞎子卧室后,通道关闭
|
# 进过瞎子卧室后,通道关闭
|
||||||
if not ArchiveManager.get_global_value(&"c02_entered_the_splitted_space"):
|
if not ArchiveManager.get_global_value(&"c02_entered_the_splitted_space"):
|
||||||
|
@ -91,8 +91,15 @@ data = {
|
|||||||
debug_global_data = Dictionary[String, Variant]({
|
debug_global_data = Dictionary[String, Variant]({
|
||||||
"c02_counter_pushed_out": false,
|
"c02_counter_pushed_out": false,
|
||||||
"c02_counter_x": -1.0,
|
"c02_counter_x": -1.0,
|
||||||
|
"c02_entered_the_splitted_space": false,
|
||||||
"c02_the_blind_room_unlocked": 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_giveHerPuppet": 0,
|
||||||
"handnote_c02_xchan_sheKnowsMe": 0,
|
"handnote_c02_xchan_sheKnowsMe": 0,
|
||||||
"handnote_chapter_stage": 2,
|
"handnote_chapter_stage": 2,
|
||||||
@ -118,6 +125,9 @@ debug_ground_data = Dictionary[String, Variant]({
|
|||||||
"Pickable小猫玩具脑袋": {
|
"Pickable小猫玩具脑袋": {
|
||||||
"picked": false
|
"picked": false
|
||||||
},
|
},
|
||||||
|
"Pickable小蝉人偶": {
|
||||||
|
"picked": false
|
||||||
|
},
|
||||||
"Pickable木头人偶": {
|
"Pickable木头人偶": {
|
||||||
"picked": false
|
"picked": false
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user