The glowing forest anomaly (#24351)

* sans

* Papyrus

* add to game

* tweak stick

* fixes

* Update Resources/Prototypes/Entities/Objects/Misc/kudzu.yml

Co-authored-by: Kara <lunarautomaton6@gmail.com>

* Update Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomalies.yml

Co-authored-by: Kara <lunarautomaton6@gmail.com>

---------

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Ed
2024-01-21 04:31:12 +03:00
committed by GitHub
parent 691c3d55b8
commit b3b64e6cf2
36 changed files with 368 additions and 40 deletions

View File

@@ -1,13 +1,8 @@
using System.Linq;
using System.Numerics; using System.Numerics;
using Content.Server.Maps;
using Content.Shared.Anomaly.Components; using Content.Shared.Anomaly.Components;
using Content.Shared.Anomaly.Effects.Components; using Content.Shared.Anomaly.Effects.Components;
using Content.Shared.Maps; using Content.Shared.Maps;
using Content.Shared.Physics;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Random; using Robust.Shared.Random;
namespace Content.Server.Anomaly.Effects; namespace Content.Server.Anomaly.Effects;

View File

@@ -1,5 +1,4 @@
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Server.Spawners.Components namespace Content.Server.Spawners.Components
{ {
@@ -8,15 +7,15 @@ namespace Content.Server.Spawners.Components
public partial class ConditionalSpawnerComponent : Component public partial class ConditionalSpawnerComponent : Component
{ {
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("prototypes", customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))] [DataField]
public List<string> Prototypes { get; set; } = new(); public List<EntProtoId> Prototypes { get; set; } = new();
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("gameRules", customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))] [DataField]
public List<string> GameRules = new(); public List<EntProtoId> GameRules = new();
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("chance")] [DataField]
public float Chance { get; set; } = 1.0f; public float Chance { get; set; } = 1.0f;
} }
} }

View File

@@ -1,5 +1,4 @@
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Server.Spawners.Components namespace Content.Server.Spawners.Components
{ {
@@ -7,15 +6,18 @@ namespace Content.Server.Spawners.Components
public sealed partial class RandomSpawnerComponent : ConditionalSpawnerComponent public sealed partial class RandomSpawnerComponent : ConditionalSpawnerComponent
{ {
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("rarePrototypes", customTypeSerializer:typeof(PrototypeIdListSerializer<EntityPrototype>))] [DataField]
public List<string> RarePrototypes { get; set; } = new(); public List<EntProtoId> RarePrototypes { get; set; } = new();
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("rareChance")] [DataField]
public float RareChance { get; set; } = 0.05f; public float RareChance { get; set; } = 0.05f;
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("offset")] [DataField]
public float Offset { get; set; } = 0.2f; public float Offset { get; set; } = 0.2f;
[DataField]
public bool DeleteSpawnerAfterSpawn = true;
} }
} }

View File

@@ -30,7 +30,8 @@ namespace Content.Server.Spawners.EntitySystems
private void OnRandSpawnMapInit(EntityUid uid, RandomSpawnerComponent component, MapInitEvent args) private void OnRandSpawnMapInit(EntityUid uid, RandomSpawnerComponent component, MapInitEvent args)
{ {
Spawn(uid, component); Spawn(uid, component);
QueueDel(uid); if (component.DeleteSpawnerAfterSpawn)
QueueDel(uid);
} }
private void OnRuleStarted(ref GameRuleStartedEvent args) private void OnRuleStarted(ref GameRuleStartedEvent args)

View File

@@ -17,28 +17,33 @@ public sealed partial class KudzuComponent : Component
/// <summary> /// <summary>
/// Chance to spread whenever an edge spread is possible. /// Chance to spread whenever an edge spread is possible.
/// </summary> /// </summary>
[DataField("spreadChance")] [DataField]
public float SpreadChance = 1f; public float SpreadChance = 1f;
/// <summary> /// <summary>
/// How much damage is required to reduce growth level /// How much damage is required to reduce growth level
/// </summary> /// </summary>
[DataField("growthHealth")] [DataField]
public float GrowthHealth = 10.0f; public float GrowthHealth = 10.0f;
/// <summary> /// <summary>
/// How much damage is required to prevent growth /// How much damage is required to prevent growth
/// </summary> /// </summary>
[DataField("growthBlock")] [DataField]
public float GrowthBlock = 20.0f; public float GrowthBlock = 20.0f;
/// <summary> /// <summary>
/// How much the kudzu heals each tick /// How much the kudzu heals each tick
/// </summary> /// </summary>
[DataField("damageRecovery")] [DataField]
public DamageSpecifier? DamageRecovery = null; public DamageSpecifier? DamageRecovery = null;
[DataField("growthTickChance")] [DataField]
public float GrowthTickChance = 1f; public float GrowthTickChance = 1f;
/// <summary>
/// number of sprite variations for kudzu
/// </summary>
[DataField]
public int SpriteVariants = 3;
} }

View File

@@ -92,7 +92,7 @@ public sealed class KudzuSystem : EntitySystem
return; 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); _appearance.SetData(uid, KudzuVisuals.GrowthLevel, 1, appearance);
} }

View File

