存档完善和修复

This commit is contained in:
2026-05-20 15:10:35 +08:00
parent 84528403ec
commit ec633d9b79
17 changed files with 254 additions and 67 deletions

View File

@@ -13,9 +13,9 @@ namespace BaseGames.Support.AntiSoftlock
public class HardAbilityGate : AbilityGate
{
[Header("HardAbilityGate 设置")]
[Tooltip("是否还要求物理拾取验证(需要 World.Switches 中对应 Key = true")]
[Tooltip("是否还要求物理拾取验证(需要 EventChains.WorldFlags 中对应 Key = true")]
[SerializeField] private bool _requirePhysicalValidation = false;
[Tooltip("物理拾取验证 Switch KeySaveManager.Data.World.Switches[key] == true")]
[Tooltip("物理拾取验证 Flag KeyEventChains.WorldFlags[key] == true")]
[SerializeField] private string _physicalPickupSwitchKey;
[Header("引用")]
@@ -29,8 +29,8 @@ namespace BaseGames.Support.AntiSoftlock
// 次级检查:物理拾取确认
if (string.IsNullOrEmpty(_physicalPickupSwitchKey)) return true;
var save = _saveManager != null ? _saveManager.Data : null;
if (save?.World?.Switches == null) return false;
return save.World.Switches.TryGetValue(_physicalPickupSwitchKey, out bool val) && val;
if (save?.EventChains?.WorldFlags == null) return false;
return save.EventChains.WorldFlags.TryGetValue(_physicalPickupSwitchKey, out bool val) && val;
}
}
}