Commit Graph

24 Commits

Author SHA1 Message Date
Pieter-Jan Briers
73df3b1593 Stop network serializing prototypes (#38602)
* Stop network serializing prototypes

Send the damn proto ID instead.

* Fix sandbox violation
2025-06-26 19:27:23 -04: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
Tayrtahn
86aa82f2b6 Cleanup: Remove redundant prototype name specifications (#35793)
* Remove redundant prototype name specifications

* These can stay
2025-03-19 19:30:31 +01:00
Tayrtahn
e33f0341ad Code cleanup: radio jammer (#29052)
* Code cleanup for radio jammer

* More Entity<T> for the people, and fix an accidental variable reuse
2024-06-20 01:13:40 +10:00
metalgearsloth
13c6537842 Fix network configurator memory leaking (#27346)
* Fix network configurator memory leaking

Doesn't dispose this window.

* Fix the other part
2024-04-26 20:36:57 +10:00
nikthechampiongr
266cc85f57 Create DeviceNetworkJammerComponent & System as a general way for entities to act as jammers (#26342)
* Add DeviceNetworkJammerComponent & System

Allows for entities to "jam" DeviceNetwork packets.

Whenever a device attempts to send a packet, the
DeviceNetworkJammerSystem listens for the BeforePacketSentEvent.
From there if any entity with the jammer component is within range of
either the sender or receiver of the packet the event will be cancelled.
Additionally jammers can only block packets in certain networks. If a
packet is not being transmitted in one of the networks it can block then
even if the jammer is in range the event will not be cancelled.

The range is stored in the jammer component along with the networks it
can jam.

Jammable network ids are stored as strings which seems to be how custom
networks are stored (E.g. network ids for suit sensors).

To allow for all of this, the BeforePacketSentEvent was modified to
provide the NetworkId.

* Make JammerSystem for the radio jammer use the DeviceNetworkJammer. Remove redundant event.

* Replace calls to TryDistance with InRange
2024-03-24 21:59:16 -04:00
deltanedas
f41ece37c3 make linking logic gates 1000% better (#25041)
* make door status use SendSignal

* LastSignals and logic, add ClearSignal api too

* make everything outputting a logic signal default to false

* refactor ops

* :trollface:

* :trollface:

* protoid for LastSignals

* oop

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2024-02-11 23:45:51 -07:00
metalgearsloth
05a2ddff1c Predict two-way levers (#25043)
* Predict two-way levers

Annoys me the rare occasions I touch cargo. Doesn't predict the signal but at least the lever responds immediately.

* space

* a
2024-02-11 14:19:45 +11:00
Leon Friedrich
0b803e5f8d Try fix invalid entities in device networks (#22845)
* Try fix invalid entities in device networks

* more fixes

* a

* fix device merging
2023-12-21 21:18:40 -07:00
DrSmugleaf
2d58d19b07 Make all prototype types partial (#21374) 2023-11-01 19:56:23 -07:00
DrSmugleaf
a44fa86b68 Update trivial components to use auto comp states (#20539) 2023-09-28 16:20:29 -07:00
metalgearsloth
5a0fc68be2 Content update for NetEntities (#18935) 2023-09-11 09:42:41 +10:00
DrSmugleaf
a88e747a0b Refactor serialization copying to use source generators (#19412) 2023-08-22 18:14:33 -07:00
Julian Giebel
2bb1fde4dc Remove devices from device lists when they get deleted (#16783)
* Implement device network device shutdown subscribtion
Implement removing devices from device lists when they get deleted

* Improve name and doc comment for DeviceShutDownEvent

* Change ShutdownSubscriber data field tag

* Change UpdateRemovalSubscription name to UpdateShutdownSubscription
2023-05-25 16:08:22 -06:00
Julian Giebel
2d273107f4 Implement automatic mode switching for the network configurator and multitool (#16603) 2023-05-22 23:20:53 +10:00
Julian Giebel
5c86778fff Fix network configurator verbs and misc fixes (#16210) 2023-05-07 20:58:12 +10:00
Julian Giebel
6ebd784cb6 Device Linking and better linking ui (#13645)
Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
Co-authored-by: Visne <39844191+Visne@users.noreply.github.com>
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-05-07 16:07:24 +10:00
Visne
c6d3e4f3bd Fix warnings and code cleanup/fixes (#13570) 2023-01-19 13:56:45 +11:00
Flipp Syder
8389bde2c0 Clear and reregister devices for atmos alarms (#11391)
* deregister sensors upon device list update and re-register after clearing devices

* fire alarms, too

* adds the last set of known devices to the device list update event

* update UI upon clearing everything out

* addresses reviews
2022-10-01 09:36:59 -07:00
Flipp Syder
ec6cdbd51a Removes hacky behavior from DeviceListSystem (#11255) 2022-09-14 16:09:43 +10:00
Flipp Syder
c3d7ecace6 Adds a link limit and UI to device list (#11017)
* adds a link limit to device list

* locale strings

* uhhh what's efcore doing there

* adds a UI for device list on the device

* merge conflict fixing
2022-09-05 18:22:39 -07:00
Flipp Syder
9ace52a6c1 Device link visualizer (#11054)
* shuffles devicelist to shared, adds an overlay for devicelist

* adds space property to overlay

* moves networkconfigurator to shared, makes devicelistsystem clientside check activedevicelist

* dirties components upon change, adds networkedcomponent to sharednetworkconfigurator

* state handlers for networked components

* whoops

* lots of shuffling, renaming, and access changes

* randomizes color for every new entity added to the overlay

* adds a client-side action to clear all network overlays if they're active

* clones action (oops)

* localization, adds a command for clearing network link overlays (in case the action disappears)

* moves the entity manager up into the bui fields

* makes that a dependency

* attempts to just directly get the color from the dict when drawing, now

* fixes up a few comments

* adds dirty on init to devicelistcomponent

* hacky solution related to mapping with a networkconfigurator

* more stricter bound on that hacky solution

* just checks if the life stage is initialized instead of if the entity was initialized

* moves getalldevices to shared

* readds linq import

* tries to ensure that the show button is toggled on if the device we're trying to configure is currently being tracked by the overlay

* some reorganization
2022-09-05 19:55:44 -05:00
Julian Giebel
f4be8b5793 Device network DeviceLists and the NetworkConfigurator (Makes air alarms usable) (#7697)
* Implement DeviceList
Implement NetworkConfigurator
I sould really get into the habit of making smaller commits

* Remove ApcNetworkComponent from vents, scrubbers anf firelocks

* Change BeforeBroadcastAttemptEvent#Recepients to readonly IReadonlySet and add a ModifiedRecepients field

* Address revievs in NetworkConfigurationSystem

* Fix red and green button styles

* Change NetworkConfiguratorSystem#UpdateState to remove saved entites that don't exist anymore

* Add AtmosDevices device net id

* Add const strings for style classes
Fix wrong margin for NetworkConfiguratorConfigurationMenu

* Hello? Github?

* Add access check before opening the configuration ui

* Address reviews

* Fix call to access reader

* You shall not live again IgnoreComponent

* Fix interaction verb check

* Fix configuration window not closing when target gets deleted / out of range

* Change device is already saved message to say 'network device: ... is already saves'

* Apply suggestions from code review

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

* Fix applied suggestion

Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
2022-06-09 18:28:24 -07:00
Leon Friedrich
a4d55235cc Rejig Device networks (#7380) 2022-04-08 22:27:10 +10:00