Commit Graph

85 Commits

Author SHA1 Message Date
8e88fc42e9 fix: Round 55 递归硬中止、存档加载缓存刷新、好感度空值防护、选项穿透延迟、分支对话去重
- QuestSO.HasPrerequisiteCycle/HasBranchCycle: depth>32 改为 LogError+return true 硬中止,防止栈溢出
- DialogueSequenceSO.HasChoiceCycle: 新增 depth 参数及 >32 硬中止,同时更新递归调用传 depth+1
- IQuestEventSource: 新增 OnAfterSaveLoaded 事件接口,供存档加载后统一刷新缓存
- QuestManager.OnLoad: 末尾触发 OnAfterSaveLoaded,确保所有缓存组件收到通知
- QuestGiver: 订阅 OnAfterSaveLoaded 设 _cacheDirty,存档恢复后 NPC 交互提示始终最新
- QuestManager.ApplyAffinity: 新增 giverNpc null 显式 LogWarning、maxAffinity<0 LogError 防护
- DialogueManager: 选项穿透防护改为预创建 WaitForSeconds(0.15f),替代 yield return null
- QuestManager.UnlockBranches: 多分支同时满足时只播首个有对话的分支,防止重复播放

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 07:37:03 +08:00
943178cbc1 fix: Round 54 priority dequeue, onComplete callback, prerequisiteObjectiveId validation, localizationTable guard, FailQuest timestamp, remove empty ValidateBranchDialogueKeys
- DialogueManager.EndDialogue: dequeue by max-priority index instead of FIFO index-0
- DialogueManager.EndDialogue: fire _onCompleteCallback on normal end (was only in ForceEnd)
- NpcSO.OnValidate: auto-restore localizationTable to 'UI' if cleared
- QuestSO.ValidateObjectiveIds: validate prerequisiteObjectiveId references exist in same quest
- QuestSO.OnValidate: remove call to empty ValidateBranchDialogueKeys stub + remove the stub itself
- QuestManager.DispatchEvent toFail loop: write _completedAtUtc timestamp on quest failure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 07:20:55 +08:00
da2948dff8 refactor: Round 53 remove all legacy backward-compatibility code
- QuestSO: remove giverNpcId, prerequisiteQuests/Flags/FlagsLogic, failCondition,
  conditionFlags, npcDialogueKey fields; simplify GiverNpcId property to giverNpc?.npcId;
  clean ValidatePrerequisiteCycles/HasPrerequisiteCycle to use prerequisites.questDependencies;
  remove ValidateBranchDialogueKeys migration warning block; clean QuestPrerequisite doc
- QuestManager: remove OnLoad DataVersion 1/2 migration paths (ProgressCounts, hasNewFormat/
  useNewFormat); remove CheckQuestDepsAndFlags old-field fallback (prerequisiteQuests/Flags);
  remove UnlockBranches conditionFlags fallback; remove DispatchEvent failCondition fallback;
  fix ValidatePrerequisites DFS to scan prerequisites.questDependencies
- SaveData: remove ProgressCounts (Obsolete), ObjectiveIndex (unused), GiverNpcId (never
  written) fields from QuestState; simplify DataVersion doc comment
- QuestSOEditor: replace migration-only editor with minimal DrawDefaultInspector
- QuestModule: update all prerequisiteQuests/conditionFlags/npcDialogueKey/failCondition
  references to canonical new fields; update ValidateBranchFlags check 10
- FlagAuditModule: replace conditionFlags/prerequisiteFlags scans with conditionFlagEntries/
  prerequisites.flagCondition.flags
- NpcSO: remove QuestSO.giverNpcId reference from npcId tooltip
- NpcAffinityEvent/RewardSO: update doc comments to reference giverNpc instead of giverNpcId

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 01:00:32 +08:00
0b28cabba4 feat: Round 52 narrative systems improvements
P1-A: QuestManager.OnLoad Enum.TryParse failure warning (dev builds)
P1-B: SaveData.QuestState ObjectiveCompleted dict; BuildObjectiveCompleted
       helper; OnSave/OnLoad wiring (DataVersion 2→3)
P2-A: Quest start/complete timestamps (_startedAtUtc/_completedAtUtc dicts;
       StartedAtUtc/CompletedAtUtc in SaveData; AcceptQuest/CompleteQuest/
       OnSave/OnLoad wiring)
P2-B: DialogueManager pending queue Queue→List + priority-eviction on full
       (lowest-priority item evicted when higher-priority request arrives)
P2-C: NpcSO.localizationTable field; NpcSOEditor uses npc.localizationTable
       in TryResolveNameKey, PingLocalizationFile, and button label
