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

Function getTargetArea

plugins/siege-engine.cpp:515–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515static int getTargetArea(lua_State *L)
516{
517 auto engine = find_engine(L, 1, false, true);
518
519 if (engine && engine->hasTarget())
520 {
521 Lua::Push(L, engine->target.first);
522 Lua::Push(L, engine->target.second);
523 }
524 else
525 {
526 lua_pushnil(L);
527 lua_pushnil(L);
528 }
529
530 return 2;
531}
532
533static void clearTargetArea(df::building_siegeenginest *bld)
534{

Callers

nothing calls this directly

Calls 4

find_engineFunction · 0.85
PushFunction · 0.85
lua_pushnilFunction · 0.85
hasTargetMethod · 0.80

Tested by

no test coverage detected