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

Migrate direct item spawns #37803

Merged
merged 1 commit into from
Feb 7, 2020

Conversation

ifreund
Copy link
Contributor

@ifreund ifreund commented Feb 7, 2020

Summary

SUMMARY: Bugfixes "Migrate direct item spawns"

Purpose of change

Fixes #37372

Describe the solution

Items that are spawned using item groups aren't an issue since the
contents of the groups get migrated on load. Direct spawning of items
bypasses this migration.

This commit applies migration to json mapgen definitions of direct item
spawns and causes the migrated item to be spawned if need be.

Testing

Create a new world with generic guns.
Use the overmap editor to create the mil_base_5e_north omt.

Prior to this commit the game crashes on picking up the M4A1

With this commit applied, the generic guns assault rifle spawns instead and there is no crash.

Additional context

Thanks to @tenmillimaster for the reproduction case.

Items that are spawned using item groups aren't an issue since the
contents of the groups get migrated on load. Direct spawning of items
bypasses this migration.

This commit applies migration to json mapgen definitions of direct item
spawns and causes the migrated item to be spawned if need be.
@ifreund ifreund added Spawn Creatures, items, vehicles, locations appearing on map [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) Mods: Generic Guns Anything to do with Generic Guns labels Feb 7, 2020
@ZhilkinSerg ZhilkinSerg merged commit e7271b0 into CleverRaven:master Feb 7, 2020
@ifreund ifreund deleted the migrate-direct-item-spawn branch February 7, 2020 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mods: Generic Guns Anything to do with Generic Guns Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mapgen-defined spawns aren't subject to migration
2 participants