Release 1.2.5: improved spawn parameters of oil, wolfram and zinc ores, added placement API for remain stuff
@ -1,10 +1,11 @@
|
||||
# MultiDecor 1.2.4. Modpack For Minetest.
|
||||
# MultiDecor 1.2.5. Modpack For Minetest.
|
||||
![logo](https://user-images.githubusercontent.com/25750346/185758916-9acf0ba5-5953-484f-825c-347c6ca7cddd.png)
|
||||
|
||||
## Description
|
||||
This modpack adds various detailed furniture components, decorations and exterior stuff with various designs and styles of each epoch. Inspired by Homedecor and based on my abandoned Luxury Decor. Currently it contains the decor stuff only of "modern" style. A simple cheap style without any quaintness and luxury. In future there will be added still few sorts of that: baroque, high-tech, classic and royal.
|
||||
|
||||
## Changelog List
|
||||
#### [07.11.23] Release 1.2.5.
|
||||
#### [26.10.23] Release 1.2.4.
|
||||
#### [08.10.23] Release 1.2.3.
|
||||
#### [24.09.23] Release 1.2.2.
|
||||
|
@ -3,7 +3,6 @@ minetest.register_node(":multidecor:wolfram_ore", {
|
||||
tiles = {"default_stone.png^multidecor_wolfram_mineral.png"},
|
||||
is_ground_content = true,
|
||||
paramtype = "light",
|
||||
light_source = 2,
|
||||
drop = {
|
||||
max_items = 3,
|
||||
items = {
|
||||
@ -22,7 +21,6 @@ minetest.register_node(":multidecor:desert_wolfram_ore", {
|
||||
tiles = {"default_desert_stone.png^multidecor_wolfram_mineral.png"},
|
||||
is_ground_content = true,
|
||||
paramtype = "light",
|
||||
light_source = 2,
|
||||
drop = {
|
||||
max_items = 3,
|
||||
items = {
|
||||
@ -40,22 +38,22 @@ minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "multidecor:wolfram_ore",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 1500,
|
||||
clust_num_ores = 4,
|
||||
clust_scarcity = 2200,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 2,
|
||||
y_min = -31000,
|
||||
y_max = -150
|
||||
y_max = -400
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "multidecor:desert_wolfram_ore",
|
||||
wherein = "default:desert_stone",
|
||||
clust_scarcity = 1500,
|
||||
clust_num_ores = 4,
|
||||
clust_scarcity = 2200,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 2,
|
||||
y_min = -31000,
|
||||
y_max = -150
|
||||
y_max = -400
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:wolfram_lump",
|
||||
@ -82,7 +80,6 @@ minetest.register_node(":multidecor:zinc_ore", {
|
||||
tiles = {"default_stone.png^multidecor_zinc_mineral.png"},
|
||||
is_ground_content = true,
|
||||
paramtype = "light",
|
||||
light_source = 6,
|
||||
drop = {
|
||||
max_items = 5,
|
||||
items = {
|
||||
@ -101,7 +98,6 @@ minetest.register_node(":multidecor:desert_zinc_ore", {
|
||||
tiles = {"default_desert_stone.png^multidecor_zinc_mineral.png"},
|
||||
is_ground_content = true,
|
||||
paramtype = "light",
|
||||
light_source = 6,
|
||||
drop = {
|
||||
max_items = 5,
|
||||
items = {
|
||||
@ -119,22 +115,22 @@ minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "multidecor:zinc_ore",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 900,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
clust_scarcity = 1500,
|
||||
clust_num_ores = 7,
|
||||
clust_size = 5,
|
||||
y_min = -31000,
|
||||
y_max = -125
|
||||
y_max = -200
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "multidecor:desert_zinc_ore",
|
||||
wherein = "default:desert_stone",
|
||||
clust_scarcity = 900,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
clust_scarcity = 1500,
|
||||
clust_num_ores = 7,
|
||||
clust_size = 5,
|
||||
y_min = -31000,
|
||||
y_max = -125
|
||||
y_max = -200
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:zinc_fragment",
|
||||
@ -232,20 +228,20 @@ minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "multidecor:consolidated_oil",
|
||||
wherein = {"default:stone", "default:desert_stone"},
|
||||
clust_scarcity = 700,
|
||||
clust_scarcity = 1200,
|
||||
clust_num_ores = 20,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = 15
|
||||
y_max = -100
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "multidecor:oil_source",
|
||||
wherein = "multidecor:consolidated_oil",
|
||||
clust_scarcity = 120,
|
||||
clust_scarcity = 1500,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 2,
|
||||
y_min = -31000,
|
||||
y_max = 15
|
||||
y_max = -30
|
||||
})
|
||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.8 KiB |
@ -36,10 +36,8 @@ local default_bed_on_rightclick = function(pos, node, clicker, itemstack, pointe
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local default_bed_after_place = function(pos, placer, itemstack)
|
||||
local leftover = multidecor.placement.check_for_placement(pos, placer)
|
||||
|
||||
return leftover
|
||||
local default_bed_on_destruct = function(pos)
|
||||
beds.remove_spawns_at(pos)
|
||||
end
|
||||
|
||||
local default_bed_can_dig = function(pos)
|
||||
@ -75,15 +73,13 @@ function multidecor.register.register_bed(name, base_def, add_def, craft_def)
|
||||
if def.callbacks then
|
||||
def.callbacks.after_destruct = nil
|
||||
def.callbacks.after_dig_node = nil
|
||||
def.callbacks.after_place_node = def.callbacks.after_place_node or default_bed_after_place
|
||||
def.callbacks.on_rightclick = def.callbacks.on_rightclick or default_bed_on_rightclick
|
||||
def.callbacks.on_destruct = def.callbacks.on_destruct or mtg_bed_def.on_destruct
|
||||
def.callbacks.on_destruct = def.callbacks.on_destruct or default_bed_on_destruct
|
||||
def.callbacks.can_dig = def.callbacks.can_dig or default_bed_can_dig
|
||||
else
|
||||
def.callbacks = {
|
||||
after_place_node = default_bed_after_place,
|
||||
on_rightclick = default_on_rightclick,
|
||||
on_destruct = mtg_bed_def.on_destruct,
|
||||
on_destruct = default_bed_on_destruct,
|
||||
can_dig = default_bed_can_dig
|
||||
}
|
||||
end
|
||||
|
@ -155,10 +155,6 @@ function multidecor.curtains.default_after_place(pos, placer)
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
|
||||
local leftover = multidecor.check_for_placement(pos, placer)
|
||||
|
||||
return leftover
|
||||
end
|
||||
|
||||
function multidecor.curtains.default_after_dig(pos, oldnode, oldmeta, digger)
|
||||
|
@ -150,12 +150,6 @@ function multidecor.doors.convert_from_entity(obj)
|
||||
minetest.set_node(pos, {name=name, param2=param2})
|
||||
end
|
||||
|
||||
local function default_door_after_place(pos, placer, itemstack)
|
||||
local leftover = multidecor.placement.check_for_placement(pos, placer)
|
||||
|
||||
return leftover
|
||||
end
|
||||
|
||||
local function default_door_on_rightclick(pos)
|
||||
local door_data = minetest.registered_nodes[minetest.get_node(pos).name].add_properties.door
|
||||
|
||||
@ -234,8 +228,6 @@ function multidecor.register.register_door(name, base_def, add_def, craft_def)
|
||||
c_def.add_properties.door.mode = "closed"
|
||||
|
||||
c_def.callbacks = c_def.callbacks or {}
|
||||
|
||||
c_def.callbacks.after_place_node = c_def.callbacks.after_place_node or default_door_after_place
|
||||
c_def.callbacks.on_rightclick = c_def.callbacks.on_rightclick or default_door_on_rightclick
|
||||
|
||||
multidecor.register.register_furniture_unit(name, c_def, craft_def)
|
||||
|
@ -2,12 +2,6 @@ local function default_on_construct_dir(pos)
|
||||
multidecor.connecting.update_adjacent_nodes_connection(pos, "directional")
|
||||
end
|
||||
|
||||
local function default_hedge_after_place(pos, placer, itemstack)
|
||||
local leftover = multidecor.placement.check_for_placement(pos, placer)
|
||||
|
||||
return leftover
|
||||
end
|
||||
|
||||
local function default_after_destruct_dir(pos, oldnode)
|
||||
multidecor.connecting.update_adjacent_nodes_connection(pos, "directional", true, oldnode)
|
||||
end
|
||||
@ -37,8 +31,6 @@ function multidecor.register.register_hedge(name, base_def, add_def, craft_def)
|
||||
|
||||
def.callbacks = def.callbacks or {}
|
||||
|
||||
def.callbacks.after_place_node = def.callbacks.after_place_node or default_hedge_after_place
|
||||
|
||||
if add_def.connect_parts then
|
||||
def.callbacks.on_construct = def.callbacks.on_construct or default_on_construct_dir
|
||||
def.callbacks.after_dig_node = def.callbacks.after_dig_node or default_after_destruct_dir
|
||||
|
@ -1,4 +1,4 @@
|
||||
local default_on_rightclick = function(pos)
|
||||
local function default_light_on_rightclick(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local add_props = minetest.registered_nodes[node.name].add_properties
|
||||
|
||||
@ -28,11 +28,8 @@ function multidecor.register.register_light(name, base_def, add_def, craft_def)
|
||||
end
|
||||
end
|
||||
|
||||
if def.callbacks then
|
||||
def.callbacks.on_rightclick = def.callbacks.on_rightclick or default_on_rightclick
|
||||
else
|
||||
def.callbacks = {on_rightclick = default_on_rightclick}
|
||||
end
|
||||
def.callbacks = def.callbacks or {}
|
||||
def.callbacks.on_rightclick = def.callbacks.on_rightclick or default_light_on_rightclick
|
||||
|
||||
local sound_off
|
||||
local are_props = def.add_properties and def.add_properties.swap_light
|
||||
|
@ -68,7 +68,8 @@ function multidecor.placement.calc_place_space_size(bboxes)
|
||||
|
||||
for i, coord in ipairs(max_bbox) do
|
||||
local int, frac = math.modf(coord)
|
||||
max_bbox[i] = math.abs(frac) > 0.5 and math.ceil(math.abs(coord)) or math.floor(math.abs(coord))
|
||||
local sgn = math.sign(coord)
|
||||
max_bbox[i] = math.abs(frac) > 0.5 and sgn*math.ceil(math.abs(coord)) or sgn*math.floor(math.abs(coord))
|
||||
end
|
||||
|
||||
return max_bbox
|
||||
@ -93,8 +94,12 @@ function multidecor.placement.check_for_placement(pos, placer)
|
||||
local max_bbox = multidecor.placement.calc_place_space_size(bboxes)
|
||||
|
||||
local rot_bbox = {}
|
||||
rot_bbox.min = multidecor.helpers.rotate_to_node_dir(pos, vector.new(max_bbox[1], max_bbox[2], max_bbox[3]))
|
||||
rot_bbox.max = multidecor.helpers.rotate_to_node_dir(pos, vector.new(max_bbox[4], max_bbox[5], max_bbox[6]))
|
||||
rot_bbox.min = multidecor.helpers.rotate_to_node_dir(pos,
|
||||
vector.rotate_around_axis(vector.new(max_bbox[1], max_bbox[2], max_bbox[3]), vector.new(0, 1, 0), math.pi)
|
||||
)
|
||||
rot_bbox.max = multidecor.helpers.rotate_to_node_dir(pos,
|
||||
vector.rotate_around_axis(vector.new(max_bbox[4], max_bbox[5], max_bbox[6]), vector.new(0, 1, 0), math.pi)
|
||||
)
|
||||
|
||||
max_bbox = multidecor.placement.box_repair({
|
||||
rot_bbox.min.x, rot_bbox.min.y, rot_bbox.min.z,
|
||||
|
@ -94,6 +94,12 @@ function multidecor.register.build_description(name, base_desc)
|
||||
return base_desc .. "\nStyle: " .. style .. (material ~= "" and "\nMaterial: " .. material or "")
|
||||
end
|
||||
|
||||
function multidecor.register.after_place_node(pos, placer, itemstack)
|
||||
local leftover = multidecor.placement.check_for_placement(pos, placer)
|
||||
|
||||
return leftover
|
||||
end
|
||||
|
||||
--[[def:
|
||||
{
|
||||
type = <seat, shelf, bed, table, >
|
||||
@ -218,6 +224,19 @@ function multidecor.register.register_furniture_unit(name, def, craft_def)
|
||||
f_def[cb_name] = f
|
||||
end
|
||||
|
||||
if f_def.after_place_node then
|
||||
local prev_after_place = f_def.after_place_node
|
||||
local function after_place(pos, placer, itemstack)
|
||||
prev_after_place(pos, placer, itemstack)
|
||||
|
||||
return multidecor.register.after_place_node(pos, placer)
|
||||
end
|
||||
|
||||
f_def.after_place_node = after_place
|
||||
else
|
||||
f_def.after_place_node = multidecor.register.after_place_node
|
||||
end
|
||||
|
||||
f_def.add_properties = def.add_properties or {}
|
||||
|
||||
local f_name = "multidecor:" .. name
|
||||
|
@ -30,23 +30,10 @@ function multidecor.register.register_seat(name, base_def, add_def, craft_def)
|
||||
|
||||
def.callbacks = def.callbacks or {}
|
||||
|
||||
def.callbacks.after_place_node = def.callbacks.after_place_node or multidecor.sitting.default_after_place
|
||||
def.callbacks.on_construct = def.callbacks.on_construct or multidecor.sitting.default_on_construct
|
||||
def.callbacks.on_destruct = def.callbacks.on_destruct or multidecor.sitting.default_on_destruct
|
||||
def.callbacks.on_rightclick = def.callbacks.on_rightclick or multidecor.sitting.default_on_rightclick
|
||||
|
||||
--[[if def.callbacks then
|
||||
def.callbacks.on_construct = def.callbacks.on_construct or multidecor.sitting.default_on_construct
|
||||
def.callbacks.on_destruct = def.callbacks.on_destruct or multidecor.sitting.default_on_destruct
|
||||
def.callbacks.on_rightclick = def.callbacks.on_rightclick or multidecor.sitting.default_on_rightclick
|
||||
else
|
||||
def.callbacks = {
|
||||
on_construct = default_on_construct,
|
||||
on_destruct = default_on_destruct,
|
||||
on_rightclick = default_on_rightclick
|
||||
}
|
||||
end]]
|
||||
|
||||
multidecor.register.register_furniture_unit(name, def, craft_def)
|
||||
|
||||
if def.add_properties and def.add_properties.connect_parts then
|
||||
|
@ -166,12 +166,6 @@ player_api.register_model(multidecor.sitting.standard_model, {
|
||||
}
|
||||
})
|
||||
|
||||
multidecor.sitting.default_after_place = function(pos, placer, itemstack)
|
||||
local leftover = multidecor.placement.check_for_placement(pos, placer)
|
||||
|
||||
return leftover
|
||||
end
|
||||
|
||||
multidecor.sitting.default_on_construct = function(pos)
|
||||
minetest.get_meta(pos):set_string("is_busy", "")
|
||||
end
|
||||
@ -207,7 +201,7 @@ minetest.register_entity("decor_api:seat_entity", {
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
local prev_pdata = minetest.deserialize(player:get_meta():get_string("previous_player_data"))
|
||||
|
||||
if prev_pdata then
|
||||
if prev_pdata and prev_pdata.attached_to then
|
||||
multidecor.sitting.standup_player(player, prev_pdata.attached_to)
|
||||
end
|
||||
end)
|
||||
|
@ -398,6 +398,7 @@ multidecor.register.register_furniture_unit("kitchen_cooker", {
|
||||
"multidecor_metal_material3.png",
|
||||
"multidecor_kitchen_cooker_grid.png"
|
||||
},
|
||||
bounding_boxes = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}},
|
||||
callbacks = {
|
||||
on_construct = function(pos)
|
||||
multidecor.shelves.set_shelves(pos)
|
||||
@ -444,6 +445,7 @@ multidecor.register.register_furniture_unit("kitchen_cooker_activated", {
|
||||
"multidecor_metal_material3.png",
|
||||
"multidecor_kitchen_cooker_grid.png"
|
||||
},
|
||||
bounding_boxes = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}},
|
||||
groups = {not_in_creative_inventory=1},
|
||||
callbacks = {
|
||||
can_dig = multidecor.shelves.default_can_dig
|
||||
|
@ -150,6 +150,7 @@ multidecor.register.register_table("three_level_wooden_rack", {
|
||||
description = "Three Level Wooden Rack",
|
||||
mesh = "multidecor_three_level_wooden_rack.b3d",
|
||||
tiles = {"multidecor_wood.png"},
|
||||
bounding_boxes = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}},
|
||||
callbacks = {
|
||||
on_construct = multidecor.shelves.default_on_construct,
|
||||
on_rightclick = multidecor.shelves.default_on_node_rightclick,
|
||||
|