mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2024-12-23 00:20:17 +01:00
Doors righclick bug fixed
This commit is contained in:
parent
03443e41d9
commit
e847e4167f
@ -6,6 +6,9 @@ Minetest mod that adds scifi themed blocks, doors, materials, plants and other a
|
|||||||
|
|
||||||
# Changes log
|
# Changes log
|
||||||
|
|
||||||
|
* 13/08/2019 :
|
||||||
|
* doors_open_with_mesecon_only is now a mod option (default is false)
|
||||||
|
* corrected a typo wich prevented the option to work properly
|
||||||
* 05/09/2019 : door opening on rightclick is disabled (maybe reactivated via a mod option)
|
* 05/09/2019 : door opening on rightclick is disabled (maybe reactivated via a mod option)
|
||||||
* 05/08/2019 :
|
* 05/08/2019 :
|
||||||
* digicodes now work
|
* digicodes now work
|
||||||
|
10
doors.lua
10
doors.lua
@ -16,8 +16,7 @@
|
|||||||
|
|
||||||
-- Retrieving mod settings
|
-- Retrieving mod settings
|
||||||
local scifi_nodes = {}
|
local scifi_nodes = {}
|
||||||
scifi_nodes.doors_open_with_mesecon_only = minetest.settings:get_bool("scifi_nodes.doors_open_with_mesecon_only", true)
|
scifi_nodes.doors_open_with_mesecon_only = minetest.settings:get_bool("scifi_nodes.doors_open_with_mesecon_only", false)
|
||||||
print("Ici !"..dump(scifi_nodes))
|
|
||||||
|
|
||||||
-- Some aliases to deal with old namming policy --
|
-- Some aliases to deal with old namming policy --
|
||||||
minetest.register_alias("scifi_nodes:doors_1a","scifi_nodes:Doom_door_closed")
|
minetest.register_alias("scifi_nodes:doors_1a","scifi_nodes:Doom_door_closed")
|
||||||
@ -267,9 +266,8 @@ for _, current_door in ipairs(doors) do
|
|||||||
rules = mesecons_doors_rules
|
rules = mesecons_doors_rules
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
local doors_rightclick
|
local doors_rightclick = nil -- Crashes serv if empty table !
|
||||||
if scifi_nodes.doors_open_with_mesecon_only then doors_rightclick = {}
|
if not scifi_nodes.doors_open_with_mesecon_only then doors_rightclick = open_doors end
|
||||||
else doors_rightclick = open_door end
|
|
||||||
|
|
||||||
minetest.register_node(closed, {
|
minetest.register_node(closed, {
|
||||||
description = current_door.base_name.." sliding door",
|
description = current_door.base_name.." sliding door",
|
||||||
@ -302,7 +300,7 @@ for _, current_door in ipairs(doors) do
|
|||||||
mesecons = mesecons_doors_def,
|
mesecons = mesecons_doors_def,
|
||||||
on_place = onplace,
|
on_place = onplace,
|
||||||
after_destruct = afterdestruct,
|
after_destruct = afterdestruct,
|
||||||
on_rightclick = rightclick,
|
on_rightclick = doors_rightclick,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node(closed_top, {
|
minetest.register_node(closed_top, {
|
||||||
|
Loading…
Reference in New Issue
Block a user