Paradise
Paradise copied to clipboard
ChemMaster Production Mode Refactor
What Does This PR Do
- Ports creation of condiment bottles and packs to new system introduced in #22992
- Refactors and deduplicates the code used to create pills/patches/etc.
- Introduced a new base datum,
/datum/chemical_production_mode/
, which contains all relevant information about a specific production mode such as the maximum items it can make and the current amount of items it is set to make. - Moved
safe_chem_list
to/datum/chemical_production_mode/patches/
- Moved UI datum such as
pillname
,patchamount
, andbottlesprite
to their respective production datum - Moved
chemical_safety_check
to/datum/chemical_production_mode/patches/
asSafetyCheck
- Introduced a new base datum,
- Removed three unused UI datum:
loaded_pill_bottle_name
,loaded_pill_bottle_contents_len
, andloaded_pill_bottle_storage_slots
- Rewrote
ChemMaster.js
intoChemMaster.tsx
- Added types to almost all props
- Rewrote some components to obtain data from
context
rather thanprops
for brevity - Condensed all production tabs' components into the
ChemMasterProductionGeneric
component
Why It's Good For The Game
Code is now DRYer and easier to change.
Images of changes
Old | Sauce Pack | Sauce Bottle |
---|---|---|
Testing
Pressed all buttons on the ChemMaster to test that no behavior has changed
Changelog
:cl: cdui tweak: Changed CondiMaster 3000's creation menus to be more consistent with ChemMaster 3000 /:cl:
!merge_upstream
!merge_upstream
!merge_upstream
!merge_upstream
This pull request seems to be stale as there have been no changes in 14 days, please make changes within 7 days or the PR will be closed. If you believe this is a mistake, please inform a development team member on Discord.
Looks fine enough, but please tidy up the last few reviews from contra that are dangling unresolved