Merge branch 'NALC2' into NALC

This commit is contained in:
sys4-fr 2017-04-03 19:11:01 +02:00
commit 56226213e1
98 changed files with 359 additions and 7 deletions

6
.gitmodules vendored
View File

@ -79,9 +79,6 @@
[submodule "mods/weather_pack"]
path = mods/weather_pack
url = https://github.com/xeranas/weather_pack.git
[submodule "mods/unifieddyes"]
path = mods/unifieddyes
url = https://github.com/minetest-mods/unifieddyes.git
[submodule "mods/moreplants"]
path = mods/moreplants
url = https://github.com/sys4-fr/moreplants.git
@ -90,3 +87,6 @@
path = mods/moreflowers
url = https://github.com/sys4-fr/moreflowers.git
branch = master
[submodule "mods/unifieddyes"]
path = mods/unifieddyes
url = https://github.com/minetest-mods/unifieddyes.git

2
mods/cotton/depends.txt Executable file
View File

@ -0,0 +1,2 @@
flowers
unifieddyes

292
mods/cotton/init.lua Executable file
View File

@ -0,0 +1,292 @@
-- Cotton, based on the old wool mod by Jordach, still maintained by Jordach.
-- License: WTFPL, following Vanessa's license.
-- Jordan Snelling: jordach@blokkeren.co.cc / jordach.snelling@gmail.com / twitter.com/jordansnelling
-- VanessaE's template code is also used, which is WTFPL.
-- Craft the master WHITE WOOL / register.
minetest.register_craft({
output = 'cotton:white',
recipe = {
{'flowers:cotton', 'flowers:cotton'},
{'flowers:cotton', 'flowers:cotton'},
}
})
-- Generic colored-objects template by Vanessa Ezekowitz ~~ 2012-07-13
-- License: WTFPL
-- Before using this code, consult the README, particularly the "Semi-
-- automatic generation of textures" section at the end, which descibes the
-- use of the gentextures.sh BASH script included in this package. You"ll
-- need to either follow those instructions or create your textures the usual,
-- manual way. Without textures, this code won"t be very useful. :-)
-- When configured properly, this code creates node names that follow the
-- naming convention established in Unified Dyes, such as "mymod:red" or
-- "mymod:dark_yellow_s50".
-- ===========================================================================
-- Edit the next several variables to define what mod this template will
-- generate and how it should behave in general.
-- ===========================================================================
-- First, the standard machine-readable name of your mod
colored_block_modname = "cotton"
-- Human-readable description of the category of nodes you want to generate
colored_block_description = "Cotton"
-- The full node name of the neutral version of your main block as it
-- exists right after crafting or mining it, before any dyes have been
-- applied. Typically, this should refer to the white version of your
-- mod's main block, but it can be anything as long as it makes sense.
neutral_block = colored_block_modname..":white"
-- This variable defines just how many of a given block a crafting operation
-- should give. In most cases, the default (1) is correct.
colored_block_yield = "1"
-- If this object should let sunlight pass through it, set this to "true".
-- Otherwise, set it to "false" (the default).
colored_block_sunlight = "false"
-- If the node should be something you can stand on, set this to "true"
-- (the default). Otherwise, set it to false.
colored_block_walkable = "true"
-- What groups should the generated nodes belong to? Note that this must
-- be in the form of a table as in the default.
colored_block_groups = { snappy=3, flammable=2 }
-- What sound should be played when the node is digged?
colored_block_sound = "default.node_sound_leaves_defaults()"
-- ======================================================
-- You shouldn"t need to edit anything below this point.
-- ======================================================
-- ------------------------------------------------------------------
-- Generate all of the base color node definitions and all variations
-- except for the greyscale stuff.
-- Hues are on a 30 degree spacing starting at red = 0 degrees.
-- "s50" in a file/item name means "saturation: 50%".
-- Texture brightness levels for the colors are 100%, 66% ("medium"),
-- and 33% ("dark").
shades = {
"dark_",
"medium_",
"" -- represents "no special shade name", e.g. bright.
}
shades2 = {
"Dark ",
"Medium ",
"" -- represents "no special shade name", e.g. bright.
}
hues = {
"red",
"orange",
"yellow",
"lime",
"green",
"aqua",
"cyan",
"skyblue",
"blue",
"violet",
"magenta",
"redviolet"
}
hues2 = {
"Red ",
"Orange ",
"Yellow ",
"Lime ",
"Green ",
"Aqua ",
"Cyan ",
"Sky Blue ",
"Blue ",
"Violet ",
"Magenta ",
"Red-violet "
}
greys = {
"black",
"darkgrey",
"mediumgrey",
"lightgrey",
"white"
}
greys2 = {
"Black ",
"Dark Grey ",
"Medium Grey ",
"Light Grey ",
"White "
}
greys3 = {
"black",
"darkgrey_paint",
"mediumgrey_paint",
"lightgrey_paint",
"white_paint"
}
for shade = 1, 3 do
shadename = shades[shade]
shadename2 = shades2[shade]
for hue = 1, 12 do
huename = hues[hue]
huename2 = hues2[hue]
colorname = colored_block_modname..":"..shadename..huename
pngname = colored_block_modname.."_"..shadename..huename..".png"
nodedesc = shadename2..huename2..colored_block_description
s50colorname = colored_block_modname..":"..shadename..huename.."_s50"
s50pngname = colored_block_modname.."_"..shadename..huename.."_s50.png"
s50nodedesc = shadename2..huename2..colored_block_description.." (50% Saturation)"
minetest.register_node(colorname, {
description = nodedesc,
tiles = { pngname },
inventory_image = pngname,
wield_image = pngname,
sunlight_propagates = colored_block_sunlight,
paramtype = "light",
walkable = colored_block_walkable,
groups = colored_block_groups,
sounds = colored_block_sound
})
minetest.register_node(s50colorname, {
description = s50nodedesc,
tiles = { s50pngname },
inventory_image = s50pngname,
wield_image = s50pngname,
sunlight_propagates = colored_block_sunlight,
paramtype = "light",
walkable = colored_block_walkable,
groups = colored_block_groups,
sounds = colored_block_sound
})
minetest.register_craft( {
type = "shapeless",
output = colorname.." "..colored_block_yield,
recipe = {
neutral_block,
"unifieddyes:"..shadename..huename
}
})
minetest.register_craft( {
type = "shapeless",
output = colorname.." "..colored_block_yield,
recipe = {
neutral_block,
"unifieddyes:"..shadename..huename.."_s50"
}
})
end
end
-- Generate the "light" shades separately, since they don't have a low-sat version.
for hue = 1, 12 do
huename = hues[hue]
huename2 = hues2[hue]
colorname = colored_block_modname..":light_"..huename
pngname = colored_block_modname.."_light_"..huename..".png"
nodedesc = "Light "..huename2..colored_block_description
minetest.register_node(colorname, {
description = nodedesc,
tiles = { pngname },
inventory_image = pngname,
wield_image = pngname,
sunlight_propagates = colored_block_sunlight,
paramtype = "light",
walkable = colored_block_walkable,
groups = colored_block_groups,
sounds = colored_block_sound
})
minetest.register_craft( {
type = "shapeless",
output = colorname.." "..colored_block_yield,
recipe = {
neutral_block,
"unifieddyes:light_"..huename
}
})
end
-- ============================================================
-- The 5 levels of greyscale.
--
-- Oficially these are 0, 25, 50, 75, and 100% relative to white,
-- but in practice, they're actually 7.5%, 25%, 50%, 75%, and 95%.
-- (otherwise black and white would wash out).
for grey = 1,5 do
greyname = greys[grey]
greyname2 = greys2[grey]
greyname3 = greys3[grey]
greyshadename = colored_block_modname..":"..greyname
pngname = colored_block_modname.."_"..greyname..".png"
nodedesc = greyname2..colored_block_description
minetest.register_node(greyshadename, {
description = nodedesc,
tiles = { pngname },
inventory_image = pngname,
wield_image = pngname,
sunlight_propagates = colored_block_sunlight,
paramtype = "light",
walkable = colored_block_walkable,
groups = colored_block_groups,
sounds = colored_block_sound
})
minetest.register_craft( {
type = "shapeless",
output = greyshadename.." "..colored_block_yield,
recipe = {
neutral_block,
"unifieddyes:"..greyname3
}
})
end
print("[" .. colored_block_modname .. "] Loaded!")

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -4,3 +4,4 @@ bones?
bonemeal?
vessels?
farming?
cotton?

