-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'wizmerge' of https://github.com/sleepyyapril/Einstein-E…
…ngines into wizmerge
- Loading branch information
Showing
12 changed files
with
433 additions
and
33 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
Content.Server/Clothing/Systems/LoadoutSystem.Functions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using JetBrains.Annotations; | ||
using Robust.Shared.Serialization.Manager; | ||
using Content.Shared.Clothing.Loadouts.Prototypes; | ||
using Content.Server.NPC.Components; | ||
using Content.Server.NPC.Systems; | ||
using Content.Server.NPC.HTN; | ||
using Content.Server.NPC; | ||
using Robust.Shared.Map; | ||
using System.Numerics; | ||
|
||
namespace Content.Server.Clothing.Systems; | ||
|
||
[UsedImplicitly] | ||
public sealed partial class LoadoutMakeFollower : LoadoutFunction | ||
{ | ||
public override void OnPlayerSpawn(EntityUid character, | ||
EntityUid loadoutEntity, | ||
IComponentFactory factory, | ||
IEntityManager entityManager, | ||
ISerializationManager serializationManager) | ||
{ | ||
var npc = entityManager.System<NPCSystem>(); | ||
var htn = entityManager.System<HTNSystem>(); | ||
if (!entityManager.TryGetComponent<HTNComponent>(loadoutEntity, out var hTNComponent)) | ||
return; | ||
|
||
npc.SetBlackboard(loadoutEntity, NPCBlackboard.FollowTarget, new EntityCoordinates(character, Vector2.Zero), hTNComponent); | ||
htn.Replan(hTNComponent); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.