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

(done) Migrate some terrains that should be furnitures into furniture #41731

Merged

Conversation

I-am-Erk
Copy link
Member

@I-am-Erk I-am-Erk commented Jul 1, 2020

Summary

SUMMARY: Infrastructure "Changes some awkward terrains into furnitures for better layering"

Purpose of change

A great many things that are currently terrrains should in fact be furniture. For anything sticking above the ground, furniture has a lot more options for layering, preserving the identity of the terrain beneath it.

Describe the solution

This converts several manufactured/industrial terrains to furniture, obsoletes the old entries, and updates any palettes in the repository.

New furnitures;

  • f_gas_tank
  • f_diesel_tank
  • f_gas_tank_smashed
  • f_diesel_tank_smashed
  • f_generator_broken
  • f_machinery_light
  • f_machinery_heavy
  • f_machinery_electronic
  • f_machinery_old
  • f_console
  • f_console_broken
  • f_centrifuge
  • f_compact_ASRG_containment (from t_plut_generator)

The compact ASRG containment unit has had the most changes from the old plut_generator. It now has a heavy lead and ceramic housing that can be removed to reveal a fragile kilopower-style nuclear reactor inside. It cannot be harvested for plutonium at this time but it can be smashed if you like being blown up and irradiated. Note that the explosion is a sodium reaction, not a nuclear one, you could survive it.

I have also adjusted some deconstruction recipes to include new ingredients available, and made the a "connects_to": "COUNTER" group for things like the consoles. When dismantled, consoles will leave behind a counter.

I have done a bit of palette updating while in maps, mostly to update region groundcover, and in a few places adding a fill_ter or other minor infrastructure fixes. It bloated an already big PR but if I'm going to read several hundred palettes, I may as well fix stuff while I'm at it: these are things that would probably never get done otherwise.

Describe alternatives you've considered

Eventually we'd like to have more mapping layers than just terrain and furniture, but this is an early step towards that anyway.

Testing

image

Game runs without errors. Maps appear to spawn with the new furnitures instead of the old terrains. Consoles appear to work as intended.
I have tried to find some hard coded locations to see how it's working there, I couldn't find any I am sure of.
Can't think of anything else to test. Tired of looking at this PR.
image

@I-am-Erk I-am-Erk added [JSON] Changes (can be) made in JSON Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. labels Jul 1, 2020
@I-am-Erk I-am-Erk marked this pull request as ready for review July 4, 2020 03:53
@I-am-Erk I-am-Erk changed the title Migrate some terrains that should be furnitures into furniture (done) Migrate some terrains that should be furnitures into furniture Jul 12, 2020
@kevingranade kevingranade merged commit 29af7f7 into CleverRaven:master Jul 14, 2020
@I-am-Erk
Copy link
Member Author

Oh thank goodness. Thanks Kevin

@I-am-Erk I-am-Erk deleted the migrate-terrain-to-furniture-1 branch July 14, 2020 13:28
@ZhilkinSerg
Copy link
Contributor

Probably need tileset jsons updates - #42125

@I-am-Erk
Copy link
Member Author

People should just use better, more up to date tilesets.

@Qrox
Copy link
Contributor

Qrox commented Jul 18, 2020

Consoles in gas stations from old saves aren't working anymore (iexamine::getNearFilledGasTank checks for nearby gas tanks using furniture ids, but gas tanks from legacy saves aren't migrated to furnitures)

@@ -192,7 +193,7 @@ computer *submap::get_computer( const point &p )
{
// need to update to std::map first so modifications to the returned object
// only affects the exact point p
update_legacy_computer();
//update_legacy_computer();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this commented out? This might cause problems for older saves.

@@ -160,7 +160,7 @@ void submap::update_legacy_computer()
if( legacy_computer ) {
for( int x = 0; x < SEEX; ++x ) {
for( int y = 0; y < SEEY; ++y ) {
if( ter[x][y] == t_console ) {
if( frn[x][y] == furn_str_id( "f_console" ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If it's a legacy computer, then the save may still contain "t_console" which should also be updated, unless we actually migrate "t_console" to "f_console" while loading the save.

chaosvolt added a commit to chaosvolt/Cataclysm-BN that referenced this pull request Mar 6, 2022
Sources:
1. Migration of centrifuge from terrain to furniture, by I-am-Erk: CleverRaven/Cataclysm-DDA#41731
2. Fixing what the above PR broke, by johnstoecker: CleverRaven/Cataclysm-DDA#43361
3. Making centrifuges useful for separation, by zachary-kaelan: CleverRaven/Cataclysm-DDA#34344
Coolthulhu pushed a commit to cataclysmbnteam/Cataclysm-BN that referenced this pull request Mar 22, 2022
* Port over migration and tool use of centrifuges

Sources:
1. Migration of centrifuge from terrain to furniture, by I-am-Erk: CleverRaven/Cataclysm-DDA#41731
2. Fixing what the above PR broke, by johnstoecker: CleverRaven/Cataclysm-DDA#43361
3. Making centrifuges useful for separation, by zachary-kaelan: CleverRaven/Cataclysm-DDA#34344

* Update uncategorized.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants