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 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;

View File

@@ -1,5 +1,4 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Server.Spawners.Components
{
@@ -8,15 +7,15 @@ 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;
}
}

View File

@@ -1,5 +1,4 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Server.Spawners.Components
{
@@ -7,15 +6,18 @@ 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;
}
}

View File

@@ -30,7 +30,8 @@ namespace Content.Server.Spawners.EntitySystems
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)

View File

@@ -17,28 +17,33 @@ public sealed partial class KudzuComponent : Component
/// <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;
}

View File

@@ -92,7 +92,7 @@ public sealed class KudzuSystem : EntitySystem
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);
}

View File

@@ -1,7 +1,5 @@
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;
@@ -11,7 +9,7 @@ public sealed partial class TileSpawnAnomalyComponent : Component
/// <summary>
/// The maximum radius of tiles scales with stability
/// </summary>
[DataField("spawnRange"), ViewVariables(VVAccess.ReadWrite)]
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float SpawnRange = 5f;
/// <summary>
@@ -23,6 +21,6 @@ public sealed partial class TileSpawnAnomalyComponent : Component
/// <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";
}

View File

@@ -57,4 +57,48 @@
sprite: /Textures/Effects/mobspawn.rsi
state: crab_uranium
- 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
- 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.

View File

@@ -33,7 +33,7 @@
- type: MobThresholds
thresholds:
0: Alive
100: Dead
50: Dead
- type: DamageStateVisuals
states:
Alive:
@@ -70,15 +70,15 @@
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
@@ -105,7 +105,7 @@
- type: MeleeWeapon
damage:
types:
Heat: 16
Heat: 10
animation: WeaponArcFist
- type: StaminaDamageOnHit
damage: 16
@@ -127,7 +127,7 @@
- type: MobThresholds
thresholds:
0: Alive
50: Dead
30: Dead
- type: DamageStateVisuals
states:
Alive:
@@ -139,7 +139,7 @@
- type: MeleeWeapon
damage:
types:
Heat: 8
Heat: 6
- type: Destructible
thresholds:
- trigger:
@@ -167,7 +167,7 @@
- type: MobThresholds
thresholds:
0: Alive
60: Dead
40: Dead
- type: DamageStateVisuals
states:
Alive:
@@ -181,7 +181,7 @@
types:
Heat: 5
- type: HitscanBatteryAmmoProvider
proto: Pulse
proto: RedLaser
fireCost: 140
- type: Battery
maxCharge: 1000

View File

@@ -103,6 +103,59 @@
- 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

View File

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

View File

@@ -135,6 +135,19 @@
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
@@ -255,3 +268,16 @@
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

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