Compare commits
5 Commits
94e8b69ba6
...
30bf077cfe
Author | SHA1 | Date |
---|---|---|
Wuzzy | 30bf077cfe | |
Wuzzy | 102aa3de13 | |
Wuzzy | 8d6f957fb0 | |
Wuzzy | 9f51e99aaa | |
Wuzzy | 462d10d058 |
|
@ -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! :-)
|
||||
|
|
10
drip.lua
10
drip.lua
|
@ -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
|
||||
|
||||
|
|
7
init.lua
7
init.lua
|
@ -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
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
Loading…
Reference in New Issue