13 Commits 3e0dc73527 ... 01f789347d

Auteur SHA1 Message Date
  BluebirdGreycoat 01f789347d Update AC il y a 3 ans
  BluebirdGreycoat 88292a913c Update il y a 3 ans
  BluebirdGreycoat 1e723452c9 Double the exchange rate il y a 3 ans
  BluebirdGreycoat a5b45cfa44 Update currency exchange booth textures il y a 3 ans
  BluebirdGreycoat f5548454c7 Short-circuit infinite MG production il y a 3 ans
  BlueBird51 245c1c8de8 Merge branch 'misc-fixes-and-improvements' of gimp/musttest_game into master il y a 3 ans
  gimp 83181c4e1c add more axes to cutting_tools for the purpose of crafting coconut milk il y a 3 ans
  gimp a951a93e17 preserve axe's toolrank data when crafting coconut milk il y a 3 ans
  gimp 40386fecea show player's whole inventory in charger and workshop formspec il y a 3 ans
  gimp da4df2d3bb add stairs_*_inner and stairs_*_outer reverse recipes il y a 3 ans
  gimp d2e0775b69 remove alias duplicate il y a 3 ans
  gimp 89c69836dc unstack non-stackable items when filling survival loot chests il y a 3 ans
  gimp 8eff4b5dc3 zero-pad hour/min/sec of restart-in time string if it's single digit il y a 3 ans

+ 1 - 1
mods/anticurse/bad-language.lua

