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;
}

View File

@@ -2,24 +2,17 @@
#1D2L3U4R
- type: entity
save: false
name: monkey
id: MonkeyMob_Content
parent: SimpleMobBase
description: New church of neo-darwinists actually believe that EVERY animal evolved from a monkey. Tastes like pork, and killing them is both fun and relaxing.
drawdepth: Mobs
suffix: AI
components:
- type: MovementSpeedModifier
baseWalkSpeed : 4
baseSprintSpeed : 4
- type: InteractionOutline
- type: Sprite
drawdepth: Mobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: monkey
sprite: Mobs/Animals/monkey.rsi
- type: Clickable
- type: Physics
anchored: false
mass: 50
@@ -32,22 +25,6 @@
- SmallImpassable
layer:
- Opaque
- type: Damageable
- type: MobState
thresholds:
0: !type:NormalMobState {}
50: !type:CriticalMobState {}
100: !type:DeadMobState {}
- type: HeatResistance
- type: CombatMode
- type: Teleportable
- type: Stunnable
- type: UnarmedCombat
range: 1.5
arcwidth: 0
arc: bite
damage: 50
- type: MovementIgnoreGravity
- type: Appearance
visuals:
- type: DamageStateVisualizer
@@ -56,18 +33,12 @@
- type: FireVisualizer
sprite: Mobs/Effects/onfire.rsi
normalState: Monkey_burning
- type: Pullable
- type: Butcherable
meat: FoodMeat
- type: entity
save: false
name: gorilla
parent: SimpleMobBase
id: GorillaMob_Content
description: Smashes, roars, looks cool. Don't stand near one.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -94,13 +65,10 @@
dead: dead
- type: entity
save: false
name: chicken
parent: SimpleMobBase
id: ChickenMob_Content
description: Comes before an egg, and IS a dinosaur!
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -127,13 +95,10 @@
dead: dead-0
- type: entity
save: false
name: butterfly
parent: SimpleMobBase
id: ButterflyMob_Content
description: Despite popular misconceptions, it's not actually made of butter.
drawdepth: Mobs
suffix: AI
components:
- type: MovementSpeedModifier
baseWalkSpeed : 6
@@ -173,13 +138,10 @@
dead: dead
- type: entity
save: false
name: bat
parent: SimpleMobBase
id: BatMob_Content
description: Some cultures find them terrifying, others crunchy on the teeth.
drawdepth: Mobs
suffix: AI
components:
- type: MovementSpeedModifier
baseWalkSpeed : 6
@@ -209,13 +171,10 @@
dead: dead
- type: entity
save: false
name: bee
parent: SimpleMobBase
id: BeeMob_Content
description: Nice to have, but you can't build a civilization on a foundation of honey alone.
drawdepth: Mobs
suffix: AI
components:
- type: MovementSpeedModifier
baseWalkSpeed : 7
@@ -246,13 +205,10 @@
dead: dead
- type: entity
save: false
name: goat
parent: SimpleMobBase
id: GoatMob_Content
description: His spine consists of long sharp segments, no wonder he is so grumpy.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -280,13 +236,10 @@
# Note that we gotta make this bitch vomit someday when you feed it anthrax or sumthin
- type: entity
save: false
name: goose
parent: SimpleMobBase
id: GooseMob_Content
description: Its stomach and mind are an enigma beyond human comprehension.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -314,13 +267,10 @@
# Would be cool to have some functionality for the parrot to be able to sit on stuff
- type: entity
save: false
name: parrot
parent: SimpleMobBase
id: ParrotMob_Content
description: Infiltrates your domain, spies on you, and somehow still a cool pet.
drawdepth: Mobs
suffix: AI
components:
- type: MovementSpeedModifier
baseWalkSpeed : 6
@@ -350,13 +300,10 @@
dead: dead
- type: entity
save: false
name: snake
parent: SimpleMobBase
id: SnakeMob_Content
description: Hissss! Bites aren't poisonous.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -386,13 +333,10 @@
# Code unique spider prototypes or combine them all into one spider and get a
# random sprite state when you spawn it.
- type: entity
save: false
name: tarantula
parent: SimpleMobBase
id: GiantSpiderMob_Content
description: Widely recognized to be the literal worst thing in existence.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -419,13 +363,10 @@
dead: tarantula_dead
- type: entity
save: false
name: crab
parent: SimpleMobBase
id: CrabMob_Content
description: A folk legend goes around that his claw snaps spacemen out of existance over distasteful remarks. Be polite and tolerant for your own safety.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -452,13 +393,10 @@
dead: dead
- type: entity
save: false
name: penguin
parent: SimpleMobBase
id: PenguinMob_Content
description: Their lives are constant pain due to their inner-body knees.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs

View File

