diff --git a/df_dependencies/README.md b/df_dependencies/README.md index 7660bfd..ae97313 100644 --- a/df_dependencies/README.md +++ b/df_dependencies/README.md @@ -1,3 +1,5 @@ The DF_Caverns modpack was originally written based on the minetest_game. It made extensive use of various nodes and helper functions that came from minetest_game's constituent mods. -When Mineclone games rose in popularity, the task of making it compatible was a daunting one - there were dependencies on minetest_game's mods scattered everywhere. To make the task manageable, I created this mod to serve as a central location where analogous objects could be taken from those games to be referenced in a generic way. \ No newline at end of file +When Mineclone games rose in popularity, the task of making it compatible was a daunting one - there were dependencies on minetest_game's mods scattered everywhere. To make the task manageable, I created this mod to serve as a central location where analogous objects could be taken from those games to be referenced in a generic way. + +This requires abusing the "dependencies" system of Minetest, unfortunately. This mod is an enormous collection of either/or dependencies - things that can come from either mod A or mod B, but must come from one of them. \ No newline at end of file diff --git a/df_farming/plants.lua b/df_farming/plants.lua index 626caf5..871179e 100644 --- a/df_farming/plants.lua +++ b/df_farming/plants.lua @@ -167,7 +167,7 @@ local place_seed = function(itemstack, placer, pointed_thing, plantname) end end - if not minetest.settings:get_bool("creative_mode", false) then + if not minetest.is_creative_enabled(placer:get_player_name()) then itemstack:take_item() end return itemstack diff --git a/df_farming/plump_helmet.lua b/df_farming/plump_helmet.lua index a8e61ea..71266ea 100644 --- a/df_farming/plump_helmet.lua +++ b/df_farming/plump_helmet.lua @@ -77,7 +77,7 @@ local plump_helmet_on_place = function(itemstack, placer, pointed_thing, plantn end end - if not minetest.settings:get_bool("creative_mode", false) then + if not minetest.is_creative_enabled(placer:get_player_name()) then itemstack:take_item() end return itemstack diff --git a/df_mapitems/util.lua b/df_mapitems/util.lua index 3867e01..a4723d3 100644 --- a/df_mapitems/util.lua +++ b/df_mapitems/util.lua @@ -59,7 +59,7 @@ df_mapitems.place_against_surface = function(itemstack, placer, pointed_thing) end -- add the node and remove 1 item from the itemstack minetest.add_node(above_pos, {name = itemstack:get_name(), param2 = param2}) - if not minetest.settings:get_bool("creative_mode", false) and not minetest.check_player_privs(placer, "creative") then + if not minetest.is_creative_enabled(placer:get_player_name()) then itemstack:take_item() end return itemstack diff --git a/df_trees/spindlestem.lua b/df_trees/spindlestem.lua index 820a729..a37b52e 100644 --- a/df_trees/spindlestem.lua +++ b/df_trees/spindlestem.lua @@ -70,7 +70,7 @@ local stem_on_place = function(itemstack, placer, pointed_thing) end end - if (not minetest.settings:get_bool("creative_mode", false)) and take_item then + if not minetest.is_creative_enabled(placer:get_player_name()) and take_item then itemstack:take_item() end return itemstack diff --git a/df_trees/torchspine.lua b/df_trees/torchspine.lua index a824701..0f28da0 100644 --- a/df_trees/torchspine.lua +++ b/df_trees/torchspine.lua @@ -71,7 +71,7 @@ local stal_on_place = function(itemstack, placer, pointed_thing) end end - if (not minetest.settings:get_bool("creative_mode", false)) and take_item then + if not minetest.is_creative_enabled(placer:get_player_name()) and take_item then itemstack:take_item() end return itemstack diff --git a/df_underworld_items/ancient_lanterns.lua b/df_underworld_items/ancient_lanterns.lua index faa4335..a2782f2 100644 --- a/df_underworld_items/ancient_lanterns.lua +++ b/df_underworld_items/ancient_lanterns.lua @@ -47,7 +47,7 @@ local punch_fix = function(pos, node, puncher, pointed_thing) if wielded:get_name() == mese_crystal_node then minetest.set_node(pos, {name="df_underworld_items:ancient_lantern_slade"}) minetest.get_node_timer(pos):stop() - if not (creative and creative.is_enabled_for and creative.is_enabled_for(puncher:get_player_name())) then + if not minetest.is_creative_enabled(puncher:get_player_name()) then wielded:take_item() puncher:set_wielded_item(wielded) end diff --git a/df_underworld_items/slade.lua b/df_underworld_items/slade.lua index bab34e8..87adb7c 100644 --- a/df_underworld_items/slade.lua +++ b/df_underworld_items/slade.lua @@ -57,7 +57,9 @@ if invulnerable then end minetest.register_node("df_underworld_items:slade_brick", slade_brick_def) -local slade_wall_groups = {wall=1} +-- can't use "wall=1" because MCL has special handling for nodes in that group that explodes if it tries handling this one. +-- fortunately minetest_game walls also connect to group fence, so this should be fine. +local slade_wall_groups = {fence=1} for key, val in pairs(slade_groups) do slade_wall_groups[key]=val end diff --git a/looped_node_sound/init.lua b/looped_node_sound/init.lua index e569339..3feb267 100644 --- a/looped_node_sound/init.lua +++ b/looped_node_sound/init.lua @@ -1,5 +1,15 @@ looped_node_sound = {} +--looped_node_sound.register({ +-- node_list = {}, +-- sound = , +-- radius = , +-- cycle_time =, +-- gain_per_node =, +-- max_gain =, +-- max_hear_distance =, +--}) + looped_node_sound.register = function(def) local handles = {} local timer = 0