Skip to content

Commit 000d23a

Browse files
psykzzZoldorfTheWizard
authored andcommitted
Fix broken prototypes for AnimatedWearables (#219)
1 parent b92eae1 commit 000d23a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

SS14.Server/GameObjects/Component/Renderable/WearableAnimatedSpriteComponent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace SS14.Server.GameObjects
77
[IoCTarget]
88
public class WearableAnimatedSpriteComponent : AnimatedSpriteComponent
99
{
10-
public override string Name => "WearableAnimatedSpriteComponent";
10+
public override string Name => "WearableAnimatedSprite";
1111
public bool IsCurrentlyWorn = false;
1212
public bool IsCurrentlyCarried = false;
1313

@@ -42,7 +42,7 @@ public override ComponentReplyMessage RecieveMessage(object sender, ComponentMes
4242
public override ComponentState GetComponentState()
4343
{
4444
var masterUid = master != null ? (int?)master.Owner.Uid : null;
45-
return new WearableAnimatedSpriteComponentState(IsCurrentlyWorn, IsCurrentlyCarried, Visible, DrawDepth, Name, CurrentAnimation, Loop, masterUid);
45+
return new WearableAnimatedSpriteComponentState(IsCurrentlyWorn, IsCurrentlyCarried, Visible, DrawDepth, SpriteName, CurrentAnimation, Loop, masterUid);
4646
}
4747
}
4848
}

SS14.Shared/Prototypes/EntityPrototype.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using SFML.System;
1+
using SFML.System;
22
using SS14.Shared.IoC;
33
using SS14.Shared.IoC.Exceptions;
44
using SS14.Shared.ContentLoader;
@@ -9,6 +9,7 @@
99
using System.Linq;
1010
using System.Threading;
1111
using YamlDotNet.RepresentationModel;
12+
using SS14.Shared.Log;
1213

1314
namespace SS14.Shared.GameObjects
1415
{
@@ -256,6 +257,7 @@ public Entity CreateEntity(EntityManager manager)
256257
// Ignore nonexistant ones.
257258
// This is kind of inefficient but we'll do the sanity on prototype creation
258259
// Once the dependency injection stack is fixed.
260+
LogManager.Log(string.Format("Unable to load prototype component. UnknowComponentException occured for componentKey `{0}`", componentData.Key));
259261
continue;
260262
}
261263
component.LoadParameters(componentData.Value);

0 commit comments

Comments
 (0)