Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(balance): use mattresses for vehicle beds and clocks for vehicle clocks, balance updates to associated items and recipes #5381

Conversation

chaosvolt
Copy link
Member

@chaosvolt chaosvolt commented Sep 19, 2024

Checklist

Required

Optional

Purpose of change

This started at first as just "swap in different items for two specific vehicleparts" but since one of them happened to be mattresses, that turned into a minor rabbithole of sanity-checking some associated recipes and uncrafts.

Describe the solution

JSON updates:

  1. Set it so that vehiclepart beds use a mattress to construct instead of a seat, and uses bolt turning quality of 1 instead of welding to install. Also updated its breaks_into entry to be consistent with uncraft results. Lastly, bumped its floor_bedding_warmth up to 800 to match that of a floor mattress.
  2. Added a recipe for mattresses, like how you can craft down-filled and wool mattresses. Made it however use springs instead of wire and scrap, along with enough cotton balls so the total materials (minus the thread in sewing_standard, admittedly) add up to the same 20 kg the mattress itself weighs. Accordingly...
  3. Updated components in the uncraft for mattresses, and switched from reversible recipes for wool and down-filled mattresses to instead having uncrafts of their own, so they don't take 2 hours to cut back up and don't require level 6 fabrication to get components back. Did bump time up from 22 seconds to 15 minutes though, since sheets and blankets take 10 and 20 minutes respectively to uncraft, so it's way faster than crafting but not nigh-instant like mattresses used to be.
  4. And the other much more minor thing in comparison, set it so vehicle clocks use the clock item to install instead of a wristwatch.
  5. Accordingly, since we allow wristwatches to infinitely tell time without needing power and pocket watches don't need to be rewound, gave item clocks the WATCH and ALARMCLOCK flags, and updated description accordingly.

Test updates:

  1. Fixed up numbers in vehicle_drag_test.cpp.
  2. Fixed up numbers in vehicle_efficiency_test.cpp.

Describe alternatives you've considered

  1. Adding support for making time-telling items work within crafting radius so you can set a clock on a table by the bed or the like instead of having to carry it in your inventory. I dunno how performance-heavy that'd be tho.
  2. Adding wool and down-filled beds for vehicles. Also weird that slapping a wool or down-filled mattress on a bed frame transmutates it into a normal mattress, bleh.

Testing

  1. Checked affected files for syntax and lint errors.
  2. Load-tested in compiled test build.
  3. Confirmed mattresses uncraft into exactly 20 kg worth of stuff.
  4. Confirmed uncrafting a clock doesn't give me more than its weight of components.
  5. Built and ran tests locally, all tests pass.

Additional context

@github-actions github-actions bot added JSON related to game datas in JSON format. tests changes related to tests labels Sep 19, 2024
RoyalFox2140
RoyalFox2140 previously approved these changes Sep 19, 2024
Copy link
Collaborator

@RoyalFox2140 RoyalFox2140 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like the new mattress uncraft and recipe but I have no better alternative. This can come in until someone else wants to scream at the materials on the mattress again.

Taking the sheets off isn't a bad thing, it gave too many rags. I don't know about the metal parts, springs are harder to find than wire is at least.

@KheirFerrum
Copy link
Collaborator

I'm liking most of this, my only comment really is whether it's necessary for us to change the flavour of clocks from mechanical to digital.

@chaosvolt
Copy link
Member Author

Fair, I figured it made more sense for a dashboard clock than duct-taping an analog wall clock to your car, and helps justify it having the alarm function that most mechanical watches in the game lack. But on the other hand it's a very minor thing, and the alarm clock item is explicitly mechanical too so we could use either if preferred.

@chaosvolt
Copy link
Member Author

Went ahead and reverted the change to the clock item's uncraft, and description now just removes the "stuck on 10:10" bit in favor of saying it has a time and alarm function.

Copy link
Collaborator

@RoyalFox2140 RoyalFox2140 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old review still stands, change was purely description and flavor based.

@chaosvolt chaosvolt merged commit 26fc5fd into cataclysmbnteam:main Sep 19, 2024
11 checks passed
@chaosvolt chaosvolt deleted the springy-mattresses-for-vehicles-also-clocks branch September 19, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format. tests changes related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants