commit 655116fae052770bda09f4440298f9f4db6480f2 Author: Elias Fleckenstein Date: Fri Dec 11 17:33:56 2020 +0100 Initial Commit diff --git a/README b/README new file mode 100644 index 0000000..bb88aff --- /dev/null +++ b/README @@ -0,0 +1,2 @@ +# draining +Everything you need to drain Clamity Spawn! diff --git a/autodam/README b/autodam/README new file mode 100644 index 0000000..2dfa64f --- /dev/null +++ b/autodam/README @@ -0,0 +1,2 @@ +# autodam +A dragonfire CSM to automatically build dirt walls in MineClone2 diff --git a/autodam/init.lua b/autodam/init.lua new file mode 100644 index 0000000..35669cc --- /dev/null +++ b/autodam/init.lua @@ -0,0 +1,19 @@ +minetest.register_globalstep(function() + if not minetest.settings:get_bool("autodam") then return end + local player = minetest.localplayer + if not player then end + if player:get_wielded_item():get_name() ~= "mcl_core:dirt" then return end + local dirt = minetest.find_nodes_near(vector.add(player:get_pos(), vector.new(0, 1, 0)), 4, "mcl_core:dirt") + for _, dp in ipairs(dirt) do + local above = minetest.get_node_or_nil(vector.add(dp, vector.new(0, 1, 0))) + if above and above.name == "mcl_core:dirt" then + local underp = vector.subtract(dp, vector.new(0, 1, 0)) + local under = minetest.get_node_or_nil(underp) + if under and under.name == "mcl_core:water_source" then + minetest.place_node(underp) + end + end + end +end) + +minetest.register_cheat("AutoDam", "World", "autodam") diff --git a/autodam/mod.conf b/autodam/mod.conf new file mode 100644 index 0000000..c0b366e --- /dev/null +++ b/autodam/mod.conf @@ -0,0 +1,4 @@ +name = autodam +author = Fleckenstein +description = A dragonfire CSM to automatically build dirt walls in MineClone2 + diff --git a/autodam/settingtypes.txt b/autodam/settingtypes.txt new file mode 100644 index 0000000..1cdcd39 --- /dev/null +++ b/autodam/settingtypes.txt @@ -0,0 +1 @@ +autodam (AutoDam) bool false diff --git a/autosponge/README b/autosponge/README new file mode 100644 index 0000000..178043d --- /dev/null +++ b/autosponge/README @@ -0,0 +1,2 @@ +# autosponge +A dragonfire CSM to automatically place sponges into water diff --git a/autosponge/init.lua b/autosponge/init.lua new file mode 100644 index 0000000..ada014f --- /dev/null +++ b/autosponge/init.lua @@ -0,0 +1,20 @@ +local etime = 0.0 + +minetest.register_globalstep(function(dtime) + if not minetest.settings:get_bool("autosponge") then return end + local player = minetest.localplayer + if not player then end + if player:get_wielded_item():get_name() ~= "mcl_sponges:sponge" then return end + etime = etime + dtime + if etime >= 0.3 then + etime = 0.0 + else + return + end + local water = minetest.find_node_near(player:get_pos(), 4, "mcl_core:water_source") + if water then + minetest.place_node(water) + end +end) + +minetest.register_cheat("AutoSponge", "World", "autosponge") diff --git a/autosponge/mod.conf b/autosponge/mod.conf new file mode 100644 index 0000000..ecd84f2 --- /dev/null +++ b/autosponge/mod.conf @@ -0,0 +1,3 @@ +name = autosponge +author = Fleckenstein +description = A dragonfire CSM to automatically place sponges into water diff --git a/autosponge/settingtypes.txt b/autosponge/settingtypes.txt new file mode 100644 index 0000000..70dcaee --- /dev/null +++ b/autosponge/settingtypes.txt @@ -0,0 +1 @@ +autosponge (AutoSponge) bool false diff --git a/autotntsponge/README b/autotntsponge/README new file mode 100644 index 0000000..2ca3466 --- /dev/null +++ b/autotntsponge/README @@ -0,0 +1,2 @@ +# autotntsponge +A dragonfire CSM to automatically place tnt onto sponges diff --git a/autotntsponge/init.lua b/autotntsponge/init.lua new file mode 100644 index 0000000..8e16efa --- /dev/null +++ b/autotntsponge/init.lua @@ -0,0 +1,12 @@ +minetest.register_globalstep(function(dtime) + if not minetest.settings:get_bool("autotntsponge") then return end + local player = minetest.localplayer + if not player then end + if player:get_wielded_item():get_name() ~= "mcl_tnt:tnt" then return end + local sponges = minetest.find_nodes_near_under_air(player:get_pos(), 4, {"mcl_sponges:sponge", "mcl_sponges:sponge_wet"}) + for _, p in ipairs(sponges) do + minetest.place_node(vector.add(p, vector.new(0, 1, 0))) + end +end) + +minetest.register_cheat("AutoTNTSponge", "World", "autotntsponge") diff --git a/autotntsponge/mod.conf b/autotntsponge/mod.conf new file mode 100644 index 0000000..80babb0 --- /dev/null +++ b/autotntsponge/mod.conf @@ -0,0 +1,3 @@ +name = autotntsponge +author = Fleckenstein +description = A dragonfire CSM to automatically place tnt onto sponges diff --git a/autotntsponge/settingtypes.txt b/autotntsponge/settingtypes.txt new file mode 100644 index 0000000..6939cb1 --- /dev/null +++ b/autotntsponge/settingtypes.txt @@ -0,0 +1 @@ +autotntsponge (AutoTNTSponge) bool false diff --git a/modpack.conf b/modpack.conf new file mode 100644 index 0000000..0998b77 --- /dev/null +++ b/modpack.conf @@ -0,0 +1,3 @@ +name = draining +description = Everything you need to drain Clamity Spawn! +author = Fleckenstein