Cleans up NPC and Human YAML and adds tags for Teleportable and FootstepSound (#3371)

* GlassBeaker and FirelockElectronics

* Teleportable + Fixed parented Mobs

* Moved the small tag stuff outta this PR, this is a MOB PR nowgit add .

* FootstepSound

* FootstepSound fixed

* Teleportable

* Added Tags
This commit is contained in:
Swept
2021-02-23 07:20:35 +00:00
committed by GitHub
parent c12e590c33
commit 898996abe9
27 changed files with 40 additions and 211 deletions

View File

@@ -1,13 +0,0 @@
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Mobs
{
/// <summary>
/// Mobs will only make footstep sounds if they have this component.
/// </summary>
[RegisterComponent]
public class FootstepSoundComponent : Component
{
public override string Name => "FootstepSound";
}
}

View File

@@ -1,7 +1,8 @@
#nullable enable
#nullable enable
using System;
using System.Collections.Generic;
using Content.Shared.GameObjects.Components.Portal;
using Content.Shared.GameObjects.Components.Tag;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
@@ -110,7 +111,7 @@ namespace Content.Server.GameObjects.Components.Portal
{
// TODO: Check if it's slotted etc. Otherwise the slot item itself gets ported.
return !ImmuneEntities.Contains(entity) &&
entity.HasComponent<TeleportableComponent>();
entity.HasTag("Teleportable");
}
public void StartCooldown()

View File

@@ -1,10 +0,0 @@
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Portal
{
[RegisterComponent]
public class TeleportableComponent : Component
{
public override string Name => "Teleportable";
}
}

View File

@@ -6,6 +6,7 @@ using Content.Server.GameObjects.Components.Sound;
using Content.Shared.Audio;
using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects.Components.Movement;
using Content.Shared.GameObjects.Components.Tag;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Maps;
using Content.Shared.Physics;
@@ -96,7 +97,7 @@ namespace Content.Server.GameObjects.EntitySystems
{
mover.StepSoundDistance = 0;
if (!mover.Owner.HasComponent<FootstepSoundComponent>())
if (!mover.Owner.HasTag("FootstepSound"))
{
return;
}