diff --git a/.luacheckrc b/.luacheckrc index 0a2d0fe..bffcca4 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -13,6 +13,5 @@ read_globals = { "vector", "ItemStack", "dump", "VoxelArea", - "unifieddyes", "mesecon", "default", - "scifi_nodes" + "unifieddyes", "mesecon", "default" } diff --git a/card_scanner.lua b/card_scanner.lua index cbc9283..fa05582 100644 --- a/card_scanner.lua +++ b/card_scanner.lua @@ -23,7 +23,7 @@ local function activate_palm_scanner(pos, node, player) if meta:get_int("configured") ~= 1 then if key_name then - minetest.sound_play("scifi_nodes_palm_scanner", {max_hear_distance = 8, pos = pos, gain = 1.0}) + minetest.sound_play("access_cards_scanning", {max_hear_distance = 8, pos = pos, gain = 1.0}) meta:set_string("key", key_name) meta:set_int("configured", 1) minetest.chat_send_player(name, "Scanner-key set to '" .. key_name .. "'") @@ -41,13 +41,14 @@ local function activate_palm_scanner(pos, node, player) minetest.swap_node(pos, node) minetest.chat_send_player(name, "Access denied !") - minetest.sound_play("scifi_nodes_scanner_refused", {max_hear_distance = 8, pos = pos, gain = 1.0}) + minetest.sound_play("access_cards_refused", {max_hear_distance = 8, pos = pos, gain = 1.0}) else node.name = "access_cards:palm_scanner_on" minetest.swap_node(pos, node) minetest.chat_send_player(name, "Access granted !") + minetest.sound_play("access_cards_granted", {max_hear_distance = 8, pos = pos, gain = 1.0}) mesecon.receptor_on(pos) -- reset state @@ -62,9 +63,9 @@ end minetest.register_node("access_cards:palm_scanner_off", { description = "Palm scanner", - tiles = {"scifi_nodes_palm_scanner_off.png",}, - inventory_image = "scifi_nodes_palm_scanner_off.png", - wield_image = "scifi_nodes_palm_scanner_on.png", + tiles = {"access_cards_scanner_off.png",}, + inventory_image = "access_cards_scanner_off.png", + wield_image = "access_cards_scanner_on.png", drawtype = "signlike", sunlight_propagates = true, buildable_to = false, @@ -85,7 +86,7 @@ minetest.register_node("access_cards:palm_scanner_off", { minetest.register_node("access_cards:palm_scanner_checking", { description = "Palm scanner", tiles = {{ - name = "scifi_nodes_palm_scanner_checking.png", + name = "access_cards_scanner_checking.png", animation = {type = "vertical_frames",aspect_w = 16,aspect_h = 16,length = 1.5} }}, drawtype = "signlike", @@ -104,9 +105,9 @@ minetest.register_node("access_cards:palm_scanner_on", { description = "Palm scanner", sunlight_propagates = true, buildable_to = false, - tiles = {"scifi_nodes_palm_scanner_on.png",}, - inventory_image = "scifi_nodes_palm_scanner_on.png", - wield_image = "scifi_nodes_palm_scanner_on.png", + tiles = {"access_cards_scanner_on.png",}, + inventory_image = "access_cards_scanner_on.png", + wield_image = "access_cards_scanner_on.png", drawtype = "signlike", node_box = {type = "wallmounted",}, selection_box = {type = "wallmounted",}, diff --git a/init.lua b/init.lua index 15c7cd4..fe523c8 100644 --- a/init.lua +++ b/init.lua @@ -5,7 +5,7 @@ access_cards = {} dofile(MP.."/form.accesscard.lua") dofile(MP.."/cards.lua") -if minetest.get_modpath("scifi_nodes") and minetest.get_modpath("mesecons") then +if minetest.get_modpath("mesecons") then dofile(MP.."/card_scanner.lua") end diff --git a/mod.conf b/mod.conf index ca8b004..0ab9cb2 100644 --- a/mod.conf +++ b/mod.conf @@ -1,3 +1,3 @@ name = access_cards depends = unifieddyes -optional_depends = scifi_nodes, mesecons +optional_depends = mesecons diff --git a/sounds/access_cards_granted.ogg b/sounds/access_cards_granted.ogg new file mode 100644 index 0000000..195a216 Binary files /dev/null and b/sounds/access_cards_granted.ogg differ diff --git a/sounds/access_cards_refused.ogg b/sounds/access_cards_refused.ogg new file mode 100644 index 0000000..d6c8363 Binary files /dev/null and b/sounds/access_cards_refused.ogg differ diff --git a/sounds/access_cards_scanning.ogg b/sounds/access_cards_scanning.ogg new file mode 100644 index 0000000..05bdcd5 Binary files /dev/null and b/sounds/access_cards_scanning.ogg differ diff --git a/textures/access_cards_scanner_checking.png b/textures/access_cards_scanner_checking.png new file mode 100644 index 0000000..eef3c0f Binary files /dev/null and b/textures/access_cards_scanner_checking.png differ diff --git a/textures/access_cards_scanner_off.png b/textures/access_cards_scanner_off.png new file mode 100644 index 0000000..dea5a96 Binary files /dev/null and b/textures/access_cards_scanner_off.png differ diff --git a/textures/access_cards_scanner_on.png b/textures/access_cards_scanner_on.png new file mode 100644 index 0000000..5d00c1a Binary files /dev/null and b/textures/access_cards_scanner_on.png differ