aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--advtrains/digtron.lua25
-rw-r--r--advtrains/init.lua3
-rw-r--r--advtrains/trackplacer.lua2
-rw-r--r--advtrains/wagons.lua2
-rw-r--r--advtrains_train_industrial/init.lua4
5 files changed, 4 insertions, 32 deletions
diff --git a/advtrains/digtron.lua b/advtrains/digtron.lua
deleted file mode 100644
index 7105a54..0000000
--- a/advtrains/digtron.lua
+++ /dev/null
@@ -1,25 +0,0 @@
---digtron.lua
---make tracks placeable by digtrons by overriding the place function.
-
-local old_item_place = digtron.item_place_node
-
-digtron.item_place_node = function(itemstack, placer, place_to, param2)
- if minetest.get_item_group(itemstack:get_name(), "advtrains_trackplacer")>0 then
- return advtrains.pcall(function()
- local def = minetest.registered_items[itemstack:get_name()]
- if not def then return itemstack, false end
-
- local pointed_thing = {}
- pointed_thing.type = "node"
- pointed_thing.above = {x=place_to.x, y=place_to.y, z=place_to.z}
- pointed_thing.under = {x=place_to.x, y=place_to.y - 1, z=place_to.z}
-
- --call the on_rightclick callback
- local success
- itemstack, success = def.on_place(itemstack, placer, pointed_thing)
- return itemstack, success
- end)
- else
- return old_item_place(itemstack, placer, place_to, param2)
- end
-end
diff --git a/advtrains/init.lua b/advtrains/init.lua
index d7bff4d..dee48ac 100644
--- a/advtrains/init.lua
+++ b/advtrains/init.lua
@@ -163,9 +163,6 @@ dofile(advtrains.modpath.."/craft_items.lua")
dofile(advtrains.modpath.."/log.lua")
-if minetest.global_exists("digtron") then
- dofile(advtrains.modpath.."/digtron.lua")
-end
--load/save
diff --git a/advtrains/trackplacer.lua b/advtrains/trackplacer.lua
index c61bbb4..2628daa 100644
--- a/advtrains/trackplacer.lua
+++ b/advtrains/trackplacer.lua
@@ -268,7 +268,7 @@ function tp.register_track_placer(nnprefix, imgprefix, dispname)
description = dispname,
inventory_image = imgprefix.."_placer.png",
wield_image = imgprefix.."_placer.png",
- groups={advtrains_trackplacer=1},
+ groups={advtrains_trackplacer=1, digtron_on_place=1},
on_place = function(itemstack, placer, pointed_thing)
return advtrains.pcall(function()
local name = placer:get_player_name()
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 2dce41b..6baf811 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -599,7 +599,7 @@ function wagon:on_rightclick(clicker)
poss[#poss+1]={name=attrans("Show Inventory"), key="inv"}
end
if self.seat_groups[sgr].driving_ctrl_access and minetest.check_player_privs(pname, "train_operator") then
- poss[#poss+1]={name=attrans("Bord Computer"), key="bordcom"}
+ poss[#poss+1]={name=attrans("Onboard Computer"), key="bordcom"}
end
if self.owner==pname then
poss[#poss+1]={name=attrans("Wagon properties"), key="prop"}
diff --git a/advtrains_train_industrial/init.lua b/advtrains_train_industrial/init.lua
index a60bf74..c654449 100644
--- a/advtrains_train_industrial/init.lua
+++ b/advtrains_train_industrial/init.lua
@@ -29,9 +29,9 @@ advtrains.register_wagon("engine_industrial", {
},
seat_groups = {
dstand={
-
name = "Driver Stand",
access_to = {},
+ driving_ctrl_access = true,
},
},
assign_to_seat_group = {"dstand"},
@@ -66,9 +66,9 @@ advtrains.register_wagon("engine_industrial_big", {
},
seat_groups = {
dstand={
-
name = "Driver Stand",
access_to = {},
+ driving_ctrl_access = true,
},
},
assign_to_seat_group = {"dstand"},