-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Turn world manager into a BackgroundService * Abstractions refactor pt.1 * Update Region.cs * Abstractions refactor pt.2 * Move world generator registering to WorldManager * abstractions pt.3 * Use packet broadcaster * Fix event parameters * Simplify ConsoleApp.Program.cs * Refactor Living.cs * A little cleanup * WE START WOOOOO * Update Player.cs * oop * Fix up some NREs and wait for worlds to be ready * Region loading does not need to be blocked * Add a direct send method that won't get processed through the queue * Just use JsonNamingPolicy.SnakeCaseLower :)) * world gen status * Fix strange chunk unloading bug * Forgot to save O_O * Update OperatorList & IOperatorList * Last bit refactor * Make user cache a service instead * Add sealed modifier to most classes (final commit) * OKAY ACTUAL FINAL COMMIT * Fix bug loading worlds from disk * Document the non self explanatory properties in config --------- Co-authored-by: Jon Pro <[email protected]>
- Loading branch information
Showing
87 changed files
with
1,119 additions
and
951 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Obsidian.API.Events; | ||
namespace Obsidian.API.Events; | ||
|
||
public class ContainerEventArgs : PlayerEventArgs | ||
{ | ||
public required BaseContainer Container { get; init; } | ||
|
||
protected ContainerEventArgs(IPlayer player) : base(player) | ||
protected ContainerEventArgs(IPlayer player, IServer server) : base(player, server) | ||
{ | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Obsidian.API; | ||
public interface IRegion : IAsyncDisposable | ||
{ | ||
public int X { get; } | ||
public int Z { get; } | ||
|
||
public int LoadedChunkCount { get; } | ||
|
||
public string RegionFolder { get; } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Obsidian.API; | ||
public interface IWorldManager : IAsyncDisposable | ||
{ | ||
public bool ReadyToJoin { get; } | ||
|
||
public Dictionary<string, Type> WorldGenerators { get; } | ||
|
||
public int GeneratingChunkCount { get; } | ||
public int LoadedChunkCount { get; } | ||
|
||
public int RegionCount { get; } | ||
|
||
public IWorld DefaultWorld { get; } | ||
|
||
public IReadOnlyCollection<IWorld> GetAvailableWorlds(); | ||
|
||
public Task FlushLoadedWorldsAsync(); | ||
|
||
public Task TickWorldsAsync(); | ||
|
||
public bool TryGetWorld(string name, [NotNullWhen(true)] out IWorld? world); | ||
public bool TryGetWorld<TWorld>(string name, [NotNullWhen(true)] out TWorld? world) where TWorld : IWorld; | ||
} |
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,4 +1,4 @@ | ||
namespace Obsidian.API._Types.Config; | ||
namespace Obsidian.API.Config; | ||
|
||
public class RconConfig | ||
{ | ||
|
Oops, something went wrong.