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

Spawn regular ants under regular anthills #39601

Merged
merged 1 commit into from
Apr 16, 2020

Conversation

wapcaplet
Copy link
Contributor

@wapcaplet wapcaplet commented Apr 16, 2020

Summary

SUMMARY: Bugfixes "Spawn regular ants under regular anthills"

Purpose of change

Fixes #38229

Describe the solution

The existing i.pos in this loop has no z-level, so the check for whether tripoint_above was an anthill was looking at z+1, and there are no anthills in the sky, therefore all underground ants were spawning as acid ants. This commit uses the correct z-level, allowing normal ants to spawn in normal anthills.

This commit also stores the calculated tripoint with correct z-level in a variable p_loc, then re-uses that in the three places that need it.

Describe alternatives you've considered

Considered and began a git bisect from known good/bad versions but learned of a solution before completing the process, and did not need to continue.

Testing

Used debug mode to reveal map and teleport to these locations:

  • Normal (non-acid) anthill out in the open
  • Normal (non-acid) anthill next to a lab
  • Normal (non-acid) anthill near a town
  • Sulfurous anthill

Confirmed that the "normal" anthills had normal (non-acid ants) underground (under the anthill itself, in the nearby lab, or in nearby house basements), while the sulfurous anthill has acid ants and soldier ants underground.

Additional context

Thanks to @ralreegorganon for seeing the solution more quickly than I could have

The existing `i.pos` in this loop has no z-level, so the check for
whether `tripoint_above` was an anthill was looking at z+1, and there
are no anthills in the sky, therefore all underground ants were spawning
as acid ants. This commit uses the correct z-level, allowing normal ants
to spawn in normal anthills.

This commit also stores the calculated tripoint with correct z-level in
a variable `p_loc`, then re-uses that in the three places that need it.
@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) Map / Mapgen Overmap, Mapgen, Map extras, Map display Monsters Monsters both friendly and unfriendly. Spawn Creatures, items, vehicles, locations appearing on map labels Apr 16, 2020
@ZhilkinSerg ZhilkinSerg merged commit 9f2b09d into CleverRaven:master Apr 16, 2020
@wapcaplet wapcaplet deleted the ants-alike branch April 25, 2020 19:22
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) Map / Mapgen Overmap, Mapgen, Map extras, Map display Monsters Monsters both friendly and unfriendly. Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ant tunnels only have acidic ants
2 participants