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

Refactored vehicle transform terrain parts #31894

Merged

Conversation

ZhilkinSerg
Copy link
Contributor

@ZhilkinSerg ZhilkinSerg commented Jun 26, 2019

Summary

SUMMARY: Infrastructure "Refactored vehicle transform terrain parts"

Purpose of change

Allow definition of terrain transformation data for vehicle parts via json.

Describe the solution

  • unified plows and rockwheels to use same terrain transformation function;
  • allow terrain transformation parts output terrain, furniture and fields;
  • allow terrain transformation data definition via json.

Additional context

You can now use TRANSFORM_TERRAIN flag for vehicle part and json object of following format to define terrain transformation data:

"transform_terrain": {
  "pre_flags": [ "PLOWABLE" ],
  "post_terrain": "t_dirtmound",
  "post_furniture": "f_null",
  "post_field": "fd_fire",
  "post_field_intensity": 3,
  "post_field_age": "10 minutes"
},

@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. labels Jun 26, 2019
@@ -2725,7 +2725,8 @@
"difficulty": 4,
"location": "under",
"power": -300,
"flags": [ "PLOW", "EXTRA_DRAG" ],
"transform_terrain_data": { "pre_flags": [ "PLOWABLE" ], "post_terrain": "t_dirtmound", "post_field": "fd_fire", "post_field_intensity": 3, "post_field_age": "1 hour" },
Copy link
Contributor

Choose a reason for hiding this comment

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

Plow will create fire fields with level 3 intensity while working?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just look how awesome fire plowing is:

image

image

Copy link
Contributor

Choose a reason for hiding this comment

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

The field, the field, the field is on fire.

@ZhilkinSerg ZhilkinSerg force-pushed the json-vehicle-terrain-transform branch from 746c623 to 22514d1 Compare June 27, 2019 07:54
@ZhilkinSerg ZhilkinSerg force-pushed the json-vehicle-terrain-transform branch from 22514d1 to 7b89089 Compare June 27, 2019 15:23
@ZhilkinSerg ZhilkinSerg changed the title Refactored vehicle part terrain transform Refactored vehicle transform terrain parts Jun 27, 2019
@kevingranade kevingranade merged commit dedaf79 into CleverRaven:master Jun 28, 2019
@ZhilkinSerg ZhilkinSerg deleted the json-vehicle-terrain-transform branch June 28, 2019 07:53
@kevingranade
Copy link
Member

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/sound-emitting-anti-fungus-vehicle-part-mod-making-help/21468/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants