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

Added construction of roofs #73317

Merged
merged 4 commits into from
May 10, 2024
Merged

Conversation

PatrikLundell
Copy link
Contributor

@PatrikLundell PatrikLundell commented Apr 27, 2024

Summary

None

Purpose of change

Add construction definitions for roofs. This allows for construction of roofs over things that currently don't get magic roofs (such as pony and glass walls) and allows for camp construction recipes to determine a construction cost for constructions specifying roofs (the end up as 0 otherwise), once 3D support gets merged.
Edit: Needed to roll the testing dice and decided to trigger that by adding construction of chimney and vent vane.

Describe the solution

  • Go through all construction "recipes" that produce things which generate magic roofs and find all kinds of roofs used.
  • Rename construction groups and descriptions using the term "roof" to clarify they actually produce a room tile with a roof above.
  • Conjure up construction "recipes" for all roofs used, except for t_rock_roof, which shouldn't be generated by construction Auto roof on "rock" construction results in natural rock roof #73316.
  • Created a new pre_condition to check for suitable locations for construction (gutters and on top of a wall are legal locations, but not a roof).
    Edit:
  • Add construction of chimney and vent vane.

Describe alternatives you've considered

Testing

  • Load a suitable save.
  • Teleport up to the edge of the roof of the evac shelter camp.
  • Debug create a log wall directly adjacent and below.
  • Debug create construction materials for the roof to be tested.
  • Construct said roof and look at it to verify the game says it's what you intended to construct.
  • Kill the game.
  • Repeat the above for each roof construction created.
    Edit:
  • Teleport onto the roof of an evac shelter.
  • Construct Chimney and Vent Vane.

Additional context

The starting point is in a sorry state. Many construction "recipes" use very little resources, and in many cases do not seem to deduct anything for their magic roofs (while some definitely do). I haven't tried to delve into correcting this because I don't feel qualified at the least, don't like trying to deal with construction materials more than absolutely necessary, and it would constitute discouraged scope creep.
The comparison point is a room with the roof if available. Otherwise whatever conjures the roof is used.
Anyway, here's a summary of what was done:

  • t_rock_roof: Created over various walls made out stone, but it's a natural stone material, not a constructed one. Bug report.
  • t_wood_treated_roof: Taken materials for floor with roof. It's probably too little anyway.
  • t_metal_roof: Used about half of the materials a door with a magic roof uses.
  • t_shingle_flat_roof: Taken materials for floor with roof. It's probably too little anyway.
  • t_resin_roof: Half the time due to only being roof rather than floor + roof.
  • t_concrete_roof: Half time & materials.
  • t_metal_flat_roof Half materials.
  • t_flat_roof: Never constructed from any materials (all goes to doors). Copied the treated roof as a guessed analogue.
  • t_wood_roof: Similar, but all materials appear to be used for the wall.
  • t_thatch_roof: Assumed all materials are for the roof, as well as the bulk of the time.
  • t_log_sod_roof: Assumed all materials and time are for the roof.
  • t_brick roof: Copied the cost of the wall it's conjured up on top of. Should presumably use roof tiles and a wooden framework.

I have assumed the construction "recipe" names aren't stored in in-process constructions. If they are, there's a need for some kind of migration handling.

Edit: Since I needed to roll the testing dice again I decided to add chimney and vent vane furniture now rather than in a later PR. The intended purpose is to add these onto the roof of base camp constructions that place smoke generating equipment (fire place, stove, forge, ...).
Also note that since these aren't actually useful in the game itself, the construction pre_special is set to allow placement on roofs, rather than restrict placement in locations they'd make little sense. I don't actually expect them to be constructed by players directly, but only as part of camp constructions, but construction entries provide time, materials, etc. requirements for these to draw on.

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Apr 27, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions and removed json-styled JSON lint passed, label assigned by github actions labels May 4, 2024
@I-am-Erk I-am-Erk merged commit c03150e into CleverRaven:master May 10, 2024
21 of 27 checks passed
@PatrikLundell PatrikLundell deleted the roof_recipes branch May 11, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants