stop timer at location x,y */ nh.stop_timer_at(x,y, "melt-ice"); */ nh.stop_timer_at({x=6,y=8}, "melt-ice"); */
| 1584 | /* nh.stop_timer_at(x,y, "melt-ice"); */ |
| 1585 | /* nh.stop_timer_at({x=6,y=8}, "melt-ice"); */ |
| 1586 | staticfn int |
| 1587 | nhl_timer_stop_at(lua_State *L) |
| 1588 | { |
| 1589 | short timertype = nhl_get_timertype(L, -1); |
| 1590 | lua_Integer lx, ly; |
| 1591 | coordxy x, y; |
| 1592 | |
| 1593 | lua_pop(L, 1); /* remove timertype */ |
| 1594 | if (!nhl_get_xy_params(L, &lx, &ly)) { |
| 1595 | nhl_error(L, "nhl_timer_stop_at: Wrong args"); |
| 1596 | /*NOTREACHED*/ |
| 1597 | return 0; |
| 1598 | } |
| 1599 | |
| 1600 | x = (coordxy) lx; |
| 1601 | y = (coordxy) ly; |
| 1602 | cvt_to_abscoord(&x, &y); |
| 1603 | |
| 1604 | if (timer_is_pos(timertype) && isok(x, y)) |
| 1605 | spot_stop_timers(x, y, timertype); |
| 1606 | return 0; |
| 1607 | } |
| 1608 | |
| 1609 | /* start timer at location x,y */ |
| 1610 | /* nh.start_timer_at(x,y, "melt-ice", 10); */ |
nothing calls this directly
no test coverage detected