diff options
author | orwell <orwell@bleipb.de> | 2024-01-28 00:42:28 +0100 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2024-01-28 00:42:28 +0100 |
commit | 9fa43cb7bfc25ba71d16c8210f0074797a7bca1a (patch) | |
tree | ff821de8be0737ed276f382a783d3630a4197508 /advtrains_interlocking/tcb_ts_ui.lua | |
parent | f8c2ec60d6fe1927b444aae51c3bce075ed05208 (diff) | |
download | advtrains-9fa43cb7bfc25ba71d16c8210f0074797a7bca1a.tar.gz advtrains-9fa43cb7bfc25ba71d16c8210f0074797a7bca1a.tar.bz2 advtrains-9fa43cb7bfc25ba71d16c8210f0074797a7bca1a.zip |
Implement routesetting incorporating tscache, other improvements
Diffstat (limited to 'advtrains_interlocking/tcb_ts_ui.lua')
-rwxr-xr-x | advtrains_interlocking/tcb_ts_ui.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua index e365f4f..9e7fcd4 100755 --- a/advtrains_interlocking/tcb_ts_ui.lua +++ b/advtrains_interlocking/tcb_ts_ui.lua @@ -99,10 +99,11 @@ minetest.register_node("advtrains_interlocking:tcb_node", { end, after_dig_node = function(pos, oldnode, oldmetadata, player) if not oldmetadata or not oldmetadata.fields then return end + local pname = player:get_player_name() local tcbpts = oldmetadata.fields.tcb_pos if tcbpts and tcbpts ~= "" then local tcbpos = minetest.string_to_pos(tcbpts) - ildb.remove_tcb_at(tcbpos) + ildb.remove_tcb_at(tcbpos, pname) end end, }) @@ -160,7 +161,7 @@ minetest.register_on_punchnode(function(pos, node, player, pointed_thing) if ildb.get_tcb(pos) then minetest.chat_send_player(pname, "Configuring TCB: Already existed at this position, it is now linked to this TCB marker") else - ildb.create_tcb_at(pos) + ildb.create_tcb_at(pos, pname) end local meta = minetest.get_meta(tcbnpos) |