@@ -1,10 +1,8 @@
- type: entity
save: false
name: space carp
id: CarpMob_Content
parent: SimpleMobBase
description: It's a space carp.
drawdepth: Mobs
suffix: AI
components:
- type: UtilityAI
behaviorSets:
@@ -13,15 +11,12 @@
- type: AiFactionTag
factions:
- SimpleHostile
- type: MovementSpeedModifier
- type: InteractionOutline
- type: Sprite
drawdepth: Mobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: carp
sprite: Mobs/Aliens/Carps/carp_space.rsi
- type: Clickable
state: alive
sprite: Mobs/Aliens/Carps/space.rsi
- type: Physics
anchored: false
mass: 50
@@ -36,70 +31,44 @@
layer:
- Opaque
- MobImpassable
- type: Damageable
- type: MobState
thresholds:
0: !type:NormalMobState {}
50: !type:CriticalMobState {}
100: !type:DeadMobState {}
- type: HeatResistance
- type: CombatMode
- type: Teleportable
- type: Stunnable
- type: UnarmedCombat
range: 1.5
arcwidth: 0
arc: bite
damage: 50
- type: MovementIgnoreGravity
- type: Appearance
visuals:
- type: DamageStateVisualizer
normal: carp
normal: alive
dead: dead
- type: entity
save: false
name: magicarp
parent: CarpMob_Content
id: MagicarpMob_Content
description: Looks like some kind of fish. Might be magical.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: magicarp
sprite: Mobs/Aliens/Carps/carp_magic.rsi
state: alive
sprite: Mobs/Aliens/Carps/magic.rsi
- type: Physics
mass: 60
- type: Appearance
visuals:
- type: DamageStateVisualizer
normal: magicarp
dead: dead
- type: entity
save: false
name: holocarp
parent: CarpMob_Content
id: HolocarpMob_Content
description: Carp made out of holographic energies.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: holocarp
sprite: Mobs/Aliens/Carps/carp_holo.rsi
state: alive
sprite: Mobs/Aliens/Carps/holo.rsi
- type: Physics
mass: 5
- type: Appearance
visuals:
- type: DamageStateVisualizer
normal: holocarp
dead: dead

View File

@@ -1,11 +1,8 @@
- type: entity
save: false
name: Civilian
parent: BaseHumanMob_Content
id: HumanMob_Civilian
description: A miserable pile of secrets.
drawdepth: Mobs
suffix: AI
components:
- type: UtilityAI
behaviorSets:
@@ -19,12 +16,10 @@
- NanoTrasen
- type: entity
save: false
name: Spirate
parent: BaseHumanMob_Content
id: HumanMob_Spirate
description: Yarr!
suffix: AI
components:
- type: UtilityAI
behaviorSets:

View File

@@ -1,12 +1,12 @@
# Hacky for the stress test so don't even consider adding to this
- type: entity
save: false
name: Mimic
id: MimicMob_Content
parent: SimpleMobBase
description: Surprise. # When this gets a proper write this should use the object's actual description >:)
drawdepth: Mobs
suffix: AI
components:
- type: Tag
tags:
- FootstepSound
- type: UtilityAI
behaviorSets:
- UnarmedAttackHostiles
@@ -14,17 +14,13 @@
factions:
- SimpleHostile
- type: Hands
- type: MovementSpeedModifier
- type: InteractionOutline
- type: Sprite
netsync: false
drawdepth: Mobs
sprite: Constructible/Power/VendingMachines/cola.rsi
state: normal
- type: Icon
sprite: Constructible/Power/VendingMachines/cola.rsi
state: normal
- type: Clickable
- type: Physics
anchored: false
mass: 85
@@ -39,19 +35,8 @@
layer:
- Opaque
- MobImpassable
- type: Damageable
- type: MobState
thresholds:
0: !type:NormalMobState {}
100: !type:CriticalMobState {}
200: !type:DeadMobState {}
- type: HeatResistance
- type: CombatMode
- type: Teleportable
- type: CharacterInfo
- type: FootstepSound
- type: HumanoidAppearance
- type: Stunnable
- type: AnimationPlayer
- type: UnarmedCombat
range: 1.5

View File

