Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[RDY] Replaced `add_spawn` with `place_spawn` #22847
Conversation
ZhilkinSerg
added some commits
Feb 1, 2018
kevingranade
merged commit b98bf7c
into
CleverRaven:master
Feb 2, 2018
ZhilkinSerg
referenced this pull request
Feb 2, 2018
Merged
[RDY] Replaced `add_spawn` with `place_spawn` (Step 2) #22852
ZhilkinSerg
deleted the
ZhilkinSerg:mapgen-spawn-groups
branch
Feb 2, 2018
ZhilkinSerg
referenced this pull request
Feb 2, 2018
Merged
[RDY] Replaced `add_spawn` with `place_spawns` (Step 3) #22854
BevapDin
reviewed
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.
This comment has been minimized.
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.
This comment has been minimized.
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.
ZhilkinSerg commentedFeb 1, 2018
Fixes #3951.
What was changed:
add_spawnfunction calls were replaced withplace_spawnfunction calls;monstergroup.json;SEEX/SEEYdefines;SEEXwere replaced withSEEY.