aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-11-08 22:47:29 +0100
committerorwell96 <orwell@bleipb.de>2021-11-08 22:52:28 +0100
commit45e18326e34537973a4c88a26ad8991e3935d384 (patch)
tree5f03590522985d7fc3bdeb9ce3cced8816fcea76
parent3f6cef730838ed9ab20e445e4078ecc504f1e72e (diff)
downloadadvtrains-45e18326e34537973a4c88a26ad8991e3935d384.tar.gz
advtrains-45e18326e34537973a4c88a26ad8991e3935d384.tar.bz2
advtrains-45e18326e34537973a4c88a26ad8991e3935d384.zip
New-Ks: minor additions/corrections to ywang's work:
- Add sign for line speed 20 (else no way to return to max line speed once set) - When no distant signal info available (default), Ks displays green light (2 sections free) - Normal and wall signals again signal maximum speed (persistent restriction can be given via line speed nouw)
-rw-r--r--advtrains/signals.lua4
-rwxr-xr-xadvtrains_signals_ks/init.lua7
-rw-r--r--advtrains_signals_ks/textures/advtrains_signals_ks_sign_20.pngbin0 -> 5715 bytes
3 files changed, 6 insertions, 5 deletions
diff --git a/advtrains/signals.lua b/advtrains/signals.lua
index 5fb1d1b..b26c950 100644
--- a/advtrains/signals.lua
+++ b/advtrains/signals.lua
@@ -18,7 +18,7 @@ end
local function aspect(b)
return {
- main = (not b) and 0, -- b ? false : 0
+ main = b and -1 or 0,
shunt = false,
proceed_as_main = true,
dst = false,
@@ -27,7 +27,7 @@ return {
end
local suppasp = {
- main = {0, false},
+ main = {0, -1},
dst = {false},
shunt = nil,
proceed_as_main = true,
diff --git a/advtrains_signals_ks/init.lua b/advtrains_signals_ks/init.lua
index 95076e0..e97eb77 100755
--- a/advtrains_signals_ks/init.lua
+++ b/advtrains_signals_ks/init.lua
@@ -60,9 +60,9 @@ local setaspectf = function(rot)
end
setzs3v(pos, nil, rot)
else
- if asp.dst == -1 then
+ if not asp.dst or asp.dst == -1 then
advtrains.ndb.swap_node(pos, {name="advtrains_signals_ks:hs_free_"..rot, param2 = node.param2})
- elseif not asp.dst or asp.dst == 0 then
+ elseif asp.dst == 0 then
advtrains.ndb.swap_node(pos, {name="advtrains_signals_ks:hs_slow_"..rot, param2 = node.param2})
else
advtrains.ndb.swap_node(pos, {name="advtrains_signals_ks:hs_nextslow_"..rot, param2 = node.param2})
@@ -334,7 +334,8 @@ for _, rtab in ipairs({
["6"] = {main = 6, n = "8"},
["8"] = {main = 8, n = "12"},
["12"] = {main = 12, n = "16"},
- ["16"] = {main = 16, n = "4"},
+ ["16"] = {main = 16, n = "20"},
+ ["20"] = {main = 20, n = "4"},
} do
local tile2 = "advtrains_signals_ks_sign_lf7.png^(advtrains_signals_ks_sign_"..typ..".png^[makealpha:255,255,255)"
local inv = "advtrains_signals_ks_sign_lf7.png^(advtrains_signals_ks_sign_8.png^[makealpha:255,255,255)"
diff --git a/advtrains_signals_ks/textures/advtrains_signals_ks_sign_20.png b/advtrains_signals_ks/textures/advtrains_signals_ks_sign_20.png
new file mode 100644
index 0000000..71b540d
--- /dev/null
+++ b/advtrains_signals_ks/textures/advtrains_signals_ks_sign_20.png
Binary files differ