Commit graph

30 commits

Author SHA1 Message Date
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
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
TemporalOroboros
84b2f07157
The IMapManager is dead (#44002)
* Axes the easy IMapManager references

* Axes the references to unported (obsolete) IMapManager methods

* Converts salvageruler command to a LocalizedEntityCommand so it can use SharedMapSystem

* Removes IMapManager from GameTicker
This required axing the map nuke during restart, but that should be fine?
Maps are entities so EntityManager.FlushEntities should delete them all and that's the preceding line

* submodule update(?)

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2026-07-01 20:44:54 -07:00
Moony
d42adbf05d
Gametest Part 2: Preliminary refactor every test to use GameTest as the framework. (#43207)
* Pass 1.

* i'm FREE

* Prevent hangups.

* okay fine here's an attribute for settings, will polish later and prolly remove the overridable thing.

* sigh.

* fix singular trigger bug so LatheTest doesn't flake.

* Remove SystemAttribute usage.

* Poke

* I used the shotgun. You know why? Cause the shot gun doesn’t miss, and unlike the shitty hybrid taser it stops a criminal in their tracks in two hits. Bang, bang, and they’re fucking done. I use four shots just to make damn sure. Because, once again, I’m not there to coddle a buncha criminal scum sucking f------, I’m there to 1) Survive the fucking round. 2) Guard the armory. So you can absolutely get fucked. If I get unbanned, which I won’t, you can guarantee I will continue to use the shotgun to apprehend criminals. Because it’s quick, clean and effective as fuck. Why in the seven hells would I fuck around with the disabler shots, which take half a clip just to bring someone down, or with the tazer bolts which are slow as balls, impossible to aim and do about next to jack shit, fuck all. The shotgun is the superior law enforcement weapon. Because it stops crime. And it stops crime by reducing the number of criminals roaming the fucking halls.

