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(content): installable air conditoners #4740

Merged
merged 5 commits into from
Jun 8, 2024

Conversation

chaosvolt
Copy link
Member

@chaosvolt chaosvolt commented Jun 5, 2024

Purpose of change

This adds a new item that can be installed in bases or vehicles as a way to combat the heat, as a counterpart to space heaters.

Describe the solution

  1. Defined an air conditioner item, flavored as a basic window unit. No battery power for you like the item forms of space heaters can be used for, since it's expected you'll actually go through with installing it before you can use it.
  2. Accordingly, added furniture definitions for a grid form of the AC unit, with on, off, etc states. The emit it produces is comparable to what the space heaters put out, in between regular and large. Blocks off what it's installed in, as well.
  3. Defined an emit entry for AC units to use, with an output in between emit_cold_air2_stream and emit_cold_air2_blast.
  4. Added a construction entry and category for air conditioners. Notably, this requires an open window to install on, using the check for the SMALL_PASSAGE terrain flag used by open windows and window frames.
  5. Added a recipe for AC units in the same vein as fridges being craftable, about comparable in complexity but less raw material cost. However, along the way I noticed that evaporator and condenser coils are fucking massive weight-wise, combined a pair of each weighs more than a whole damn fridge does, so...
  6. Adjusted the weights of evap and condenser coils from an absurd 20 kilos down to a more reasonable 4 kilos. Additionally adjusted the components of evaporator coils so the component weight is a bit closer to the item's weight, mainly stripping out the large sheet metal. Also fixed them having redundant empty decomp_learn blocks. Bonus: fixed spelling of condenser coil.
  7. Updated the deconstruct results of the bigger non-functional cooling unit to yield an air conditioner along with some assorted parts, updated description to allude to being about to salvage it.
  8. But better than just taking it from cooling units on roofs, I added a nested chunk to standard_domestic_palette, acidia_residential_commercial_palette, apartment_palette, house_w_foundation_palette, city_block_foundation_palette, , cabin_palette_common, trailer_park, farm, farm_horse, farm_house, ``, and necropolis_a that give outside windows a chance to have an AC unit spawn on them. The chunk is used instead of it just being in the furniture entry so that in the process it overrides the existing window to always spawn opened. Chance of spawn is 5% for most palettes, 10% for the more rural ones. Mansions are the outlier, using 5% despite being rural since they have a hilarious fuckload of windows.
  9. Reworked the recipe for vehicle coolers to be more in line with the recipe for vehicle heaters, taking an AC window unit and modifying it with some extra wiring and a few plastic chunks. Also no longer reversible, as the vehicle heater isn't.
  10. While I was meddling with adding the item form for AC units, I went ahead and gave fridges and freezers pre-apoc prices that seemed a bit more in the ranges I found just poking through store sites, since it would look odd to have the AC unit show as 200 bucks pre-apocalypse while a whole-ass fridge is only 10 dollars.
  11. I also noticed that large grid heaters had the same power cost as small ones, fixed that.

Describe alternatives you've considered

  1. Not bothering with the flavor requirement of installing the AC in a window and letting them plonk it down on the floor.
  2. We could in the near future maybe make the emission output and power draw of vehicle coolers and heaters more in line with the grid versions.
  3. Finding a reasonable way to also inject grid space heaters into houses sometimes.

Testing

  1. Checked affected files for syntax and lint errors.
  2. Load-tested file changes in my playthrough release.
  3. Confirmed that installing an AC in an open window works, and that it won't let me close the window on it.
  4. Let the shelter's grid charge up a bit before turning it on. Does indeed cool off the room nicely, being on the edge of the building means some cool air is emitted into the outside (not exactly realistic but we don't have a way to make an emitter output cold air in one direction and hot air in another), but it quickly dissipates compared to how it builds up indoors.
  5. Took a look around town and confirmed I could find AC units in houses here and there, and that the underlying window was correctly opened.
  6. Dismantled an AC unit and confirmed that the total weight of components does not exceed the weight of an AC.
  7. Started in a boarded-up house after bumping up spawn rate of AC units to ensure I get one, didn't see any AC units spawn on top of boarded-up windows.

Additional context

How it feels every summer down here in Texas: https://www.youtube.com/watch?v=5txZx1DP3HU

Checklist

@github-actions github-actions bot added the JSON related to game datas in JSON format. label Jun 5, 2024
Copy link
Contributor

autofix-ci bot commented Jun 5, 2024

Autofix has formatted code style violation in this PR.

I edit commits locally (e.g: git, github desktop) and want to keep autofix
  1. Run git pull. this will merge the automated commit into your local copy of the PR branch.
  2. Continue working.
I do not want the automated commit
  1. Format your code locally, then commit it.
  2. Run git push --force to force push your branch. This will overwrite the automated commit on remote with your local one.
  3. Continue working.

If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT.

Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

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

image

@scarf005 scarf005 merged commit 812225c into cataclysmbnteam:main Jun 8, 2024
10 checks passed
@chaosvolt chaosvolt deleted the fuck-you-summer branch June 8, 2024 04:51
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants