mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2024-12-22 16:10:18 +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
|
||||
|
||||
* 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/08/2019 :
|
||||
* digicodes now work
|
||||
|
10
doors.lua
10
doors.lua
@ -16,8 +16,7 @@
|
||||
|
||||
-- Retrieving mod settings
|
||||
local scifi_nodes = {}
|
||||
scifi_nodes.doors_open_with_mesecon_only = minetest.settings:get_bool("scifi_nodes.doors_open_with_mesecon_only", true)
|
||||
print("Ici !"..dump(scifi_nodes))
|
||||
scifi_nodes.doors_open_with_mesecon_only = minetest.settings:get_bool("scifi_nodes.doors_open_with_mesecon_only", false)
|
||||
|
||||
-- Some aliases to deal with old namming policy --
|
||||
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
|
||||
},
|
||||
}
|
||||
local doors_rightclick
|
||||
if scifi_nodes.doors_open_with_mesecon_only then doors_rightclick = {}
|
||||
else doors_rightclick = open_door end
|
||||
local doors_rightclick = nil -- Crashes serv if empty table !
|
||||
if not scifi_nodes.doors_open_with_mesecon_only then doors_rightclick = open_doors end
|
||||
|
||||
minetest.register_node(closed, {
|
||||
description = current_door.base_name.." sliding door",
|
||||
@ -302,7 +300,7 @@ for _, current_door in ipairs(doors) do
|
||||
mesecons = mesecons_doors_def,
|
||||
on_place = onplace,
|
||||
after_destruct = afterdestruct,
|
||||
on_rightclick = rightclick,
|
||||
on_rightclick = doors_rightclick,
|
||||
})
|
||||
|
||||
minetest.register_node(closed_top, {
|
||||
|
Loading…
Reference in New Issue
Block a user