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

Function setTilesByKeyword

plugins/burrow.cpp:330–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330static bool setTilesByKeyword(df::burrow *target, std::string name, bool enable) {
331 CHECK_NULL_POINTER(target);
332
333 df::tile_designation mask;
334 df::tile_designation value;
335
336 if (name == "ABOVE_GROUND")
337 mask.bits.subterranean = true;
338 else if (name == "SUBTERRANEAN")
339 mask.bits.subterranean = value.bits.subterranean = true;
340 else if (name == "LIGHT")
341 mask.bits.light = value.bits.light = true;
342 else if (name == "DARK")
343 mask.bits.light = true;
344 else if (name == "OUTSIDE")
345 mask.bits.outside = value.bits.outside = true;
346 else if (name == "INSIDE")
347 mask.bits.outside = true;
348 else if (name == "HIDDEN")
349 mask.bits.hidden = value.bits.hidden = true;
350 else if (name == "REVEALED")
351 mask.bits.hidden = true;
352 else
353 return false;
354
355 setTilesByDesignation(target, mask, value, enable);
356 return true;
357}
358
359static void copyUnits(df::burrow *target, df::burrow *source, bool enable) {
360 CHECK_NULL_POINTER(target);

Callers 1

tiles_set_add_removeFunction · 0.85

Calls 1

setTilesByDesignationFunction · 0.85

Tested by

no test coverage detected