1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 02:00:37 +01:00

Fix dyes' craft recipes (and peace_areas)

- Fix peace_areas when player's pos is nil
 - Solves #245
 - Add dyes tab to the spreadsheet
This commit is contained in:
LeMagnesium 2015-08-28 22:00:07 +02:00
parent 413dd24bca
commit 5f1aa7a47b
3 changed files with 17 additions and 16 deletions

View File

@ -55,24 +55,24 @@ minetest.register_craft({
-- Mix recipes -- Mix recipes
-- Just mix everything to everything somehow sanely -- Just mix everything to everything somehow sanely
dyelocal.mixbases = {"magenta", "red", "orange", "brown", "yellow", "green", "dark_green", "cyan", "blue", "violet", "black", "dark_grey", "grey", "white"} dyelocal.mixbases = {"magenta", "red", "orange", "brown", "yellow", "green", "dark_green", "cyan", "blue", "violet", "black", "dark_grey", "grey", "white", "light_grey"}
dyelocal.mixes = { dyelocal.mixes = {
-- magenta, red, orange, brown, yellow, green, dark_green, cyan, blue, violet, black, dark_grey, grey, white -- magenta, red, orange, brown, yellow, green, dark_green, cyan, blue, violet, black, dark_grey, grey, white, light_grey
white = {"pink", "pink", "orange", "orange", "yellow", "green", "green", "grey", "cyan", "violet", "grey", "grey", "white", "white"}, white = {"pink", "pink", "orange", "orange", "yellow", "green", "green", "grey", "cyan", "violet", "grey", "grey", "light_grey", "white", "white"},
grey = {"pink", "pink", "orange", "orange", "yellow", "green", "green", "grey", "cyan", "pink", "dark_grey","grey", "grey"}, grey = {"pink", "pink", "orange", "orange", "yellow", "green", "green", "grey", "cyan", "pink", "dark_grey", "grey", "grey"},
dark_grey={"brown","brown", "brown", "brown", "brown","dark_green","dark_green","blue","blue","violet","black", "black"}, dark_grey = {"brown", "brown", "brown", "brown", "brown", "dark_green", "dark_green", "blue", "blue", "violet", "black", "black"},
black = {"black", "black", "black", "black", "black", "black", "black", "black", "black", "black", "black"}, black = {"black", "black", "black", "black", "black", "black", "black", "black", "black", "black", "black"},
violet= {"magenta","magenta","red", "brown", "red", "cyan", "brown", "blue", "violet","violet"}, violet= {"magenta", "magenta", "red", "brown", "red", "cyan", "brown", "blue", "violet", "violet"},
blue = {"violet", "magenta","brown","brown","dark_green","cyan","cyan", "cyan", "blue"}, blue = {"violet", "magenta", "brown", "brown", "dark_green", "cyan", "cyan", "cyan", "blue"},
cyan = {"blue","brown","dark_green","dark_grey","green","cyan","dark_green","cyan"}, cyan = {"blue", "brown", "dark_green", "dark_grey", "green", "cyan", "dark_green", "cyan"},
dark_green={"brown","brown","brown", "brown", "green", "green", "dark_green"}, dark_green = {"brown", "brown", "brown", "brown", "green", "green", "dark_green"},
green = {"brown", "yellow","yellow","dark_green","green","green"}, green = {"brown", "yellow", "yellow", "dark_green", "green", "green"},
yellow= {"red", "orange", "yellow","orange", "yellow"}, yellow= {"red", "orange", "yellow", "orange", "yellow"},
brown = {"brown", "brown","orange", "brown"}, brown = {"brown", "brown", "orange", "brown"},
orange= {"red", "orange","orange"}, orange= {"red", "orange", "orange"},
red = {"magenta","red"}, red = {"magenta", "red"},
magenta={"magenta"}, magenta = {"magenta"},
} }
for one,results in pairs(dyelocal.mixes) do for one,results in pairs(dyelocal.mixes) do

View File

@ -7,6 +7,7 @@ peace_areas = {areas = {}}
minetest.register_on_punchplayer(function(player, hitter) minetest.register_on_punchplayer(function(player, hitter)
local pos = player:getpos() local pos = player:getpos()
if pos == nil then return end
for name, positions in pairs(peace_areas.areas) do for name, positions in pairs(peace_areas.areas) do
local pos1 = positions["pos1"] local pos1 = positions["pos1"]
local pos2 = positions["pos2"] local pos2 = positions["pos2"]

Binary file not shown.