Skip to content

Commit

Permalink
Merge pull request #39601 from wapcaplet/ants-alike
Browse files Browse the repository at this point in the history
Spawn regular ants under regular anthills
  • Loading branch information
ZhilkinSerg authored Apr 16, 2020
2 parents d48296f + 1131a45 commit 9f2b09d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/overmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1764,14 +1764,15 @@ bool overmap::generate_sub( const int z )
requires_sub = true;
}
for( auto &i : ant_points ) {
if( ter( { i.pos, z } ) != "empty_rock" ) {
const tripoint p_loc = tripoint( i.pos, z );
if( ter( p_loc ) != "empty_rock" ) {
continue;
}
mongroup_id ant_group( ter( i.pos + tripoint_above ) == "anthill" ?
mongroup_id ant_group( ter( p_loc + tripoint_above ) == "anthill" ?
"GROUP_ANT" : "GROUP_ANT_ACID" );
add_mon_group( mongroup( ant_group, tripoint( i.pos.x * 2, i.pos.y * 2, z ),
( i.size * 3 ) / 2, rng( 6000, 8000 ) ) );
build_anthill( tripoint( i.pos, z ), i.size );
build_anthill( p_loc, i.size );
}

return requires_sub;
Expand Down

0 comments on commit 9f2b09d

Please sign in to comment.