-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Теперь проще убирать следы Signed-off-by: pacable <[email protected]> * чистобот чистит грязь лучше Signed-off-by: pacable <[email protected]> * Revert "добавление возможности выключать следы (#655)" This reverts commit ae78fa1 Signed-off-by: pacable <[email protected]> * postfix Signed-off-by: pacable <[email protected]> * исправление чистящих гранат по отношению к следам Signed-off-by: pacable <[email protected]> --------- Signed-off-by: pacable <[email protected]>
- Loading branch information
Showing
10 changed files
with
54 additions
and
36 deletions.
There are no files selected for viewing
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
24 changes: 24 additions & 0 deletions
24
Content.Server/_Sunrise/Cleaning/FoorprintAreaCleaningSystem.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,24 @@ | ||
using Content.Shared._Sunrise.Footprints; | ||
using Robust.Shared.Physics.Events; | ||
|
||
namespace Content.Server._Sunrise.Cleaning; | ||
|
||
public sealed class FoorprintAreaCleaningSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly EntityManager _entMan = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<FootprintAreaCleanerComponent, StartCollideEvent>(OnCollide); | ||
} | ||
|
||
private void OnCollide(EntityUid uid, FootprintAreaCleanerComponent component, StartCollideEvent args) | ||
{ | ||
if (!TryComp<FootprintComponent>(args.OtherEntity, out _) || !component.Enabled) | ||
return; | ||
|
||
_entMan.QueueDeleteEntity(args.OtherEntity); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
Content.Server/_Sunrise/Cleaning/FootprintAreaCleanerComponent.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,8 @@ | ||
namespace Content.Server._Sunrise.Cleaning; | ||
|
||
[RegisterComponent] | ||
public sealed partial class FootprintAreaCleanerComponent : Component | ||
{ | ||
[DataField] | ||
public bool Enabled = true; | ||
} |
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