Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floofstation Release V11 #468

Merged
merged 180 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
f54e075
kettle map
Dunrab Dec 24, 2024
6f99eb7
kettle jobs file
Dunrab Dec 24, 2024
a1ff55c
Fixed the map path
Dunrab Dec 24, 2024
c12f3b0
Added Kettle to PostMapInitTest.cs
Dunrab Dec 26, 2024
0875db1
Update handcuffs.yml
fenndragon Dec 26, 2024
5a31aea
hand
fenndragon Dec 26, 2024
341cc29
Update pda.yml
fenndragon Dec 26, 2024
133f0bc
Update Borgmodules.yml
fenndragon Dec 26, 2024
e79b638
Update pda.yml
fenndragon Dec 27, 2024
9e06581
guns
fenndragon Dec 27, 2024
8f4af9a
guns
fenndragon Dec 27, 2024
621436e
no shells
fenndragon Dec 27, 2024
277f289
Update handcuffs.yml
fenndragon Dec 27, 2024
e43db7a
Update handcuffs.yml
fenndragon Dec 27, 2024
7c63225
Merge branch 'Modules' of https://github.com/fenndragon/floofstation1…
fenndragon Dec 27, 2024
f65af08
Update handcuffs.yml
fenndragon Dec 27, 2024
e393f2b
Update guns.yml
fenndragon Dec 27, 2024
9d30c75
Update GunSystem.cs
fenndragon Dec 27, 2024
ef90690
Delete ProjectileSpreadComponent.cs
fenndragon Dec 27, 2024
236cac4
lets see if this fixes the test
Dunrab Dec 27, 2024
09da23e
added missing jobspawns
Dunrab Dec 27, 2024
400d0c4
Delete Content.Shared/Projectiles/ProjectileSpreadComponent.cs
fenndragon Dec 28, 2024
55cbc45
Update Resources/Prototypes/Floof/Entities/Mobs/Cyborgs/quadborg.yml
fenndragon Dec 28, 2024
d12a516
add
fenndragon Dec 28, 2024
68d0216
Merge branch 'Modules' of https://github.com/fenndragon/floofstation1…
fenndragon Dec 28, 2024
f7e558d
flash
fenndragon Dec 28, 2024
dea0b33
Update quadborg.yml
fenndragon Dec 28, 2024
bed0f98
Update core.yml
fenndragon Dec 29, 2024
a224633
Update departmental_clothes.yml
VividPups Dec 29, 2024
1ecad04
Added Yapping
Memeji Dec 29, 2024
bc83bcf
Merge pull request #439 from Memeji/Nikko-Yapping
Fansana Dec 30, 2024
0c72ae4
Automatic Changelog Update (#439)
Floof-Station-Bot Dec 30, 2024
418b37c
cc
fenndragon Dec 30, 2024
d310205
Update meta.json
fenndragon Dec 30, 2024
526d256
Merge branch 'Fansana:master' into Modules
fenndragon Dec 30, 2024
aed7d0c
Add FTL arrival visuals (#29402)
metalgearsloth Jul 1, 2024
42d0bac
Add Command Glasses (#30447)
SlamBamActionman Aug 29, 2024
d1e5ef7
add glasses to lockers
Fansana Dec 30, 2024
3e1c6aa
added more things i missed
Dunrab Dec 30, 2024
14c1c06
NT & SYNDI shuttles for admins
WhiteLightningTwister Dec 30, 2024
1e75086
fix squeaking stir fry recipe
Fansana Dec 30, 2024
318a9ba
fix test
Fansana Dec 30, 2024
fd849c2
Update quadborg.yml
fenndragon Dec 30, 2024
08f370d
fix
fenndragon Dec 30, 2024
8e7ff2c
update engine to v228.0.0
Fansana Dec 30, 2024
de306fc
AOE mops are real
Mnemotechnician Dec 30, 2024
906d778
Any kind of dragging leaves dragging prints
Mnemotechnician Dec 30, 2024
c14173a
Adjust the absorbance of advanced mops as well
Mnemotechnician Dec 30, 2024
9d69075
Slight balancing
Mnemotechnician Dec 30, 2024
23987a1
f
fenndragon Dec 30, 2024
e1a9f3f
Merge pull request #443 from Fansana/fix-stirfry
Fansana Dec 31, 2024
440ad78
Automatic Changelog Update (#443)
Floof-Station-Bot Dec 31, 2024
537934b
added station anchor and changed lockers
Dunrab Dec 31, 2024
2a4674a
community core changes
Dunrab Dec 31, 2024
555840a
community changes for hammurabi
Dunrab Dec 31, 2024
37ac1aa
Community changes for RadStation
Dunrab Dec 31, 2024
88a2982
Community changes for lighthouse
Dunrab Dec 31, 2024
f31a233
Community changes for lighthouse
Dunrab Dec 31, 2024
263b9ec
Community changes for shoukou
Dunrab Dec 31, 2024
2901749
Community changes for shoukou
Dunrab Dec 31, 2024
ac492cc
Community changes for lighthouse
Dunrab Dec 31, 2024
ccf9327
community changes for asterisk
Dunrab Dec 31, 2024
0b08f5a
Update core.yml
Dunrab Dec 31, 2024
3c6f5ea
Update shoukou.yml
Dunrab Dec 31, 2024
ec8864f
see if this fixes it
Dunrab Dec 31, 2024
8907a38
fix TheDarkSystem
Fansana Dec 31, 2024
f4a6d70
upload the right map file
Dunrab Dec 31, 2024
0d9e685
update engine to v228.0.2
Fansana Dec 31, 2024
9609cc0
Merge pull request #445 from Mnemotechnician/floof/feat/even-better-f…
Fansana Dec 31, 2024
bc21b6a
Merge pull request #441 from Fansana/command-glasses
Fansana Dec 31, 2024
c0a9332
Automatic Changelog Update (#445)
Floof-Station-Bot Dec 31, 2024
87c9688
Merge pull request #431 from Dunrab/map-addition-kettle
Fansana Dec 31, 2024
f3249a0
Automatic Changelog Update (#441)
Floof-Station-Bot Dec 31, 2024
9319a16
Automatic Changelog Update (#431)
Floof-Station-Bot Dec 31, 2024
981c86f
added a few mixing translations and things
Dunrab Dec 31, 2024
11aa523
Community changes for shoukou
Dunrab Dec 31, 2024
54b8c13
replace SpawnEntity
Fansana Dec 31, 2024
c4ef1c7
Community changes for glacier
Dunrab Dec 31, 2024
7d3d67b
more changes to glaicer
Dunrab Dec 31, 2024
758007b
fix SpawnEntity
Fansana Dec 31, 2024
396594b
Merge pull request #444 from Fansana/engine/v228.0.0
Fansana Dec 31, 2024
e0ffe70
Merge pull request #438 from VividPups/corpsboots
Fansana Dec 31, 2024
56d7698
Merge pull request #440 from Fansana/ftl-visuals
Fansana Dec 31, 2024
445250b
Merge pull request #442 from WhiteLightningTwister/Floofshuttles
Fansana Dec 31, 2024
017b85c
Merge pull request #446 from Dunrab/community-map-reworks
Fansana Dec 31, 2024
efca69f
Automatic Changelog Update (#446)
Floof-Station-Bot Dec 31, 2024
cf717a7
up command time
Fansana Jan 1, 2025
7e6490a
Merge pull request #42 from TheDenSS14/clothing-max
sleepyyapril Nov 14, 2024
f88ece9
Added Frontier Jackets to Loadout (#109)
KyuPolaris Dec 29, 2024
943cc9c
Added Frontier Jackets to Loadout (#109)
KyuPolaris Dec 29, 2024
3f86465
Fix Linter
VMSolidus Dec 31, 2024
096ef8a
fixes
Fansana Jan 1, 2025
90bc524
add chaplain sash
Fansana Jan 1, 2025
ebf3403
Update security.yml
fenndragon Jan 1, 2025
acbab9d
Update arsenal.yml
fenndragon Jan 1, 2025
6d5f4a0
Update endoskeleton.yml
fenndragon Jan 1, 2025
5b840eb
Update robotics.yml
fenndragon Jan 1, 2025
c2f5ad3
r
fenndragon Jan 1, 2025
7e6077f
Update endoskeleton.yml
fenndragon Jan 1, 2025
596255f
dude
fenndragon Jan 2, 2025
f11f9e0
there
fenndragon Jan 2, 2025
e8685ce
fix
fenndragon Jan 2, 2025
36f69ce
final
fenndragon Jan 2, 2025
4c6cb11
Update quad_suit.png
fenndragon Jan 2, 2025
b8d97ab
Added expected tag to prevent crash.
Cprn-Sprkl Jan 2, 2025
bc6748e
finished
fenndragon Jan 2, 2025
febc9b0
Update lathe.yml
fenndragon Jan 2, 2025
6c96076
Rework footprints (server side)
Mnemotechnician Jan 3, 2025
5c4e4c3
Merge pull request #449 from Cprn-Sprkl/prescription-hud-GlassesNears…
Fansana Jan 3, 2025
e2a0afe
Automatic Changelog Update (#449)
Floof-Station-Bot Jan 3, 2025
b237859
remove recipe
fenndragon Jan 3, 2025
291ec74
Merge pull request #447 from Fansana/increase-command-time-requirements
Fansana Jan 3, 2025
27e10ec
Automatic Changelog Update (#447)
Floof-Station-Bot Jan 3, 2025
beb53da
fix tests
Fansana Jan 3, 2025
08e4d5c
Leash tweaks
Mnemotechnician Jan 3, 2025
24381fd
Added Shackles and fixed the Witch Uniform to properly bloack other o…
Memeji Jan 3, 2025
e928b1c
Merge branch 'Fansana:master' into Nikko-Shackles
Memeji Jan 3, 2025
393a0e3
Carrying and standing state fixes
Mnemotechnician Jan 3, 2025
a29419b
Make table frames climbable
Mnemotechnician Jan 3, 2025
d561414
Fix ash trays and ash
Mnemotechnician Jan 3, 2025
9fdd90d
Fix welders being able to weld while not active
Mnemotechnician Jan 3, 2025
c97b87d
Fix instrument bands being blocked by non-opaque entities
Mnemotechnician Jan 3, 2025
9e68dce
Fix the deep fryer becoming self-conscious and thinking it is interac…
Mnemotechnician Jan 3, 2025
d426365
Fixed lingering color flash effects
Mnemotechnician Jan 3, 2025
687d3b1
Empty commit to rerun the tests
Mnemotechnician Jan 3, 2025
e50bd76
Merge pull request #452 from Mnemotechnician/floof/fix/en-masse
FoxxoTrystan Jan 4, 2025
2e9fc9a
Automatic Changelog Update (#452)
Floof-Station-Bot Jan 4, 2025
67b98fe
Update quadborg.yml
fenndragon Jan 4, 2025
e9c50af
Update CODEOWNERS
FoxxoTrystan Jan 4, 2025
dd0d453
sprites
fenndragon Jan 4, 2025
a7f2d5d
Update endoskeleton.yml
fenndragon Jan 4, 2025
464041d
Merge branch 'master' into frontier-clothes
Mnemotechnician Jan 5, 2025
e7c48da
Random map votes
Mnemotechnician Jan 5, 2025
7befe24
Merge pull request #450 from Memeji/Nikko-Shackles
Fansana Jan 5, 2025
ea4c53d
Automatic Changelog Update (#450)
Floof-Station-Bot Jan 5, 2025
0284c6c
Fix the condition where <random map> option is part of a tie.
Mnemotechnician Jan 5, 2025
e000f0b
Merge pull request #453 from Mnemotechnician/floof/feat/random-map-vote
Fansana Jan 5, 2025
ac42961
Automatic Changelog Update (#453)
Floof-Station-Bot Jan 5, 2025
820477a
separation
fenndragon Jan 5, 2025
50ff41b
commit
fenndragon Jan 5, 2025
dae0bf9
fix
fenndragon Jan 5, 2025
49da3c2
Update heads.yml
fenndragon Jan 6, 2025
2579131
Add kettle to the map pool
Dunrab Jan 6, 2025
29ab226
Add missing things to kettle
Dunrab Jan 6, 2025
7558003
additional radstation changes
Dunrab Jan 6, 2025
4d3a099
should fix the issue
Dunrab Jan 6, 2025
8e63223
add missing drawers with paper work templates
Dunrab Jan 6, 2025
dc2d886
Update core.yml
fenndragon Jan 6, 2025
6a07095
Update core.yml
fenndragon Jan 6, 2025
f1d75e4
update
fenndragon Jan 6, 2025
8bf03cf
Update laws.ftl
fenndragon Jan 7, 2025
b095add
added justice key to service telecoms
Dunrab Jan 7, 2025
d01f5c3
moved reporters office
Dunrab Jan 7, 2025
f674e57
more changes to rad
Dunrab Jan 7, 2025
f853f10
more misc changes to rad
Dunrab Jan 7, 2025
2157d8c
add missing wire that powers station anchor
Dunrab Jan 7, 2025
ed12194
changed mailroom windoor
Dunrab Jan 7, 2025
1f7e05c
feat: paradox anomaly opt-out consent toggle
mazziechai Jan 7, 2025
fbcedd8
Fix nuke alert localization
LucasTheDrgn Jan 7, 2025
335ef6e
Update core.yml
fenndragon Jan 8, 2025
494c707
ERT ship update
JasmineRickards Jan 8, 2025
800e403
Merge pull request #7 from JasmineRickards/master
JasmineRickards Jan 8, 2025
e916fef
Merge pull request #465 from JasmineRickards/ert
Fansana Jan 8, 2025
b64a29b
Merge pull request #458 from Dunrab/map-reworks-kettle-and-rad
Fansana Jan 8, 2025
ea5ea5a
Automatic Changelog Update (#458)
Floof-Station-Bot Jan 8, 2025
ad88cc0
Merge pull request #463 from mazziechai/feature/clone-consent
Fansana Jan 8, 2025
b2df601
Merge pull request #464 from LucasTheDrgn/fix-nuke-alert
Fansana Jan 8, 2025
8445b3a
Automatic Changelog Update (#463)
Floof-Station-Bot Jan 8, 2025
81c0a15
Automatic Changelog Update (#464)
Floof-Station-Bot Jan 8, 2025
dc12142
Merge branch 'master' into Modules
Fansana Jan 8, 2025
33677a4
Merge pull request #448 from Fansana/frontier-clothes
Fansana Jan 8, 2025
8187d49
Automatic Changelog Update (#448)
Floof-Station-Bot Jan 8, 2025
5ffbee8
Pka Salvage Borg Changes (#454)
VividPups Jan 9, 2025
b776844
Automatic Changelog Update (#454)
Floof-Station-Bot Jan 9, 2025
9c91222
Merge pull request #436 from fenndragon/Modules
Memeji Jan 9, 2025
6f1416c
Automatic Changelog Update (#436)
Floof-Station-Bot Jan 9, 2025
700c71e
Merge pull request #455 from fenndragon/Energy-Shotgun
Memeji Jan 9, 2025
b362f06
Automatic Changelog Update (#455)
Floof-Station-Bot Jan 9, 2025
5f3c923
Merge pull request #459 from fenndragon/Core-update
Memeji Jan 9, 2025
a625a1f
Automatic Changelog Update (#459)
Floof-Station-Bot Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Floofstation CODEOWNERS

* @Fansana @Memeji @FoxxoTrystan
* @Fansana @Memeji @FoxxoTrystan @Mnemotechnician
13 changes: 8 additions & 5 deletions Content.Client/Effects/ColorFlashEffectSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ private void OnEffectAnimationCompleted(EntityUid uid, ColorFlashEffectComponent
sprite.Color = component.Color;
}

RemCompDeferred<ColorFlashEffectComponent>(uid);
// Floof - commented this out due to a race condition. It's quite complicated to explain;
// in short terms, don't do deferred component removal when dealing with concurrent tasks concerning the same component.
// RemCompDeferred<ColorFlashEffectComponent>(uid);
}

private Animation? GetDamageAnimation(EntityUid uid, Color color, SpriteComponent? sprite = null)
Expand Down Expand Up @@ -107,10 +109,11 @@ private void OnColorFlashEffect(ColorFlashEffectEvent ev)
continue;
}

if (TryComp<ColorFlashEffectComponent>(ent, out var effect))
{
sprite.Color = effect.Color;
}
// Floof - commented out. This is handled by the animation complete event.
// if (TryComp<ColorFlashEffectComponent>(ent, out var effect))
// {
// sprite.Color = effect.Color;
// }

var animation = GetDamageAnimation(ent, color, sprite);

Expand Down
82 changes: 82 additions & 0 deletions Content.Client/Shuttles/FtlArrivalOverlay.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using System.Numerics;
using Content.Shared.Shuttles.Components;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Enums;
using Robust.Shared.Map.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;

namespace Content.Client.Shuttles;

/// <summary>
/// Plays a visualization whenever a shuttle is arriving from FTL.
/// </summary>
public sealed class FtlArrivalOverlay : Overlay
{
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowEntities;

private EntityLookupSystem _lookups;
private SharedMapSystem _maps;
private SharedTransformSystem _transforms;
private SpriteSystem _sprites;
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IPrototypeManager _protos = default!;

private readonly HashSet<Entity<FtlVisualizerComponent>> _visualizers = new();

private ShaderInstance _shader;

public FtlArrivalOverlay()
{
IoCManager.InjectDependencies(this);
_lookups = _entManager.System<EntityLookupSystem>();
_transforms = _entManager.System<SharedTransformSystem>();
_maps = _entManager.System<SharedMapSystem>();
_sprites = _entManager.System<SpriteSystem>();

_shader = _protos.Index<ShaderPrototype>("unshaded").Instance();
}

protected override bool BeforeDraw(in OverlayDrawArgs args)
{
_visualizers.Clear();
_lookups.GetEntitiesOnMap(args.MapId, _visualizers);

return _visualizers.Count > 0;
}

protected override void Draw(in OverlayDrawArgs args)
{
args.WorldHandle.UseShader(_shader);

foreach (var (uid, comp) in _visualizers)
{
var grid = comp.Grid;

if (!_entManager.TryGetComponent(grid, out MapGridComponent? mapGrid))
continue;

var texture = _sprites.GetFrame(comp.Sprite, TimeSpan.FromSeconds(comp.Elapsed), loop: false);
comp.Elapsed += (float) _timing.FrameTime.TotalSeconds;

// Need to manually transform the viewport in terms of the visualizer entity as the grid isn't in position.
var (_, _, worldMatrix, invMatrix) = _transforms.GetWorldPositionRotationMatrixWithInv(uid);
args.WorldHandle.SetTransform(worldMatrix);
var localAABB = invMatrix.TransformBox(args.WorldBounds);

var tilesEnumerator = _maps.GetLocalTilesEnumerator(grid, mapGrid, localAABB);

while (tilesEnumerator.MoveNext(out var tile))
{
var bounds = _lookups.GetLocalBounds(tile, mapGrid.TileSize);

args.WorldHandle.DrawTextureRect(texture, bounds);
}
}

args.WorldHandle.UseShader(null);
args.WorldHandle.SetTransform(Matrix3x2.Identity);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ public bool EnableShuttlePosition
private bool _enableShuttlePosition;
private EmergencyShuttleOverlay? _overlay;

public override void Initialize()
private void InitializeEmergency()
{
base.Initialize();
SubscribeNetworkEvent<EmergencyShuttlePositionMessage>(OnShuttlePosMessage);
}

Expand Down
21 changes: 21 additions & 0 deletions Content.Client/Shuttles/Systems/ShuttleSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Robust.Client.Graphics;

namespace Content.Client.Shuttles.Systems;

public sealed partial class ShuttleSystem
{
[Dependency] private readonly IOverlayManager _overlays = default!;

public override void Initialize()
{
base.Initialize();
InitializeEmergency();
_overlays.AddOverlay(new FtlArrivalOverlay());
}

public override void Shutdown()
{
base.Shutdown();
_overlays.RemoveOverlay<FtlArrivalOverlay>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected async Task<EntityUid> SpawnEntity(EntitySpecifier spec, EntityCoordina
{
await Server.WaitPost(() =>
{
uid = SEntMan.SpawnEntity(stackProto.Spawn, coords);
uid = SEntMan.SpawnAtPosition(stackProto.Spawn, coords);
Stack.SetCount(uid, spec.Quantity);
});
return uid;
Expand All @@ -114,13 +114,13 @@ await Server.WaitPost(() =>
return await SpawnEntity((stack.StackTypeId, spec.Quantity), coords);

Assert.That(spec.Quantity, Is.EqualTo(1), "SpawnEntity only supports returning a singular entity");
await Server.WaitPost(() => uid = SEntMan.SpawnEntity(spec.Prototype, coords));
await Server.WaitPost(() => uid = SEntMan.SpawnAtPosition(spec.Prototype, coords));
return uid;
}

/// <summary>
/// Convert an entity-uid to a matching entity specifier. Useful when doing entity lookups & checking that the
/// right quantity of entities/materials werre produced. Returns null if passed an entity with a null prototype.
/// right quantity of entities/materials were produced. Returns null if passed an entity with a null prototype.
/// </summary>
protected EntitySpecifier? ToEntitySpecifier(EntityUid uid)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected async Task SpawnTarget(string prototype)
Target = NetEntity.Invalid;
await Server.WaitPost(() =>
{
Target = SEntMan.GetNetEntity(SEntMan.SpawnEntity(prototype, SEntMan.GetCoordinates(TargetCoords)));
Target = SEntMan.GetNetEntity(SEntMan.SpawnAtPosition(prototype, SEntMan.GetCoordinates(TargetCoords)));
});

await RunTicks(5);
Expand Down
3 changes: 2 additions & 1 deletion Content.IntegrationTests/Tests/PostMapInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public sealed class PostMapInitTest
"Lighthouse", //DeltaV
"Submarine", //DeltaV
"Gax",
"Rad"
"Rad",
"Kettle"
};

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Carrying/CarryingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ private void Carry(EntityUid carrier, EntityUid carried)
if (TryComp<PullableComponent>(carried, out var pullable))
_pullingSystem.TryStopPull(carried, pullable);

EnsureComp<KnockedDownComponent>(carried); // Floof - moved this statement up because some systems can break carrying in response to knockdown
_transform.AttachToGridOrMap(carrier);
_transform.AttachToGridOrMap(carried);
_transform.SetCoordinates(carried, Transform(carrier).Coordinates);
Expand All @@ -282,7 +283,6 @@ private void Carry(EntityUid carrier, EntityUid carried)
var carryingComp = EnsureComp<CarryingComponent>(carrier);
ApplyCarrySlowdown(carrier, carried);
var carriedComp = EnsureComp<BeingCarriedComponent>(carried);
EnsureComp<KnockedDownComponent>(carried);

carryingComp.Carried = carried;
carriedComp.Carrier = carrier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using System.Diagnostics.CodeAnalysis;
using Content.Server.Consent;


namespace Content.Server.DeltaV.ParadoxAnomaly.Systems;

Expand All @@ -26,6 +28,7 @@ namespace Content.Server.DeltaV.ParadoxAnomaly.Systems;
/// </summary>
public sealed class ParadoxAnomalySystem : EntitySystem
{
[Dependency] private readonly ConsentSystem _consent = default!;
[Dependency] private readonly GenericAntagSystem _genericAntag = default!;
[Dependency] private readonly GhostRoleSystem _ghostRole = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
Expand Down Expand Up @@ -81,6 +84,9 @@ private bool TrySpawnParadoxAnomaly(string rule, [NotNullWhen(true)] out EntityU
if (_role.MindIsAntagonist(mindId))
continue;

if (_consent.HasConsent(uid, "NoClone"))
continue;

// TODO: when metempsychosis real skip whoever has Karma

candidates.Add((uid, mindId, species, profile));
Expand Down
17 changes: 17 additions & 0 deletions Content.Server/FloofStation/HideoutGeneratorComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Robust.Shared.Map;


namespace Content.Server.FloofStation;


[RegisterComponent]
public sealed partial class HideoutGeneratorComponent : Component
{

/// <summary>
/// Maps we've generated.
/// </summary>
[DataField]
public List<MapId> Generated = new();

}
23 changes: 19 additions & 4 deletions Content.Server/FloofStation/TheDarkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ public sealed class TheDarkSystem : EntitySystem
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<RoundStartingEvent>(SetupTheDark);
SubscribeLocalEvent<HideoutGeneratorComponent, MapInitEvent>(SetupTheDark);
SubscribeLocalEvent<HideoutGeneratorComponent, ComponentShutdown>(DestroyTheDark);
}

private void SetupTheDark(RoundStartingEvent ev)
private void SetupTheDark(EntityUid uid, HideoutGeneratorComponent component, MapInitEvent args)
{
Logger.Debug(uid.ToString());
var mapId = _mapManager.CreateMap();
_mapManager.AddUninitializedMap(mapId);

Expand All @@ -30,7 +31,21 @@ private void SetupTheDark(RoundStartingEvent ev)
{
EnsureComp<PreventPilotComponent>(id);
}

component.Generated.Add(mapId);
_mapManager.DoMapInitialize(mapId);
}

private void DestroyTheDark(EntityUid uid, HideoutGeneratorComponent component, ComponentShutdown args)
{

foreach (var mapId in component.Generated)
{
if (!_mapManager.MapExists(mapId))
continue;

_mapManager.DeleteMap(mapId);
}


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System.Linq;
using Content.Shared.Chemistry.Components;
using Content.Shared.Fluids;
using Content.Shared.FootPrint;
using Content.Shared.Timing;


namespace Content.Server.Fluids.EntitySystems;


// Floof-specific
public sealed partial class AbsorbentSystem
{
[Dependency] private readonly EntityLookupSystem _lookup = default!;

/// <summary>
/// Tries to clean a number of footprints in a range determined by the component. Returns the number of cleaned footprints.
/// </summary>
private int TryCleanNearbyFootprints(EntityUid user, EntityUid used, EntityUid target, AbsorbentComponent component, Entity<SolutionComponent> absorbentSoln)
{
var footprintQuery = GetEntityQuery<FootPrintComponent>();
var targetCoords = Transform(target).Coordinates;
var entities = _lookup.GetEntitiesInRange(targetCoords, component.FootprintCleaningRange, LookupFlags.Uncontained);

// Take up to [MaxCleanedFootprints] footprints closest to the target
var cleaned = entities.AsEnumerable()
.Where(footprintQuery.HasComp)
.Select(uid => (uid, dst: Transform(uid).Coordinates.TryDistance(EntityManager, _transform, targetCoords, out var dst) ? dst : 0f))
.Where(ent => ent.dst > 0f)
.OrderBy(ent => ent.dst)
.Select(ent => (ent.uid, comp: footprintQuery.GetComponent(ent.uid)));

// And try to interact with each one of them, ignoring useDelay
var processed = 0;
foreach (var (uid, footprintComp) in cleaned)
{
if (TryPuddleInteract(user, used, uid, component, useDelay: null, absorbentSoln))
processed++;

if (processed >= component.MaxCleanedFootprints)
break;
}

return processed;
}
}
4 changes: 3 additions & 1 deletion Content.Server/Fluids/EntitySystems/AbsorbentSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace Content.Server.Fluids.EntitySystems;

/// <inheritdoc/>
public sealed class AbsorbentSystem : SharedAbsorbentSystem
public sealed partial class AbsorbentSystem : SharedAbsorbentSystem
{
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly AudioSystem _audio = default!;
Expand Down Expand Up @@ -119,6 +119,8 @@ public void Mop(EntityUid user, EntityUid target, EntityUid used, AbsorbentCompo
if (!TryRefillableInteract(user, used, target, component, useDelay, absorberSoln.Value))
return;
}

TryCleanNearbyFootprints(user, used, target, component, absorberSoln.Value); // Floof
}

/// <summary>
Expand Down
Loading
Loading