Port DeltaV Lavaland Initial (2)
This commit is contained in:
@@ -2,10 +2,11 @@ using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Parallax;
|
||||
using Content.Shared.DeltaV.Planet;
|
||||
using Content.Shared.Parallax.Biomes;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.EntitySerialization.Systems;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.DeltaV.Planet;
|
||||
|
||||
@@ -14,9 +15,9 @@ public sealed class PlanetSystem : EntitySystem
|
||||
[Dependency] private readonly AtmosphereSystem _atmos = default!;
|
||||
[Dependency] private readonly BiomeSystem _biome = default!;
|
||||
[Dependency] private readonly IPrototypeManager _proto = default!;
|
||||
[Dependency] private readonly MapSystem _map = default!;
|
||||
[Dependency] private readonly MapLoaderSystem _mapLoader = default!;
|
||||
[Dependency] private readonly MetaDataSystem _meta = default!;
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
|
||||
private readonly List<(Vector2i, Tile)> _setTiles = new();
|
||||
|
||||
@@ -51,11 +52,11 @@ public sealed class PlanetSystem : EntitySystem
|
||||
/// Spawns an initialized planet map from a planet prototype and loads a grid onto it.
|
||||
/// Returns the map entity if loading succeeded.
|
||||
/// </summary>
|
||||
public EntityUid? LoadPlanet(ProtoId<PlanetPrototype> id, string path)
|
||||
public EntityUid? LoadPlanet(ProtoId<PlanetPrototype> id, ResPath path)
|
||||
{
|
||||
var map = SpawnPlanet(id, runMapInit: false);
|
||||
var mapId = Comp<MapComponent>(map).MapId;
|
||||
if (!_mapLoader.TryLoad(mapId, path, out var grids))
|
||||
if (!_mapLoader.TryLoadGrid(mapId, path, out var grid))
|
||||
{
|
||||
Log.Error($"Failed to load planet grid {path} for planet {id}!");
|
||||
Del(map);
|
||||
@@ -63,12 +64,9 @@ public sealed class PlanetSystem : EntitySystem
|
||||
}
|
||||
|
||||
// don't want rocks spawning inside the base
|
||||
foreach (var gridUid in grids)
|
||||
{
|
||||
_setTiles.Clear();
|
||||
var aabb = Comp<MapGridComponent>(gridUid).LocalAABB;
|
||||
_biome.ReserveTiles(map, aabb.Enlarged(0.2f), _setTiles);
|
||||
}
|
||||
_setTiles.Clear();
|
||||
var aabb = Comp<MapGridComponent>(grid.Value).LocalAABB;
|
||||
_biome.ReserveTiles(map, aabb.Enlarged(0.2f), _setTiles);
|
||||
|
||||
_map.InitializeMap(map);
|
||||
return map;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Content.Server.Shuttles.Events;
|
||||
using Content.Server.Station.Components;
|
||||
using Content.Server.Station.Systems;
|
||||
using Content.Shared.DeltaV.Shuttles.Components;
|
||||
using Content.Shared.DeltaV.Shuttles.Systems;
|
||||
using Content.Shared.Shuttles.Components;
|
||||
using Content.Shared.Station.Components;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Map.Components;
|
||||
using System.Linq;
|
||||
|
||||
@@ -20,7 +20,7 @@ public sealed class StationPlanetSpawnerSystem : EntitySystem
|
||||
if (ent.Comp.GridPath is not {} path)
|
||||
return;
|
||||
|
||||
ent.Comp.Map = _planet.LoadPlanet(ent.Comp.Planet, path.ToString());
|
||||
ent.Comp.Map = _planet.LoadPlanet(ent.Comp.Planet, path);
|
||||
}
|
||||
|
||||
private void OnShutdown(Entity<StationPlanetSpawnerComponent> ent, ref ComponentShutdown args)
|
||||
|
||||
@@ -1300,18 +1300,6 @@ entities:
|
||||
- type: Transform
|
||||
pos: 11.5,3.5
|
||||
parent: 1
|
||||
- proto: FoodPSB
|
||||
entities:
|
||||
- uid: 184
|
||||
components:
|
||||
- type: Transform
|
||||
pos: -4.5806994,-2.5397594
|
||||
parent: 1
|
||||
- uid: 185
|
||||
components:
|
||||
- type: Transform
|
||||
pos: -4.5650744,-2.2741344
|
||||
parent: 1
|
||||
- proto: GasMixer
|
||||
entities:
|
||||
- uid: 186
|
||||
@@ -3804,15 +3792,6 @@ entities:
|
||||
rot: 1.5707963267948966 rad
|
||||
pos: -8.5,-4.5
|
||||
parent: 1
|
||||
- proto: WarpPointSalvage
|
||||
entities:
|
||||
- uid: 545
|
||||
components:
|
||||
- type: Transform
|
||||
pos: 0.5,0.5
|
||||
parent: 1
|
||||
- type: WarpPoint
|
||||
location: Mining Station
|
||||
- proto: WeaponProtoKineticAccelerator
|
||||
entities:
|
||||
- uid: 546
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
- type: entity
|
||||
parent: BaseComputerCircuitboard
|
||||
id: MiningShuttleConsoleCircuitboard
|
||||
name: mining shuttle console board
|
||||
description: A printed circuit board for a mining shuttle console.
|
||||
components:
|
||||
- type: Sprite
|
||||
state: cpu_supply
|
||||
- type: ComputerBoard
|
||||
prototype: ComputerShuttleMining
|
||||
7
Resources/Prototypes/DeltaV/Entities/Stations/base.yml
Normal file
7
Resources/Prototypes/DeltaV/Entities/Stations/base.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
- type: entity
|
||||
abstract: true
|
||||
id: BaseStationLavaland
|
||||
components:
|
||||
- type: StationPlanetSpawner
|
||||
planet: Lavaland
|
||||
gridPath: /Maps/Nonstations/DeltaV/lavaland_mining_base.yml
|
||||
@@ -0,0 +1,24 @@
|
||||
# this goes on lavaland, unlimited
|
||||
- type: entity
|
||||
parent: AirlockGlassShuttle
|
||||
id: AirlockExternalGlassShuttleMining
|
||||
suffix: External, Mining, Glass, Docking, Locked
|
||||
components:
|
||||
- type: PriorityDock
|
||||
tag: DockMining
|
||||
- type: ContainerFill
|
||||
containers:
|
||||
board: [ DoorElectronicsExternal ]
|
||||
|
||||
# 1 per map, this spawns the mining shuttle
|
||||
- type: entity
|
||||
parent: AirlockExternalGlassShuttleMining
|
||||
id: AirlockExternalGlassShuttleMiningFilled
|
||||
suffix: Mining, Filled, Locked
|
||||
components:
|
||||
- type: GridFill
|
||||
path: /Maps/Shuttles/DeltaV/mining.yml
|
||||
addComponents:
|
||||
- type: IFF
|
||||
flags:
|
||||
- HideLabel
|
||||
@@ -0,0 +1,50 @@
|
||||
- type: entity
|
||||
abstract: true
|
||||
parent: BaseComputer
|
||||
id: BaseComputerDocking
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- map: [ "computerLayerBody" ]
|
||||
state: computer
|
||||
- map: [ "computerLayerKeyboard" ]
|
||||
state: generic_keyboard
|
||||
- map: [ "computerLayerScreen" ]
|
||||
state: shuttle
|
||||
- map: ["computerLayerKeys" ]
|
||||
state: generic_keys
|
||||
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
|
||||
state: generic_panel_open
|
||||
- type: ActivatableUI
|
||||
key: enum.DockingConsoleUiKey.Key
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
enum.DockingConsoleUiKey.Key:
|
||||
type: DockingConsoleBoundUserInterface
|
||||
enum.WiresUiKey.Key:
|
||||
type: WiresBoundUserInterface
|
||||
- type: WorldLoader
|
||||
radius: 256
|
||||
- type: DockingConsole
|
||||
- type: PointLight
|
||||
radius: 1.5
|
||||
energy: 1.6
|
||||
color: "#43ccb5"
|
||||
|
||||
- type: entity
|
||||
parent: BaseComputerDocking
|
||||
id: ComputerShuttleMining
|
||||
name: mining shuttle console
|
||||
description: Used to pilot the mining shuttle to and from the mining base.
|
||||
components:
|
||||
- type: DockingConsole
|
||||
windowTitle: mining-console-window-title
|
||||
dockTag: DockMining
|
||||
shuttleWhitelist:
|
||||
components:
|
||||
- MiningShuttle
|
||||
- type: Computer
|
||||
board: MiningShuttleConsoleCircuitboard
|
||||
- type: AccessReader
|
||||
access:
|
||||
- [ Salvage ]
|
||||
2
Resources/Prototypes/DeltaV/tags.yml
Normal file
2
Resources/Prototypes/DeltaV/tags.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
- type: Tag
|
||||
id: DockMining
|
||||
26
Resources/Prototypes/planets.yml
Normal file
26
Resources/Prototypes/planets.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
- type: planet
|
||||
id: Lavaland
|
||||
biome: Lava
|
||||
mapName: shuttle-destination-lavaland
|
||||
mapLight: "#A34931"
|
||||
addedComponents:
|
||||
- type: FTLDestination
|
||||
whitelist:
|
||||
components:
|
||||
- MiningShuttle
|
||||
atmosphere:
|
||||
volume: 2500
|
||||
temperature: 353.15 # 80C
|
||||
moles: # 120kPa, 14% O2 (unbreathable)
|
||||
- 14.38346
|
||||
- 88.35554
|
||||
biomeMarkerLayers:
|
||||
- OreIron
|
||||
- OreQuartz
|
||||
- OreCoal
|
||||
- OreGold
|
||||
- OreSilver
|
||||
- OrePlasma
|
||||
- OreUranium
|
||||
- OreDiamond
|
||||
- OreArtifactFragment
|
||||
Reference in New Issue
Block a user