Skip to content

Commit

Permalink
Merge branch '2024-10-13-Workflows2' of https://github.com/dvir001/fr…
Browse files Browse the repository at this point in the history
…ontier-station-14 into Workflows2-test
  • Loading branch information
whatston3 committed Oct 16, 2024
2 parents c19b6bd + ce2f5c5 commit 4329200
Show file tree
Hide file tree
Showing 122 changed files with 1,617 additions and 353 deletions.
9 changes: 7 additions & 2 deletions Content.IntegrationTests/Tests/MachineBoardTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Content.Server.Construction.Components;
using Content.Shared.Construction.Components;
Expand Down Expand Up @@ -57,7 +57,7 @@ await server.WaitAssertion(() =>
Assert.Multiple(() =>
{
Assert.That(protoMan.TryIndex<EntityPrototype>(mId, out var mProto),
$"Machine board {p.ID}'s corresponding machine has an invalid prototype."); // Frontier
$"Machine board {p.ID}'s corresponding machine has an invalid prototype.");
Assert.That(mProto.TryGetComponent<MachineComponent>(out var mComp, compFact),
$"Machine board {p.ID}'s corresponding machine {mId} does not have MachineComponent");
Assert.That(mComp.Board, Is.EqualTo(p.ID),
Expand Down Expand Up @@ -93,6 +93,11 @@ await server.WaitAssertion(() =>
continue;
var cId = cbc.Prototype;

// Frontier: we accept null as board prototypes, but this will fail the assertions.
if (cId == "Null")
continue;
// End Frontier

Assert.Multiple(() =>
{
Assert.That(cId, Is.Not.Null, $"Computer board \"{p.ID}\" does not have a corresponding computer.");
Expand Down
22 changes: 19 additions & 3 deletions Content.Server/Corvax/Respawn/RespawnSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ public override void Initialize()
SubscribeLocalEvent<MindContainerComponent, CryosleepBeforeMindRemovedEvent>(OnCryoBeforeMindRemoved);
SubscribeLocalEvent<MindContainerComponent, CryosleepWakeUpEvent>(OnCryoWakeUp);

_admin.OnPermsChanged += OnAdminPermsChanged;
_admin.OnPermsChanged += OnAdminPermsChanged; // Frontier
_player.PlayerStatusChanged += PlayerStatusChanged; // Frontier

Subs.CVar(_cfg, NFCCVars.RespawnCryoFirstTime, OnRespawnCryoFirstTimeChanged, true);
Subs.CVar(_cfg, NFCCVars.RespawnTime, OnRespawnCryoTimeChanged, true);
Subs.CVar(_cfg, NFCCVars.RespawnCryoFirstTime, OnRespawnCryoFirstTimeChanged, true); // Frontier
Subs.CVar(_cfg, NFCCVars.RespawnTime, OnRespawnCryoTimeChanged, true); // Frontier
}

// Frontier: CVar setters
private void OnRespawnCryoFirstTimeChanged(float value)
{
_respawnTimeOnFirstCryo = value;
Expand All @@ -60,6 +62,7 @@ private void OnRespawnCryoTimeChanged(float value)
{
_respawnTime = value;
}
// End Frontier

private void OnMobStateChanged(EntityUid entity, MindContainerComponent component, MobStateChangedEvent e)
{
Expand Down Expand Up @@ -172,4 +175,17 @@ private ref RespawnData GetRespawnData(NetUserId player)
_respawnInfo[player] = new RespawnData();
return ref CollectionsMarshal.GetValueRefOrNullRef(_respawnInfo, player);
}

// Frontier: send ghost timer on player connection
private void PlayerStatusChanged(object? _, SessionStatusEventArgs args)
{
var session = args.Session;

if (args.NewStatus == Robust.Shared.Enums.SessionStatus.InGame &&
_respawnInfo.ContainsKey(session.UserId))
{
RaiseNetworkEvent(new RespawnResetEvent(_respawnInfo[session.UserId].RespawnTime), session);
}
}
// End Frontier
}
16 changes: 14 additions & 2 deletions Content.Server/Power/Generator/GeneratorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Linq;
using Content.Server.Audio;
using Content.Server.Fluids.EntitySystems;
using Content.Server.Materials;
Expand All @@ -12,6 +11,7 @@
using Robust.Server.GameObjects;
using Content.Shared.Radiation.Components; // Frontier
using Content.Shared.Audio; // Frontier
using Content.Shared.Materials; // Frontier

namespace Content.Server.Power.Generator;

Expand Down Expand Up @@ -68,7 +68,19 @@ private void OnEjectFuel(EntityUid uid, FuelGeneratorComponent component, Portab

private void SolidEmpty(EntityUid uid, SolidFuelGeneratorAdapterComponent component, GeneratorEmpty args)
{
_materialStorage.EjectAllMaterial(uid);
// Frontier: eject fuel-grade material
if (component.EjectedFuelProtoId == null)
_materialStorage.EjectAllMaterial(uid);
else
{
int materialAmount = _materialStorage.GetMaterialAmount(uid, component.FuelMaterial);
_materialStorage.TryChangeMaterialAmount(uid, component.FuelMaterial, -materialAmount);

var ejectedUid = Spawn(component.EjectedFuelProtoId, Transform(uid).Coordinates);
if (TryComp<PhysicalCompositionComponent>(ejectedUid, out var phys))
phys.MaterialComposition[component.FuelMaterial] = materialAmount;
}
// End Frontier
}

private void ChemicalEmpty(Entity<ChemicalFuelGeneratorAdapterComponent> entity, ref GeneratorEmpty args)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Shared.Materials;
using Content.Shared.Power.Generator;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Prototypes; // Frontier

namespace Content.Server.Power.Generator;

Expand Down Expand Up @@ -37,4 +38,11 @@ public sealed partial class SolidFuelGeneratorAdapterComponent : Component
/// </summary>
[DataField("multiplier"), ViewVariables(VVAccess.ReadWrite)]
public float Multiplier;

/// <summary>
/// Frontier: entity to spawn for ejected fuel. If null, will spawn material stacks as normal.
/// </summary>
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
[ViewVariables(VVAccess.ReadWrite)]
public string? EjectedFuelProtoId;
}
21 changes: 21 additions & 0 deletions Resources/Changelog/Frontier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4597,3 +4597,24 @@ Entries:
were increased.
id: 5407
time: '2024-10-15T23:58:44.0000000+00:00'
- author: whatston3
changes:
- type: Fix
message: Respawn timers are now properly shown on reconnect.
id: 5408
time: '2024-10-16T10:11:54.0000000+00:00'
- author: erhardsteinhauer
changes:
- type: Add
message: >-
Added admeme mob/boss for Halloween: The Goblinbane - a possessed toiled
hellbent on destroying goblinkind. And felinids. And folks in chaplain
clothes. Can be controlled by ghosts.
id: 5409
time: '2024-10-16T10:12:38.0000000+00:00'
- author: dustylens
changes:
- type: Add
message: Adds medical pen recipes to the medical assembler.
id: 5410
time: '2024-10-16T10:18:31.0000000+00:00'
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
advertisement-goblinbane-1 = The only good goblin is clean goblin! Clean goblin is DEAD goblin!
advertisement-goblinbane-2 = Have you washed your hands lately, goblin? With soap?
advertisement-goblinbane-3 = When was the last time you flossed?
advertisement-goblinbane-4 = Come here! I'll wash your face off!
advertisement-goblinbane-5 = You. Will. Suffer. Uhh.. I mean.. You'll become clean!
advertisement-goblinbane-6 = Soap! Ever heard of it?!
advertisement-goblinbane-7 = Filth. I despise it. I seek to eradicate it. Goblins are filthy.
advertisement-goblinbane-8 = Want to hear a joke? Knock-knock. Who's there? Goblin janitor! Hhah!
advertisement-goblinbane-9 = I'm walking, seeking, cleaning and cleansing.
advertisement-goblinbane-10 = Your untidiness makes my water boil!
advertisement-goblinbane-11 = Space Cleaner!
advertisement-goblinbane-12 = You should've used paper tovels after washing your hands.
advertisement-goblinbane-13 = I could smell you from adjacent compartment, goblin.
advertisement-goblinbane-14 = There will be no mercy, unclean one!
advertisement-goblinbane-15 = Goblins. Dirt. I hate dirt.
advertisement-goblinbane-16 = Here, gobbo-gobbo-gobbo! I wont bite! Pinky promise!
advertisement-goblinbane-17 = When I'm done scraping the dirt from you I'll make a mop handle from your bones.
advertisement-goblinbane-18 = If you don't brush your teeth, I'll brush them off off you.
advertisement-goblinbane-19 = *gurgles*
advertisement-goblinbane-20 = You didn't flush!!
12 changes: 12 additions & 0 deletions Resources/Locale/en-US/_NF/ghost/roles/ghost-role-component.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,15 @@ ghost-role-information-dungeon-boss-rules = You are a [color=red][bold]Team Anta
- [color=red]DO NOT[/color] gib players. Once they're dead, leave them be.
- [color=red]DO NOT[/color] destroy or hide valuable loot in the dungeon.
- [color=red]DO NOT[/color] leave the planet.
ghost-role-information-goblinbane-name = The Goblinbane
ghost-role-information-goblinbane-ghost-name = The Ghost of Goblinbane
ghost-role-information-goblinbane-description = Hunt down those pesky-little-dirty-smelly goblins. And felinids. And also chaplains.
ghost-role-information-goblinbane-rules = You are a [color=red][bold]Solo Antagonist[/bold][/color] capable of summoning minions. [color=yellow]Do note[/color], your minions will be hostile to everyone, except you.
Search and destroy goblins/felinids/chaplains.
Please note that [color=yellow]all server rules still apply.[/color]. Additionally:
- [color=yellow]Reminder[/color] that Frontier Outpost (the station and 200m area around it) is a safe zone.
- [color=red]DO NOT[/color] attack players on the Outpost.
- [color=red]DO NOT[/color] use your abilities on the Outpost.
- [color=red]DO NOT[/color] intentionally damage Frontier Outpost, other POIs, shuttles.
- [color=red]DO NOT[/color] devour walls and airlocks on Frontier Outpost, other POIs, shuttles.
64 changes: 18 additions & 46 deletions Resources/Maps/_NF/Dungeon/cave_factory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8247,18 +8247,6 @@ entities:
- type: Transform
pos: 26.5,30.5
parent: 1
- proto: DebugSMES
entities:
- uid: 966
components:
- type: Transform
pos: 22.5,32.5
parent: 1
- uid: 969
components:
- type: Transform
pos: 18.5,32.5
parent: 1
- proto: DiseaseDiagnoser
entities:
- uid: 1419
Expand All @@ -8273,18 +8261,6 @@ entities:
- type: Transform
pos: 22.5,16.5
parent: 1
- type: ContainerContainer
containers:
DisposalUnit: !type:Container
showEnts: False
occludes: True
ents:
- 551
disposals: !type:Container
showEnts: False
occludes: True
ents: []
- type: Timer
- uid: 724
components:
- type: Transform
Expand Down Expand Up @@ -8737,16 +8713,12 @@ entities:
rot: 1.5707963267948966 rad
pos: 8.5,28.5
parent: 1
- type: Fixtures
fixtures: {}
- uid: 940
components:
- type: Transform
rot: 1.5707963267948966 rad
pos: 10.5,28.5
parent: 1
- type: Fixtures
fixtures: {}
- proto: FloraRockSolid01
entities:
- uid: 1954
Expand Down Expand Up @@ -9134,18 +9106,6 @@ entities:
parent: 1
- proto: HospitalCurtains
entities:
- uid: 944
components:
- type: Transform
rot: 1.5707963267948966 rad
pos: 8.5,24.5
parent: 1
- type: Occluder
enabled: False
- type: Door
state: Open
- type: Physics
canCollide: False
- uid: 945
components:
- type: Transform
Expand All @@ -9160,6 +9120,12 @@ entities:
parent: 1
- proto: HospitalCurtainsOpen
entities:
- uid: 944
components:
- type: Transform
rot: 1.5707963267948966 rad
pos: 8.5,24.5
parent: 1
- uid: 941
components:
- type: Transform
Expand Down Expand Up @@ -9329,8 +9295,6 @@ entities:
components:
- type: Transform
parent: 550
- type: Physics
canCollide: False
- proto: MedicalBed
entities:
- uid: 1141
Expand Down Expand Up @@ -9492,15 +9456,13 @@ entities:
- type: Transform
pos: 20.590317,3.594551
parent: 1
- proto: PortableGeneratorHyperPacmanShuttle
- proto: PortableGeneratorHyperPacman
entities:
- uid: 2077
components:
- type: Transform
pos: 32.5,20.5
parent: 1
- type: FuelGenerator
on: False
- proto: PortableGeneratorPacman
entities:
- uid: 962
Expand Down Expand Up @@ -11393,6 +11355,16 @@ entities:
parent: 1
- proto: SMESBasic
entities:
- uid: 966
components:
- type: Transform
pos: 22.5,32.5
parent: 1
- uid: 969
components:
- type: Transform
pos: 18.5,32.5
parent: 1
- uid: 47
components:
- type: Transform
Expand Down Expand Up @@ -13672,7 +13644,7 @@ entities:
rot: 3.141592653589793 rad
pos: 12.5,43.5
parent: 1
- proto: ToiletEmpty
- proto: ToiletMemeSpawner
entities:
- uid: 927
components:
Expand Down
2 changes: 1 addition & 1 deletion Resources/Maps/_NF/Dungeon/experiment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10347,7 +10347,7 @@ entities:
rot: 1.5707963267948966 rad
pos: 45.5,1.5
parent: 1653
- proto: ToiletEmpty
- proto: ToiletMemeSpawner
entities:
- uid: 799
components:
Expand Down
Loading

0 comments on commit 4329200

Please sign in to comment.