Commit Graph
17 Commits
Author SHA1 Message Date
MoonyandPJB3005 ecfaa68ae6 Deprecate System.Random leakage 2026-02-08 14:09:48 +01:00
PJB3005 b4a0dad67a Fix tests on .NET 10
Fixes #6329
2025-12-14 17:46:41 +01:00
metalgearslothandGitHub 021845d956 Add some System.Random methods (#5177)
* Add some System.Random methods

* weh
2024-06-20 17:23:47 +10:00
73c1449811 Add GetItems() extension for IRobustRandom (#4975)
* refactor: RobustRandom and RandomExtensions namespace change to file-scoped

* refactor: IRobustRandom xml-doc methods rearranged to be more structured.

* feat: GetItems methods added to RandomExtensions, tests for new methods added.

* fix: GetItems will not request count-1 from next random, as System.Random.Next have upper bound excluded.

* fix: enforced standard deviation on picking next items in RandomExtensions.GetItems + fixed hashet initial capacity +removed mandatory hashset allocation

* refactor: specified border values interaction in IRobustRandom xml-doc

* refactor: updated relese-notes

* refactor: changed release-notes PROPERLY

* fix: order by which unique random items are picked in RandomExtensions.GetItems were fixed to ACTUALLY follow normal distribution

* refractor: added comment for devious RandomExtensions.GetItems only-unique logic

* reduce code duplication

* Cleanup code a bit

Rename variables, and make it a bit more compact.
Also, IMO the description is unnecessary

* Remove obsolete extension

* Remove incorrect O(n) comments.

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2024-03-30 10:42:39 +11:00
metalgearslothandGitHub 5c1a5e9826 Add 2 random methods (#4980)
* Add 2 random methods

One for valuelist shuffle and one for NextAngle range.

* rn

* Fix RN
2024-03-24 14:00:21 +11:00
metalgearslothandGitHub 7592997f4e Add random pick / take methods for sets (#4821)
* Add random pick / take methods for sets

I want it don't at me.

* cleanup (mraow)

* Revert "cleanup (mraow)"

This reverts commit e279957f21.

* flatpak

* notes
2024-01-09 00:37:19 +11:00
metalgearslothandGitHub e39b249070 Add gaussian extension for System.Random (#4776) 2023-12-31 05:26:39 +11:00
metalgearslothandGitHub b486ef885c Add NextAngle for System.Random (#4522) 2023-10-29 04:22:32 +11:00
Tom LeysandGitHub d7962c7190 Add implementation of Random.Pick(ValueList<T> ..) (#4257) 2023-08-21 13:56:18 +10:00
paliandGitHub 3f7fce2f02 Fix prob definition inequality (#3976) 2023-04-29 03:15:47 +10:00
Pieter-Jan BriersandGitHub 84733a335c Prototype load parallelization (#3502) 2022-12-20 22:46:30 +01:00
AcruidandGitHub 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00
44bcbfa8e5 Misc changed needed for atmos (#1186)
* Add needed changes for atmos

* Get delays for RSI state

* Placement hijack can handle deletion on gridcoordinates

* Array serialization

* MapIndices to GridCoordinates

* CollidableComponent creates VirtualControllers using IDynamicTypeFactory

* Probability assert now prints chance

* Remove unused stuff, fix build

* Update documentation for map indices

* readability

* Removed unused using statements

* Remove ToAngle

* Fix messed up merge

* Fix MapIndices/GridCoordinates conversion

* Add "invalid" direction.

* Update Robust.Shared/Serialization/YamlObjectSerializer.cs

* Nullable fix

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-08-02 18:39:23 +02:00
Pieter-Jan Briers 2b3bdf0f28 Adds RandomExtensions.Pick for IReadOnlyCollection. 2020-05-23 00:42:37 +02:00
Pieter-Jan Briers 7dfae37451 no more Prob(80).
Adds assert against that so you don't screw up from BYOND habits.
2020-03-25 18:01:49 +01:00
DamianXandPieter-Jan Briers 943b000950 Things for wires (#852)
* Things for wires

* Fixed things
2019-08-25 23:18:03 +02:00
DamianXandPieter-Jan Briers 7f9f593989 Implemented RobustRandom (#845)
* Implemented RobustRandom

* Fixed RandomString
2019-08-16 21:43:59 +02:00