Commit graph

66 commits

Author SHA1 Message Date
Whatstone
a023e5784c
Cleanup: Remove byte order markers from most files (#45796) 2026-09-17 23:23:54 +10:00
Princess Cheeseballs
bb98838d67
Energy Bow Nerf (#44138)
* phase 1

* delayed knockdown

* brudda

* microbalance

* enrrhguy gjkasnnboew

* does nothing

* whoop

* fix YAML linter

* some more changes

* no discounts

* I hate ContainerContainer

* gorbino's quest

* asfassaffsa

* dgdgsdgsgds

* humburber

* better description

* make it a metabolite...

* nevermind

* API text

* grok

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2026-09-05 23:45:37 +00:00
Rouden
cc2c14f8e4
Device Network refactor part 1: API improvements (#44346)
* Refactor DeviceNetwork

* Singleton

* NetworkPayloads refactor

* Reorganize DeviceNetworkSystem

* Surveillance cameras

* Fix code

* Fix build

* Fix test fail by rewriting entire singleton logic

* Properly predict examine

* Update DeviceNetworkSystem.API.cs

* Update EntityTest.cs

* Update DeviceNetworkSystem.cs

* Alright I'll do this expensive check fine

* Fix disposals debug assert

* Implement device network static events support

* Use frozen dictionaries for performance

* Update SharedDeviceNetworkSystem.Payloads.cs

* Parallel payload handling support

* Fix some spagetti-code

* Optimize NetworkPayload cancellation

* Parallel payloads are now cancellable

* Fix screens

* Fix robotics console

* Allow new methods for shared

* Mail fix

* Turret fix

* Fix network system method usage + signal and borg fix

* finally fix atmos devices OH MY GOOOD

* Remove stupid parallelism from fax

* Fix surveiollance cameras

* Working on a single thing for 2 days straight award

* Fix the test?

* Update units.yml

* Add IDevice interface because why not

* Add more device network suffixes

* Fix camera router failing test

* yaml linter peak

* Improve docs for DeviceNetworkHandlers

* fix build

* Update CartridgeLoaderSystem.Relay.cs

* Remove parallel system and EntitySystem post init

* Add more docs and also events

* Remove unnecessary caching

* Update DevicePayloadComponentSystem.cs

* Back to entity events

* Implement DeviceData

* Remove serializable from payloads

* Update DeviceData.cs

* Add a prototype for a singleton

* Fix tests

* Fix air alarms

* Update DeviceNetworkSystem.cs

* Fix cameras

* Make camera router event-less

* Fix atmos sync payloads, add more docs

* Remove singleton + instant packets

* oops remove public access

* Fix tests?

* Why the hell overload effect makes puddle sparks

* Apparently it was redundant

* Update gates.yml

* Finish documentation

* Review

* Mark relay properties as obsolete

* Struct payloads support (#blazinglyfastmemorysafe)

* Update DeviceNetworkTest.cs

* Make device structs stuff better

* Move address prefix to DeviceNetworkComponent

* Locale fixes

* Fix tests

* Doesn't know boolean logic award

* Update AtmosAlarmableSystem.cs

* Fix address predicted examine

* Partial fix to air alarmables

* Fix deployable turrets UI

* Fix firelocks, maybe

* Apparently Activatable UI was enough lol

* Fix surveillance cameras

* Rename `QueuePacket` into `SendPacket`

* Simplify DeviceData as much as possible

* Update DeviceData.cs

* Update FaxMachineComponent.cs

* Remove DeviceData because its stupid

* Update ScreenSystem.cs

* Fix build (camera map broken still)

* Fix map

* fix usings

* Review changes

* Build fix
2026-08-31 19:42:56 +00:00
Whatstone
06812eed97
Rate limit emitters, only raise PowerStateChanged on a change in state. (#45514)
* rate limit the emitter

* Reset AlertRadioIfWasWorking to void
2026-08-21 08:20:36 +00:00
Fildrance
1a5e9acb24
Extract notify on non-functioning from emitter (#45346)
* refactor: extracted notify-on-non-functioning feature from emitter component

* refactor: revert server side PowerStateSystem usage of SubscribeLocalEvent - it is not calling base Initialize, skip SetWorkingState raising event on init

* refactor: ensureAPC is now conditional for powerstate

* refactor: fix double notifiation on destruction and on un-powering for emitter

* refactor: added LocTurnedOff for NotifyOnNonFunctioningComponent, fix double alert on destruction, removed emitter-deconstructed-broadcast as it is unused (cannot deconstruct withou unanchor)

* refactor: modernize server PowerStateSystem subscription

* refactor: update and modernize PowerStatePrototypeTest

* refactor: give APE specific radio message upon unlocking

* refactor: extracted PowerStateSystem.SetPowerLoad to split init from triggering is-working change event

* Update Content.Server/Power/EntitySystems/PowerStateSystem.cs

---------

Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
2026-08-16 23:08:58 +00:00
Samuka
838984971c
Xenoborg guided missile (#45247)
* update math

* target finder system

* ports

* guns with projectiles

* make sure

* custom sprites for the laser

* add auto link

* add module

* sprite for the missile

* update animation speed

* ops

* make it glow

* overlay sprite

* stuff that doesn't work

* update launcher

* fix it

* make it see from far

* make it work

* sprite for the module

* 30 seconds is too much

* sprite for the range finder

* why was that here?

* update sprite of the missile

* update module icon

* ops

* update missile and missile launcher

* make it look like the launcher item

* remove ammo counter from range finder

* increase to 15 seconds

* no longer show the battery percentage

* use comp

* change summary

* ops

* new line

* make it last longer

* commentary

* acme moment

* fix bug when shooter was also the target and the projectile wouldn't move

* empty commit

* fix test fail

* replace with global behavior

* forgot to remove from the yml

* important

* check to see if the target exists

* fix autorefill bug

* remove unused system

* make it reload a tad slower

---------

Co-authored-by: beck-thompson <beck314159@hotmail.com>
2026-08-16 05:10:57 +00:00
DrSmugleaf
65f5f67cd5
Make every EntitySystem partial (#45220)
* Make every EntitySystem partial

* Oobs thats for a diff PR

* Also oops on that one

* Test systems

* git are we fr

* Update file templates

* cleanup empty classes while we are here

* forgor

---------

Co-authored-by: AJCM-git <ajcm_mail@disroot.org>
2026-08-14 18:24:47 +00:00
Samuka
4c65a777a8
Xenoborg crystal (#45105)
* verb category

* voltage toggle comp

* move stuff

* add simple prototype

* implement verb action

* switch expression

* fixed the node not updating

* charge the battery

* fixed battery not charging

* spawn on battery level system

* finally works

* swap commentary position

* can only anchor the extractor on the station

* popup message for trying to anchor outside of station

* default placement for unanchored version

* ops

* fix body type

* commentary

* update visuals of power consumer

* add custom sprite

* fix light layer not changing

* xenoborg circuit

* fix xenoborg circuit

* add tag

* add hand to hold xenoborg circuits

* move to material

* add xenoborg circuit material

* add recipe to mothership core

* add a hand to hold circuits to the mothership core

* to not confuse

* update

* ops

* another ops

* update mothership

* update guidebook

* update values

* more info

* fix stack

* can store xenoborg circuits

* description

* also update description

* circuit -> crytal

* not modified from anything

* update description

* Revert "update mothership"

This reverts commit 84974c56afadac2a99ed2a166244a668d83fff48.

* update empty label

* small update to sprite

* not necessary code

* remove empty line

* color

* make it explode when destroyed

* change values

* update sprite

* update sprite

* make it eletrified

* flavor text

* simplify to only use charge

* subscribe to event

* new line

* remove popup

* no need for the setter

* no longer networked

* feedback popups

* Minor tweaks

* better to understand

* better now?

* double the amount of power per crystal

* ajust power levels

* make modules cost more

* update guidebook with new values

* add popup back

* i love solving merge issues

* remove readonly

* use Transform

* predict verb

* only do stuff if both comps are present

* newline

* fix popup

* remove string.empty

* better voltage comment

* remove indentation from comment

* comment

* break the extractor

* fix comp

* change to protected

* add a client system

* make the component with the biggest name ever

* fix the anchor fail message popup

* kill this thing

* update the proto

* revert changes to PowerNetSystem

* ops

* make it spawn some gas when it explodes

* can't discharge

* comment was wrong

* swap order of components

* set examinable to false

* examine text

* rename AnchorableSystem to SharedAnchorableSystem

* rename file and make it abstract

* server side anchor system

* ops

* client anchor system

* use server anchorable system in server

* use battery visuals

* use a helper method

* revert changes to anchorable system

* new system

* new line

* ops, not used

* ops

* fix battery visuals

* set CableDeviceNode as not enabled

* set setting on map init

* enough feedback for the mothership

* new line

* locale changes

* locale changes to SharedPowerNetworkBatteryChargerVoltageTogglerSystem

* change name (again)

* update comments

* add event

* raise a event

* use events

* use a method instead of just raising the event

* more subscriptions to the voltage change event

* update locale stuff

* upgrade voltage toggler system with stuff from the power switch system

* replace power switch with voltage toggle in generator window

* replace power switch with voltage toggle in SharedPortableGeneratorSystem

* replace power switch with voltage toggle in power sensor

* KILL POWER SWITCHABLE COMPONENT AND SYSTEM

* replace power switch with voltage toggle in PortableGeneratorSystem

* replace all PowerSwitchable for VoltageToggler in the prototypes

* nullable switch text

* not required anymore

* mistake with the yml

* fix some issues with locale

* opposite

* i don't have words

* only use delay if it has the delay comp

* revert this change

* revert this change

* revert this change

* revert this change

* add color

* comment

* use another component

* fix the alert not showing

* generic comp for powernetwork battery and power consumer

* rename events

* fix proto

* make it less efficient

* change how it displays the rogue power thingy

* Comp is evil

* comment

* use resolve

* loc id

* error

* one line

* move this stuff to the voltage toggler system

* revert changes to PowerNetConnector

* revert changes to NodeContainerSystem

* revert changes that mess with PowerSupplierComponent

* revert changes to SharedBatterySystem

* revert changes to server BatterySystem

* revert changes to PowerMonitoringConsoleSystem

* remove whitespace

* guess it was 2 lines

* remove this from PowerNetworkBatteryComponent

* PowerConsumerBatteryCharger

* remove charging behavior from power sink system

* add new component to power sink

* extractor now uses power consumer comp

* update PowerDeviceVisuals.Powered for power consumers that are recieving power

* use PowerDeviceVisuals.Powered instead of BatteryVisuals.Charging

* PowerConsumerBatteryChargerEfficiencyVoltageTogglerComponent

* change values

* Orks micro balance

* me when i forget to change the actual value

* change values in the guidebook

* use a event

* move efficiency to the powerconsumer component

* ops

* revert this random change

* remove mapinit

* move to one line

* remove try comp

* update event

* this is important

* use a entity table

* only one line

* use the entity table

* use the current body crusher proto

* update guidebook

* say that it changes the efficiency

* Improve guidebook wording.xml

Co-authored-by: korczoczek <danielkorczok@gmail.com>

* remove random whitespace

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* style stuff

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* make AnchorOnlyOnStationComponent networked

* better wording

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* Prettier

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* fix stack text

* give option to be anchored on any station member

* use 4 spaces

* use stuff from the other PR

* revert this change

* remove power toggle things

* idk

* use a update loop

* revert locale changes about the voltage toggler

* remove mentions of voltage toggling

* ops

* fix proto

* remove white line

* revert this

* move efficiency to PowerConsumerBatteryCharger

* revert rider suggestion

* custom sprite for extractor flatpack

* use a new enum

* make it destructible

* cleanup

---------

Co-authored-by: beck-thompson <beck314159@hotmail.com>
Co-authored-by: korczoczek <danielkorczok@gmail.com>
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Co-authored-by: ScarKy0 <scarky0@onet.eu>
2026-08-13 00:49:37 +00:00
Whatstone
56c459e98c
Make more ApcPowerReceiverComponent fields DataFields (#45022)
* Dirty ApcPowerReceiver if state doesn't match defs

* surely this will work and isn't massive hubris

* SPACE

* docs & comments

* voltage, not charge

* no space

* jfc
2026-07-30 05:10:39 +00:00
Whatstone
23e63fac32
Hotfix: Fix mistaken AudioParams.WithVariation calls + LockComponent cleanup (#44952)
* Fix mistaken WithVariation calls

* gonna fix that stupid hue test one of these days
2026-07-27 00:23:46 +00:00
Stanislav
b22d38f9c0
Yaml audio params are often ignored (#36259)
* Replace WithVolume() with AddVolume(),
Remove AudioHelpers.WithVariation(),
Use specifier options for audio params

* Undo switching to AudioParams.AddVariation()

* Replace AudioHelpers.WithVariation with AudioParams.AddVariation()

* Test AudioParams.AddVariation() and change input parameters to sound like previous AudioHelpers.WithVariation()

* Fix build error

* Fix build error v2

* Remove DoAfter

* fixes

---------

Co-authored-by: AJCM-git <ajcm_mail@disroot.org>
2026-07-25 16:16:23 +00:00
slarticodefast
0552b28cf5
cleanup all popups on client and server (#44572)
* cleanup popups on client and server

* fix RDC BUI
2026-07-11 14:13:19 +00:00
Pieter-Jan Briers
5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00
ArtisticRoomba
376f16504c
Content.Shared EntityQuery<T> dependency injection refactor (#43498)
* part 1

* second pass

* final fix

* last fix i swear

* an even bigger genius

* regex missed this

* should be all of em?

* oops

* yeah

* Revert "should be all of em?"

This reverts commit 4dd54d1b9a76977b4cf8d6008358e4dacdee6eb1.

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2026-04-11 21:30:36 +00:00
ArtisticRoomba
1b1cb64d24
Power Consumers Rebalance: Simple Dynamic Power Loading (#41961)
* initial commit

* misc additions and fixes

* final tests and additions

* cleanup 1

* fix tests and add a test

* fix tests AGAIN

* abject horror and misery

* cleanup

* cleanup 2

* address some issues
2026-01-21 04:05:44 +00:00
ArtisticRoomba
dde01f746f
Basic Dynamic Power Consumption Systems (#41885)
* init commit

* Addr reviews
2025-12-22 16:43:02 +00:00
slarticodefast
3266c94eac
Unify BatteryComponent and PredictedBatteryComponent (#41867)
* unify

* cleanup and merge conflicts

* floating points

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-12-19 18:18:12 +00:00
slarticodefast
86f4795849
Fix rigged power cells exploding early (#41813)
* fix riggable

* fix
2025-12-10 10:28:28 +00:00
Pok
8db29b4e87
Helper method for get charge level (#41601)
* get-charge-percent

* review
2025-11-27 17:52:02 +00:00
slarticodefast
2330136abf
Fix helmet lights (#41599)
fix helmet lights
2025-11-27 16:01:13 +00:00
slarticodefast
e2ff167062
Predict powercells, chargers and PowerCellDraw (#41379)
* cleanup

* fix fixtures

* prediction

* fix test

* review

* fix svalinn visuals

* fix chargers

* fix portable recharger and its unlit visuals

* fix borgs

* oomba review

* fix examination prediction
2025-11-24 16:52:11 +00:00
slarticodefast
7155d0d291
Cleanup BatterySystem (#41298)
* cleanup

* fix fixtures

* this belongs into the next PR

* review

* misc

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2025-11-08 20:55:02 +00:00
Princess Cheeseballs
24216b1bc8
Fix Ninja EMP themselves. (#40968)
* push

* Skibidi toiler

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-10-18 23:56:32 +00:00
slarticodefast
5227489360
Predict EMPs (#39802)
* predicted emps

* fixes

* fix

* review
2025-10-04 11:24:42 +00:00
IProduceWidgets
80947b128a
Add explosive cord. (#25875) 2025-09-25 23:33:28 +02:00
Winkarst-cpu
1f4dfcdcf9
Predict GetVerbsEvent in PowerSwitchableSystem (#39589)
* Prediction

* Update
2025-08-13 09:54:02 +02:00
metalgearsloth
fd52f698c7
Predict PoweredLights (#36541)
* Move PoweredLight to shared

* Predict the rest of the owl

* reacher

* compinit & anim

* Fix names

* Revert this?

* Fix these

* chicken drummies

* deita

* Fix

* review

* fix

* fixes

* fix PVS weirdness

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-08-11 23:06:28 +02:00
UpAndLeaves
229f33f22a
Voltage enum to shared (#38964) 2025-07-13 23:13:01 -07:00
metalgearsloth
df2257cd92
Predict gasthermomachines (#33837)
* Predict gasthermomachines

* despawn

* smellby
2025-05-13 21:49:43 +10:00
Pieter-Jan Briers
ffe130b38d
Battery (SMES/substation) interface (#36386)
* Add ENERGYWATTHOURS() loc function

Takes in joules (energy), displays as watt-hours.

* Add simple OnOffButton control

* Re-add Inset style class

This was sloppily removed at some point?? Whatever, I need it.

* Add helper functions for setting title/guidebook IDs on FancyWindow

Reagent dispenser uses these, more in the next commits.

* Add BuiPredictionState helper

This enables me to implement coarse prediction manually in the battery UI.

Basically it's a local buffer of predicted inputs that can easily be replayed against future BUI states from the server.

* Add input coalescing infrastructure

I ran into the following problem: Robust's Slider control absolutely *spams* input events, to such a degree that it actually causes issues for the networking layer if directly passed through. For something like a slider, we just need to send the most recent value.

There is no good way for us to handle this in the control itself, as it *really* needs to happen in PreEngine. For simplicity reasons (for BUIs) I came to the conclusion it's best if it's there, as it's *before* any new states from the server can be applied. We can't just do this in Update() or something on the control as the timing just doesn't line up.

I made a content system, BuiPreTickUpdateSystem, that runs in the ModRunLevel.PreEngine phase to achieve this. It runs a method on a new IBuiPreTickUpdate interface on all open BUIs. They can then implement their own coalescing logic.

In the simplest case, this coalescing logic can just be "save the last value, and if we have any new value since the last update, send an input event." This is what the new InputCoalescer<T> type is for.

Adding new coalescing logic should be possible in the future, of course. It's all just small helpers.

* Battery interface

This adds a proper interface to batteries (SMES/substation). Players can turn IO on and off, and they can change charge and discharge rate. There's also a ton of numbers and stuff. It looks great.

This actually enables charge and discharge rates to be changed for these devices. The settings for both have been set between 5kW and 150kW.

* Oops, forgot to remove these style class defs.
2025-04-27 21:08:34 +10:00
metalgearsloth
63dfd21b14
Predict dumping (#32394)
* Predict dumping

- This got soaped really fucking hard.
- Dumping is predicted, this required disposals to be predicte.d
- Disposals required mailing (because it's tightly coupled), and a smidge of other content systems.
- I also had to fix a compnetworkgenerator issue at the same time so it wouldn't mispredict.

* Fix a bunch of stuff

* nasty merge

* Some reviews

* Some more reviews while I stash

* Fix merge

* Fix merge

* Half of review

* Review

* re(h)f

* lizards

* feexes

* feex
2025-04-19 16:20:40 +10:00
chromiumboy
dfd3e36a0a
Sentry turrets - Part 4: The sentry turret and its primary systems (#35123)
* Initial commit

* Removed mention of StationAiTurretComponent (for now)

* Prep for moving out of draft

* Fixing merge conflict

* Re-added new net frequencies to AI turrets

* Removed turret control content

* Removed unintended change

* Final tweaks

* Fixed incorrect file name

* Improvement to fire mode handling

* Addressed review comments

* Updated how turret wire panel auto-closing is handled

* Ranged NPCs no longer waste shots on stunned targets

* Fixed bug in tracking broken state

* Addressed review comments

* Bug fix

* Removed unnecessary event call
2025-03-29 12:55:58 -05:00
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
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
chromiumboy
066c773965
Sentry turrets - Part 2: Basic prototype (#35031) 2025-02-24 00:39:44 +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
slarticodefast
4704309b4e
Fix SpawnAndDeleteAllEntitiesInTheSameSpot heisentest (#32330)
What happened was that the new tech anomaly randomly triggered a signal sink on the portable generator, which is currently broken and throws an error if the that sink is activated.

The resolve needed logMissing = false because it does not expect the ActiveGeneratorRevvingComponent to exist.
2024-10-12 11:54:48 -07:00
Fildrance
4bcf3c3c0e
Station AI ability to electricute doors (#32012)
* Boom! Emergency access!

* Emergency access sound

* locale

* Updated sounds

* bleh

* Door electrify base

* feat: popups on attempt to activate AI action when wires cut

* refactor: use SharedApcPowerReceiverComponent to check if AI can interact with door

* refactor: added icon and sound for door overcharge

* meta.json should use tabs not spaces

* refactor: extracted sounds for airlock overcharge to static field in system

* refactor: cleanup, ScarKy0 mentions for resources

* refactor: removed unused textures

* feat: now notification is displayed when AI attempting to interact with door which have wire cut

* StationAiWhitelistComponent is properly gating  BUI OnMessageAttempt, SharedPowerReceiverSystem.IsPowered is now used to check if device powered

* refactor: use PlayLocal to play electrify sound only for AI player

* refactor: SetBoltsDown now uses TrySetBoltDown, checks for power.

* bolts now check for power using SharedPowerReceiverSystem

* electrify localization and louder electrify sounds

* extracted ShowDeviceNotRespondingPopup, reverted airlocks not opening/closing when ai wire was cut

* refactor: cleanup

* New sprites and fixes

* Copyright

* even more sprite changes

* refactore: cleanup, rename overcharge => electrify

---------

Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-09-27 17:22:17 +10:00
Tayrtahn
320135347f
Add guidebook protodata tag: embed prototype values in guidebook text (#27570)
* First clumsy implementation of guidebook protodata

* Support for Properties, format strings

* Better null

* Rename file

* Documentation and some cleanup

* Handle errors better

* Added note about client-side components

* A couple of examples

* DataFields

* Use attributes like a sane person

* Outdated doc

* string.Empty

* No IComponent?

* No casting

* Use EntityManager.ComponentFactory

* Use FrozenDictionary

* Cache tagged component fields

* Iterate components and check if they're tagged
2024-09-12 13:31:56 +03: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
c0a07614c0
ItemToggle + slots stuff (#31312)
* ItemToggle + slots stuff

- Add component for itemslot locks to match LockComponent (surprised this didn't exist).
- Add thing for pointlight to match itemtoggle. In future should be used for PDAs and stuff but need to fix some other stuff first.

* Also this

* grill
2024-08-25 22:30:28 +10: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
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
Pieter-Jan Briers
68ce53ae17
Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper

Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.

This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.

* Fix a bunch of warnings

* More warning fixes

* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.

* Get rid of some more ISerializationHooks for enums

* And a little more

* Apply suggestions from code review

Co-authored-by: 0x6273 <0x40@keemail.me>

---------

Co-authored-by: 0x6273 <0x40@keemail.me>
2024-02-13 16:48:39 -05: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