Revert biome rework (#38724)
* Revert "Fix world generation (#38713)" This reverts commit10fa6ff4af. * Revert "Biome rework (#37735)" This reverts commitfe7b96147c.
This commit is contained in:
committed by
GitHub
parent
047a49a505
commit
e99fc501a6
@@ -1,11 +1,20 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Procedural;
|
||||
using Content.Server.Atmos;
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Parallax;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Procedural.Components;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Gravity;
|
||||
using Content.Shared.Movement.Components;
|
||||
using Content.Shared.Parallax.Biomes;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Maps;
|
||||
|
||||
@@ -43,7 +52,7 @@ public sealed class PlanetCommand : LocalizedEntityCommands
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_protoManager.TryIndex<EntityPrototype>(args[1], out var biomeTemplate))
|
||||
if (!_protoManager.TryIndex<BiomeTemplatePrototype>(args[1], out var biomeTemplate))
|
||||
{
|
||||
shell.WriteError(Loc.GetString("cmd-planet-map-prototype", ("prototype", args[1])));
|
||||
return;
|
||||
@@ -61,12 +70,9 @@ public sealed class PlanetCommand : LocalizedEntityCommands
|
||||
if (args.Length == 1)
|
||||
return CompletionResult.FromHintOptions(CompletionHelper.MapIds(_entManager), "Map Id");
|
||||
|
||||
var biomeName = _entManager.ComponentFactory.GetComponentName<BiomeComponent>();
|
||||
|
||||
if (args.Length == 2)
|
||||
{
|
||||
var options = _protoManager.EnumeratePrototypes<EntityPrototype>()
|
||||
.Where(o => o.Components.ContainsKey(biomeName))
|
||||
var options = _protoManager.EnumeratePrototypes<BiomeTemplatePrototype>()
|
||||
.Select(o => new CompletionOption(o.ID, "Biome"));
|
||||
return CompletionResult.FromOptions(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user