Skip to content

Commit

Permalink
Merge pull request space-wizards#95 from Sector-Umbra/upstream-merge
Browse files Browse the repository at this point in the history
* VGRoid support (space-wizards#27659)

* Dungeon spawn support for grid spawns

* Recursive dungeons working

* Mask approach working

* zack

* More work

* Fix recursive dungeons

* Heap of work

* weh

* the cud

* rar

* Job

* weh

* weh

* weh

* Master merges

* orch

* weh

* vgroid most of the work

* Tweaks

* Tweaks

* weh

* do do do do do do

* Basic layout

* Ore spawning working

* Big breaking changes

* Mob gen working

* weh

* Finalising

* emo

* More finalising

* reverty

* Reduce distance

* New anomaly behaviour: Invisibility (space-wizards#29120)

* invisible anomaly

* good luck

* Automatic changelog update

* feat: allow developers to customize vscode settings, closes space-wizards#29285 (space-wizards#29294)

* Allow construction of rotated railings (space-wizards#29687)

* Remove southRotation from railing structures

* Curly Braces

* Automatic changelog update

* improved wrench description (space-wizards#29700)

Lefty latchy, righty removey

* add apc power draw to stat value command (space-wizards#29701)

add apc stat value

* Dynamic Radial Menus (space-wizards#29678)

* fix

* Clean Some Code

* Some Commentaries

* Update Content.Client/UserInterface/Controls/RadialContainer.cs

* Update Content.Client/UserInterface/Controls/RadialContainer.cs

---------

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

* Automatic changelog update

* Fixes objects changing physics behavior after being pulled (space-wizards#29694)

* Fixes pull rotation logic

* cleaner condition

* even less code

* I CHANGED MY MIND

* first one

* second one

---------

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

* Automatic changelog update

* Makes portable flashers destructable (space-wizards#29564)

Makes portable flashers destructible

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

* Automatic changelog update

* Starting gear for vox crewmembers (space-wizards#29685)

* tank harness

* weh

* Suit Storage Whitelist

* Revert "Suit Storage Whitelist"

This reverts commit b1f5035.

* suit storage filter

* vox spawn gear

* weh

* Make all nukies humans (space-wizards#29693)

* Automatic changelog update

* Make vox roundstart (space-wizards#29704)

* Make vox roundstart

I believe all the issues are fixed.

* Click detection bandaid

* Automatic changelog update

* Added Health Analyzer to basic treatment module. (space-wizards#29696)

Removed dropped, added Health Analyzer to Basic Treatment Module

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

* Automatic changelog update

* Fix animation looping bugs. (space-wizards#29457)

Summary of the problem is in the corresponding engine commit: space-wizards/RobustToolbox@a4ea5a4

This commit requires engine master right now.

I think space-wizards#29144 is probably the most severe one, but I touched Jittering and RotatingLight too since they seemed sus too.

Fixes space-wizards#29144

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

* Automatic changelog update

* fix(marathon): Fixing more issues (space-wizards#29411)

* fix(packed): Fix a couple of issues (space-wizards#29422)

* fix(packed): Fix a couple of issues

* Name the signal button for bar

* Fix Vox clothing in character creation menu (space-wizards#29709)

Update vox.yml

* Fix typo in pineapple pizza description (space-wizards#29714)

* Move checking code for BlacklistedRange to the right place in sqlite (space-wizards#29389)

* Re-enabling nukie species(except vox), added antag species blacklisting

* Revert "Make all Nukies humans (space-wizards#29693)"

This reverts commit 3e3e050.

* Implemented species blacklist

* Re-enabled all species as Nukies except for Vox because loadouts don't support breathing alternative gases yet.

* Automatic changelog update

* Add summary comments for ElectrifiedComponent fields (space-wizards#29733)

add summaries for ElectrifiedComponent

* Fix showing the inventory button on entities without any inventory slots (space-wizards#29728)

* Fire Axe resprite 45 degrees v3 (space-wizards#28866)

Rotating Fire Axe 45 deg

* nuke biochem (space-wizards#29751)

Nuke biomchem again

* Shuttle map button tweaks (space-wizards#29757)

- Avoids adding pending objects we can never show so the list should fill much faster.

* Automatic changelog update

* Don't allow toggling internals while asleep (space-wizards#29753)

* You no longer get deleted when cuffed and buckled (space-wizards#29718)

fix

* Fixes a minor typo for the base gingerbread body part (space-wizards#29717)

"Fixes a minor typo in the gingerbread bodypart prototype"

* Phoronman 1984 (space-wizards#29747)

No more.

* Added cryosleep UnitSpawner and UnitSpawnerLate to the map Origin (space-wizards#29761)

Added cryosleep UnitSpawner and UnitSpawnerLate

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

* Automatic changelog update

* Fix wielding while pulling (space-wizards#29781)

* Update Credits (space-wizards#29784)

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

* Spilling reagents on mutliple entities at once fix (space-wizards#29763)

* Fixed!

* That could have been bad this is why I'm glad I check the diff xD

* Automatic changelog update

* Improve buckling's interactions with standing state (space-wizards#29741)

* Automatic changelog update

* Add supplybot moving states (space-wizards#29795)

* Add supplybot moving states

* forgor

* Raise ratking migration minimum players to 30 from 15 (space-wizards#29737)

* Automatic changelog update

* Intercom buffs and fixes (space-wizards#29580)

* Intercom buffs and fixes

* remove unused bui state

* mild sec intercom buff

* reinforce sec intercoms

* Automatic changelog update

* Bartending+: Shaking and Stirring (space-wizards#29243)

* Shaking and Stirring

* Remove shake message

* Switch if order a bit

* Add doafter supprot for reactionmixer

* Fix nullability

* Timespan zero

* Forgot to remove loc string

* Reorganize usings

* Remove unneeded usings, fix b52 needing to be shaken

* Slicing food with Swords (space-wizards#29005)

* added utensil component

* BaseSword added

* fix(hardsuits): Give the carp suit and hardsuit a suit storage slot (space-wizards#29322)

* fix(hardsuits): Give the carp hardsuit suit storage

* Both carpsuits have suit slots

* Automatic changelog update

* metal foam grenades (space-wizards#29428)

* metal foam grenades

* wow okay

* meh

* bruh

* test

* push

* The real AME nerf (space-wizards#29587)

* The real AME nerf

* oh the real change

* Update AmeNodeGroup.cs

* Removes max damage threshold on healing for hyperzine (space-wizards#29712)

* Removes max damage threshold for hyperzine

* the description...

---------

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

* Automatic changelog update

* Silence ringtones on admin PDAs (space-wizards#29801)

* Silence ringtones on invisible PDAs

* Revert "Silence ringtones on invisible PDAs"

This reverts commit afc1041.

* Literally just this

* Add an admin announcement for news article publishing

* Automatic changelog update

* Fixed the guide book entry for Diona's blood type (space-wizards#29805)

Fixed the entry for Diona's blood type

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

* Improve throwing precision (space-wizards#29726)

* improve throwing precision

* remove debugging logs

* minor fixes

* f

* Update Content.Shared/Throwing/LandAtCursorComponent.cs

---------

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

* Automatic changelog update

* Don't treat vgroid as station grid (space-wizards#29811)

Forgot I added this toggle.

* Vox guidebook entry (space-wizards#29713)

* vox guidebook entry

* skreee

* Removed incorrect diet reference

* Automatic changelog update

* Restore a panic bunker cvar in wizardsDen.toml (space-wizards#29832)

Update wizardsDen.toml

* all toggle light actions have a 1 second use delay (space-wizards#29833)

* Automatic changelog update

* Fix Shotgun Spam Loading (space-wizards#29827)

* Automatic changelog update

* Add popup for healing target (space-wizards#29804)

* Add popup for healing target

* hop

* huh

* fix one

* fix showing popup to all

* Add popup for health analyzer target (space-wizards#29803)

* Add popup for health analyzer target

* addition

* fix showing popup to all

* localization and change of appearance of the phrase about the remaining time (space-wizards#29844)

* Action menu localization (space-wizards#29839)

* fix passive vent sprite in construction menu (space-wizards#29820)

* Automatic changelog update

* Let Pacifists Use Certain Guns(Foam Weapons) (space-wizards#29835)

Let Pacifists Use Certain Guns(foam)

* Automatic changelog update

* Fix lobby time typo (space-wizards#29841)

* Localization of the threat level in an emergency lamp (space-wizards#29847)

* Nozzle Direction Localization (space-wizards#29849)

* Aghosts can now /ghost (space-wizards#29360)

I will not be subjected to criminal abuse

* Change Cluster evac (space-wizards#29828)

* Update map changes labeler (space-wizards#29858)

Update labeler.yml

* Stop eating food if you drop it (space-wizards#29854)

* Stop eating food if you drop it

* woops, unused param

* comments

---------

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

* Automatic changelog update

* Fix colornetwork desc and help (space-wizards#29856)

* Fix colornetwork description

* suggested changes

* forgor

* done

* ok now it IS done

* made the guitars be able to be worn on suitstorage (space-wizards#29048)

* made the guitars be able to be worn on suitstorage

* minor fix

* Automatic changelog update

* Fix borg's popup spam (space-wizards#29861)

Fix borg popup spam

Co-authored-by: Winkarst-cpu <[email protected]>

* Automatic changelog update

* Steal Objective Condition now support stacks (space-wizards#29843)

* Update StealConditionSystem.cs

* Update StealConditionSystem.cs

* fixed missing characters in OwO accent (space-wizards#29047)

replaced two characters with ones that actually show up ingame

* Add scarf to warm clothing bounty (space-wizards#29779)

* Add scarf to warm clothing bounty

* Added ClothingScarfBase prototype and assigned to all of the scarves

* Automatic changelog update

* Add an option to the admin fax menu to lock papers such that they can't be edited by cybersun pens (space-wizards#28972)

* Add option to adminfax for locking papers.

* Replace dummy control with margin

* Automatic changelog update

* books bag tabletop (space-wizards#29863)

* books bag tabletop

* Update Resources/Prototypes/Entities/Objects/Specific/Librarian/books_bag.yml

---------

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

* Fix typing indicators! (space-wizards#29492)

* First commit

* Removed pause stuff

* Make the event better

* Forgot to add the comment

* Proto id stuff

* cool comments

* serializer

* Added the time stuff

* Crafting pizza boxes. (space-wizards#29680)

* We can now craft pizza boxes

* Fixing errors

* Automatic changelog update

* Custom solution transfer volume popup and item status panel fix (space-wizards#29852)

* Fix for custom solution transfer volume

* Dirty call to prevent issues

* Another fix, git issue

---------

Co-authored-by: Winkarst-cpu <[email protected]>

* Automatic changelog update

* Fixed jobwhitelist locale (space-wizards#29878)

Fixed whitelist locale

* Update Core (space-wizards#29880)

add

* Replace ProtoId<EntityPrototype> uses with EntProtoId (space-wizards#29892)

* Character menu asks if you want to save your character on exit (space-wizards#29875)

* Character menu asks if you want to save your character on exit

* Fix

* Another fix, little mistake by me

* Update Content.Client/Lobby/UI/CharacterSetupGuiSavePanel.xaml.cs

---------

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

* Automatic changelog update

* Revert Baby Jail (space-wizards#29891)

* Revert "SS14-28662 Add Baby Jail: a Jail for Babies (inverse panic bunker) (space-wizards#28763)"

This reverts commit 3ceb92a.

* Revert configs

* Oops

* Allow attack while pulling (space-wizards#29703)

* Make VirtualItem not block attacking

* Remove unneeded usings

* Automatic changelog update

* Fix baby jail (space-wizards#29896)

* Revert "Revert Baby Jail (space-wizards#29891)"

This reverts commit 24a2866.

* the fix

* Fix the ability to shoot out of crates (space-wizards#28961)

* Fix the ability to shoot out of crates

* Makes it check what inventory the player is in

* use IsEntityOrParentInContainer

* Fix Issues Github had

* gaahhh... Prevents lasers from being shot out of crates

* gaahhh... Prevents lasers from being shot out of crates

* Fix laser?

* hmmm... this is better looking I think?

* Uncook indentation

* Rerun tests?

* Automatic changelog update

* Glass Airlocks In Spray Painter (space-wizards#29869)

* Automatic changelog update

* Picking a ghostrole as an admin will now deadmin you. (space-wizards#29790)

* @Forcibly deadmins you

* Added checks for AdminDeadminOnJoin

* Automatic changelog update

* item toggling giga rework + full ninja refactor (space-wizards#28039)

* item toggle refactoring and some new systems

* add ToggleClothing component/system

* unhardcode magboots gravity logic

* make magboots and speedboots use ItemToggle and stuff

* remove now useless clothing components

* update client/server magboots systems

* add note to use ItemToggledEvent in ToggleActionEvent doc

* refactor PowerCellDraw to use ItemToggle for ui open/close control

* add TryUseCharges, refactor charges system

* update magboot trigger code

* make borg use ItemToggle, network SelectedModule instead of now removed Activated

* add AccessToggle for borg

* the giga ninja refactor

* update ninja yml

* update ItemToggle usage for some stuff

* fix activatableui requires power

* random fixing

* yaml fixing

* nuke ItemToggleDisarmMalus

* make defib use ItemToggle

* make things that use power not turn on if missing use charge

* pro

* fix sound prediction

* bruh

* proximity detector use ItemToggle

* oop

* big idiot syndrome

* fix ninja spawn rule and make it generic

* fix ninja spawn rule yml

* move loading profiles into AntagLoadProfileRule

* more ninja refactor

* ninja yml fixes

* the dreaded copy paste ops

* remove useless NinjaRuleComponent and ue AntagSelection for greeting

* fix invisibility

* move IsCompleted to SharedObjectivesSystem

* ability fixes

* oop fix powercell instantly draining itself

* sentient speedboots gaming

* make reflect use ItemToggle

* fix other test

* loadprofilerule moved into its own pr

* remove conflict with dragon refactor

* remove all GenericAntag code from ninja

* )

* probably

* remove old enabled

* great language bravo vince

* GREAT LANGUAGE

* who made this language

* because it stinks

* reparent blood-red magboots to magboots probbbly works

* most of the review stuff

* hasGrav doesnt mean what i thought it did

* make health analyzer use itemtoggle, not fail test

* fix mag/speed boots being wacky

* UNTROLL

* add ItemToggle to the random health analyzers

* a

* remove unused obsolete borg func

* untrolling

* :trollface:

* fix test

* fix

* g

* untroll

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>

* Fix AtmosDeviceSystem debug assert Heisenbug (space-wizards#29752)

Fix AtmosDeviceSystem debug assertion Heisenbug

* Revert "Picking a ghostrole as an admin will now deadmin you. (space-wizards#29790)" (space-wizards#29901)

This reverts commit 1a50760.

* Аnnouncement sender localization (space-wizards#29907)

* Better admin note popups text visibility (space-wizards#29909)

* Better admin note popup text visibility

* Bring buttons closer to the border

* Automatic changelog update

* Update cluster evac (space-wizards#29885)

* Update cluster evac

* forgot tiny fans

* the change

* Update FloorTileSystem to not use Component.Owner() (space-wizards#29930)

* Update FloorTileSystem to use EntityUid

* missed a variable

---------

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

* Made musket wieldable. (space-wizards#29910)

* Made musket wieldable.

* Updated musket rsi meta.json copyright.

* Copyright adjustment again.

* Automatic changelog update

* Allow notice boards to be built on walls (space-wizards#29851)

* Make stun batons be thrown like a throwing weapon (space-wizards#29883)

* make stun batons be thrown like a throwing weapon

* stun prods too

* pies too

* Automatic changelog update

* Update RCDSystem.cs to not use Component.Owner (space-wizards#29940)

Update RCDSystem.cs

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

* Update MapScreen.xaml.cs to not use Component.Owner (space-wizards#29938)

Update MapScreen.xaml.cs

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

* Update BiomeSystem.cs to not use Component.Owner (space-wizards#29939)

Update BiomeSystem.cs

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

* Fixes dropping item in container (space-wizards#29900)

* Items droped in containers will end up in containers

* Adds integration test for dropping entity while inside container

* comment

* comment

* trim the diff

---------

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

* Localization of dungeon direction (space-wizards#29911)

* Automatic changelog update

* Throwing system hotfix (space-wizards#29935)

throwing system hotfix

* Automatic changelog update

* Fix supplybot movement state (space-wizards#29944)

Fix supplybot movement sprite

* Implement Health Consideration for NPCs (space-wizards#29922)

Implement TargetHealthCon

* Fix timer deconstruction (space-wizards#29917)

Fix deconstruction for timers

* Automatic changelog update

* Updates GasTankSystem and InternalsSystem to not use Component.Owner (space-wizards#29934)

* blah, setup

* Updates GasTankSystem and InternalsSystem to not use Component.Owner

* squish the diff

* Fixa the rest

---------

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

* Centered hard hat sprites (space-wizards#29953)

* Automatic changelog update

* Update UtensilSystem.cs to not use Component.Owner (space-wizards#29971)

Update UtensilSystem.cs

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

* Update TriggerSystem.TimedCollide.cs to not use Component.Owner (space-wizards#29970)

Update TriggerSystem.TimedCollide.cs

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

* Change whitelist to pass when null (space-wizards#29981)

* Use reinforced glass damage modifier for secure windoors (space-wizards#29941)

* Use Rglass damage modifier for reinforced windoors

* i actually can remove this line since inherited

* Automatic changelog update

* Add doc comments to target action components (space-wizards#29982)

* Update ShuttleDockControl.xaml.cs to not use Component.Owner (space-wizards#29966)

Update ShuttleDockControl.xaml.cs

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

* Update ActionAlertTooltip.cs to use TryFromMarkup (space-wizards#29975)

* Update SmokingSystem.SmokingPipe.cs to not use Component.Owner (space-wizards#29967)

Update SmokingSystem.SmokingPipe.cs

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

* Fix antag objectives always overshooting MaxDifficulty (and kill tries20) (space-wizards#29830)

* The death of try20

* Add integration test for traitor gamerule

* Fix max difficulty being overshot

* Check at least one objective is assigned

* EntProtoId

* Automatic changelog update

* fire extinguisher using item toggle (space-wizards#29906)

* move SprayAttemptEvent to shared

* add SolutionTransferredEvent

* replace FireExtinguisher with SpraySafety

* update fire extinguisher yml

* invert visuals

* always handle event in solution transfer, it makes popups

* instantly fill it

* untroll

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>

* Update SalvageSystem.Magnet to not use Component.Owner (space-wizards#29961)

* Update SalvageSystem.Magnet.cs

* Update SalvageSystem.Magnet.cs the right way

---------

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

* Update submodule to 228.0.0 (space-wizards#29947)

* Update submodule to 228.0.0

* Fix every single test

* Also this one

* Dummy vox deserves a proper vox name (space-wizards#29789)

SKREEEEEeeeeeeee

* Watches (space-wizards#29550)

* watches

* rename

* add it into loot pools

* Remove imagesharp and StatusEffectAddedEvent from FlashOverlay (space-wizards#28930)

remove imagesharp and StatusEffectAddedEvent from FlashOverlay

* Automatic changelog update

* make cargo balance ui updating its own component (space-wizards#28295)

* add BankClientComponent and event

* query BankClient instead of hardcoded CargoOrderConsole for updating

* add BankClient to all ordering consoles

* :trollface:

* add Balance field to BankClient

* forgor

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

* m

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: ShadowCommander <[email protected]>

* fix(SharedGunSystem): Return and debug log on CreateEffect. (space-wizards#29656)

Sometimes CreateEffect is called on a Invalid Entity. This now causes
that to check, thus returning out and printing some hopefully helpful
logs to try to track down the real source of this issue.

* Replace DetachParentToNull() with DetachEntity() (space-wizards#29992)

DETACH PARENT TO ENTITY

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

* Update SpawnAfterInteractSystem.cs to not use Component.Owner (space-wizards#29968)

* Update SpawnAfterInteractSystem.cs

* what the fuck is that condition

---------

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

* Shiny Diamonds (space-wizards#25750)

* shiny

* add

* reresprite

* rereresprite

* Add files via upload

* Update ore.yml

* Automatic changelog update

* Vgroid diamonds hotfix (space-wizards#29999)

vgroid diamonds

* Update RadiationPulseOverlay.cs to have 0 warnings (space-wizards#30004)

* New CDN publish workflow (space-wizards#30009)

* LET'S SEE IF THIS WORKS

* I forgot the chmod +x

* I forgot the shebang

* Remove outdated steps from Test Packaging workflow (space-wizards#30018)

gen build info was removed in 5e800e0 but I didn't realize this workflow also tested it. Gone now.

* Replace obsolete xform.ToMap() with xformSystem.ToMapCoordinates() (space-wizards#30010)

* Get rid of a bunch of obsolete usages

* position

---------

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

* Replace obsolete EntityCoordiates.InRange() with TransformSystem.InRange() (space-wizards#29993)

* Replace EntityCoordiates.InRange() with TransformSystem.InRange()

* nullspace

* I figured it out

* man I have no clue how client side sutff works

* please have mercy

* remove RadiationPulseOverlay changes

* nullspace

---------

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

* Update IdExaminableSystem.cs to use TryFromMarkup (space-wizards#29957)

* Change FromMarkup to TryFromMarkup method in IdExaminableSystem.cs

* Update

* Update changelog RSS configuration (space-wizards#30024)

New server

* Update Credits (space-wizards#30026)

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

* Fix lizards losing snouts when equipping a head bandana (space-wizards#29979)

* say goodbye to no-snout lizards

* remove snout from plague doctor hat HideLayerClothing component

* Automatic changelog update

* Update MainMenu.cs to use ISawmill (space-wizards#29988)

* Update MainMenu.cs to use ISawmill

* Update

* Error

* NPC exits MeleeOperator on invalid EntityUid (space-wizards#30005)

EntityUid 0 problem fix

* Clean itemmapper (space-wizards#29983)

* File scoped namespace

* Format file

* Fix param name in doc comment

* Reflow doc comment

---------

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

* Update AccessLevelControl.xaml.cs to use ISawmill (space-wizards#29987)

* Update AccessLevelControl.xaml.cs to use ISawmill

* Update

* Silly me

* Update

* Fix AGhostCommand naming (space-wizards#29945)

* Change wristwatch meta description (space-wizards#30036)

* Fix RGB toys color when worn/in-hand (space-wizards#30023)

rgbeeeeeeee

* Clumsy proof grappling gun (space-wizards#29904)

Make grappling gun clumsy proof

* Automatic changelog update

* Fix HTN/NPC better plan selection (space-wizards#30017)

* recording commit

* Remove debugging/recording content

* Ambient music rules refactor (space-wizards#29921)

* refactor

* dutypo

* Prevent virtual item storage and popups (space-wizards#30020)

* Prevent virtual item storage and popups

* fix typo

* add comment

* Add petting cyborgs (space-wizards#30037)

added petting borgs, adjusted interactions

* Automatic changelog update

* make ninja shoes magboots (space-wizards#28586)

Co-authored-by: deltanedas <@deltanedas:kde.org>

* make scarves eatable again (space-wizards#29959)

* Automatic changelog update

* Fix AccessLevelControl breaking (space-wizards#30045)

space-wizards#29987 did an oopsie

This broke the ID computer, station records, and maybe some others too.

* Update host key for changelog RSS (space-wizards#30068)

* Fix invalid UI hover/click sounds breaking client (space-wizards#30067)

fixes space-wizards#29561

* Fix some markup related obsolete warnings in research and anomaly related systems (space-wizards#30072)

Fix some Markup related obsolete warnings in Research and Anomaly related systems

* Make addgamerule command process only valid game rules (space-wizards#29912)

* addgamerule command processes only valid rules

* Update

* English moment

* Automatic changelog update

* Add missing command description to replay_toggleui (space-wizards#30071)

* Remove uses of AllObjectives (space-wizards#30077)

Remove the uses of AllObjectives

* Revert "Change wristwatch meta description" (space-wizards#30070)

Revert "Change wristwatch meta description (space-wizards#30036)"

This reverts commit 919b3ac.

* Replace EntityPrototype.NoSpawn with EntityPrototype.HideSpawnMenu (space-wizards#30082)

NoSpawn

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

* Remove Geras from Slimes to address combat balance (space-wizards#29731)

Removed Geras

Removed Geras

* Automatic changelog update

* Nerf & standardised slip times (space-wizards#27879)

* standardised slip times

* puddle and gib soap

* banana peels

* cleaned yaml by shifting to component

* error slip

* error slip intersect

* intersect ratio return

* error and omega soap changes

* SlipocalypseClusterSoap 2 tc cost

* Automatic changelog update

* Sign Resprite (space-wizards#29806)

* Redone signage

* Signs

* ok this thing now

* alright ig?

* big data

* cryo sign

* new sign

* Automatic changelog update

* Character menu issuer localization (space-wizards#29840)

* Update CharacterUIController.cs

* TODO Burn this shit

* huh?

* huh!

---------

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

* Add examine for caustic and cold damage (space-wizards#29989)

* Examinable cold damage

* lightblue

* update grammar

* caustic

* Automatic changelog update

* Little saw debuff (space-wizards#29995)

* Automatic changelog update

* Vox displacement updates (space-wizards#29824)

* more vox displacement maps

* A

* remove vox insuls sprites

* sci magboots

* Update vox.yml

* Update meta.json

---------

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

* Make the super door remote to be able to control Syndicate doors (space-wizards#30033)

* Make the super door remote to be able to control Syndicate doors

* Fix

* Automatic changelog update

* Fix formatting warnings (space-wizards#30122)

* Temporarily remove Vox from space ninja and Unknown Shuttle ghostroles (space-wizards#30099)

* no vox ninjas

* blacklist vox from UnknownShuttleEvent

* Automatic changelog update

* DungeonSystem.Rooms bugfix (space-wizards#30125)

Update DungeonSystem.Rooms.cs

* Updated slime storage capacity text in guidebook (space-wizards#30121)

* Prevent Quantum Spin Inverter from Teleporting Things into Microwaves (space-wizards#29200)

* Prevent Quantum Spin Inverter from Teleporting Things into Microwaves

* Simplifies code, GetTeleportingEntity instead of TryGet, adds failed teleport message

* remove using Linguini.Syntax.Ast;

* capital...

* re-add CanInsert and Fixes microwave issue

* beb

* beeb

* minor SharedInteractionSystem cleanup (space-wizards#30139)

cleanup SharedInteractionSystem

* Automatic changelog update

* Fix stun batons using excess charges when thrown (space-wizards#30136)

Fix stun batons

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

* Automatic changelog update

* fix(dev_map): resave dev map (space-wizards#30098)

fix(dev_map): Resave devmap

Co-authored-by: 4llv07e <[email protected]>

* Correct .editorconfig to use no space after casting (space-wizards#30132)

* LatheSystem independently of energy (space-wizards#30148)

* Update LatheSystem.cs

* Emo

* Add dwarves (space-wizards#62)

* Revert "Revert "Change wristwatch meta description" (space-wizards#30070)"

This reverts commit 2e3d2db.

* Fix build error num. 1

---------

Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: Ed <[email protected]>
Co-authored-by: PJBot <[email protected]>
Co-authored-by: Alex Pavlenko <[email protected]>
Co-authored-by: ArkiveDev <[email protected]>
Co-authored-by: Interrobang01 <[email protected]>
Co-authored-by: Nemanja <[email protected]>
Co-authored-by: Rinary <[email protected]>
Co-authored-by: Plykiya <[email protected]>
Co-authored-by: plykiya <[email protected]>
Co-authored-by: Errant <[email protected]>
Co-authored-by: JIPDawg <[email protected]>
Co-authored-by: JIP <[email protected]>
Co-authored-by: Pieter-Jan Briers <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: Brandon Hu <[email protected]>
Co-authored-by: jmcb <[email protected]>
Co-authored-by: nikthechampiongr <[email protected]>
Co-authored-by: Jezithyr <[email protected]>
Co-authored-by: lzk <[email protected]>
Co-authored-by: DrSmugleaf <[email protected]>
Co-authored-by: AndreyCamper <[email protected]>
Co-authored-by: end <[email protected]>
Co-authored-by: themias <[email protected]>
Co-authored-by: Killerqu00 <[email protected]>
Co-authored-by: MFMessage <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: beck-thompson <[email protected]>
Co-authored-by: Tayrtahn <[email protected]>
Co-authored-by: Verm <[email protected]>
Co-authored-by: NotSoDamn <[email protected]>
Co-authored-by: slarticodefast <[email protected]>
Co-authored-by: Chief-Engineer <[email protected]>
Co-authored-by: Whisper <[email protected]>
Co-authored-by: Cojoke <[email protected]>
Co-authored-by: chavonadelal <[email protected]>
Co-authored-by: Boaz1111 <[email protected]>
Co-authored-by: Winkarst-cpu <[email protected]>
Co-authored-by: Winkarst-cpu <[email protected]>
Co-authored-by: Moomoobeef <[email protected]>
Co-authored-by: Ivan <[email protected]>
Co-authored-by: dffdff2423 <[email protected]>
Co-authored-by: Ghagliiarghii <[email protected]>
Co-authored-by: saga3152 <[email protected]>
Co-authored-by: Tunguso4ka <[email protected]>
Co-authored-by: Ubaser <[email protected]>
Co-authored-by: Vasilis <[email protected]>
Co-authored-by: ShadowCommander <[email protected]>
Co-authored-by: deltanedas <[email protected]>
Co-authored-by: Jonathan Argo <[email protected]>
Co-authored-by: osjarw <[email protected]>
Co-authored-by: CaasGit <[email protected]>
Co-authored-by: Luiz Costa <[email protected]>
Co-authored-by: SlamBamActionman <[email protected]>
Co-authored-by: CookieMasterT <[email protected]>
Co-authored-by: K-Dynamic <[email protected]>
Co-authored-by: Flareguy <[email protected]>
Co-authored-by: kbailey-git <[email protected]>
Co-authored-by: 4llv07e <[email protected]>
Co-authored-by: LankLTE <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 833 changed files with 21,229 additions and 19,112 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ csharp_indent_braces = false
csharp_indent_switch_labels = true

# Space preferences
csharp_space_after_cast = true
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
Expand Down
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Changes: Map":
- changed-files:
- any-glob-to-any-file:
- 'Resources/Maps/*.yml'
- 'Resources/Prototypes/Maps/*.yml'
- 'Resources/Maps/**/*.yml'
- 'Resources/Prototypes/Maps/**/*.yml'

"Changes: UI":
- changed-files:
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/test-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,3 @@ jobs:

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

- name: Update Build Info
run: Tools/gen_build_info.py

- name: Shuffle files around
run: |
mkdir "release/${{ github.sha }}"
mv release/*.zip "release/${{ github.sha }}"
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

9 changes: 8 additions & 1 deletion Content.Client/Access/UI/AccessLevelControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ namespace Content.Client.Access.UI;
[GenerateTypedNameReferences]
public sealed partial class AccessLevelControl : GridContainer
{
[Dependency] private readonly ILogManager _logManager = default!;

private ISawmill _sawmill = default!;

public readonly Dictionary<ProtoId<AccessLevelPrototype>, Button> ButtonsList = new();

public AccessLevelControl()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);

_sawmill = _logManager.GetSawmill("accesslevelcontrol");
}

public void Populate(List<ProtoId<AccessLevelPrototype>> accessLevels, IPrototypeManager prototypeManager)
Expand All @@ -25,7 +32,7 @@ public void Populate(List<ProtoId<AccessLevelPrototype>> accessLevels, IPrototyp
{
if (!prototypeManager.TryIndex(access, out var accessLevel))
{
Logger.Error($"Unable to find accesslevel for {access}");
_sawmill.Error($"Unable to find accesslevel for {access}");
continue;
}

Expand Down
18 changes: 12 additions & 6 deletions Content.Client/Actions/UI/ActionAlertTooltip.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Client.Stylesheets;
using Content.Client.Stylesheets;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
Expand Down Expand Up @@ -77,9 +77,12 @@ public ActionAlertTooltip(FormattedMessage name, FormattedMessage? desc, string?
MaxWidth = TooltipTextMaxWidth,
StyleClasses = {StyleNano.StyleClassTooltipActionRequirements}
};
requiresLabel.SetMessage(FormattedMessage.FromMarkup("[color=#635c5c]" +
requires +
"[/color]"));

if (!FormattedMessage.TryFromMarkup("[color=#635c5c]" + requires + "[/color]", out var markup))
return;

requiresLabel.SetMessage(markup);

vbox.AddChild(requiresLabel);
}
}
Expand All @@ -97,8 +100,11 @@ protected override void FrameUpdate(FrameEventArgs args)
if (timeLeft > TimeSpan.Zero)
{
var duration = Cooldown.Value.End - Cooldown.Value.Start;
_cooldownLabel.SetMessage(FormattedMessage.FromMarkup(
$"[color=#a10505]{(int) duration.TotalSeconds} sec cooldown ({(int) timeLeft.TotalSeconds + 1} sec remaining)[/color]"));

if (!FormattedMessage.TryFromMarkup($"[color=#a10505]{(int) duration.TotalSeconds} sec cooldown ({(int) timeLeft.TotalSeconds + 1} sec remaining)[/color]", out var markup))
return;

_cooldownLabel.SetMessage(markup);
_cooldownLabel.Visible = true;
}
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Popup xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client">
<PanelContainer StyleClasses="BackgroundDark">
<PanelContainer>
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BorderThickness="1" BorderColor="#18181B"/>
<gfx:StyleBoxFlat BorderThickness="2" BorderColor="#18181B" BackgroundColor="#25252a"/>
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Vertical" Margin="4 4 4 4">
<Label Name="PlayerNameLabel"/>
<Label Name="IdLabel"/>
<Label Name="TypeLabel"/>
Expand Down
12 changes: 10 additions & 2 deletions Content.Client/Audio/AudioUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private void SetClickSound(string value)
{
if (!string.IsNullOrEmpty(value))
{
var resource = _cache.GetResource<AudioResource>(value);
var resource = GetSoundOrFallback(value, CCVars.UIClickSound.DefaultValue);
var source =
_audioManager.CreateAudioSource(resource);

Expand All @@ -77,7 +77,7 @@ private void SetHoverSound(string value)
{
if (!string.IsNullOrEmpty(value))
{
var hoverResource = _cache.GetResource<AudioResource>(value);
var hoverResource = GetSoundOrFallback(value, CCVars.UIHoverSound.DefaultValue);
var hoverSource =
_audioManager.CreateAudioSource(hoverResource);

Expand All @@ -95,4 +95,12 @@ private void SetHoverSound(string value)
UIManager.SetHoverSound(null);
}
}

private AudioResource GetSoundOrFallback(string path, string fallback)
{
if (!_cache.TryGetResource(path, out AudioResource? resource))
return _cache.GetResource<AudioResource>(fallback);

return resource;
}
}
1 change: 1 addition & 0 deletions Content.Client/Audio/ContentAudioSystem.AmbientMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Content.Shared.CCVar;
using Content.Shared.GameTicking;
using Content.Shared.Random;
using Content.Shared.Random.Rules;
using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Client.ResourceManagement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,36 @@
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Prototypes;
using Content.Shared.Inventory;

namespace Content.Client.Chat.TypingIndicator;

public sealed class TypingIndicatorVisualizerSystem : VisualizerSystem<TypingIndicatorComponent>
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly InventorySystem _inventory = default!;


protected override void OnAppearanceChange(EntityUid uid, TypingIndicatorComponent component, ref AppearanceChangeEvent args)
{
if (args.Sprite == null)
return;

if (!_prototypeManager.TryIndex<TypingIndicatorPrototype>(component.Prototype, out var proto))
var currentTypingIndicator = component.TypingIndicatorPrototype;

var evt = new BeforeShowTypingIndicatorEvent();

if (TryComp<InventoryComponent>(uid, out var inventoryComp))
_inventory.RelayEvent((uid, inventoryComp), ref evt);

var overrideIndicator = evt.GetMostRecentIndicator();

if (overrideIndicator != null)
currentTypingIndicator = overrideIndicator.Value;

if (!_prototypeManager.TryIndex(currentTypingIndicator, out var proto))
{
Log.Error($"Unknown typing indicator id: {component.Prototype}");
Log.Error($"Unknown typing indicator id: {component.TypingIndicatorPrototype}");
return;
}

Expand Down
7 changes: 5 additions & 2 deletions Content.Client/Clickable/ClickableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public bool CheckClick(SpriteComponent sprite, TransformComponent transform, Ent
Angle cardinalSnapping = sprite.SnapCardinals ? relativeRotation.GetCardinalDir().ToAngle() : Angle.Zero;

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

// Check explicitly defined click-able bounds
Expand All @@ -58,8 +58,11 @@ public bool CheckClick(SpriteComponent sprite, TransformComponent transform, Ent
// Next check each individual sprite layer using automatically computed click maps.
foreach (var spriteLayer in sprite.AllLayers)
{
if (!spriteLayer.Visible || spriteLayer is not Layer layer)
// TODO: Move this to a system and also use SpriteSystem.IsVisible instead.
if (!spriteLayer.Visible || spriteLayer is not Layer layer || layer.CopyToShaderParameters != null)
{
continue;
}

// Check the layer's texture, if it has one
if (layer.Texture != null)
Expand Down
26 changes: 26 additions & 0 deletions Content.Client/Clock/ClockSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Content.Shared.Clock;
using Robust.Client.GameObjects;

namespace Content.Client.Clock;

public sealed class ClockSystem : SharedClockSystem
{
public override void Update(float frameTime)
{
base.Update(frameTime);

var query = EntityQueryEnumerator<ClockComponent, SpriteComponent>();
while (query.MoveNext(out var uid, out var comp, out var sprite))
{
if (!sprite.LayerMapTryGet(ClockVisualLayers.HourHand, out var hourLayer) ||
!sprite.LayerMapTryGet(ClockVisualLayers.MinuteHand, out var minuteLayer))
continue;

var time = GetClockTime((uid, comp));
var hourState = $"{comp.HoursBase}{time.Hours % 12}";
var minuteState = $"{comp.MinutesBase}{time.Minutes / 5}";
sprite.LayerSetState(hourLayer, hourState);
sprite.LayerSetState(minuteLayer, minuteState);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ public void UpdateCountdown()
}

EmergencyShuttleButton.Text = Loc.GetString("comms-console-menu-recall-shuttle");
CountdownLabel.SetMessage($"Time remaining\n{Owner.Countdown.ToString()}s");
var infoText = Loc.GetString($"comms-console-menu-time-remaining",
("time", Owner.Countdown.ToString()));
CountdownLabel.SetMessage(infoText);
}

public override void Close()
Expand Down
6 changes: 3 additions & 3 deletions Content.Client/Construction/ConstructionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public override void Initialize()

CommandBinds.Builder
.Bind(ContentKeyFunctions.OpenCraftingMenu,
new PointerInputCmdHandler(HandleOpenCraftingMenu, outsidePrediction:true))
new PointerInputCmdHandler(HandleOpenCraftingMenu, outsidePrediction: true))
.Bind(EngineKeyFunctions.Use,
new PointerInputCmdHandler(HandleUse, outsidePrediction: true))
.Bind(ContentKeyFunctions.EditorFlipObject,
new PointerInputCmdHandler(HandleFlip, outsidePrediction:true))
new PointerInputCmdHandler(HandleFlip, outsidePrediction: true))
.Register<ConstructionSystem>();

SubscribeLocalEvent<ConstructionGhostComponent, ExaminedEvent>(HandleConstructionGhostExamined);
Expand Down Expand Up @@ -196,7 +196,7 @@ public bool TrySpawnGhost(
if (GhostPresent(loc))
return false;

var predicate = GetPredicate(prototype.CanBuildInImpassable, loc.ToMap(EntityManager, _transformSystem));
var predicate = GetPredicate(prototype.CanBuildInImpassable, _transformSystem.ToMapCoordinates(loc));
if (!_examineSystem.InRangeUnOccluded(user, loc, 20f, predicate: predicate))
return false;

Expand Down
2 changes: 1 addition & 1 deletion Content.Client/ContextMenu/UI/EntityMenuUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private bool HandleOpenEntityMenu(in PointerInputCmdHandler.PointerInputCmdArgs
if (_combatMode.IsInCombatMode(args.Session?.AttachedEntity))
return false;

var coords = args.Coordinates.ToMap(_entityManager, _xform);
var coords = _xform.ToMapCoordinates(args.Coordinates);

if (_verbSystem.TryGetEntityMenuEntities(coords, out var entities))
OpenRootMenu(entities);
Expand Down
7 changes: 0 additions & 7 deletions Content.Client/Extinguisher/FireExtinguisherComponent.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Content.Client/Fax/AdminUI/AdminFaxEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public AdminFaxEui()
_window.OnClose += () => SendMessage(new AdminFaxEuiMsg.Close());
_window.OnFollowFax += entity => SendMessage(new AdminFaxEuiMsg.Follow(entity));
_window.OnMessageSend += args => SendMessage(new AdminFaxEuiMsg.Send(args.entity, args.title,
args.stampedBy, args.message, args.stampSprite, args.stampColor));
args.stampedBy, args.message, args.stampSprite, args.stampColor, args.locked));
}

public override void Opened()
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Fax/AdminUI/AdminFaxWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</BoxContainer>
<Label Text="{Loc admin-fax-stamp-color}" />
<ColorSelectorSliders Margin="12 0 0 0" Name="StampColorSelector" Color="#BB3232"/>
<Control MinHeight="10" />
<Button Name="SendButton" Text="{Loc admin-fax-send}"></Button>
<CheckBox Name="LockPageCheckbox" Text="{Loc admin-fax-lock-page}" ToolTip="{Loc admin-fax-lock-page-tooltip}"/>
<Button Name="SendButton" Text="{Loc admin-fax-send}" Margin="0 10 0 0" />
</BoxContainer>
</DefaultWindow>
5 changes: 3 additions & 2 deletions Content.Client/Fax/AdminUI/AdminFaxWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public sealed partial class AdminFaxWindow : DefaultWindow
{
private const string StampsRsiPath = "/Textures/Objects/Misc/bureaucracy.rsi";

public Action<(NetEntity entity, string title, string stampedBy, string message, string stampSprite, Color stampColor)>? OnMessageSend;
public Action<(NetEntity entity, string title, string stampedBy, string message, string stampSprite, Color stampColor, bool locked)>? OnMessageSend;
public Action<NetEntity>? OnFollowFax;

[Dependency] private readonly IResourceCache _resCache = default!;
Expand Down Expand Up @@ -98,6 +98,7 @@ private void SendMessage(BaseButton.ButtonEventArgs obj)

var from = FromEdit.Text;
var stampColor = StampColorSelector.Color;
OnMessageSend?.Invoke((faxEntity.Value, title, from, message, stamp, stampColor));
var locked = LockPageCheckbox.Pressed;
OnMessageSend?.Invoke((faxEntity.Value, title, from, message, stamp, stampColor, locked));
}
}
27 changes: 6 additions & 21 deletions Content.Client/Flash/FlashOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
using Content.Shared.Flash;
using Content.Shared.Flash.Components;
using Content.Shared.StatusEffect;
using Content.Client.Viewport;
using Robust.Client.Graphics;
using Robust.Client.State;
using Robust.Client.Player;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using SixLabors.ImageSharp.PixelFormats;

namespace Content.Client.Flash
{
public sealed class FlashOverlay : Overlay
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IClyde _displayManager = default!;
[Dependency] private readonly IStateManager _stateManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IGameTiming _timing = default!;

private readonly StatusEffectsSystem _statusSys;
private readonly StatusEffectsSystem _statusSys;

public override OverlaySpace Space => OverlaySpace.WorldSpace;
private readonly ShaderInstance _shader;
Expand Down Expand Up @@ -56,20 +51,6 @@ protected override void FrameUpdate(FrameEventArgs args)
PercentComplete = timeDone / lastsFor;
}

public void ReceiveFlash()
{
if (_stateManager.CurrentState is IMainViewportState state)
{
// take a screenshot
// note that the callback takes a while and ScreenshotTexture will be null the first few Draws
state.Viewport.Viewport.Screenshot(image =>
{
var rgba32Image = image.CloneAs<Rgba32>(SixLabors.ImageSharp.Configuration.Default);
ScreenshotTexture = _displayManager.LoadTextureFromImage(rgba32Image);
});
}
}

protected override bool BeforeDraw(in OverlayDrawArgs args)
{
if (!_entityManager.TryGetComponent(_playerManager.LocalEntity, out EyeComponent? eyeComp))
Expand All @@ -82,6 +63,11 @@ protected override bool BeforeDraw(in OverlayDrawArgs args)

protected override void Draw(in OverlayDrawArgs args)
{
if (RequestScreenTexture && ScreenTexture != null)
{
ScreenshotTexture = ScreenTexture;
RequestScreenTexture = false; // we only need the first frame, so we can stop the request now for performance reasons
}
if (ScreenshotTexture == null)
return;

Expand All @@ -96,7 +82,6 @@ protected override void DisposeBehavior()
{
base.DisposeBehavior();
ScreenshotTexture = null;
PercentComplete = 1.0f;
}
}
}
Loading

0 comments on commit f83a205

Please sign in to comment.