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

Function calcTileStatus

plugins/siege-engine.cpp:1045–1056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1043};
1044
1045static TargetTileStatus calcTileStatus(EngineInfo *engine, const PathMetrics &raytrace)
1046{
1047 if (raytrace.hits())
1048 {
1049 if (engine->isInRange(raytrace.goal_step))
1050 return TARGET_OK;
1051 else
1052 return TARGET_RANGE;
1053 }
1054 else
1055 return TARGET_BLOCKED;
1056}
1057
1058static int projPathMetrics(lua_State *L)
1059{

Callers 3

projPathMetricsFunction · 0.85
getTileStatusFunction · 0.85
paintAimScreenFunction · 0.85

Calls 2

hitsMethod · 0.80
isInRangeMethod · 0.80

Tested by

no test coverage detected