using System; using System.Collections.Generic; namespace StandardScene.Fass2Simulator { public sealed class Fass2SimNodeProfile { public int ActionDelayMs { get; set; } } public sealed class Fass2SimNodeProfileStore { private readonly Dictionary _profiles = new Dictionary(); public void Load(IDictionary nodes) { _profiles.Clear(); if (nodes == null) { return; } foreach (var pair in nodes) { if (!ushort.TryParse(pair.Key, out var nodeId)) { continue; } _profiles[nodeId] = pair.Value ?? new Fass2SimNodeProfile(); } } public int ResolveActionDelayMs(ushort nodeId, int fallbackMs) { if (_profiles.TryGetValue(nodeId, out var profile) && profile.ActionDelayMs > 0) { return profile.ActionDelayMs; } return fallbackMs; } } }