mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-06 17:58:05 +02:00
* bubble implementation include contained entities fix line edit crash when clipboard contents are null somehow use CVar for update bubble range remove seenMovers that get NaN'd out of MaxUpdateRange - huge reduction in network traffic from bullets cut default of MaxUpdateRange down to 12.5 for now maybe handle teleported things handle removing player state on disconnect fixed positional audio errors make UpdateEntityTree also update player's last seen ents make net.maxupdaterange cvar tunable at runtime w/o impacting performance back to position nan as means to hide from client revert work pooling as the wrong player was getting the wrong game state ffs needed to think less about *if* something is *seen* and more about *when* it must be *unseen* clean up usings handle parenting and sequencing issues that arise on the client gather needed ents to update recursively applied suggestions from code review fix missing recursively contained ents make assumption that client last saw things on first tick instead of tick zero, as zero would be the "from tick" and first would be he "to tick" add First tick as constant to GameTick due to relevance above renamed includedEnts to checkedEnts to make usage more clear added comments inverted some conditions to flatten parts of the pvs logic fixed sending states when already seen (lastChange < lastSeen to lastChange <= lastSeen) fix sending states when no actual changes (other bugs?) local caching of currentTick, remove priorTick * make TransformComponent's Parent setter call Dirty() to handle replicating network state if AttachParent isn't invoked * fixed parent changed by setting Parent on Transform not updating parent's Children collection and other stuff rotating parent entities now are visible with their orbiting children if one of their children moves into view * break out duplicated code as GetLastSeen * remove unused net.parallelstates introduce net.pvs to configure enabling/disabling PVS
41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Robust.Shared.Interfaces.GameObjects;
|
|
using Robust.Shared.Interfaces.GameObjects.Components;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Robust.Shared.GameObjects.Components.Containers
|
|
{
|
|
public abstract class SharedContainerManagerComponent : Component, IContainerManager
|
|
{
|
|
public sealed override string Name => "ContainerContainer";
|
|
public sealed override uint? NetID => NetIDs.CONTAINER_MANAGER;
|
|
|
|
public abstract T MakeContainer<T>(string id) where T : IContainer;
|
|
public abstract bool Remove(IEntity entity);
|
|
public abstract IContainer GetContainer(string id);
|
|
public abstract bool HasContainer(string id);
|
|
public abstract bool TryGetContainer(string id, out IContainer container);
|
|
|
|
/// <inheritdoc />
|
|
public abstract bool TryGetContainer(IEntity entity, out IContainer container);
|
|
|
|
public abstract bool ContainsEntity(IEntity entity);
|
|
public abstract void ForceRemove(IEntity entity);
|
|
|
|
[Serializable, NetSerializable]
|
|
protected class ContainerManagerComponentState : ComponentState
|
|
{
|
|
public Dictionary<string,(bool, List<EntityUid>)> Containers { get; }
|
|
|
|
public ContainerManagerComponentState(Dictionary<string, (bool, List<EntityUid>)> containers) : base(NetIDs.CONTAINER_MANAGER)
|
|
{
|
|
Containers = containers;
|
|
}
|
|
}
|
|
|
|
public abstract IEnumerable<IContainer> GetAllContainers();
|
|
|
|
}
|
|
}
|