diff --git a/Content.Server/Warps/WarpPointComponent.cs b/Content.Server/Warps/WarpPointComponent.cs index ce169f2e195..ba2ab3ffba9 100644 --- a/Content.Server/Warps/WarpPointComponent.cs +++ b/Content.Server/Warps/WarpPointComponent.cs @@ -6,8 +6,11 @@ namespace Content.Server.Warps [RegisterComponent] public sealed partial class WarpPointComponent : Component { + // Corvax-Next-Warper-Start: Unique (across all loaded maps) identifier for teleporting to warp points. + [ViewVariables(VVAccess.ReadWrite)] [DataField("id")] public string? ID { get; set; } [ViewVariables(VVAccess.ReadWrite), DataField] public string? Location; + // Corvax-Next-Warper-End /// /// If true, ghosts warping to this entity will begin following it. diff --git a/Content.Server/Warps/WarpPointSystem.cs b/Content.Server/Warps/WarpPointSystem.cs index d3b978a147d..fc750fb79e6 100644 --- a/Content.Server/Warps/WarpPointSystem.cs +++ b/Content.Server/Warps/WarpPointSystem.cs @@ -1,3 +1,4 @@ +using System.Linq; using Content.Shared.Examine; using Content.Shared.Ghost; @@ -5,12 +6,18 @@ namespace Content.Server.Warps; public sealed class WarpPointSystem : EntitySystem { + private Dictionary warpPoints = new Dictionary(); // Corvax-Next-Warper + public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnWarpPointExamine); } + // Corvax-Next-Warper-Start + public EntityUid? FindWarpPoint(string id) => IoCManager.Resolve().EntityQuery(true).FirstOrDefault(p => p.ID == id)?.Owner; + // Corvax-Next-Warper-End + private void OnWarpPointExamine(EntityUid uid, WarpPointComponent component, ExaminedEvent args) { if (!HasComp(args.Examiner)) diff --git a/Content.Server/_CorvaxNext/AdditionalMap/AdditionalMapFixComponent.cs b/Content.Server/_CorvaxNext/AdditionalMap/AdditionalMapFixComponent.cs new file mode 100644 index 00000000000..4f04e766fca --- /dev/null +++ b/Content.Server/_CorvaxNext/AdditionalMap/AdditionalMapFixComponent.cs @@ -0,0 +1,4 @@ +namespace Content.Server._CorvaxNext.AdditionalMap; + +[RegisterComponent] +public sealed partial class AdditionalMapFixComponent : Component; diff --git a/Content.Server/_CorvaxNext/AdditionalMap/AdditionalMapFixSystem.cs b/Content.Server/_CorvaxNext/AdditionalMap/AdditionalMapFixSystem.cs new file mode 100644 index 00000000000..9e80db2d01a --- /dev/null +++ b/Content.Server/_CorvaxNext/AdditionalMap/AdditionalMapFixSystem.cs @@ -0,0 +1,34 @@ +using System.Threading; +using Content.Server.Atmos.Components; +using Content.Server.GameTicking; +using Content.Server.Shuttles.Systems; +using Content.Server.Station.Events; +using Robust.Server.Console; +using Timer = Robust.Shared.Timing.Timer; + +namespace Content.Server._CorvaxNext.AdditionalMapFix; +public sealed class AdditionalMapFix : EntitySystem +{ + [Dependency] private readonly IServerConsoleHost _host = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnStartup, after: new[] { typeof(ShuttleSystem) }); + } + + private void OnStartup(ref StationPostInitEvent args) + { + Timer.Spawn(TimeSpan.FromSeconds(5), () => + { + var query = AllEntityQuery(); + + while (query.MoveNext(out var dummyatmos, out var comp)) + { + var gridUid = comp.GridUid; + _host.AppendCommand($"fixgridatmos {gridUid}"); + Logger.Error($"executed command on {gridUid}"); + } + }); + } +} diff --git a/Content.Server/_CorvaxNext/AdditionalMap/StationAdditionalMapComponent.cs b/Content.Server/_CorvaxNext/AdditionalMap/StationAdditionalMapComponent.cs new file mode 100644 index 00000000000..142bba7e80f --- /dev/null +++ b/Content.Server/_CorvaxNext/AdditionalMap/StationAdditionalMapComponent.cs @@ -0,0 +1,23 @@ +/* + * All right reserved to CrystallEdge. + * + * BUT this file is sublicensed under MIT License + * + */ + +using Robust.Shared.Utility; + +namespace Content.Server._CorvaxNext.AdditionalMap; + +/// +/// Loads additional maps from the list at the start of the round. +/// +[RegisterComponent, Access(typeof(StationAdditionalMapSystem))] +public sealed partial class StationAdditionalMapComponent : Component +{ + /// + /// A map paths to load on a new map. + /// + [DataField] + public List MapPaths = new(); +} diff --git a/Content.Server/_CorvaxNext/AdditionalMap/StationAdditionalMapSystem.cs b/Content.Server/_CorvaxNext/AdditionalMap/StationAdditionalMapSystem.cs new file mode 100644 index 00000000000..ff66f934d7a --- /dev/null +++ b/Content.Server/_CorvaxNext/AdditionalMap/StationAdditionalMapSystem.cs @@ -0,0 +1,53 @@ +/* + * All right reserved to CrystallEdge. + * + * BUT this file is sublicensed under MIT License + * + */ + +using Content.Server.Parallax; +using Content.Server.Station.Components; +using Content.Server.Station.Events; +using Content.Server.Station.Systems; +using Content.Shared.Teleportation.Systems; +using Robust.Server.GameObjects; +using Robust.Server.Maps; +using Robust.Shared.Prototypes; + +namespace Content.Server._CorvaxNext.AdditionalMap; + +public sealed partial class StationAdditionalMapSystem : EntitySystem +{ + [Dependency] private readonly BiomeSystem _biome = default!; + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly MapSystem _map = default!; + [Dependency] private readonly MetaDataSystem _metaData = default!; + [Dependency] private readonly LinkedEntitySystem _linkedEntity = default!; + [Dependency] private readonly StationSystem _station = default!; + [Dependency] private readonly MapLoaderSystem _mapLoader = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnStationPostInit); + } + + private void OnStationPostInit(Entity addMap, ref StationPostInitEvent args) + { + if (!TryComp(addMap, out StationDataComponent? dataComp)) + return; + + foreach (var path in addMap.Comp.MapPaths) + { + var mapUid = _map.CreateMap(out var mapId); + Log.Info($"Created map {mapId} for StationAdditionalMap system"); + var options = new MapLoadOptions { LoadMap = true }; + if (!_mapLoader.TryLoad(mapId, path.ToString(), out var roots, options)) + { + Log.Error($"Failed to load map from {path}!"); + Del(mapUid); + return; + } + } + } +} diff --git a/Content.Server/_CorvaxNext/BiomeSpawner/Components/BiomeSpawnerComponent.cs b/Content.Server/_CorvaxNext/BiomeSpawner/Components/BiomeSpawnerComponent.cs new file mode 100644 index 00000000000..5b9228aad0c --- /dev/null +++ b/Content.Server/_CorvaxNext/BiomeSpawner/Components/BiomeSpawnerComponent.cs @@ -0,0 +1,22 @@ +/* + * All right reserved to CrystallEdge. + * + * BUT this file is sublicensed under MIT License + * + */ + +using Content.Server._CorvaxNext.BiomeSpawner.EntitySystems; +using Content.Shared.Parallax.Biomes; +using Robust.Shared.Prototypes; + +namespace Content.Server._CorvaxNext.BiomeSpawner.Components; + +/// +/// fills the tile in which it is located with the contents of the biome. Includes: tile, decals and entities +/// +[RegisterComponent, Access(typeof(BiomeSpawnerSystem))] +public sealed partial class BiomeSpawnerComponent : Component +{ + [DataField] + public ProtoId Biome = "Grasslands"; +} diff --git a/Content.Server/_CorvaxNext/BiomeSpawner/EntitySystems/BiomeSpawnerSystem.cs b/Content.Server/_CorvaxNext/BiomeSpawner/EntitySystems/BiomeSpawnerSystem.cs new file mode 100644 index 00000000000..1c92306bb1e --- /dev/null +++ b/Content.Server/_CorvaxNext/BiomeSpawner/EntitySystems/BiomeSpawnerSystem.cs @@ -0,0 +1,96 @@ +/* + * All right reserved to CrystallEdge. + * + * BUT this file is sublicensed under MIT License + * + */ + +using System.Linq; +using Content.Server._CorvaxNext.BiomeSpawner.Components; +using System.Numerics; +using Content.Server.Decals; +using Content.Server.GameTicking; +using Content.Server.Parallax; +using Robust.Server.GameObjects; +using Robust.Shared.Map; +using Robust.Shared.Map.Components; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; + +namespace Content.Server._CorvaxNext.BiomeSpawner.EntitySystems; + +public sealed class BiomeSpawnerSystem : EntitySystem +{ + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly BiomeSystem _biome = default!; + [Dependency] private readonly TransformSystem _transform = default!; + [Dependency] private readonly SharedMapSystem _maps = default!; + [Dependency] private readonly DecalSystem _decals = default!; + [Dependency] private readonly EntityLookupSystem _lookup = default!; + [Dependency] private readonly IRobustRandom _random = default!; + + private int _seed = 27; + + public override void Initialize() + { + SubscribeLocalEvent(OnRoundStartAttempt); + SubscribeLocalEvent(OnMapInit); + } + + private void OnRoundStartAttempt(RoundStartAttemptEvent ev) + { + _seed = _random.Next(100000); + } + + private void OnMapInit(Entity ent, ref MapInitEvent args) + { + SpawnBiome(ent); + QueueDel(ent); + } + + private void SpawnBiome(Entity ent) + { + var biome = _proto.Index(ent.Comp.Biome); + var spawnerTransform = Transform(ent); + if (spawnerTransform.GridUid == null) + return; + var gridUid = spawnerTransform.GridUid.Value; + if (!TryComp(gridUid, out var map)) + return; + + var vec = _transform.GetGridOrMapTilePosition(ent); + if (!_biome.TryGetTile(vec, biome.Layers, _seed, map, out var tile)) + return; + + // Set new tile + _maps.SetTile(gridUid, map, vec, tile.Value); + var tileCenterVec = vec + map.TileSizeHalfVector; + + // Remove old decals + var oldDecals = _decals.GetDecalsInRange(gridUid, tileCenterVec); + foreach (var (id, _) in oldDecals) + { + _decals.RemoveDecal(gridUid, id); + } + + //Add decals + if (_biome.TryGetDecals(vec, biome.Layers, _seed, map, out var decals)) + { + foreach (var decal in decals) + { + _decals.TryAddDecal(decal.ID, new EntityCoordinates(gridUid, decal.Position), out _); + } + } + + // Remove entities + var oldEntities = _lookup.GetEntitiesInRange(spawnerTransform.Coordinates, 0.48f); + // TODO: Replace this with GetEntitiesInBox2 + foreach (var entToRemove in oldEntities.Concat(new[] { ent.Owner })) // Do not remove self + { + QueueDel(entToRemove); + } + + if (_biome.TryGetEntity(vec, biome.Layers, tile.Value, _seed, map, out var entityProto)) + Spawn(entityProto, new EntityCoordinates(gridUid, tileCenterVec)); + } +} diff --git a/Content.Server/_CorvaxNext/Warper/WarperComponent.cs b/Content.Server/_CorvaxNext/Warper/WarperComponent.cs new file mode 100644 index 00000000000..59f458720ab --- /dev/null +++ b/Content.Server/_CorvaxNext/Warper/WarperComponent.cs @@ -0,0 +1,8 @@ +namespace Content.Server._CorvaxNext.Warper; + +[RegisterComponent] +public sealed partial class WarperComponent : Component +{ + /// Warp destination unique identifier. + [ViewVariables(VVAccess.ReadWrite)] [DataField("id")] public string? ID { get; set; } +} diff --git a/Content.Server/_CorvaxNext/Warper/WarperSystem.cs b/Content.Server/_CorvaxNext/Warper/WarperSystem.cs new file mode 100644 index 00000000000..e29faba73e2 --- /dev/null +++ b/Content.Server/_CorvaxNext/Warper/WarperSystem.cs @@ -0,0 +1,76 @@ +using Content.Server.Ghost.Components; +using Content.Server.Warps; +using Content.Server.Popups; +using Content.Shared.Ghost; +using Content.Shared.Interaction; +using Robust.Shared.Map; +using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; +using Robust.Shared.Player; +using System.Numerics; + +namespace Content.Server._CorvaxNext.Warper; + +public class WarperSystem : EntitySystem +{ + [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly SharedPhysicsSystem _physics = default!; + [Dependency] private readonly WarpPointSystem _warpPointSystem = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnInteractHand); + } + + private void OnInteractHand(EntityUid uid, WarperComponent component, InteractHandEvent args) + { + if (component.ID is null) + { + Logger.DebugS("warper", "Warper has no destination"); + _popupSystem.PopupEntity(Loc.GetString("warper-goes-nowhere", ("warper", args.Target)), args.User, Filter.Entities(args.User), true); + return; + } + + var dest = _warpPointSystem.FindWarpPoint(component.ID); + if (dest is null) + { + Logger.DebugS("warper", String.Format("Warp destination '{0}' not found", component.ID)); + _popupSystem.PopupEntity(Loc.GetString("warper-goes-nowhere", ("warper", args.Target)), args.User, Filter.Entities(args.User), true); + return; + } + + var entMan = IoCManager.Resolve(); + TransformComponent? destXform; + entMan.TryGetComponent(dest.Value, out destXform); + if (destXform is null) + { + Logger.DebugS("warper", String.Format("Warp destination '{0}' has no transform", component.ID)); + _popupSystem.PopupEntity(Loc.GetString("warper-goes-nowhere", ("warper", args.Target)), args.User, Filter.Entities(args.User), true); + return; + } + + // Check that the destination map is initialized and return unless in aghost mode. + var mapMgr = IoCManager.Resolve(); + var destMap = destXform.MapID; + if (!mapMgr.IsMapInitialized(destMap) || mapMgr.IsMapPaused(destMap)) + { + if (!entMan.HasComponent(args.User)) + { + // Normal ghosts cannot interact, so if we're here this is already an admin ghost. + Logger.DebugS("warper", String.Format("Player tried to warp to '{0}', which is not on a running map", component.ID)); + _popupSystem.PopupEntity(Loc.GetString("warper-goes-nowhere", ("warper", args.Target)), args.User, Filter.Entities(args.User), true); + return; + } + } + + var xform = entMan.GetComponent(args.User); + xform.Coordinates = destXform.Coordinates; + xform.AttachToGridOrMap(); + if (entMan.TryGetComponent(uid, out PhysicsComponent? phys)) + { + _physics.SetLinearVelocity(uid, Vector2.Zero); + } + } +} diff --git a/Content.Shared/Parallax/Biomes/SharedBiomeSystem.cs b/Content.Shared/Parallax/Biomes/SharedBiomeSystem.cs index 250b0f70a54..41c6f3f6784 100644 --- a/Content.Shared/Parallax/Biomes/SharedBiomeSystem.cs +++ b/Content.Shared/Parallax/Biomes/SharedBiomeSystem.cs @@ -118,7 +118,7 @@ public bool TryGetTile(Vector2i indices, List layers, int seed, Map // Check if the tile is from meta layer, otherwise fall back to default layers. if (layer is BiomeMetaLayer meta) { - if (TryGetBiomeTile(indices, ProtoManager.Index(meta.Template).Layers, seed, grid, out tile)) + if (TryGetTile(indices, ProtoManager.Index(meta.Template).Layers, seed, grid, out tile)) // Corvax-Next-BiomeSpawner: bandage - replaced from TryGetBiomeTile (not working for biomespawner) { return true; } diff --git a/Resources/Locale/ru-RU/_corvaxnext/warper/warp-point-component.ftl b/Resources/Locale/ru-RU/_corvaxnext/warper/warp-point-component.ftl new file mode 100644 index 00000000000..3865ffd8373 --- /dev/null +++ b/Resources/Locale/ru-RU/_corvaxnext/warper/warp-point-component.ftl @@ -0,0 +1 @@ +warper-goes-nowhere = {CAPITALIZE($warper)} никуда не ведёт. diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/admeme/hand_teleporter.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/admeme/hand_teleporter.ftl index 43863bebda5..85c5d45a6c4 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/admeme/hand_teleporter.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/admeme/hand_teleporter.ftl @@ -5,3 +5,10 @@ ent-PortalRedAdmemeCN = { ent-BasePortal } .desc = { ent-BasePortal.desc } ent-PortalBlueAdmemeCN = { ent-BasePortal } .desc = { ent-BasePortal.desc } +ent-HandTeleporterAdmemeCNInvisible = { ent-HandTeleporter } + .desc = { ent-HandTeleporter.desc } + .suffix = Адмемы, Невидимый, Между картами +ent-PortalRedAdmemeCNInvisible = { ent-BasePortal } + .desc = { ent-BasePortal.desc } +ent-PortalBlueAdmemeCNInvisible = { ent-BasePortal } + .desc = { ent-BasePortal.desc } diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/markers/spawners/random/biome/biomespawner.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/markers/spawners/random/biome/biomespawner.ftl new file mode 100644 index 00000000000..a3ed737b38e --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/markers/spawners/random/biome/biomespawner.ftl @@ -0,0 +1,26 @@ +ent-BaseBiomeSpawner = спавнер биомов + .desc = Для всех ваших мапперских нужд. +ent-BiomeSpawnerCaves = { ent-BaseBiomeSpawner } + .desc = { ent-BaseBiomeSpawner.desc } + .suffix = Пещера +ent-BiomeSpawnerGrasslands = { ent-BaseBiomeSpawner } + .desc = { ent-BaseBiomeSpawner.desc } + .suffix = Луга +ent-BiomeSpawnerContinental = { ent-BaseBiomeSpawner } + .desc = { ent-BaseBiomeSpawner.desc } + .suffix = Континентальный +ent-BiomeSpawnerLowDesert = { ent-BaseBiomeSpawner } + .desc = { ent-BaseBiomeSpawner.desc } + .suffix = Пустыня +ent-BiomeSpawnerLava = { ent-BaseBiomeSpawner } + .desc = { ent-BaseBiomeSpawner.desc } + .suffix = Лава +ent-BiomeSpawnerSnow = { ent-BaseBiomeSpawner } + .desc = { ent-BaseBiomeSpawner.desc } + .suffix = Снег +ent-BiomeSpawnerShadow = { ent-BaseBiomeSpawner } + .desc = { ent-BaseBiomeSpawner.desc } + .suffix = Теневой +ent-BiomeSpawnerAsteroid = { ent-BaseBiomeSpawner } + .desc = { ent-BaseBiomeSpawner.desc } + .suffix = Астероид diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/structures/walls/walls.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/structures/walls/walls.ftl new file mode 100644 index 00000000000..678dd9e36ce --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/structures/walls/walls.ftl @@ -0,0 +1,3 @@ +ent-MarkerBlocker = невидимая стена + .desc = Неразрушимая невидимая стена. + .suffix = Маркер, Невидимая diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/structures/warps/ladders.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/structures/warps/ladders.ftl new file mode 100644 index 00000000000..17d4033f5e4 --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/structures/warps/ladders.ftl @@ -0,0 +1,9 @@ +ent-BaseLadder = лестница + .desc = { ent-BaseItem.desc } + .suffix = Маркер, Невидимая +ent-LadderTop = { ent-BaseLadder } + .desc = Верхняя часть лестницы. Используйте чтобы переместиться вниз. + .suffix = верхняя +ent-LadderBottom = { ent-BaseLadder } + .desc = Нижняя часть лестницы. Используйте чтобы переместиться вверх. + .suffix = нижняя diff --git a/Resources/Prototypes/_CorvaxNext/Admeme/hand_teleporter.yml b/Resources/Prototypes/_CorvaxNext/Admeme/hand_teleporter.yml index 8b88a53857d..3871acb40d5 100644 --- a/Resources/Prototypes/_CorvaxNext/Admeme/hand_teleporter.yml +++ b/Resources/Prototypes/_CorvaxNext/Admeme/hand_teleporter.yml @@ -24,3 +24,65 @@ components: - type: Portal canTeleportToOtherMaps: true + +- type: entity + parent: HandTeleporter + id: HandTeleporterAdmemeCNInvisible + suffix: Admeme, Invisible + components: + - type: HandTeleporter + firstPortalPrototype: PortalRedAdmemeCNInvisible + secondPortalPrototype: PortalBlueAdmemeCNInvisible + allowPortalsOnDifferentGrids: true + portalCreationDelay: 0 + +- type: entity + parent: MarkerBase + id: PortalRedAdmemeCNInvisible + suffix: Admeme, Invisible + components: + - type: Transform + anchored: True + - type: InteractionOutline + - type: Clickable + - type: Physics + bodyType: Static + - type: Visibility + layer: 2 + - type: Sprite + layers: + - sprite: _CorvaxNext/Markers/environment.rsi + state: base-red + shader: unshaded + - sprite: _CorvaxNext/Markers/environment.rsi + shader: unshaded + state: portal + - type: Fixtures + fixtures: + portalFixture: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.48,0.25,0.48" + mask: + - FullTileMask + layer: + - WallLayer + hard: false + - type: Portal + canTeleportToOtherMaps: true + +- type: entity + parent: PortalRedAdmemeCNInvisible + id: PortalBlueAdmemeCNInvisible + suffix: Admeme, Invisible + components: + - type: Portal + canTeleportToOtherMaps: true + - type: Sprite + layers: + - sprite: _CorvaxNext/Markers/environment.rsi + state: base-blue + shader: unshaded + - sprite: _CorvaxNext/Markers/environment.rsi + shader: unshaded + state: portal diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Markers/Spawners/Random/Biome/biomeSpawner.yml b/Resources/Prototypes/_CorvaxNext/Entities/Markers/Spawners/Random/Biome/biomeSpawner.yml new file mode 100644 index 00000000000..156940445ae --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Entities/Markers/Spawners/Random/Biome/biomeSpawner.yml @@ -0,0 +1,114 @@ +- type: entity + id: BaseBiomeSpawner + name: biome spawner + abstract: true + placement: + mode: SnapgridCenter + components: + - type: Transform + anchored: true + - type: Clickable + - type: InteractionOutline + - type: Sprite + snapCardinals: true + drawdepth: BelowFloor + sprite: _CorvaxNext/Markers/biome.rsi + - type: BiomeSpawner + - type: PlacementReplacement + key: BiomeSpawner + +- type: entity + id: BiomeSpawnerCaves + parent: BaseBiomeSpawner + suffix: Caves + components: + - type: Sprite + layers: + - state: cave + - state: frame + - type: BiomeSpawner + biome: CavesGenericExample + +- type: entity + id: BiomeSpawnerGrasslands + parent: BaseBiomeSpawner + suffix: Grasslands + components: + - type: Sprite + layers: + - state: grass + - state: frame + - type: BiomeSpawner + biome: Grasslands + +- type: entity + id: BiomeSpawnerContinental + parent: BaseBiomeSpawner + suffix: Continental + components: + - type: Sprite + layers: + - state: grass + - state: frame + - type: BiomeSpawner + biome: Continental + +- type: entity + id: BiomeSpawnerLowDesert + parent: BaseBiomeSpawner + suffix: LowDesert + components: + - type: Sprite + layers: + - state: desert + - state: frame + - type: BiomeSpawner + biome: LowDesert + +- type: entity + id: BiomeSpawnerLava + parent: BaseBiomeSpawner + suffix: Lava + components: + - type: Sprite + layers: + - state: lava + - state: frame + - type: BiomeSpawner + biome: Lava + +- type: entity + id: BiomeSpawnerSnow + parent: BaseBiomeSpawner + suffix: Snow + components: + - type: Sprite + layers: + - state: snow + - state: frame + - type: BiomeSpawner + biome: Snow + +- type: entity + id: BiomeSpawnerShadow + parent: BaseBiomeSpawner + suffix: Shadow + components: + - type: Sprite + layers: + - state: chromite + - state: frame + - type: BiomeSpawner + biome: Shadow + +- type: entity + id: BiomeSpawnerAsteroid + parent: BaseBiomeSpawner + suffix: Asteroid + components: + - type: Sprite + layers: + - state: asteroid + - state: frame + - type: BiomeSpawner + biome: Asteroid diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Walls/walls.yml new file mode 100644 index 00000000000..a434ee703a8 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Walls/walls.yml @@ -0,0 +1,29 @@ +- type: entity + name: invisible wall + id: MarkerBlocker + parent: MarkerBase + suffix: marker, infinity + components: + - type: Sprite + layers: + - sprite: _CorvaxNext/Markers/environment.rsi + state: base-green + shader: unshaded + - sprite: _CorvaxNext/Markers/environment.rsi + shader: unshaded + state: wall + - type: PlacementReplacement + key: blocker + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.5,-0.5,0.5,0.5" + mask: + - FullTileMask + layer: + - WallLayer + density: 1000 + - type: Physics + bodyType: Static diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Structures/Warps/ladders.yml b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Warps/ladders.yml new file mode 100644 index 00000000000..3f25cd85041 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Entities/Structures/Warps/ladders.yml @@ -0,0 +1,55 @@ +- type: entity + id: BaseLadder + name: ladder + abstract: true + placement: + mode: SnapgridCenter + components: + - type: Sprite + sprite: _CorvaxNext/Structures/Warps/ladder.rsi + noRot: true + netsync: false + offset: 0, 0.25 + - type: Transform + anchored: true + - type: Clickable + - type: Physics + canCollide: False + bodyStatus: OnGround + bodyType: Static + - type: Tag + tags: + - Structure + - type: InteractionOutline + - type: Warper + - type: WarpPoint + follow: false + +- type: entity + parent: BaseLadder + id: LadderTop + suffix: top + description: The top of a ladder. Use it to go down. + components: + - type: Sprite + state: ladder_top + +- type: entity + parent: BaseLadder + id: LadderBottom + suffix: bottom + description: The bottom of a ladder. Use it to go up. + components: + - type: Sprite + state: ladder_bottom + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "0.3,0.1,-1,-1" + density: 100 + mask: + - MachineMask + layer: + - MidImpassable diff --git a/Resources/Prototypes/_CorvaxNext/Procedural/biomes.yml b/Resources/Prototypes/_CorvaxNext/Procedural/biomes.yml new file mode 100644 index 00000000000..3188ee31a18 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Procedural/biomes.yml @@ -0,0 +1,96 @@ +- type: biomeTemplate + id: CavesGenericExample + layers: + - !type:BiomeTileLayer # Первый слой, пол. Слоёв может быть сколько угодно, с любыми настройками. + threshold: -1.0 # Полностью покрывает площадь + tile: FloorCaveDrought # Тайлы пола + - !type:BiomeEntityLayer # Второй слой, камни и прочее + threshold: 0.4 # Уровень покрытия площади + noise: # Настройки шума + seed: 1 + noiseType: OpenSimplex2 + fractalType: FBm + frequency: 2 + allowedTiles: # На каких тайлах пола могут ставиться entities, если на предыдущих слоях больше одного варианта + - FloorCaveDrought + entities: # Какие entities могут спавнитьсчя + - FloraRockSolid + - FloraGreyStalagmite + - CrystalBlue + - CrystalCyan + - CrystalGreen + - CrystalOrange + - CrystalPink + - CrystalGrey + - RandomStalagmiteOrCrystal + - CrystalSpawner + - !type:BiomeEntityLayer # Третий слой, растительность + threshold: 0.6 # Уровень покрытия площади + noise: # Настройки шума + seed: 8 + noiseType: OpenSimplex2 + fractalType: Ridged + frequency: 0.015 + octaves: 3 + lacunarity: 1.8 + gain: 0.7 + domainWarpType: OpenSimplex2 + domainWarpAmp: 120 + allowedTiles: + - FloorCaveDrought + entities: + - Spaceshroom + - !type:BiomeEntityLayer # Четвертый слой, спавнеры живых существ. Обязательно должны быть именно спавнеры, а не живые существа. + threshold: 0.8 + noise: + seed: 8 + noiseType: OpenSimplex2 + fractalType: Ridged + frequency: 0.85 + octaves: 3 + lacunarity: 1.8 + gain: 0.7 + domainWarpType: OpenSimplex2 + domainWarpAmp: 120 + allowedTiles: + - FloorCaveDrought + entities: + - RandomServiceCorpseSpawner + - !type:BiomeEntityLayer # Пятый слой, спавнер воды + allowedTiles: + - FloorCaveDrought + threshold: 0.8 + noise: + seed: 14 + noiseType: OpenSimplex2 + fractalType: FBm + frequency: 0.01 + domainWarpType: OpenSimplex2 + domainWarpAmp: 150 + entities: + - FloorWaterEntity + - !type:BiomeEntityLayer # Шестой слой, спавнер стен + threshold: -0.75 + invert: true + noise: + seed: 0 + noiseType: Perlin + fractalType: Ridged + octaves: 1 + frequency: 0.05 + gain: 0.5 + allowedTiles: + - FloorCaveDrought + entities: + - WallRockBasalt + - !type:BiomeEntityLayer # Седьмой слой, спавнер руды + threshold: 0.6 + noise: + seed: 10 + noiseType: OpenSimplex2 + fractalType: FBm + frequency: 3 + allowedTiles: + - FloorCave + entities: + - WallRockBasaltTin diff --git a/Resources/Textures/_CorvaxNext/Markers/biome.rsi/asteroid.png b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/asteroid.png new file mode 100644 index 00000000000..97d9fcc5dc7 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/asteroid.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/biome.rsi/cave.png b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/cave.png new file mode 100644 index 00000000000..0850a3b4b00 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/cave.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/biome.rsi/chromite.png b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/chromite.png new file mode 100644 index 00000000000..a9c9cd4d317 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/chromite.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/biome.rsi/desert.png b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/desert.png new file mode 100644 index 00000000000..e82207e688c Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/desert.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/biome.rsi/frame.png b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/frame.png new file mode 100644 index 00000000000..d345e019e89 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/frame.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/biome.rsi/grass.png b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/grass.png new file mode 100644 index 00000000000..e93f6904b55 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/grass.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/biome.rsi/lava.png b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/lava.png new file mode 100644 index 00000000000..b3585d8b224 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/lava.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/biome.rsi/meta.json b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/meta.json new file mode 100644 index 00000000000..8712da2ef5e --- /dev/null +++ b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/meta.json @@ -0,0 +1,35 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "cave, frame, grass, shadow - created by TheShuEd (Github) for CrystallEdge, desert taken from https://github.com/discordia-space/CEV-Eris/tree/d1b3041899a42ef1fb59cd7ad4a83a300b35638c, lava, chromite, asteroid and snow taken from https://github.com/tgstation/tgstation/tree/f116442e34fe3e941a1df474bb57bb410dd177a3/icons/turf", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "cave" + }, + { + "name": "grass" + }, + { + "name": "frame" + }, + { + "name": "desert" + }, + { + "name": "lava" + }, + { + "name": "snow" + }, + { + "name": "chromite" + }, + { + "name": "asteroid" + } + ] +} diff --git a/Resources/Textures/_CorvaxNext/Markers/biome.rsi/snow.png b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/snow.png new file mode 100644 index 00000000000..7470016b040 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/biome.rsi/snow.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/environment.rsi/base-blue.png b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/base-blue.png new file mode 100644 index 00000000000..ee77bb448ac Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/base-blue.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/environment.rsi/base-green.png b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/base-green.png new file mode 100644 index 00000000000..a39bca9cdca Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/base-green.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/environment.rsi/base-red.png b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/base-red.png new file mode 100644 index 00000000000..e0d68f8b9e5 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/base-red.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/environment.rsi/meta.json b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/meta.json new file mode 100644 index 00000000000..39b6cfff6d2 --- /dev/null +++ b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/meta.json @@ -0,0 +1,26 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Nuclear14 by Peptide90", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "base-blue" + }, + { + "name": "base-green" + }, + { + "name": "base-red" + }, + { + "name": "wall" + }, + { + "name": "portal" + } + ] +} diff --git a/Resources/Textures/_CorvaxNext/Markers/environment.rsi/portal.png b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/portal.png new file mode 100644 index 00000000000..180ed4ac253 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/portal.png differ diff --git a/Resources/Textures/_CorvaxNext/Markers/environment.rsi/wall.png b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/wall.png new file mode 100644 index 00000000000..2aaeaaf0144 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Markers/environment.rsi/wall.png differ diff --git a/Resources/Textures/_CorvaxNext/Structures/Warps/ladder.rsi/ladder_bottom.png b/Resources/Textures/_CorvaxNext/Structures/Warps/ladder.rsi/ladder_bottom.png new file mode 100644 index 00000000000..cd9119cbb38 Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Structures/Warps/ladder.rsi/ladder_bottom.png differ diff --git a/Resources/Textures/_CorvaxNext/Structures/Warps/ladder.rsi/ladder_top.png b/Resources/Textures/_CorvaxNext/Structures/Warps/ladder.rsi/ladder_top.png new file mode 100644 index 00000000000..a261bc6aa0a Binary files /dev/null and b/Resources/Textures/_CorvaxNext/Structures/Warps/ladder.rsi/ladder_top.png differ diff --git a/Resources/Textures/_CorvaxNext/Structures/Warps/ladder.rsi/meta.json b/Resources/Textures/_CorvaxNext/Structures/Warps/ladder.rsi/meta.json new file mode 100644 index 00000000000..724ced7c7a8 --- /dev/null +++ b/Resources/Textures/_CorvaxNext/Structures/Warps/ladder.rsi/meta.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "BadDeathclaw commit https://github.com/BadDeathclaw/Drymouth-Gulch/commit/63d5cc6913885fd4b481b5ffcc980726c2dedca9, modified by Peptide90", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "ladder_bottom" + }, + { + "name": "ladder_top" + } + ] +}