2024-03-20 09:56:22 +03:00
|
|
|
|
using Content.Server.Administration;
|
|
|
|
|
|
using Content.Server.Chemistry.Containers.EntitySystems;
|
2024-02-14 12:49:00 +03:00
|
|
|
|
using Content.Shared._Amour.Hole;
|
2024-03-20 09:56:22 +03:00
|
|
|
|
using Content.Shared.Administration;
|
2024-02-14 12:49:00 +03:00
|
|
|
|
using Robust.Server.Containers;
|
|
|
|
|
|
using Robust.Shared.Containers;
|
2024-02-18 13:23:05 +03:00
|
|
|
|
using Robust.Shared.GameStates;
|
2024-03-20 09:56:22 +03:00
|
|
|
|
using Robust.Shared.Prototypes;
|
2024-02-14 12:49:00 +03:00
|
|
|
|
using Robust.Shared.Timing;
|
2024-03-20 09:56:22 +03:00
|
|
|
|
using Robust.Shared.Toolshed;
|
|
|
|
|
|
using Robust.Shared.Toolshed.TypeParsers;
|
2024-02-14 12:49:00 +03:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server._Amour.Hole;
|
|
|
|
|
|
|
|
|
|
|
|
public sealed partial class HoleSystem : SharedHoleSystem
|
|
|
|
|
|
{
|
|
|
|
|
|
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
|
|
|
|
|
|
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
|
{
|
2024-02-14 23:27:46 +03:00
|
|
|
|
base.Initialize();
|
2024-02-14 12:49:00 +03:00
|
|
|
|
InitializeInventory();
|
2024-02-18 13:23:05 +03:00
|
|
|
|
|
|
|
|
|
|
SubscribeLocalEvent<HoleComponent,ComponentGetState>(OnGetState);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnGetState(EntityUid uid, HoleComponent component,ref ComponentGetState args)
|
|
|
|
|
|
{
|
|
|
|
|
|
args.State = new HoleComponentState(component.Parent, component.IsExcited);
|
2024-02-14 12:49:00 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void Update(float frameTime)
|
|
|
|
|
|
{
|
|
|
|
|
|
UpdateSolution(frameTime);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-03-20 09:56:22 +03:00
|
|
|
|
|
|
|
|
|
|
[ToolshedCommand, AdminCommand(AdminFlags.Fun)]
|
|
|
|
|
|
internal sealed class AddHoleCommand : ToolshedCommand
|
|
|
|
|
|
{
|
|
|
|
|
|
[CommandImplementation]
|
|
|
|
|
|
public void AddHole(
|
|
|
|
|
|
[CommandInvocationContext] IInvocationContext ctx,
|
|
|
|
|
|
[PipedArgument] EntityUid target,
|
|
|
|
|
|
[CommandArgument] Prototype<EntityPrototype> prototype)
|
|
|
|
|
|
{
|
|
|
|
|
|
GetSys<HoleSystem>().AddHole(target,prototype.Value.ID);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|