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

3D mapgen #74169

Merged
merged 19 commits into from
Jun 19, 2024
Merged
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6efe406
Barely enough to get it to work
PatrikLundell May 28, 2024
94c17b0
Campus used as test subject. To be reverted.
PatrikLundell May 28, 2024
70ed363
Update data/json/mapgen/campus/buildings/admin_f0.json
PatrikLundell May 28, 2024
d47608e
Update data/json/mapgen/campus/open_areas/pedestrian_westside.json
PatrikLundell May 28, 2024
99ce761
Update data/json/mapgen/campus/open_areas/pedestrian_westside.json
PatrikLundell May 28, 2024
c3cb33f
demanded changes
PatrikLundell May 28, 2024
7e95cb3
improved merging and removed failures to save submaps
PatrikLundell May 29, 2024
acc2445
test data: place terrain &furniture at level below
PatrikLundell May 29, 2024
b469783
Improved generate + supported editmap usage
PatrikLundell May 30, 2024
fd8941a
missed the changed test file
PatrikLundell May 30, 2024
fa3812d
Moved uniform mapgen into generate & merged the loadn operations
PatrikLundell May 31, 2024
89d6de1
Documentation updated to reflect 3D mapgen functionality
PatrikLundell Jun 1, 2024
28273fa
Restored hacked mapgen maps
PatrikLundell Jun 1, 2024
f3aa1e8
Changed dermatik nest roof to match ground level
PatrikLundell Jun 1, 2024
4baf00c
3D relative apply corrections, fixes to 3D worldgen mapgen
PatrikLundell Jun 2, 2024
6ae834d
Merge branch 'master' into 3D_mapgen
PatrikLundell Jun 2, 2024
9f7e619
demanded changes + correction
PatrikLundell Jun 4, 2024
e6c5d77
Added cleanup for unsaved submaps
PatrikLundell Jun 6, 2024
86a14f6
Remove test commenting out of code
PatrikLundell Jun 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 60 additions & 26 deletions data/json/mapgen/bugs/nest_dermatik.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
[
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "nest_dermatik_paper_roof",
"object": { "mapgensize": [ 1, 1 ], "rows": [ "#" ], "terrain": { "#": "t_roof_paper" } }
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "nest_dermatik_paper_wall",
"object": {
"mapgensize": [ 1, 1 ],
"rows": [ "#" ],
"terrain": { "#": "t_paper" },
"place_nested": [ { "chunks": [ "nest_dermatik_paper_roof" ], "x": 0, "y": 0, "z": 1 } ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "nest_dermatik_dirt_roof",
"object": { "mapgensize": [ 1, 1 ], "rows": [ "#" ], "terrain": { "#": "t_dirt" } }
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "nest_dermatik_dirt_wall",
"object": {
"mapgensize": [ 1, 1 ],
"rows": [ "#" ],
"terrain": { "#": "t_wall_dirt" },
"place_nested": [ { "chunks": [ "nest_dermatik_dirt_roof" ], "x": 0, "y": 0, "z": 1 } ]
}
},
{
"type": "mapgen",
"method": "json",
@@ -35,7 +69,6 @@
"t": [ "t_region_tree", "t_region_groundcover" ],
",": [ "t_region_tree" ],
"-": [ "t_wall_dirt" ],
"#": [ [ "t_paper", 3 ], "t_wall_dirt" ],
".": [ "t_mud_underground", [ "t_floor_paper", 2 ] ],
"0": [ "t_pit_shallow" ]
},
@@ -48,7 +81,8 @@
{ "monster": "mon_dermatik_larva", "x": [ 3, 22 ], "y": [ 8, 22 ], "repeat": [ 2, 4 ] },
{ "monster": "mon_dermatik_midwife", "x": [ 10, 12 ], "y": [ 14, 17 ], "repeat": [ 0, 2 ] },
{ "monster": "mon_dermatik", "x": [ 0, 23 ], "y": [ 0, 23 ], "repeat": [ 1, 4 ] }
]
],
"nested": { "#": { "chunks": [ [ "nest_dermatik_paper_wall", 3 ], [ "nest_dermatik_dirt_wall", 1 ] ] } }
}
},
{
@@ -59,31 +93,31 @@
"fill_ter": "t_open_air",
"rows": [
" ",
" ",
" ,, ",
" ,,,,,,,,, ",
" ,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,,,,,,,, ",
" ,,,,,,,,,,,, ",
" ,,, , ",
" "
" - ",
" - ---- ",
" ---...-..--- ",
" --.--..-...--- - ",
" -... .- ...------ ",
" -- . . ..-..--- ",
" --- ....- . ..-- ",
" - .. ..... .--- ",
" - .. .. .... --.- ",
" -- . .... ..-- ",
" --... . ..... ...-- ",
" -- . . ....... ..--- ",
" -- ...... . .-- ",
" -... ........ ...- ",
" - ... ......... .-- ",
" --. ......... .--- ",
" -- ....... . ..-- ",
"--.... .. . . ... ...- ",
" - . ......-- ",
" ------... .......-- ",
" ---- ... -.----- ",
" ---------- - ",
" --- -- "
],
"terrain": { ",": [ "t_roof_paper" ] }
"terrain": { "-": [ "t_dirt" ], ".": [ "t_roof_paper" ] }
}
}
]
39 changes: 26 additions & 13 deletions doc/MAPGEN.md
Original file line number Diff line number Diff line change
@@ -213,9 +213,11 @@ Placing things using x/y coordinates ("place_monsters", "place_loot", "place_ite
coordinates beyond 24x24. An important limitation is that ranged random coordinates (such as "x": `[ 10, 18 ]`) must not
cross the 24x24 terrain boundaries. Ranges such as `[ 0, 23 ]` and `[ 50, 70 ]` are valid, but `[ 0, 47 ]` and
`[ 15, 35 ]` are not because they extend beyond a single 24x24 block. Note that the syntax supports an optional
*relative* "z" coordinate (NOT absolute Z level, although it often would look the same as the reference is often zero),
but it is usable only for faction camp construction for the time being (mapgen separates Z levels by using different
overmap terrain identifiers instead).
*relative* "z" coordinate (NOT absolute Z level, although it often would look the same as the reference is often zero).
Usage of Z level offsets for mapgen (as opposed to later map modifications, such as faction camps) has the limitation
that mapgen flags only take effect for positive offsets (e.g. providing a roof and roof furniture for a building generated
with a probability), but not for negative ones (generating something below the current reference level). This restriction
is due to technical limitations (it's costly and messy to determine a level generation order dynamically).

Example:

@@ -281,6 +283,14 @@ Examples:
* The old mapgen.cpp system involved *The Biggest "if / else if / else if / .." Statement Known to Man*(tm), and is only
halfway converted to the "builtin" mapgen class. This means that while custom mapgen functions are allowed, the game
will cheerfully forget the default if one is added.
* Mapgen flags don't have any effect on "real" mapgen negative Z level offsets due to technical limitations. They work
normally for generation after mapgen (such as the addition of a camp structure, or other post generation
modifications), as well as for positive Z level offsets for the original generation of maps (e.g. adding upper
stories or roofs to buildings placed using probabilities). Negative offsets will still be applied, but any benefits
from flag directives will be lost. Instead, the overlay produced by the offset orders will be applied by merging
the overlay to the base level map generated once that level has actually been generated. It's expected that things
that need to include a Z level offset will most commonly be defining a base and what's above it, which is why that
direction has the complete support.
* TODO: Add to this list.


@@ -433,7 +443,10 @@ Some mapgens are intended to be layered on top of existing terrain. This can be
nested mapgen, or regular mapgen with a predecessor. When the mapgen changes an existing terrain,
the tile may already contain preexisting furniture, traps and items. The following flags provide
a mechanism for specifying the behaviour to follow in such situations. It is an error if existing
furniture, traps or items are encountered but no behaviour has been given.
furniture, traps or items are encountered but no behaviour has been given. Note that flags do NOT
affect magens on creation of a new overmap when the Z level offset is negative (i.e. something placed
at a lower Z level than the overmap level being generated) and no error reports are generated. This
is a technical limitation, not a desired feature.

A blanket policy can be set using one of these three (mutually exclusive) shorthand flags:
- `ALLOW_TERRAIN_UNDER_OTHER_DATA` retains preexisting furniture, traps and items without triggering
@@ -527,7 +540,7 @@ Example:
| line | Allowed values: `"terrain"`, `"furniture"`, `"trap"`, `"radiation"`, `"trap_remove"`, `"item_remove"`, `"field_remove"`, `"creature_remove"`
| id | Terrain, furniture, or trap ID. Examples: `"id": "f_counter"`, `"id": "tr_beartrap"`. Omit for "radiation", "item_remove", "creature_remove", and "field_remove". For `trap_remove` if tr_null is used any traps present will be removed.
| x, y | Start X, Y coordinates. Value from `0-23`, or range `[ 0-23, 0-23 ]` for a random value in that range. Example: `"x": 12, "y": [ 5, 15 ]`
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported, and it can only be used for faction camps.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported.
| x2, y2 | End X, Y coordinates. Value from `0-23`, or range `[ 0-23, 0-23 ]` for a random value in that range. Example: `"x": 22, "y": [ 15, 20 ]`
| amount | Radiation amount. Value from `0-100`.
| chance | (optional) One-in-N chance to apply
@@ -554,7 +567,7 @@ Example:
| square | Allowed values: `"terrain"`, `"furniture"`, `"trap"`, `"radiation"`, `"trap_remove"`, `"item_remove"`, `"field_remove"`, `"creature_remove"`
| id | Terrain, furniture, or trap ID. Examples: `"id": "f_counter"`, `"id": "tr_beartrap"`. Omit for "radiation", "item_remove", creature_remove, and "field_remove". For `trap_remove` if tr_null is used any traps present will be removed.
| x, y | Top-left corner of square.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported, and it can only be used for faction camps.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported.
| x2, y2 | Bottom-right corner of square.

## Spawn a single monster with "place_monster"
@@ -568,7 +581,7 @@ Value: `[ array of {objects} ]: [ { "monster": ... } ]`
| monster | ID of the monster to spawn.
| group | ID of the monster group from which the spawned monster is selected. `monster` and `group` should not be used together. `group` will act over `monster`.
| x, y | Spawn coordinates ( specific or area rectangle ). Value: 0-23 or `[ 0-23, 0-23 ]` - random value between `[ a, b ]`.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported, and it can only be used for faction camps.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported.
| chance | Percentage chance to do spawning. If repeat is used each repeat has separate chance.
| repeat | The spawning is repeated this many times. Can be a number or a range.
| pack_size | How many monsters are spawned. Can be single number or range like `[1-4]`. Is affected by the chance and spawn density. Ignored when spawning from a group.
@@ -649,7 +662,7 @@ Using `place_monsters` to spawn a group of monsters works in a similar fashion t
|--|--|
| monster | The ID of the monster group that you wish to spawn |
| x, y | Spawn coordinates ( specific or area rectangle ). Value: 0-23 or `[ 0-23, 0-23 ]` - random value between `[ a, b ]`.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported, and it can only be used for faction camps.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported.
| chance | Represents a 1 in N chance that the entire group will spawn. This is done once for each repeat. If this dice roll fails, the entire group specified will not spawn. Leave blank to guarantee spawns.
| repeat | The spawning is repeated this many times. Can be a number or a range. Again, this represents the number of times the group will be spawned.
| density | This number is multiplied by the spawn density of the world the player is in and then probabilistically rounded to determine how many times to spawn the group. This is done for each time the spawn is repeated. For instance, if the final multiplier from this calculation ends up being `2`, and the repeat value is `6`, then the group will be spawned `2 * 6` or 12 times.
@@ -660,7 +673,7 @@ Using `place_npcs` to spawn a group of npcs.
|Field|Description |
|--|--|
| x, y | Spawn coordinates ( specific or area rectangle ). Value: 0-23 or `[ 0-23, 0-23 ]` - random value between `[ a, b ]`.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported, and it can only be used for faction camps.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported.
| class | The class of the npc that you wish to spawn |
| add_trait | A string of array of strings for traits the npc starts with.
| unique_id | A string for the unique_id the npc has.
@@ -671,7 +684,7 @@ Using `place_variables` to set a group of variables.
|Field|Description |
|--|--|
| x, y | Spawn coordinates ( specific or area rectangle ). Value: 0-23 or `[ 0-23, 0-23 ]` - random value between `[ a, b ]`.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported, and it can only be used for faction camps.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported.
| name | The name of the global variable to set with the absolute coordinates of x and y.

## Spawn specific items with a "place_item" array
@@ -690,7 +703,7 @@ Example:
| --- | ---
| item | (required) ID of the item to spawn
| x, y | (required) Spawn coordinates. Value from `0-23`, or range `[ 0-23, 0-23 ]` for a random value in that range.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported, and it can only be used for faction camps.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported.
| amount | (required) Number of items to spawn. Single integer, or range `[ a, b ]` for a random value in that range.
| chance | (optional) One-in-N chance to spawn item.
| repeat | (optional) Value: `[ n1, n2 ]`. Spawn item randomly between `n1` and `n2` times. Only makes sense if the coordinates are random. Example: `[ 1, 3 ]` - repeat 1-3 times.
@@ -710,7 +723,7 @@ Example:
| --- | ---
| id | (required) ID of the faction to apply ownership to.
| x, y | (required) Spawn coordinates. Value from `0-23`, or range `[ 0-23, 0-23 ]` for a random value in that range.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported, and it can only be used for faction camps.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported.

This is an array, so multiple entries can be defined.

@@ -1172,7 +1185,7 @@ Place_nested allows for conditional spawning of chunks based on the `"id"`s and/
| --- | ---
| chunks/else_chunks | (required, string) the nested_mapgen_id of the chunk that will be conditionally placed. Chunks are placed if the specified neighbor matches, and "else_chunks" otherwise.
| x and y | (required, int) the cardinal position in which the chunk will be placed.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported, and it can only be used for faction camps.
| z | (optional) Relative Z coordinate for placement at a different Z level than the nominal one. Value from `-20 to 20`. Also note that range is not supported.
| neighbors | (optional) Any of the neighboring overmaps that should be checked before placing the chunk. Each direction is associated with a list of overmap `"id"` substrings. See [JSON_INFO.md](JSON_INFO.md#Starting-locations) "terrain" section to do more advanced searches, note this field defaults to CONTAINS not TYPE.
| joins | (optional) Any mutable overmap special joins that should be checked before placing the chunk. Each direction is associated with a list of join `"id"` strings.
| flags | (optional) Any overmap terrain flags that should be checked before placing the chunk. Each direction is associated with a list of `oter_flags` flags.
Loading

Unchanged files with check annotations Beta

player_character.set_value( "THIEF_MODE", "THIEF_HONEST" );
player_character.set_value( "THIEF_MODE_KEEP", "YES" );
//~ Thief mode cycled between THIEF_ASK/THIEF_HONEST/THIEF_STEAL
add_msg( _( "You will not pick up other peoples belongings." ) );

Check failure on line 2854 in src/handle_action.cpp

GitHub Actions / build (src)

Translator comment without a matching raw string [cata-translator-comments,-warnings-as-errors]
} else if( player_character.get_value( "THIEF_MODE" ) == "THIEF_HONEST" ) {
player_character.set_value( "THIEF_MODE", "THIEF_STEAL" );
player_character.set_value( "THIEF_MODE_KEEP", "YES" );
//~ Thief mode cycled between THIEF_ASK/THIEF_HONEST/THIEF_STEAL
add_msg( _( "You will pick up also those things that belong to others!" ) );
} else if( player_character.get_value( "THIEF_MODE" ) == "THIEF_STEAL" ) {

Check failure on line 2860 in src/handle_action.cpp

GitHub Actions / build (src)

Translator comment without a matching raw string [cata-translator-comments,-warnings-as-errors]
player_character.set_value( "THIEF_MODE", "THIEF_ASK" );
player_character.set_value( "THIEF_MODE_KEEP", "NO" );
//~ Thief mode cycled between THIEF_ASK/THIEF_HONEST/THIEF_STEAL
get_options().get_option( "AUTO_PICKUP" ).getMenuText(),
get_options().get_option( "AUTO_PICKUP" ).getValueName() );
break;

Check failure on line 2889 in src/handle_action.cpp

GitHub Actions / build (src)

Translator comment without a matching raw string [cata-translator-comments,-warnings-as-errors]
case ACTION_DISPLAY_SCENT:
case ACTION_DISPLAY_SCENT_TYPE:
if( MAP_SHARING::isCompetitive() && !MAP_SHARING::isDebugger() ) {
break; //don't do anything when sharing and not debugger
}
display_scent();

Check failure on line 2895 in src/handle_action.cpp

GitHub Actions / build (src)

Translator comment without a matching raw string [cata-translator-comments,-warnings-as-errors]
break;
case ACTION_DISPLAY_TEMPERATURE:
expected_armor_values( hazmat, 4, 4, 3.2, 2, 9, 1, 20 );
// Protection info displayed on two lines
CHECK( item_info_str( hazmat, protection ) ==

Check failure on line 1291 in tests/iteminfo_test.cpp

GitHub Actions / GCC 9, Curses, LTO

"--

Check failure on line 1291 in tests/iteminfo_test.cpp

GitHub Actions / GCC 11, Ubuntu, Curses, ASan

"--

Check failure on line 1291 in tests/iteminfo_test.cpp

GitHub Actions / GCC 12, Ubuntu cross-compile to MinGW-Win64, Tiles, Sound

"--

Check failure on line 1291 in tests/iteminfo_test.cpp

GitHub Actions / GCC 9, Ubuntu, Tiles, Sound, CMake

"--
"--\n"
"<color_c_white>Protection for</color>: The <color_c_cyan>arms</color>. The <color_c_cyan>eyes</color>. The <color_c_cyan>feet</color>. The <color_c_cyan>hands</color>. The <color_c_cyan>head</color>. The <color_c_cyan>legs</color>. The <color_c_cyan>mouth</color>. The <color_c_cyan>torso</color>.\n"
"<color_c_white>Coverage</color>: <color_c_light_blue>Outer</color>.\n"
" Acid: <color_c_yellow>9.00</color>\n"
" Fire: <color_c_yellow>1.00</color>\n"
" Environmental: <color_c_yellow>20</color>\n"
);

Check failure on line 1304 in tests/iteminfo_test.cpp

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

"--

Check failure on line 1304 in tests/iteminfo_test.cpp

GitHub Actions / Clang 14, macOS 12, Tiles, Sound, x64 and arm64 Universal Binary

"--

Check failure on line 1304 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--

Check failure on line 1304 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--
}
SECTION( "check that material resistances are properly overriden" ) {
expected_armor_values( zentai, 2, 2, 50, 2, 9, 2, 10 );
// Protection info displayed on two lines
CHECK( item_info_str( zentai, protection ) ==

Check failure on line 1315 in tests/iteminfo_test.cpp

GitHub Actions / GCC 9, Curses, LTO

"--

Check failure on line 1315 in tests/iteminfo_test.cpp

GitHub Actions / GCC 11, Ubuntu, Curses, ASan

"--

Check failure on line 1315 in tests/iteminfo_test.cpp

GitHub Actions / GCC 12, Ubuntu cross-compile to MinGW-Win64, Tiles, Sound

"--

Check failure on line 1315 in tests/iteminfo_test.cpp

GitHub Actions / GCC 9, Ubuntu, Tiles, Sound, CMake

"--
"--\n"
"<color_c_white>Protection for</color>: The <color_c_cyan>arms</color>. The <color_c_cyan>eyes</color>. The <color_c_cyan>feet</color>. The <color_c_cyan>hands</color>. The <color_c_cyan>head</color>. The <color_c_cyan>legs</color>. The <color_c_cyan>mouth</color>. The <color_c_cyan>torso</color>.\n"
"<color_c_white>Coverage</color>: <color_c_light_blue>Close to skin</color>.\n"
" Acid: <color_c_yellow>9.00</color>\n"
" Fire: <color_c_yellow>2.00</color>\n"
" Environmental: <color_c_yellow>10</color>\n"
);

Check failure on line 1328 in tests/iteminfo_test.cpp

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

"--

Check failure on line 1328 in tests/iteminfo_test.cpp

GitHub Actions / Clang 14, macOS 12, Tiles, Sound, x64 and arm64 Universal Binary

"--

Check failure on line 1328 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--

Check failure on line 1328 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--
}
SECTION( "complex protection from physical and environmental damage" ) {
" Cut: <color_c_red>1.00</color>, <color_c_yellow>12.00</color>, <color_c_green>23.00</color>\n"
" Ballistic: <color_c_red>1.00</color>, <color_c_yellow>8.50</color>, <color_c_green>16.00</color>\n"
" Pierce: <color_c_red>0.80</color>, <color_c_yellow>9.60</color>, <color_c_green>18.40</color>\n"
);

Check failure on line 1350 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--
}
SECTION( "pet armor with good physical and environmental protection" ) {
" Acid: <color_c_yellow>5.00</color>\n"
" Fire: <color_c_yellow>3.00</color>\n"
" Environmental: <color_c_yellow>10</color>\n"
);

Check failure on line 1370 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--
}
}
" Fire: <color_c_yellow>1.50</color>\n"
" Environmental: <color_c_yellow>6</color>\n";
CHECK( a_str == info_str );

Check failure on line 3005 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--
CHECK( a_copy_str == info_str );

Check failure on line 3006 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--
CHECK( a_copy_w_armor_str == info_str );

Check failure on line 3007 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--
const std::string info_prop_str =
"--\n"
" Fire: <color_c_yellow>1.75</color>\n"
" Environmental: <color_c_yellow>7</color>\n";
CHECK( a_copy_prop_str == info_prop_str );

Check failure on line 3023 in tests/iteminfo_test.cpp

GitHub Actions / Clang 12, Ubuntu, Tiles, ASan

"--
CHECK( a_copy_w_armor_prop_str == info_prop_str );
const std::string info_rel_str =