P3-A: QuestSO.failConditions[] multi-fail array; Obsolete failCondition;
       DispatchEvent updates fail check to any-of-array logic with fallback
P3-B: QuestObjectiveSO.prerequisiteObjectiveId; DispatchEvent gates objective
       event routing behind prerequisite completed check
P3-C: IQuestEventPayload interface + StringQuestPayload struct; QuestObjectiveSO
       typed TryHandleEvent(IQuestEventPayload) overload; DispatchEvent string
       overload delegates to typed IQuestEventPayload overload

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 00:47:44 +08:00
48f018f4b8 feat: Round 51 narrative systems improvements
- SaveData: update QuestState.Status comment to include Paused state
- QuestManager: add inline comment on AcceptQuest duplicate-accept guard
- QuestManager: wrap reward.Apply() in try-catch so exceptions don't
  corrupt already-committed Completed state
- QuestManager.UnlockBranches: support new conditionFlagEntries (invert/
  NOT logic) with graceful fallback to legacy conditionFlags
- QuestGiver: cache IQuestManager field in OnEnable; subscribe to
  OnQuestStateChanged for automatic cache invalidation instead of manual
  _cacheDirty = true after each Interact; remove per-call SL.GetOrDefault
- QuestGiver: replace hardcoded Chinese prompt strings with
  LocalizationManager.Get(key, 'UI') + inline fallback via GetPrompt()
- QuestSO: add BranchFlagEntry struct (flagId + invert) for NOT-logic
  branch conditions; add conditionFlagEntries to QuestBranch with
  HideInInspector on legacy conditionFlags for backward compat
- QuestModule: add static TTL cache (5 s) for FindAll<QuestSO>() in
  PopulateDependencyGraph to avoid re-scanning disk on every foldout open
- NpcSOEditor: add 'jump to localization file' button that pings and
  selects the UI table JSON in the Project window

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 00:34:59 +08:00
9c1e70fdeb feat: Round 50 narrative systems improvements
IQuestManager+QuestManager: add FillQuestsInState/FillFilterQuests buffer overloads (no-alloc hot path); remove R49 duplicate implementations.

QuestGiver: cache current quest result (_cachedQuest/_cachedState/_cacheDirty) to avoid per-frame foreach in InteractPrompt; invalidate on OnEnable and Interact_Internal state changes.

IDialogueService+DialogueManager: add StartDialogue(..., Action onComplete) overload; callback fires once on ForceEnd (covers both normal end and interrupt); supports chained callbacks via += accumulation.

DialogueVariantPreviewWindow: add 'Copy CSV' button in matrix section; exports all 2^N flag combinations with winner column; handles N>10 guard and CSV-safe escaping.

WorldStateRegistry: add TryGetCategory(id, out category) reverse lookup for debug tools.

NpcSOEditor: new CustomEditor for NpcSO showing live nameKey localization preview in Inspector (green label or warning box if Key not found).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 00:24:20 +08:00
3c3ea1ead6 feat: Round 49 narrative systems improvements
QuestManager: extract CheckQuestDepsAndFlags shared method, simplify GetQuestLockInfo/CanAccept/MeetsPrerequisites; add GetQuestsInState+FilterQuests implementations; fix extra brace compile bug; add _pauseTimestamps logging; use actualDelta in ApplyAffinity event.

QuestSO: add depth>32 guard to HasPrerequisiteCycle and HasBranchCycle to prevent editor freeze on deep chains.

EventChainModule: replace FindObjectOfType with ServiceLocator.GetOrDefault in ForceExecute; add self-trigger flag detection (check 6) in ValidateAllChains using reflection.

DialogueVariantPreviewWindow: add matrix analysis section enumerating all 2^N flag combinations (N<=10) with table showing winning variant per combination.

