diff options
author | orwell96 <orwell@bleipb.de> | 2020-04-27 16:02:28 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-02-10 16:36:24 +0100 |
commit | 5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4 (patch) | |
tree | 5c72e9e541401126d5416b6d122893c300b88bea /advtrains/trackplacer.lua | |
parent | b59b0d587d72f78c5923aa501038b93269bba271 (diff) | |
download | advtrains-5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4.tar.gz advtrains-5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4.tar.bz2 advtrains-5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4.zip |
Remove pcall wrappers completely, add command to disable advtrains mainloop
Diffstat (limited to 'advtrains/trackplacer.lua')
-rw-r--r-- | advtrains/trackplacer.lua | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/advtrains/trackplacer.lua b/advtrains/trackplacer.lua index 904d851..356df15 100644 --- a/advtrains/trackplacer.lua +++ b/advtrains/trackplacer.lua @@ -275,8 +275,7 @@ function tp.register_track_placer(nnprefix, imgprefix, dispname, def) groups={advtrains_trackplacer=1, digtron_on_place=1}, liquids_pointable = def.liquids_pointable, on_place = function(itemstack, placer, pointed_thing) - return advtrains.pcall(function() - local name = placer:get_player_name() + local name = placer:get_player_name() if not name then return itemstack, false end @@ -303,7 +302,6 @@ function tp.register_track_placer(nnprefix, imgprefix, dispname, def) end end return itemstack, true - end) end, }) end @@ -317,7 +315,6 @@ minetest.register_craftitem("advtrains:trackworker",{ wield_image = "advtrains_trackworker.png", stack_max = 1, on_place = function(itemstack, placer, pointed_thing) - return advtrains.pcall(function() local name = placer:get_player_name() if not name then return @@ -382,10 +379,8 @@ minetest.register_craftitem("advtrains:trackworker",{ advtrains.ndb.swap_node(pos, {name=nnprefix.."_"..suffix..modext[modpos+1], param2=node.param2}) end end - end) end, on_use=function(itemstack, user, pointed_thing) - return advtrains.pcall(function() local name = user:get_player_name() if not name then return @@ -430,7 +425,6 @@ minetest.register_craftitem("advtrains:trackworker",{ else atprint(name, dump(tp.tracks)) end - end) end, }) |