Compare commits

...

5 Commits

Author SHA1 Message Date
Wuzzy 30bf077cfe Add license (MIT) 2021-07-14 12:18:04 +02:00
Wuzzy 102aa3de13 Remove horrible legacy minetest.env 2016-11-14 01:26:10 +01:00
Wuzzy 8d6f957fb0 Add screenshot 2016-11-13 18:08:37 +01:00
Wuzzy 9f51e99aaa Fix outdated intllib boilerplate 2016-11-09 02:26:57 +01:00
Wuzzy 462d10d058 Add liquid group 2016-11-08 22:38:53 +01:00
4 changed files with 12 additions and 9 deletions

View File

@ -119,3 +119,7 @@ Registers a bunch of `sucky` and `oozing` nodes to Pedology . This function assu
####Return value
`nil`
# License
This mod is free software. The entire mod (code, textures, everything) is licensed under the MIT License. Enjoy! :-)

View File

@ -28,11 +28,11 @@ minetest.register_entity("pedology:drop_water", {
self.object:setacceleration({x=0, y=-5, z=0})
end
if minetest.env:get_node({x=ownpos.x, y=ownpos.y +0.5, z=ownpos.z}).name == "air" then
if minetest.get_node({x=ownpos.x, y=ownpos.y +0.5, z=ownpos.z}).name == "air" then
self.object:setacceleration({x=0, y=-5, z=0})
end
if minetest.env:get_node({x=ownpos.x, y=ownpos.y -0.5, z=ownpos.z}).name ~= "air" then
if minetest.get_node({x=ownpos.x, y=ownpos.y -0.5, z=ownpos.z}).name ~= "air" then
self.object:remove()
minetest.sound_play({name="pedology_drip"}, {pos = ownpos, gain = 0.5, max_hear_distance = 8})
end
@ -40,10 +40,10 @@ minetest.register_entity("pedology:drop_water", {
})
function pedology.create_drip(pos)
if minetest.env:get_node({x=pos.x, y=pos.y -1, z=pos.z}).name == "air" and
minetest.env:get_node({x=pos.x, y=pos.y -2, z=pos.z}).name == "air" then
if minetest.get_node({x=pos.x, y=pos.y -1, z=pos.z}).name == "air" and
minetest.get_node({x=pos.x, y=pos.y -2, z=pos.z}).name == "air" then
local i = math.random(-45,45) / 100
minetest.env:add_entity({x=pos.x + i, y=pos.y - 0.5, z=pos.z + i}, "pedology:drop_water")
minetest.add_entity({x=pos.x + i, y=pos.y - 0.5, z=pos.z + i}, "pedology:drop_water")
end
end

View File

@ -1,7 +1,6 @@
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
S = intllib.Getter()
else
S = function ( s ) return s end
end
@ -178,8 +177,8 @@ end
--[[ liquids ]]
function pedology.register_liquid(basename, description, alpha, viscosity, drowning, damage_per_second, post_effect_color, additional_groups)
local flowing_groups = {wet=6,not_in_creative_inventory=1}
local source_groups = {wet=6}
local flowing_groups = {wet=6,liquid=1,not_in_creative_inventory=1}
local source_groups = {wet=6,liquid=1}
for k,v in pairs(additional_groups) do
flowing_groups[k] = v
source_groups[k] = v

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB