-using System.Linq;
+using System.Linq;
using System.Numerics;
-using Content.Server.Maps;
using Content.Shared.Anomaly.Components;
using Content.Shared.Anomaly.Effects.Components;
-using Content.Shared.Maps;
using Content.Shared.Physics;
using Robust.Shared.Map;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
+using Robust.Shared.Prototypes;
using Robust.Shared.Random;
namespace Content.Server.Anomaly.Effects;
// A cluster of monsters
SpawnMonstersOnOpenTiles(component, xform, component.MaxSpawnAmount, component.SpawnRange, component.Spawns);
// And so much meat (for the meat anomaly at least)
- Spawn(component.SupercriticalSpawn, xform.Coordinates);
- SpawnMonstersOnOpenTiles(component, xform, component.MaxSpawnAmount, component.SpawnRange, new List<string>(){component.SupercriticalSpawn});
+ SpawnMonstersOnOpenTiles(component, xform, component.MaxSpawnAmount, component.SpawnRange, component.SuperCriticalSpawns);
}
- private void SpawnMonstersOnOpenTiles(EntitySpawnAnomalyComponent component, TransformComponent xform, int amount, float radius, List<string> spawns)
+ private void SpawnMonstersOnOpenTiles(EntitySpawnAnomalyComponent component, TransformComponent xform, int amount, float radius, List<EntProtoId> spawns)
{
if (!component.Spawns.Any())
return;
{
if (!physQuery.TryGetComponent(ent, out var body))
continue;
+
if (body.BodyType != BodyType.Static ||
!body.Hard ||
(body.CollisionLayer & (int) CollisionGroup.Impassable) == 0)
continue;
+
valid = false;
break;
}
-using System.Linq;
+using System.Linq;
using System.Numerics;
using Content.Server.Maps;
using Content.Shared.Anomaly.Components;
new Box2(localpos + new Vector2(-radius, -radius), localpos + new Vector2(radius, radius)));
foreach (var tileref in tilerefs)
{
- if (!_random.Prob(0.33f))
+ if (!_random.Prob(component.SpawnChance))
continue;
_tile.ReplaceTile(tileref, fleshTile);
}
-using Content.Shared.Maps;
+using Content.Shared.Maps;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
/// <summary>
/// A list of entities that are random picked to be spawned on each pulse
/// </summary>
- [DataField("spawns", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
- public List<string> Spawns = new();
+ [DataField]
+ public List<EntProtoId> Spawns = new();
+
+ /// <summary>
+ /// A list of entities that are random picked to be spawned when supercritical;
+ /// </summary>
+ [DataField]
+ public List<EntProtoId> SuperCriticalSpawns = new();
/// <summary>
/// The maximum number of entities that spawn per pulse
/// </summary>
[DataField("floorTileId", customTypeSerializer: typeof(PrototypeIdSerializer<ContentTileDefinition>)), ViewVariables(VVAccess.ReadWrite)]
public string FloorTileId = "FloorFlesh";
-
- /// <summary>
- /// The entity spawned when the anomaly goes supercritical
- /// </summary>
- [DataField("superCriticalSpawn", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
- public string SupercriticalSpawn = "FleshKudzu";
}
-using Content.Shared.Maps;
+using Content.Shared.Maps;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
[DataField("spawnRange"), ViewVariables(VVAccess.ReadWrite)]
public float SpawnRange = 5f;
+ /// <summary>
+ /// The probability a tile will spawn.
+ /// </summary>
+ [DataField, ViewVariables(VVAccess.ReadWrite)]
+ public float SpawnChance = 0.33f;
+
/// <summary>
/// The tile that is spawned by the anomaly's effect
/// </summary>
- AnomalyFlesh
- AnomalyBluespace
- AnomalyIce
+ - AnomalyRock
chance: 1
--- /dev/null
+- type: entity
+ name: Asteroid Crab Spawner
+ id: AsteroidCrabSpawner
+ parent: MarkerBase
+ components:
+ - type: Sprite
+ layers:
+ - state: red
+ - sprite: Structures/Decoration/crystal.rsi
+ state: crystal_cyan
+ - type: RandomSpawner
+ prototypes:
+ - AsteroidRockCrab
+ - AsteroidRockCrab1
+ chance: 1
--- /dev/null
+- type: entity
+ name: Crystal Spawner
+ suffix: 70%
+ id: CrystalSpawner
+ parent: MarkerBase
+ components:
+ - type: Sprite
+ layers:
+ - state: red
+ - sprite: Structures/Decoration/crystal.rsi
+ state: crystal_cyan
+ - type: RandomSpawner
+ prototypes:
+ - CrystalGreen
+ - CrystalPink
+ - CrystalOrange
+ - CrystalBlue
+ - CrystalCyan
+ chance: 0.7
- type: ConditionalSpawner
prototypes:
- MobPenguin
+
+- type: entity
+ name: ore crab spawner
+ id: SpawnMobOreCrab
+ parent: MarkerBase
+ components:
+ - type: Sprite
+ layers:
+ - state: green
+ - state: quartzcrab
+ sprite: Mobs/Elemental/orecrab.rsi
+ - type: RandomSpawner
+ prototypes:
+ - MobUraniumCrab
+ - MobIronCrab
+ - MobQuartzCrab
--- /dev/null
+- type: entity
+ save: false
+ abstract: true
+ id: MobElementalBase
+ components:
+ - type: LagCompensation
+ - type: Reactive
+ groups:
+ Acidic: [Touch]
+ - type: Clickable
+ - type: Damageable
+ damageContainer: Inorganic
+ - type: InteractionOutline
+ - type: Fixtures
+ fixtures:
+ fix1:
+ shape:
+ !type:PhysShapeCircle
+ radius: 0.35
+ density: 50
+ mask:
+ - MobMask
+ layer:
+ - MobLayer
+ - type: MovementSpeedModifier
+ baseWalkSpeed : 2
+ baseSprintSpeed : 3
+ - type: Sprite
+ noRot: true
+ drawdepth: Mobs
+ - type: NpcFactionMember
+ factions:
+ - SimpleNeutral
+ - type: MovedByPressure
+ - type: Physics
+ bodyType: KinematicController # Same for all inheritors
+ - type: StatusEffects
+ allowed:
+ - Stun
+ - KnockedDown
+ - SlowedDown
+ - Stutter
+ - Electrocution
+ - type: Pullable
+ - type: Tag
+ tags:
+ - DoorBumpOpener
+ - ShoesRequiredStepTriggerImmune
+ - type: MobState
+ allowedStates:
+ - Alive
+ - Dead
+ - type: MobThresholds
+ thresholds:
+ 0: Alive
+ 120: Dead
+ - type: Stamina
+ critThreshold: 120
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 100
+ behaviors:
+ - !type:TriggerBehavior
+ - trigger:
+ !type:DamageTrigger
+ damage: 120
+ behaviors:
+ - !type:DoActsBehavior
+ acts: [ "Destruction" ]
+ - type: Input
+ context: "human"
+ - type: InputMover
+ - type: MobMover
+ - type: ZombieImmune
+
+- type: entity
+ parent: MobElementalBase
+ id: MobQuartzCrab
+ name: quartz crab
+ description: An ore crab made from quartz.
+ components:
+ - type: Sprite
+ sprite: Mobs/Elemental/orecrab.rsi
+ state: quartzcrab
+ - type: HTN
+ rootTask:
+ task: SimpleHostileCompound
+ - type: MeleeWeapon
+ hidden: true
+ soundHit:
+ path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
+ damage:
+ types:
+ Piercing: 12
+ - type: CombatMode
+ - type: NpcFactionMember
+ factions:
+ - SimpleHostile
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 40
+ behaviors:
+ - !type:PlaySoundBehavior
+ sound:
+ collection: GlassBreak
+ - !type:SpawnEntitiesBehavior
+ spawn:
+ SpaceQuartz:
+ min: 4
+ max: 6
+ - !type:DoActsBehavior
+ acts: [ "Destruction" ]
+
+- type: entity
+ parent: MobElementalBase
+ id: MobIronCrab
+ name: ore crab
+ description: An ore crab made from iron.
+ components:
+ - type: Sprite
+ sprite: Mobs/Elemental/orecrab.rsi
+ state: ironcrab
+ - type: HTN
+ rootTask:
+ task: SimpleHostileCompound
+ - type: MeleeWeapon
+ hidden: true
+ soundHit:
+ path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
+ damage:
+ types:
+ Blunt: 8
+ - type: CombatMode
+ - type: MovementSpeedModifier
+ baseWalkSpeed : 1.5
+ baseSprintSpeed : 2
+ - type: NpcFactionMember
+ factions:
+ - SimpleHostile
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 80
+ behaviors:
+ - !type:PlaySoundBehavior
+ sound:
+ collection: GlassBreak
+ - !type:SpawnEntitiesBehavior
+ spawn:
+ SteelOre1:
+ min: 4
+ max: 6
+ - !type:DoActsBehavior
+ acts: [ "Destruction" ]
+
+- type: entity
+ parent: MobElementalBase
+ id: MobUraniumCrab
+ name: ore crab
+ description: An ore crab made from uranium.
+ components:
+ - type: Sprite
+ sprite: Mobs/Elemental/orecrab.rsi
+ state: uraniumcrab
+ - type: HTN
+ rootTask:
+ task: IdleCompound
+ - type: MeleeWeapon
+ hidden: true
+ soundHit:
+ path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
+ damage:
+ types:
+ Blunt: 8
+ - type: CombatMode
+ - type: MovementSpeedModifier
+ baseWalkSpeed : 2
+ baseSprintSpeed : 2.5
+ - type: NpcFactionMember
+ factions:
+ - SimpleHostile
+ - type: RadiationSource
+ intensity: 0.3
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 80
+ behaviors:
+ - !type:PlaySoundBehavior
+ sound:
+ collection: GlassBreak
+ - !type:SpawnEntitiesBehavior
+ spawn:
+ UraniumOre1:
+ min: 4
+ max: 6
+ - !type:DoActsBehavior
+ acts: [ "Destruction" ]
+ - type: PointLight
+ radius: 2
+ energy: 3
+ color: "#06DF24"
- type: TileSpawnAnomaly
floorTileId: FloorFlesh
- type: EntitySpawnAnomaly
- superCriticalSpawn: FleshKudzu
+ superCriticalSpawns:
+ - FleshKudzu
spawns:
- MobFleshJared
- MobFleshGolem
releasedGas: 8 # Frezon. Please replace if there is a better way to specify this
releaseOnMaxSeverity: true
spawnRadius: 0
+
+- type: entity
+ id: AnomalyRock
+ parent: BaseAnomaly
+ suffix: Rock
+ components:
+ - type: Sprite
+ layers:
+ - state: anom6
+ map: ["enum.AnomalyVisualLayers.Base"]
+ - state: anom6-pulse
+ map: ["enum.AnomalyVisualLayers.Animated"]
+ visible: false
+ - type: PointLight
+ radius: 2.0
+ energy: 7.5
+ color: "#5ca8cb"
+ castShadows: false
+ - type: TileSpawnAnomaly
+ floorTileId: FloorAsteroidTile
+ spawnChance: 0.8
+ - type: EntitySpawnAnomaly
+ maxSpawnAmount: 50
+ spawnRange: 10
+ spawns:
+ - AsteroidRock
+ - AsteroidCrabSpawner
+ - CrystalSpawner
+ superCriticalSpawns:
+ - AsteroidRock
+ - SpawnMobOreCrab
oreChance: 0.33
oreRarityPrototypeId: RandomOreDistributionStandard
+- type: entity
+ id: AsteroidRockCrab
+ parent: AsteroidRock
+ name: asteroid rock
+ suffix: orecrab
+ description: An asteroid.
+ components:
+ - type: Sprite
+ sprite: Structures/Walls/rock.rsi
+ noRot: true
+ layers:
+ - state: rock_asteroid_ore
+ - map: [ "enum.EdgeLayer.South" ]
+ state: rock_asteroid_south
+ - map: [ "enum.EdgeLayer.East" ]
+ state: rock_asteroid_east
+ - map: [ "enum.EdgeLayer.North" ]
+ state: rock_asteroid_north
+ - map: [ "enum.EdgeLayer.West" ]
+ state: rock_asteroid_west
+ - type: OreVein
+ oreChance: 0.33
+ oreRarityPrototypeId: OreCrab
+
+- type: entity
+ id: AsteroidRockCrab1
+ parent: AsteroidRockCrab
+ components:
+ - type: Sprite
+ sprite: Structures/Walls/rock.rsi
+ noRot: true
+ layers:
+ - state: rock_asteroid_ore1
+ - map: [ "enum.EdgeLayer.South" ]
+ state: rock_asteroid_south
+ - map: [ "enum.EdgeLayer.East" ]
+ state: rock_asteroid_east
+ - map: [ "enum.EdgeLayer.North" ]
+ state: rock_asteroid_north
+ - map: [ "enum.EdgeLayer.West" ]
+ state: rock_asteroid_west
- type: entity
id: IronRock
id: OreBananium
oreEntity: BananiumOre1
+- type: ore
+ id: OreQuartzCrab
+ oreEntity: MobQuartzCrab
+
+- type: ore
+ id: OreIronCrab
+ oreEntity: MobIronCrab
+
+- type: ore
+ id: OreUraniumCrab
+ oreEntity: MobUraniumCrab
+
- type: ore
id: OreArtifactFragment
oreEntity: ArtifactFragment
OreUranium: 1
OreBananium: 0.5
OreArtifactFragment: 0.5
+
+- type: weightedRandomOre
+ id: OreCrab
+ weights:
+ OreQuartzCrab: 5
+ OreIronCrab: 5
+ OreUraniumCrab: 3
--- /dev/null
+{
+ "version": 1,
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "license": "CC-BY-SA-3.0",
+ "copyright": "Made by brainfood1183 (github)",
+ "states": [
+ {
+ "name": "ironcrab",
+ "directions": 4
+ },
+ {
+ "name": "uraniumcrab",
+ "directions": 4
+ },
+ {
+ "name": "quartzcrab",
+ "directions": 4
+ }
+ ]
+}
{
"version": 1,
"license": "CC0-1.0",
- "copyright": "Created by EmoGarbage; anom3, anom3-pulse, anom4, anom4-pulse are CC-BY-SA-3.0 at https://github.com/ParadiseSS13/Paradise/blob/master/icons/effects/effects.dmi; anom5, anom5-pulse are CC-BY-SA-3.0 by Aleksh#7552 (discord) for space-station-14",
+ "copyright": "Created by EmoGarbage; anom3, anom3-pulse, anom4, anom4-pulse are CC-BY-SA-3.0 at https://github.com/ParadiseSS13/Paradise/blob/master/icons/effects/effects.dmi; anom5, anom5-pulse are CC-BY-SA-3.0 by Aleksh#7552 (discord) for space-station-14, anom6 & anom6-pulse are CC-BY-SA-3.0 by brainfood1183 (github) for space-station-14",
"size": {
"x": 32,
"y": 32
0.25
]
]
+ },
+ {
+ "name": "anom6"
+ },
+ {
+ "name": "anom6-pulse",
+ "delays": [
+ [
+ 0.15625,
+ 0.15625,
+ 0.15625,
+ 0.15625,
+ 0.15625,
+ 0.15625,
+ 0.15625,
+ 0.15625
+ ]
+ ]
}
]
}
{
"name": "rock_wall_west"
},
+ {
+ "name": "rock_asteroid_ore"
+ },
+ {
+ "name": "rock_asteroid_ore1"
+ },
{
"name": "rock_asteroid"
},