Skip to content

Commit

Permalink
Update. (#117)
Browse files Browse the repository at this point in the history
* Add flash reaction effect (space-wizards#32377)

add flash reaction effect

* Automatic changelog update

* Fix loneop spawnrate by reverting it to not use the shuttle event system. (space-wizards#32942)

Fix loneop spawnrate by reverting it to not use the custom shuttle event system.

* Automatic changelog update

* add atmosia to devmap (space-wizards#32460)

change

* bowls now make drinking sounds (space-wizards#32819)

* Automatic changelog update

---------

Co-authored-by: slarticodefast <[email protected]>
Co-authored-by: PJBot <[email protected]>
Co-authored-by: BramvanZijp <[email protected]>
Co-authored-by: Ilya246 <[email protected]>
Co-authored-by: Moomoobeef <[email protected]>
  • Loading branch information
6 people authored Oct 26, 2024
1 parent 686f1df commit ede3308
Show file tree
Hide file tree
Showing 11 changed files with 6,102 additions and 3,546 deletions.
82 changes: 82 additions & 0 deletions Content.Server/EntityEffects/Effects/FlashReactionEffect.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using Content.Shared.EntityEffects;
using Content.Server.Flash;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;

namespace Content.Server.EntityEffects.Effects;

[DataDefinition]
public sealed partial class FlashReactionEffect : EntityEffect
{
/// <summary>
/// Flash range per unit of reagent.
/// </summary>
[DataField]
public float RangePerUnit = 0.2f;

/// <summary>
/// Maximum flash range.
/// </summary>
[DataField]
public float MaxRange = 10f;

/// <summary>
/// How much to entities are slowed down.
/// </summary>
[DataField]
public float SlowTo = 0.5f;

/// <summary>
/// The time entities will be flashed in seconds.
/// The default is chosen to be better than the hand flash so it is worth using it for grenades etc.
/// </summary>
[DataField]
public float Duration = 4f;

/// <summary>
/// The prototype ID used for the visual effect.
/// </summary>
[DataField]
public EntProtoId? FlashEffectPrototype = "ReactionFlash";

/// <summary>
/// The sound the flash creates.
/// </summary>
[DataField]
public SoundSpecifier? Sound = new SoundPathSpecifier("/Audio/Weapons/flash.ogg");

protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
=> Loc.GetString("reagent-effect-guidebook-flash-reaction-effect", ("chance", Probability));

public override void Effect(EntityEffectBaseArgs args)
{
var transform = args.EntityManager.GetComponent<TransformComponent>(args.TargetEntity);
var transformSystem = args.EntityManager.System<SharedTransformSystem>();

var range = 1f;

if (args is EntityEffectReagentArgs reagentArgs)
range = MathF.Min((float)(reagentArgs.Quantity * RangePerUnit), MaxRange);

args.EntityManager.System<FlashSystem>().FlashArea(
args.TargetEntity,
null,
range,
Duration * 1000,
slowTo: SlowTo,
sound: Sound);

if (FlashEffectPrototype == null)
return;

var uid = args.EntityManager.SpawnEntity(FlashEffectPrototype, transformSystem.GetMapCoordinates(transform));
transformSystem.AttachToGridOrMap(uid);

if (!args.EntityManager.TryGetComponent<PointLightComponent>(uid, out var pointLightComp))
return;
var pointLightSystem = args.EntityManager.System<SharedPointLightSystem>();
// PointLights with a radius lower than 1.1 are too small to be visible, so this is hardcoded
pointLightSystem.SetRadius(uid, MathF.Max(1.1f, range), pointLightComp);
}
}
44 changes: 23 additions & 21 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
Entries:
- author: Errant
changes:
- message: Medical Mask sprite now works on vox.
type: Fix
id: 7052
time: '2024-08-07T03:41:40.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/30702
- author: Lyroth001
changes:
- message: Dragons are immune to flashes
type: Tweak
id: 7053
time: '2024-08-07T07:42:00.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/30658
- author: ShadowCommander
changes:
- message: Rollerbeds can now be dragged to the player to fold and pick them up.
type: Add
id: 7054
time: '2024-08-07T09:19:10.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/30002
- author: Errant
changes:
- message: Survivors arriving via the Unknown Shuttle event, ERT and CBURN agents,
Expand Down Expand Up @@ -3959,3 +3938,26 @@
id: 7551
time: '2024-10-24T03:41:03.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32965
- author: slarticodefast
changes:
- message: Mix 1u aluminium, 1u potassium and 1u sulfur for a flash reaction effect.
The radius scales with the reagent amount.
type: Add
id: 7552
time: '2024-10-25T22:47:12.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32377
- author: BramvanZijp
changes:
- message: Fixed the Lone Nuclear Operative mid-round antagonist being extremely
rare.
type: Fix
id: 7553
time: '2024-10-26T02:16:45.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32942
- author: Moomoobeef
changes:
- message: Bowls no longer make an eating sound when drinking from them.
type: Fix
id: 7554
time: '2024-10-26T04:00:49.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32819
6 changes: 6 additions & 0 deletions Resources/Locale/en-US/guidebook/chemistry/effects.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ reagent-effect-guidebook-emp-reaction-effect =
*[other] cause
} an electromagnetic pulse
reagent-effect-guidebook-flash-reaction-effect =
{ $chance ->
[1] Causes
*[other] cause
} a blinding flash
reagent-effect-guidebook-foam-area-reaction-effect =
{ $chance ->
[1] Creates
Expand Down
9,462 changes: 5,947 additions & 3,515 deletions Resources/Maps/Test/dev_map.yml

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions Resources/Prototypes/Entities/Effects/chemistry_effects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,16 @@
state: metal_foam-north
- map: [ "enum.EdgeLayer.West" ]
state: metal_foam-west

- type: entity
id: ReactionFlash
categories: [ HideSpawnMenu ]
components:
- type: PointLight
enabled: true
radius: 2
energy: 8
- type: LightFade
duration: 0.5
- type: TimedDespawn
lifetime: 0.5
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
visible: false
- type: MixableSolution
solution: food
- type: Drink
solution: food
useSound:
path: /Audio/Items/drink.ogg
- type: DamageOnLand
damage:
types:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@
- type: GasMiner
spawnGas: Tritium

- type: entity
name: frezon gas miner
parent: GasMinerBase
id: GasMinerFrezon
components:
- type: GasMiner
spawnGas: Frezon

- type: entity
name: water vapor gas miner
parent: GasMinerBase
Expand Down
3 changes: 2 additions & 1 deletion Resources/Prototypes/GameRules/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- id: RevenantSpawn
- id: SleeperAgents
- id: ZombieOutbreak
- id: LoneOpsSpawn

- type: entity
id: BaseStationEvent
Expand Down Expand Up @@ -454,7 +455,7 @@
duration: 1
- type: RuleGrids
- type: LoadMapRule
preloadedGrid: ShuttleStriker
mapPath: /Maps/Shuttles/ShuttleEvent/striker.yml
- type: NukeopsRule
roundEndBehavior: Nothing
- type: AntagSelection
Expand Down
5 changes: 2 additions & 3 deletions Resources/Prototypes/GameRules/unknown_shuttles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
- id: UnknownShuttleMeatZone
- id: UnknownShuttleMicroshuttle
- id: UnknownShuttleSpacebus
- id: UnknownShuttleInstigator

- type: entityTable
id: UnknownShuttlesFreelanceTable
Expand All @@ -32,9 +31,9 @@
id: UnknownShuttlesHostileTable
table: !type:AllSelector # we need to pass a list of rules, since rules have further restrictions to consider via StationEventComp
children:
- id: LoneOpsSpawn
- id: UnknownShuttleInstigator

# Shuttle Game Rules
# Shuttle Game Rules

- type: entity
abstract: true
Expand Down
16 changes: 15 additions & 1 deletion Resources/Prototypes/Recipes/Reactions/chemicals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
amount: 1
Sulfur:
amount: 1
Oxygen:
Oxygen:
amount: 2
products:
SulfuricAcid: 3
Expand Down Expand Up @@ -205,6 +205,20 @@
energyConsumption: 12500
duration: 15

- type: reaction
id: Flash
impact: High
priority: 20
reactants:
Aluminium:
amount: 1
Potassium:
amount: 1
Sulfur:
amount: 1
effects:
- !type:FlashReactionEffect

- type: reaction
id: TableSalt
minTemp: 370
Expand Down
5 changes: 0 additions & 5 deletions Resources/Prototypes/Shuttles/shuttle_incoming_event.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
- type: preloadedGrid
id: ShuttleStriker
path: /Maps/Shuttles/ShuttleEvent/striker.yml
copies: 2

- type: preloadedGrid
id: ShuttleCargoLost
path: /Maps/Shuttles/ShuttleEvent/lost_cargo.yml
Expand Down

0 comments on commit ede3308

Please sign in to comment.