XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFE.SpaceEngineers.AgentBridge

【SpaceEngineer】AI调试插件

公开
关注 0 Fork 0 Star 0
UTF-8
namespace XFE.SeAgent.Plugin.Performance
{
    // A single applied owner, not a per-owner cache: the engine stores one flag on each block.
    public sealed class AccessStamp
    {
        private bool valid;
        private long owner, generation, frame;
        private bool admin, factions;
        public bool Matches(long ownerId, long currentGeneration, long currentFrame, bool adminAccess, bool showFactions)
            => valid && owner == ownerId && generation == currentGeneration && frame == currentFrame
                && admin == adminAccess && factions == showFactions;
        public void Record(long ownerId, long currentGeneration, long currentFrame, bool adminAccess, bool showFactions)
        {
            owner = ownerId; generation = currentGeneration; frame = currentFrame;
            admin = adminAccess; factions = showFactions; valid = true;
        }
    }
}