13 次代码提交 3e0dc73527 ... 01f789347d

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

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

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

+ 7 - 5
mods/easyvend/exchange.lua

@@ -2,10 +2,12 @@
 exchange = exchange or {}
 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 = {
-	{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
@@ -25,7 +27,7 @@ for k, v in ipairs(exchange.types) do
 			end
 		else
 			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
 
@@ -33,7 +35,7 @@ for k, v in ipairs(exchange.types) do
 		local meta = minetest.get_meta(pos)
 		meta:set_string("infotext",
 			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
 

+ 1 - 1
mods/hb4/countdown.lua

@@ -72,7 +72,7 @@ function countdown.step(data)
 	end
 
 	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)
 		minetest.chat_send_all(color .. message)
 	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:slab_light", "lightsplus:flat_light")
 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_on", "lightsplus:slab_light_on")
 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 =
 function(pos)
 	local formspec =
-		"size[8,4.5]" ..
+		"size[8,7.75]" ..
 		default.gui_bg ..
 		default.gui_bg_img ..
 		default.gui_slots ..
@@ -28,6 +28,8 @@ function(pos)
 		"list[context;main;6.0,1;1,1]" ..
 
 		"list[current_player;main;0,3.5;8,1;]" ..
+		"list[current_player;main;0,4.75;8,3;8]" ..
+
 		"listring[context;main]" ..
 		"listring[current_player;main]" ..
 		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 =
 function(pos)
 	local formspec =
-		"size[8,4.5]" ..
+		"size[8,7.75]" ..
 		default.gui_bg ..
 		default.gui_bg_img ..
 		default.gui_slots ..
@@ -29,6 +29,8 @@ function(pos)
 		"list[context;main;6.0,1;1,1]" ..
 
 		"list[current_player;main;0,3.5;8,1;]" ..
+		"list[current_player;main;0,4.75;8,3;8]" ..
+
 		"listring[context;main]" ..
 		"listring[current_player;main]" ..
 		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 = {
 	"default:axe_bronze",
+	"default:axe_bronze2",
 	"default:axe_diamond",
 	"default:axe_mese",
 	"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_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({
     output = 'moretrees:palm_wood 4',
     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 alternate == "_inner" then
 				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',
 					recipe = {
 						{recipeitem, recipeitem, recipeitem},
@@ -369,6 +383,20 @@ function stairs.register_extra_stairs(subname, recipeitem, groups, images, descr
 				})
 			elseif alternate == "_outer" then
 				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',
 					recipe = {
 						{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
 		local min = math_floor(v.min)
 		local max = math.ceil(v.max)
+		local stackmax = minetest.registered_items[v.item].stack_max or 64
 
 		if max >= min then
 			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]
+				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
-				inv:set_stack("main", idx, ItemStack(v.item .. " " .. count))
 			end
 		end
 	end
@@ -125,14 +132,23 @@ function survivalist.fill_loot_chest(inv, gamemode)
 	for k, v in ipairs(bonus) do
 		local min = math_floor(v.min)
 		local max = math.ceil(v.max)
+		local stackmax = minetest.registered_items[v.item].stack_max or 64
 
 		if max >= min then
 			local count = math_floor(math_random(min, max))
 			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