| 1323 | } |
| 1324 | |
| 1325 | static int unitPosAtTime(lua_State *L) |
| 1326 | { |
| 1327 | auto unit = Lua::CheckDFObject<df::unit>(L, 1); |
| 1328 | float time = luaL_checknumber(L, 2); |
| 1329 | |
| 1330 | CHECK_NULL_POINTER(unit); |
| 1331 | |
| 1332 | float lmargin, rmargin; |
| 1333 | auto info = UnitPath::get(unit); |
| 1334 | |
| 1335 | Lua::Push(L, info->posAtTime(time, &lmargin, &rmargin)); |
| 1336 | push_margin(L, lmargin); |
| 1337 | push_margin(L, rmargin); |
| 1338 | return 3; |
| 1339 | } |
| 1340 | |
| 1341 | static bool canTargetUnit(df::unit *unit) |
| 1342 | { |
nothing calls this directly
no test coverage detected