* 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>
* Use an actual Queue
* Store ProtoIds instead of prototypes
* Network as NetListAsArray
* Remove Serializable & NetSerializable from LatheRecipePrototype
* Convert CurrentlyProducing too
* No point using NetListAsArray<T> if you're going to .ToArray() it anyways.
---------
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
* Material Silo
* fix board, fix copyright
* a bit of review.... for the vibe....
* a tiny bit of review
* 4 spaced
* sloths no good very tiny nitpick
* fix ui flickers
* oops
* slightly lower range
* Sloth Review
---------
Co-authored-by: ScarKy0 <scarky0@onet.eu>
* add LatheRecipePackPrototype
* change Lathe and EmagLathe to use packs
* add AddRecipesFromPacks helper to SharedLatheSystem
* update lathe logic to work with packs and clean up some stuff
* migrate individual recipes to recipe packs
* update client
* remove node/artifact scanner from techs
* :trollface:
* fix test and make it include emag recipes
* add test that every dynamic recipe must be researched
* pro
* fix
* fix
* fix all tests, genuinely good test i wonder who made it
* add unused uranium and incendiary drozd mags to tech and lathe
* add recipes
* add incendiary prototype
* undo some changes
* troll
* :trollface:
* true
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* shitmed real
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* update funny test
* :trollface:
* :trollface:
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* Remove some BUI boilerplate
- The disposals overrides got removed due to the helper method handling it.
- Replace window creation with CreateWindow helper.
- Fixed some stinky code which would cause exceptions.
* More
* moar
* weh
* done
* More BUIs
* More updates
* weh
* moar
* look who it is
* weh
* merge
* weh
* fixes
* Printable Empty Magazines
* Adjust values of ammo boxes, adjust material costs, add empty lethal/non-lethal mags, swap secfab shotgun shells with shotgun ammo boxes, add recipe for shotgun ammo boxes
* Adds fully loaded pistol mags at secfab, removes printing respective cartridges at secfab
* Adds fully loaded rifle mags at secfab, removes respective cartridges
* Adds fully loaded light rifle mags at secfab, removes respective cartridges from secfab
* Adds fully loaded speedloader to secfab, removes respective cartridges from secfab
* small id mismatch fix
* another wrong ID fix
* capitalize Ls in speedloader
* Add missing SpeedLoader recipe
* Adds fully loaded shotgun drums to secfab, removes respective shells from secfab
* add rifle ammo unlocks back in, forgot ammo unlocks affect other fabs as well
* Moves tranquilizer shells to the non-lethal ammunition research
* Account for the removal of rubbers, adds in craftable disablers
* rubber rounds don't exist, remove empty non-lethal mags to just have empty mags
* Add in WT550 mags
* Convert latheRecipes to use LayeredTextureRect instead of TextureRect
* Fix for issue, texture layering now works
* Add in missing shell uranium box art
* add shelluranium to meta.json
* Fix yml issue
* Get rid of unused single ammo printing unlocks
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Add scrollbars to lathe material list when necessary
* Fix bug where shrinking window would cause elements to overlap
---------
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
* SS14-23184 Migrate Lathe Material Ejection Code to MaterialStorage
The lathe material ejection code acts as a do-nothing
man-in-the-middle system that does work that would be
reasonable for any MaterialStorage-using machine to
use. This has been fixed by migrating the ejection
code to MaterialStorage, allowing anything that uses
the system to eject mats it is storing.
* Fix some YAML references. Science!!
* locale for material units
* use material units in lathe ui
* give units to non-sheet materials
* :trollface:
* use volume properly
* :trollface:
* review
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
This completes PilgrimViis' (now closed) PR 16398. It addresses issue 10896, by allowing materials to be ejected from most lathes (except the ore processor and sheet-meister 2000)
* - Refinements to the material ejection UI
- Made the lathe UI default to a slightly larger size
- Fixed an offset issue with the label of the item currently being printed in the build queue UI
* Allow the materiel reclamation UI to pop if there is material left in the lathe, but not enough to print any sheets
---------
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>