View File

@ -170,3 +170,35 @@ if minetest.get_modpath("witchcraft") then
end
end
end
-- Make compatible cotton mod
if minetest.get_modpath("cotton") then
-- clear existing craft recipes for white wool and cotton
minetest.clear_craft(
{
recipe = {
{"farming:cotton", "farming:cotton"},
{"farming:cotton", "farming:cotton"},
}
})
-- register wool:white craft recipe
minetest.register_craft(
{
output = "wool:white",
recipe = {
{"farming:cotton", "farming:cotton"},
{"farming:cotton", "farming:cotton"},
}
})
-- register cotton:white craft recipe
minetest.register_craft(
{
output = "cotton:white 4",
recipe = {
{"wool:white", "wool:white"},
{"wool:white", "wool:white"},
}
})
end

View File

@ -182,12 +182,35 @@ end)
function setSprinting(playerName, sprinting) --Sets the state of a player (0=stopped/moving, 1=sprinting)
local player = minetest.get_player_by_name(playerName)
local bonus_speed = 0
local bonus_jump = 0
if minetest.get_modpath("3d_armor") then
local player_inv = player:get_inventory()
if player_inv then
for i=1, player_inv:get_size("armor") do
local stack = player_inv:get_stack("armor", i)
if stack:get_count() > 0 then
local def = stack:get_definition()
if def and def.groups then
if def.groups["physics_speed"] then
bonus_speed = bonus_speed + def.groups["physics_speed"]
end
if def.groups["physics_jump"] then
bonus_jump = bonus_jump + def.groups["physics_jump"]
end
end
end
end
end
end
if sprint.players[playerName] then
sprint.players[playerName]["sprinting"] = sprinting
if sprinting == true then
player:set_physics_override({speed=SPRINT_SPEED,jump=SPRINT_JUMP})
player:set_physics_override({speed=SPRINT_SPEED + bonus_speed,jump=SPRINT_JUMP + bonus_jump})
elseif sprinting == false then
player:set_physics_override({speed=1.0,jump=1.0})
player:set_physics_override({speed=1.0 + bonus_speed,jump=1.0 + bonus_jump})
end
return true
end

@ -1 +1 @@
Subproject commit 63153f10930b25c79c76449931384fb6d69ee984
Subproject commit df177c26a75ec1880704b24dafe402cfe91cfe33

View File

@ -261,4 +261,6 @@ load_mod_moreflowers = true
load_mod_morefarming = true
load_mod_moreplants = true
load_mod_nalc = true
load_mod_nalc = true
load_mod_cotton = true