Commit Graph

25 Commits

Author SHA1 Message Date
Pieter-Jan Briers
0c97520276 Fix usages of TryIndex() (#39124)
* Fix usages of TryIndex()

Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)

This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)

This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.

Fixes #39115

Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.

* fix tests

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-09-09 18:17:56 +02:00
TemporalOroboros
d4876be6f0 Kills TurfHelpers (#37939)
* Create TurfSystem equivalent for and obsolete TurfHelpers.GetTileRef

* Fix EntitySystem uses of TurfHelpers.GetTileRef

* Fix EntitySystem uses of TurfHelpers.TryGetTileRef

* Fix construction condition uses of TurfHelpers.GetTileRef

* Fix last use of TurfHelpers.IsBlockedTurf

* Create TurfSystem equivalent to and obsolete TurfHelpers.GetContentTileDefinition

* Fix uses of TurfHelpers.GetContentTileDefinition(TileRef)

* Fix uses of TurfHelpers.GetContentTileDefinition(Tile)

* Create TurfSystem equivalent to and obsolete TurfHelpers.IsSpace

* Fix EntitySystem uses of TurfHelpers.IsSpace(Tile)

* Fix EntitySystem uses of TurfHelpers.IsSpace(TileRef)

* Fix remaining uses of TurfHelpers.IsSpace

* Fix uses of TurfHelpers.GetEntitiesInTile

* Delete TurfHelpers.cs

* Add GetEntitiesInTile lookup methods

* Convert some GetEntitiesInTile methods to LookupSystem extension methods

* Use new GetEntitiesInTile methods

* Recycle spiderweb hashset

* Recycle floor tile hashset
2025-06-21 11:23:19 -04:00
Nemanja
21d0f85cc2 metal foam grenades (#29428)
* metal foam grenades

* wow okay

* meh

* bruh

* test

* push
2024-07-08 00:26:58 +10:00
Tornado Tech
21bc3bfa22 Cleans up tag system (#28272)
* Updated tag system

* Added params methods

* Fixed tag integration tests

* Fixed params methods recursion

* Revert has All/Any tag one argument realisation

* Updated tag integration tests

* Shit happens

* Added individual List/HashSet methods, docs, tests
2024-06-02 11:11:19 +10:00
Leon Friedrich
888a3bda51 Atmos device performance improvements (#26493)
* Atmos device performance improvements

* AtmosDirection perf improvements

* Fix errors

* Add GasTileOverlayComponent arguments

* Make excite no longer invalidate a tile
2024-03-30 15:17:53 +11:00
Jake Huxell
59e46aab93 Reduced Warning Count By 130 For Full Rebuilds (#26518)
* remove deprecated entity coordinate extension functions. Reduces warning count by approximately 50

* final toCoords Removed

* Remove all unused variables and dead code paths

* remove always true variable, should be a cvar or something instead

* remove superfluous variables from tests
2024-03-29 16:28:16 +11:00
Leon Friedrich
18a35e7e83 Partial atmos refactor (#22521)
* Reduce atmos component queries

* Remove method events

* Cache airtight data

* Make MolesArchived nullable

* Fix airtight cache

* only get tile def once

* Immutable mixtures

* firelock queries

* misc

* misc cleanup

* Trim disconnected tiles

* Fix merge issues and bugs

* Why does the PR keep increasing in scope

* debug overlay

* Fix bugs

* Fix test, remove unused events

* Add setmapatmos command

* Fix overlays

* Add map check

* A

* Resolve conflicts with #26102

* Remove some obsolete methods
2024-03-24 03:34:56 +11:00
Tayrtahn
763d2bca9c Fix cross-grid spreader behavior (#26346) 2024-03-22 16:29:14 -04:00
Tayrtahn
cf0da11eb7 Code cleanup: puddles and spreaders (#26102)
* Removed obsolete MapManager calls

* More code cleanup

* EnsureComp

* Rerun tests
2024-03-15 14:41:08 +11:00
DrSmugleaf
bc304a3127 Fix another error on round restart when terminating spreaders (#23201)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-01-03 18:57:28 +11:00
Leon Friedrich
35ba42af9c Add some tests and fix some miscellaneous bugs (#22836)
* Add some tests and fix some bugs

* Add more helper methods

* remove submodule

* fix merge

* also fix DirtyAll()

* poke
2023-12-28 10:05:20 +11:00
Leon Friedrich
b6bd82caa6 Use ECS prototype-reload events (#22613)
* Use ECS prototype-reload events

* better constructors

* Maybe this fixes tests?
2023-12-23 01:13:45 +11:00
Nemanja
46d1890844 Fix fast kudzu (#20875) 2023-10-09 20:32:34 -07:00
DrSmugleaf
f776251925 Fix error on round restart when terminating spreaders (#20850) 2023-10-09 17:16:08 +11:00
Leon Friedrich
fc034dd9d1 Remove SpreaderNodeGroup (#20230)
* Remove SpreaderNodeGroup

* Fix airtight updates

* more smoke stuff

* more smoke fixes

* wtf is smoke code

* Fix merge

* Fix divide by zero
2023-10-01 16:56:41 -04:00
Vordenburg
7582474f1a Lint more const string prototypes (#18922) 2023-08-13 20:26:59 -04:00
Bixkitts
956e8b46dd Fixed Kudzu Spread Falling Asleep After Containment (#18218)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2023-08-06 16:08:07 +10:00
faint
2f85b5ea3c Little NodeContainer ECS (#17702) 2023-06-28 21:28:38 +10:00
metalgearsloth
d51d74d934 Content fixes for timeoffsets (#15934) 2023-05-01 14:49:25 +10:00
metalgearsloth
1cde3ff112 Spreaders travels across connected grids and SpreaderIgnore tag (#15419) 2023-04-24 16:04:49 -04:00
metalgearsloth
793a09336e Fix spreader test (#15303) 2023-04-11 03:02:24 -07:00
metalgearsloth
360f16fee5 Fix edgespreaderprototype linter (#15265) 2023-04-10 17:54:50 +10:00
metalgearsloth
a17bb60321 Fix spreader logic (#15260) 2023-04-10 16:43:25 +10:00
metalgearsloth
aebe31cfde Fix master (#15256) 2023-04-10 15:47:51 +10:00
metalgearsloth
317a4013eb Puddles & spreader refactor (#15191) 2023-04-10 15:37:03 +10:00