first commit. snow expands.
commit
6b05344b54
|
@ -0,0 +1,41 @@
|
||||||
|
# Compiled Lua sources
|
||||||
|
luac.out
|
||||||
|
|
||||||
|
# luarocks build files
|
||||||
|
*.src.rock
|
||||||
|
*.zip
|
||||||
|
*.tar.gz
|
||||||
|
|
||||||
|
# Object files
|
||||||
|
*.o
|
||||||
|
*.os
|
||||||
|
*.ko
|
||||||
|
*.obj
|
||||||
|
*.elf
|
||||||
|
|
||||||
|
# Precompiled Headers
|
||||||
|
*.gch
|
||||||
|
*.pch
|
||||||
|
|
||||||
|
# Libraries
|
||||||
|
*.lib
|
||||||
|
*.a
|
||||||
|
*.la
|
||||||
|
*.lo
|
||||||
|
*.def
|
||||||
|
*.exp
|
||||||
|
|
||||||
|
# Shared objects (inc. Windows DLLs)
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.so.*
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.exe
|
||||||
|
*.out
|
||||||
|
*.app
|
||||||
|
*.i*86
|
||||||
|
*.x86_64
|
||||||
|
*.hex
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2016 Izzy
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
|
copies of this license document, and changing it is allowed as long
|
||||||
|
as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
|
@ -0,0 +1,11 @@
|
||||||
|
Winter Is Coming
|
||||||
|
=========
|
||||||
|
|
||||||
|
Snow biomes expand and envelope the entire map. Existing resources are transformed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Copyright 2016 Izzy
|
||||||
|
|
||||||
|
WTFPL. Do what the fuck you want.
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
default
|
|
@ -0,0 +1,49 @@
|
||||||
|
|
||||||
|
|
||||||
|
local modpath = minetest.get_modpath("winter_is_coming")
|
||||||
|
|
||||||
|
local modname = "winter_is_coming"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = { "default:snow" },
|
||||||
|
interval = 1,
|
||||||
|
chance = 5,
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
local n = minetest.find_node_near(pos, 2, {"default:dirt_with_grass"})
|
||||||
|
if n == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.set_node(n, {name="default:dirt_with_snow"})
|
||||||
|
|
||||||
|
n.y = n.y + 1
|
||||||
|
local q = minetest.get_node(n)
|
||||||
|
|
||||||
|
if q == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_item_group(q.name, "flora") > 0 then
|
||||||
|
minetest.set_node(n, {name="default:dry_shrub"})
|
||||||
|
end
|
||||||
|
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = { "default:dirt_with_snow" },
|
||||||
|
interval = 1,
|
||||||
|
chance = 10,
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
local n = minetest.find_node_near(pos, 1, {"default:dirt_with_snow"})
|
||||||
|
if n ~= nil then
|
||||||
|
n.y = n.y + 1
|
||||||
|
local q = minetest.get_node(n)
|
||||||
|
if q ~= nil and (q.name == "air" or q.name == "default:grass") then
|
||||||
|
minetest.set_node(n, {name="default:snow"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
Loading…
Reference in New Issue