177 Commits

Author SHA1 Message Date
Connor Huffine
e45c9975fa Remove some warnings generated by SolutionTests (#41194)
* Add indirection

* Address feedback

* const

* VSC trolled me

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-11-01 15:37:20 +00:00
Leon Friedrich
de9593c0e7 Remove static IoC from client & server EntryPoint (#40562)
* Remove static IoC from client & server EntryPoint

* Fix missing log manager initialization

* file namespace
2025-10-02 14:32:56 +00:00
pathetic meowmeow
d9c24b3d10 De-enumify humanoid species skin colours (#39175)
* De-enumify humanoid species skin colours

* Change index to resolve

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-09-13 22:30:17 -07:00
Tayrtahn
3a278bca8b Validate ProtoIds in tests (#38745)
* Convert string literals to protoids in Content.Tests

* Convert string literals to protoids or consts in Content.IntegrationTests

* Fix linter failures
Tricksy static using misled me
2025-07-04 22:48:55 +02:00
Tayrtahn
97f0bab5b8 Cleanup prototype instantiation in DamageTest (#38639)
Cleanup prototype instantiation in DamageTest
2025-06-28 20:12:36 +02:00
PJB3005
0e840d816a Make GasMixture enumerable
I noticed that enumerating gases is frequently done in an annoying way with Enum.GetValues. So I made it better. Now GasMixture is IEnumerable<(Gas gas, float moles)> and it just works.
2025-01-18 00:50:22 +01:00
Myra
96d913b147 Add IPIntel API support. (#33339)
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-01-12 20:41:26 +01:00
Pieter-Jan Briers
f9a722a87e Test parallelization stuff. (#31650)
This is the content analogue of https://github.com/space-wizards/RobustToolbox/pull/5412

Made Content.Tests run tests parallelized, which doesn't really seem to matter much.

I tried to make Content.IntegrationTest more aggressively parallelized but ran into https://github.com/dotnet/runtime/issues/107197 so we need to shelve that. Added a comment explaining as such.
2024-09-01 03:28:30 +02:00
TGRCDev
517f7ad344 Fixed IP bans preventing non-banned players from connecting to SQLite-backed servers (#31154)
Fixed IP bans causing server errors with SQLite DB
2024-08-18 13:53:09 +02:00
Leon Friedrich
14cd55e765 Remove ServerAlertsComponentTests (#29027) 2024-06-17 01:46:59 +10:00
Tayrtahn
7f9ed797af Fix off-by-one error in LocalizedDatasetPrototype (#28366) 2024-05-28 23:37:03 -04:00
Tayrtahn
0bca934c9d Add LocalizedDatasetPrototype (#28310) 2024-05-28 14:41:41 -04:00
Nemanja
8a95cb186c Remove AlertType and AlertCategory (#27933) 2024-05-23 22:43:04 -04:00
Kara
993eef1e7c Resolve 'EntitySystem.Get<T>()' is obsolete in content (#27936)
* PROJECT 0 WARNINGS: Resolve `'EntitySystem.Get<T>()' is obsolete` in content

* pass entman

* dog ass test

* webeditor
2024-05-12 20:34:52 -04:00
KrasnoshchekovPavel
3fcbbc0732 Added localization of groups and types: damage, metabolism (#27368)
* Added localization of groups and types: damage, metabolism (displayed in the guide book). The text for the health analyzer, weapon damage inspection is now taken from damage prototypes

* fix damage tests

* fix damage test yml

* fix damage test prototypes

* Update Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs

* Update Content.Shared/Damage/Prototypes/DamageTypePrototype.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-04-28 14:48:19 +10:00
Hannah Giovanna Dawson
bf98a6a8bb SS14-17313 Chatfactor: Chat Censorship Systems (#25908)
* SS14-17313 Chat Censorship Systems

Adds some systems to manage chat censorship:

1. No-op: does nothing
2. SimpleCensor: a regex-free censor with a variety of rules to use
3. RegexCensor: a censor that uses regex.

This exposes a singleton backed by a builder pattern (ChatCensor) that
is set up, probably during the code init phase, and then globally available
for your censorship needs.

* Migrate to Shared

* Add a reset function to the builder.

* Resolve PJB's feedback; add unit tests
2024-03-26 10:50:20 +11:00
Pieter-Jan Briers
b1de6dd601 Switch project files to C# 12. (#25487)
Just unlocks new language features like primary constructors.
2024-02-23 15:02:59 +11:00
Pieter-Jan Briers
33611b7094 Solution precision fixes (#25199)
* Add test for two chemistry issues

1. rounding issue with reaction processing when making chloral hydrate
2. reliable assert trip due to the ValidateSolution() heat capacity issue.

* Fix FixedPoint2 arithmetic

Fix internal floating point arithmetic in places where it could be avoided.

Fix incorrect rounding mode used in other places (it should always floor, like regular int arithmetic).

I had to add an explicit epsilon value for float -> FixedPoint2 because something like 1.05 is actually like 1.04999 and that'd cause it to be rounded down to 1.04.

This fixes reaction reagent processing in cases where the reagent inputs can't cleanly divide. Previously, when making 30u chloral hydrate by adding the chlorine in 10u increments you'd end up with 0.04 chlorine left over. This was caused by division in the reaction code rounding up in some cases. Changing division here to always round down fixes it.

* Attempt to fix heat capacity precision assert issues.

Fixes #22126

First, we just increase the tolerance of the assert. It was way too low.

Second, actually put a cap on float drift from one-off _heatCapacity changes.

* Fix float -> FixedPoint2 epsilon for negative number, fix tests.

* Fix DamageableTest

* Oh yeah I need to call CleanReturnAsync
2024-02-16 16:54:27 -07:00
Tayrtahn
9cee54e5a1 Improved output distribution of RoundToLevels (#25026)
* Improved output distribution of RoundToLevels

* Updated tests

* Oops
2024-02-08 10:37:24 +11:00
LordCarve
c77eb8691d DamageSpecifier Total => GetTotal (#24160)
* DamageSpecifier [Obsolete] Total => GetTotal()

* Remove obsolete Total member from DamageSpecifier.
2024-01-21 18:59:14 -07: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
Kot
3d911a64c7 Fix atmos UI decimal separator bug (#23009)
* Fix atmos UI inconsistent culture usage

* Remove the need to pass localization manager
2024-01-04 21:18:09 -08:00
themias
9115994abf fix cauterization (#23264)
* fix cauterization

* remove if statement

* revert DamageTest change

* fix
2024-01-01 00:08:25 -08:00
TemporalOroboros
d23c8d5c19 Revert 'Revert 'Solution Entities'' (#23168) 2023-12-29 08:47:43 -04:00
Emisse
938d6d9945 Revert "Solution Entities" (#23160)
Revert "Solution Entities (#21916)"

This reverts commit d75e743dd7.
2023-12-28 20:45:42 -07:00
TemporalOroboros
d75e743dd7 Solution Entities (#21916)
* Creates Content.Shared.Chemistry.Solutions
Copies Solution class to new namespace
Obsoletes old Solution class

* Switches over to the Solutions.Solution Solution

* Creates Content.Shared.Chemistry.Containers
Copies relevant components/systems to the new namespace
Obsoletes old versions

* Switches over to the Containers.XYZ namespace

* Creates SolutionSystem and obsoletes old SolutionContainerSystem methods

* Start using SolutionSystem for Solution manipulation

* EnumerateSolutions

* Move TryGetMixableSolution

* Move EnsureSolution to Server

* Create Solution Entities

* Stop using obsolete solution system methods

* Fix prototype component tests

* Add using ..Audio.Systems; back

* Wrap solution container slots in ContainerSlots

* Actually add the slot to the solution container map

* Dirty SolutionContainerComponent when ensuring solutions

* Revert namespace changes

* Remerge SolutionSystem and SolutionContainerSystem

* SolutionContainerManagerComponent refactor

* Avoid wrapping necessary code in DebugTools.Assert as it is removed when compiling for release

* Readd examine reagent sorting

* Fix errors

* Poke tests

* Fix solution names not being applied

* Fix WoolyComponent including statement

* Fix merge skew

* Fix compile errors

* Make reactions use solntities

* Reindent solution class namespace

* Field attribute changes

* AutoGenerateComponentState for SolutionContainerComponent

* SolutionContainerComponent -> ContainedSolutionComponent

* ref ReactionAttemptEvent

* Denetwork preinit solutions

* Misc 1

* Nullable TryGetSolution out vars

* Cache associated solutions

* Fix merge skew

* Use explicit regions in SharedSolutionContainerSystem.Capabilities

* Add debug assert

* Use explicit regions in SharedSolutionContainerSystem.Relay + ref SolutionContainerChangedEvent

* ContainedSolutionComponent.Name -> ContainedSolutionComponent.ContainerName

* SolutionComponent doc comments

* Implicit DataField names and property purge

* ReagentEffect DataField names

* Local variables for readability

* Sort using statements + Entity<T> event handlers

* Fix compile erros

* Fix compile errors

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2023-12-28 17:58:14 -08:00
RadioMull
1dd0327d73 Fix typo (#20772) 2023-10-10 22:36:17 -08:00
Leon Friedrich
364c9b7f0a DamageableSystem cleanup & performance improvements (#20820) 2023-10-09 03:27:41 +11:00
DrSmugleaf
a44fa86b68 Update trivial components to use auto comp states (#20539) 2023-09-28 16:20:29 -07:00
metalgearsloth
25c8a03276 Move ServerbSqliteTests to integration (#19807) 2023-09-10 15:09:12 +10:00
Leon Friedrich
e4ca6f4fb9 Allow solutions to store extra reagent data (#19323) 2023-09-05 07:55:10 +10:00
Pieter-Jan Briers
bf16698efa Portable Generator Rework (#19302) 2023-08-25 11:40:42 -07:00
Pieter-Jan Briers
978887bf03 (Probably) fix random integration test failures. (#18270) 2023-07-25 11:10:50 +10:00
metalgearsloth
fbf1d476f2 Component ECS (#17991) 2023-07-13 20:20:46 +10:00
metalgearsloth
68480af109 Update content vectors to numerics (#17759) 2023-07-08 14:08:32 +10:00
Pieter-Jan Briers
50257c3bd7 Limit postgres database concurrency (#17246) 2023-06-10 21:52:08 +10:00
Leon Friedrich
263e1761fc Move jobQueue to engine (#16443) 2023-05-15 12:47:12 +10:00
Pieter-Jan Briers
1c4a2594ce Database thread pool use (#14498)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-05-02 10:36:39 +10:00
metalgearsloth
ae01618874 Revert "Revert "Replace ResourcePath with ResPath (#15308)" (#155… (#15566) 2023-04-20 20:16:01 +10:00
metalgearsloth
acf79a8209 Revert "Replace ResourcePath with ResPath (#15308)" (#15551) 2023-04-20 11:43:54 +10:00
Ygg01
71f358a027 Replace ResourcePath with ResPath (#15308) 2023-04-19 23:39:17 +10:00
Leon Friedrich
f0cf4e7a22 Add missing DataDefinition constructors (#14603) 2023-03-12 16:37:24 -07:00
Pieter-Jan Briers
c5b3f62f6f Update project files for configuration changes. (#14281) 2023-03-06 11:38:07 -08:00
metalgearsloth
533e2600cf Fix AlertManagerTests warnings (#14386)
bored
2023-03-06 05:06:50 +00:00
Leon Friedrich
c3e6ac2563 Fix ScaleSolution() (#13630) 2023-01-22 01:35:12 +11:00
Leon Friedrich
466384b081 Solution rejig (#12428) 2023-01-12 14:41:40 +11:00
DrSmugleaf
cd803a82bd Update projects to C# 11 (#13111) 2022-12-20 22:33:57 +11:00
Ygg01
75ea093d78 Fluid spread refactor (#11908)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Fix undefined
2022-11-15 22:30:59 +11:00
Leon Friedrich
5cade18119 FixedPoint2 tweaks (#12431) 2022-11-08 10:14:13 +11:00
Flipp Syder
caa5efcd6f Humanoid patches (#11467)
* restores species/age on examine

* makes the default human skin tone a little less green

* ensures human skin tone verification is rounded to the nearest integer value, adds tests for ensuring all human skin tones are valid and that the default skin tone is valid
2022-09-22 20:25:56 -05:00