Skip to content

Commit

Permalink
Fix broken prototypes for AnimatedWearables (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
psykzz authored and ZoldorfTheWizard committed May 29, 2017
1 parent b92eae1 commit 000d23a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace SS14.Server.GameObjects
[IoCTarget]
public class WearableAnimatedSpriteComponent : AnimatedSpriteComponent
{
public override string Name => "WearableAnimatedSpriteComponent";
public override string Name => "WearableAnimatedSprite";
public bool IsCurrentlyWorn = false;
public bool IsCurrentlyCarried = false;

Expand Down Expand Up @@ -42,7 +42,7 @@ public override ComponentReplyMessage RecieveMessage(object sender, ComponentMes
public override ComponentState GetComponentState()
{
var masterUid = master != null ? (int?)master.Owner.Uid : null;
return new WearableAnimatedSpriteComponentState(IsCurrentlyWorn, IsCurrentlyCarried, Visible, DrawDepth, Name, CurrentAnimation, Loop, masterUid);
return new WearableAnimatedSpriteComponentState(IsCurrentlyWorn, IsCurrentlyCarried, Visible, DrawDepth, SpriteName, CurrentAnimation, Loop, masterUid);
}
}
}
4 changes: 3 additions & 1 deletion SS14.Shared/Prototypes/EntityPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using SFML.System;
using SFML.System;
using SS14.Shared.IoC;
using SS14.Shared.IoC.Exceptions;
using SS14.Shared.ContentLoader;
Expand All @@ -9,6 +9,7 @@
using System.Linq;
using System.Threading;
using YamlDotNet.RepresentationModel;
using SS14.Shared.Log;

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

0 comments on commit 000d23a

Please sign in to comment.