@@ -2,13 +2,10 @@
#1D2L3U4R
- type: entity
save: false
name: corgi
parent: SimpleMobBase
id: CorgiMob_Content
description: Finally, a space corgi!
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -34,13 +31,10 @@
dead: corgi_dead
- type: entity
save: false
name: ian
parent: SimpleMobBase
parent: CorgiMob_Content
id: IanMob_Content
description: Favorite pet corgi.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -48,17 +42,6 @@
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: ian
- type: Physics
mass: 10
shapes:
- !type:PhysShapeAabb
bounds: "-0.50,-0.25,0.30,0.25"
mask:
- Impassable
- VaultImpassable
- SmallImpassable
layer:
- Opaque
- type: Appearance
visuals:
- type: DamageStateVisualizer
@@ -66,13 +49,10 @@
dead: ian_dead
- type: entity
save: false
name: cat
parent: SimpleMobBase
id: CatMob_Content
description: Feline pet, very funny.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -98,13 +78,10 @@
dead: cat_dead
- type: entity
save: false
name: calico cat
parent: SimpleMobBase
id: CatCalicoMob_Content
parent: CatMob_Content
description: Feline pet, very funny.
drawdepth: Mobs
suffix: AI
components:
- type: Sprite
drawdepth: Mobs
@@ -112,16 +89,6 @@
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: cat2
- type: Physics
shapes:
- !type:PhysShapeAabb
bounds: "-0.50,-0.25,0.30,0.25"
mask:
- Impassable
- VaultImpassable
- SmallImpassable
layer:
- Opaque
- type: Appearance
visuals:
- type: DamageStateVisualizer
@@ -129,13 +96,10 @@
dead: cat2_dead
- type: entity
save: false
name: sloth
parent: SimpleMobBase
id: SlothMob_Content
description: Very slow animal. For people with low energy.
drawdepth: Mobs
suffix: AI
components:
- type: MovementSpeedModifier
baseWalkSpeed : 1

View File

@@ -5,6 +5,9 @@
drawdepth: Mobs
suffix: AI
components:
- type: Tag
tags:
- Teleportable
- type: UtilityAI
behaviorSets:
- Clothing
@@ -23,6 +26,7 @@
soundHit: /Audio/Effects/hit_kick.ogg
- type: InteractionOutline
- type: Sprite
noRot: true
drawdepth: Mobs
- type: Clickable
- type: Physics
@@ -72,7 +76,6 @@
100: !type:DeadMobState {}
- type: HeatResistance
- type: CombatMode
- type: Teleportable
- type: Internals
- type: Stunnable
- type: UnarmedCombat

View File

@@ -1,11 +1,9 @@
# Hacky for the stress test so don't even consider adding to this
- type: entity
save: false
name: Xeno
id: XenoMob_Content
parent: SimpleMobBase
description: They mostly come at night. Mostly.
drawdepth: Mobs
suffix: AI
components:
- type: UtilityAI
behaviorSets:
@@ -15,15 +13,12 @@
factions:
- Xeno
- type: Hands
- type: MovementSpeedModifier
- type: InteractionOutline
- type: Sprite
drawdepth: Mobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: running
sprite: Mobs/Aliens/Xenos/xeno.rsi
- type: Clickable
- type: Physics
anchored: false
mass: 85
@@ -38,18 +33,12 @@
layer:
- Opaque
- MobImpassable
- type: Damageable
- type: MobState
thresholds:
0: !type:NormalMobState {}
150: !type:CriticalMobState {}
200: !type:DeadMobState {}
- type: Metabolism
- type: HeatResistance
- type: CombatMode
- type: Teleportable
- type: FootstepSound
- type: Stunnable
- type: UnarmedCombat
range: 1.5
arcwidth: 0

View File

@@ -1,4 +1,3 @@
# Both humans and NPCs inherit from this.
# Anything human specific (e.g. UI, input) goes under HumanMob_Content
- type: entity
save: false
@@ -8,6 +7,10 @@
drawdepth: Mobs
abstract: true
components:
- type: Tag
tags:
- Teleportable
- FootstepSound
- type: Flashable
- type: Hands
- type: MovementSpeedModifier
@@ -186,9 +189,7 @@
- type: CombatMode
- type: Climbing
- type: Cuffable
- type: Teleportable
- type: CharacterInfo
- type: FootstepSound
- type: AnimationPlayer
- type: Buckle
- type: UnarmedCombat

View File

@@ -3,3 +3,9 @@
- type: Tag
id: Wall
- type: Tag
id: Teleportable
- type: Tag
id: FootstepSound

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 98 B

After

Width:  |  Height:  |  Size: 98 B

View File

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 388 B

View File

@@ -24,7 +24,7 @@
]
},
{
"name": "holocarp",
"name": "alive",
"directions": 4,
"delays": [
[

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 478 B

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 485 B

View File

@@ -24,7 +24,7 @@
]
},
{
"name": "magicarp",
"name": "alive",
"directions": 4,
"delays": [
[
@@ -50,7 +50,7 @@
]
},
{
"name": "magicarp_gib",
"name": "gib",
"delays": [
[
0.1,

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 279 B

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 557 B

View File

@@ -24,7 +24,7 @@
]
},
{
"name": "carp",
"name": "alive",
"directions": 4,
"delays": [
[
@@ -50,7 +50,7 @@
]
},
{
"name": "carp_gib",
"name": "gib",
"delays": [
[
0.1,