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

[RDY] Replaced `add_spawn` with `place_spawn` #22847

Merged
merged 2 commits into from Feb 2, 2018

Conversation

3 participants
@ZhilkinSerg
Copy link
Contributor

commented Feb 1, 2018

Fixes #3951.

What was changed:

  • all add_spawn function calls were replaced with place_spawn function calls;
  • several monster groups were added to monstergroup.json;
  • some magic numbers were replaced with SEEX/SEEY defines;
  • some inappropriate usages of SEEX were replaced with SEEY.

@kevingranade kevingranade merged commit b98bf7c into CleverRaven:master Feb 2, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.004%) to 22.764%
Details
gorgon-ghprb Build finished.
Details

@ZhilkinSerg ZhilkinSerg deleted the ZhilkinSerg:mapgen-spawn-groups branch Feb 2, 2018

@@ -605,12 +588,12 @@ void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int tur

//1-2 per overmap, very bad day for low level characters
if (one_in(10000)) {
m->add_spawn(mon_jabberwock, 1, SEEX, SEEY); // fixme add to monster_group?
m->place_spawns( mongroup_id( "GROUP_JABBERWOCK_ONLY" ), 1, 0, 0, SEEX, SEEY, 1 );

This comment has been minimized.

Copy link
@BevapDin

BevapDin Feb 2, 2018

Contributor

The chance of those spawns is still hard coded, shouldn't that be part of the monster group?

And I think you changed the location of the spawn slight: previously it was in the middle (at 12,12) of the 24x24 map that is used for mapgen. Now it's somewhere in the upper left 12x12 area. But this is probably not important as the monsters will move around anyway.

This comment has been minimized.

Copy link
@ZhilkinSerg

ZhilkinSerg Feb 2, 2018

Author Contributor

The chance of those spawns is still hard coded, shouldn't that be part of the monster group?

Hmm, I guess it could be changed to: m->place_spawns( mongroup_id( "GROUP_JABBERWOCK_ONLY" ), 1000, 0, 0, SEEX, SEEY, 1 );

Most of this will eventually moved from cpp to json.

And I think you changed the location of the spawn slight: previously it was in the middle (at 12,12) of the 24x24 map that is used for mapgen. Now it's somewhere in the upper left 12x12 area. But this is probably not important as the monsters will move around anyway.

Yes, it should probably be changed to 0, 0, SEEX * 2 - 1, SEEY * 2 -1.

Will address that in separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.