@@ -153,7 +153,7 @@ anticurse.foul = {
   
   
   {word="c+o+c+k+", white={"peacock", "cockney", "cockroach"}},
   {word="c+o+c+k+", white={"peacock", "cockney", "cockroach"}},
   {word="w+h+o+r+e+", white={
   {word="w+h+o+r+e+", white={
-		"reach", "read", "really", "remove", "record",
+		"reach", "read", "really", "remove", "record", "relay",
 	}},
 	}},
   
   
   {word="c+u+m+", white={
   {word="c+u+m+", white={

+ 7 - 5
mods/easyvend/exchange.lua

@@ -2,10 +2,12 @@
 exchange = exchange or {}
 exchange = exchange or {}
 exchange.modpath = minetest.get_modpath("easyvend")
 exchange.modpath = minetest.get_modpath("easyvend")
 
 
+-- Note: exchange rate is doubled because only lumps are accepted now, not ingots.
+-- (Previously most folks would double their ingots before exchanging them.)
 exchange.types = {
 exchange.types = {
-	{name = "Gold", key = "gold", rate = 35, image = "default_gold_ingot.png", item = "default:gold_ingot", block = "default:goldblock"},
-	{name = "Silver", key = "silver", rate = 14, image = "moreores_silver_ingot.png", item = "moreores:silver_ingot", block = "moreores:silver_block"},
-	{name = "Copper", key = "copper", rate = 9, image = "default_copper_ingot.png", item = "default:copper_ingot", block = "default:copperblock"},
+	{name = "Gold", key = "gold", rate = 62, image = "default_gold_lump.png", item = "default:gold_lump", block = "default:goldblock"},
+	{name = "Silver", key = "silver", rate = 25, image = "moreores_silver_lump.png", item = "moreores:silver_lump", block = "moreores:silver_block"},
+	{name = "Copper", key = "copper", rate = 16, image = "default_copper_lump.png", item = "default:copper_lump", block = "default:copperblock"},
 }
 }
 
 
 for k, v in ipairs(exchange.types) do
 for k, v in ipairs(exchange.types) do
@@ -25,7 +27,7 @@ for k, v in ipairs(exchange.types) do
 			end
 			end
 		else
 		else
 			local cash = currency.tell(pname)
 			local cash = currency.tell(pname)
-			minetest.chat_send_player(pname, "# Server: You don't have any " .. v.key .. ". You currently have " .. cash .. " MG.")
+			minetest.chat_send_player(pname, "# Server: You don't have any unrefined " .. v.key .. ". You currently have " .. cash .. " MG.")
 		end
 		end
 	end
 	end
 
 
@@ -33,7 +35,7 @@ for k, v in ipairs(exchange.types) do
 		local meta = minetest.get_meta(pos)
 		local meta = minetest.get_meta(pos)
 		meta:set_string("infotext",
 		meta:set_string("infotext",
 			v.name .. " Currency Exchange\nPunch to exchange " .. v.key ..
 			v.name .. " Currency Exchange\nPunch to exchange " .. v.key ..
-			" for MG\n1 " .. v.key .. " = " .. v.rate .. " MG")
+			" for MG\n1 unrefined " .. v.key .. " = " .. v.rate .. " MG")
 	end
 	end
 end
 end
 
 

+ 1 - 1
mods/hb4/countdown.lua

@@ -72,7 +72,7 @@ function countdown.step(data)
 	end
 	end
 
 
 	if report then
 	if report then
-		local message = "# Server: Nightly restart in: " .. rd.hour .. ":" .. rd.min .. ":" .. rd.sec .. "."
+		local message = "# Server: Nightly restart in: " .. string.format("%02d:%02d:%02d", rd.hour, rd.min, rd.sec) .. "."
 		chat_logging.log_server_message(message)
 		chat_logging.log_server_message(message)
 		minetest.chat_send_all(color .. message)
 		minetest.chat_send_all(color .. message)
 	end
 	end

+ 0 - 1
mods/lightsplus/init.lua

@@ -153,7 +153,6 @@ minetest.register_alias("newlights:light", "lightsplus:light")
 minetest.register_alias("newlights:light_on", "lightsplus:light_on")
 minetest.register_alias("newlights:light_on", "lightsplus:light_on")
 minetest.register_alias("newlights:slab_light", "lightsplus:flat_light")
 minetest.register_alias("newlights:slab_light", "lightsplus:flat_light")
 minetest.register_alias("newlights:slab_light_on", "lightsplus:flat_light_on")
 minetest.register_alias("newlights:slab_light_on", "lightsplus:flat_light_on")
-minetest.register_alias("lightsplus:light_flat", "lightsplus:flat_light")
 minetest.register_alias("lightsplus:slab_light_wall", "lightsplus:slab_light")
 minetest.register_alias("lightsplus:slab_light_wall", "lightsplus:slab_light")
 minetest.register_alias("lightsplus:slab_light_wall_on", "lightsplus:slab_light_on")
 minetest.register_alias("lightsplus:slab_light_wall_on", "lightsplus:slab_light_on")
 minetest.register_alias("lightsplus:slab_light_inv", "lightsplus:slab_light")
 minetest.register_alias("lightsplus:slab_light_inv", "lightsplus:slab_light")

+ 3 - 1
mods/machines/charger.lua

@@ -13,7 +13,7 @@ local ENERGY_AMOUNT = tech.charger.power
 charger.compose_formspec =
 charger.compose_formspec =
 function(pos)
 function(pos)
 	local formspec =
 	local formspec =
-		"size[8,4.5]" ..
+		"size[8,7.75]" ..
 		default.gui_bg ..
 		default.gui_bg ..
 		default.gui_bg_img ..
 		default.gui_bg_img ..
 		default.gui_slots ..
 		default.gui_slots ..
@@ -28,6 +28,8 @@ function(pos)
 		"list[context;main;6.0,1;1,1]" ..
 		"list[context;main;6.0,1;1,1]" ..
 
 
 		"list[current_player;main;0,3.5;8,1;]" ..
 		"list[current_player;main;0,3.5;8,1;]" ..
+		"list[current_player;main;0,4.75;8,3;8]" ..
+
 		"listring[context;main]" ..
 		"listring[context;main]" ..
 		"listring[current_player;main]" ..
 		"listring[current_player;main]" ..
 		default.get_hotbar_bg(0, 3.5)
 		default.get_hotbar_bg(0, 3.5)

+ 3 - 1
mods/machines/workshop.lua

@@ -14,7 +14,7 @@ local REPAIR_RATE = tech.workshop.repair
 workshop.compose_formspec =
 workshop.compose_formspec =
 function(pos)
 function(pos)
 	local formspec =
 	local formspec =
-		"size[8,4.5]" ..
+		"size[8,7.75]" ..
 		default.gui_bg ..
 		default.gui_bg ..
 		default.gui_bg_img ..
 		default.gui_bg_img ..
 		default.gui_slots ..
 		default.gui_slots ..
@@ -29,6 +29,8 @@ function(pos)
 		"list[context;main;6.0,1;1,1]" ..
 		"list[context;main;6.0,1;1,1]" ..
 
 
 		"list[current_player;main;0,3.5;8,1;]" ..
 		"list[current_player;main;0,3.5;8,1;]" ..
+		"list[current_player;main;0,4.75;8,3;8]" ..
+
 		"listring[context;main]" ..
 		"listring[context;main]" ..
 		"listring[current_player;main]" ..
 		"listring[current_player;main]" ..
 		default.get_hotbar_bg(0, 3.5)
 		default.get_hotbar_bg(0, 3.5)

+ 36 - 0
mods/moretrees/palm.lua

@@ -181,9 +181,19 @@ minetest.register_craftitem("moretrees:coconut_milk", {
 
 
 local cutting_tools = {
 local cutting_tools = {
 	"default:axe_bronze",
 	"default:axe_bronze",
+	"default:axe_bronze2",
 	"default:axe_diamond",
 	"default:axe_diamond",
 	"default:axe_mese",
 	"default:axe_mese",
 	"default:axe_steel",
 	"default:axe_steel",
+	"default:axe_stone",
+	"gems:axe_amethyst",
+	"gems:axe_amethyst_rf",
+	"gems:axe_emerald",
+	"gems:axe_emerald_rf",
+	"gems:axe_ruby",
+	"gems:axe_ruby_rf",
+	"gems:axe_sapphire",
+	"gems:axe_sapphire_rf",
 	"moreores:axe_mithril",
 	"moreores:axe_mithril",
 	"moreores:axe_silver",
 	"moreores:axe_silver",
 }
 }
@@ -209,6 +219,32 @@ end
 
 
 
 
 
 
+minetest.register_on_craft(function(...) moretrees.on_coconut_milk_craft(...) end)
+moretrees.on_coconut_milk_craft = function(itemstack, player, old_craft_grid, craft_inv)
+	if itemstack:get_name() ~= "moretrees:coconut_milk" then
+		return
+	end
+
+	local original
+	local index
+	for i = 1, player:get_inventory():get_size("craft") do
+		for j in ipairs(cutting_tools) do
+			local tool = cutting_tools[j]
+			if old_craft_grid[i]:get_name() == tool then
+				original = old_craft_grid[i]
+				index = i
+			end
+		end
+	end
+	if not original then
+		return
+	end
+	-- put the tool with metadata back in the craft grid
+	craft_inv:set_stack("craft", index, original)
+end
+
+
+
 minetest.register_craft({
 minetest.register_craft({
     output = 'moretrees:palm_wood 4',
     output = 'moretrees:palm_wood 4',
     recipe = {
     recipe = {

+ 28 - 0
mods/stairs/init.lua

@@ -360,6 +360,20 @@ function stairs.register_extra_stairs(subname, recipeitem, groups, images, descr
 		if recipeitem then
 		if recipeitem then
 			if alternate == "_inner" then
 			if alternate == "_inner" then
 				minetest.register_craft({
 				minetest.register_craft({
+					type = "shapeless",
+					output = recipeitem .. ' 7',
+					recipe = {
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+					},
+				})
+				minetest.register_craft({
 					output = "stairs:stair_" .. subname .. alternate .. ' 8',
 					output = "stairs:stair_" .. subname .. alternate .. ' 8',
 					recipe = {
 					recipe = {
 						{recipeitem, recipeitem, recipeitem},
 						{recipeitem, recipeitem, recipeitem},
@@ -369,6 +383,20 @@ function stairs.register_extra_stairs(subname, recipeitem, groups, images, descr
 				})
 				})
 			elseif alternate == "_outer" then
 			elseif alternate == "_outer" then
 				minetest.register_craft({
 				minetest.register_craft({
+					type = "shapeless",
+					output = recipeitem .. ' 5',
+					recipe = {
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+						"stairs:stair_" .. subname .. alternate,
+					},
+				})
+				minetest.register_craft({
 					output = "stairs:stair_" .. subname .. alternate .. ' 8',
 					output = "stairs:stair_" .. subname .. alternate .. ' 8',
 					recipe = {
 					recipe = {
 						{recipeitem, recipeitem, recipeitem},
 						{recipeitem, recipeitem, recipeitem},

+ 22 - 6
mods/survivalist/loot.lua

@@ -107,13 +107,20 @@ function survivalist.fill_loot_chest(inv, gamemode)
 	for k, v in ipairs(loot) do
 	for k, v in ipairs(loot) do
 		local min = math_floor(v.min)
 		local min = math_floor(v.min)
 		local max = math.ceil(v.max)
 		local max = math.ceil(v.max)
+		local stackmax = minetest.registered_items[v.item].stack_max or 64
 
 
 		if max >= min then
 		if max >= min then
 			local count = math_floor(math_random(min, max))
 			local count = math_floor(math_random(min, max))
-			if count > 0 and #positions > 0 then
+			while count > 0 and #positions > 0 do
 				local idx = positions[#positions]
 				local idx = positions[#positions]
+				if count > stackmax then
+					inv:set_stack("main", idx, ItemStack(v.item .. " " .. stackmax))
+					count = count - stackmax
+				else
+					inv:set_stack("main", idx, ItemStack(v.item .. " " .. count))
+					count = 0
+				end
 				positions[#positions] = nil
 				positions[#positions] = nil
-				inv:set_stack("main", idx, ItemStack(v.item .. " " .. count))
 			end
 			end
 		end
 		end
 	end
 	end
@@ -125,14 +132,23 @@ function survivalist.fill_loot_chest(inv, gamemode)
 	for k, v in ipairs(bonus) do
 	for k, v in ipairs(bonus) do
 		local min = math_floor(v.min)
 		local min = math_floor(v.min)
 		local max = math.ceil(v.max)
 		local max = math.ceil(v.max)
+		local stackmax = minetest.registered_items[v.item].stack_max or 64
 
 
 		if max >= min then
 		if max >= min then
 			local count = math_floor(math_random(min, max))
 			local count = math_floor(math_random(min, max))
 			local chance = math_random(0, 100)
 			local chance = math_random(0, 100)
-			if count > 0 and #positions > 0 and chance < v.chance then
-				local idx = positions[#positions]
-				positions[#positions] = nil
-				inv:set_stack("main", idx, ItemStack(v.item .. " " .. count))
+			if chance < v.chance then
+				while count > 0 and #positions > 0 do
+					local idx = positions[#positions]
+					if count > stackmax then
+						inv:set_stack("main", idx, ItemStack(v.item .. " " .. stackmax))
+						count = count - stackmax
+					else
+						inv:set_stack("main", idx, ItemStack(v.item .. " " .. count))
+						count = 0
+					end
+					positions[#positions] = nil
+				end
 			end
 			end
 		end
 		end
 	end
 	end