--- /dev/null
+using Content.Shared.Damage;
+using Robust.Shared.Prototypes;
+
+namespace Content.Server.Flash.Components;
+
+// Also needed FlashableComponent on entity to work
+[RegisterComponent, Access(typeof(DamagedByFlashingSystem))]
+public sealed partial class DamagedByFlashingComponent : Component
+{
+ /// <summary>
+ /// damage from flashing
+ /// </summary>
+ [DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
+ public DamageSpecifier FlashDamage = new ();
+}
--- /dev/null
+using Content.Server.Flash.Components;
+using Content.Shared.Damage;
+
+namespace Content.Server.Flash;
+public sealed class DamagedByFlashingSystem : EntitySystem
+{
+ [Dependency] private readonly DamageableSystem _damageable = default!;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ SubscribeLocalEvent<DamagedByFlashingComponent, FlashAttemptEvent>(OnFlashAttempt);
+ }
+ private void OnFlashAttempt(Entity<DamagedByFlashingComponent> ent, ref FlashAttemptEvent args)
+ {
+ _damageable.TryChangeDamage(ent, ent.Comp.FlashDamage);
+
+ //To Do: It would be more logical if different flashes had different power,
+ //and the damage would be inflicted depending on the strength of the flash.
+ }
+}
[Dependency] private readonly SharedChargesSystem _charges = default!;
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
[Dependency] private readonly IGameTiming _timing = default!;
+ [Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
[Dependency] private readonly InventorySystem _inventory = default!;
[Dependency] private readonly PopupSystem _popup = default!;
public void FlashArea(EntityUid source, EntityUid? user, float range, float duration, float slowTo = 0.8f, bool displayPopup = false, SoundSpecifier? sound = null)
{
var transform = EntityManager.GetComponent<TransformComponent>(source);
- var mapPosition = transform.MapPosition;
- var flashableEntities = new List<EntityUid>();
+ var mapPosition = _transform.GetMapCoordinates(transform);
var flashableQuery = GetEntityQuery<FlashableComponent>();
foreach (var entity in _entityLookup.GetEntitiesInRange(transform.Coordinates, range))
{
- if (!flashableQuery.HasComponent(entity))
+ if (!flashableQuery.TryGetComponent(entity, out var flashable))
continue;
- flashableEntities.Add(entity);
- }
- foreach (var entity in flashableEntities)
- {
// Check for unobstructed entities while ignoring the mobs with flashable components.
- if (!_interaction.InRangeUnobstructed(entity, mapPosition, range, CollisionGroup.Opaque, (e) => flashableEntities.Contains(e) || e == source))
+ if (!_interaction.InRangeUnobstructed(entity, mapPosition, range, flashable.CollisionGroup, (e) => e == source))
continue;
// They shouldn't have flash removed in between right?
Flash(entity, user, source, duration, slowTo, displayPopup, flashableQuery.GetComponent(entity));
}
+
if (sound != null)
{
_audio.PlayPvs(sound, source, AudioParams.Default.WithVolume(1f).WithMaxDistance(3f));
+using Content.Shared.Physics;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
public float Duration;
public TimeSpan LastFlash;
+ [DataField]
+ public CollisionGroup CollisionGroup = CollisionGroup.Opaque;
+
public override bool SendOnlyToOwner => true;
}
spookyspace2.ogg"]
license: "CC0-1.0"
copyright: "Taken from /vg/station"
- source: "https://github.com/vgstation-coders/vgstation13/commit/23303188abe6fe31b114a218a1950d7325a23730"
\ No newline at end of file
+ source: "https://github.com/vgstation-coders/vgstation13/commit/23303188abe6fe31b114a218a1950d7325a23730"
+
+
+- files: ["anomaly_scary.ogg"]
+ license: "CC0-1.0"
+ copyright: "Created by dimbark1, edited and converted to mono by TheShuEd (github)"
+ source: "https://freesound.org/people/dimbark1/sounds/316797/"
\ No newline at end of file
petting-failure-hamster = You reach out to pet {THE($target)}, but {SUBJECT($target)} attempts to bite your finger and only your quick reflexes save you from an almost fatal injury.
petting-failure-bear = You reach out to pet {THE($target)}, but {SUBJECT($target)} growls, making you think twice.
petting-failure-monkey = You reach out to pet {THE($target)}, but {SUBJECT($target)} almost bites your fingers!
+petting-failure-shadow = You're trying to pet {THE($target)}, but your hand passes through the cold darkness of his body.
## Petting silicons
- Toxin
supportedTypes:
- Shock
+
+- type: damageContainer
+ id: ShadowHaze
+ supportedTypes:
+ - Heat
\ No newline at end of file
lifetime: 120
- type: Portal
canTeleportToOtherMaps: true
+
+- type: entity
+ id: ShadowPortal
+ name: shadow rift
+ description: Looks unstable.
+ parent: [ BasePortal, BaseShadow ]
+ components:
+ - type: Portal
+ arrivalSound: /Audio/Items/hiss.ogg
+ departureSound: /Audio/Items/hiss.ogg
+ - type: Sprite
+ state: portal-artifact
+ color: "#793a80dd"
+ - type: PointLight
+ color: "#793a80dd"
+ radius: 3
+ energy: 1
+ netsync: false
+ - type: AmbientSound
+ range: 6
+ volume: -3
+ sound:
+ path: /Audio/Ambience/anomaly_scary.ogg
\ No newline at end of file
- RandomRockAnomalySpawner
- AnomalyLiquid
- AnomalyFlora
+ - AnomalyShadow
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.
--- /dev/null
+- type: entity
+ id: ShadowKudzuLootSpawner
+ parent: MarkerBase
+ components:
+ - type: Sprite
+ layers:
+ - state: red
+ - sprite: Structures/Specific/Anomalies/shadow_anom.rsi
+ state: anom
+ - type: RandomSpawner
+ offset: 0.05
+ chance: 0.7
+ prototypes:
+ - CrystalPink
+ - CrystalPink
+ - ShadowPortal
+ - ShadowTree01
+ - ShadowTree02
+ - ShadowTree03
+ - ShadowTree04
+ - ShadowTree05
+ - ShadowTree06
+ rareChance: 0.05
+ rarePrototypes:
+ - MobCatShadow
+ - ArtifactFragment
\ No newline at end of file
--- /dev/null
+- type: entity
+ id: BaseShadowMob
+ abstract: true
+ parent: [ BaseMob, BaseShadow ]
+ components:
+ - type: Sprite
+ color: "#793a80dd"
+ - type: PointLight
+ color: "#793a80dd"
+ radius: 1.1
+ - type: MovementSpeedModifier
+ baseWalkSpeed: 2
+ baseSprintSpeed: 2
+ - type: Fixtures
+ fixtures:
+ fix1:
+ shape:
+ !type:PhysShapeCircle
+ radius: 0.35
+ density: 120
+ mask:
+ - Opaque
+ layer:
+ - None
+ - type: StandingState
+ - type: Tag
+ tags:
+ - DoorBumpOpener
+ - type: NpcFactionMember
+ factions:
+ - SimpleNeutral
+ - type: HTN
+ rootTask:
+ task: IdleCompound
+ - type: SlowOnDamage
+ speedModifierThresholds:
+ 60: 0.7
+ 80: 0.5
+
+- type: entity
+ name: shadow cat
+ parent: BaseShadowMob
+ id: MobCatShadow
+ description: A lovely piece of darkness. Hope he doesn't bring you a curse.
+ components:
+ - type: Sprite
+ drawdepth: Mobs
+ sprite: Mobs/Pets/cat.rsi
+ layers:
+ - map: ["enum.DamageStateVisualLayers.Base"]
+ state: cat
+ - type: Physics
+ - type: ReplacementAccent
+ accent: cat
+ - type: InteractionPopup
+ successChance: 0.01 # you cant pet shadow cat... almost
+ interactSuccessString: petting-success-cat
+ interactFailureString: petting-failure-shadow
+ interactSuccessSpawn: EffectHearts
+ interactSuccessSound:
+ path: /Audio/Animals/cat_meow.ogg
+ - type: Grammar
+ attributes:
+ gender: epicene
+ - type: Tag
+ tags:
+ - VimPilot
\ No newline at end of file
- type: entity
- id: Kudzu
- name: kudzu
- description: A rapidly growing, dangerous plant. WHY ARE YOU STOPPING TO LOOK AT IT?!
+ id: BaseKudzu
+ abstract: true
placement:
mode: SnapgridCenter
snap:
- Wall
+ components:
+ - type: Appearance
+ - type: Transform
+ anchored: true
+ - type: Physics
+ - type: Kudzu
+ - type: GrowingKudzu
+ - type: ActiveEdgeSpreader
+ - type: EdgeSpreader
+ id: Kudzu
+
+- type: entity
+ id: Kudzu
+ name: kudzu
+ parent: BaseKudzu
+ description: A rapidly growing, dangerous plant. WHY ARE YOU STOPPING TO LOOK AT IT?!
components:
- type: MeleeSound
soundGroups:
sprite: Objects/Misc/kudzu.rsi
state: kudzu_11
drawdepth: Overdoors
- - type: Appearance
- type: KudzuVisuals
- type: Clickable
- - type: Transform
- anchored: true
- - type: Physics
- type: Fixtures
fixtures:
fix1:
types:
Heat: 10
- type: AtmosExposed
- - type: Kudzu
growthTickChance: 0.3
spreadChance: 0.4
- - type: GrowingKudzu
- type: SlowContacts
walkSpeedModifier: 0.2
sprintSpeedModifier: 0.2
ignoreWhitelist:
components:
- IgnoreKudzu
- - type: ActiveEdgeSpreader
- - type: EdgeSpreader
- id: Kudzu
- type: Food
requiredStomachs: 2 # ruminants have 4 stomachs but i dont care to give them literally 4 stomachs. 2 is good
delay: 0.5
- type: entity
id: FleshKudzu
name: tendons
+ parent: BaseKudzu
description: A rapidly growing cluster of meaty tendons. WHY ARE YOU STOPPING TO LOOK AT IT?!
placement:
mode: SnapgridCenter
sprite: Objects/Misc/fleshkudzu.rsi
state: kudzu_11
drawdepth: Overdoors
- - type: Appearance
- type: KudzuVisuals
- type: Clickable
- - type: Transform
- anchored: true
- - type: Physics
- type: Fixtures
fixtures:
fix1:
damage:
types:
Heat: 3
- - type: GrowingKudzu
growthTickChance: 0.3
- type: AtmosExposed
- - type: ActiveEdgeSpreader
- - type: EdgeSpreader
- id: Kudzu
- type: SlowContacts
walkSpeedModifier: 0.3
sprintSpeedModifier: 0.3
types:
Asphyxiation: -0.25
+- type: entity
+ name: dark haze
+ id: ShadowKudzu
+ parent: [ BaseKudzu, BaseShadow ]
+ components:
+ - type: Physics
+ canCollide: false
+ - type: Occluder
+ - type: Sprite
+ drawdepth: Effects
+ sprite: Effects/spookysmoke.rsi
+ state: spookysmoke
+ color: "#793a80dd"
+ - type: Kudzu
+ growthTickChance: 0.2
+ spreadChance: 0.99
+ - type: RandomSpawner
+ deleteSpawnerAfterSpawn: false
+ rareChance: 0.05
+ offset: 0.2
+ chance: 0.45
+ prototypes:
+ - ShadowBasaltRandom
+ rarePrototypes:
+ - ShadowPortal
+ - ShadowKudzuLootSpawner
+ - type: Tag
+ tags:
+ - HideContextMenu
+ - SpookyFog
+
+- type: entity
+ name: Haze
+ id: ShadowKudzuWeak
+ parent: ShadowKudzu
+ components:
+ - type: Kudzu
+ spreadChance: 0 #appears during pulsation. It shouldnt spreading.
\ No newline at end of file
--- /dev/null
+- type: entity
+ id: BaseShadow
+ abstract: true
+ components:
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 10
+ behaviors:
+ - !type:DoActsBehavior
+ acts: [ "Destruction" ]
+ - !type:PlaySoundBehavior
+ sound:
+ path: /Audio/Items/hiss.ogg
+ params:
+ variation: 0.08
+ - type: Flashable
+ collisionGroup:
+ - None
+ - type: DamagedByFlashing
+ flashDamage:
+ types:
+ Heat: 10
+ - type: Damageable
+ damageContainer: ShadowHaze
solution: anomaly
- type: InjectableSolution
solution: beaker
+
+- type: entity
+ id: AnomalyShadow
+ parent: BaseAnomaly
+ suffix: Shadow
+ components:
+ - type: Sprite
+ sprite: Structures/Specific/Anomalies/shadow_anom.rsi
+ layers:
+ - state: anom
+ map: ["enum.AnomalyVisualLayers.Base"]
+ - state: pulse
+ map: ["enum.AnomalyVisualLayers.Animated"]
+ visible: false
+ - type: PointLight
+ radius: 1.5
+ energy: 12.5
+ color: "#793a80"
+ - type: AmbientSound
+ range: 5
+ volume: -5
+ sound:
+ path: /Audio/Ambience/anomaly_scary.ogg
+ - type: Anomaly
+ corePrototype: AnomalyCoreShadow
+ coreInertPrototype: AnomalyCoreShadowInert
+ anomalyContactDamage:
+ types:
+ Cold: 10
+ animationTime: 4
+ offset: "-0.1,0.1"
+ - type: EntitySpawnAnomaly
+ entries:
+ - settings:
+ spawnOnPulse: true
+ spawnOnSuperCritical: true
+ minAmount: 10
+ maxAmount: 20
+ maxRange: 4
+ spawns:
+ - ShadowKudzuWeak
+ - settings:
+ spawnOnSuperCritical: true
+ minAmount: 30
+ maxAmount: 40
+ maxRange: 50
+ spawns:
+ - ShadowKudzu
+ - type: Portal
+ arrivalSound: /Audio/Items/hiss.ogg
+ departureSound: /Audio/Items/hiss.ogg
+ - type: Tag
+ tags:
+ - SpookyFog
\ No newline at end of file
color: "#6270bb"
castShadows: false
+- type: entity
+ parent: [ BaseAnomalyCore, BaseShadow ]
+ id: AnomalyCoreShadow
+ suffix: Shadow
+ components:
+ - type: Sprite
+ sprite: Structures/Specific/Anomalies/Cores/shadow_core.rsi
+ - type: PointLight
+ radius: 1.5
+ energy: 2.0
+ color: "#793a80"
+ castShadows: false
+
# Inert cores
- type: entity
energy: 2.0
color: "#6270bb"
castShadows: false
+
+- type: entity
+ parent: [ BaseAnomalyInertCore, BaseShadow ]
+ id: AnomalyCoreShadowInert
+ suffix: Shadow, Inert
+ components:
+ - type: Sprite
+ sprite: Structures/Specific/Anomalies/Cores/shadow_core.rsi
+ - type: PointLight
+ radius: 1.5
+ energy: 2.0
+ color: "#793a80"
+ castShadows: false
rules: NearMorgue
priority: 4
+- type: ambientMusic
+ id: SpookyFog
+ sound:
+ params:
+ volume: -12
+ collection: AmbienceSpookyFog
+ rules: NearSpookyFog
+ priority: 5
+
- type: ambientMusic
id: Holy
sound:
- /Audio/Ambience/ambiruin6.ogg
- /Audio/Ambience/ambiruin7.ogg
+- type: soundCollection
+ id: AmbienceSpookyFog
+ files:
+ - /Audio/Ambience/spookyspace1.ogg
+ - /Audio/Ambience/spookyspace2.ogg
+ - /Audio/Ambience/ambimo2.ogg
+ - /Audio/Ambience/ambilava1.ogg
+ - /Audio/Ambience/ambilava2.ogg
+ - /Audio/Ambience/ambiruin2.ogg
+ - /Audio/Ambience/ambiruin3.ogg
+ - /Audio/Ambience/ambiruin4.ogg
+ - /Audio/Ambience/ambiruin5.ogg
+ - /Audio/Ambience/ambiruin6.ogg
+ - /Audio/Ambience/ambiruin7.ogg
+ - /Audio/Ambience/ambidanger.ogg
+ - /Audio/Ambience/ambidanger2.ogg
+ - /Audio/Ambience/ambimine.ogg
+
## Background noise on station, separate to ambient music.
- type: soundCollection
id: AmbienceStation
components:
- type: Morgue
range: 3
+
+- type: rules
+ id: NearSpookyFog
+ rules:
+ - !type:NearbyEntitiesRule
+ count: 5
+ whitelist:
+ tags:
+ - SpookyFog
+ range: 4
- type: rules
id: OnMapGrid
- type: Tag
id: Soup
+- type: Tag
+ id: SpookyFog
+
- type: Tag
id: Spray
--- /dev/null
+{
+ "version": 1,
+ "license": "CC-BY-SA-3.0",
+ "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/81b3a082ccdfb425f36bbed6e5bc1f0faed346ec/icons/effects/chemsmoke.dmi, edit by TheShuEd (github)",
+ "size": {
+ "x": 96,
+ "y": 96
+ },
+ "states": [
+ {
+ "name": "spookysmoke",
+ "delays": [
+ [
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2,
+ 0.2
+ ]
+ ]
+ }
+ ]
+}
\ 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": 48
+ },
+ "states": [
+ {
+ "name": "anom",
+ "delays": [
+ [
+ 0.25625,
+ 0.25625,
+ 0.25625
+ ]
+ ]
+ },
+ {
+ "name": "pulse",
+ "delays": [
+ [
+ 0.15625,
+ 0.15625,
+ 0.15625,
+ 0.15625,
+ 0.15625,
+ 0.15625
+ ]
+ ]
+ }
+ ]
+}
\ No newline at end of file