create: 自研模组源码放在 SonsOfTheForestMod,已加入 GameClock

MemRelay-Operation: memory-save:sotf-gameclock-src-20261018-0018
MemRelay-Resource: 7bb50964-0d40-40b5-87e9-dabf9d1e0136
This commit is contained in:
2026-10-18 00:18:39 +08:00
parent 281887a1a4
commit bf6fe60d2d
@@ -0,0 +1,25 @@
---
title: 自研模组源码放在 SonsOfTheForestMod,已加入 GameClock
type: decision
permalink: main/projects/4eb30bec-355e-49d6-909c-e7868faef4f7/自研模组源码放在-sons-of-the-forest-mod-已加入-game-clock
stable_id: 7bb50964-0d40-40b5-87e9-dabf9d1e0136
scope: project
memory_type: decision
project_id: 4eb30bec-355e-49d6-909c-e7868faef4f7
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: sotf-gameclock-src-20261018-0018
created_at: '2026-10-17T16:18:35.780457+00:00'
updated_at: '2026-10-17T16:18:35.780457+00:00'
tags:
- sotf
- gameclock
- source
---
模组源代码目录是 D:\Game\SonsOfTheForestMod。用户明确要求把自研模组源码放在这里,不放在下载目录的安装包里。
已完成 GameClock 1.0.0:源码在 D:\Game\SonsOfTheForestMod\GameClock,编译目标 net6.0,输出安装到 D:\Game\Sons.Of.The.Forest.v53951\Mods\GameClock(GameClock.dll 与 manifest.json,SHA256 已与编译产物核对)。
作用:进入存档后在画面右下角显示游戏内时间 HH:mm。白天显示距离天黑,夜晚显示距离天亮。天黑判定用 Sons.Environment.TimeOfDay.IsNight,从当前时间二分查找下一次昼夜切换。暂停菜单 MODS 里的「游戏时间 / 显示时间」可以关掉。读取接口是 TimeOfDayHolder.GetTimeOfDay()。未在游戏画面里实测。改完源码后在该项目执行 dotnet build -c Release,会自动复制进游戏,需要重启游戏才生效。