* Change the faulty store test into two tests, one of which is ignored for failing.
2026-04-01 16:06:26 +00: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
ElectroJr
3a8249e5fd Un-revert #26994 2024-04-20 17:01:15 -04:00
Vasilis
5769bf38f8
Revert #26994 and #27077 (#27090) 2024-04-18 17:06:56 +02:00
Leon Friedrich
ee96d8aa66
Content changes for MapManager/System refactor (#26994)
* Content changes for MapManager/System refactor

* Poke Tests

* Why is this failing?

* Will this make the analyzer happy?
2024-04-18 14:30:06 +10: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
Pieter-Jan Briers
a6c9c36b68
Dependency update / fixes / skrungle bungle (#23745)
* Give .props files 2-space indents.

* Move to Central Package Management.

Allows us to store NuGet package versions all in one place. Yay!

* Update NuGet packages and fix code for changes.

Notable:

Changes to ILVerify.
Npgsql doesn't need hacks for inet anymore, now we need hacks to make the old code work with this new reality.
NUnit's analyzers are already complaining and I didn't even update it to 4.x yet.
TerraFX changed to GetLastSystemError so error handling had to be changed.
Buncha APIs have more NRT annotations.

* Remove dotnet-eng NuGet package source.

I genuinely don't know what this was for, and Central Package Management starts throwing warnings about it, so YEET.

* Remove Robust.Physics project.

Never used.

* Remove erroneous NVorbis reference.

Should be VorbisPizza and otherwise wasn't used.

* Sandbox fixes

* Remove unused unit test package references.

Castle.Core and NUnit.ConsoleRunner.

* Update NUnit to 4.0.1

This requires replacing all the old assertion methods because they removed them 🥲

* Oh so that's what dotnet-eng was used for. Yeah ok that makes sense.

* Add Robust.Analyzers.Test

* Update submodule

* commit to re-run CI
2024-01-12 23:22:01 +01:00
Visne
9bd30d57ad
Remove obsolete PoolManager methods (#19499) 2023-08-25 12:13:11 +10:00
Visne
3c667b6f7e
Remove obsolete TestPair.Pair (#19496) 2023-08-25 10:56:51 +10:00
Leon Friedrich
9c84108672
Change default test pooling options. (#18732) 2023-08-06 12:30:28 +10:00
Leon Friedrich
d58786faf4
Remove PoolSettings.ExtraPrototypes option (#18678) 2023-08-05 14:16:48 +10:00
metalgearsloth
68480af109
Update content vectors to numerics (#17759) 2023-07-08 14:08:32 +10:00
TemporalOroboros
ba91023a85
Fix content.integration tests warnings (#17817)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2023-07-06 14:54:25 +10:00
Julian Giebel
49cb9d0e1e
Prevent infinite loops in device linking (#16856) 2023-05-29 02:14:06 +10:00
Julian Giebel
cc8b90dc44
Add a benchmark for device networking (#12619) 2022-12-06 15:22:57 -08:00
metalgearsloth
6c76061887
Content changes for mapgrid kill (#12567) 2022-11-22 13:12:04 +11:00
Leon Friedrich
f0d02f032a
Content changes for broadphase rejig (#12290) 2022-10-31 10:05:34 +11:00
wrexbe
81e3b2da88
Make tests faster (#8737)
* Test changes

* Make finding the test tile a little smarter
2022-06-19 20:22:28 -07:00
Leon Friedrich
a4d55235cc
Rejig Device networks (#7380) 2022-04-08 22:27:10 +10:00
mirrorcult
ec4d4688c7
Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
Vera Aguilera Puerto
2699540526 Remove useless resolves from a buncha tests. 2021-12-08 12:46:30 +01:00
DrSmugleaf
2a3b7d809d Fix 3000 errors 2021-12-05 18:09:01 +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
Javier Guardia Fernández
1508efff54
Add test pooling (#4961)
* Add test pooling

* WIP test pooling changes

* Fix Destructible tests

* Don't pool unpooled or dummy ticker instances

* Change ServerPathfindingDebugSystem to replace existing entries

* Fix SaveLoadSaveTest comment

* Don't pool StartTest

* Comment out global setup

* Fix puddle tests

* Move SolarPanelComponent initialize to PowerSolarSystem OnMapInit

* Update RobustToolbox

* Finish fixing tests, make test threads background threads

* Bring back pooling

* Fix nullable

* Update RobustToolbox

* Set cvars on server return

* Un-pool tests with custom cvars

* Update RobustToolbox

* Update RobustToolbox

* Change where the main tile coordinates are

* Remove DisposalUnitTest grid check

* Fix test pooling being a fickle bitch

* Fix EntitySystemExtensionsTest

* Update RobustToolbox

* Update RobustToolbox

* Make nullable pool settings true

* Update RobustToolbox

* Wait other way around

* We are unitystation now

* Update RobustToolbox

* Create global setup

* Pool some more tests

* Fix not properly disconnecting clients before restarting the round

* Give more info on ran tests

* Standardize default test cvars

* Update RobustToolbox

* Update RobustToolbox

* Pool clients

* Fix test order issue

* Fix cvars in character creation test not being set properly

* Update RobustToolbox

* Update RobustToolbox

* Rider shut

* Update RobustToolbox

* Format tests ran better

* Update RobustToolbox

* Reset RobustToolbox

* Reset RobustToolbox harder

* Fix one instance of test order causing destructible tests to fail
2021-11-06 11:49:59 +01: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
Julian Giebel
a6f2c21919
Device network as ecs (#4205)
* Work on DeviceNetworkSystem

* Implement device networking as ecs
Remove mailing unit code for now
Remove device network metadata

* Implement integration tests for device networking

* Remove manual updating DeviceNetworkSystem and use WaitRunTicks

* Fix wrong component name in ignored components

* Apply suggestions from code review

Co-authored-by: mirrorcult <notzombiedude@gmail.com>

* Rename NetworkUtils to DeviceNetworkConstants
Change connection type constants to enum
Remove create function from network payload class

* Change broken nodegroup check in wirenet to grid check

* Change ComponentManager to entity manager in DeviceNetworkSystem

* Fix smaller mistakes

* Wtf random test fail pls run them again smh

* Fix DataField in DeviceNetworkComponent

* Fix yaml in DeviceNetworkTest

* Fix DeviceNetworkComponent DeviceNetId property

Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
Co-authored-by: mirrorcult <notzombiedude@gmail.com>
2021-10-11 14:41:18 -07:00