-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
398 changed files
with
538,670 additions
and
485,342 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using Content.Shared.ADT.Materials; | ||
|
||
namespace Content.Client.ADT.Materials; | ||
|
||
public sealed class AutoMaterialInsertSystem : SharedAutoMaterialInsertSystem | ||
{ | ||
} |
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 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
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
45 changes: 45 additions & 0 deletions
45
Content.Server/ADT/AdditionalMapLoader/AdditionalMapLoaderSystem.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,45 @@ | ||
using Content.Server.GameTicking; | ||
using Robust.Shared.Map; | ||
using Robust.Shared.Prototypes; | ||
|
||
// Author: by TornadoTech | ||
namespace Content.Server.ADT.AdditionalMapLoader; | ||
|
||
public sealed class AdditionalMapLoaderSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly GameTicking.GameTicker _gameTicker = default!; | ||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; | ||
[Dependency] private readonly IMapManager _mapManager = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<LoadingMapsEvent>(OnGetMaps); | ||
} | ||
|
||
private void OnGetMaps(LoadingMapsEvent args) | ||
{ | ||
var firstMap = args.Maps[0]; | ||
if (!_prototypeManager.TryIndex<AdditionalMapPrototype>(firstMap.ID, out var proto)) | ||
return; | ||
|
||
foreach (var mapProtoId in proto.MapProtoIds) | ||
{ | ||
if (!_prototypeManager.TryIndex(mapProtoId, out var mapProto)) | ||
{ | ||
Log.Error($"Prototype not found with ID '{mapProtoId.Id}' in '{proto.ID}'. " + | ||
$"Please ensure this prototype exists in '- type: additionalMap' check `maps:`!!"); | ||
continue; | ||
} | ||
CreateAndInitializeMap(mapProto); | ||
} | ||
} | ||
private void CreateAndInitializeMap(Maps.GameMapPrototype mapProto) | ||
{ | ||
var map = _mapManager.CreateMap(); | ||
_mapManager.AddUninitializedMap(map); | ||
_gameTicker.LoadGameMap(mapProto, map, null); | ||
_mapManager.DoMapInitialize(map); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
Content.Server/ADT/AdditionalMapLoader/AdditionalMapPrototype.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,15 @@ | ||
using Content.Server.Maps; | ||
using Robust.Shared.Prototypes; | ||
|
||
// Author: by TornadoTech | ||
namespace Content.Server.ADT.AdditionalMapLoader; | ||
|
||
[Prototype("additionalMap")] | ||
public sealed class AdditionalMapPrototype : IPrototype | ||
{ | ||
[IdDataField] | ||
public string ID { get; } = string.Empty; | ||
|
||
[DataField("maps")] | ||
public List<ProtoId<GameMapPrototype>> MapProtoIds = new(); | ||
} |
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,7 @@ | ||
using Content.Shared.ADT.Materials; | ||
|
||
namespace Content.Server.ADT.Materials; | ||
|
||
public sealed class AutoMaterialInsertSystem : SharedAutoMaterialInsertSystem | ||
{ | ||
} |
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.