WorldStateRegistry: LoadFromSave null guard on data.World sub-collections (P0 fix).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 00:17:27 +08:00
6eaa83dc71 feat: Round 48 narrative systems improvements
- QuestSO: Add ValidateBranchCycles() DFS detection for branches[].nextQuest loop
- QuestSO: Mark three legacy prerequisite fields with v2.0 removal warning in Tooltip
- IQuestManager: Add QuestLockReason enum + QuestLockInfo struct (strongly-typed lock info)
- IQuestManager: Add GetQuestLockInfo() method to interface; GetQuestLockReason() now delegates to it
- IQuestEventSource: Add OnQuestStateChanged(questId, oldState, newState) unified event
- QuestManager: Implement GetQuestLockInfo(); fire OnQuestStateChanged on all state transitions
- DialogueManager: Add one-frame yield in HandleChoices before ShowChoices (skip-debounce fix)
- DialogueManager: Increment _playbackId in ForceEnd() to invalidate residual choice callbacks
- DialogueSequenceSO: Add UNITY_EDITOR debug log in TryGetActiveVariant on variant match
- WorldStateRegistry: Add OnBatchStateChanged event + BatchMark() batch-write API
- DialogueModule: List badge shows warning indicator for unconditional-shadowing variants
- DialogueModule: BuildVariantsCard shows logic mode (AND/OR) alongside flag conditions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 00:05:15 +08:00
446fd5dcd0 feat: Add WorldStateFlagAttribute and custom property drawer for enhanced dialogue management
- Implemented WorldStateFlagAttribute to mark string fields as world state flags.
- Created NarrativeNPCEditor for custom inspector to visualize dialogue version activation states.
- Developed WorldStateFlagDrawer to provide dropdown menu for known flags in the inspector.
- Introduced ActorModule for managing DialogueActorSO assets, including viewing, creating, and deleting actors.
- Added DialogueModule for managing DialogueSequenceSO assets with detailed previews and action bars.
- Established QuestModule for managing QuestSO assets, including objectives and branches.
- Implemented QuestManagerPostprocessor to automatically refresh QuestManager's quest list on asset changes.
2026-05-24 00:36:11 +08:00
520f84999b Add enemy respawner and related components for room lifecycle management
- Implemented EnemyRespawner to manage enemy spawning and respawning within rooms.
- Added IRoomLifecycle interface for room activation and dormancy handling.
- Created supporting classes and metadata for enemy perception and threat assessment.
- Established streaming system components for room state management and transitions.
- Added necessary metadata files for new scripts to ensure proper integration with Unity.
2026-05-23 21:23:09 +08:00
a1b4e629aa feat: Implement Room Streaming System
- Add RoomStreamingManager to manage room loading and unloading based on player proximity.
- Create StreamingBudgetConfigSO for memory and performance budgeting of the streaming system.
- Introduce TransitionDirector to handle seamless and atmospheric fade transitions between rooms.
- Develop WorldGraph to represent room connectivity and facilitate neighbor queries and distance calculations.
- Implement RoomNode and RoomEdge classes to structure room data and connections.
2026-05-23 19:10:29 +08:00
81c326af53 新增SensorToolkit 2026-05-23 08:48:48 +08:00
9369f512d1 Merge branch 'master' of ssh://git.joywaygames.cn:2222/basegames/zeling_v2
# Conflicts:
#	Assets/_Game/Scenes/Testings/FengXianMountain.unity   resolved by theirs version
2026-05-23 00:10:51 +08:00
e879efaa89 Add InputDeviceIconSetSO configuration guide and related documentation
- Created a new markdown file detailing the configuration of InputDeviceIconSetSO.
- Included sections on system architecture, field explanations, image specifications, and complete workflow from setup to runtime.
- Documented the automatic device recognition logic and provided troubleshooting for common issues.
- Added references to relevant files and scripts for easier navigation.
2026-05-23 00:10:23 +08:00
b7baf7ad6a Add WeaponFeedback component and AddressableManagerWindow meta file
- Implemented WeaponFeedback class for handling weapon-related feedbacks such as hit effects and attack sounds.
- Added meta file for AddressableManagerWindow to manage addressable assets.
- Included a new jump.data file for profiler data.
2026-05-22 22:03:32 +08:00
yangyu
0c3818497a no message 2026-05-22 15:07:43 +08:00
3e1f234ddc feat: 移除 Addressable 批量工具菜单项 2026-05-22 13:41:31 +08:00
7461d181fe FengXianMountain 2026-05-22 13:38:41 +08:00
f3d52a1cd7 Merge branch 'master' of ssh://git.joywaygames.cn:2222/basegames/zeling_v2 2026-05-22 13:34:56 +08:00
f1c0b65737 feat: Enhance Addressable tools with improved scanning and filtering features
- Updated AddressReferenceGraphWindow to scan for AddressKeys in the _Game directory and added a warning for missing directories.
- Enhanced AddressableBatchTool with new filters for asset types (Prefab, Scene, ScriptableObject, Texture, Audio) and improved UI layout for better usability.
- Introduced automatic application of grouping and labeling rules during registration in AddressableBatchTool.
- Added functionality to quickly scan the _Game folder and improved address building logic.
- Updated AddressableRuleSyncWindow to include handling for custom labels and improved reporting of issues.
- Enhanced AddressableRules with a whitelist for known labels and refined grouping and labeling logic based on asset prefixes.
2026-05-22 13:34:47 +08:00
yangyu
430919f07b Merge branch 'master' of https://git.joywaygames.cn/basegames/zeling_v2
# Conflicts:
#	Assets/_Game/Scenes/Persistent.unity
2026-05-22 13:26:06 +08:00
yangyu
d689bb9887 no message 2026-05-22 13:25:40 +08:00
e7b44e1d60 fix: 修复 AttackState 动画结束后等待阶段的逻辑,确保播放新动画以避免重复触发事件 2026-05-22 13:12:16 +08:00
af82b2b325 修改的文件:
New Transition Asset.asset
SKL_New.asset
ABL_Boss_Chaofeng.asset
WPN_TianHun.asset (4处)
WPN_MingHun.asset (4处)
WPN_DiHun.asset (4处,已有2处是0,修了剩余4处)
说明: _FadeDuration: 0.25 → _FadeDuration: 0,动画切换时不再有融合过渡,适合2D帧动画项目立即切换的需求。Feel/MMTools 的 prefab 中的 _FadeDuration 与 Animancer 无关,未做修改。已将项目 Assets/_Game/ 下所有 Animancer Transition Asset 的 _FadeDuration 从 0.25 改为 0,共修改 6 个文件(17 处)。动画切换将立即生效,不再有融合过渡,符合 2D 帧动画项目的需求。
2026-05-22 11:34:00 +08:00
d3136266d1 优化 FallState 和 WallSlideState 的状态切换逻辑,增加对 WallCling 能力的检查,并在抓墙时恢复空中冲刺次数 2026-05-22 11:01:09 +08:00
68d4c699ae 修复内容:
PlayerMovement:新增 _facingLocked 字段 + LockFacing(bool) 方法;UpdateFacing() 锁定时直接返回
WallSlideState:OnStateEnter 调用 LockFacing(true) + FlipFacing(_wallDir);OnStateExit 调用 LockFacing(false) 解锁
WallJumpState:OnStateEnter 保险性再调一次 LockFacing(false);WallJumpAway/Toward 同步写入 _inputVelocityX,确保解锁后 UpdateFacing 朝向正确(背墙跳 = 离墙方向,对墙跳 = 朝墙方向)
2026-05-22 10:48:52 +08:00
285ac46e31 优化 DiHun 武器和角色表单的属性,更新击打盒 ID 和颜色设置 2026-05-22 07:07:10 +08:00
47bdc67cdf feat: Implement DownDash ability and related systems
- Added DownDash ability with cooldown and speed configuration.
- Introduced DownDashState to handle down dashing mechanics, including gravity manipulation and animation playback.
- Updated PlayerMovement to support DownDash functionality.
- Enhanced PlayerStats to manage spring charge consumption and healing.
- Modified PlayerCombat and WeaponHitBoxInstance to support new hit confirmation events.
- Updated AbilityType to include new form types for character abilities.
- Improved Gizmos for better visualization of enemy detection and attack ranges.
- Added feedback systems for form switching in PlayerFeedback and IFeedbackPlayer.
- Refactored combat and movement states to accommodate new abilities and ensure smooth transitions.
2026-05-22 00:09:50 +08:00
534de11e5d Refactor ability types and update tags
- Updated AbilityTypeDrawer to replace "Dive" with "DownDash" in the movement abilities section.
- Modified GMToolWindow to reflect the change from "Dive" to "DownDash" in the ability list.
- Changed AbilityType enum to rename "Dive" to "DownDash" with updated description.
- Adjusted AllMovement mask in AbilityType to include "DownDash" instead of "Dive".
- Corrected tag from "OneWayPlatforms" to "OneWayPlatform" in TagManager settings.
2026-05-21 22:37:38 +08:00
2d6a2c5bc2 优化 WallSlideState 切换逻辑,增加对 WallCling 能力的检查以提升角色在墙壁附近的交互体验 2026-05-21 21:16:13 +08:00
d38505fd31 添加翻转视觉朝向的方法以支持蹬墙跳时的即时转向,并在切换到 WallSlideState 时确保正确刷新抓墙高度 2026-05-21 20:57:03 +08:00
cb68ad6a2f 优化玩家物理移动逻辑,启用连续碰撞检测以防止角色穿墙,并调整平台速度叠加规则以提升物理交互效果 2026-05-21 20:49:50 +08:00
acc5471c47 优化移动平台的乘客接触逻辑,添加物理碰撞体以判断乘客接触方向,并实现零摩擦材质以防止角色被侧面托住 2026-05-21 20:31:24 +08:00
8ccfa22a0e 优化移动平台与玩家的交互逻辑,采用速度双缓冲方案以提升运动平滑度和代码清晰度 2026-05-21 19:27:36 +08:00
39483c4460 优化移动平台与乘客的速度处理逻辑,改用位移累积方案以提升运动平滑度和代码清晰度 2026-05-21 19:08:18 +08:00
c7c8171b8a 优化移动平台与乘客的速度继承逻辑,改用双缓冲方案以提升平滑度和兼容性 2026-05-21 18:59:22 +08:00
247a218182 实现移动平台乘客接口,优化乘客跟随逻辑 2026-05-21 17:09:06 +08:00
fcd3e2dcdd PlayerMovementConfigSO.cs
新增 WallHangSpeed = 1f:正常抓墙(低于等于 wallGrabY,可蹬墙跳区间)的缓慢下滑速度
WallSlideSpeed 语义调整为:受限模式(高于 wallGrabY)的较快下滑速度
PlayerMovement.cs

