Skip to content

Commit

Permalink
Fix Felinid system (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
DebugOk committed Sep 27, 2023
1 parent 8d4df7e commit 3287931
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
16 changes: 13 additions & 3 deletions Content.Server/Nyanotrasen/Abilities/Felinid/FelinidComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ public sealed partial class FelinidComponent : Component
//[DataField("hairballAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
//public string HairballAction = "ActionHairball";

[DataField("hairballActionId",
customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? HairballActionId = "ActionHairball";

[DataField("hairballAction")]
public EntityUid? HairballAction = null;
public EntityUid? HairballAction;

public EntityUid? EatActionTarget = null;
[DataField("eatActionId",
customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? EatActionId = "ActionEatMouse";

public EntityUid? EatAction = null;
[DataField("eatAction")]
public EntityUid? EatAction;

[DataField("eatActionTarget")]
public EntityUid? EatActionTarget = null;
}
8 changes: 4 additions & 4 deletions Content.Server/Nyanotrasen/Abilities/Felinid/FelinidSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ private void OnInit(EntityUid uid, FelinidComponent component, ComponentInit arg
if (component.HairballAction != null)
return;

component.HairballAction = Spawn("ActionHairball");
_actionsSystem.AddAction(uid, component.HairballAction.Value, uid);
//component.HairballAction = Spawn("ActionHairball");
_actionsSystem.AddAction(uid, ref component.HairballAction, component.HairballActionId);
}

private void OnEquipped(EntityUid uid, FelinidComponent component, DidEquipHandEvent args)
Expand All @@ -85,8 +85,8 @@ private void OnEquipped(EntityUid uid, FelinidComponent component, DidEquipHandE

component.EatActionTarget = args.Equipped;

component.EatAction = Spawn("ActionEatMouse");
_actionsSystem.AddAction(uid, ref component.EatAction, null);
//component.EatAction = Spawn("ActionEatMouse");
_actionsSystem.AddAction(uid, ref component.EatAction, component.EatActionId);
}

private void OnUnequipped(EntityUid uid, FelinidComponent component, DidUnequipHandEvent args)
Expand Down

0 comments on commit 3287931

Please sign in to comment.