1
0
鏡像自 https://github.com/minetest-mods/enchanting.git 已同步 2025-11-06 01:35:30 +01:00

Import changes from xdecor

此提交包含在:
kilbith
2016-04-02 18:24:00 +02:00
父節點 d5a69a1907
當前提交 7182197a4d
共有 15 個檔案被更改,包括 31 行新增2 行删除

查看文件

@@ -113,7 +113,7 @@ function enchanting.construct(pos)
minetest.add_entity({x=pos.x, y=pos.y+0.85, z=pos.z}, "xdecor:book_open")
local timer = minetest.get_node_timer(pos)
timer:start(15.0)
timer:start(5.0)
end
function enchanting.destruct(pos)
@@ -132,6 +132,27 @@ function enchanting.timer(pos)
if num == 0 then
minetest.add_entity({x=pos.x, y=pos.y+0.85, z=pos.z}, "xdecor:book_open")
end
local minp = {x=pos.x-2, y=pos.y, z=pos.z-2}
local maxp = {x=pos.x+2, y=pos.y+1, z=pos.z+2}
local bookshelves = minetest.find_nodes_in_area(minp, maxp, "default:bookshelf")
if #bookshelves == 0 then return true end
local bookshelf_pos = bookshelves[math.random(1, #bookshelves)]
local x = pos.x - bookshelf_pos.x
local y = bookshelf_pos.y - pos.y
local z = pos.z - bookshelf_pos.z
if tostring(x..z):find(2) then
minetest.add_particle({
pos = bookshelf_pos,
velocity = {x=x, y=1.7-y, z=z},
acceleration = {x=-0.6, y=-1.5, z=0},
expirationtime = 1,
size = 2,
texture = "glyph"..math.random(1,14)..".png"
})
end
return true
end
@@ -161,7 +182,15 @@ minetest.register_entity(":xdecor:book_open", {
visual_size = {x=0.75, y=0.75},
collisionbox = {0},
physical = false,
textures = {"book_open.png"}
textures = {"book_open.png"},
on_activate = function(self)
local pos = self.object:getpos()
local pos_under = {x=pos.x, y=pos.y-1, z=pos.z}
if minetest.get_node(pos_under).name ~= "xdecor:enchantment_table" then
self.object:remove()
end
end
})
minetest.register_craft({

二進制
textures/glyph1.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 108 B

二進制
textures/glyph10.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 104 B

二進制
textures/glyph11.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 104 B

二進制
textures/glyph12.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 102 B

二進制
textures/glyph13.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 105 B

二進制
textures/glyph14.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 106 B

二進制
textures/glyph2.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 106 B

二進制
textures/glyph3.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 106 B

二進制
textures/glyph4.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 105 B

二進制
textures/glyph5.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 106 B

二進制
textures/glyph6.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 104 B

二進制
textures/glyph7.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 104 B

二進制
textures/glyph8.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 104 B

二進制
textures/glyph9.png 一般檔案

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 102 B