diff options
author | orwell96 <orwell@bleipb.de> | 2019-01-24 17:50:26 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2019-01-24 17:50:26 +0100 |
commit | 9da148347d304ec2f26af6f813e26cb02bc6a6e7 (patch) | |
tree | 5cd8b9f486821bcaa984246153e957c157765912 /advtrains/helpers.lua | |
parent | 2976bae4522a1682808db55473d9f824c7155cc6 (diff) | |
download | advtrains-9da148347d304ec2f26af6f813e26cb02bc6a6e7.tar.gz advtrains-9da148347d304ec2f26af6f813e26cb02bc6a6e7.tar.bz2 advtrains-9da148347d304ec2f26af6f813e26cb02bc6a6e7.zip |
Basic functions of "stop rail", missing ARS rules and signal.
For signal, need to think of a callback system for signals and moving atlatc queue to core?
Diffstat (limited to 'advtrains/helpers.lua')
-rw-r--r-- | advtrains/helpers.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/advtrains/helpers.lua b/advtrains/helpers.lua index 511d32e..3514f55 100644 --- a/advtrains/helpers.lua +++ b/advtrains/helpers.lua @@ -381,6 +381,7 @@ end -- decodes a position encoded with encode_pos
function advtrains.decode_pos(pts)
+ if not pts or not #pts==6 then return nil end
local stry = string.sub(pts, 1,4)
local strx = string.sub(pts, 5,8)
local strz = string.sub(pts, 9,12)
|