-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vehicle signs and requests are mostly working. Worked on some TODO st…
…uff.
- Loading branch information
1 parent
8589893
commit 400c936
Showing
29 changed files
with
801 additions
and
2,112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
using Uncreated.Warfare.Interaction.Commands; | ||
using Uncreated.Warfare.Buildables; | ||
using Uncreated.Warfare.Interaction.Commands; | ||
using Uncreated.Warfare.Logging; | ||
using Uncreated.Warfare.Translations; | ||
using Uncreated.Warfare.Util; | ||
|
||
namespace Uncreated.Warfare.Commands; | ||
|
||
[Command("buildables", "structures", "barricades", "buildable", "structure", "barricade", "struct", "b", "s"), SubCommandOf(typeof(ClearCommand))] | ||
public class ClearBuildablesCommand : IExecutableCommand | ||
{ | ||
private readonly BuildableSaver _buildableSaver; | ||
private readonly ClearTranslations _translations; | ||
|
||
public CommandContext Context { get; set; } | ||
public ClearBuildablesCommand(TranslationInjection<ClearTranslations> translations) | ||
public ClearBuildablesCommand(TranslationInjection<ClearTranslations> translations, BuildableSaver buildableSaver) | ||
{ | ||
_buildableSaver = buildableSaver; | ||
_translations = translations.Value; | ||
} | ||
|
||
public UniTask ExecuteAsync(CancellationToken token) | ||
public async UniTask ExecuteAsync(CancellationToken token) | ||
{ | ||
// todo | ||
//Data.Gamemode.ReplaceBarricadesAndStructures(); | ||
await _buildableSaver.DestroyUnsavedBuildables(Context.CallerId, token).ConfigureAwait(false); | ||
|
||
await UniTask.SwitchToMainThread(token); | ||
|
||
Context.LogAction(ActionLogType.ClearStructures); | ||
Context.Reply(_translations.ClearStructures); | ||
|
||
return UniTask.CompletedTask; | ||
} | ||
} |
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
Oops, something went wrong.