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

Enable automatic testing of a few more mods: #36433

Merged
merged 23 commits into from
Dec 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
da6a7cf
Remove useless debug message:
BevapDin Dec 14, 2019
2dfcb21
Convert silent debug message to load message
BevapDin Dec 14, 2019
1db2da5
Remove JSON members that are not visited and therefor useless.
BevapDin Dec 14, 2019
8a944ce
Actually read JSON object member instead of only checking their exist…
BevapDin Dec 21, 2019
5340c74
Only register JSON object members as visited when their value has bee…
BevapDin Dec 21, 2019
f4ac936
Change code to load "looks_like" to only read strings and fail if the…
BevapDin Dec 21, 2019
283bd1b
Change checks for JSON member existence to ignore the type.
BevapDin Dec 21, 2019
8690cb4
Remove generating explicit error message:
BevapDin Dec 24, 2019
328dd45
Explicitly check the value of a boolean JSON object member.
BevapDin Dec 24, 2019
3480f2b
Remove check for unused member.
BevapDin Dec 24, 2019
8c2405f
Fix missing "context" member in "json_flag" objects
BevapDin Dec 21, 2019
e59baa0
Fix JSON members having the wrong type.
BevapDin Dec 21, 2019
22a7ad2
Temporarily comment out some JSON members that don't work as desired.
BevapDin Dec 24, 2019
5dbbb24
Replace monster size entry with volume and mass entry.
BevapDin Dec 24, 2019
9718a36
Add two spaces after a period.
BevapDin Dec 24, 2019
8fc5104
Fix name of JSON member
BevapDin Dec 24, 2019
2434d62
Fix item flags being set on gun data (item flags need to be set on it…
BevapDin Dec 25, 2019
0a28ddd
Remove unnecessary spaces before end of line
BevapDin Dec 25, 2019
f9dbbd5
Remove mods from blacklist as they load properly now.
BevapDin Dec 24, 2019
4536d48
Add subtype entry, so the loading code actually parses the "entries" …
BevapDin Dec 25, 2019
097c266
Ignore unvisited members when skipping an out-of-bounds entry
BevapDin Dec 25, 2019
15f1d0f
Commit changes after running `make style-all-json`
BevapDin Dec 26, 2019
040ae76
Fix spelling mistake. Thanks for pointing that out.
BevapDin Dec 27, 2019
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
5 changes: 0 additions & 5 deletions build-scripts/mod_test_blacklist
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
aftershock
blazemod
crazy_cataclysm
crt_expansion
FIC_Weapons
generic_guns
Graphical_Overmap
mapgen_demo
modular_turrets
more_locations
my_sweet_cataclysm
national_guard_camp
no_medieval_items
sees_player_hitbutton
sees_player_retro
12 changes: 12 additions & 0 deletions data/json/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
{
"id": "EFFECT_INVISIBLE",
"context": [ ],
"type": "json_flag"
},
{
Expand Down Expand Up @@ -70,6 +71,7 @@
},
{
"id": "EFFECT_NIGHT_VISION",
"context": [ ],
"type": "json_flag"
},
{
Expand Down Expand Up @@ -144,6 +146,7 @@
{
"id": "ETHEREAL_ITEM",
"type": "json_flag",
"context": [ ],
"info": "This item disappears as soon as its timer runs out whether it is food or not."
},
{
Expand Down Expand Up @@ -680,38 +683,47 @@
},
{
"id": "EFFECT_FEATHER_FALL",
"context": [ ],
"type": "json_flag"
},
{
"id": "EFFECT_BIO_IMMUNE",
"context": [ ],
"type": "json_flag"
},
{
"id": "EFFECT_BASH_IMMUNE",
"context": [ ],
"type": "json_flag"
},
{
"id": "EFFECT_CUT_IMMUNE",
"context": [ ],
"type": "json_flag"
},
{
"id": "EFFECT_ACID_IMMUNE",
"context": [ ],
"type": "json_flag"
},
{
"id": "EFFECT_STAB_IMMUNE",
"context": [ ],
"type": "json_flag"
},
{
"id": "EFFECT_HEAT_IMMUNE",
"context": [ ],
"type": "json_flag"
},
{
"id": "EFFECT_COLD_IMMUNE",
"context": [ ],
"type": "json_flag"
},
{
"id": "ELECTRIC_IMMUNE",
"context": [ ],
"type": "json_flag"
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/comestibles/carnivore.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
"color": "brown",
"healthy": -8,
"quench": -5,
"calories": "54",
"calories": 54,
"vitamins": [ [ "vitA", 6 ], [ "vitC", 2 ], [ "calcium", 0 ], [ "iron", 8 ], [ "vitB", 155 ] ]
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/deployable.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
"to_hit": -4,
"bashing": 7,
"material": [ "wood" ],
"looks_like": [ "f_wood_keg" ],
"looks_like": "f_wood_keg",
"symbol": "u",
"color": "light_gray",
"use_action": { "type": "deploy_furn", "furn_type": "f_butter_churn" },
Expand Down
1 change: 1 addition & 0 deletions data/json/mapgen/hazardous_waste_sarcophagus.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
{
"id": "nanomaterials",
"type": "item_group",
"subtype": "collection",
"entries": [ { "item": "nanomaterial", "prob": 100 } ]
}
]
2 changes: 1 addition & 1 deletion data/json/mapgen/steel_mill/steel_mill_z2.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
],
"terrain": [ { "M": "t_grate" }, { "8": "t_grate" } ],
"terrain": { "M": "t_grate", "8": "t_grate" },
"furniture": { },
"palettes": [ "steel_mill_palette" ],
"place_monsters": [
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/TALK_TEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"responses": [
{ "text": "This is a basic test response.", "topic": "TALK_DONE" },
{ "text": "This is a cash test response.", "topic": "TALK_DONE", "condition": { "u_has_cash": 500 } },
{ "text": "This is an npc service test response.", "topic": "TALK_DONE", "condition": { "npc_service": 500 } },
{ "text": "This is an npc service test response.", "topic": "TALK_DONE", "condition": { "npc_service": true } },
{ "text": "This is an npc available test response.", "topic": "TALK_DONE", "condition": "npc_available" }
]
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/TALK_TRUE_FOODPERSON.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
]
},
"text": "I am you but from an alternate reality.",
"trial": { "type": "LIE", "difficulty": 10, "mod": { "trust": 1, "value": 1 } },
"trial": { "type": "LIE", "difficulty": 10, "mod": [ [ "TRUST", 1 ], [ "VALUE", 1 ] ] },
"success": { "topic": "TALK_FOODPERSON_MULTIVERSE", "opinion": { "trust": 2, "value": 2 } },
"failure": { "topic": "TALK_FOODPERSON_ONLYONE", "opinion": { "trust": -5, "value": -5 } }
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/isherwood_farm/NPC_Barry_Isherwood.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"destination": "dairy_farm_isherwood_W",
"start": {
"effect": [ { "u_add_var": "u_have_barry_escape", "type": "general", "context": "meeting", "value": "yes" } ],
"assign_mission_target": { "om_terrain": "dairy_farm_isherwood_W", "om_special": "Isherwood Farms", "reveal_radius": 3 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this should still be here, and is retrieved in https://github.com/CleverRaven/Cataclysm-DDA/pull/36433/files#diff-0e0da92a1ece3afd4c1e42acd3a3dc51L375.

As for all the ones struck from the update_mapgen entries: I think the fact that the update_mapgen doesn't use it is an oversight in its implementation rather than useless data on the entries, as without it, it can't differentiate between specials that contain the same overmap terrain (which granted is relatively rare) and thus will target any instance of the omt, but I guess we'll restore the data whenever the implementation gets updated.

"assign_mission_target": { "om_terrain": "dairy_farm_isherwood_W", "reveal_radius": 3 }
},
"end": {
"opinion": { "trust": 5, "value": 5 },
Expand Down
8 changes: 1 addition & 7 deletions data/json/npcs/isherwood_farm/NPC_Carlos_Isherwood.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,7 @@
"end": {
"opinion": { "trust": 1, "value": 1 },
"effect": [ { "u_buy_item": "leather_armor_horse", "count": 1 } ],
"update_mapgen": [
{
"om_terrain": "horse_farm_isherwood_4",
"om_special": "Isherwood Farms",
"set": [ { "point": "furniture", "id": "f_anvil", "x": 6, "y": 12 } ]
}
]
"update_mapgen": [ { "om_terrain": "horse_farm_isherwood_4", "set": [ { "point": "furniture", "id": "f_anvil", "x": 6, "y": 12 } ] } ]
}
},
{
Expand Down
8 changes: 1 addition & 7 deletions data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,7 @@
},
"end": {
"opinion": { "trust": 5, "value": 5 },
"update_mapgen": [
{
"om_terrain": "cabin_isherwood",
"om_special": "Isherwood Farms",
"place_nested": [ { "chunks": [ "cabin_isherwood_update" ], "x": 3, "y": 1 } ]
}
]
"update_mapgen": [ { "om_terrain": "cabin_isherwood", "place_nested": [ { "chunks": [ "cabin_isherwood_update" ], "x": 3, "y": 1 } ] } ]
}
}
]
1 change: 0 additions & 1 deletion data/json/npcs/isherwood_farm/NPC_Eddie_Isherwood.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@
"update_mapgen": [
{
"om_terrain": "rural_outbuilding",
"om_special": "Isherwood Farms",
"place_nested": [ { "chunks": [ "isherwood_outbuilding_kilns" ], "x": 0, "y": 0 } ],
"set": [
{ "point": "furniture", "id": "f_kiln_empty", "x": 8, "y": 13 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
"item": "landough_calrisean",
"start": {
"assign_mission_target": { "om_terrain": "bakery", "reveal_radius": 1, "random": true, "search_range": 120 },
"update_mapgen": { "om_terrain": "bakery", "om_special": "bakery", "place_item": [ { "item": "landough_calrisean", "x": 5, "y": 16 } ] },
"update_mapgen": { "om_terrain": "bakery", "place_item": [ { "item": "landough_calrisean", "x": 5, "y": 16 } ] },
"effect": { "u_add_var": "Dana_Sourdough", "type": "mission", "context": "flag", "value": "in_progress" }
},
"end": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@
"assign_mission_target": { "om_terrain": "evac_center_9", "reveal_radius": 1 },
"update_mapgen": {
"om_terrain": "evac_center_9",
"om_special": "evac_center",
"place_monster": [ { "group": "GROUP_REFUGEE_BOSS_ZOMBIE", "name": "Sean McLaughlin", "x": 10, "y": 10, "target": true } ]
}
},
Expand All @@ -426,7 +425,6 @@
],
"update_mapgen": {
"om_terrain": "evac_center_9",
"om_special": "evac_center",
"set": [ { "square": "terrain", "id": "t_floor", "x": 0, "y": 23, "x2": 1, "y2": 23 } ]
}
},
Expand Down Expand Up @@ -556,7 +554,6 @@
],
"update_mapgen": {
"om_terrain": "evac_center_8",
"om_special": "evac_center",
"set": [
{ "point": "terrain", "id": "t_gates_mech_control_lab", "x": 17, "y": 1 },
{ "point": "terrain", "id": "t_gates_mech_control_lab", "x": 17, "y": 3 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,9 @@
"value": 50000,
"start": {
"update_mapgen": [
{
"om_terrain": "evac_center_19",
"om_special": "evac_center",
"place_npcs": [ { "class": "evac_guard3", "x": 12, "y": 12, "target": true } ]
},
{ "om_terrain": "evac_center_19", "place_npcs": [ { "class": "evac_guard3", "x": 12, "y": 12, "target": true } ] },
{
"om_terrain": "evac_center_7",
"om_special": "evac_center",
"place_npcs": [ { "class": "scavenger_hunter", "x": [ 9, 15 ], "y": [ 9, 15 ] } ]
}
]
Expand Down Expand Up @@ -166,7 +161,7 @@
"difficulty": 5,
"value": 100000,
"start": {
"assign_mission_target": { "om_terrain": "field", "reveal_radius": 5, "random": true, "search_range": [ 10, 50 ] },
"assign_mission_target": { "om_terrain": "field", "reveal_radius": 5, "random": true, "search_range": 30 },
"update_mapgen": {
"place_monster": [
{ "monster": "mon_graboid", "name": "Little Guy", "x": 12, "y": 12, "target": true },
Expand Down
2 changes: 0 additions & 2 deletions data/json/npcs/robofac/NPC_ROBOFAC_INTERCOM.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,10 @@
"update_mapgen": [
{
"om_terrain": "robofachq_surface_b0",
"om_special": "hub_01",
"place_nested": [ { "chunks": [ "robofac_hq_surface_freemerchant_camp" ], "x": 4, "y": 0 } ]
},
{
"om_terrain": "robofachq_surface_entrance",
"om_special": "hub_01",
"place_nested": [ { "chunks": [ "robofac_hq_surface_merc_1" ], "x": 3, "y": 10 } ]
}
],
Expand Down
4 changes: 0 additions & 4 deletions data/json/npcs/tacoma_ranch/NPC_ranch_bartender.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"end": {
"update_mapgen": {
"om_terrain": "ranch_camp_51",
"om_special": "ranch_camp",
"place_nested": [ { "chunks": [ "tacoma_commune_bar_bartender_1" ], "x": 0, "y": 0 } ]
}
}
Expand Down Expand Up @@ -124,7 +123,6 @@
"effect": { "npc_add_trait": "NPC_BRANDY" },
"update_mapgen": {
"om_terrain": "ranch_camp_51",
"om_special": "ranch_camp",
"place_nested": [ { "chunks": [ "tacoma_commune_bar_bartender_2" ], "x": 0, "y": 0 } ]
}
}
Expand Down Expand Up @@ -155,7 +153,6 @@
"effect": { "npc_add_trait": "NPC_RUM" },
"update_mapgen": {
"om_terrain": "ranch_camp_51",
"om_special": "ranch_camp",
"place_nested": [ { "chunks": [ "tacoma_commune_bar_bartender_3" ], "x": 0, "y": 0 } ]
}
}
Expand Down Expand Up @@ -186,7 +183,6 @@
"effect": { "npc_add_trait": "NPC_WHISKEY" },
"update_mapgen": {
"om_terrain": "ranch_camp_51",
"om_special": "ranch_camp",
"place_nested": [ { "chunks": [ "tacoma_commune_bar_bartender_4" ], "x": 0, "y": 0 } ]
}
}
Expand Down
Loading