@@ -1,7 +1,5 @@
using Content.Shared.Maps; using Content.Shared.Maps;
using Robust.Shared.Prototypes; 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; namespace Content.Shared.Anomaly.Effects.Components;
@@ -11,7 +9,7 @@ public sealed partial class TileSpawnAnomalyComponent : Component
/// <summary> /// <summary>
/// The maximum radius of tiles scales with stability /// The maximum radius of tiles scales with stability
/// </summary> /// </summary>
[DataField("spawnRange"), ViewVariables(VVAccess.ReadWrite)] [DataField, ViewVariables(VVAccess.ReadWrite)]
public float SpawnRange = 5f; public float SpawnRange = 5f;
/// <summary> /// <summary>
@@ -23,6 +21,6 @@ public sealed partial class TileSpawnAnomalyComponent : Component
/// <summary> /// <summary>
/// The tile that is spawned by the anomaly's effect /// The tile that is spawned by the anomaly's effect
/// </summary> /// </summary>
[DataField("floorTileId", customTypeSerializer: typeof(PrototypeIdSerializer<ContentTileDefinition>)), ViewVariables(VVAccess.ReadWrite)] [DataField, ViewVariables(VVAccess.ReadWrite)]
public string FloorTileId = "FloorFlesh"; public ProtoId<ContentTileDefinition> FloorTileId = "FloorFlesh";
} }

View File

@@ -58,3 +58,47 @@
state: crab_uranium state: crab_uranium
- type: SpawnOnDespawn - type: SpawnOnDespawn
prototype: MobUraniumCrab 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

View File

@@ -18,5 +18,6 @@
- AnomalyIce - AnomalyIce
- AnomalyRock - AnomalyRock
- AnomalyLiquid - AnomalyLiquid
- AnomalyFlora
chance: 1 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. 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.

View File

@@ -33,7 +33,7 @@
- type: MobThresholds - type: MobThresholds
thresholds: thresholds:
0: Alive 0: Alive
100: Dead 50: Dead
- type: DamageStateVisuals - type: DamageStateVisuals
states: states:
Alive: Alive:
@@ -70,15 +70,15 @@
types: types:
Heat: -0.2 Heat: -0.2
- type: NoSlip - type: NoSlip
- type: Pullable
- type: ZombieImmune - type: ZombieImmune
- type: NameIdentifier - type: NameIdentifier
group: GenericNumber group: GenericNumber
- type: GhostTakeoverAvailable - type: GhostTakeoverAvailable
- type: PointLight - type: PointLight
color: "#e4de6c" radius: 3.0
radius: 8 energy: 4.5
softness: 2 color: "#6270bb"
energy: 5
- type: FootstepModifier - type: FootstepModifier
footstepSoundCollection: footstepSoundCollection:
collection: FootstepBells collection: FootstepBells
@@ -105,7 +105,7 @@
- type: MeleeWeapon - type: MeleeWeapon
damage: damage:
types: types:
Heat: 16 Heat: 10
animation: WeaponArcFist animation: WeaponArcFist
- type: StaminaDamageOnHit - type: StaminaDamageOnHit
damage: 16 damage: 16
@@ -127,7 +127,7 @@
- type: MobThresholds - type: MobThresholds
thresholds: thresholds:
0: Alive 0: Alive
50: Dead 30: Dead
- type: DamageStateVisuals - type: DamageStateVisuals
states: states:
Alive: Alive:
@@ -139,7 +139,7 @@
- type: MeleeWeapon - type: MeleeWeapon
damage: damage:
types: types:
Heat: 8 Heat: 6
- type: Destructible - type: Destructible
thresholds: thresholds:
- trigger: - trigger:
@@ -167,7 +167,7 @@
- type: MobThresholds - type: MobThresholds
thresholds: thresholds:
0: Alive 0: Alive
60: Dead 40: Dead
- type: DamageStateVisuals - type: DamageStateVisuals
states: states:
Alive: Alive:
@@ -181,7 +181,7 @@
types: types:
Heat: 5 Heat: 5
- type: HitscanBatteryAmmoProvider - type: HitscanBatteryAmmoProvider
proto: Pulse proto: RedLaser
fireCost: 140 fireCost: 140
- type: Battery - type: Battery
maxCharge: 1000 maxCharge: 1000

View File

@@ -103,6 +103,59 @@
- type: Kudzu - type: Kudzu
spreadChance: 0.3 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 - type: entity
id: FleshKudzu id: FleshKudzu
name: tendons name: tendons

View File

@@ -208,7 +208,6 @@
types: types:
Radiation: 10 Radiation: 10
- type: entity - type: entity
id: AnomalyIce id: AnomalyIce
parent: BaseAnomaly parent: BaseAnomaly
@@ -290,6 +289,86 @@
- WallSpawnAsteroid - WallSpawnAsteroid
- SpawnMobOreCrab - 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 - type: entity
id: AnomalyLiquid id: AnomalyLiquid
parent: BaseAnomaly parent: BaseAnomaly

View File

@@ -135,6 +135,19 @@
castShadows: false castShadows: false
- type: Electrified - 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 # Inert cores
- type: entity - type: entity
@@ -255,3 +268,16 @@
energy: 2.0 energy: 2.0
color: "#ffffaa" color: "#ffffaa"
castShadows: false 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,56 @@
{
"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"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

View File

@@ -0,0 +1,25 @@
{
"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
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

View File

@@ -0,0 +1,44 @@
{
"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
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB