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): more ramp options #3919

Merged
merged 2 commits into from
Dec 24, 2023
Merged

Conversation

chaosvolt
Copy link
Member

@chaosvolt chaosvolt commented Dec 16, 2023

Purpose of change

Another random item on the todo list, I was gonna add this to the mod but now it's mainlined so :3

Describe the solution

C++ changes:

  1. In construction.cpp, defined versions of check_ramp_low and check_ramp_high that also call check_empty, so wooden ramps need clear space to construct on (unlike with the other two that construct on specific non-empty terrain).

JSON changes:

  1. Added construction and construction group entries for rammed earth and wooden ramps. Each step is set to equal the resources needed to craft one rammed earth wall and wooden wall respectively. These currently, per feedback, produce generic ramps instead of specific terrain, since the ramp_up functions would all need to be special-cased in for each ramp type.
  2. Edited name and description of road ramps to fit being used as generic ramps.

Describe alternatives you've considered

Figuring out how to JSONize the ramp functions properly.

Testing

  1. Checked affected JSON files for syntax and lint errors.
  2. Compiled and load-tested.
  3. Constructed ramps with debug hammerspace on.
  4. Confirmed that wooden ramps can't be built in shallow pits or fence posts like the other two are meant to.
  5. Checked affected C++ file for astyle.

Additional context

zq340nye28l61

Checklist

@github-actions github-actions bot added src changes related to source code. JSON related to game datas in JSON format. labels Dec 16, 2023
@scarf005
Copy link
Member

i think until we get to make ramp generic on material it'd be better to not hardcode variants of it. (example: many many grills)

@chaosvolt
Copy link
Member Author

So make the output generic instead of coding new ramp functions and adding new ramp terrain?

@scarf005
Copy link
Member

yeah, i think it would be easier to maintain in the long term.

@scarf005 scarf005 self-requested a review December 24, 2023 03:36
@scarf005 scarf005 self-assigned this Dec 24, 2023
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
image

the rules for building is quite confusing but at least i was able to build both two new types of ramps.

@scarf005 scarf005 merged commit d273ebe into cataclysmbnteam:main Dec 24, 2023
12 checks passed
@chaosvolt chaosvolt deleted the gibe-ramp branch December 24, 2023 04:09
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. src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants