Paradise icon indicating copy to clipboard operation
Paradise copied to clipboard

ChemMaster Production Mode Refactor

Open Arthri opened this issue 11 months ago • 4 comments

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, and bottlesprite to their respective production datum
    • Moved chemical_safety_check to /datum/chemical_production_mode/patches/ as SafetyCheck
  • Removed three unused UI datum: loaded_pill_bottle_name, loaded_pill_bottle_contents_len, and loaded_pill_bottle_storage_slots
  • Rewrote ChemMaster.js into ChemMaster.tsx
    • Added types to almost all props
    • Rewrote some components to obtain data from context rather than props 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
Old Sauce Creation Sauce Pack Creation Sauce Bottle Creation

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:

Arthri avatar Mar 21 '24 09:03 Arthri

!merge_upstream

Arthri avatar Mar 21 '24 09:03 Arthri

!merge_upstream

S34NW avatar Mar 21 '24 09:03 S34NW

!merge_upstream

Arthri avatar Mar 21 '24 09:03 Arthri

!merge_upstream

Arthri avatar Mar 21 '24 10:03 Arthri

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.

github-actions[bot] avatar Apr 16 '24 01:04 github-actions[bot]

Looks fine enough, but please tidy up the last few reviews from contra that are dangling unresolved

S34NW avatar Apr 19 '24 20:04 S34NW