Fix standing-state collisions resetting (#7469)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Leon Friedrich
2022-04-14 14:31:07 +12:00
committed by GitHub
parent e63a176330
commit 119e90124f
3 changed files with 38 additions and 19 deletions

View File

@@ -1,12 +1,7 @@
using System;
using Content.Shared.Sound;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.Players;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Shared.Standing
{
@@ -18,10 +13,16 @@ namespace Content.Shared.Standing
[DataField("downSoundCollection")]
public SoundSpecifier DownSoundCollection { get; } = new SoundCollectionSpecifier("BodyFall");
[ViewVariables]
[DataField("standing")]
public bool Standing { get; set; } = true;
/// <summary>
/// List of fixtures that had vault-impassable prior to an entity being downed. Required when re-adding the
/// collision mask.
/// </summary>
[DataField("vaultImpassableFixtures")]
public List<string> VaultImpassableFixtures = new();
public override ComponentState GetComponentState()
{
return new StandingComponentState(Standing);