Commit Graph

75 Commits

Author SHA1 Message Date
metalgearsloth
75a7407e33 Predict some power PowerReceiver stuff (#33834)
* Predict some power PowerReceiver stuff

Need it for some atmos device prediction.

* Also this
2025-03-10 13:00:49 +11:00
pathetic meowmeow
cbecc4cc4b Use new engine APIs for setting the scroll target of views (#35401) 2025-02-23 18:47:13 +01:00
metalgearsloth
1d004f4945 Sentry review (#35424)
Co-authored-by: chromiumboy <chromium.boy@gmail.com>
Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>
2025-02-24 00:57:27 +11:00
metalgearsloth
634c4a7780 Fix window positions not saving (#35055)
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
2025-02-23 23:57:57 +11:00
Milon
f6a1fd5de8 add missing base calls to several BUIs (#35124) 2025-02-13 01:41:30 -05:00
SpaceManiac
4122310735 Fix 38 non-obsolete warnings (#33794) 2025-02-11 20:59:50 +11:00
ArtisticRoomba
9de569d973 Show battery level for selected devices in Power Monitoring Console (#33854)
* Use class instead of out variables

* Show battery level in power monitoring console

* Better color contrast for battery level + localized string

* Add visualization to battery percentage

* Reverts random ChatSystem.cs whitespace change

* Address review

* Show BatteryLevel stats in child view when selecting devices

---------

Co-authored-by: Crotalus <crotalus@users.noreply.github.com>
2024-12-19 01:46:36 +01:00
eoineoineoin
70b7747fdd Make APC UI work correctly with multiple users (#32465)
* Make APC UI work correctly with multiple users

* Check access only on client, when constructing UI

* Do TODO (Thanks, Robust 236.1)

---------

Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
2024-10-12 19:21:43 +11:00
Pieter-Jan Briers
8385de8769 Fix powered machines working unpowered if the panel is open. (#32135) 2024-09-14 01:58:54 +02:00
James Simonson
ca1bfbf981 Add SetEntity(Owner) so can view APC sprite in UI (Bug fix) (#31962)
* Add SetEntity(Owner)  so can view APC sprite in UI

* bump apc version flavor text

---------

Co-authored-by: TIMMY <timmytriggers@cock.li>
2024-09-08 15:58:58 -06:00
Winkarst
88dcc831c1 Remove calls to FormattedMessage obsolete methods (#31706)
* Remove FormattedMessage obsolete methods

* Oops
2024-09-01 13:00:53 +02:00
Julian Giebel
417d3a87a2 Station Anchor (#26098)
* Work on abstracting out chargeup functionality/ui from grav gen

* Work on station anchor

* Finish implementing station anchors

* uhh yeah

* ok.

* fix tests

* whoops

* Get the last extraneous yaml fail

* PJB review

* beast mode... ACTIVATE!

---------

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
Co-authored-by: EmoGarbage404 <retron404@gmail.com>
2024-08-31 10:40:28 -04:00
metalgearsloth
a89d4c750b Power stuff (#31314)
* Power stuff

- Add shared IsPowered
- Add shared ResolveApc
- Move PowerChangedEvent to shared for now
- Add SlimPoweredLight that actually functions how you'd expect a PoweredLight to function it id didn't have a bunch of bloat on it.

* big update

* boing
2024-08-25 22:18:42 +10:00
Mervill
ec19f9f4a9 Make the powered examine text fully client predicted (#30441)
* Make the powered examine text fully client predicted

* switch to using the Entity<T> API for the examine event
2024-07-29 00:28:17 -07:00
metalgearsloth
edb05e36bb Reapply "Remove some BUI boilerplate" (#30214) (#30219)
* Reapply "Remove some BUI boilerplate" (#30214)

This reverts commit cb0ba66be3.

* Fix gas tank

* Fix PA

* Fix microwave

* Comms console underwrap

* Fix rcd

* log wehs
2024-07-21 14:48:13 +10:00
Nemanja
cb0ba66be3 Revert "Remove some BUI boilerplate" (#30214)
Revert "Remove some BUI boilerplate (#28399)"

This reverts commit cbf329a82d.
2024-07-20 20:42:27 -04:00
metalgearsloth
cbf329a82d Remove some BUI boilerplate (#28399)
* Remove some BUI boilerplate

- The disposals overrides got removed due to the helper method handling it.
- Replace window creation with CreateWindow helper.
- Fixed some stinky code which would cause exceptions.

* More

* moar

* weh

* done

* More BUIs

* More updates

* weh

* moar

* look who it is

* weh

* merge

* weh

* fixes
2024-07-20 15:40:16 +10:00
Nemanja
9348a5cea6 Apc & Substation resprite (#28998)
* substation

* apcs

* top pixels

* new screens
2024-06-16 05:43:22 -05:00
Partmedia
e633fe801b Widen power monitoring widget (#29062) 2024-06-15 21:06:54 -04:00
Kevin Zheng
ad1fc0cdba Adjust power monitor power display (#28487) 2024-06-01 16:56:57 -04:00
metalgearsloth
e4a5f2a145 Predict ActivatableUIRequiresPower (#28405)
A lot of BUIs aren't going to handle the state coming in cleanly but we can fix em as we find em.
2024-05-30 00:32:16 -07:00
ShadowCommander
e2bf127323 Move ApcPowerReceiverComponent Powered state to shared (#28206)
* Try syncing powered state to client

For some reason the client is not receiving the ApcPowerReceiverComponentState, so it's not working.

* Fix powered state not syncing to client

The client PowerReceiverSystem was abstract, which prevented it from
running initialize.

* Flip check so that it runs bigger checks first

PowerDisabled skips the others.
NeedsPower skips the receiving check.

* Disallow changing Powered manually

* Move Powered update to PowerReceiverSystem

* Move appearance to event subscription

* Move metadata component to AllEntityQuery

* Cleanup

* Move Powered update back to PowerNetSystem

It's easier to use the EntityQueries and it dosen't need to be updated
anywhere else.

* Put appearance updating back

* Move IsPowered to shared

* Simplify IsPowered

* Cleanup

* Remove duplicate PowerChangedEvent

PowerChangedEvent on ProviderChanged doesn't seem to be needed
PowerChangedEvent gets raised by in update if the power state changes
after a new provider is connected
2024-05-30 16:46:22 +10:00
Leon Friedrich
a7e6337cbd Replace NavMap dictionaries with int[] (#27602)
* Replace NavMap dictionaries with int[]

* Remove badly named const

* Remove unnecessary offset

* Prioritize airlocks
2024-05-02 12:51:21 +10:00
metalgearsloth
5896e68752 Content update for UI prediction (#27214)
* Content update for UI refactor

* Big update

* Sharing

* Remaining content updates

* First big update

* Prototype updates

* AUGH

* Fix UI comp ref

* Cleanup

- Fix predicted message, fix item slots, fix interaction range check.

* Fix regressions

* Make this predictive

idk why it wasn't.

* Fix slime merge

* Merge conflict

* Fix merge
2024-04-26 18:16:24 +10:00
chromiumboy
009d06d978 Navmap rework (#26713)
* Optimized the drawing of lines and tracked entities

* Optimized nav map updating and added thin wall support

* Added support for thin doors

* Removed floor tile seams, more line drawing optimizations

* Fixed split grids not updating correctly

* Cleaned up NavMapControl code

* Fix nav map header

* Converted nav map updates from system network messages to delta-states

* Addressed review comments

* Fixed timing issue where NavMapSystem would update before AirtightSystem did
2024-04-17 12:59:31 -05:00
metalgearsloth
c5486873db Shuttle console + FTL rework (#24430)
* Add shuttle interior drawing back

Just do it per-tile she'll be right, at least it's done with 1 draw call.

* Revamp shuttle console

* Bunch of cleanup work

* Lables sortito

* dok

* Pixel alignment and colours

* Fix a bunch of drawing bugs

* Shuttle map drawing

* Drawing fixes

* Map parallax working finally

* weh

* Commit all my stuff

* mic

* deez

* Update everything

* Xamlify everything

* uh

* Rudimentary blocker range

* My enemies have succeeded

* Bunch of changes to FTL

* Heaps of cleanup

* Fix FTL bugs

* FTL

* weewoo

* FTL fallback

* wew

* weh

* Basic FTL working

* FTL working

* FTL destination fixes

* a

* Exclusion zones

* Fix drawing / FTL

* Beacons working

* Coordinates drawing

* Fix unknown map names

* Dorks beginning

* State + docking cleanup start

* Basic dock drawing

* Bunch of drawing fixes

* Batching / color fixes

* Cleanup and beacons support

* weh

* weh

* Begin pings

* First draft at map objects

* Map fixup

* Faster drawing

* Fix perf + FTL

* Cached drawing

* Fix drawing

* Best I got

* strips

* Back to lists but with caching

* Final optimisation

* Fix dock bounds

* Docking work

* stinker

* kobolds

* Btns

* Docking vis working

* Fix docking pre-vis

* canasses

* Helldivers 2

* a

* Array life

* Fix

* Fix TODOs

* liltenhead feature club

* dorking

* Merge artifacts

* Last-minute touchup
2024-03-03 18:39:19 +11:00
SpeltIncorrectyl
5d2ddc0d8b Adds signal control to portable generators (#24157)
* added signal control to portable generators

* added documentation

* Discard changes to Content.Server/Radio/EntitySystems/HeadsetSystem.cs

* added DeviceNetworkComponent and WirelessNetworkConnectionComponent to generator prototype

* made GeneratorSignalControlComponent nicer

* implemented auto-revving

* added back necessary dependency

* can't send do-after event manually

* repeat now works with auto revving

* fixed

* removed vv

* stopping generating when it is revving now makes it stop revving

* Update Content.Shared/Power/Generator/ActiveGeneratorRevvingComponent.cs

Co-authored-by: Kara <lunarautomaton6@gmail.com>

* used resolve instead of TryComp

---------

Co-authored-by: Julian Giebel <juliangiebel@live.de>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2024-01-29 15:56:29 +01:00
Pieter-Jan Briers
f855cb2b00 Make PACMANs a little better (#24604)
* PACMAN generators show network load/supply.

This gives more feedback to players that their PACMAN is properly connected and what the network status is (i.e. you don't have enough generators).

* Buff JRPACMAN to 8 kW.

Shifted all power values up by +3 kW.

They're frequently too weak to power even single rooms so they deserve a buff.

* Change unit format helpers number format.

Always displays one digit of precision. This avoids jumping around when a value is changing live.
2024-01-26 21:53:43 -05:00
Errant
40db236b82 Navmap UI enhancements (#23777)
* label scaling wip

* beacon toggle, cleanup

* weh

* caw

* Smooth scaling, almost-selectable font size, Magnification count, zoom scale accuracy change, opacity

* never asked for individual font sizes

* zoom

* format

* Fixes CrewMonitor and PowerMonitor using the default tile color as text background instead of their custom tile colors

* font customisation, needs UI elements

* Station map rightclick now works

* UI scale will keep the local systems in line

* adjusting font size to UI scale

* typo

* fix RT version

* putting cache back in its place

* toggle labels moved to Examine
2024-01-14 16:08:43 +11:00
Errant
bda89918ff Station Map window edges (#24024) 2024-01-13 16:04:45 +01:00
chromiumboy
1de682e23f Power monitoring console overhaul (#20927)
* Prototyping whole station wire map

* More prototyping

* Added icons for the different power distributors and toggleable cable displays

* Power cable layouts are now only sent to the client when the power monitor is open

* UI prototyping

* Power monitors can now see the sprites of distant entities, long entity names are truncated

* Updated how network devices are added to the player's PVS

* More feature prototypes

* Added source / load symbols

* Final prototype! Time to actually code it properly...

* Start of code clean up

* Continuing code clean up

* Fixed UI appearance

* Code clean up complete

* Removed unnecessary changes

* Updated how power values are calculated, added UI warnings for power sinks and power net checks

* Updated how power values are calculated again, added support for portable generators

* Removed unnecessary files

* Map beacons start toggled off, console map now works outside the station, fixed substation icon

* Made some of Sloth's requested changes. Power distributors don't blink anymore, unless selected

* Moved a number of static variables in PowerMonitoringHelper to sensible places in the main files. Added a NavMapTrackableComponent so that you can specify how individual entities appear on the navmap

* Updated the colors/positions of HV cables and SMESes to improve contrast

* Fixed SMES color in map legend

* Partially fixed auto-scrolling on device selection, made sublists alphabetical

* Changed how auto-scroll is handled

* Changed the font color of the console warning messages

* Reduced the font size of beacon labels

* Added the station name to the console

* Organized references

* Removed unwanted changes to RobustToolbox

* Fix merge conflict

* Fix merge conflict, maybe

* Fix merge conflict

* Updated outdated reference

* Fixed portable_generator.yml

* Implemented a number of requested changes, move bit masks to a shared component

* Navigate listings via the navmap

* First attempt at improving efficiency

* Second attempt at optimization, entity grouping added for solar panels

* Finished solar panel entity joining

* Finished major revisions, code clean up needed

* Finializing optimizations

* Made requested changes

* Bug fix, removed obsolete code

* Bug fixes

* Bug fixes

* STarted revisions

* Further revisions

* More revision

* Finalizing revisions. Need to make RT PR

* Code tidying

* More code tidying

* Trying to avoid merge conflicts

* Trying to avoid merge conflicts

* Removed use of PVS

* Improving efficiency

* Addressed a bunch of outstanding issues

* Clear old data on console refresh

* UI adjustments

* Made node comparison more robust. More devices can be combined into one entry

* Added missing component 'dirty'
2023-12-24 17:07:41 +11:00
deltanedas
b6a8f5e780 Power switchable refactor (#20419)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-10-25 23:57:23 +11:00
daerSeebaer
f5ddbcf123 Fix APC turning invisible after emagging (#20245) 2023-09-23 11:27:51 -08:00
metalgearsloth
99b77bc2d3 Remove lights compref (#19531) 2023-09-11 19:18:06 +10:00
Kevin Zheng
4c73c8d3ef Change "Battery Power" to "Load" for APCs (#19766) 2023-09-03 10:24:24 -04:00
Pieter-Jan Briers
bf16698efa Portable Generator Rework (#19302) 2023-08-25 11:40:42 -07:00
Visne
c7b21b631b Remove unused dependencies (#19490) 2023-08-24 09:55:15 -08:00
DrSmugleaf
a88e747a0b Refactor serialization copying to use source generators (#19412) 2023-08-22 18:14:33 -07:00
Kara
1e65eea905 Fix some TEG code conventions (#19259) 2023-08-17 11:50:41 -07:00
Pieter-Jan Briers
a242af506e Adds the thermo-electric generator (#18840)
* Basic TEG start.

Connects via node group.

* Basic TEG test map

* Sensor monitoring basics, TEG circulator flow

* Basic power generation (it doesn't work)

* More sensor monitoring work

* Battery (SMES) monitoring system.

* Sensor monitoring fixes

Make it work properly when mapped.

* Test map improvements

* Revise TEG power output mechanism.

Now uses a fixed supplier with a custom ramping system.

* TEG test map fixes

* Make air alarms and pumps open UI on activate.

* Clean up thermo machines power switch.

Removed separate Enabled bool from the component that always matched the power receiver's state.

This enables adding a PowerSwitch component to give us alt click/verb menu.

* TEG but now fancy

* Make sensor monitoring console obviously WiP to mappers.

* Vending machine sound, because of course.

* Terrible, terrible graph background color

* Examine improvements for the TEG.

* Account for electrical power when equalizing gas mixtures.

* Get rid of the TegCirculatorArrow logic.

Use TimedDespawn instead. The "no show in right-click menuu" goes into a new general-purpose component.

Thanks Julian.

* Put big notice of "not ready, here's why" on the sensor monitoring console.

* TryGetComponent -> TryComp

* Lol there's a HideContextMenu tag

* Test fixes

* Guidebook for TEG

Fixed rotation on GuideEntityEmbed not working correctly.

Added Margin property to GuideEntityEmbed

* Make TEG power bar default to invisible.

So it doesn't appear in the guidebook and spawn menu.
2023-08-12 15:41:55 -05:00
Nemanja
2d08f02d23 Material generators from Afterlight (#18387) 2023-07-31 14:42:38 -04:00
TemporalOroboros
3ac4cf85db Cleaner BoundUserInterfaces (#17736) 2023-07-09 02:02:17 +10:00
metalgearsloth
68480af109 Update content vectors to numerics (#17759) 2023-07-08 14:08:32 +10:00
TemporalOroboros
0658acd7cb Resolves ApcVisualizer is Obsolete (#13898) 2023-05-07 22:17:29 -04:00
TemporalOroboros
6ff63a6ee7 Resolves SmesVisualizer is Obsolete (#13899)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-05-07 13:43:41 +10:00
TemporalOroboros
d78110bebd Resolves PowerDeviceVisualizer is Obsolete (#13900) 2023-04-22 19:37:40 +10:00
Slava0135
adb12676c6 replace apc panel with wires panel (#14832) 2023-04-20 16:42:22 +10:00
James Simonson
3bcd319ae4 Enhanced APC UI + New NT logo to footer (#14258) 2023-03-06 21:55:35 -04:00
Kevin Zheng
32b9a7b781 Add APC power meter (#14196) 2023-02-21 09:23:38 -06:00
Visne
5a5a3afbb1 Remove some obsolete AppearanceComponent method usages (#13726) 2023-02-02 12:34:53 -04:00