-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8626d36
commit edf74ff
Showing
10 changed files
with
201 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
Content.Server/DeltaV/StationEvents/Components/GlimmerMiteRuleComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using Content.Server.StationEvents.Events; | ||
|
||
namespace Content.Server.StationEvents.Components; | ||
|
||
[RegisterComponent, Access(typeof(GlimmerMiteRule))] | ||
public sealed partial class GlimmerMiteRuleComponent : Component | ||
{ | ||
} |
58 changes: 58 additions & 0 deletions
58
Content.Server/DeltaV/StationEvents/Events/GlimmerMiteSpawnRule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
using System.Linq; | ||
using Robust.Shared.Random; | ||
using Content.Server.GameTicking.Rules.Components; | ||
using Content.Server.NPC.Components; | ||
using Content.Server.Psionics.Glimmer; | ||
using Content.Server.StationEvents.Components; | ||
using Content.Shared.Psionics.Glimmer; | ||
using Content.Shared.Abilities.Psionics; | ||
|
||
namespace Content.Server.StationEvents.Events; | ||
|
||
internal sealed class GlimmerMiteRule : StationEventSystem<GlimmerMiteRuleComponent> | ||
{ | ||
[Dependency] private readonly IRobustRandom _robustRandom = default!; | ||
[Dependency] private readonly GlimmerSystem _glimmerSystem = default!; | ||
|
||
private static readonly string MitePrototype = "MobGlimmerMite"; | ||
|
||
protected override void Started(EntityUid uid, GlimmerMiteRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) | ||
{ | ||
base.Started(uid, component, gameRule, args); | ||
|
||
var glimmerSources = EntityManager.EntityQuery<GlimmerSourceComponent, TransformComponent>().ToList(); | ||
var normalSpawnLocations = EntityManager.EntityQuery<VentCritterSpawnLocationComponent, TransformComponent>().ToList(); | ||
var hiddenSpawnLocations = EntityManager.EntityQuery<MidRoundAntagSpawnLocationComponent, TransformComponent>().ToList(); | ||
|
||
var baseCount = Math.Max(1, EntityManager.EntityQuery<PsionicComponent, NpcFactionMemberComponent>().Count() / 10); | ||
int multiplier = Math.Max(1, (int) _glimmerSystem.GetGlimmerTier() - 2); | ||
|
||
var total = baseCount * multiplier; | ||
|
||
int i = 0; | ||
while (i < total) | ||
{ | ||
if (glimmerSources.Count != 0 && _robustRandom.Prob(0.4f)) | ||
{ | ||
EntityManager.SpawnEntity(MitePrototype, _robustRandom.Pick(glimmerSources).Item2.Coordinates); | ||
i++; | ||
continue; | ||
} | ||
|
||
if (normalSpawnLocations.Count != 0) | ||
{ | ||
EntityManager.SpawnEntity(MitePrototype, _robustRandom.Pick(normalSpawnLocations).Item2.Coordinates); | ||
i++; | ||
continue; | ||
} | ||
|
||
if (hiddenSpawnLocations.Count != 0) | ||
{ | ||
EntityManager.SpawnEntity(MitePrototype, _robustRandom.Pick(hiddenSpawnLocations).Item2.Coordinates); | ||
i++; | ||
continue; | ||
} | ||
return; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mite.ogg was made by Leonardo_DaBepis in FL Studio. |
Binary file not shown.
84 changes: 84 additions & 0 deletions
84
Resources/Prototypes/DeltaV/Entities/Mobs/NPCs/glimmer_creatures.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
- type: entity | ||
name: glimmer mite | ||
parent: SimpleMobBase | ||
id: MobGlimmerMite | ||
description: aaaa | ||
components: | ||
- type: Sprite | ||
drawdepth: SmallMobs | ||
sprite: DeltaV/Mobs/Ghosts/glimmermite.rsi | ||
layers: | ||
- map: ["enum.DamageStateVisualLayers.Base"] | ||
state: mite | ||
- type: Item | ||
size: 2 | ||
- type: HTN | ||
rootTask: | ||
task: MouseCompound | ||
- type: Physics | ||
- type: Fixtures | ||
fixtures: | ||
fix1: | ||
shape: | ||
!type:PhysShapeCircle | ||
radius: 0.2 | ||
density: 100 | ||
mask: | ||
- SmallMobMask | ||
layer: | ||
- SmallMobLayer | ||
- type: MobState | ||
- type: MobThresholds | ||
thresholds: | ||
0: Alive | ||
1: Dead | ||
- type: MovementSpeedModifier | ||
baseWalkSpeed : 5 | ||
baseSprintSpeed : 5 | ||
- type: DamageStateVisuals | ||
states: | ||
Alive: | ||
Base: mite | ||
Dead: | ||
Base: mite_dead | ||
- type: Food | ||
- type: Hunger | ||
baseDecayRate: 0.25 | ||
- type: Extractable | ||
grindableSolutionName: food | ||
- type: SolutionContainerManager | ||
solutions: | ||
food: | ||
reagents: | ||
- ReagentId: Ectoplasm | ||
Quantity: 5 | ||
- type: Butcherable | ||
spawned: | ||
- id: FoodMeatSlime | ||
- type: Damageable | ||
damageContainer: Biological | ||
damageModifierSet: Cockroach | ||
- type: Bloodstream | ||
bloodReagent: Ectoplasm | ||
bloodMaxVolume: 20 | ||
- type: Tag | ||
tags: | ||
- Trash | ||
- VimPilot | ||
- type: Destructible | ||
thresholds: | ||
- trigger: | ||
!type:DamageTypeTrigger | ||
damageType: Blunt | ||
damage: 10 | ||
behaviors: | ||
- !type:GibBehavior { } | ||
- type: NonSpreaderZombie | ||
- type: PotentialPsionic | ||
- type: Psionic | ||
- type: GlimmerSource | ||
- type: AmbientSound | ||
range: 6 | ||
volume: -3 | ||
sound: /Audio/DeltaV/Glimmer_Creatures/mite.ogg | ||
- type: AmbientOnPowered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions
39
Resources/Textures/DeltaV/Mobs/Ghosts/glimmermite.rsi/meta.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"version": 1, | ||
"license": "CC-BY-SA-3.0", | ||
"copyright": "leonardo_dabepis (232229415176634368) on Discord", | ||
"size": { | ||
"x": 32, | ||
"y": 32 | ||
}, | ||
"states": [ | ||
{ | ||
"name": "mite", | ||
"directions": 4, | ||
"delays": [ | ||
[ | ||
0.2, | ||
0.3 | ||
], | ||
[ | ||
0.2, | ||
0.3 | ||
], | ||
[ | ||
0.2, | ||
0.3 | ||
], | ||
[ | ||
0.2, | ||
0.3 | ||
] | ||
] | ||
}, | ||
{ | ||
"name": "icon" | ||
}, | ||
{ | ||
"name": "mite_dead" | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+721 Bytes
Resources/Textures/DeltaV/Mobs/Ghosts/glimmermite.rsi/mite_dead.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.