Add mg_water_source that doesn't freeze so ice doesn't take over the ocean
This commit is contained in:
parent
3caca9b881
commit
8072448074
@ -1,5 +1,4 @@
|
||||
-- VARIOUS MISC ADVENTURETEST RELATED STUFF
|
||||
|
||||
adventuretest = {}
|
||||
|
||||
game_origin = nil
|
||||
|
@ -17,6 +17,7 @@ minetest.register_craft({
|
||||
|
||||
bucket = {}
|
||||
bucket.liquids = {}
|
||||
bucket.swaps = {}
|
||||
|
||||
local function check_protection(pos, name, text)
|
||||
if minetest.is_protected(pos, name) then
|
||||
@ -73,6 +74,12 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
||||
end
|
||||
|
||||
local place_liquid = function(pos, node, source, flowing, fullness)
|
||||
if bucket.swaps[source] ~= nil then
|
||||
source = bucket.swaps[source]
|
||||
end
|
||||
if bucket.swaps[flowing] ~= nil then
|
||||
flowing = bucket.swaps[flowing]
|
||||
end
|
||||
if check_protection(pos,
|
||||
user and user:get_player_name() or "",
|
||||
"place "..source) then
|
||||
@ -125,6 +132,11 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
||||
end
|
||||
end
|
||||
|
||||
function bucket.register_swap(source, flowing, new_source, new_flowing)
|
||||
bucket.swaps[source] = new_source
|
||||
bucket.swaps[flowing] = new_flowing
|
||||
end
|
||||
|
||||
minetest.register_craftitem("bucket:bucket_empty", {
|
||||
description = "Empty Bucket",
|
||||
inventory_image = "bucket.png",
|
||||
@ -136,8 +148,8 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
||||
return
|
||||
end
|
||||
-- Check if pointing to a liquid source
|
||||
node = minetest.get_node(pointed_thing.under)
|
||||
liquiddef = bucket.liquids[node.name]
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
local liquiddef = bucket.liquids[node.name]
|
||||
if liquiddef ~= nil and liquiddef.itemname ~= nil and
|
||||
(node.name == liquiddef.source or
|
||||
(node.name == liquiddef.flowing and
|
||||
@ -169,12 +181,14 @@ bucket.register_liquid(
|
||||
|
||||
bucket.register_liquid(
|
||||
"default:mg_water_source",
|
||||
"default:water_flowing",
|
||||
"default:mg_water_flowing",
|
||||
"bucket:bucket_water",
|
||||
"bucket_water.png",
|
||||
"Water Bucket"
|
||||
)
|
||||
|
||||
bucket.register_swap("default:mg_water_source","default:mg_water_flowing","default:water_source","default:water_flowing")
|
||||
|
||||
bucket.register_liquid(
|
||||
"default:lava_source",
|
||||
"default:lava_flowing",
|
||||
|
@ -46,3 +46,4 @@ dofile(minetest.get_modpath("default").."/craftitems.lua")
|
||||
dofile(minetest.get_modpath("default").."/crafting.lua")
|
||||
dofile(minetest.get_modpath("default").."/player.lua")
|
||||
dofile(minetest.get_modpath("default").."/trees.lua")
|
||||
dofile(minetest.get_modpath("default").."/mapgen.lua")
|
||||
|
18
mods/default/mapgen.lua
Normal file
18
mods/default/mapgen.lua
Normal file
@ -0,0 +1,18 @@
|
||||
minetest.register_alias("mapgen_stone", "default:stone")
|
||||
minetest.register_alias("mapgen_dirt", "default:dirt")
|
||||
minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass")
|
||||
minetest.register_alias("mapgen_sand", "default:sand")
|
||||
minetest.register_alias("mapgen_water_source", "default:mg_water_source")
|
||||
minetest.register_alias("mapgen_river_water_source", "default:mg_water_source")
|
||||
minetest.register_alias("mapgen_lava_source", "default:lava_source")
|
||||
minetest.register_alias("mapgen_gravel", "default:gravel")
|
||||
minetest.register_alias("mapgen_desert_stone", "default:desert_stone")
|
||||
minetest.register_alias("mapgen_desert_sand", "default:desert_sand")
|
||||
minetest.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow")
|
||||
minetest.register_alias("mapgen_snowblock", "default:snowblock")
|
||||
minetest.register_alias("mapgen_snow", "default:snow")
|
||||
minetest.register_alias("mapgen_ice", "default:ice")
|
||||
minetest.register_alias("mapgen_sandstone", "default:sandstone")
|
||||
minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
|
||||
minetest.register_alias("mapgen_cobble","default:cobble")
|
||||
minetest.register_alias("mapgen_stair_cobble","stairs:stair_cobble")
|
@ -608,6 +608,41 @@ minetest.register_node("default:water_source", {
|
||||
groups = {water=3, liquid=3, puts_out_fire=1, freezes = 1},
|
||||
})
|
||||
|
||||
minetest.register_node("default:mg_water_flowing", {
|
||||
description = "Flowing Water",
|
||||
inventory_image = minetest.inventorycube("default_water.png"),
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"default_water.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
image="default_water_flowing_animated.png",
|
||||
backface_culling=false,
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.8}
|
||||
},
|
||||
{
|
||||
image="default_water_flowing_animated.png",
|
||||
backface_culling=true,
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.8}
|
||||
},
|
||||
},
|
||||
alpha = WATER_ALPHA,
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "default:mg_water_flowing",
|
||||
liquid_alternative_source = "default:mg_water_source",
|
||||
liquid_viscosity = WATER_VISC,
|
||||
post_effect_color = {a=64, r=100, g=100, b=200},
|
||||
groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, melt_around=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("default:mg_water_source", {
|
||||
description = "Mapgen Water Source",
|
||||
inventory_image = minetest.inventorycube("default_water.png"),
|
||||
@ -632,7 +667,7 @@ minetest.register_node("default:mg_water_source", {
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "default:water_flowing",
|
||||
liquid_alternative_flowing = "default:mg_water_flowing",
|
||||
liquid_alternative_source = "default:mg_water_source",
|
||||
liquid_viscosity = WATER_VISC,
|
||||
post_effect_color = {a=64, r=100, g=100, b=200},
|
||||
|
@ -132,15 +132,11 @@ minetest.register_biome({
|
||||
|
||||
minetest.register_biome({
|
||||
name = "desert",
|
||||
--node_dust = "",
|
||||
node_top = "default:desert_sand",
|
||||
depth_top = 1,
|
||||
node_filler = "default:desert_sand",
|
||||
depth_filler = 1,
|
||||
node_stone = "default:desert_stone",
|
||||
--node_water_top = "",
|
||||
--depth_water_top = ,
|
||||
--node_water = "",
|
||||
y_min = -10,
|
||||
y_max = 230,
|
||||
heat_point = 90,
|
||||
@ -149,7 +145,6 @@ minetest.register_biome({
|
||||
depth_water_top = 2,
|
||||
node_water = "default:mg_water_source",
|
||||
node_river_water = "default:mg_water_source",
|
||||
node_river_water = "default:mg_water_source",
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
@ -160,9 +155,6 @@ minetest.register_biome({
|
||||
node_filler = "default:dirt",
|
||||
depth_filler = 4,
|
||||
node_stone = "default:stone",
|
||||
--node_water_top = "",
|
||||
--depth_water_top = ,
|
||||
--node_water = "",
|
||||
y_min = -10,
|
||||
y_max = 230,
|
||||
heat_point = 90,
|
||||
@ -255,9 +247,6 @@ minetest.register_biome({
|
||||
node_filler = "default:dirt",
|
||||
depth_filler = 6,
|
||||
node_stone = "default:stone",
|
||||
--node_water_top = "default:ice",
|
||||
--depth_water_top = 2,
|
||||
--node_water = "",
|
||||
y_min = -10,
|
||||
y_max = 230,
|
||||
heat_point = 90,
|
||||
|
@ -23,7 +23,7 @@ minetest.register_decoration({
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:sand","default:desert_sand","default:river_gravel"},
|
||||
spawn_by = "default:water_source",
|
||||
spawn_by = "default:mg_water_source",
|
||||
num_spawn_by = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
|
@ -1,22 +1,3 @@
|
||||
minetest.register_alias("mapgen_stone", "default:stone")
|
||||
minetest.register_alias("mapgen_dirt", "default:dirt")
|
||||
minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass")
|
||||
minetest.register_alias("mapgen_sand", "default:sand")
|
||||
minetest.register_alias("mapgen_water_source", "default:mg_water_source")
|
||||
minetest.register_alias("mapgen_river_water_source", "default:mg_water_source")
|
||||
minetest.register_alias("mapgen_lava_source", "default:lava_source")
|
||||
minetest.register_alias("mapgen_gravel", "default:gravel")
|
||||
minetest.register_alias("mapgen_desert_stone", "default:desert_stone")
|
||||
minetest.register_alias("mapgen_desert_sand", "default:desert_sand")
|
||||
minetest.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow")
|
||||
minetest.register_alias("mapgen_snowblock", "default:snowblock")
|
||||
minetest.register_alias("mapgen_snow", "default:snow")
|
||||
minetest.register_alias("mapgen_ice", "default:ice")
|
||||
minetest.register_alias("mapgen_sandstone", "default:sandstone")
|
||||
minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
|
||||
minetest.register_alias("mapgen_cobble","default:cobble")
|
||||
minetest.register_alias("mapgen_stair_cobble","stairs:stair_cobble")
|
||||
|
||||
minetest.register_alias("default:acacia_tree", "mg:savannatree")
|
||||
minetest.register_alias("default:acacia_leaves", "mg:savannaleaves")
|
||||
|
||||
|
@ -261,3 +261,4 @@ stairs.register_stair_and_slab("stonebrick", "default:stonebrick",
|
||||
"Stone Brick Stair",
|
||||
"Stone Brick Slab",
|
||||
default.node_sound_stone_defaults())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user