Commit Graph

98 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
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
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
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
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
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
metalgearsloth
fbf1d476f2 Component ECS (#17991) 2023-07-13 20:20:46 +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
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
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
keronshb
cd78c5451d Ensnaring Component and Bola Update (#9968) 2022-08-25 00:50:31 +10:00
Leon Friedrich
9020ec6045 yaml linter fix & alert sprite specifier changes (#10015)
* Sprite specifier/serializer update

* Immume

* Fix tests

* hooray, more bad test prototypes

* add some comments
2022-07-28 09:17:51 +10:00
Rane
4ded69eaa7 Remove overfed/overhydrated alerts (#9852) 2022-07-18 14:41:54 +10:00
wrexbe
bc68ac96dd Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
Alex Evgrashin
860db943e1 Reagents localization (#7916)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-05-12 21:06:01 +10: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
Paul Ritter
2ff40d5a1f Serv3 rework content changes (#7145) 2022-04-03 02:01:22 +02:00
Ygg01
4ac750d986 Add SolutionContainerSystem tests (#6726) 2022-02-17 19:42:39 -07:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
Acruid
5b1cd2dd96 ECSatize AlertsSystem (#5559) 2022-01-05 19:19:23 +11:00
Paul Ritter
512d6a38c3 get that crap outta here (completely rewrites inventorysystem) (#5807)
* some work

* equip: done
unequip: todo

* unequipping done & refactored events

* workin

* movin

* reee namespaces

* stun

* mobstate

* fixes

* some work on events

* removes serverside itemcomp & misc fixes

* work

* smol merge fix

* ports template to prototype & finishes ui

* moves relay & adds containerenumerator

* actions & cuffs

* my god what is actioncode

* more fixes

* im loosing my grasp on reality

* more fixes

* more work

* explosions

* yes

* more work

* more fixes

* merge master & misc fixed because i forgot to commit before merging master

* more fixes

* fixes

* moar

* more work

* moar fixes

* suffixmap

* more work on client

* motivation low

* no. no containers

* mirroring client to server

* fixes

* move serverinvcomp

* serverinventorycomponent is dead

* gaming

* only strippable & ai left...

* only ai and richtext left

* fixes ai

* fixes

* fixes sprite layers

* more fixes

* resolves optional

* yes

* stable™️

* fixes

* moar fixes

* moar

* fix some tests

* lmao

* no comment

* good to merge™️

* fixes build but for real

* adresses some reviews

* adresses some more reviews

* nullables, yo

* fixes lobbyscreen

* timid refactor to differentiate actor & target

* adresses more reviews

* more

* my god what a mess

* removed the rest of duplicates

* removed duplicate slotflags and renamed shoes to feet

* removes another unused one

* yes

* fixes lobby & makes tryunequip return unequipped item

* fixes

* some funny renames

* fixes

* misc improvements to attemptevents

* fixes

* merge fixes

Co-authored-by: Paul Ritter <ritter.paul1@gmail.com>
2021-12-30 22:56:10 +01:00
TemporalOroboros
201952e618 Adds temperature to solutions (#5834) 2021-12-24 02:22:34 -07:00
DrSmugleaf
2a3b7d809d Fix 3000 errors 2021-12-05 18:09:01 +01:00
Pieter-Jan Briers
64861ff034 Add Content.Shared.Database (#5588) 2021-11-28 14:56:53 +01:00
DrSmugleaf
ce94c28e8a Add unit test to check for duplicate log types 2021-11-22 22:04:45 +01:00