aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2022-11-19 11:19:17 +0100
committerY. Wang <yw05@forksworld.de>2023-03-23 20:06:02 +0100
commit640d72929d67a516cc870986bd27ed0408eb684d (patch)
tree4cf214846ab2ef62d3c5e8b4dc637432481feebd
parent778c9096ae7e027feae7f72b980cc583b9ec48b2 (diff)
downloadadvtrains-640d72929d67a516cc870986bd27ed0408eb684d.tar.gz
advtrains-640d72929d67a516cc870986bd27ed0408eb684d.tar.bz2
advtrains-640d72929d67a516cc870986bd27ed0408eb684d.zip
Remove pre_occupy (not used); put detailed luacov info in artifacts
-rw-r--r--.build.yml5
-rw-r--r--advtrains_interlocking/distant.lua6
2 files changed, 5 insertions, 6 deletions
diff --git a/.build.yml b/.build.yml
index 8ea9c21..54768a9 100644
--- a/.build.yml
+++ b/.build.yml
@@ -6,6 +6,10 @@ packages:
sources :
- https://git.sr.ht/~gpcf/advtrains
+artifacts:
+- advtrains.luacov.report.out
+- advtrains_interlocking.luacov.report.out
+
tasks:
- install_mineunit : |
@@ -21,4 +25,5 @@ tasks:
~/.luarocks/bin/mineunit -c
~/.luarocks/bin/mineunit -r
sed -n '/^File/,$p' luacov.report.out
+ mv luacov.report.out ~/$i.luacov.report.out
done
diff --git a/advtrains_interlocking/distant.lua b/advtrains_interlocking/distant.lua
index 22f1c9d..726c2b3 100644
--- a/advtrains_interlocking/distant.lua
+++ b/advtrains_interlocking/distant.lua
@@ -110,12 +110,6 @@ local function assign(main, dst, by, skip_update)
end
end
-local function pre_occupy(dst, by)
- local pts_dst = pts(dst)
- unassign_dst(dst)
- db_distant_of[pts_dst] = {nil, by}
-end
-
--- Get the distant signals assigned to a main signal.
-- @function get_distant
-- @param main The position of the main signal.