-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.Random;
namespace Content.Server.Anomaly.Effects;
using Robust.Shared.Prototypes;
-using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Server.Spawners.Components
{
public partial class ConditionalSpawnerComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]
- [DataField("prototypes", customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))]
- public List<string> Prototypes { get; set; } = new();
+ [DataField]
+ public List<EntProtoId> Prototypes { get; set; } = new();
[ViewVariables(VVAccess.ReadWrite)]
- [DataField("gameRules", customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))]
- public List<string> GameRules = new();
+ [DataField]
+ public List<EntProtoId> GameRules = new();
[ViewVariables(VVAccess.ReadWrite)]
- [DataField("chance")]
+ [DataField]
public float Chance { get; set; } = 1.0f;
}
}
using Robust.Shared.Prototypes;
-using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Server.Spawners.Components
{
public sealed partial class RandomSpawnerComponent : ConditionalSpawnerComponent
{
[ViewVariables(VVAccess.ReadWrite)]
- [DataField("rarePrototypes", customTypeSerializer:typeof(PrototypeIdListSerializer<EntityPrototype>))]
- public List<string> RarePrototypes { get; set; } = new();
+ [DataField]
+ public List<EntProtoId> RarePrototypes { get; set; } = new();
[ViewVariables(VVAccess.ReadWrite)]
- [DataField("rareChance")]
+ [DataField]
public float RareChance { get; set; } = 0.05f;
[ViewVariables(VVAccess.ReadWrite)]
- [DataField("offset")]
+ [DataField]
public float Offset { get; set; } = 0.2f;
+
+ [DataField]
+ public bool DeleteSpawnerAfterSpawn = true;
}
}
private void OnRandSpawnMapInit(EntityUid uid, RandomSpawnerComponent component, MapInitEvent args)
{
Spawn(uid, component);
- QueueDel(uid);
+ if (component.DeleteSpawnerAfterSpawn)
+ QueueDel(uid);
}
private void OnRuleStarted(ref GameRuleStartedEvent args)
/// <summary>
/// Chance to spread whenever an edge spread is possible.
/// </summary>
- [DataField("spreadChance")]
+ [DataField]
public float SpreadChance = 1f;
/// <summary>
/// How much damage is required to reduce growth level
/// </summary>
- [DataField("growthHealth")]
+ [DataField]
public float GrowthHealth = 10.0f;
/// <summary>
/// How much damage is required to prevent growth
/// </summary>
- [DataField("growthBlock")]
+ [DataField]
public float GrowthBlock = 20.0f;
/// <summary>
/// How much the kudzu heals each tick
/// </summary>
- [DataField("damageRecovery")]
+ [DataField]
public DamageSpecifier? DamageRecovery = null;
- [DataField("growthTickChance")]
+ [DataField]
public float GrowthTickChance = 1f;
+ /// <summary>
+ /// number of sprite variations for kudzu
+ /// </summary>
+ [DataField]
+ public int SpriteVariants = 3;
}
return;
}
- _appearance.SetData(uid, KudzuVisuals.Variant, _robustRandom.Next(1, 3), appearance);
+ _appearance.SetData(uid, KudzuVisuals.Variant, _robustRandom.Next(1, component.SpriteVariants), appearance);
_appearance.SetData(uid, KudzuVisuals.GrowthLevel, 1, appearance);
}
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;
namespace Content.Shared.Anomaly.Effects.Components;
/// <summary>
/// The maximum radius of tiles scales with stability
/// </summary>
- [DataField("spawnRange"), ViewVariables(VVAccess.ReadWrite)]
+ [DataField, ViewVariables(VVAccess.ReadWrite)]
public float SpawnRange = 5f;
/// <summary>
/// <summary>
/// The tile that is spawned by the anomaly's effect
/// </summary>
- [DataField("floorTileId", customTypeSerializer: typeof(PrototypeIdSerializer<ContentTileDefinition>)), ViewVariables(VVAccess.ReadWrite)]
- public string FloorTileId = "FloorFlesh";
+ [DataField, ViewVariables(VVAccess.ReadWrite)]
+ public ProtoId<ContentTileDefinition> FloorTileId = "FloorFlesh";
}
sprite: /Textures/Effects/mobspawn.rsi
state: crab_uranium
- type: SpawnOnDespawn
- prototype: MobUraniumCrab
\ No newline at end of file
+ prototype: MobUraniumCrab
+
+- type: entity
+ id: EffectAnomalyFloraBulb
+ noSpawn: true
+ components:
+ - type: TimedDespawn
+ lifetime: 0.4
+ - type: Sprite
+ drawdepth: Effects
+ noRot: true
+ layers:
+ - shader: unshaded
+ map: ["enum.EffectLayers.Unshaded"]
+ sprite: Effects/emp.rsi
+ state: emp_disable
+ - type: EffectVisuals
+ - type: Tag
+ tags:
+ - HideContextMenu
+ - type: AnimationPlayer
+ - type: RandomSpawner
+ deleteSpawnerAfterSpawn: false
+ rareChance: 0.2
+ offset: 0.5
+ chance: 1
+ prototypes:
+ - FoodAmbrosiaVulgaris
+ - FoodAmbrosiaDeus
+ - FoodBlueTomato
+ - FoodAloe
+ - FoodCabbage
+ - FoodCarrot
+ - FoodGalaxythistle
+ - FoodGatfruit
+ - FoodLemon
+ - FoodLemoon
+ - FoodLime
+ - FoodPeaPod
+ - FoodPineapple
+ - FoodOnionRed
+ - FoodWatermelon
+ rarePrototypes:
+ - MobLuminousEntity
+ - MobLuminousObject
\ No newline at end of file
- AnomalyIce
- AnomalyRock
- AnomalyLiquid
+ - AnomalyFlora
chance: 1
offset: 0.15 # not to put it higher. The anomaly sychnronizer looks for anomalies within this radius, and if the radius is higher, the anomaly can be attracted from a neighboring tile.
- type: MobThresholds
thresholds:
0: Alive
- 100: Dead
+ 50: Dead
- type: DamageStateVisuals
states:
Alive:
types:
Heat: -0.2
- type: NoSlip
+ - type: Pullable
- type: ZombieImmune
- type: NameIdentifier
group: GenericNumber
- type: GhostTakeoverAvailable
- type: PointLight
- color: "#e4de6c"
- radius: 8
- softness: 2
- energy: 5
+ radius: 3.0
+ energy: 4.5
+ color: "#6270bb"
- type: FootstepModifier
footstepSoundCollection:
collection: FootstepBells
- type: MeleeWeapon
damage:
types:
- Heat: 16
+ Heat: 10
animation: WeaponArcFist
- type: StaminaDamageOnHit
damage: 16
- type: MobThresholds
thresholds:
0: Alive
- 50: Dead
+ 30: Dead
- type: DamageStateVisuals
states:
Alive:
- type: MeleeWeapon
damage:
types:
- Heat: 8
+ Heat: 6
- type: Destructible
thresholds:
- trigger:
- type: MobThresholds
thresholds:
0: Alive
- 60: Dead
+ 40: Dead
- type: DamageStateVisuals
states:
Alive:
types:
Heat: 5
- type: HitscanBatteryAmmoProvider
- proto: Pulse
+ proto: RedLaser
fireCost: 140
- type: Battery
maxCharge: 1000
- type: Kudzu
spreadChance: 0.3
+- type: entity
+ id: KudzuFlowerFriendly
+ name: floral carpet
+ suffix: Friendly, Floral Anomaly
+ description: A colorful carpet of flowers sprawling in every direction. You're not sure whether to take it down or leave it up.
+ parent: Kudzu
+ components:
+ - type: Sprite
+ drawdepth: FloorObjects
+ sprite: Objects/Misc/kudzuflower.rsi
+ state: kudzu_11
+ - type: Kudzu
+ spriteVariants: 5
+ spreadChance: 0.01
+ - type: SlowContacts
+ walkSpeedModifier: 0.8
+ sprintSpeedModifier: 0.8
+ ignoreWhitelist:
+ components:
+ - IgnoreKudzu
+ - type: RandomSpawner
+ deleteSpawnerAfterSpawn: false
+ rareChance: 0.3
+ offset: 0.2
+ chance: 0.1
+ prototypes:
+ - FloraTree01
+ - FloraTree02
+ - FloraTree03
+ - FloraTree04
+ - FloraTree05
+ - FloraTree06
+ - FloraTreeLarge01
+ - FloraTreeLarge02
+ - FloraTreeLarge03
+ - CrystalCyan
+ rarePrototypes:
+ - AnomalyFloraBulb
+
+- type: entity
+ id: KudzuFlowerAngry
+ suffix: Angry, Floral Anomaly
+ parent: KudzuFlowerFriendly
+ components:
+ - type: Kudzu
+ spreadChance: 0.4
+ - type: RandomSpawner
+ chance: 0.2
+ rarePrototypes:
+ - AnomalyFloraBulb
+ - MobLuminousEntity
+ - MobLuminousObject
+
- type: entity
id: FleshKudzu
name: tendons
types:
Radiation: 10
-
- type: entity
id: AnomalyIce
parent: BaseAnomaly
- WallSpawnAsteroid
- SpawnMobOreCrab
+- type: entity
+ id: AnomalyFlora
+ parent: BaseAnomaly
+ suffix: Flora
+ components:
+ - type: Sprite
+ drawdepth: Mobs
+ sprite: Structures/Specific/Anomalies/flora_anom.rsi
+ layers:
+ - state: anom
+ map: ["enum.AnomalyVisualLayers.Base"]
+ - state: pulse
+ map: ["enum.AnomalyVisualLayers.Animated"]
+ visible: false
+ - type: PointLight
+ radius: 8.0
+ energy: 8.5
+ color: "#6270bb"
+ - type: Anomaly
+ animationTime: 6
+ offset: 0.05, 0
+ corePrototype: AnomalyCoreFlora
+ coreInertPrototype: AnomalyCoreFloraInert
+ anomalyContactDamage:
+ types:
+ Slash: 0
+ - type: TileSpawnAnomaly
+ floorTileId: FloorAstroGrass
+ spawnRange: 10
+ - type: EntitySpawnAnomaly
+ maxSpawnAmount: 30
+ spawnRange: 10
+ superCriticalSpawns:
+ - KudzuFlowerAngry
+ spawns:
+ - KudzuFlowerFriendly
+
+- type: entity
+ id: AnomalyFloraBulb
+ name: strange glowing berry
+ parent: BaseStructure
+ description: It's a beautiful strange glowing berry. It seems to have something growing inside it...
+ suffix: Flora Anomaly
+ components:
+ - type: Transform
+ anchored: true
+ - type: Physics
+ bodyType: Static
+ - type: Fixtures
+ fixtures:
+ fix1:
+ shape:
+ !type:PhysShapeCircle
+ radius: 0.2
+ - type: InteractionOutline
+ - type: Damageable
+ damageContainer: Biological
+ damageModifierSet: Diona
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 1
+ behaviors:
+ - !type:DoActsBehavior
+ acts: [ "Destruction" ]
+ - !type:SpawnEntitiesBehavior
+ spawn:
+ EffectAnomalyFloraBulb:
+ min: 1
+ max: 1
+ - type: PointLight
+ radius: 2.0
+ energy: 4.5
+ color: "#6270bb"
+ - type: Sprite
+ noRot: true
+ sprite: Structures/Specific/Anomalies/flora_anom.rsi
+ state: bulb
+
- type: entity
id: AnomalyLiquid
parent: BaseAnomaly
castShadows: false
- type: Electrified
+- type: entity
+ parent: BaseAnomalyCore
+ id: AnomalyCoreFlora
+ suffix: Flora
+ components:
+ - type: Sprite
+ sprite: Structures/Specific/Anomalies/Cores/flora_core.rsi
+ - type: PointLight
+ radius: 1.5
+ energy: 2.0
+ color: "#6270bb"
+ castShadows: false
+
# Inert cores
- type: entity
energy: 2.0
color: "#ffffaa"
castShadows: false
+
+- type: entity
+ parent: BaseAnomalyInertCore
+ id: AnomalyCoreFloraInert
+ suffix: Flora, Inert
+ components:
+ - type: Sprite
+ sprite: Structures/Specific/Anomalies/Cores/flora_core.rsi
+ - type: PointLight
+ radius: 1.5
+ energy: 2.0
+ color: "#6270bb"
+ castShadows: false
--- /dev/null
+{
+ "version": 1,
+ "license": "CC-BY-SA-3.0",
+ "copyright": "https://github.com/tgstation/tgstation/commit/15bf91049e33979a855995579b48592e34bcdd8c, edited by TheShuEd",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "kudzu_35"
+ },
+ {
+ "name": "kudzu_34"
+ },
+ {
+ "name": "kudzu_33"
+ },
+ {
+ "name": "kudzu_32"
+ },
+ {
+ "name": "kudzu_31"
+ },
+ {
+ "name": "kudzu_25"
+ },
+ {
+ "name": "kudzu_24"
+ },
+ {
+ "name": "kudzu_23"
+ },
+ {
+ "name": "kudzu_22"
+ },
+ {
+ "name": "kudzu_21"
+ },
+ {
+ "name": "kudzu_15"
+ },
+ {
+ "name": "kudzu_14"
+ },
+ {
+ "name": "kudzu_13"
+ },
+ {
+ "name": "kudzu_12"
+ },
+ {
+ "name": "kudzu_11"
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+{
+ "version": 1,
+ "license": "CC0-1.0",
+ "copyright": "Created by TheShuEd (github) for ss14",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "core"
+ },
+ {
+ "name": "pulse",
+ "delays": [
+ [
+ 0.15625,
+ 0.15625,
+ 0.15625,
+ 0.15625
+ ]
+ ]
+ }
+ ]
+}
--- /dev/null
+{
+ "version": 1,
+ "license": "CC0-1.0",
+ "copyright": "Created by TheShuEd (github) for ss14",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "anom",
+ "delays": [
+ [
+ 0.38625,
+ 0.38625,
+ 0.38625,
+ 0.38625
+ ]
+ ]
+ },
+ {
+ "name": "pulse",
+ "delays": [
+ [
+ 0.25625,
+ 0.25625,
+ 0.25625,
+ 0.25625
+ ]
+ ]
+ },
+ {
+ "name": "bulb",
+ "delays": [
+ [
+ 0.25625,
+ 0.25625,
+ 0.25625,
+ 0.25625
+ ]
+ ]
+ }
+ ]
+}