MCPcopy Create free account
hub / github.com/crawl/crawl / playable_metadata_json

Function playable_metadata_json

crawl-ref/source/playable.cc:207–214  ·  view source on GitHub ↗

! @brief Returns a JSON object (encoded as a string) of the form * @code * { "species": [...], "jobs": [...], "combos": [...] } * @endcode * * Species are objects of the form: * @code * { "name": "Vine Stalker", "abbr": "VS", "apts": {...}, "modifiers": {...} } * @endcode * * Jobs are objects of the form: * @code * { "name": "Fire Elementalist", "abbr": "F

Source from the content-addressed store, hash-verified

205 * where <modifier-name>: hp, mp, exp, wl.
206 */
207string playable_metadata_json()
208{
209 JsonWrapper json(json_mkobject());
210 json_append_member(json.node, "species", _species_metadata_array());
211 json_append_member(json.node, "jobs", _job_metadata_array());
212 json_append_member(json.node, "combos", _combo_array());
213 return json.to_string();
214}

Callers 1

parse_argsFunction · 0.85

Calls 6

json_mkobjectFunction · 0.85
json_append_memberFunction · 0.85
_species_metadata_arrayFunction · 0.85
_job_metadata_arrayFunction · 0.85
_combo_arrayFunction · 0.85
to_stringMethod · 0.45

Tested by

no test coverage detected