ApplyWallSlide() 改为 ApplyWallSlide(float speed),由调用方传入对应速度
WallSlideState.cs

OnStateFixedUpdate:正常模式用 WallHangSpeed,受限模式用 WallSlideSpeed(两档清晰分离)
恢复反方向键脱离:脱离时同样调用 StartWallCoyote,wall coyote 窗口内仍能触发蹬墙跳
更新类头注释完整描述脱离方式和下滑速度档位Two wall slide improvements:
2026-05-21 15:58:46 +08:00
20b207ed58 单向平台 2026-05-21 11:53:54 +08:00
67e2d3a8ff 单向平台 2026-05-21 11:44:01 +08:00
94113a9c1b 修改优化layer 2026-05-21 11:25:39 +08:00
d09bc95c3f Refactor event channels and update layer specifications
- Removed StatusEffectEventChannelSO and its associated meta file.
- Updated CreateEventChannelAssets to handle new shield-related events.
- Added CharmModule for managing charm assets in the DataHub.
- Introduced CharmEventChannelSO for charm equipped/unequipped events.
- Changed layer references from "Ground" to "Platform" in various scripts.
- Updated documentation to reflect changes in layer specifications.
- Created new event assets for ShieldBroken, ShieldRestored, StatusEffectApplied, and StatusEffectExpired.
2026-05-21 11:08:14 +08:00
280c7b22f5 PlacePlayer 2026-05-21 09:36:09 +08:00
7a51c43f04 feat: 删除旧的技能资产 ABL_Boss_New,添加新的技能资产 ABL_Boss_Chaofeng 2026-05-21 08:31:41 +08:00
27c0d200c9 Refactor and clean up game assets and editor modules
- Deleted unused weapon and enemy stat assets to streamline project.
- Updated player form assets to reference new default weapon IDs.
- Enhanced DataHub editor UI for better usability, including improved tab management and detail views.
- Removed icon references in various editor modules to simplify the interface.
- Added new boss skill assets and corresponding metadata for future development.
- Created new folders and metadata for organizing boss-related assets, skills, and stats.
- Implemented a new skill asset with updated properties for better gameplay mechanics.
2026-05-21 07:59:01 +08:00
bb3afd130f feat: Add SkillModule and WeaponModule for managing skills and weapons
- Implemented SkillModule to manage FormSkillSO assets with a detailed UI for editing and displaying skill properties.
- Implemented WeaponModule to manage WeaponSO assets with a detailed UI for editing and displaying weapon properties.
- Created AssetOperations class for centralized CRUD operations on ScriptableObject assets, including create, rename, delete, and clone functionalities.
- Added DetailHeader for displaying and renaming asset names in the UI.
- Introduced SoListPane for a reusable ScriptableObject list panel with search functionality and context menus.
- Added meta files for all new scripts to ensure proper asset management in Unity.
2026-05-21 07:09:53 +08:00
f096105caf 编辑器扩展优化 2026-05-20 19:55:11 +08:00
d9bda9daa5 feat: 增强场景工具,添加检查点服务和主摄像机音频监听器引用,优化事件处理逻辑 2026-05-20 18:52:57 +08:00
28c1059fe2 feat: 优化存档管理和工具槽管理,改进数据类型转换,增强代码可读性 2026-05-20 18:22:24 +08:00
bc7063fb95 feat: 优化存档管理,添加异步加载槽位摘要功能,减少主菜单等待时间 2026-05-20 18:18:30 +08:00