MCPcopy Create free account
hub / github.com/DFHack/dfhack / set_parent

Method set_parent

plugins/3dveins.cpp:320–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318 float density() { return float(num_tiles) / num_unmined; }
319
320 void set_parent(Ptr pp) {
321 if (parent)
322 parent->add_tiles(-num_tiles);
323 parent = pp;
324 if (parent)
325 parent->add_tiles(num_tiles);
326
327 parent_depth = (pp ? pp->parent_depth+1 : 0);
328 }
329
330 int parent_mat() {
331 return parent ? parent->vein.first : SMC_LAYER;

Callers 3

FOR_ENUM_ITEMSFunction · 0.80
form_veinsMethod · 0.80
GetPartialCreatureRawsFunction · 0.80

Calls 1

add_tilesMethod · 0.80

Tested by

no test coverage detected