diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-02-02 00:02:11 +0100 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2017-02-02 00:02:11 +0100 |
commit | f6d1157ba1b3bc8519b7c01f6b5974b0f9f5cae1 (patch) | |
tree | 9b8196b017264a0cc56d72f2a29af7bd43d87ce2 /advtrains/advtrains_itrainmap/init.lua | |
parent | 78e936bea7831e9a0d253b72ca8a63da558c9e81 (diff) | |
download | advtrains-f6d1157ba1b3bc8519b7c01f6b5974b0f9f5cae1.tar.gz advtrains-f6d1157ba1b3bc8519b7c01f6b5974b0f9f5cae1.tar.bz2 advtrains-f6d1157ba1b3bc8519b7c01f6b5974b0f9f5cae1.zip |
Lua automation - initial incomplete coding
Diffstat (limited to 'advtrains/advtrains_itrainmap/init.lua')
-rw-r--r-- | advtrains/advtrains_itrainmap/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains/advtrains_itrainmap/init.lua b/advtrains/advtrains_itrainmap/init.lua index 60ee944..db1c40b 100644 --- a/advtrains/advtrains_itrainmap/init.lua +++ b/advtrains/advtrains_itrainmap/init.lua @@ -25,7 +25,7 @@ local function create_map_form_with_bg(d) local lbl={} for pts, tid in pairs(advtrains.detector.on_node) do - local pos=minetest.string_to_pos(pts) + local pos=minetest.get_pos_from_hash(pts) form=form.."box["..(edge_x*(pos.x-minx))..","..(form_z-(edge_z*(pos.z-minz)))..";"..len_x..","..len_z..";red]" lbl[sid(tid)]=pos end @@ -52,7 +52,7 @@ local function create_map_form(d) if x>=minx and x<=maxx then for z,y in pairs(itx) do if z>=minz and z<=maxz then - local adn=advtrains.detector.on_node[minetest.pos_to_string({x=x, y=y, z=z})] + local adn=advtrains.detector.on_node[minetest.hash_node_position({x=x, y=y, z=z})] local color="gray" if adn then color="red" |