Commit Graph

28 Commits

Author SHA1 Message Date
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
DrSmugleaf
a136616531 Replace Component.OnRemove with ComponentRemove event subscriptions (#21072) 2023-10-17 19:35:36 -07:00
metalgearsloth
279674c0b3 Revert "Make lights dim under low power" (#19708) 2023-09-01 09:47:30 +10:00
Kevin Zheng
f8bdfd6d26 Make lights dim under low power (#19317)
* Make lights dim under low power

* Slightly more dramatic curve
2023-08-22 20:29:10 -05:00
DrSmugleaf
a88e747a0b Refactor serialization copying to use source generators (#19412) 2023-08-22 18:14:33 -07:00
keronshb
42745b1c6e Conveyor Belt optimization and prediction (#12929)
* belt multithreading

* moves away from multithreading and changes setting awake directly to physics system method

* prediction for conveyors

* Fixes missing reference in FaxSystem

* Fixes oddities

* Adds networked to conveyor components

* Some more cleanup.

* reverts power change event

* Removes the event, fixes a file

* Should fix the rest of the weird additions

* More cleanup to fix extra files

* Fixes again

* fix

* fixes fax system

* Adds component state, cleans up the dependencies

* Checks for prediction

* Merge conflicts

* powa

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-02-13 12:20:39 +00:00
metalgearsloth
0b38589728 Raise power events by ref and not broadcast (#11923)
Also some other minor stuff.
2022-10-14 23:08:15 -05:00
Flipp Syder
2c6158e115 Wires refactor (#7699)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2022-05-06 12:35:06 +10:00
Leon Friedrich
2777d2ef64 Update PowerChangedEvent (#7503)
* Update PowerChangedEvent

* Comments
2022-04-13 23:50:42 +10:00
Rane
7900abb888 Literally Murder IExamine (#7352) 2022-04-08 14:17:25 -07:00
metalgearsloth
49163f1dec Nuke PowerChangedMessage (#7231) 2022-03-28 09:58:51 -07:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
wrexbe
17db0775c8 Auto comp (#6416) 2022-02-02 14:35:40 +11:00
Paul Ritter
cc57d1380c Revert Rich text (#5848) 2021-12-20 12:42:42 +01:00
E F R
b2da936848 Everything: Rich text redux (#5625)
* lord save me

* UI/ChatBox: Use the new `defStyle` param for `RenderMarkup`

The previous iteration didn't work because `AddMessage` can't inherit
its color from the PushColor (since we're not doing actual tag stacks
anymore).

* rebase touchup
2021-12-12 18:25:42 -08:00
Vera Aguilera Puerto
cdc8336695 Even more resolve removals. 2021-12-08 17:41:14 +01:00
Vera Aguilera Puerto
5cd42c9ad6 Inline UID 2021-12-03 15:53:09 +01:00
Vera Aguilera Puerto
69b270017b Inline TryGetComponent completely, for real 2021-12-03 14:17:01 +01:00
Vera Aguilera Puerto
5e177ae734 Inline EntityManager 2021-12-03 11:18:05 +01:00
Acruid
fa0ec5cbd9 AppearanceComponent API Changes (#5446) 2021-11-23 18:22:59 +11:00
Pieter-Jan Briers
059fa9ae48 Gravity generator rewrite (#4828)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2021-11-02 11:12:55 +11:00
Visne
c67160ae19 Disable warnings that would be refactored anyway (#5047) 2021-10-27 18:10:40 +02:00
Julian Giebel
d1a830cd74 Fix ApcPowerReceiverComponent deletion (#5031)
Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
2021-10-25 21:55:00 +02:00
Julian Giebel
45caf25ea9 Apc device network and apc based light switch (#4908)
* Remove WireNet node group from cables
Implement extension cable components and system
Remove connection over distance logic from ApcPower... components

* Add extension cable components to prototypes

* Implement ApcNetwork
Implement ApcNetSwitch

* Fix ignoredComponents.cs

* Add friend attribute to new components

* Add construction graph for a light switch

* Address reviews

* Fix broken test

* Move ConnectionType enum to DeviceNetworkComponent
Change netId data definition to use the ConnectionType enum values

Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
2021-10-23 16:23:19 -07:00
metalgearsloth
ad783396f8 Update CloseTo to CloseToPercent (#4708) 2021-09-29 20:07:01 +10:00
Visne
b7dc3c81ae Remove redundant #nullable enable (#4275) 2021-07-16 17:37:09 -07:00
metalgearsloth
fc9a15b288 Eventbus event for ApcPowerReceiver powered 2021-07-16 12:41:01 +10:00
Pieter-Jan Briers
103bc19508 Pow3r: stage 1 (#4208)
Co-authored-by: 20kdc <asdd2808@gmail.com>
2021-07-04 18:11:52 +02:00