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

fix: id, description of concrete floor without roof #3891

Closed
wants to merge 4 commits into from
Closed

fix: id, description of concrete floor without roof #3891

wants to merge 4 commits into from

Conversation

0Monet
Copy link
Contributor

@0Monet 0Monet commented Dec 13, 2023

Purpose of change

Rename id "t_thconc_floor_nofloor" of concrete floor without roof for consistency.
Remove the "roof" part of the terrain description.

Describe the solution

Replace id with "t_thconc_floor_no_roof".

Describe alternatives you've considered

None

Testing

Additional context

Capture d’écran 2023-12-13 145534

@github-actions github-actions bot added the JSON related to game datas in JSON format. label Dec 13, 2023
@scarf005
Copy link
Member

Rename id "t_thconc_floor_nofloor" of concrete floor without roof for consistency.

would it be compatible with old saves or maps that use the id t_thconc_floor_nofloor?

@0Monet
Copy link
Contributor Author

0Monet commented Dec 13, 2023

no

@scarf005
Copy link
Member

@chaosvolt would it be possible to define migration for terrain ids?

@0Monet
Copy link
Contributor Author

0Monet commented Dec 13, 2023

Maybe add "t_thconc_floor_nofloor" to uncategorized.json in obsoletion

@chaosvolt
Copy link
Member

I think you can use alias to fix this? Check walls, railings, chain link fences and the link for examples.

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.

It's not worth the incompatibilities here since people won't confuse floor_nofloor as not having a floor instead of not having a roof.

You would need to update every mapgen palette in base game to use the new ID or you'll have broken a lot of locations, and that's still not mentioning how many mods use the old ID that would need to scramble to update just to let people run their game again.

Copy link
Member

@chaosvolt chaosvolt left a comment

Choose a reason for hiding this comment

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

Personally I feel that the ID has fairly low risk of confusing people (the floor has no floor! :D), but I'm sure someone out there might assume it to be some kinda skylight. The question then becomes, does the risk of "someone's failed attempt to add said skylight to their mapgen becoming our problem" outweigh making the fix for it everyone else's problem?

If alias works correctly (we'll need to test it, namely load-test while retaining an unchanged use of the old terrain somewhere in the JSON, then test further by spawning some of the old terrain in another build without this change then load that save with your JSON changes), then we have the best of both worlds (we can fix the ID without breaking shit for other people). If not, then I'd say retain the old ID instead because it's really not worth it.

},
{
"type": "terrain",
"id": "t_thconc_floor_no_roof",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"id": "t_thconc_floor_no_roof",
"id": "t_thconc_floor_no_roof",
"alias": "t_thconc_floor_nofloor",

Should've actually added the relevant code suggestion to the change request proposal hecc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I loaded a save with the old terrain from a build without changes into a build with changes.
No error message.

Copy link
Member

Choose a reason for hiding this comment

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

Uh, you sure about that? The map would be trying to load terrain in its save JSON that's been outright deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea...
In my build without change:
Capture d’écran 2023-12-13 201839
When, I load the save in the build with change:
Capture d’écran 2023-12-13 202121
It seems to change "t_thconc_floor_nofloor" to "t_thconc_floor_no_roof".

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, that's a good sign then? Weird, I would've expected it to need some kinda migration or alias...maybe we can still assign alias just to be safe though?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This requires further investigation @chaosvolt

Copy link
Collaborator

Choose a reason for hiding this comment

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

No idea... In my build without change: Capture d’écran 2023-12-13 201839 When, I load the save in the build with change: Capture d’écran 2023-12-13 202121 It seems to change "t_thconc_floor_nofloor" to "t_thconc_floor_no_roof".

I made a migration for aftershock furnitures it may be worth testing one here. I sadly didnt test my migration as I figured if it didnt work it wasnt possible.

@0Monet
Copy link
Contributor Author

0Monet commented Dec 14, 2023

I close, it's not worth changing anything.

@0Monet 0Monet closed this Dec 14, 2023
@0Monet 0Monet deleted the fix_floor_nofloor branch December 18, 2023 18:21
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.

4 participants