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

Floof Station Release V5 #376

Merged
merged 146 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
6bff37c
Add "ingredient" tags to gas masks
sarcoph Sep 21, 2024
5601fd3
Add muffled gas mask prototypes
sarcoph Sep 21, 2024
e2ee14d
Add crafting recipes to muffled gas masks
sarcoph Sep 21, 2024
7590a0c
Add muffled gas mask to loadout
sarcoph Sep 21, 2024
4f0d5e3
Comment out components
sarcoph Sep 25, 2024
db40b86
[Fix] Cybereyes No Longer Reveal Identity. (#1127)
Remuchi Oct 23, 2024
b73d45e
Automatic Changelog Update (#1127)
SimpleStation14 Oct 23, 2024
dd9cdc1
Feat: Port Delta-V Glimmer Wisps (#1125)
Mnemotechnician Oct 23, 2024
85a770c
Automatic Changelog Update (#1125)
SimpleStation14 Oct 23, 2024
9923192
Fix High Amplification Trait Being the Wildest Scam in Human History …
Mnemotechnician Oct 25, 2024
2509575
Automatic Changelog Update (#1137)
SimpleStation14 Oct 25, 2024
ffcbdce
Cherry Pick PR #30576 (#1135)
Ghost581X Oct 25, 2024
518812b
[Fix] Added Missing Deflect Alert Locale (#1140)
Remuchi Oct 25, 2024
4f4f82f
Fix Markup Tags in Station News (#30169) (#1116)
VMSolidus Oct 25, 2024
f6312a5
Automatic Changelog Update (#1140)
SimpleStation14 Oct 25, 2024
4b75f26
Pyrokinetic Flare Power (#1138)
VMSolidus Oct 25, 2024
3e1f540
Penlight Repair (#1142)
SleepyScarecrow Oct 25, 2024
7579004
Automatic Changelog Update (#1138)
SimpleStation14 Oct 25, 2024
dce01bc
Automatic Changelog Update (#1142)
SimpleStation14 Oct 25, 2024
e46ed86
Updade RadStation (#1129)
Ichaie Oct 27, 2024
582a16e
Remove LPO Shuttle Recalling (#1143)
VMSolidus Oct 27, 2024
04afafd
Automatic Changelog Update (#1129)
SimpleStation14 Oct 27, 2024
838a30f
Automatic Changelog Update (#1143)
SimpleStation14 Oct 27, 2024
306e479
[Fix] Fixed Icons In Radial Menus (#1150)
Remuchi Oct 27, 2024
67ad09e
Automatic Changelog Update (#1150)
SimpleStation14 Oct 27, 2024
7c8937a
[Feature] Clicking on Health Alerty Now Displays Health State (#1139)
Remuchi Oct 27, 2024
820cecc
Automatic Changelog Update (#1139)
SimpleStation14 Oct 27, 2024
8e1a63c
Trait Modify Factions (#955)
VMSolidus Oct 27, 2024
15e46cf
[Feature] Telescopic Baton (#1144)
Remuchi Oct 27, 2024
9537278
Automatic Changelog Update (#955)
SimpleStation14 Oct 27, 2024
678875b
Automatic Changelog Update (#1144)
SimpleStation14 Oct 27, 2024
cfcc4cb
Psionic Familiar System (#1146)
VMSolidus Oct 27, 2024
2d9d4d4
Automatic Changelog Update (#1146)
SimpleStation14 Oct 27, 2024
18a38e8
Update Credits (#1149)
github-actions[bot] Oct 27, 2024
9a1661e
Properly Credit Contributors Who Were Truncated by GitHub API (#1153)
DEATHB4DEFEAT Oct 28, 2024
88344bb
Tweak Familiars (#1162)
VMSolidus Oct 29, 2024
2b90e2a
Update Marish Language Description (#1160)
PlasmaRaptor Oct 29, 2024
cfd1737
Automatic Changelog Update (#1162)
SimpleStation14 Oct 29, 2024
6da7eab
Clean Up/Change Default Rules (#1154)
DEATHB4DEFEAT Oct 29, 2024
d2bdbec
Updade Gax (#1163)
Ichaie Nov 1, 2024
d6bb182
Automatic Changelog Update (#1163)
SimpleStation14 Nov 1, 2024
523e17c
Update Saltern (#1170)
VMSolidus Nov 2, 2024
dbaec26
Automatic Changelog Update (#1170)
SimpleStation14 Nov 2, 2024
9963e23
Add Uranium, Gold, And Silver To Cargo Menu (#1171)
VMSolidus Nov 2, 2024
7e565b2
Automatic Changelog Update (#1171)
SimpleStation14 Nov 2, 2024
ed50485
Voice Mask Refactor and Fixes (#1147)
beck-thompson Nov 2, 2024
9ecae9f
More Sec Loadout Guns (#1158)
VMSolidus Nov 2, 2024
377a88c
Automatic Changelog Update (#1147)
SimpleStation14 Nov 2, 2024
97e0403
Automatic Changelog Update (#1158)
SimpleStation14 Nov 2, 2024
3bbcab8
Fixes Cocoons (#1169)
FoxxoTrystan Nov 2, 2024
c5a40ee
Automatic Changelog Update (#1169)
SimpleStation14 Nov 2, 2024
b553ce9
Add New Sprites (#1174)
Ichaie Nov 2, 2024
903452b
Automatic Changelog Update (#1174)
SimpleStation14 Nov 2, 2024
f1f25d6
Syndicate Faction Comes From IFF Tags (#1176)
VMSolidus Nov 2, 2024
b40918b
Automatic Changelog Update (#1176)
SimpleStation14 Nov 2, 2024
b7de623
Fix This Stupid Behavior (#1177)
VMSolidus Nov 2, 2024
a6910bb
Automatic Changelog Update (#1177)
SimpleStation14 Nov 2, 2024
dc4a147
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
Mnemotechnician Nov 4, 2024
916647f
Revert "Automatic Changelog Update (#1177)"
Mnemotechnician Nov 4, 2024
406bda7
Revert "Fix This Stupid Behavior (#1177)"
Mnemotechnician Nov 4, 2024
ea2de09
Comment out the downfall of salvage
Mnemotechnician Nov 4, 2024
cce93eb
Revert "Automatic Changelog Update (#1171)"
Mnemotechnician Nov 4, 2024
ec87dc8
Merge branch 'master' of https://github.com/fansana/floofstation1 int…
Mnemotechnician Nov 4, 2024
c58500a
Remove eeMigrations.yml, Remove deltaMigrations.yml, Remove frontierM…
DangerRevolution Nov 5, 2024
b1e2e73
Fix CanShuttle Not Preventing Recalls (#1180)
VMSolidus Nov 5, 2024
bbe1f8f
Automatic Changelog Update (#1180)
SimpleStation14 Nov 5, 2024
53d12ac
Robust Toolbolbox Version 227.0.0 (#1173)
VMSolidus Nov 5, 2024
e94fa53
There is no brigmedic on saltern.
Mnemotechnician Nov 6, 2024
60c9e3f
Merge branch 'master' of https://github.com/simple-station/einstein-e…
Mnemotechnician Nov 6, 2024
c94dcf6
Merge remote-tracking branch 'origin-floofstation-fork/floof/selectiv…
Mnemotechnician Nov 6, 2024
272caa3
Hopefully fix the submodule version
Mnemotechnician Nov 6, 2024
4a671a5
Fix duplicate locale
Mnemotechnician Nov 6, 2024
fc15cc6
God please tell me this is the last
Mnemotechnician Nov 8, 2024
ce464ac
I shouldn't be changing this, WHY
Mnemotechnician Nov 8, 2024
f5a36e2
Comment out the new sec loadout guns
Mnemotechnician Nov 10, 2024
6d960bc
secmagboots overwrite
ProphetCrow Nov 12, 2024
f8d1cfa
Merge branch 'master' into muffled-gas-masks
sarcoph Nov 12, 2024
b36de03
Merge branch 'Fansana:master' into secmagboots
ProphetCrow Nov 14, 2024
66b2f4d
HypnoTemp Plushies
Cprn-Sprkl Nov 15, 2024
8dbb298
Update HypnoTempPlushies.yml
Cprn-Sprkl Nov 15, 2024
3d1a6dd
Update Resources/Prototypes/Entities/Objects/Fun/prizeticket.yml
Cprn-Sprkl Nov 15, 2024
701a1d3
Update Resources/Prototypes/Entities/Objects/Fun/prizeticket.yml
Cprn-Sprkl Nov 15, 2024
800671d
Update Resources/Prototypes/Entities/Objects/Fun/prizeticket.yml
Cprn-Sprkl Nov 15, 2024
f3171c3
Update meta.json
Cprn-Sprkl Nov 15, 2024
974a402
Merge branch 'Fansana:master' into secmagboots
ProphetCrow Nov 15, 2024
70aad26
Merge branch 'Fansana:master' into secmagboots
ProphetCrow Nov 16, 2024
7284f2e
Merge branch 'Fansana:master' into secmagboots
ProphetCrow Nov 18, 2024
1f97b99
add some wedding essentials
Fansana Nov 18, 2024
bb9dc24
adding icons
Fansana Nov 18, 2024
afa1aa8
more ice creams and ingredient boxes
Fansana Nov 18, 2024
557f728
make butter grindable
Fansana Nov 18, 2024
1b4c2ec
fix case
Fansana Nov 18, 2024
48e89df
pipeline updates
Fansana Nov 18, 2024
add21fd
Allows Archnic's to talk to spiders
VividPups Nov 19, 2024
778abe1
Fix the silver crate name
Mnemotechnician Nov 19, 2024
ad9fcde
Merge pull request #364 from VividPups/Spider-talk
FoxxoTrystan Nov 19, 2024
936723c
Automatic Changelog Update (#364)
Floof-Station-Bot Nov 19, 2024
17b0e8d
Added HypnoTemp Plushies to the Prize Counter
Cprn-Sprkl Nov 19, 2024
43728cb
Merge pull request #362 from Fansana/more-icecream
Fansana Nov 19, 2024
f1f71d3
Automatic Changelog Update (#362)
Floof-Station-Bot Nov 19, 2024
fedf0c6
does nobody read the code they PR? the fuck is this?
Fansana Nov 19, 2024
0efd87f
Merge pull request #365 from Fansana/voicemask-fix-again-fucking-why
Fansana Nov 19, 2024
2b17689
Automatic Changelog Update (#365)
Floof-Station-Bot Nov 19, 2024
ed674d3
Merge branch 'master' into floof/selective-merge-2024-11-04
Fansana Nov 19, 2024
4520006
So fucking many documents
Fansana Nov 20, 2024
93d3b71
remove duplicate
Fansana Nov 20, 2024
5a6fd02
Merge pull request #367 from Fansana/more-icecream
Fansana Nov 20, 2024
0a8744e
Merge branch 'master' into floof/selective-merge-2024-11-04
Fansana Nov 20, 2024
e3bb7b5
adjusted crates and prices
Fansana Nov 20, 2024
ecc69f3
adjusted the prices a tad
Fansana Nov 20, 2024
f13905d
fill Janitor and bartender locker
Fansana Nov 20, 2024
2883506
Fix PirateRadioSpawnRule heisentest.
Nov 20, 2024
ac22152
Fix engine-update-specific using.
Nov 20, 2024
bc3b3ba
Merge pull request #356 from Cprn-Sprkl/hypnotemp-plushies
FoxxoTrystan Nov 21, 2024
3264762
Automatic Changelog Update (#356)
Floof-Station-Bot Nov 21, 2024
c5253fb
Update saltern.yml
Fansana Nov 22, 2024
bbdfecf
fix BoundUserInterface
Fansana Nov 22, 2024
4bcdb78
Merge pull request #363 from Fansana/pipeline-update
Fansana Nov 22, 2024
6ceca24
Consent generated
FoxxoTrystan Nov 22, 2024
47a5a12
unless code
FoxxoTrystan Nov 22, 2024
ff5c44e
Merge pull request #326 from Mnemotechnician/floof/selective-merge-20…
Memeji Nov 22, 2024
fe28c98
Automatic Changelog Update (#326)
Floof-Station-Bot Nov 22, 2024
5a556be
Merge pull request #370 from sleepyyapril/fix-heisentest
FoxxoTrystan Nov 22, 2024
48e8353
Merge branch 'Fansana:master' into consent-fixes
FoxxoTrystan Nov 23, 2024
a19cfa3
fixes build
FoxxoTrystan Nov 23, 2024
bbbb806
fixes
FoxxoTrystan Nov 23, 2024
3bbfd6c
ingore
FoxxoTrystan Nov 23, 2024
e76362e
fixes?
FoxxoTrystan Nov 23, 2024
2a16dd6
orGroup fixes
Cprn-Sprkl Nov 23, 2024
db1f58e
Merge pull request #197 from sarcoph/muffled-gas-masks
Fansana Nov 23, 2024
972c7d8
Automatic Changelog Update (#197)
Floof-Station-Bot Nov 23, 2024
a28b285
add to vendors
Fansana Nov 23, 2024
80e0403
Merge pull request #361 from Fansana/wedding-essentials
Fansana Nov 23, 2024
8928cea
Automatic Changelog Update (#361)
Floof-Station-Bot Nov 23, 2024
5c2b443
Merge pull request #373 from FoxxoTrystan/consent-fixes
Fansana Nov 23, 2024
1bc63bb
add templates to their folders
Fansana Nov 23, 2024
6aa31af
fixes for various issues
Fansana Nov 23, 2024
595740b
add folders to cabinets
Fansana Nov 23, 2024
e27e5a0
fix test
Fansana Nov 23, 2024
de9569f
fix action icon
Fansana Nov 23, 2024
c2d695c
Merge pull request #366 from Fansana/paperwork-templates-the-rekoning
Memeji Nov 23, 2024
60edab8
Automatic Changelog Update (#366)
Floof-Station-Bot Nov 23, 2024
2386612
Merge pull request #345 from ProphetCrow/secmagboots
Memeji Nov 23, 2024
7ae4d84
Automatic Changelog Update (#345)
Floof-Station-Bot Nov 23, 2024
e9f1a77
Merge pull request #374 from Cprn-Sprkl/fix-item-group-locker-spawns
Memeji Nov 23, 2024
0a2582d
Automatic Changelog Update (#374)
Floof-Station-Bot Nov 23, 2024
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
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
ARTIFACT_ID: ${{ steps.artifact-upload-step.outputs.artifact-id }}
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}
ROBUST_CDN_URL: ${{ vars.ROBUST_CDN_URL }}
FORK_ID: ${{ vars.FORK_ID }}
FORK_ID: "floofstation-main"

# - name: Publish changelog (Discord)
# run: Tools/actions_changelogs_since_last_run.py
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/publish-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Publish

concurrency:
group: publish

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: sudo apt-get install -y python3-paramiko python3-lxml

- uses: actions/[email protected]
with:
ref: master
submodules: 'recursive'
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 8.0.100

- name: Get Engine Tag
run: |
cd RobustToolbox
git fetch --depth=1

- name: Install dependencies
run: dotnet restore

- name: Build Packaging
run: dotnet build Content.Packaging --configuration Release --no-restore /m

- name: Package server
run: dotnet run --project Content.Packaging server --platform win-x64 --platform linux-x64 --platform osx-x64 --platform linux-arm64

- name: Package client
run: dotnet run --project Content.Packaging client --no-wipe-release

- name: Upload build artifact
id: artifact-upload-step
uses: actions/upload-artifact@v4
with:
name: build
path: release/*.zip
compression-level: 0
retention-days: 0

- name: Publish version
run: Tools/publish_github_artifact.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
ARTIFACT_ID: ${{ steps.artifact-upload-step.outputs.artifact-id }}
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}
ROBUST_CDN_URL: ${{ vars.ROBUST_CDN_URL }}
FORK_ID: "floofstation-test"

# - name: Publish changelog (Discord)
# run: Tools/actions_changelogs_since_last_run.py
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CHANGELOG_DIR: ${{ vars.CHANGELOG_DIR }}
# DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }}

- name: Publish changelog (RSS)
run: Tools/actions_changelog_rss.py
env:
CHANGELOG_RSS_KEY: ${{ secrets.CHANGELOG_RSS_KEY }}

- uses: geekyeggo/delete-artifact@v5
if: always()
with:
name: build
2 changes: 2 additions & 0 deletions .github/workflows/update-credits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

- name: Get this week's Contributors
shell: pwsh
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: Tools/dump_github_contributors.ps1 > Resources/Credits/GitHub.txt

# TODO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public sealed class ExplosionDebugOverlay : Overlay

public override OverlaySpace Space => OverlaySpace.WorldSpace | OverlaySpace.ScreenSpace;

public Matrix3 SpaceMatrix;
public Matrix3x2 SpaceMatrix;
public MapId Map;

private readonly Font _font;
Expand Down Expand Up @@ -78,15 +78,16 @@ private void DrawScreen(OverlayDrawArgs args)
if (SpaceTiles == null)
return;

gridBounds = Matrix3.Invert(SpaceMatrix).TransformBox(args.WorldBounds);
Matrix3x2.Invert(SpaceMatrix, out var invSpace);
gridBounds = invSpace.TransformBox(args.WorldBounds);

DrawText(handle, gridBounds, SpaceMatrix, SpaceTiles, SpaceTileSize);
}

private void DrawText(
DrawingHandleScreen handle,
Box2 gridBounds,
Matrix3 transform,
Matrix3x2 transform,
Dictionary<int, List<Vector2i>> tileSets,
ushort tileSize)
{
Expand All @@ -103,7 +104,7 @@ private void DrawText(
if (!gridBounds.Contains(centre))
continue;

var worldCenter = transform.Transform(centre);
var worldCenter = Vector2.Transform(centre, transform);

var screenCenter = _eyeManager.WorldToScreen(worldCenter);

Expand All @@ -119,7 +120,7 @@ private void DrawText(
if (tileSets.TryGetValue(0, out var set))
{
var epicenter = set.First();
var worldCenter = transform.Transform((epicenter + Vector2Helpers.Half) * tileSize);
var worldCenter = Vector2.Transform((epicenter + Vector2Helpers.Half) * tileSize, transform);
var screenCenter = _eyeManager.WorldToScreen(worldCenter) + new Vector2(-24, -24);
var text = $"{Intensity[0]:F2}\nΣ={TotalIntensity:F1}\nΔ={Slope:F1}";
handle.DrawString(_font, screenCenter, text);
Expand Down Expand Up @@ -148,11 +149,12 @@ private void DrawWorld(in OverlayDrawArgs args)
if (SpaceTiles == null)
return;

gridBounds = Matrix3.Invert(SpaceMatrix).TransformBox(args.WorldBounds).Enlarged(2);
Matrix3x2.Invert(SpaceMatrix, out var invSpace);
gridBounds = invSpace.TransformBox(args.WorldBounds).Enlarged(2);
handle.SetTransform(SpaceMatrix);

DrawTiles(handle, gridBounds, SpaceTiles, SpaceTileSize);
handle.SetTransform(Matrix3.Identity);
handle.SetTransform(Matrix3x2.Identity);
}

private void DrawTiles(
Expand Down
39 changes: 25 additions & 14 deletions Content.Client/Atmos/EntitySystems/GasTileOverlaySystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Client.Atmos.Overlays;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
using JetBrains.Annotations;
Expand Down Expand Up @@ -36,28 +37,38 @@ public override void Shutdown()

private void OnHandleState(EntityUid gridUid, GasTileOverlayComponent comp, ref ComponentHandleState args)
{
if (args.Current is not GasTileOverlayState state)
return;
Dictionary<Vector2i, GasOverlayChunk> modifiedChunks;

// is this a delta or full state?
if (!state.FullState)
switch (args.Current)
{
foreach (var index in comp.Chunks.Keys)
// is this a delta or full state?
case GasTileOverlayDeltaState delta:
{
if (!state.AllChunks!.Contains(index))
comp.Chunks.Remove(index);
modifiedChunks = delta.ModifiedChunks;
foreach (var index in comp.Chunks.Keys)
{
if (!delta.AllChunks.Contains(index))
comp.Chunks.Remove(index);
}

break;
}
}
else
{
foreach (var index in comp.Chunks.Keys)
case GasTileOverlayState state:
{
if (!state.Chunks.ContainsKey(index))
comp.Chunks.Remove(index);
modifiedChunks = state.Chunks;
foreach (var index in comp.Chunks.Keys)
{
if (!state.Chunks.ContainsKey(index))
comp.Chunks.Remove(index);
}

break;
}
default:
return;
}

foreach (var (index, data) in state.Chunks)
foreach (var (index, data) in modifiedChunks)
{
comp.Chunks[index] = data;
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Atmos/Overlays/AtmosDebugOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected override void Draw(in OverlayDrawArgs args)
DrawData(msg, handle);
}

handle.SetTransform(Matrix3.Identity);
handle.SetTransform(Matrix3x2.Identity);
}

private void DrawData(DebugMessage msg,
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Atmos/Overlays/GasTileOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected override void Draw(in OverlayDrawArgs args)

var (_, _, worldMatrix, invMatrix) = gridXform.GetWorldPositionRotationMatrixWithInv();
state.drawHandle.SetTransform(worldMatrix);
var floatBounds = invMatrix.TransformBox(in state.WorldBounds).Enlarged(grid.TileSize);
var floatBounds = invMatrix.TransformBox(state.WorldBounds).Enlarged(grid.TileSize);
var localBounds = new Box2i(
(int) MathF.Floor(floatBounds.Left),
(int) MathF.Floor(floatBounds.Bottom),
Expand Down Expand Up @@ -249,7 +249,7 @@ protected override void Draw(in OverlayDrawArgs args)
});

drawHandle.UseShader(null);
drawHandle.SetTransform(Matrix3.Identity);
drawHandle.SetTransform(Matrix3x2.Identity);
}

private void DrawMapOverlay(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void UpdateState(NewsArticle article, int targetNum, int totalNum, bool n
Author.Visible = true;

PageName.Text = article.Title;
PageText.SetMarkup(article.Content);
PageText.SetMarkupPermissive(article.Content);

PageNum.Text = $"{targetNum}/{totalNum}";

Expand Down
12 changes: 6 additions & 6 deletions Content.Client/Clickable/ClickableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ public bool CheckClick(SpriteComponent sprite, TransformComponent transform, Ent
renderOrder = sprite.RenderOrder;
var (spritePos, spriteRot) = transform.GetWorldPositionRotation(xformQuery);
var spriteBB = sprite.CalculateRotatedBoundingBox(spritePos, spriteRot, eye.Rotation);
bottom = Matrix3.CreateRotation(eye.Rotation).TransformBox(spriteBB).Bottom;
bottom = Matrix3Helpers.CreateRotation(eye.Rotation).TransformBox(spriteBB).Bottom;

var invSpriteMatrix = Matrix3.Invert(sprite.GetLocalMatrix());
Matrix3x2.Invert(sprite.GetLocalMatrix(), out var invSpriteMatrix);

// This should have been the rotation of the sprite relative to the screen, but this is not the case with no-rot or directional sprites.
var relativeRotation = (spriteRot + eye.Rotation).Reduced().FlipPositive();

Angle cardinalSnapping = sprite.SnapCardinals ? relativeRotation.GetCardinalDir().ToAngle() : Angle.Zero;

// First we get `localPos`, the clicked location in the sprite-coordinate frame.
var entityXform = Matrix3.CreateInverseTransform(transform.WorldPosition, sprite.NoRotation ? -eye.Rotation : spriteRot - cardinalSnapping);
var localPos = invSpriteMatrix.Transform(entityXform.Transform(worldPos));
var entityXform = Matrix3Helpers.CreateInverseTransform(transform.WorldPosition, sprite.NoRotation ? -eye.Rotation : spriteRot - cardinalSnapping);
var localPos = Vector2.Transform(Vector2.Transform(worldPos, entityXform), invSpriteMatrix);

// Check explicitly defined click-able bounds
if (CheckDirBound(sprite, relativeRotation, localPos))
Expand Down Expand Up @@ -79,8 +79,8 @@ public bool CheckClick(SpriteComponent sprite, TransformComponent transform, Ent

// convert to layer-local coordinates
layer.GetLayerDrawMatrix(dir, out var matrix);
var inverseMatrix = Matrix3.Invert(matrix);
var layerLocal = inverseMatrix.Transform(localPos);
Matrix3x2.Invert(matrix, out var inverseMatrix);
var layerLocal = Vector2.Transform(localPos, inverseMatrix);

// Convert to image coordinates
var layerImagePos = (Vector2i) (layerLocal * EyeManager.PixelsPerMeter * new Vector2(1, -1) + rsiState.Size / 2f);
Expand Down
31 changes: 4 additions & 27 deletions Content.Client/Consent/UI/Windows/ConsentWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,10 @@
<Control MinSize="0 10" />
<Label Text="{Loc consent-window-toggles-label}" />

<!-- TODO: Generate these in code by iterating prototypes? -->
<!-- Example Consent Toggle -->
<PanelContainer HorizontalExpand="True" MinWidth="200">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical" HorizontalExpand="True" Margin="5">
<BoxContainer Orientation="Horizontal" Margin="5">
<Label Text="{Loc consent-example1}" />
<Control HorizontalExpand="True" />
<Button
Name="ConsentToggleExample1Off"
ToggleMode="True"
Access="Public"
Text="Off"
StyleClasses="OpenRight" />
<Button
Name="ConsentToggleExample1On"
ToggleMode="True"
Access="Public"
Text="On"
StyleClasses="OpenLeft" />
</BoxContainer>
<Label Text="{Loc consent-example1-desc}" />
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" HScrollEnabled="False" VScrollEnabled="True" MinHeight="50">
<BoxContainer Name="ConsentList" Access="Public" HorizontalExpand="True" SeparationOverride="2" Orientation="Vertical">
<!-- The rest here is generated programmatically -->
</BoxContainer>
</PanelContainer>


</ScrollContainer>
</BoxContainer>
</controls:FancyWindow>
Loading
Loading