Skip to content

Commit

Permalink
Merge0620 (Nyanotrasen#229)
Browse files Browse the repository at this point in the history
* Remove Shuttle Powering Crate from cargo catalogue (#8664)

* Automatic changelog update

* Muted status effect + 2 reagent sources of it (#8673)

* Automatic changelog update

* Fix dual port vents 2: Electric Boogaloo (#8396)

* Remove "nogga black" (#8684)

* Update submodule

* use matrix CreateTransform (#8687)

* chr (#8674)

* weh

Multiplies the amount of power used by the battery guns, triple-ish for the laser cannon and a fuckton more for the xray

* chr

chr

* Update chair.yml

* Update chairs.yml

* Revert submodule

* Opt-in nukies (#8541)

* save changes

* naming rules

* changes

* changes

* last touches

* e

* use default

* better looping

* better prototype ig

* f

* c

* Revert "changes"

This reverts commit 111a7f36

* fuck i'm bad at git

* changes

* mfw

* e

* e

* Change default preset to secret (#8694)

It gets voted for at the start every time anyway and traitor isn't even voteable.

* Automatic changelog update

* Syndicate Names (#8692)

* Syndicate Names

* Update syndicate.yml

* Update NukeopsRuleSystem.cs

Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* Fix roundstart audio

* Fix some friend access violations by allowing others access. (#8594)

Rename Friend attribute to Access attribute.
Updates submodule to v0.21.0.0 as well.

* Revert "Fix some friend access violations by allowing others access. (#8594) (#8703)

* Revert "Revert "Fix some friend access violations by allowing others access. (#8594) (#8703)" (working this time) (#8704)

* ConstructionSystem handles InteractUsing before AnchorableSystem. (#8700)

* Automatic changelog update

* buffs tables and counters (#8698)

25 (+10) health for metal, 15 for wood

* Automatic changelog update

* Clear cancel token on failed use (#8705)

* Bagel Update 13.7 (#8690)

* fuck shit ass shit

* Add files via upload

* blurgy bop boo botto (#8689)

* Automatic changelog update

* Fix mind unvisit crash (#8682)

* Add loc strings and completions to mapping command (#8726)

* fix match-matchbox interaction (#8715)

* Automatic changelog update

* Fix character ui crash (#8717)

* Update wires-component.ftl (#8714)

* Automatic changelog update

* Atlas: The Video Game (Update 2.0) (#8725)

* Update some nugets (#8738)

* Device network DeviceLists and the NetworkConfigurator (Makes air alarms usable) (#7697)

* Implement DeviceList
Implement NetworkConfigurator
I sould really get into the habit of making smaller commits

* Remove ApcNetworkComponent from vents, scrubbers anf firelocks

* Change BeforeBroadcastAttemptEvent#Recepients to readonly IReadonlySet and add a ModifiedRecepients field

* Address revievs in NetworkConfigurationSystem

* Fix red and green button styles

* Change NetworkConfiguratorSystem#UpdateState to remove saved entites that don't exist anymore

* Add AtmosDevices device net id

* Add const strings for style classes
Fix wrong margin for NetworkConfiguratorConfigurationMenu

* Hello? Github?

* Add access check before opening the configuration ui

* Address reviews

* Fix call to access reader

* You shall not live again IgnoreComponent

* Fix interaction verb check

* Fix configuration window not closing when target gets deleted / out of range

* Change device is already saved message to say 'network device: ... is already saves'

* Apply suggestions from code review

Co-authored-by: Leon Friedrich <[email protected]>

* Fix applied suggestion

Co-authored-by: wrexbe <[email protected]>
Co-authored-by: Leon Friedrich <[email protected]>

* Automatic changelog update

* Fix friend -> Access for some components

* Nuget fix (#8742)

* Add default lag (#8739)

* Add whitelist to captain/hop pda (#8746)

* Automatic changelog update

* Fix nukies (#8759)

* Automatic changelog update

* Add priorities to items slots (#8748)

* Update trash.yml (#8736)

* Automatic changelog update

* Fix seldom seen bug with food trash (#8762)

* Marathon Update 1.9 moment (#8764)

* Slows down parallax significantly. (#8691)

* Automatic changelog update

* Update submodule

* Fix wrapped foods (chocolate bars, brownies, nutribrick) (#8735)

* wrappables fix

* Update snacks.yml

* Update snacks.yml

* Automatic changelog update

* Hotfix door bumps (#8665)

Co-authored-by: Leon Friedrich <[email protected]>

* Tweak stun batons to use a battery instead of power cell (#8716)

* Allow baton/battery to be inserted into recharger

* Revert "Allow baton/battery to be inserted into recharger"

This reverts commit ccf1f3d1827bf45c49bb6ca4f5c97990d1afba6e.

* Refactor stun batons to use internal batteries

* Automatic changelog update

* Round end sound now respects lobby music option toggle. (#8699)

Now it only plays when the round restarts *after* a regular roundend.
Meaning that if you spam the "restartroundnow" command, it won't play even if you have roundend sounds enabled in the options.

* Automatic changelog update

* Adds cameras to Waystation (#8733)

* Adds cameras to Waystation

* Fixes the salvage maint door

* Automatic changelog update

* Remove uses of PrototypeLayerData.New() (#8676)

* Remove Explicit GridId References (#8315)

Co-authored-by: metalgearsloth <[email protected]>

* Fix some indefinite article loc issues (#8064)

Co-authored-by: wrexbe <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>

* Ore bags! (YAML, RSI) (#8425)

* Adding orebags hooray

* Adds ore bags to salvage lockers.

* no ic in ooc!!!!! (fixed typo)

i managed to type ic instead of id in the yaml file, real

* deleted the ore bags from cargodrobes, the pr lies!!!

* not 100, not 150, should be 200 next, right?

WRONG!!! 175!!!

* adds orebags to salvage spawn salvage equipment boxes

* Automatic changelog update

* Revamp guns: Revival (#8675)

Co-authored-by: and_a <and_a@DESKTOP-RJENGIR>
Co-authored-by: metalgearsloth <[email protected]>

* layers moment (#8766)

* Format redial wait time (#8767)

* Automatic changelog update

* Update VoteCommands.cs (#8729)

* Makes asteroids low yield, adds normal yield variant for mining (#8701)

* Adds low yield mining loot table

* adds low yield variant of asteroids

* Automatic changelog update

* Fully remove Saltern Power prototypes / file (#8545)

Co-authored-by: metalgearsloth <[email protected]>

* Renames jobban to roleban so all role commands follow the pattern roleX. (#8754)

Co-authored-by: metalgearsloth <[email protected]>

* Implement game rule configs. Game rules are now proper prototypes instead of just an alias for a system. (#8539)

* More container pruning (#8576)

* Fix master

* Fix master + prototypes (#8772)

* Cull even more map lines (#8773)

* Cull delta components (#8774)

* Cull atlas prototypes (#8775)

* Cull barratry prototypes (#8776)

* Cull infiltrator prototypes (#8777)

* Cull knightship prototypes (#8778)

* Cull marathon prototypes (#8779)

* Cull moose prototypes (#8780)

* Cuttle shuttleert + fix prototype (#8783)

* Cull pirate prototypes (#8784)

* Cull pillar prototypes (#8781)

* Cull saltern prototypes (#8785)

* Cull splitstation prototypes (#8786)

* Cull packedstation prototypes (#8782)

* Cull syndiepuddle prototypes (#8787)

* Cull waystation prototypes (#8788)

* Increase gun item sizes (gun nerf) (#8683)

* Automatic changelog update

* Adds new APC types (#8763)

Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* Zombie Rework & Polymorph Expansion (#8413)

Co-authored-by: Kara <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* Make HeatCapacity use FixturesMass (#8661)

* ERT Update (#8617)

* removes ert shuttle and adds dartv2 by Schiene

* missing headsets

* makes ghost role sentient

* fixes duplicating helmets

* culling

Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* Fix cross grid movement (#8790)

* temporary test fix (#8791)

* Make decal gridinit use gridentityid (#8792)

* Fix SMG box sizes (#8793)

* Fix winter coats holding more than what they weigh (#8750)

* Tweak Commands (#8769)

* Prevent accidental crayon eating (#8799)

* Add ReadExecute perms to all of DamageableComponent (#8800)

* Fix microwave eating wrench (#8801)

* Reorders Sound Systems signatures to match Popup Systems. (#8728)

* Submodule Update (#8802)

* Vote commands completions. (#8758)

* Prevent door remote zaps (#8803)

* TauCeti smoothing mode (#8723)

* Fix firelock prying (#8804)

* Automatic changelog update

* Slight DoAfterSystem improvement (#8806)

* Use correct PRGlass parent (#8805)

* Make two overlays use OverlayDrawArgs aabbs. (#8808)

* Fix large_casing sprite and cobra mag (#8809)

* Automatic changelog update

* Remove merge conflict comment (#8819)

* Revert "Remove merge conflict comment" (#8820)

* Captain laser self recharge (#8826)

* Update coffee.yml (#8830)

* Automatic changelog update

* Nerf pistol firerate slightly (#8810)

* Don't flag merge conflicts on draft PRs (#8821)

* Automatic changelog update

* Guns will now eject magazines first instead of chamber (#8827)

* Removal interaction without hands (#8843)

* Automatic changelog update

* Disable lag rand (#8847)

* Make doorbumps quiet (#8812)

* Syndicate gas mask flash protection (#8818)

* Syndicate gas masks protect from flashbangs

* fix var name

* update to loop through all slots

* update based on review comments

* Fix grenade whitelists (#8851)

* Automatic changelog update

* fixes static not appearing inbetween camera changes client-side (#8846)

* 39 buried 0 found (#8856)

* The Rat King [Antag] (#8706)

* vending machine go spit

* who's da rat, bozo

* fixes

* crown + fixes

* aaaa

* aa

* lololol

* removing vending shit + most annoying fix alive

* paul review

* moony fixes

* sloth review

* Minor diseasesystem fix

* inverse moment

* A

* Also reduce args allocations

Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* Increase fireplace brightness and radius (#8870)

* Automatic changelog update

* Can't break other people's drags on cuffed people (#8868)

* works on my machine

* speedrun

* Automatic changelog update

* Fishy swarmers: Carp content and Space Dragon! (#7395)

Co-authored-by: mirrorcult <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* Add docking window to shuttle consoles (#8756)

* lewd

* A

* Realtime

* Sleepy dork

* Draw radar position

* Accurate infiltrator

* experiments

* Better drawing

* Labels

* I need aan adult

* Cleanup

* Show toggles

* display I guess

* A

* fix

* fix

* cleanupsies

* Bit more polish

* Make sure mass scanners actually work

* Remove dummy state

* fren

* opposite

* aghost crash

* comment

* What's in a name

* woops

* Show docking ports

* Dock highlighting

* Drawing dock

* Shitty docks

* Lots of docking drawing

* Autodock working

* dork

* More graceful shutdown

* zoomies

* Lines and distance change

* revert

* Good enough

* cleanup

* Fix default range

* Dock UI and loc update

* Update on undock

* Loc fixes

* Automatic changelog update

* Update submodule

* Reduce door hacking time (#8852)

* Fix damagestatevisualizer (#8876)

* Nerf gun damage (#8853)

* Automatic changelog update

* One more damagestatevisualizer funny (#8877)

* Fix damagestatevisualizer (#8879)

* Make holofans use power cells (#8813)

* Automatic changelog update

* Nerf dragon audio + do_after (#8880)

* Power cell culling (#8814)

* Automatic changelog update

* Fix powercell (#8882)

* Individual bar sign entities (#8159)

* Fixed rotation check for pulling (#8845)

Co-authored-by: metalgearsloth <[email protected]>

* Reduced laser pistols to 10 size (#8840)

* Automatic changelog update

* Fix carbine size

* make animals gibbable (#8875)

* Automatic changelog update

* Fix addatmos from griduid artifact

* Station Specific Jobs: Reporter and Psychologist (#8865)

* Update jobs.yml

* Add files via upload

* id moment

* Update identification_cards.yml

* Update pda.yml

* Add files via upload

* psych

* roleyml psych

* real

* Update jumpsuits.yml

* Add files via upload

* Add files via upload

* Add files via upload

* Update jobs.yml

* Update meta.json

* Update meta.json

* Update meta.json

* Update bagel.yml

* Update marathon.yml

* job iconz

* Update meta.json

* Basic Medication Overdoses (Chemistry 1984) (#8844)

* 1984 george orwell

* Update medicine.yml

* Update medicine.yml

* Update medicine.yml

* Automatic changelog update

* Fix admin announce eui (#8869)

Co-authored-by: metalgearsloth <[email protected]>

* Removes extra Sound from slippery component (#8841)

* Add a Wiki Button to the escape menu (#8837)

* UI change

* lang file change

* C# change

* fix wiki button

Co-authored-by: Just-a-Unity-Dev <[email protected]>

* Automatic changelog update

* Move cuffs to users hand when removed (#8862)

* move cuffs to users hand when removed

* review

Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* Make ghost timer a cvar (#8817)

Co-authored-by: Just-a-Unity-Dev <[email protected]>
Co-authored-by: Just-a-Unity-Dev <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* reduced duck yaml bloat (#8858)

Co-authored-by: metalgearsloth <[email protected]>

* Fix mousetrap crate icon (#8835)

* Fix bagel yml artifact (#8885)

* Fix wide attacking in containers (#8886)

* Automatic changelog update

* Clean up door remote (#8829)

Co-authored-by: metalgearsloth <[email protected]>

* ECS containmentfieldgeneratorcomponent (#8757)

* ECS containmentfieldgeneratorcomponent

* Fix tests and clean up one line

* check for anchored in a better way

* Fix dependency exception

I'm not really happy with this solution, it's not very good but I'm not
sure how to do it better without refactoring way more than I want to. Maybe
I'm missing something.

* review

Co-authored-by: metalgearsloth <[email protected]>

* water (#8903)

* Cleanup the remainder of dragon (#8881)

* Cleanup the remainder of dragon

- Fixed some of the niscellaneous changes made to yml
- Made devour use a whitelist
- Fixed spelling

* name fix

* a

* Update submodule

* Remove reporter tophat (#8912)

* Disarm 1984 (#8872)

* Automatic changelog update

* Make wide attacks optional for now (#8924)

* Port miasma from nyano (#8926)

Co-authored-by: Kara <[email protected]>

* Automatic changelog update

* Fix dragon devour and reduce time significantly (#8921)

* deleted check (#8893)

* Botany + engi belt whitelist update (#8939)

* Automatic changelog update

* Mobster accents for rat king/servants (#8927)

* basically perfect

* oops

* huh

* new substitutions from retequizzle, rane, and olddancejacket + crown accent

* fixes

* Automatic changelog update

* quickfix (#8942)

Co-authored-by: and_a <and_a@DESKTOP-RJENGIR>

* More kinds of benos (#8849)

* weh

Multiplies the amount of power used by the battery guns, triple-ish for the laser cannon and a fuckton more for the xray

* weh

* weeee

* Fix the offsets and bb

* remove arc

* rouny

* sound stuff and fix the typo

* Fix dork

* a

Co-authored-by: metalgearsloth <[email protected]>

* Adds other botany tools (#8935)

* Automatic changelog update

* Add screwdriver head sprite (#8828)

* Silent Station Events (#8938)

* Automatic changelog update

* Nun Robes And Nurse Hat (#8681)

* Uploaded Nurse Hat

* Uploaded Nurse Outfit

* Uploaded Nun Robes

* Edited for Nun Robes

* Edited for Nurse Skirt

* Edited for Nurse Hat

* Edited Medidrobe for Nurse Attire

* Edited Chapeldrobe for Nun Robe

* Removed Nurse Outfit from Review

* Edited out Nurse changes

* Edited out Nurse Outfit

* Salvo tanks start with oxygen (#8947)

* Rat King Tweaks (#8940)

Co-authored-by: Kara <[email protected]>

* Automatic changelog update

* Add a penalty to self-repair (#8951)

* Automatic changelog update

* Miasma update (#8943)

* Automatic changelog update

* fixes aloe cream splitting (#8949)

* Automatic changelog update

* Prioritize anchor before insert (#8936)

* Reduce China Lake bag capacity (#8848)

* Automatic changelog update

* Updated GasAnalyzerMenu.cs (Window adjustment) (#8953)

* Spell sounds are no longer global, also tweaked volumes (#8961)

* Fixes smg crate mag fills (#8960)

* Automatic changelog update

* Submodule Update

* Nullable grid Uid (#8798)

* Add Overlay.BeforeDraw() (#8905)

* Item strip delay dependant on slot. (#8900)

* Automatic changelog update

* Obfuscates pocket slots from the Strip Menu (#8948)

* Automatic changelog update

* Fix weightless system error (#8965)

* Fix chair perspective (#8964)

* Automatic changelog update

* Bagel Update 13.8 (#8904)

* Add files via upload

* redid old maints that annoyedme and other misc changes

* Make tests faster (#8737)

* Test changes

* Make finding the test tile a little smarter

* Species ism rule (#8864)

* Species ism rule

* Updated naming rule

* Update Rules.txt

* Automatic changelog update

* fix 2 problems

* works on my machine

* whoops

Co-authored-by: ShuttleEnjoyer <[email protected]>
Co-authored-by: PJBot <[email protected]>
Co-authored-by: Leon Friedrich <[email protected]>
Co-authored-by: Kara <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: T-Stalker <[email protected]>
Co-authored-by: Veritius <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: Pancake <[email protected]>
Co-authored-by: Vera Aguilera Puerto <[email protected]>
Co-authored-by: Pieter-Jan Briers <[email protected]>
Co-authored-by: Peptide90 <[email protected]>
Co-authored-by: themias <[email protected]>
Co-authored-by: Emisse <[email protected]>
Co-authored-by: lapatison <[email protected]>
Co-authored-by: wrexbe <[email protected]>
Co-authored-by: Julian Giebel <[email protected]>
Co-authored-by: wrexbe <[email protected]>
Co-authored-by: EmoGarbage404 <[email protected]>
Co-authored-by: Chris <[email protected]>
Co-authored-by: Moony <[email protected]>
Co-authored-by: TimrodDX <[email protected]>
Co-authored-by: Acruid <[email protected]>
Co-authored-by: ninruB <[email protected]>
Co-authored-by: TaralGit <[email protected]>
Co-authored-by: and_a <and_a@DESKTOP-RJENGIR>
Co-authored-by: Júlio César Ueti <[email protected]>
Co-authored-by: Jessica M <[email protected]>
Co-authored-by: keronshb <[email protected]>
Co-authored-by: LudwigVonChesterfield <[email protected]>
Co-authored-by: Morber <[email protected]>
Co-authored-by: ike709 <[email protected]>
Co-authored-by: KIBORG04 <[email protected]>
Co-authored-by: Flipp Syder <[email protected]>
Co-authored-by: Delete69 <[email protected]>
Co-authored-by: CrudeWax <[email protected]>
Co-authored-by: eclips_e <[email protected]>
Co-authored-by: Just-a-Unity-Dev <[email protected]>
Co-authored-by: Profane McBane <[email protected]>
Co-authored-by: Just-a-Unity-Dev <[email protected]>
Co-authored-by: ScalyChimp <[email protected]>
Co-authored-by: Kai Shiba <[email protected]>
Co-authored-by: Linus Wacker <[email protected]>
Co-authored-by: Andre19926 <[email protected]>
Co-authored-by: ElectroJr <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 318 changed files with 3,482 additions and 2,458 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-test-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,8 @@ jobs:
- name: Run Content.Tests
run: dotnet test --no-build Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0

- name: Run Content.IntegrationTests
shell: pwsh
run: |
$env:DOTNET_gcServer=1
dotnet test --no-build Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0
9 changes: 5 additions & 4 deletions Content.Client/AI/ClientPathfindingDebugSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public void UpdateCachedRegions(EntityUid gridId, Dictionary<int, List<Vector2>>
private void DrawCachedRegions(DrawingHandleScreen screenHandle, Box2 viewport)
{
var transform = _entities.GetComponentOrNull<TransformComponent>(_playerManager.LocalPlayer?.ControlledEntity);
if (transform == null || !CachedRegions.TryGetValue(transform.GridEntityId, out var entityRegions))
if (transform == null || transform.GridUid == null || !CachedRegions.TryGetValue(transform.GridUid.Value, out var entityRegions))
{
return;
}
Expand All @@ -312,7 +312,7 @@ private void DrawCachedRegions(DrawingHandleScreen screenHandle, Box2 viewport)
screenTile.X + 15.0f,
screenTile.Y + 15.0f);

screenHandle.DrawRect(box, _cachedRegionColors[transform.GridEntityId][region]);
screenHandle.DrawRect(box, _cachedRegionColors[transform.GridUid.Value][region]);
}
}
}
Expand Down Expand Up @@ -344,7 +344,8 @@ private void DrawRegions(DrawingHandleScreen screenHandle, Box2 viewport)
{
var attachedEntity = _playerManager.LocalPlayer?.ControlledEntity;
if (!_entities.TryGetComponent(attachedEntity, out TransformComponent? transform) ||
!Regions.TryGetValue(transform.GridEntityId, out var entityRegions))
transform.GridUid == null ||
!Regions.TryGetValue(transform.GridUid.Value, out var entityRegions))
{
return;
}
Expand All @@ -364,7 +365,7 @@ private void DrawRegions(DrawingHandleScreen screenHandle, Box2 viewport)
screenTile.X + 15.0f,
screenTile.Y + 15.0f);

screenHandle.DrawRect(box, _regionColors[_entities.GetComponent<TransformComponent>(attachedEntity.Value).GridEntityId][chunk][region]);
screenHandle.DrawRect(box, _regionColors[transform.GridUid.Value][chunk][region]);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected override void EnteredTree()
foreach (var grid in _data)
{
var player = IoCManager.Resolve<IPlayerManager>().LocalPlayer?.ControlledEntity;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridEntityId;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridUid;
GridOptions.AddItem($"{grid.GridEntityId} {(playerGrid == grid.GridEntityId ? " (Current)" : "")}");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected override void EnteredTree()
foreach (var grid in _gridData)
{
var player = IoCManager.Resolve<IPlayerManager>().LocalPlayer?.ControlledEntity;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridEntityId;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridUid;
GridOptions.AddItem($"{grid.GridEntityId} {(playerGrid == grid.GridEntityId ? " (Current)" : "")}");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected override void EnteredTree()
foreach (var grid in _gridData)
{
var player = IoCManager.Resolve<IPlayerManager>().LocalPlayer?.ControlledEntity;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridEntityId;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridUid;
GridOptions.AddItem($"{grid.GridEntityId} {(playerGrid == grid.GridEntityId ? " (Current)" : "")}");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected override void EnteredTree()
foreach (var grid in _data)
{
var player = IoCManager.Resolve<IPlayerManager>().LocalPlayer?.ControlledEntity;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridEntityId;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridUid;
GridOptions.AddItem($"{grid.GridEntityId} {(playerGrid == grid.GridEntityId ? " (Current)" : "")}");
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Atmos/UI/GasAnalyzerMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public GasAnalyzerWindow(GasAnalyzerBoundUserInterface owner)
PanelOverride = new StyleBoxFlat { BackgroundColor = Color.FromHex("#525252ff") }
});
CloseButton.OnPressed += _ => Close();
SetSize = (300, 200);
SetSize = (300, 420);
}


Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Audio/BackgroundAudioSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private void EntParentChanged(ref EntParentChangedMessage message)
{
if(_playMan.LocalPlayer is null || _playMan.LocalPlayer.ControlledEntity != message.Entity) return;
if (!TryComp<TransformComponent>(message.Entity, out var xform) ||
!_mapManager.TryGetGrid(xform.GridEntityId, out var grid)) return;
!_mapManager.TryGetGrid(xform.GridUid, out var grid)) return;

var tileDef = (ContentTileDefinition) _tileDefMan[grid.GetTileRef(xform.Coordinates).Tile.TypeId];

Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Audio/ClientAdminSoundSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Content.Client.Audio;
public sealed class ClientAdminSoundSystem : SharedAdminSoundSystem
{
[Dependency] private readonly IConfigurationManager _cfg = default!;

private bool _adminAudioEnabled = true;
private List<IPlayingAudioStream?> _adminAudio = new(1);

Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Buckle/BuckleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public override void HandleComponentState(ComponentState? curState, ComponentSta
return;
}

if (!_entMan.TryGetComponent(Owner, out RiderComponent? rider))
if (LastEntityBuckledTo != null && _entMan.HasComponent<VehicleComponent>(LastEntityBuckledTo))
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Clothing/ClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private void RenderEquipment(EntityUid equipee, EntityUid equipment, string slot
// temporary, until layer draw depths get added. Basically: a layer with the key "slot" is being used as a
// bookmark to determine where in the list of layers we should insert the clothing layers.
bool slotLayerExists = sprite.LayerMapTryGet(slot, out var index);

// add the new layers
foreach (var (key, layerData) in ev.Layers)
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Eye/EyeLerpingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private void LerpEntityEye(EntityUid uid, EyeLerpInformation info, float frameTi
if (!TryComp(uid, out TransformComponent? transform)
|| !TryComp(uid, out EyeComponent? eye)
|| eye.Eye == null
|| !_mapManager.TryGetGrid(transform.GridEntityId, out var grid))
|| !_mapManager.TryGetGrid(transform.GridUid, out var grid))
{
_toRemove.Add(uid);
return;
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/IconSmoothing/IconSmoothComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Content.Client.IconSmoothing
[RegisterComponent]
public sealed class IconSmoothComponent : Component
{
public (EntityUid, Vector2i)? LastPosition;
public (EntityUid?, Vector2i)? LastPosition;

/// <summary>
/// We will smooth with other objects with the same key.
Expand Down
12 changes: 6 additions & 6 deletions Content.Client/IconSmoothing/IconSmoothSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ private void OnStartup(EntityUid uid, IconSmoothComponent component, ComponentSt
var xform = Transform(uid);
if (xform.Anchored)
{
component.LastPosition = _mapManager.TryGetGrid(xform.GridEntityId, out var grid)
? (xform.GridEntityId, grid.TileIndicesFor(xform.Coordinates))
: (EntityUid.Invalid, new Vector2i(0, 0));
component.LastPosition = _mapManager.TryGetGrid(xform.GridUid, out var grid)
? (xform.GridUid.Value, grid.TileIndicesFor(xform.Coordinates))
: (null, new Vector2i(0, 0));

DirtyNeighbours(uid, component);
}
Expand Down Expand Up @@ -111,7 +111,7 @@ public void DirtyNeighbours(EntityUid uid, IconSmoothComponent? comp = null, Tra

Vector2i pos;

if (transform.Anchored && _mapManager.TryGetGrid(transform.GridEntityId, out var grid))
if (transform.Anchored && _mapManager.TryGetGrid(transform.GridUid, out var grid))
{
pos = grid.CoordinatesToTile(transform.Coordinates);
}
Expand Down Expand Up @@ -191,9 +191,9 @@ private void CalculateNewSprite(EntityUid uid,

if (xform.Anchored)
{
if (!_mapManager.TryGetGrid(xform.GridEntityId, out grid))
if (!_mapManager.TryGetGrid(xform.GridUid, out grid))
{
Logger.Error($"Failed to calculate IconSmoothComponent sprite in {uid} because grid {xform.GridEntityId} was missing.");
Logger.Error($"Failed to calculate IconSmoothComponent sprite in {uid} because grid {xform.GridUid} was missing.");
return;
}
}
Expand Down
7 changes: 4 additions & 3 deletions Content.Client/NodeContainer/NodeVisualizationOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ private void DrawScreen(in OverlayDrawArgs args)
var node = _system.NodeLookup[(groupId, nodeId)];


var gridId = _entityManager.GetComponent<TransformComponent>(node.Entity).GridEntityId;
var grid = _mapManager.GetGrid(gridId);
var gridTile = grid.TileIndicesFor(_entityManager.GetComponent<TransformComponent>(node.Entity).Coordinates);
var xform = _entityManager.GetComponent<TransformComponent>(node.Entity);
if (!_mapManager.TryGetGrid(xform.GridUid, out var grid))
return;
var gridTile = grid.TileIndicesFor(xform.Coordinates);

var sb = new StringBuilder();
sb.Append($"entity: {node.Entity}\n");
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Physics/Controllers/MoverController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override void UpdateBeforeSolve(bool prediction, float frameTime)
return;
}

if (xform.GridEntityId != EntityUid.Invalid)
if (xform.GridUid != null)
mover.LastGridAngle = GetParentGridAngle(xform, mover);

// Essentially we only want to set our mob to predicted so every other entity we just interpolate
Expand Down
8 changes: 4 additions & 4 deletions Content.Client/Shuttles/UI/RadarControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ protected override void Draw(DrawingHandleScreen handle)
Matrix3 matrix;

// Draw our grid in detail
var ourGridId = xform.GridID;
if (ourGridId != GridId.Invalid)
var ourGridId = xform.GridUid;
if (ourGridId != null)
{
matrix = xform.InvWorldMatrix;
var ourGridFixtures = fixturesQuery.GetComponent(ourGridId);
var ourGridFixtures = fixturesQuery.GetComponent(ourGridId.Value);
// Draw our grid; use non-filled boxes so it doesn't look awful.
DrawGrid(handle, offsetMatrix, ourGridFixtures, Color.Yellow);

DrawDocks(handle, xform.GridEntityId, offsetMatrix);
DrawDocks(handle, ourGridId.Value, offsetMatrix);
}
else
{
Expand Down
11 changes: 6 additions & 5 deletions Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ private void UpdateDocks(List<DockingInterfaceState> docks)
DockPorts.DisposeAllChildren();
DockingScreen.Docks = _docks;

if (!_entManager.TryGetComponent<TransformComponent>(_entity, out var xform))
if (!_entManager.TryGetComponent<TransformComponent>(_entity, out var xform)
|| !xform.GridUid.HasValue)
{
// TODO: Show Placeholder
return;
}

if (_docks.TryGetValue(xform.GridEntityId, out var gridDocks))
if (_docks.TryGetValue(xform.GridUid.Value, out var gridDocks))
{
var index = 1;

Expand Down Expand Up @@ -194,7 +195,7 @@ private void OnDockToggled(BaseButton.ButtonEventArgs obj, EntityUid ent)
DockingScreen.Visible = true;
DockingScreen.ViewedDock = ent;
StartAutodockPressed?.Invoke(ent);
DockingScreen.GridEntity = xform?.GridEntityId;
DockingScreen.GridEntity = xform?.GridUid;
_selectedDock = obj.Button;
}
}
Expand All @@ -215,8 +216,8 @@ protected override void Draw(DrawingHandleScreen handle)
base.Draw(handle);

if (!_entManager.TryGetComponent<TransformComponent>(_entity, out var entXform) ||
!_entManager.TryGetComponent<PhysicsComponent>(entXform.GridEntityId, out var gridBody) ||
!_entManager.TryGetComponent<TransformComponent>(entXform.GridEntityId, out var gridXform))
!_entManager.TryGetComponent<PhysicsComponent>(entXform.GridUid, out var gridBody) ||
!_entManager.TryGetComponent<TransformComponent>(entXform.GridUid, out var gridXform))
{
return;
}
Expand Down
61 changes: 32 additions & 29 deletions Content.Client/Singularity/SingularityOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,55 +27,58 @@ public SingularityOverlay()
{
IoCManager.InjectDependencies(this);
_shader = _prototypeManager.Index<ShaderPrototype>("Singularity").Instance().Duplicate();
_shader.SetParameter("maxDistance", MaxDistance * EyeManager.PixelsPerMeter);
}

protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture == null || args.Viewport.Eye == null)
return;
private Vector2[] _positions = new Vector2[MaxCount];
private float[] _intensities = new float[MaxCount];
private float[] _falloffPowers = new float[MaxCount];
private int _count = 0;

// Has to be correctly handled because of the way intensity/falloff transform works so just do it.
_shader?.SetParameter("renderScale", args.Viewport.RenderScale);

var position = new Vector2[MaxCount];
var intensity = new float[MaxCount];
var falloffPower = new float[MaxCount];
int count = 0;

var mapId = args.Viewport.Eye.Position.MapId;
protected override bool BeforeDraw(in OverlayDrawArgs args)
{
if (args.Viewport.Eye == null)
return false;

foreach (var distortion in _entMan.EntityQuery<SingularityDistortionComponent>())
_count = 0;
foreach (var (distortion, xform) in _entMan.EntityQuery<SingularityDistortionComponent, TransformComponent>())
{
var mapPos = _entMan.GetComponent<TransformComponent>(distortion.Owner).MapPosition;
if (mapPos.MapId != mapId)
if (xform.MapID != args.MapId)
continue;

var mapPos = xform.WorldPosition;

// is the distortion in range?
if ((mapPos.Position - args.WorldAABB.ClosestPoint(mapPos.Position)).LengthSquared > MaxDistance * MaxDistance)
if ((mapPos - args.WorldAABB.ClosestPoint(mapPos)).LengthSquared > MaxDistance * MaxDistance)
continue;

// To be clear, this needs to use "inside-viewport" pixels.
// In other words, specifically NOT IViewportControl.WorldToScreen (which uses outer coordinates).
var tempCoords = args.Viewport.WorldToLocal(mapPos.Position);
var tempCoords = args.Viewport.WorldToLocal(mapPos);
tempCoords.Y = args.Viewport.Size.Y - tempCoords.Y;

position[count] = tempCoords;
intensity[count] = distortion.Intensity;
falloffPower[count] = distortion.FalloffPower;
count++;
_positions[_count] = tempCoords;
_intensities[_count] = distortion.Intensity;
_falloffPowers[_count] = distortion.FalloffPower;
_count++;

if (count == MaxCount)
if (_count == MaxCount)
break;
}

if (count == 0)
return (_count > 0);
}

protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture == null || args.Viewport.Eye == null)
return;

_shader?.SetParameter("count", count);
_shader?.SetParameter("position", position);
_shader?.SetParameter("intensity", intensity);
_shader?.SetParameter("falloffPower", falloffPower);
_shader?.SetParameter("maxDistance", MaxDistance * EyeManager.PixelsPerMeter);
_shader?.SetParameter("renderScale", args.Viewport.RenderScale);
_shader?.SetParameter("count", _count);
_shader?.SetParameter("position", _positions);
_shader?.SetParameter("intensity", _intensities);
_shader?.SetParameter("falloffPower", _falloffPowers);
_shader?.SetParameter("SCREEN_TEXTURE", ScreenTexture);

var worldHandle = args.WorldHandle;
Expand Down
9 changes: 5 additions & 4 deletions Content.Client/StationEvents/RadiationPulseOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ public RadiationPulseOverlay()
_baseShader = _prototypeManager.Index<ShaderPrototype>("Radiation").Instance().Duplicate();
}

protected override void Draw(in OverlayDrawArgs args)
protected override bool BeforeDraw(in OverlayDrawArgs args)
{
RadiationQuery(args.Viewport.Eye);
return _pulses.Count > 0;
}

if (_pulses.Count == 0)
return;

protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture == null)
return;

Expand Down
Loading

0 comments on commit 1c94f79

Please sign in to comment.