Skip to content

Commit

Permalink
Merge pull request #52331 from jbytheway/document_mutable_special_test
Browse files Browse the repository at this point in the history
Document trick for testing mutable specials
  • Loading branch information
ZhilkinSerg authored Oct 19, 2021
2 parents 1c8c303 + 98ec008 commit bca58f6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/OVERMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,20 @@ The definition of the `microlab` overmap might look like this:
This allows it to join with hallways which are already placed on the overmap,
but new unresolved joins will only match more `microlab`s.

#### Testing your new mutable special

If you want to exhaustively test your mutable special for placement errors, and
you are in a position to compile the game, then an easy way to do so is to use
the existing test in `tests/overmap_test.cpp`.

In that file, look for `TEST_CASE( "mutable_overmap_placement"`. At the start
of that function there is a list of mutable special ids that tests tries
spawning. Replace one of them with your new special's id, recompile and run
the test.

The test will attempt to place your special a few thousand times, and should
find most ways in which placement might fail.

### Joins

A join definition can be a simple string, which will be its id. Alternatively,
Expand Down

0 comments on commit bca58f6

Please sign in to comment.