Added Param2 button to WE

master
Nathan Salapat 2021-07-14 20:15:09 -05:00
parent d14a8ce1cc
commit 3512639413
49 changed files with 1153 additions and 17 deletions

View File

@ -11,6 +11,7 @@ local gui_count2 = {} --mapping of player names to a quantity (arbitrary strings
local gui_count3 = {} --mapping of player names to a quantity (arbitrary strings may also appear as values)
local gui_angle = {} --mapping of player names to an angle (one of 90, 180, 270, representing the angle in degrees clockwise)
local gui_filename = {} --mapping of player names to file names
local gui_param2 = {}
--set default values
setmetatable(gui_nodename1, {__index = function() return "Cobblestone" end})
@ -25,6 +26,7 @@ setmetatable(gui_count2, {__index = function() return "6" end})
setmetatable(gui_count3, {__index = function() return "4" end})
setmetatable(gui_angle, {__index = function() return 90 end})
setmetatable(gui_filename, {__index = function() return "building" end})
setmetatable(gui_param2, {__index = function() return "0" end})
local axis_indices = {["X axis"]=1, ["Y axis"]=2, ["Z axis"]=3, ["Look direction"]=4}
local axis_values = {"x", "y", "z", "?"}
@ -904,3 +906,29 @@ worldedit.register_gui_function("worldedit_gui_clearobjects", {
execute_worldedit_command("clearobjects", name, "")
end,
})
worldedit.register_gui_function("worldedit_gui_param2", {
name = "Set Param2",
privs = we_privs("param2"),
get_formspec = function(name)
local value = gui_param2[name] or "0"
return "size[6.5,3]" .. worldedit.get_formspec_header("worldedit_gui_param2") ..
string.format("field[0.5,1.5;4,0.8;worldedit_gui_param2_value;Value;%s]", minetest.formspec_escape(value)) ..
"field_close_on_enter[worldedit_gui_copy_move_amount;false]" ..
"button_exit[3.5,2.5;3,0.8;worldedit_gui_param2;Set Param2]"
end,
})
worldedit.register_gui_handler("worldedit_gui_param2", function(name, fields)
local cg = {
worldedit_gui_param2_value = gui_param2,
}
local ret = handle_changes(name, "worldedit_gui_param2", fields, cg)
if fields.worldedit_gui_param2_value then
copy_changes(name, fields, cg)
worldedit.show_page(name, "worldedit_gui_param2")
execute_worldedit_command('param2', name, gui_param2[name])
return true
end
return ret
end)

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 FaceDeer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,416 @@
-- TODO:
-- There's potential race conditions in here if two players have the board open
-- and a culling happens or they otherwise diddle around with it. For now just
-- make sure it doesn't crash
local S = minetest.get_translator(minetest.get_current_modname())
local bulletin_max = 7*8
local culling_interval = 86400 -- one day in seconds
local culling_min = bulletin_max - 12 -- won't cull if there are this many or fewer bulletins
local bulletin_boards = {}
bulletin_boards.player_state = {}
bulletin_boards.board_def = {}
local path = minetest.get_worldpath() .. "/bulletin_boards.lua"
local f, e = loadfile(path);
if f then
bulletin_boards.global_boards = f()
else
bulletin_boards.global_boards = {}
end
local function save_boards()
local file, e = io.open(path, "w");
if not file then
return error(e);
end
file:write(minetest.serialize(bulletin_boards.global_boards))
file:close()
end
local max_text_size = 5000 -- half a book
local max_title_size = 60
local short_title_size = 12
-- gets the bulletins currently on a board
-- and other persisted data
local function get_board(name)
local board = bulletin_boards.global_boards[name]
if board then
return board
end
board = {}
board.last_culled = minetest.get_gametime()
bulletin_boards.global_boards[name] = board
return board
end
-- for incrementing through the bulletins on a board
local function find_next(board, start_index)
local index = start_index + 1
while index ~= start_index do
if board[index] then
return index
end
index = index + 1
if index > bulletin_max then
index = 1
end
end
return index
end
local function find_prev(board, start_index)
local index = start_index - 1
while index ~= start_index do
if board[index] then
return index
end
index = index - 1
if index < 1 then
index = bulletin_max
end
end
return index
end
-- Groups bulletins by count-per-player, then picks the oldest bulletin from the group with the highest count.
-- eg, if A has 1 bulletin, B has 2 bulletins, and C has 2 bulletins, then this will pick the oldest
-- bulletin from (B and C)'s bulletins. Returns index and timestamp, or nil if there's nothing.
local function find_most_cullable(board_name)
local board = get_board(board_name)
local player_count = {}
local max_count = 0
local total = 0
for i = 1, bulletin_max do
local bulletin = board[i]
if bulletin then
total = total + 1
local player_name = bulletin.owner
local count = (player_count[player_name] or 0) + 1
max_count = math.max(count, max_count)
player_count[player_name] = count
end
end
if total <= culling_min then
return
end
local max_players = {}
for player_name, count in pairs(player_count) do
if count == max_count then
max_players[player_name] = true
end
end
local most_cullable_index
local most_cullable_timestamp
for i = 1, bulletin_max do
local bulletin = board[i]
if bulletin and max_players[bulletin.owner] then
if bulletin.timestamp <= (most_cullable_timestamp or bulletin.timestamp) then
most_cullable_timestamp = bulletin.timestamp
most_cullable_index = i
end
end
end
return most_cullable_index, most_cullable_timestamp
end
-- safe way to get the description string of an item, in case it's not registered
local function get_item_desc(stack)
local stack_def = stack:get_definition()
if stack_def then
return stack_def.description
end
return stack:get_name()
end
-- shows the base board to a player
local function show_board(player_name, board_name)
local formspec = {}
local board = get_board(board_name)
local current_time = minetest.get_gametime()
local intervals = (current_time - board.last_culled)/culling_interval
local cull_count, remaining_cull_time = math.modf(intervals)
while cull_count > 0 do
local cull_index = find_most_cullable(board_name)
if cull_index then
board[cull_index] = nil
cull_count = cull_count - 1
else
cull_count = 0
end
end
board.last_culled = current_time - math.floor(culling_interval * remaining_cull_time)
local def = bulletin_boards.board_def[board_name]
local desc = minetest.formspec_escape(def.desc)
local tip
if def.cost then
local stack = ItemStack(def.cost)
tip = S("Post your bulletin here for the cost of 1 post-it note")
desc = desc .. S(", Cost: 1 post-it note")
else
tip = S("Post your bulletin here")
end
formspec[#formspec+1] = "size[8,8.5]"
.. "container[0,0]"
.. "label[0.0,-0.25;"..desc.."]"
.. "container_end[]"
.. "container[0,0.5]"
local i = 0
for y = 0, 6 do
for x = 0, 7 do
i = i + 1
local bulletin = board[i] or {}
local short_title = bulletin.title or ""
--Don't bother triming the title if the trailing dots would make it longer
if #short_title > short_title_size + 3 then
short_title = short_title:sub(1, short_title_size) .. "..."
end
local img = bulletin.icon or ""
formspec[#formspec+1] =
"image_button["..x..",".. y*1.2 ..";1,1;"..img..";button_"..i..";]"
.."label["..x..","..y*1.2-0.35 ..";"..minetest.formspec_escape(short_title).."]"
if bulletin.title and bulletin.owner and bulletin.timestamp then
local days_ago = math.floor((current_time-bulletin.timestamp)/86400)
formspec[#formspec+1] = "tooltip[button_"..i..";"
..S("@1\nPosted by @2\n@3 days ago", minetest.formspec_escape(bulletin.title), bulletin.owner, days_ago).."]"
else
formspec[#formspec+1] = "tooltip[button_"..i..";"..tip.."]"
end
end
end
formspec[#formspec+1] = "container_end[]"
bulletin_boards.player_state[player_name] = {board=board_name}
minetest.show_formspec(player_name, "bulletin_boards:board", table.concat(formspec))
end
-- shows a specific bulletin on a board
local function show_bulletin(player, board_name, index)
local board = get_board(board_name)
local def = bulletin_boards.board_def[board_name]
local icons = def.icons
local bulletin = board[index] or {}
local player_name = player:get_player_name()
bulletin_boards.player_state[player_name] = {board=board_name, index=index}
local tip
local has_cost
if def.cost then
local stack = ItemStack(def.cost)
local player_inventory = minetest.get_inventory({type="player", name=player_name})
tip = S("Post bulletin with this icon at the cost of 1 post-it note")
has_cost = player_inventory:contains_item("main", stack)
else
tip = S("Post bulletin with this icon")
has_cost = true
end
local admin = minetest.check_player_privs(player, "server")
local formspec = {"size[8,8]"
.."button[0.2,0;1,1;prev;"..S("Prev").."]"
.."button[6.65,0;1,1;next;"..S("Next").."]"}
local esc = minetest.formspec_escape
if ((bulletin.owner == nil or bulletin.owner == player_name) and has_cost) or admin then
formspec[#formspec+1] =
"field[1.5,0.75;5.5,0;title;"..S("Title:")..";"..esc(bulletin.title or "").."]"
.."textarea[0.5,1.15;7.5,7;text;"..S("Contents:")..";"..esc(bulletin.text or "").."]"
.."label[0.3,7;"..S("Post:").."]"
for i, icon in ipairs(icons) do
formspec[#formspec+1] = "image_button[".. i*0.75-0.5 ..",7.35;1,1;"..icon..";save_"..i..";]"
.."tooltip[save_"..i..";"..tip.."]"
end
formspec[#formspec+1] = "image_button[".. (#icons+1)*0.75-0.25 ..",7.35;1,1;bulletin_boards_delete.png;delete;]"
.."tooltip[delete;"..S("Delete this bulletin").."]"
.."label["..(#icons+1)*0.75-0.25 ..",7;"..S("Delete:").."]"
elseif bulletin.owner then
formspec[#formspec+1] =
"label[1.4,0.5;"..S("Posted by @1", bulletin.owner).."]"
.."tablecolumns[color;text]"
.."tableoptions[background=#00000000;highlight=#00000000;border=false]"
.."table[1.35,0.25;5,0.5;title;#FFFF00,"..esc(bulletin.title or "").."]"
.."textarea[0.5,1.5;7.5,7;;"..esc(bulletin.text or "")..";]"
.."button[2.5,7.5;3,1;back;" .. S("Back to Board") .. "]"
if bulletin.owner == player_name then
formspec[#formspec+1] = "image_button[".. (#icons+1)*0.75-0.25 ..",7.35;1,1;bulletin_boards_delete.png;delete;]"
.."tooltip[delete;"..S("Delete this bulletin").."]"
.."label["..(#icons+1)*0.75-0.25 ..",7;"..S("Delete:").."]"
end
else
return
end
minetest.show_formspec(player_name, "bulletin_boards:bulletin", table.concat(formspec))
end
-- interpret clicks on the base board
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname ~= "bulletin_boards:board" then return end
local player_name = player:get_player_name()
for field, state in pairs(fields) do
if field:sub(1, #"button_") == "button_" then
local i = tonumber(field:sub(#"button_"+1))
local state = bulletin_boards.player_state[player_name]
if state then
show_bulletin(player, state.board, i)
end
return
end
end
end)
-- interpret clicks on the bulletin
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname ~= "bulletin_boards:bulletin" then return end
local player_name = player:get_player_name()
local state = bulletin_boards.player_state[player_name]
if not state then return end
local board = get_board(state.board)
local def = bulletin_boards.board_def[state.board]
if not board then return end
-- no security needed on these actions
if fields.back then
bulletin_boards.player_state[player_name] = nil
show_board(player_name, state.board)
end
if fields.prev then
local next_index = find_prev(board, state.index)
show_bulletin(player, state.board, next_index)
return
end
if fields.next then
local next_index = find_next(board, state.index)
show_bulletin(player, state.board, next_index)
return
end
if fields.quit then
minetest.after(0.1, show_board, player_name, state.board)
end
-- check if the player's allowed to do the stuff after this
local admin = minetest.check_player_privs(player, "server")
local current_bulletin = board[state.index]
if not admin and (current_bulletin and current_bulletin.owner ~= player_name) then
-- someone's done something funny. Don't be accusatory, though - could be a race condition
return
end
if fields.delete then
board[state.index] = nil
fields.title = ""
save_boards()
end
local player_inventory = minetest.get_inventory({type="player", name=player_name})
local has_cost = true
if def.cost then
has_cost = player_inventory:contains_item("main", def.cost)
end
if fields.text ~= "" and (has_cost or admin) then
for field, _ in pairs(fields) do
if field:sub(1, #"save_") == "save_" then
local i = tonumber(field:sub(#"save_"+1))
local bulletin = {}
bulletin.owner = player_name
bulletin.title = fields.title:sub(1, max_title_size)
bulletin.text = fields.text:sub(1, max_text_size)
bulletin.icon = def.icons[i]
bulletin.timestamp = minetest.get_gametime()
board[state.index] = bulletin
if not admin and def.cost then
player_inventory:remove_item("main", def.cost)
end
save_boards()
break
end
end
end
bulletin_boards.player_state[player_name] = nil
show_board(player_name, state.board)
end)
-- default icon set
local base_icons = {
"bulletin_boards_document_comment_above.png",
"bulletin_boards_document_back.png",
"bulletin_boards_document_next.png",
"bulletin_boards_document_image.png",
"bulletin_boards_document_signature.png",
"bulletin_boards_to_do_list.png",
"bulletin_boards_documents_email.png",
"bulletin_boards_receipt_invoice.png",
}
-- generates a random jumble of icons to superimpose on a bulletin board texture
-- rez is the "working" canvas size. 32-pixel icons get scattered on that canvas
-- before it is scaled down to 16 pixels
local function generate_random_board(rez, count, icons)
icons = icons or base_icons
local tex = {"([combine:"..rez.."x"..rez}
for i = 1, count do
tex[#tex+1] = ":"..math.random(1,rez-32)..","..math.random(1,rez-32)
.."="..icons[math.random(1,#icons)]
end
tex[#tex+1] = "^[resize:16x16)"
return table.concat(tex)
end
local function register_board(board_name, board_def)
bulletin_boards.board_def[board_name] = board_def
local background = board_def.background or "bulletin_boards_corkboard.png"
local foreground = board_def.foreground or "bulletin_boards_frame.png"
local tile = background.."^"..generate_random_board(98, 7, board_def.icons).."^"..foreground
local bulletin_board_def = {
description = board_def.desc,
groups = {breakable=1, not_in_creative_inventory=1},
tiles = {tile},
inventory_image = tile,
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
drawtype = "nodebox",
node_box = {
type = "wallmounted",
wall_top = {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5},
wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
wall_side = {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5},
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local player_name = clicker:get_player_name()
show_board(player_name, board_name)
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", board_def.desc or "")
end,
}
minetest.register_node(board_name, bulletin_board_def)
end
register_board("bulletin_boards:bulletin_board_basic", {
desc = S("Public Bulletin Board"),
cost = "tasks:trash_4",
icons = base_icons,
})

View File

@ -0,0 +1,39 @@
# textdomain: bulletin_boards
### init.lua ###
#Appended to the title of a bulletin board to indicate how much it costs to post a bulletin here (@1 is a number, @2 is an item name)
, Cost: @1 @2=, kostet: @1 @2
#Tooltip. Title of bulletin, author of bulletin, how long ago the bulletin was posted.
@1@nPosted by @2@n@3 days ago=@1@nGepostet von @2@nvor @3 Tagen
#Button label
Back to Board=Zurück zum Brett
#Text area label
Contents:=Inhalt:
#title of a bulletin board
Copper Board=Kupfernes Brett
#tooltip
Delete this bulletin=Lösche diesen Eintrag
#label
Delete:=Löschen:
#Button label
Next=Nächste
#tooltip
Post bulletin with this icon=Eintrag mit diesem Bild anschlagens
#tooltip
Post bulletin with this icon at the cost of @1 @2=Schlägt den Eintrag mit diesem Bild für @1 @2 an
#tooltip
Post your bulletin here=Schlage deinen Eintrag hier an
#tooltip
Post your bulletin here for the cost of @1 @2=Schlage deinen Eintrag für @1 @2 an
#label
Post:=Anschlagen:
#player who posted this bulletin
Posted by @1=Angeschlagen von @1
#Button label, short for "previous"
Prev=Vorher
#title of a bulletin board
Public Bulletin Board=Öffentliche Anschlagtafel
#Text field label
Title:=Titel:

View File

@ -0,0 +1,39 @@
# textdomain: bulletin_boards
### init.lua ###
#Appended to the title of a bulletin board to indicate how much it costs to post a bulletin here (@1 is a number, @2 is an item name)
, Cost: @1 @2=, Precio: @1 @2
#Tooltip. Title of bulletin, author of bulletin, how long ago the bulletin was posted.
@1@nPosted by @2@n@3 days ago=@1@nPublicado por @2 hace @n@3 días
#Button label
Back to Board=Volver al tablón
#Text area label
Contents:=Contenidos:
#title of a bulletin board
Copper Board=Tablón de Cobre
#tooltip
Delete this bulletin=Borrar este boletín
#label
Delete:=Borrar:
#Button label
Next=Sig
#tooltip
Post bulletin with this icon=Publicar un boletín con este ícono
#tooltip
Post bulletin with this icon at the cost of @1 @2=Publicar este boletín con este ícono al precio de @1 @2
#tooltip
Post your bulletin here=Publica tu boletín aqui
#tooltip
Post your bulletin here for the cost of @1 @2=Publica tu boletín aqui al precio de @1 @2
#label
Post:=Publicar:
#player who posted this bulletin
Posted by @1=Publicado por @1
#Button label, short for "previous"
Prev=Prev
#title of a bulletin board
Public Bulletin Board=Tablón publico de anuncios
#Text field label
Title:=Título:

View File

@ -0,0 +1,87 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-01-21 19:38-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua:158
msgid "Post your bulletin here for the cost of @1 @2"
msgstr ""
#: init.lua:160
msgid "Post your bulletin here"
msgstr ""
#: init.lua:186
msgid ""
"@1\n"
"Posted by @2\n"
"@3 days ago"
msgstr ""
#: init.lua:212
msgid "Post bulletin with this icon at the cost of @1 @2"
msgstr ""
#: init.lua:215
msgid "Post bulletin with this icon"
msgstr ""
#: init.lua:222
msgid "Prev"
msgstr ""
#: init.lua:223
msgid "Next"
msgstr ""
#: init.lua:227
msgid "Title:"
msgstr ""
#: init.lua:228
msgid "Contents:"
msgstr ""
#: init.lua:229
msgid "Post:"
msgstr ""
#: init.lua:235
#: init.lua:247
msgid "Delete this bulletin"
msgstr ""
#: init.lua:236
#: init.lua:248
msgid "Delete:"
msgstr ""
#: init.lua:239
msgid "Posted by @1"
msgstr ""
#: init.lua:244
msgid "Back to Board"
msgstr ""
#: init.lua:410
msgid "Public Bulletin Board"
msgstr ""
#: init.lua:416
msgid "Copper Board"
msgstr ""

View File

@ -0,0 +1,39 @@
# textdomain: bulletin_boards
### init.lua ###
#Appended to the title of a bulletin board to indicate how much it costs to post a bulletin here (@1 is a number, @2 is an item name)
, Cost: @1 @2=
#Tooltip. Title of bulletin, author of bulletin, how long ago the bulletin was posted.
@1@nPosted by @2@n@3 days ago=
#Button label
Back to Board=
#Text area label
Contents:=
#title of a bulletin board
Copper Board=
#tooltip
Delete this bulletin=
#label
Delete:=
#Button label
Next=
#tooltip
Post bulletin with this icon=
#tooltip
Post bulletin with this icon at the cost of @1 @2=
#tooltip
Post your bulletin here=
#tooltip
Post your bulletin here for the cost of @1 @2=
#label
Post:=
#player who posted this bulletin
Posted by @1=
#Button label, short for "previous"
Prev=
#title of a bulletin board
Public Bulletin Board=
#Text field label
Title:=

View File

@ -0,0 +1,6 @@
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
cd ..
set LIST=
for /r %%X in (*.lua) do set LIST=!LIST! %%X
..\intllib\tools\xgettext.bat %LIST%

View File

@ -0,0 +1,3 @@
name=bulletin_boards
description = Allows creation of global bulletin boards where players can post public messages
optional_depends = default

View File

@ -0,0 +1,13 @@
## Bulletin boards
This mod adds global bulletin boards to Minetest. These are boards where players can post short notes for other players to see, at a nominal cost.
| ![](screenshot.png) | ![](screenshot_bulletin.png) |
Each board can hold up to 56 bulletins (in an 8 by 7 grid), with each bulletin having a title and an icon that can be set by the player posting it. Once the bulletin board nears capacity, older bulletins will start being culled from the board to make room for new bulletins. They will be culled by preference starting with the bulletins belonging to the players who have the most bulletins currently posted, followed by the oldest bulletin belonging to those players.
So for example, if Alice has 1 bulletin on the board, Bob has 2 bulletins on the board, and Collin has 2 bulletins on the board, then when it comes time to cull a bulletin the oldest one belonging to either Bob or Collin will be culled. If that happens to be Bob's, then next time it's time to cull Alice will have 1, Bob will have 1, and Collin will have 2, so the oldest of Collin's bulletins will be culled. This ordering is done to try to balance things out fairly - players that hog the board with multiple bulletins will have their bulletins culled more often, but everyone's single most recent bulletin will stick around as long as possible.
Bulletin boards can have a cost associated with posting. If the player has the cost (an item stack) in their inventory, they can post and the cost will be automatically deducted.
Boards are "global", in the sense that all instances of a given type of board will have the same content regardless of where they are in the world. This can make them useful as a means of communication over distance as well as time, serving as a sort of public post office.

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,17 @@
bulletin_boards_corkboard.png and bulletin_boards_frame.png - by FaceDeer, released under the CC-0 public domain license
bulletin_boards_delete.png - from https://commons.wikimedia.org/wiki/File:Symbol_delete_vote_darkened.svg under the public domain
The following are from the "Farm-Fresh Web Icons" set, May 5 2014, from http://www.fatcow.com/free-icons by FatCow under the CC-BY-SA 3.0 unported license:
bulletin_boards_document_back.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_document_back.png
bulletin_boards_document_comment_above.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_document_comment_above.png
bulletin_boards_document_image.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_document_image.png
bulletin_boards_document_next.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_document_next.png
bulletin_boards_document_notes.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_document_notes.png
bulletin_boards_document_quote.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_document_quote.png
bulletin_boards_document_signature.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_document_signature.png
bulletin_boards_documents_email.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_documents_email.png
bulletin_boards_receipt_invoice.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_receipt_invoice.png
bulletin_boards_to_do_list.png - https://commons.wikimedia.org/wiki/File:Farm-Fresh_to_do_list.png
The Farm-Fresh Web Icons were found via found from https://commons.wikimedia.org/wiki/Category:Document_icons if you want more of them

View File

@ -115,4 +115,38 @@ for i in ipairs(colors) do
hex,
true)
minetest.register_node('color:'..name..'_siding', {
description = desc..' Siding',
tiles = {{name='color_siding.png', align_style='world', scale=4}},
paramtype2 = 'colorfacedir',
palette = 'color_'..name..'.png',
color = hex,
groups = {breakable=1},
on_punch = color.make_darker,
on_rightclick = color.make_lighter,
})
color.register_stair_and_slab(name..'_siding',
{{name='color_siding.png', align_style='world', scale=4}},
'color_'..name..'.png',
hex,
true)
minetest.register_node('color:'..name..'_shake', {
description = desc..' Shake',
tiles = {{name='color_shake.png', align_style='world', scale=4}},
paramtype2 = 'colorfacedir',
palette = 'color_'..name..'.png',
color = hex,
groups = {breakable=1},
on_punch = color.make_darker,
on_rightclick = color.make_lighter,
})
color.register_stair_and_slab(name..'_shake',
{{name='color_shake.png', align_style='world', scale=4}},
'color_'..name..'.png',
hex,
true)
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -305,6 +305,7 @@ function doors.register(name, def)
def.walkable = true
def.is_ground_content = false
def.buildable_to = false
def.use_texture_alpha = 'clip'
def.selection_box = {type = 'fixed', fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
def.collision_box = {type = 'fixed', fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
@ -362,6 +363,7 @@ function doors.register_trapdoor(name, def)
def.paramtype = 'light'
def.paramtype2 = 'facedir'
def.is_ground_content = false
def.use_texture_alpha = 'clip'
def.groups = {breakable=1}
--if not def.sounds then

View File

@ -91,7 +91,7 @@ function gamer.player_set_animation(player, anim_name, speed)
end
local anim = model.animations[anim_name]
player_anim[name] = anim_name
player:set_animation(anim, speed or model.animation_speed, animation_blend)
player:set_animation(anim, speed or model.animation_speed)
end
-- Update appearance when the player joins

10
mods/levels/glass.lua Normal file
View File

@ -0,0 +1,10 @@
minetest.register_node("levels:glass_01", {
description = "Glass",
drawtype = "glasslike_framed",
tiles = {"levels_glass.png", "levels_glass_detail.png"},
use_texture_alpha = "clip", -- only needed for stairs API
paramtype = "light",
sunlight_propagates = true,
groups = {breakable = 1},
-- sounds = default.node_sound_glass_defaults(),
})

View File

@ -69,6 +69,7 @@ function levels.register_alpha(name, desc, sound, vol)
end
dofile(minetest.get_modpath('levels')..'/ducts.lua')
dofile(minetest.get_modpath('levels')..'/glass.lua')
dofile(minetest.get_modpath('levels')..'/ground.lua')
dofile(minetest.get_modpath('levels')..'/metal.lua')
dofile(minetest.get_modpath('levels')..'/scifi.lua')

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -678,17 +678,3 @@ function mail.handle_receivefields(player, formname, fields)
end
minetest.register_on_player_receive_fields(mail.handle_receivefields)
if minetest.get_modpath("unified_inventory") then
mail.receive_mail_message = mail.receive_mail_message ..
" or use the mail button in the inventory"
mail.read_later_message = mail.read_later_message ..
" or by using the mail button in the inventory"
unified_inventory.register_button("mail", {
type = "image",
image = "mail_button.png",
tooltip = "Mail"
})
end

View File

@ -28,7 +28,7 @@ mail = {
local MP = minetest.get_modpath(minetest.get_current_modname())
dofile(MP .. "/util/normalize.lua")
dofile(MP .. "/chatcommands.lua")
--dofile(MP .. "/chatcommands.lua")
dofile(MP .. "/migrate.lua")
dofile(MP .. "/attachment.lua")
dofile(MP .. "/hud.lua")

View File

@ -12,7 +12,7 @@ minetest.register_on_joinplayer(function(player)
if unreadcount > 0 then
minetest.chat_send_player(name,
minetest.colorize("#00f529", "(" .. unreadcount .. ") You have mail! Type /mail to read"))
minetest.colorize("#00f529", "(" .. unreadcount .. ") You have mail! Find a mailbox to read it."))
end
end, player:get_player_name())

View File

@ -275,6 +275,7 @@ minetest.register_node('ship:energy_support', {
paramtype2 = 'facedir',
light_source = 10,
tiles = {'ship_energy_support.png'},
use_texture_alpha = 'clip',
groups = {breakable=1},
selection_box = {
type = 'fixed',
@ -327,6 +328,7 @@ minetest.register_node('ship:energy_beam', {
paramtype = 'light',
light_source = 10,
tiles = {'ship_energy_beam.png'},
use_texture_alpha = 'clip',
groups = {breakable=1, not_in_creative_inventory=1},
drop = '',
selection_box = beam_select,
@ -340,6 +342,7 @@ minetest.register_node('ship:energy_support_top', {
paramtype2 = 'facedir',
light_source = 10,
tiles = {'ship_energy_support_top.png'},
use_texture_alpha = 'clip',
groups = {breakable=1, not_in_creative_inventory=1},
drop = '',
selection_box = beam_select,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -13,3 +13,4 @@ dofile(minetest.get_modpath('tasks')..'/example.lua')
dofile(minetest.get_modpath('tasks')..'/items.lua')
dofile(minetest.get_modpath('tasks')..'/rubbish.lua')
dofile(minetest.get_modpath('tasks')..'/storage_locker.lua')
dofile(minetest.get_modpath('tasks')..'/transformer.lua')

View File

@ -0,0 +1,64 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="128" height="128" viewBox="0 0 128 128"
xmlns="http://www.w3.org/2000/svg" version="1.1">
<desc>ship parts.blend, (Blender 2.91.2)</desc>
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="101.000,34.000 103.000,34.000 103.000,2.000 101.000,2.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="103.000,0.000 103.000,2.000 107.000,2.000 107.000,0.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="109.000,2.000 107.000,2.000 107.000,34.000 109.000,34.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="107.000,36.000 107.000,34.000 103.000,34.000 103.000,36.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="128.000,2.000 126.000,2.000 126.000,34.000 128.000,34.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="107.000,2.000 103.000,2.000 103.000,34.000 107.000,34.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="126.000,36.000 126.000,34.000 121.000,34.000 121.000,36.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="119.000,34.000 121.000,34.000 121.000,2.000 119.000,2.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="121.000,0.000 121.000,2.000 126.000,2.000 126.000,0.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="121.000,34.000 126.000,34.000 126.000,2.000 121.000,2.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="110.000,34.000 112.000,34.000 112.000,2.000 110.000,2.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="112.000,0.000 112.000,2.000 116.000,2.000 116.000,0.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="118.000,2.000 116.000,2.000 116.000,34.000 118.000,34.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="116.000,36.000 116.000,34.000 112.000,34.000 112.000,36.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="116.000,2.000 112.000,2.000 112.000,34.000 116.000,34.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="0.000,124.000 0.000,128.000 20.000,128.000 20.000,124.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="20.000,124.000 20.000,128.000 68.000,128.000 68.000,124.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="0.000,120.000 0.000,124.000 20.000,124.000 20.000,120.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="20.000,120.000 20.000,124.000 68.000,124.000 68.000,120.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="104.000,68.000 80.000,68.000 80.000,96.000 104.000,96.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="80.000,120.000 80.000,96.000 24.000,96.000 24.000,120.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="0.000,96.000 24.000,96.000 24.000,68.000 0.000,68.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="24.000,44.000 24.000,68.000 80.000,68.000 80.000,44.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="24.000,96.000 80.000,96.000 80.000,68.000 24.000,68.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="128.000,124.000 128.000,112.000 124.000,112.000 124.000,124.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="108.000,123.000 108.000,105.000 103.000,105.000 103.000,123.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="103.000,123.000 103.000,105.000 93.000,105.000 93.000,123.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="93.000,123.000 93.000,105.000 88.000,105.000 88.000,123.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="103.000,128.000 103.000,123.000 93.000,123.000 93.000,128.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="103.000,105.000 103.000,100.000 93.000,100.000 93.000,105.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="124.000,124.000 124.000,112.000 114.000,112.000 114.000,124.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="114.000,124.000 114.000,112.000 110.000,112.000 110.000,124.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="124.000,128.000 124.000,124.000 114.000,124.000 114.000,128.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="124.000,112.000 124.000,108.000 114.000,108.000 114.000,112.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="0.000,44.000 0.000,61.000 2.000,61.000 2.000,44.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="2.000,44.000 2.000,61.000 4.000,61.000 4.000,44.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="4.000,44.000 4.000,61.000 6.000,61.000 6.000,44.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="13.000,67.000 13.000,50.000 11.000,50.000 11.000,67.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="11.000,67.000 11.000,50.000 9.000,50.000 9.000,67.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="9.000,67.000 9.000,50.000 7.000,50.000 7.000,67.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="0.000,61.000 0.000,67.000 2.000,67.000 2.000,61.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="2.000,61.000 2.000,67.000 4.000,67.000 4.000,61.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="4.000,61.000 4.000,67.000 6.000,67.000 6.000,61.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="7.000,44.000 7.000,50.000 9.000,50.000 9.000,44.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="9.000,44.000 9.000,50.000 11.000,50.000 11.000,44.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="11.000,44.000 11.000,50.000 13.000,50.000 13.000,44.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="48.000,43.000 48.000,39.000 24.000,39.000 24.000,43.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="24.000,43.000 24.000,39.000 0.000,39.000 0.000,43.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="96.000,43.000 96.000,39.000 72.000,39.000 72.000,43.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="72.000,43.000 72.000,39.000 48.000,39.000 48.000,43.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="24.000,0.000 24.000,15.000 48.000,15.000 48.000,0.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="0.000,39.000 24.000,39.000 24.000,15.000 0.000,15.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="48.000,0.000 48.000,15.000 72.000,15.000 72.000,0.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="72.000,0.000 72.000,15.000 96.000,15.000 96.000,0.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="0.000,0.000 0.000,15.000 24.000,15.000 24.000,0.000 " />
<polygon stroke="black" stroke-width="1" fill="rgb(204, 204, 204)" fill-opacity="0.25" points="72.000,15.000 72.000,39.000 96.000,39.000 96.000,15.000 " />
</svg>

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,310 @@
# Blender v2.91.2 OBJ File: 'ship parts.blend'
# www.blender.org
o Transformer_Cube.004
v -0.062500 -0.500000 0.500000
v -0.062500 -0.437500 0.500000
v -0.062500 -0.500000 -0.500000
v -0.062500 -0.437500 -0.500000
v 0.062500 -0.500000 0.500000
v 0.062500 -0.437500 0.500000
v 0.062500 -0.500000 -0.500000
v 0.062500 -0.437500 -0.500000
v -1.312500 -0.500000 0.500000
v -1.312500 -0.437500 0.500000
v -1.312500 -0.500000 -0.500000
v -1.312500 -0.437500 -0.500000
v -1.187500 -0.500000 0.500000
v -1.187500 -0.437500 0.500000
v -1.187500 -0.500000 -0.500000
v -1.187500 -0.437500 -0.500000
v -0.687500 -0.500000 0.500000
v -0.687500 -0.437500 0.500000
v -0.687500 -0.500000 -0.500000
v -0.687500 -0.437500 -0.500000
v -0.562500 -0.500000 0.500000
v -0.562500 -0.437500 0.500000
v -0.562500 -0.500000 -0.500000
v -0.562500 -0.437500 -0.500000
v -1.375000 -0.437500 0.312500
v -1.375000 -0.312500 0.312500
v -1.375000 -0.437500 -0.312500
v -1.375000 -0.312500 -0.312500
v 0.125000 -0.437500 0.312500
v 0.125000 -0.312500 0.312500
v 0.125000 -0.437500 -0.312500
v 0.125000 -0.312500 -0.312500
v -1.500000 -0.312500 0.437500
v -1.500000 0.437500 0.437500
v -1.500000 -0.312500 -0.437500
v -1.500000 0.437500 -0.437500
v 0.250000 -0.312500 0.437500
v 0.250000 0.437500 0.437500
v 0.250000 -0.312500 -0.437500
v 0.250000 0.437500 -0.437500
v 0.250000 -0.187500 0.375000
v 0.250000 0.375000 0.375000
v 0.250000 -0.187500 0.062500
v 0.250000 0.375000 0.062500
v 0.375000 -0.187500 0.375000
v 0.375000 0.375000 0.375000
v 0.375000 -0.187500 0.062500
v 0.375000 0.375000 0.062500
v 0.250000 0.000000 -0.062500
v 0.250000 0.375000 -0.062500
v 0.250000 0.000000 -0.375000
v 0.250000 0.375000 -0.375000
v 0.375000 0.000000 -0.062500
v 0.375000 0.375000 -0.062500
v 0.375000 0.000000 -0.375000
v 0.375000 0.375000 -0.375000
v 0.250000 -0.500000 -0.125000
v 0.250000 0.000000 -0.125000
v 0.250000 -0.500000 -0.187500
v 0.250000 0.000000 -0.187500
v 0.312500 -0.500000 -0.125000
v 0.312500 0.000000 -0.125000
v 0.312500 -0.500000 -0.187500
v 0.312500 0.000000 -0.187500
v 0.250000 -0.500000 -0.250000
v 0.250000 0.000000 -0.250000
v 0.250000 -0.500000 -0.312500
v 0.250000 0.000000 -0.312500
v 0.312500 -0.500000 -0.250000
v 0.312500 0.000000 -0.250000
v 0.312500 -0.500000 -0.312500
v 0.312500 0.000000 -0.312500
v 0.250000 0.343750 0.093750
v 0.250000 0.343750 -0.093750
v 0.250000 0.281250 0.093750
v 0.250000 0.281250 -0.093750
v 0.312500 0.343750 0.093750
v 0.312500 0.343750 -0.093750
v 0.312500 0.281250 0.093750
v 0.312500 0.281250 -0.093750
v 0.250000 0.218750 0.093750
v 0.250000 0.218750 -0.093750
v 0.250000 0.156250 0.093750
v 0.250000 0.156250 -0.093750
v 0.312500 0.218750 0.093750
v 0.312500 0.218750 -0.093750
v 0.312500 0.156250 0.093750
v 0.312500 0.156250 -0.093750
v -0.625000 0.437500 0.375000
v -0.625000 0.562500 0.375000
v -0.625000 0.437500 -0.375000
v -0.625000 0.562500 -0.375000
v 0.125000 0.437500 0.375000
v 0.125000 0.562500 0.375000
v 0.125000 0.437500 -0.375000
v 0.125000 0.562500 -0.375000
v -1.437500 0.437500 0.375000
v -1.437500 1.000000 0.375000
v -1.437500 0.437500 -0.375000
v -1.437500 1.000000 -0.375000
v -0.687500 0.437500 0.375000
v -0.687500 1.000000 0.375000
v -0.687500 0.437500 -0.375000
v -0.687500 1.000000 -0.375000
vt 0.789062 0.734375
vt 0.804688 0.734375
vt 0.804688 0.984375
vt 0.789062 0.984375
vt 0.804688 1.000000
vt 0.835938 0.984375
vt 0.835938 1.000000
vt 0.851562 0.984375
vt 0.835938 0.734375
vt 0.851562 0.734375
vt 0.835938 0.718750
vt 0.804688 0.718750
vt 1.000000 0.984375
vt 0.984375 0.984375
vt 0.984375 0.734375
vt 1.000000 0.734375
vt 0.984375 0.718750
vt 0.945312 0.734375
vt 0.945312 0.718750
vt 0.929688 0.734375
vt 0.945312 0.984375
vt 0.929688 0.984375
vt 0.945312 1.000000
vt 0.984375 1.000000
vt 0.859375 0.734375
vt 0.875000 0.734375
vt 0.875000 0.984375
vt 0.859375 0.984375
vt 0.875000 1.000000
vt 0.906250 0.984375
vt 0.906250 1.000000
vt 0.921875 0.984375
vt 0.906250 0.734375
vt 0.921875 0.734375
vt 0.906250 0.718750
vt 0.875000 0.718750
vt 0.000000 0.031250
vt 0.000000 0.000000
vt 0.156250 0.000000
vt 0.156250 0.031250
vt 0.531250 0.000000
vt 0.531250 0.031250
vt 0.000000 0.062500
vt 0.000000 0.031250
vt 0.156250 0.031250
vt 0.156250 0.062500
vt 0.531250 0.031250
vt 0.531250 0.062500
vt 0.812500 0.468750
vt 0.625000 0.468750
vt 0.625000 0.250000
vt 0.812500 0.250000
vt 0.625000 0.062500
vt 0.187500 0.250000
vt 0.187500 0.062500
vt 0.000000 0.250000
vt 0.187500 0.468750
vt 0.000000 0.468750
vt 0.187500 0.656250
vt 0.625000 0.656250
vt 1.000000 0.031250
vt 1.000000 0.125000
vt 0.968750 0.125000
vt 0.968750 0.031250
vt 0.843750 0.039062
vt 0.843750 0.179688
vt 0.804688 0.179688
vt 0.804688 0.039062
vt 0.726562 0.179688
vt 0.726562 0.039062
vt 0.687500 0.179688
vt 0.687500 0.039062
vt 0.804688 0.000000
vt 0.726562 0.000000
vt 0.804688 0.218750
vt 0.726562 0.218750
vt 0.890625 0.125000
vt 0.890625 0.031250
vt 0.859375 0.125000
vt 0.859375 0.031250
vt 0.968750 0.000000
vt 0.890625 0.000000
vt 0.968750 0.156250
vt 0.890625 0.156250
vt 0.000000 0.656250
vt 0.000000 0.523438
vt 0.015625 0.523438
vt 0.015625 0.656250
vt 0.031250 0.523438
vt 0.031250 0.656250
vt 0.046875 0.523438
vt 0.046875 0.656250
vt 0.101562 0.476562
vt 0.101562 0.609375
vt 0.085938 0.609375
vt 0.085938 0.476562
vt 0.070312 0.609375
vt 0.070312 0.476562
vt 0.054688 0.609375
vt 0.054688 0.476562
vt 0.000000 0.523438
vt 0.000000 0.476562
vt 0.015625 0.476562
vt 0.015625 0.523438
vt 0.031250 0.476562
vt 0.031250 0.523438
vt 0.046875 0.476562
vt 0.046875 0.523438
vt 0.054688 0.656250
vt 0.054688 0.609375
vt 0.070312 0.609375
vt 0.070312 0.656250
vt 0.085938 0.609375
vt 0.085938 0.656250
vt 0.101562 0.609375
vt 0.101562 0.656250
vt 0.375000 0.664062
vt 0.375000 0.695312
vt 0.187500 0.695312
vt 0.187500 0.664062
vt 0.000000 0.695312
vt 0.000000 0.664062
vt 0.750000 0.664062
vt 0.750000 0.695312
vt 0.562500 0.695312
vt 0.562500 0.664062
vt 0.187500 1.000000
vt 0.187500 0.882812
vt 0.375000 0.882812
vt 0.375000 1.000000
vt 0.187500 0.882812
vt 0.000000 0.882812
vt 0.562500 0.882812
vt 0.562500 1.000000
vt 0.750000 0.882812
vt 0.750000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.882812
vt 0.562500 0.695312
vt 0.750000 0.695312
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 -1.0000 0.0000
s off
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/3/2 8/6/2 7/7/2
f 7/8/3 8/6/3 6/9/3 5/10/3
f 5/11/4 6/9/4 2/2/4 1/12/4
f 9/13/1 10/14/1 12/15/1 11/16/1
f 8/6/5 4/3/5 2/2/5 6/9/5
f 11/17/2 12/15/2 16/18/2 15/19/2
f 15/20/3 16/18/3 14/21/3 13/22/3
f 13/23/4 14/21/4 10/14/4 9/24/4
f 16/18/5 12/15/5 10/14/5 14/21/5
f 17/25/1 18/26/1 20/27/1 19/28/1
f 19/29/2 20/27/2 24/30/2 23/31/2
f 23/32/3 24/30/3 22/33/3 21/34/3
f 21/35/4 22/33/4 18/26/4 17/36/4
f 24/30/5 20/27/5 18/26/5 22/33/5
f 25/37/1 26/38/1 28/39/1 27/40/1
f 27/40/2 28/39/2 32/41/2 31/42/2
f 31/43/3 32/44/3 30/45/3 29/46/3
f 29/46/4 30/45/4 26/47/4 25/48/4
f 33/49/1 34/50/1 36/51/1 35/52/1
f 35/53/2 36/51/2 40/54/2 39/55/2
f 39/56/3 40/54/3 38/57/3 37/58/3
f 37/59/4 38/57/4 34/50/4 33/60/4
f 40/54/5 36/51/5 34/50/5 38/57/5
f 51/61/2 52/62/2 56/63/2 55/64/2
f 43/65/2 44/66/2 48/67/2 47/68/2
f 47/68/3 48/67/3 46/69/3 45/70/3
f 45/70/4 46/69/4 42/71/4 41/72/4
f 43/73/6 47/68/6 45/70/6 41/74/6
f 48/67/5 44/75/5 42/76/5 46/69/5
f 55/64/3 56/63/3 54/77/3 53/78/3
f 53/78/4 54/77/4 50/79/4 49/80/4
f 51/81/6 55/64/6 53/78/6 49/82/6
f 56/63/5 52/83/5 50/84/5 54/77/5
f 59/85/2 60/86/2 64/87/2 63/88/2
f 63/88/3 64/87/3 62/89/3 61/90/3
f 61/90/4 62/89/4 58/91/4 57/92/4
f 67/93/2 68/94/2 72/95/2 71/96/2
f 71/96/3 72/95/3 70/97/3 69/98/3
f 69/98/4 70/97/4 66/99/4 65/100/4
f 75/101/6 76/102/6 80/103/6 79/104/6
f 79/104/3 80/103/3 78/105/3 77/106/3
f 77/106/5 78/105/5 74/107/5 73/108/5
f 83/109/6 84/110/6 88/111/6 87/112/6
f 87/112/3 88/111/3 86/113/3 85/114/3
f 85/114/5 86/113/5 82/115/5 81/116/5
f 89/117/1 90/118/1 92/119/1 91/120/1
f 91/120/2 92/119/2 96/121/2 95/122/2
f 95/123/3 96/124/3 94/125/3 93/126/3
f 93/126/4 94/125/4 90/118/4 89/117/4
f 97/127/1 98/128/1 100/129/1 99/130/1
f 96/121/5 92/119/5 90/131/5 94/132/5
f 99/130/2 100/129/2 104/133/2 103/134/2
f 103/134/3 104/133/3 102/135/3 101/136/3
f 101/137/4 102/138/4 98/128/4 97/127/4
f 104/133/5 100/139/5 98/140/5 102/135/5

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,17 @@
local col_box = {
type = 'fixed',
fixed = {{-.45, -.5, -.45, 1.5, .4, .5},
{.7, .4, -.35, 1.4, 1, .35}}
}
minetest.register_node('tasks:transformer', {
description = 'Power Transformer',
drawtype = 'mesh',
mesh = 'tasks_transformer.obj',
tiles = {'tasks_transformer.png'},
groups = {breakable=1},
paramtype2 = 'facedir',
selection_box = col_box,
collision_box = col_box,
})