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

Function jobStartedHandler

plugins/burrow.cpp:130–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130static void jobStartedHandler(color_ostream& out, void* ptr) {
131 DEBUG(event, out).print("entering jobStartedHandler\n");
132
133 df::job *job = (df::job *)ptr;
134 auto type = ENUM_ATTR(job_type, type, job->job_type);
135 if (type != job_type_class::Digging)
136 return;
137
138 const df::coord &pos = job->pos;
139 DEBUG(event, out).print("dig job started: id={}, pos=({}, {}, {}), type={}\n",
140 job->id, pos.x, pos.y, pos.z, ENUM_KEY_STR(job_type, job->job_type));
141 df::tiletype *tt = Maps::getTileType(pos);
142 if (tt)
143 active_dig_jobs[pos] = *tt;
144}
145
146static void add_walls_to_burrow(color_ostream &out, df::burrow* b,
147 const df::coord & pos1, const df::coord & pos2)

Callers 1

init_diggersFunction · 0.85

Calls 2

getTileTypeFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected