nh.deltrap(x,y); nh.deltrap({ x = 10, y = 15 }); */
| 468 | |
| 469 | /* nh.deltrap(x,y); nh.deltrap({ x = 10, y = 15 }); */ |
| 470 | staticfn int |
| 471 | nhl_deltrap(lua_State *L) |
| 472 | { |
| 473 | lua_Integer lx, ly; |
| 474 | coordxy x, y; |
| 475 | |
| 476 | if (!nhl_get_xy_params(L, &lx, &ly)) { |
| 477 | nhl_error(L, "Incorrect arguments"); |
| 478 | /*NOTREACHED*/ |
| 479 | return 0; |
| 480 | } |
| 481 | x = (coordxy) lx; |
| 482 | y = (coordxy) ly; |
| 483 | cvt_to_abscoord(&x, &y); |
| 484 | |
| 485 | if (isok(x, y)) { |
| 486 | struct trap *ttmp = t_at(x, y); |
| 487 | |
| 488 | if (ttmp) |
| 489 | deltrap(ttmp); |
| 490 | } |
| 491 | return 0; |
| 492 | } |
| 493 | |
| 494 | RESTORE_WARNING_UNREACHABLE_CODE |
| 495 |
nothing calls this directly
no test coverage detected