* 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>
* 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>
* 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>
* lathe and material storage refactor
* materialStorage ECS
it kinda sus tho
* beginning the lathe shitcode dive
* couple lathe visuals and lathe system
* lathe changes and such
* dynamic lathe databases
* rewrote internal logic
on to ui
* da newI
* material display clientside
* misc ui changes
* component state handling and various other things
* moar
* Update Content.Shared/Lathe/LatheComponent.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* first volley of sloth review
* more fixes
* losin' my mind
* all da changes
* test fix and other review
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>