存档完善和修复
This commit is contained in:
@@ -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 Key(需 SaveManager.Data.World.Switches[key] == true)")]
|
||||
[Tooltip("物理拾取验证 Flag Key(需 EventChains.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user