-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/dvir001/frontier-station-14…
… into 2024-12-27-Tape
- Loading branch information
Showing
98 changed files
with
3,709 additions
and
1,205 deletions.
There are no files selected for viewing
59 changes: 0 additions & 59 deletions
59
Content.IntegrationTests/Tests/Nyanotrasen/DeepFryerTest.cs
This file was deleted.
Oops, something went wrong.
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
44 changes: 44 additions & 0 deletions
44
Content.Server/_NF/Construction/Conditions/NFStrapEmpty.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,44 @@ | ||
using Content.Shared.Construction; | ||
using JetBrains.Annotations; | ||
using Content.Shared.Examine; | ||
using Content.Shared.Buckle.Components; | ||
|
||
namespace Content.Server.Construction.Conditions; | ||
|
||
[UsedImplicitly] | ||
[DataDefinition] | ||
public sealed partial class NFStrapEmpty : IGraphCondition | ||
{ | ||
public bool Condition(EntityUid uid, IEntityManager entityManager) | ||
{ | ||
if (!entityManager.TryGetComponent(uid, out StrapComponent? strap)) | ||
return true; // No strap, nothing can be buckled. | ||
|
||
return strap.BuckledEntities.Count == 0; | ||
} | ||
|
||
public bool DoExamine(ExaminedEvent args) | ||
{ | ||
var entity = args.Examined; | ||
|
||
var entMan = IoCManager.Resolve<IEntityManager>(); | ||
|
||
if (!entMan.TryGetComponent(entity, out StrapComponent? strap)) return false; | ||
|
||
if (strap.BuckledEntities.Count > 0) | ||
{ | ||
args.PushMarkup(Loc.GetString("construction-examine-condition-nf-strap-empty", ("entityName", entMan.GetComponent<MetaDataComponent>(entity).EntityName)) + "\n"); | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
public IEnumerable<ConstructionGuideEntry> GenerateGuideEntry() | ||
{ | ||
yield return new ConstructionGuideEntry() | ||
{ | ||
Localization = "construction-step-condition-nf-strap-empty" | ||
}; | ||
} | ||
} |
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
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.