```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(space): 添加天气变化调试日志并优化地图节点配置

- 在天气变化时添加调试打印语句,便于追踪空间天气变化情况
- 重构地图节点模型,将NodeID重命名为TriggerID以更好地表达其用途
- 添加触发器ID字段用于区分精灵和NPC,支持高ID控制NPC逻辑
- 更新注释说明剧情相关配置的重构计划,通过NPC节点判断类型
- 调整地图怪信息结构体初始化逻辑,直接使用TriggerID作为ID
```
This commit is contained in:
昔念
2026-02-25 22:47:16 +08:00
parent a3244549f3
commit f7e5880092
2 changed files with 7 additions and 6 deletions

View File

@@ -25,8 +25,9 @@ type MapNode struct {
*Event // 嵌入BOSS事件配置
// 基础关联字段
MapID int32 `gorm:"not null;index;comment:'所属地图ID'" json:"map_id" description:"地图ID"`
NodeID uint32 `gorm:"not null;default:0;comment:'节点ID'" json:"node_id" description:"节点ID"`
//可以是精灵也可以是NPC ,到时候npc用高ID去控制就行
TriggerID uint32 `gorm:"comment:'触发器ID'" json:"trigger_id" description:"触发器ID"`
NodeID uint32 `gorm:"not null;default:0;comment:'节点ID'" json:"node_id" description:"节点ID"`
NodeName string `gorm:"type:varchar(100);default:'';comment:'节点名称'" json:"node_name" description:"节点名称"`
//节点激活脚本
@@ -38,7 +39,7 @@ type MapNode struct {
FailBonusID int `gorm:"type:int;default:0;comment:'失败奖励ID'" json:"fail_bonus_id"`
//是否需要广播,比如雷伊
IsBroadcast int `gorm:"type:int;default:0;comment:'是否需要广播'" json:"is_broadcast"`
// 剧情相关配置
// 剧情相关配置 通过剧情去主动触发boss显示和对话显示 ,待重构通过NPC节点判断哪种类型
TriggerPlotID uint32 `gorm:"default:0;comment:'触发剧情ID0表示无剧情'" json:"trigger_plot_id" description:"触发剧情ID"`
//BindPlotIDs []uint32 `gorm:"type:int[];comment:'绑定的剧情ID列表'" json:"bind_plot_ids" description:"绑定剧情ID列表"`
//完成后的脚本回调比如战胜和击败绑定不同的任务ID以及剧情绑定不同的ID