Add new simplified sign mod by Monte (modified). Remove default:signs. Rename signs by MisterE to letter_blocks.

master
FreeGamers 2020-05-18 01:01:41 -05:00
parent f529ebddcb
commit 382497b18f
540 changed files with 1058 additions and 7025 deletions

View File

@ -1,8 +1,6 @@
The best game for Minetest. A project with the goal of enhancing minetest_game survival with new depth, mechanics, biomes, mobs and many essential additions. Has a focus on being fun, user-friendly, stable, and minimalist but featured. Join our cause: https://www.freegamers.org
The best game for Minetest. A project with the goal of enhancing minetest_game survival with new depth, mechanics, biomes, mobs and many essential additions. Has a focus on being fun, user-friendly, stable, and minimalist but featured. Join our cause: https://www.freegamers.org
This project started with the goal to expand Minetest game to include additional features that would greatly enhance the gameplay to be more fun for players.
Currently, this game is quite stable and has been debugged on an online server environment with many players.

View File

@ -1,35 +1,12 @@
-- Get the path to the working directory.
local modpath = minetest.get_modpath(minetest.get_current_modname())
-- Execute other modules.
dofile(modpath.."/api.lua")
dofile(modpath.."/clothing.lua")
-- Inventory mod support
if minetest.get_modpath("inventory_plus") then
clothing.inv_mod = "inventory_plus"
clothing.formspec = clothing.formspec..
"button[6,0;2,0.5;main;Back]"
elseif minetest.get_modpath("unified_inventory") and
not unified_inventory.sfinv_compat_layer then
clothing.inv_mod = "unified_inventory"
unified_inventory.register_button("clothing", {
type = "image",
image = "inventory_plus_clothing.png",
})
unified_inventory.register_page("clothing", {
get_formspec = function(player, perplayer_formspec)
local fy = perplayer_formspec.formspec_y
local name = player:get_player_name()
local formspec = "background[0.06,"..fy..
";7.92,7.52;clothing_ui_form.png]"..
"label[0,0;Clothing]"..
"list[detached:"..name.."_clothing;clothing;0,"..fy..";2,3;]"..
"listring[current_player;main]"..
"listring[detached:"..name.."_clothing;clothing]"
return {formspec=formspec}
end,
})
elseif minetest.get_modpath("sfinv") then
-- sfinv detection and compatability.
if minetest.get_modpath("sfinv") then
clothing.inv_mod = "sfinv"
sfinv.register_page("clothing:clothing", {
title = "Clothing",
@ -45,14 +22,9 @@ elseif minetest.get_modpath("sfinv") then
})
end
-- Get player data.
minetest.register_on_player_receive_fields(function(player, formname, fields)
local name = player:get_player_name()
if clothing.inv_mod == "inventory_plus" and fields.clothing then
inventory_plus.set_inventory_formspec(player, clothing.formspec..
"list[detached:"..name.."_clothing;clothing;0,0.5;2,3;]"..
"listring[current_player;main]"..
"listring[detached:"..name.."_clothing;clothing]")
end
end)
local function is_clothing(item)

View File

@ -2556,70 +2556,6 @@ minetest.register_node("default:bookshelf", {
end,
})
local function register_sign(material, desc, def)
minetest.register_node("default:sign_wall_" .. material, {
description = desc,
drawtype = "nodebox",
tiles = {"default_sign_wall_" .. material .. ".png"},
inventory_image = "default_sign_" .. material .. ".png",
wield_image = "default_sign_" .. material .. ".png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
node_box = {
type = "wallmounted",
wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
},
groups = def.groups,
legacy_wallmounted = true,
sounds = def.sounds,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[text;;${text}]")
end,
on_receive_fields = function(pos, formname, fields, sender)
local player_name = sender:get_player_name()
if minetest.is_protected(pos, player_name) then
minetest.record_protection_violation(pos, player_name)
return
end
local text = fields.text
if not text then
return
end
if string.len(text) > 512 then
minetest.chat_send_player(player_name, S("Text too long"))
return
end
minetest.log("action", player_name .. " wrote \"" .. text ..
"\" to the sign at " .. minetest.pos_to_string(pos))
local meta = minetest.get_meta(pos)
meta:set_string("text", text)
if #text > 0 then
meta:set_string("infotext", S('"@1"', text))
else
meta:set_string("infotext", '')
end
end,
})
end
register_sign("wood", S("Wooden Sign"), {
sounds = default.node_sound_wood_defaults(),
groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3}
})
register_sign("steel", S("Steel Sign"), {
sounds = default.node_sound_metal_defaults(),
groups = {cracky = 2, attached_node = 1}
})
minetest.register_node("default:ladder_wood", {
description = S("Wooden Ladder"),
drawtype = "signlike",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

591
mods/letter_blocks/init.lua Normal file
View File

@ -0,0 +1,591 @@
minetest.register_node("letter_blocks:letter_blocks_apostrophe_sign",{
description = "Carbon Apostrophe Sign",
tiles = {"letter_blocks_apostrophe_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_apostrophe_sign",
recipe = {
{"","dye:white",""},
{"","letter_blocks:letter_blocks_blank_sign",""},
{"","",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_a_sign",{
description = "Carbon A Sign",
tiles = {"letter_blocks_a_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_a_sign",
recipe = {
{"","dye:white",""},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_blank_sign",{
description = "Carbon Blank Sign",
tiles = {"letter_blocks_blank_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
type = "cooking",
output = "letter_blocks:letter_blocks_blank_sign",
recipe = "wool:white",
cooktime = 5,
})
--block break
minetest.register_node("letter_blocks:letter_blocks_b_sign",{
description = "Carbon B Sign",
tiles = {"letter_blocks_b_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_b_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_check_sign",{
description = "Carbon Check Sign",
tiles = {"letter_blocks_check_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_check_sign",
recipe = {
{"","","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign",""},
{"","dye:white",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_comma_sign",{
description = "Carbon Comma Sign",
tiles = {"letter_blocks_comma_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_comma_sign",
recipe = {
{"","",""},
{"","letter_blocks:letter_blocks_blank_sign",""},
{"","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_c_sign",{
description = "Carbon C Sign",
tiles = {"letter_blocks_c_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_c_sign",
recipe = {
{"dye:white","","dye:white"},
{"","letter_blocks:letter_blocks_blank_sign",""},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_double_quote_sign",{
description = "Carbon Double Quote Sign",
tiles = {"letter_blocks_double_quote_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_double_quote_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"","",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_d_sign",{
description = "Carbon D Sign",
tiles = {"letter_blocks_d_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_d_sign",
recipe = {
{"dye:white","dye:white",""},
{"","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","dye:white",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_e_sign",{
description = "Carbon E Sign",
tiles = {"letter_blocks_e_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_e_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"","letter_blocks:letter_blocks_blank_sign",""},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_exclamation_sign",{
description = "Carbon Exclamation Sign",
tiles = {"letter_blocks_exclamation_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_exclamation_sign",
recipe = {
{"","","dye:white"},
{"","letter_blocks:letter_blocks_blank_sign",""},
{"","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_f_sign",{
description = "Carbon F Sign",
tiles = {"letter_blocks_f_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_f_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign",""},
{"dye:white","",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_g_sign",{
description = "Carbon G Sign",
tiles = {"letter_blocks_g_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_g_sign",
recipe = {
{"dye:white","dye:white",""},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_h_sign",{
description = "Carbon H Sign",
tiles = {"letter_blocks_h_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_h_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_i_sign",{
description = "Carbon I Sign",
tiles = {"letter_blocks_i_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_i_sign",
recipe = {
{"","","dye:white"},
{"","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_j_sign",{
description = "Carbon J Sign",
tiles = {"letter_blocks_j_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_j_sign",
recipe = {
{"","","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_k_sign",{
description = "Carbon K Sign",
tiles = {"letter_blocks_k_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_k_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign",""},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_l_sign",{
description = "Carbon L Sign",
tiles = {"letter_blocks_l_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_l_sign",
recipe = {
{"dye:white","",""},
{"dye:white","letter_blocks:letter_blocks_blank_sign",""},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_m_sign",{
description = "Carbon M Sign",
tiles = {"letter_blocks_m_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_m_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_n_sign",{
description = "Carbon N Sign",
tiles = {"letter_blocks_n_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_n_sign",
recipe = {
{"","","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_o_sign",{
description = "Carbon O Sign",
tiles = {"letter_blocks_o_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_o_sign",
recipe = {
{"","dye:white",""},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"","dye:white",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_p_sign",{
description = "Carbon P Sign",
tiles = {"letter_blocks_p_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_p_sign",
recipe = {
{"dye:white","dye:white",""},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_q_sign",{
description = "Carbon Q Sign",
tiles = {"letter_blocks_q_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_q_sign",
recipe = {
{"","dye:white","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_question_sign",{
description = "Carbon Question Sign",
tiles = {"letter_blocks_question_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_question_sign",
recipe = {
{"dye:white","dye:white",""},
{"","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"","dye:white",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_r_sign",{
description = "Carbon R Sign",
tiles = {"letter_blocks_r_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_r_sign",
recipe = {
{"dye:white","dye:white",""},
{"dye:white","letter_blocks:letter_blocks_blank_sign",""},
{"dye:white","",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_s_sign",{
description = "Carbon S Sign",
tiles = {"letter_blocks_s_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_s_sign",
recipe = {
{"","dye:white",""},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","dye:white",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_t_sign",{
description = "Carbon T Sign",
tiles = {"letter_blocks_t_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_t_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"","letter_blocks:letter_blocks_blank_sign",""},
{"","dye:white",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_u_sign",{
description = "Carbon U Sign",
tiles = {"letter_blocks_u_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_u_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"","dye:white",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_v_sign",{
description = "Carbon V Sign",
tiles = {"letter_blocks_v_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_v_sign",
recipe = {
{"dye:white","","dye:white"},
{"","letter_blocks:letter_blocks_blank_sign",""},
{"","dye:white",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_w_sign",{
description = "Carbon W Sign",
tiles = {"letter_blocks_w_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_w_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","letter_blocks:letter_blocks_blank_sign","dye:white"},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_x_sign",{
description = "Carbon X Sign",
tiles = {"letter_blocks_x_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_x_sign",
recipe = {
{"dye:white","","dye:white"},
{"letter_blocks:letter_blocks_blank_sign","dye:white",""},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_y_sign",{
description = "Carbon Y Sign",
tiles = {"letter_blocks_y_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_y_sign",
recipe = {
{"dye:white","","dye:white"},
{"letter_blocks:letter_blocks_blank_sign","dye:white",""},
{"","dye:white",""}
}
})
--block break
minetest.register_node("letter_blocks:letter_blocks_z_sign",{
description = "Carbon Z Sign",
tiles = {"letter_blocks_z_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "letter_blocks:letter_blocks_z_sign",
recipe = {
{"dye:white","dye:white",""},
{"","letter_blocks:letter_blocks_blank_sign",""},
{"","dye:white","dye:white"}
}
})
--block break

View File

@ -0,0 +1,4 @@
name = letter_blocks
author = MisterE
description = Adds simple sign nodes with letters that can be used for many build projects.
depends = wool, dye

View File

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 606 B

View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

View File

Before

Width:  |  Height:  |  Size: 646 B

After

Width:  |  Height:  |  Size: 646 B

View File

Before

Width:  |  Height:  |  Size: 159 B

After

Width:  |  Height:  |  Size: 159 B

View File

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 589 B

View File

Before

Width:  |  Height:  |  Size: 456 B

After

Width:  |  Height:  |  Size: 456 B

View File

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 289 B

View File

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 594 B

View File

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

View File

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 418 B

View File

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 398 B

View File

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 362 B

View File

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 599 B

View File

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 367 B

View File

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 242 B

View File

Before

Width:  |  Height:  |  Size: 389 B

After

Width:  |  Height:  |  Size: 389 B

View File

Before

Width:  |  Height:  |  Size: 617 B

After

Width:  |  Height:  |  Size: 617 B

View File

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 282 B

View File

Before

Width:  |  Height:  |  Size: 781 B

After

Width:  |  Height:  |  Size: 781 B

View File

Before

Width:  |  Height:  |  Size: 549 B

After

Width:  |  Height:  |  Size: 549 B

View File

Before

Width:  |  Height:  |  Size: 679 B

After

Width:  |  Height:  |  Size: 679 B

View File

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

View File

Before

Width:  |  Height:  |  Size: 727 B

After

Width:  |  Height:  |  Size: 727 B

View File

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 505 B

View File

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 627 B

View File

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 602 B

View File

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 295 B

View File

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 463 B

View File

Before

Width:  |  Height:  |  Size: 608 B

After

Width:  |  Height:  |  Size: 608 B

View File

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 806 B

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

View File

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 508 B

View File

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 524 B

View File

@ -104,7 +104,7 @@ minetest.register_craft({
output = "mobs_creatures:gravestone",
recipe = {
{ "", "default:stone", "" },
{ "default:stone", "default:sign_wall_wood", "default:stone" },
{ "default:stone", "signs:sign", "default:stone" },
{ "default:stone", "default:stone", "default:stone" },
}
})
@ -113,7 +113,7 @@ minetest.register_craft({
output = "mobs_creatures:gravestone_cross",
recipe = {
{ "", "default:stone", "" },
{ "default:stone", "default:sign_wall_wood", "default:stone" },
{ "default:stone", "signs:sign", "default:stone" },
{ "", "default:stone", "" },
}
})

View File

@ -2,4 +2,4 @@ name = mobs_creatures
description = Mob pack meant to bring higher quality mobs to Minetest
author = FreeGamers
depends = mobs
optional_depends = hbhunger
optional_depends = hbhunger, signs

View File

@ -1 +0,0 @@

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) <year> <copyright holders>
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 (including the next
paragraph) 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

@ -1,76 +0,0 @@
# rocket
Minetest has many great space mods that add in outer space thousands of blocks above the player. However, none of them have a good way to reach outer space-- until now. With this mod, you can craft rockets / space shuttles and fly them into and in outer space.
The forum topic for this mod is [here](https://forum.minetest.net/viewtopic.php?f=9&t=23120). There, you can find a list of crafting recipes.
## Controls overview
### Vertical mode
* A -- yaw left
* D -- yaw right
* W -- go forwards
* S -- go backwards
* Space -- move/accelerate upwards
* Space+Shift -- enable cruise mode
* Shift -- disable cruise mode
* A+D -- switch to horizontal mode
### Horizontal mode
* A -- yaw left
* D -- yaw right
* W -- move/accelerate forwards
* S -- brake
* Space -- go upwards
* Shift -- go downwards
* W+S -- enable cruise mode
* S -- disable cruise mode
* A+D -- switch to vertical mode
## Controls explained
The space shuttle has two modes: vertical mode and horizontal mode. In vertical mode, the rocket is upright, and in horizontal mode it is sideways. Vertical mode is used for lift off and for landing, whereas horizontal mode is used for moving and docking in outer space.
Place a Space Shuttle item down to place a space shuttle vehicle. A space shuttle will be placed in vertical mode. Right click on the space shuttle to enter/exit.
The space shuttle has a life support system (provides you with oxygen), so you will be able to breath in the rocket in space or an unbreathable atmosphere.
I strongly recommend that you always use 3rd person mode when riding a rocket. Also, if you crash into something at a high velocity, then your rocket explodes.
### Vertical mode
You can move horizontally in vertical mode. Use A to yaw (turn) left, D to yaw right, W to go forwards in the direction you have yawed, and S to go backwards in that direction. These horizontal controls are not fast and exist mainly to make small adjustments in position; the main focus of vertical mode is moving or falling vertically.
Hold space to move/accelerate upwards. At first, you will only move slightly up, but if you hold long enough then you will travel at exhilerating speeds. If you need to go down or slow down, let go of space. In vertical mode, rockets are affected by gravity, so whenever they stop going up, they go down. If you let go of space after holding it for a while, it will seem like you are still flying upwards. However, you are actually just coasting and your velocity is decelerating. The rocket will decelerate until it stops going and starts going down. You go down slow at first but you go faster and faster until you reach terminal velocity. To stop falling, hold space for a while. Although it may seem like you are still falling, you are actually slowing your descent. You will be able to slow your descent to the point that you are no longer falling and you are ascending again. If you use the space button wisely, you can rise or fall at whatever speed you choose. For example, you can use your rocket like a lunar lander if you thrust a little bit while you fall.
Press space and shift at the same time to enable vertical cruise mode, and press shift by itself to disable it. Cruise mode automatically maintains your vertical velocity, rising or falling.
Press A and D at the same time to switch to horizontal mode. You have to slow down the rocket to switch modes. After pressing A and D, right click once. If your head sticks out of the horizontal rocket, right click again twice very quickly to fix the glitch.
### Horizontal mode
Unlike vertical mode, where the focus is on vertical movement, horizontal mode is focused on movement in all directions, but mainly forwards. Also unlike vertical mode, which is affected by gravity, horizontal mode is gravity free, since it is designed to work in space.
Use A to yaw (turn) left, D to yaw right, W to move/accelerate forwards in the direction you have yawed, and S to brake. Hold W for a while to accelerate your forwards velocity, and S to slow down. S cannot be used to go backwards; instead, turn the rocket around and go forwards in the new direction.
Press W and S at the same time to enable horizontal cruise mode, and press S by itself to disable it. Horizontal cruise mode works just like the cruise mode in the airboat mod.
Press space to go up and shift to go down. You cannot travel vertically nearly as fast as vertical mode, but horizontal mode is still useful for vertical movement.
Press A and D at the same time to switch to vertical mode. You have to slow down the rocket to switch modes. After pressing A and D, right click once. To avoid any potential glitches, right click again twice very quickly. Be prepared to be affected by gravity again after you right click the first time.
## Inspirations
* Kerbal Space Program (video game)
* Galacticraft (Minecraft mod)
## Dependencies
* default
* bucket
* stairs
* tnt
* fire
## Optional Dependencies
* vacuum
## Licensing and Credit
The code is licensed as MIT and the media as CC-BY-SA-3.0, except for "rocket.png", which is licensed as CC-BY-SA-4.0.
This mod and all the models were made by Red_King_Cyclops, but several textures and much of code was made by other users. Almost all of the code is modified code from Paramat's [airboat](https://forum.minetest.net/viewtopic.php?t=20485) mod. The texture "rocket.png" is actually "submarine.png" renamed, taken from the [submarine](https://forum.minetest.net/viewtopic.php?f=9&t=16282) modpack by krokoschlange. Additionally, the textures "rocket_boom.png" and "rocket_smoke.png" are renamed textures taken from tnt and "rocket_hull.png" is a renamed texture taken from default. The oil textures and oil liquid registration code are taken from lib_materials by ShadMOrdre, except for the oil bucket texture, which is a modified water bucket texture from bucket. The rocket fuel textures (including the rocket fuel bucket texture) are modified water textures from default and bucket. The rest of the textures were made by me. The thrust sound is actually a renamed "fire_fire.3.ogg" taken from fire.

View File

@ -1,781 +0,0 @@
--Helper Functions
local function get_sign(i)
if i == 0 then
return 0
else
return i / math.abs(i)
end
end
local function get_velocity(v, yaw, y)
local x = -math.sin(yaw) * v
local z = math.cos(yaw) * v
return {x = x, y = y, z = z}
end
local function get_v(v)
return math.sqrt(v.x ^ 2 + v.z ^ 2)
end
--Entities
--Vertical rocket: lift off, landing
local rocket = {
initial_properties = {
hp_max = 50,
physical = true,
collide_with_objects = false, -- Workaround fix for a MT engine bug
collisionbox = {-0.85, 0.0, -0.85, 0.85, 5.0, 0.85}, --{-0.85, -1.5, -0.85, 0.85, 1.5, 0.85},
visual = "mesh",
mesh = "rocket.obj",
visual_size = {x = 1.0, y = 1.0, z = 1.0},
textures = {"rocket.png"},
},
-- Custom fields
driver = nil,
removed = false,
v = 0,
vy = 0,
rot = 0,
auto = false,
soundThrust = nil,
}
function rocket.on_punch(self, puncher)
if not puncher or not puncher:is_player() or self.removed then
return
end
local name = puncher:get_player_name()
if self.driver and name == self.driver then
-- Detach
self.driver = nil
puncher:set_detach()
default.player_attached[name] = false
minetest.sound_stop(self.soundThrust)
end
if not self.driver then
-- Move to inventory
self.removed = true
local inv = puncher:get_inventory()
if not (creative and creative.is_enabled_for
and creative.is_enabled_for(name))
or not inv:contains_item("main", "rocket:rocket_item") then
local leftover = inv:add_item("main", "rocket:rocket_item")
if not leftover:is_empty() then
minetest.add_item(self.object:getpos(), leftover)
end
end
minetest.after(0.1, function()
self.object:remove()
end)
end
end
function rocket.on_rightclick(self, clicker)
if not clicker or not clicker:is_player() then
return
end
local name = clicker:get_player_name()
if self.driver and name == self.driver then
-- Detach
self.driver = nil
self.auto = false
clicker:set_detach()
default.player_attached[name] = false
default.player_set_animation(clicker, "stand" , 30)
local pos = clicker:getpos()
minetest.after(0.1, function()
clicker:setpos(pos)
end)
minetest.sound_stop(self.soundThrust)
elseif not self.driver then
-- Attach
local attach = clicker:get_attach()
if attach and attach:get_luaentity() then
local luaentity = attach:get_luaentity()
if luaentity.driver then
luaentity.driver = nil
end
clicker:set_detach()
end
self.driver = name
clicker:set_attach(self.object, "",
{x = 0, y = 2, z = 0}, {x = 0, y = 4, z = 0})
default.player_attached[name] = true
minetest.after(0.2, function()
-- default.player_set_animation(clicker, "sit" , 30)
default.player_set_animation(clicker, "stand" , 30)
end)
clicker:set_look_horizontal(self.object:getyaw())
self.soundThrust=minetest.sound_play({name="thrust"},{object = self.object, gain = 2.0, max_hear_distance = 4, loop = true,}) --old: max_hear_distance = 32
--minetest.sound_play({name="fire_fire.3.ogg"},{object = self.object, gain = 2.0, max_hear_distance = 32, loop = true,})
--[[
Fuel Display Hud (abandoned)
local fuel_display = clicker:hud_add({ --HUD
hud_elem_type = "text",
position = {x = 0.5, y = 0.5},
offset = {x = 0, y = 0},
text = "Hello world!",
alignment = {x = 0, y = 0},
scale = {x = 100, y = 100},
})
clicker:hud_remove(fuel_display) --HUD
]]
end
end
on_activate = function(self, staticdata, dtime_s)
self.object:set_armor_groups({immortal = 1})
end
function rocket.on_step(self, dtime)
self.v = get_v(self.object:getvelocity()) * get_sign(self.v)
self.vy = self.object:getvelocity().y
-- Controls
if self.driver then
local driver_objref = minetest.get_player_by_name(self.driver)
if driver_objref then
if driver_objref:get_breath() < 11 then
--Oxygen system, for when in space or an unbreathable atmosphere
driver_objref:set_breath(11)
end
local ctrl = driver_objref:get_player_control()
if ctrl.jump and ctrl.sneak then --if ctrl.up and ctrl.down then
if not self.auto then
self.auto = true
minetest.chat_send_player(self.driver,
"[rocket] Cruise on")
end
elseif ctrl.sneak then --ctrl.down then
--self.v = self.v - 0.1
if self.auto then
self.auto = false
minetest.chat_send_player(self.driver,
"[rocket] Cruise off")
end
--[[
elseif ctrl.up or self.auto then
self.v = self.v + 0.1
--self.v = self.v + 10]]
end
if ctrl.up then
self.v = self.v + 0.1
--self.v = self.v + 10
elseif ctrl.down then
self.v = self.v - 0.1
end
if ctrl.left and ctrl.right and self.vy < 10 then
local sideways_rocket = minetest.add_entity(self.object:getpos(), "rocket:sideways_rocket")
sideways_rocket:setyaw(self.object:getyaw())
default.player_set_animation(driver_objref, "sit" , 30)
driver_objref:set_detach()
driver_objref:set_attach(sideways_rocket, "", {x = 0, y = 1, z = 0}, {x = 0, y = 2, z = 0})
minetest.sound_stop(self.soundThrust)
self.object:remove()
--right click after pressing A+D to go into the sideways rocket
elseif ctrl.left then
self.rot = self.rot + 0.001
elseif ctrl.right then
self.rot = self.rot - 0.001
end
if ctrl.jump and (not self.auto) then
if self.vy < 50 then
self.vy = self.vy + 0.075
--self.vy = self.vy + 7.5
end
minetest.add_particlespawner({
amount = 3, --1,
time = 0.2, --0.1,
minpos = {x = 0, y = 0, z = 0},
maxpos = {x = 0, y = 0, z = 0},
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.3, y = 0.3, z = 0.3},
minacc = {x = 0, y = 0.1, z = 0},
maxacc = {x = 0, y = 0.3, z = 0},
minexptime = 1,
maxexptime = 2.5,
minsize = 4, --1,
maxsize = 10, --4,
attached = self.object,
texture = "rocket_smoke.png",
})
minetest.add_particlespawner({
amount = 1, --1,
time = 1.0, --0.1,
minpos = {x = 0, y = 0, z = 0},
maxpos = {x = 0, y = 0, z = 0},
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.3, y = 0.3, z = 0.3},
minacc = {x = 0, y = 0.1, z = 0},
maxacc = {x = 0, y = 0.3, z = 0},
minexptime = 0.25, --1
maxexptime = 0.75, --2.5,
minsize = 14, --1,
maxsize = 16, --4,
attached = self.object,
texture = "rocket_boom.png",
})
elseif (not (ctrl.jump or self.auto)) and self.vy > -50 then --elseif ctrl.sneak then
self.vy = self.vy - 0.075
--self.vy = self.vy - 7.5
end
if self.auto and self.vy > 0 and (not ctrl.jump) then
minetest.add_particlespawner({
amount = 3, --1,
time = 0.2, --0.1,
minpos = {x = 0, y = 0, z = 0},
maxpos = {x = 0, y = 0, z = 0},
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.3, y = 0.3, z = 0.3},
minacc = {x = 0, y = 0.1, z = 0},
maxacc = {x = 0, y = 0.3, z = 0},
minexptime = 1,
maxexptime = 2.5,
minsize = 4, --1,
maxsize = 10, --4,
attached = self.object,
texture = "rocket_smoke.png",
})
minetest.add_particlespawner({
amount = 1, --1,
time = 1.0, --0.1,
minpos = {x = 0, y = 0, z = 0},
maxpos = {x = 0, y = 0, z = 0},
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.3, y = 0.3, z = 0.3},
minacc = {x = 0, y = 0.1, z = 0},
maxacc = {x = 0, y = 0.3, z = 0},
minexptime = 0.25, --1
maxexptime = 0.75, --2.5,
minsize = 14, --1,
maxsize = 16, --4,
attached = self.object,
texture = "rocket_boom.png",
})
end
else
-- Player left server while driving
-- In MT 5.0.0 use 'rocket:on_detach_child()' to do this
self.driver = nil
self.auto = false
minetest.log("warning", "[rocket] Driver left server while" ..
" driving. This may cause some 'Pushing ObjectRef to" ..
" removed/deactivated object' warnings.")
end
end
if self.vy > 0 and (not self.driver) then
minetest.add_particlespawner({
amount = 3, --1,
time = 0.2, --0.1,
minpos = {x = 0, y = 0, z = 0},
maxpos = {x = 0, y = 0, z = 0},
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.3, y = 0.3, z = 0.3},
minacc = {x = 0, y = 0.1, z = 0},
maxacc = {x = 0, y = 0.3, z = 0},
minexptime = 1,
maxexptime = 2.5,
minsize = 4, --1,
maxsize = 10, --4,
attached = self.object,
texture = "rocket_smoke.png",
})
minetest.add_particlespawner({
amount = 1, --1,
time = 1.0, --0.1,
minpos = {x = 0, y = 0, z = 0},
maxpos = {x = 0, y = 0, z = 0},
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.3, y = 0.3, z = 0.3},
minacc = {x = 0, y = 0.1, z = 0},
maxacc = {x = 0, y = 0.3, z = 0},
minexptime = 0.25, --1
maxexptime = 0.75, --2.5,
minsize = 14, --1,
maxsize = 16, --4,
attached = self.object,
texture = "rocket_boom.png",
})
end
-- Early return for stationary vehicle
if self.v == 0 and self.rot == 0 and self.vy == 0 then
self.object:setpos(self.object:getpos())
return
end
-- Reduction and limiting of linear speed
local s = get_sign(self.v)
self.v = self.v - 0.02 * s
if s ~= get_sign(self.v) then
self.v = 0
end
if math.abs(self.v) > 6 then
self.v = 6 * get_sign(self.v)
end
-- Reduction and limiting of rotation
local sr = get_sign(self.rot)
self.rot = self.rot - 0.0003 * sr
if sr ~= get_sign(self.rot) then
self.rot = 0
end
if math.abs(self.rot) > 0.015 then
self.rot = 0.015 * get_sign(self.rot)
end
-- Reduction and limiting of vertical speed
--[[
local sy = get_sign(self.vy)
self.vy = self.vy - 0.03 * sy
if sy ~= get_sign(self.vy) then
self.vy = 0
end
if math.abs(self.vy) > 4 then
self.vy = 4 * get_sign(self.vy)
end
]]
local new_acce = {x = 0, y = 0, z = 0}
-- Bouyancy in liquids
--[[
local p = self.object:getpos()
p.y = p.y - 1.5
local def = minetest.registered_nodes[minetest.get_node(p).name]
if def and (def.liquidtype == "source" or def.liquidtype == "flowing") then
new_acce = {x = 0, y = 10, z = 0}
end
]]
--Crash landing
local p = self.object:getpos()
local vacuum = "air"
if(minetest.get_modpath("vacuum")) ~= nil then
vacuum = "vacuum:vacuum"
end
local p1 = self.object:getpos()
p1.y = p1.y - 1
if minetest.get_node(p1).name ~= "air" and minetest.get_node(p1).name ~= vacuum and self.vy < -10 then
tnt.boom(p, {
radius = 3,
damage_radius = 6,
sound = "tnt_explode",
explode_center = false,
})
minetest.sound_stop(self.soundThrust)
self.object:remove()
end
local p2 = self.object:getpos()
p2.y = p2.y + 6
local p3 = self.object:getpos()
p3.y = p3.y + 4
if minetest.get_node(p2).name ~= "air" and minetest.get_node(p2).name ~= vacuum and self.vy > 10 then
tnt.boom(p3, {
radius = 3,
damage_radius = 6,
sound = "tnt_explode",
explode_center = false,
})
minetest.sound_stop(self.soundThrust)
self.object:remove()
end
self.object:setpos(self.object:getpos())
self.object:setvelocity(get_velocity(self.v, self.object:getyaw(), self.vy))
self.object:setacceleration(new_acce)
self.object:setyaw(self.object:getyaw() + (1 + dtime) * self.rot)
end
minetest.register_entity("rocket:rocket", rocket)
--Horizontal rocket: moving in space, docking
local sideways_rocket = {
initial_properties = {
hp_max = 50,
physical = true,
collide_with_objects = false, -- Workaround fix for a MT engine bug
collisionbox = {-1, 0, -1, 1, 1.85, 1}, --old collison box (was ok sometimes, but did not turn): {-0.9, 0.0, -2.5, 0.9, 1.85, 2.5},
visual = "mesh",
mesh = "sideways_rocket.obj",
visual_size = {x = 1.0, y = 1.0, z = 1.0},
textures = {"rocket.png"},
},
-- Custom fields
driver = nil,
removed = false,
v = 0,
vy = 0,
rot = 0,
auto = false,
soundThrust = nil,
}
function sideways_rocket.on_punch(self, puncher)
if not puncher or not puncher:is_player() or self.removed then
return
end
local name = puncher:get_player_name()
if self.driver and name == self.driver then
-- Detach
self.driver = nil
puncher:set_detach()
default.player_attached[name] = false
minetest.sound_stop(self.soundThrust)
end
if not self.driver then
-- Move to inventory
self.removed = true
local inv = puncher:get_inventory()
if not (creative and creative.is_enabled_for
and creative.is_enabled_for(name))
or not inv:contains_item("main", "rocket:rocket_item") then
local leftover = inv:add_item("main", "rocket:rocket_item")
if not leftover:is_empty() then
minetest.add_item(self.object:getpos(), leftover)
end
end
minetest.after(0.1, function()
self.object:remove()
end)
end
end
function sideways_rocket.on_rightclick(self, clicker)
if not clicker or not clicker:is_player() then
return
end
local name = clicker:get_player_name()
if self.driver and name == self.driver then
-- Detach
self.driver = nil
self.auto = false
clicker:set_detach()
default.player_attached[name] = false
default.player_set_animation(clicker, "stand" , 30)
local pos = clicker:getpos()
minetest.after(0.1, function()
clicker:setpos(pos)
end)
minetest.sound_stop(self.soundThrust)
elseif not self.driver then
-- Attach
local attach = clicker:get_attach()
if attach and attach:get_luaentity() then
local luaentity = attach:get_luaentity()
if luaentity.driver then
luaentity.driver = nil
end
clicker:set_detach()
end
self.driver = name
clicker:set_attach(self.object, "",
{x = 0, y = 1, z = 0}, {x = 0, y = 2, z = 0})
default.player_attached[name] = true
minetest.after(0.2, function()
default.player_set_animation(clicker, "sit" , 30)
end)
clicker:set_look_horizontal(self.object:getyaw())
self.soundThrust=minetest.sound_play({name="thrust"},{object = self.object, gain = 2.0, max_hear_distance = 4, loop = true,})--old: max_hear_distance = 32
end
end
on_activate = function(self, staticdata, dtime_s)
self.object:set_armor_groups({immortal = 1})
end
function sideways_rocket.on_step(self, dtime)
self.v = get_v(self.object:getvelocity()) * get_sign(self.v)
self.vy = self.object:getvelocity().y
-- Controls
if self.driver then
local driver_objref = minetest.get_player_by_name(self.driver)
if driver_objref then
if driver_objref:get_breath() < 11 then
--Oxygen system, for when in space or an unbreathable atmosphere
driver_objref:set_breath(11)
end
local ctrl = driver_objref:get_player_control()
if ctrl.up and ctrl.down then
if not self.auto then
self.auto = true
minetest.chat_send_player(self.driver,
"[rocket] Cruise on")
end
elseif ctrl.down then --braking
--self.v = self.v - 0.1
if self.v > 0 and self.v < 0.01 then
self.v = 0
elseif self.v > 0 then
self.v = self.v - 0.1
end
if self.auto then
self.auto = false
minetest.chat_send_player(self.driver,
"[rocket] Cruise off")
end
elseif ctrl.up or self.auto then
--self.v = self.v + 0.1
if self.v < 30.0 then
self.v = self.v + 0.1
end
minetest.add_particlespawner({
amount = 1, --1,
time = 1.0, --0.1,
minpos = {x = 0, y = 0.5, z = 0},
maxpos = {x = 0, y = 0.5, z = 0},
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.3, y = 0.3, z = 0.3},
minacc = {x = 0, y = 0.1, z = 0},
maxacc = {x = 0, y = 0.3, z = 0},
minexptime = 0.25, --1
maxexptime = 1.0, --2.5,
minsize = 14, --1,
maxsize = 16, --4,
attached = self.object,
texture = "rocket_boom.png",
})
end
if ctrl.left and ctrl.right and self.v < 10 then
local rocket = minetest.add_entity(self.object:getpos(), "rocket:rocket")
rocket:setyaw(self.object:getyaw())
default.player_set_animation(driver_objref, "stand" , 30)
driver_objref:set_detach()
driver_objref:set_attach(rocket, "", {x = 0, y = 1, z = 0}, {x = 0, y = 2, z = 0})
minetest.sound_stop(self.soundThrust)
self.object:remove()
--right click after pressing A+D to go into the rocket
elseif ctrl.left then
self.rot = self.rot + 0.001
elseif ctrl.right then
self.rot = self.rot - 0.001
end
if ctrl.jump then
self.vy = self.vy + 0.075
elseif ctrl.sneak then
self.vy = self.vy - 0.075
end
else
-- Player left server while driving
-- In MT 5.0.0 use 'sideways_rocket:on_detach_child()' to do this
self.driver = nil
self.auto = false
minetest.log("warning", "[rocket] Driver left server while" ..
" driving. This may cause some 'Pushing ObjectRef to" ..
" removed/deactivated object' warnings.")
end
end
if self.v > 0 and (not self.driver) then
minetest.add_particlespawner({
amount = 1, --1,
time = 1.0, --0.1,
minpos = {x = 0, y = 0.5, z = 0},
maxpos = {x = 0, y = 0.5, z = 0},
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.3, y = 0.3, z = 0.3},
minacc = {x = 0, y = 0.1, z = 0},
maxacc = {x = 0, y = 0.3, z = 0},
minexptime = 0.25, --1
maxexptime = 1.0, --2.5,
minsize = 14, --1,
maxsize = 16, --4,
attached = self.object,
texture = "rocket_boom.png",
})
end
-- Early return for stationary vehicle
if self.v == 0 and self.rot == 0 and self.vy == 0 then
self.object:setpos(self.object:getpos())
return
end
-- Reduction and limiting of linear speed
--[[
local s = get_sign(self.v)
self.v = self.v - 0.02 * s
if s ~= get_sign(self.v) then
self.v = 0
end
if math.abs(self.v) > 6 then
self.v = 6 * get_sign(self.v)
end
]]
-- Reduction and limiting of rotation
local sr = get_sign(self.rot)
self.rot = self.rot - 0.0003 * sr
if sr ~= get_sign(self.rot) then
self.rot = 0
end
if math.abs(self.rot) > 0.015 then
self.rot = 0.015 * get_sign(self.rot)
end
-- Reduction and limiting of vertical speed
local sy = get_sign(self.vy)
self.vy = self.vy - 0.03 * sy
if sy ~= get_sign(self.vy) then
self.vy = 0
end
if math.abs(self.vy) > 4 then
self.vy = 4 * get_sign(self.vy)
end
local new_acce = {x = 0, y = 0, z = 0}
-- Bouyancy in liquids
--[[
local p = self.object:getpos()
p.y = p.y - 1.5
local def = minetest.registered_nodes[minetest.get_node(p).name]
if def and (def.liquidtype == "source" or def.liquidtype == "flowing") then
new_acce = {x = 0, y = 10, z = 0}
end
]]
--Crashing
local p = self.object:getpos()
local vacuum = "air"
if(minetest.get_modpath("vacuum")) ~= nil then
vacuum = "vacuum:vacuum"
end
local p1 = self.object:getpos()
p1.x = p1.x + 2
local p2 = self.object:getpos()
p2.x = p2.x - 2
local p3 = self.object:getpos()
p3.z = p3.z + 2
local p4 = self.object:getpos()
p4.x = p4.x - 2
if minetest.get_node(p1).name ~= "air" and minetest.get_node(p1).name ~= vacuum and self.v > 10 then
minetest.sound_stop(self.soundThrust)
self.object:remove()
if driver_objref then
default.player_set_animation(driver_objref, "stand" , 30)
driver_objref:set_detach()
end
tnt.boom(p, {
radius = 3,
damage_radius = 6,
sound = "tnt_explode",
explode_center = false,
})
elseif minetest.get_node(p2).name ~= "air" and minetest.get_node(p2).name ~= vacuum and self.v > 10 then
minetest.sound_stop(self.soundThrust)
self.object:remove()
if driver_objref then
default.player_set_animation(driver_objref, "stand" , 30)
driver_objref:set_detach()
end
tnt.boom(p, {
radius = 3,
damage_radius = 6,
sound = "tnt_explode",
explode_center = false,
})
elseif minetest.get_node(p3).name ~= "air" and minetest.get_node(p3).name ~= vacuum and self.v > 10 then
minetest.sound_stop(self.soundThrust)
self.object:remove()
if driver_objref then
default.player_set_animation(driver_objref, "stand" , 30)
driver_objref:set_detach()
end
tnt.boom(p, {
radius = 3,
damage_radius = 6,
sound = "tnt_explode",
explode_center = false,
})
elseif minetest.get_node(p4).name ~= "air" and minetest.get_node(p4).name ~= vacuum and self.v > 10 then
minetest.sound_stop(self.soundThrust)
self.object:remove()
if driver_objref then
default.player_set_animation(driver_objref, "stand" , 30)
driver_objref:set_detach()
end
tnt.boom(p, {
radius = 3,
damage_radius = 6,
sound = "tnt_explode",
explode_center = false,
})
end
self.object:setpos(self.object:getpos())
self.object:setvelocity(get_velocity(self.v, self.object:getyaw(), self.vy))
self.object:setacceleration(new_acce)
self.object:setyaw(self.object:getyaw() + (1 + dtime) * self.rot)
end
minetest.register_entity("rocket:sideways_rocket", sideways_rocket)
--Main Craftitem
minetest.register_craftitem("rocket:rocket_item", {
description = "Space Shuttle",
inventory_image = "rocket_rocket_inv.png",
wield_scale = {x = 1, y = 1, z = 1},
liquids_pointable = true,
on_place = function(itemstack, placer, pointed_thing)
local under = pointed_thing.under
local node = minetest.get_node(under)
local udef = minetest.registered_nodes[node.name]
-- Run any on_rightclick function of pointed node instead
if udef and udef.on_rightclick and
not (placer and placer:is_player() and
placer:get_player_control().sneak) then
return udef.on_rightclick(under, node, placer, itemstack,
pointed_thing) or itemstack
end
if pointed_thing.type ~= "node" then
return itemstack
end
pointed_thing.under.y = pointed_thing.under.y + 0.5 -- + 2
local rocket = minetest.add_entity(pointed_thing.under,
"rocket:rocket")
if rocket then
if placer then
rocket:setyaw(placer:get_look_horizontal())
end
local player_name = placer and placer:get_player_name() or ""
if not (creative and creative.is_enabled_for and
creative.is_enabled_for(player_name)) then
itemstack:take_item()
end
end
return itemstack
end,
})
minetest.register_craft({
type = "shaped",
output = "rocket:rocket_item",
recipe = {
{"", "default:diamondblock", ""},
{"default:steelblock", "ts_furniture:default_wood_chair", "default:steelblock"},
{"default:steelblock", "oil:oil_bucket", "default:steelblock"}
}
})

View File

@ -1,4 +0,0 @@
name = rocket
description = Adds in rockets that you can use to fly into and in outer space.
depends = default, bucket, stairs, tnt, fire
optional_depends = vacuum

View File

@ -1,546 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: 'rocket.blend'
# www.blender.org
mtllib rocket2.mtl
o Cube
v 7.927726 31.891556 -7.927726
v 7.927726 31.891556 7.927726
v -7.927727 31.891556 7.927725
v -7.927723 31.891556 -7.927729
v -0.000001 47.747009 0.000001
v 7.927726 0.108799 -7.927726
v 7.927726 0.108799 7.927726
v -7.927723 0.108799 -7.927729
v -7.927727 0.108799 7.927725
v 7.927726 31.891556 4.320811
v -7.927726 31.891556 4.320809
v 7.927726 0.108799 4.320811
v -7.927726 0.108799 4.320809
v -7.927724 31.891556 -3.852813
v 2.637442 42.472122 2.637444
v -2.637444 42.472122 2.637443
v -7.927724 0.108799 -3.852813
v 7.927726 31.891556 -3.852810
v 7.927726 0.108799 -3.852810
v 2.558875 31.891556 -7.927727
v 2.558874 31.891556 7.927726
v 2.558875 0.108799 -7.927727
v 2.558874 0.108799 7.927726
v 2.558874 0.108799 4.320811
v 2.558875 0.108799 -3.852811
v 0.851301 42.472122 2.637444
v 7.927726 31.891556 6.124269
v -2.684424 31.891556 -7.927728
v 3.963863 39.819283 -3.963862
v -2.684427 31.891556 7.927725
v -7.927724 31.891556 -5.890271
v 1.318720 45.109566 1.318723
v -1.318722 45.109566 1.318722
v -3.963862 39.819283 -3.963864
v 7.927726 0.108799 6.124269
v -2.684424 0.108799 -7.927728
v -2.684427 0.108799 7.927725
v -7.927724 0.108799 -5.890271
v -7.927726 31.891556 6.124267
v -7.927726 0.108799 6.124267
v -2.684426 0.108799 4.320810
v 7.927726 31.891556 -5.890268
v 7.927726 0.108799 -5.890268
v -2.684425 0.108799 -3.852812
v -5.282584 37.181839 -0.607685
v -0.893071 42.472122 2.637443
v 5.282584 37.181839 -0.607683
v 5.243300 31.891556 -7.927726
v 5.243300 31.891556 7.927726
v 5.243300 0.108799 -7.927726
v 5.243300 0.108799 7.927726
v 5.243300 0.108799 4.320811
v 5.243300 0.108799 -3.852811
v 1.744371 42.472122 2.637444
v 2.558875 0.108799 -5.890269
v 2.558874 0.108799 6.124268
v 5.243300 0.108799 6.124269
v 5.243300 0.108799 -5.890269
v 4.623223 38.500561 -2.285773
v -2.684425 0.108799 -5.890270
v -2.684426 0.108799 6.124268
v 0.639719 35.855419 -5.945795
v -4.623223 38.500561 -2.285774
v 0.212824 43.790844 1.978083
v 7.927726 31.891556 -2.064831
v 7.927726 0.108799 -2.064831
v -7.927725 31.891556 -2.064833
v 3.794692 40.157623 3.794693
v -3.794693 40.157623 3.794692
v -7.927725 0.108799 -2.064833
v 1.224832 40.157623 3.794693
v 2.558875 0.108799 -2.064831
v 5.243300 0.108799 -2.064831
v 2.509762 40.157623 3.794693
v -1.284930 40.157623 3.794693
v -5.861208 36.024590 0.864929
v -2.684425 0.108799 -2.064832
v 5.861208 36.024590 0.864931
v 7.927726 31.891556 2.149693
v 7.927726 0.108799 2.149693
v 2.105300 34.702019 6.522494
v 4.313897 34.702019 6.522494
v -2.208598 34.702019 6.522494
v -7.225110 33.296787 4.336092
v 7.225110 33.296787 4.336094
v -7.927726 31.891556 2.149691
v 6.522494 34.702019 6.522495
v -6.522495 34.702019 6.522494
v -7.927726 0.108799 2.149691
v 2.558874 0.108799 2.149693
v 5.243300 0.108799 2.149693
v -2.684426 0.108799 2.149692
v 7.927726 16.160089 7.927726
v 7.927726 16.160089 -7.927726
v -7.927727 16.160089 7.927725
v -7.927723 16.160089 -7.927729
v -7.927726 16.160089 4.320809
v 7.927726 16.160089 4.320811
v 7.927726 16.160089 -3.852810
v -7.927724 16.160089 -3.852813
v 2.558875 16.160089 -7.927727
v 2.558874 16.160089 7.927726
v 5.243300 16.160089 7.927726
v -2.684424 16.160089 -7.927728
v 7.927726 16.160089 -5.890268
v -7.927726 16.160089 6.124267
v -7.927724 16.160089 -5.890271
v 5.243300 16.160089 -7.927726
v -2.684427 16.160089 7.927725
v 7.927726 16.160089 6.124269
v -7.927725 16.160089 -2.064833
v 7.927726 16.160089 -2.064831
v -7.927726 16.160089 2.149691
v 7.927726 16.160089 2.149693
v 2.558876 0.108799 -15.625279
v -2.684423 0.108799 -15.625280
v -2.684427 0.108799 15.625278
v 2.558873 0.108799 15.625278
v -15.625278 0.108799 -2.064835
v -15.625278 0.108799 2.149689
v 15.625278 0.108799 2.149693
v 15.625278 0.108799 -2.064831
vt 0.642924 0.411677
vt 0.619499 0.411677
vt 0.619499 0.203197
vt 0.642924 0.203197
vt 0.047121 0.227757
vt 0.018723 0.248163
vt 0.000471 0.207351
vt 0.023895 0.207351
vt 0.705370 0.754026
vt 0.685478 0.773176
vt 0.668350 0.734877
vt 0.691006 0.734877
vt 0.235065 0.531757
vt 0.207351 0.540341
vt 0.207351 0.414230
vt 0.231508 0.425034
vt 0.173155 0.095131
vt 0.230716 0.035338
vt 0.230716 0.070204
vt 0.230716 0.138306
vt 0.668842 0.169495
vt 0.645418 0.169495
vt 0.645418 0.101393
vt 0.668842 0.101393
vt 0.957289 0.830524
vt 0.889187 0.830524
vt 0.889187 0.622043
vt 0.957289 0.622043
vt 0.905817 0.621101
vt 0.870950 0.621101
vt 0.870950 0.412620
vt 0.905816 0.412620
vt 0.820321 0.621101
vt 0.793858 0.621101
vt 0.793858 0.412620
vt 0.820321 0.412620
vt 0.769492 0.621101
vt 0.746067 0.621101
vt 0.746067 0.412620
vt 0.769491 0.412620
vt 0.720465 0.169495
vt 0.692266 0.169495
vt 0.692266 0.101393
vt 0.720465 0.101393
vt 0.694547 0.411677
vt 0.666348 0.411677
vt 0.666348 0.203197
vt 0.694547 0.203197
vt 0.150137 0.647019
vt 0.123673 0.647019
vt 0.123673 0.438538
vt 0.150137 0.438538
vt 0.824891 0.169495
vt 0.798428 0.169495
vt 0.798428 0.101393
vt 0.824891 0.101393
vt 0.870008 0.621101
vt 0.846785 0.621101
vt 0.846785 0.412620
vt 0.870008 0.412620
vt 0.287101 0.515642
vt 0.262780 0.523174
vt 0.255666 0.435838
vt 0.276866 0.445318
vt 0.685917 0.701267
vt 0.653319 0.701267
vt 0.133128 0.303323
vt 0.086312 0.399296
vt 0.069184 0.360996
vt 0.111333 0.284173
vt 0.735204 0.701267
vt 0.725263 0.734877
vt 0.713663 0.734877
vt 0.718515 0.701267
vt 0.618012 0.103440
vt 0.591548 0.103440
vt 0.591548 0.068573
vt 0.618012 0.068573
vt 0.513585 0.103440
vt 0.485386 0.103440
vt 0.485386 0.068573
vt 0.513585 0.068573
vt 0.547393 0.828027
vt 0.512527 0.828015
vt 0.512599 0.619534
vt 0.547465 0.619546
vt 0.461962 0.103440
vt 0.438538 0.103440
vt 0.438538 0.068573
vt 0.461962 0.068573
vt 0.485386 0.138306
vt 0.461962 0.138306
vt 0.438538 0.138306
vt 0.582260 0.828039
vt 0.582332 0.619558
vt 0.221643 0.976795
vt 0.153541 0.976795
vt 0.153541 0.768315
vt 0.221643 0.768315
vt 0.513585 0.138306
vt 0.644475 0.103440
vt 0.644475 0.068573
vt 0.644475 0.138306
vt 0.618012 0.138306
vt 0.591548 0.138306
vt 0.751893 0.701267
vt 0.736862 0.734877
vt 0.179945 0.207351
vt 0.153482 0.207351
vt 0.206408 0.207351
vt 0.154924 0.322473
vt 0.103440 0.437595
vt 0.297336 0.585965
vt 0.269894 0.610511
vt 0.851355 0.169495
vt 0.851355 0.101393
vt 0.618012 0.000471
vt 0.644475 0.000471
vt 0.591548 0.000471
vt 0.176600 0.647019
vt 0.176600 0.438538
vt 0.485386 0.000471
vt 0.513585 0.000471
vt 0.792916 0.621101
vt 0.792915 0.412620
vt 0.940683 0.621101
vt 0.940683 0.412620
vt 0.461962 0.000471
vt 0.438538 0.000471
vt 0.115594 0.154924
vt 0.230716 0.206408
vt 0.000471 0.103440
vt 0.115594 0.051956
vt 0.230716 0.000471
vt 0.238622 0.638481
vt 0.207351 0.666451
vt 0.394236 0.414230
vt 0.394236 0.456185
vt 0.373305 0.444568
vt 0.383647 0.418966
vt 0.394236 0.498141
vt 0.362964 0.470170
vt 0.075519 0.207351
vt 0.047319 0.207351
vt 0.092206 0.267369
vt 0.130259 0.207351
vt 0.568325 0.068573
vt 0.568325 0.000471
vt 0.362022 0.528109
vt 0.344429 0.497887
vt 0.729950 0.622043
vt 0.673920 0.622043
vt 0.787323 0.622043
vt 0.758637 0.622043
vt 0.568325 0.138306
vt 0.568325 0.103440
vt 0.617889 0.622043
vt 0.326836 0.467666
vt 0.100450 0.647019
vt 0.100450 0.438538
vt 0.775205 0.169495
vt 0.775205 0.101393
vt 0.054153 0.327386
vt 0.717868 0.621101
vt 0.717868 0.412620
vt 0.816281 0.861591
vt 0.823234 0.831466
vt 0.858204 0.831466
vt 0.835303 0.847922
vt 0.506640 0.139249
vt 0.512820 0.180061
vt 0.456790 0.180061
vt 0.438538 0.139249
vt 0.609609 0.139249
vt 0.597537 0.180061
vt 0.568851 0.180061
vt 0.574742 0.139249
vt 0.644475 0.139249
vt 0.626223 0.180061
vt 0.797259 0.875260
vt 0.788265 0.831466
vt 0.361446 0.204798
vt 0.306706 0.204798
vt 0.306706 0.000471
vt 0.361446 0.000471
vt 0.207351 0.366440
vt 0.207351 0.338240
vt 0.411678 0.338240
vt 0.411678 0.366440
vt 0.384669 0.204798
vt 0.384669 0.000471
vt 0.207351 0.283500
vt 0.411678 0.283500
vt 0.278506 0.204798
vt 0.255082 0.204798
vt 0.255083 0.000471
vt 0.278507 0.000471
vt 0.548824 0.411677
vt 0.480722 0.411677
vt 0.480722 0.207351
vt 0.548824 0.207351
vt 0.412620 0.482353
vt 0.412620 0.447486
vt 0.616947 0.447486
vt 0.616947 0.482353
vt 0.207351 0.260277
vt 0.207351 0.233814
vt 0.411678 0.233814
vt 0.411678 0.260277
vt 0.207351 0.413288
vt 0.207351 0.389864
vt 0.411678 0.389864
vt 0.411678 0.413288
vt 0.437596 0.204798
vt 0.411132 0.204798
vt 0.411132 0.000471
vt 0.437596 0.000471
vt 0.412620 0.618557
vt 0.412620 0.550455
vt 0.616947 0.550455
vt 0.616947 0.618557
vt 0.618557 0.411677
vt 0.583691 0.411677
vt 0.583691 0.207351
vt 0.618557 0.207351
vt 0.207351 0.207351
vt 0.411678 0.207351
vt 0.412620 0.412620
vt 0.616947 0.412620
vt 0.412620 0.411677
vt 0.412620 0.207351
vt 0.231658 0.204798
vt 0.231658 0.000471
vt 0.222586 0.999529
vt 0.222586 0.768315
vt 0.277326 0.768315
vt 0.277326 0.999529
vt 0.000471 0.647961
vt 0.100450 0.647961
vt 0.000471 0.856442
vt 0.617889 0.774118
vt 0.717868 0.774118
vt 0.717868 0.842221
vt 0.617889 0.842221
vt 0.888244 0.830524
vt 0.788265 0.622043
vt 0.888244 0.622043
vt 0.933557 0.411677
vt 0.933557 0.180463
vt 0.988297 0.180463
vt 0.988297 0.411677
vt 0.645418 0.100450
vt 0.645418 0.000471
vt 0.853898 0.100450
vt 0.378247 0.836417
vt 0.278268 0.836417
vt 0.278268 0.768315
vt 0.378247 0.768315
vt 0.412620 0.619499
vt 0.864513 0.411677
vt 0.864513 0.180463
vt 0.932615 0.180463
vt 0.932615 0.411677
vt 0.153541 0.767372
vt 0.153541 0.667393
vt 0.362022 0.767372
vt 0.512599 0.883721
vt 0.412620 0.883721
vt 0.412620 0.828981
vt 0.512599 0.828981
vt 0.617889 0.412620
vt 0.794526 0.203197
vt 0.513541 0.828981
vt 0.613520 0.828981
vt 0.613520 0.883721
vt 0.513541 0.883721
vt 0.000471 0.438538
vt 0.795468 0.411677
vt 0.795468 0.180463
vt 0.863570 0.180463
vt 0.863570 0.411677
vn 1.0000 0.0000 0.0000
vn 0.8944 0.4472 0.0000
vn -0.0000 0.4472 0.8944
vn -0.8944 0.4472 -0.0000
vn 0.0000 0.4472 -0.8944
vn 0.0000 -1.0000 -0.0000
vn -0.0000 0.0000 1.0000
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 -0.0000
vn 0.9017 0.4324 0.0000
vn -0.9017 0.4324 -0.0000
vn 0.0000 0.4324 -0.9017
vn 0.0000 0.4324 0.9017
usemtl Material
s off
f 110/1/1 93/2/1 7/3/1 35/4/1
f 85/5/2 87/6/2 2/7/2 27/8/2
f 64/9/3 33/10/3 16/11/3 46/12/3
f 63/13/4 34/14/4 4/15/4 31/16/4
f 62/17/5 48/18/5 20/19/5 28/20/5
f 61/21/6 37/22/6 9/23/6 40/24/6
f 109/25/7 95/26/7 9/27/7 37/28/7
f 108/29/8 94/30/8 6/31/8 50/32/8
f 107/33/9 96/34/9 8/35/9 38/36/9
f 106/37/9 97/38/9 13/39/9 40/40/9
f 92/41/6 41/42/6 13/43/6 89/44/6
f 114/45/1 98/46/1 12/47/1 80/48/1
f 105/49/1 99/50/1 19/51/1 43/52/1
f 60/53/6 44/54/6 17/55/6 38/56/6
f 111/57/9 100/58/9 17/59/9 70/60/9
f 76/61/4 45/62/4 14/63/4 67/64/4
f 75/65/3 46/12/3 16/11/3 69/66/3
f 59/67/2 32/68/2 15/69/2 47/70/2
f 74/71/3 54/72/3 26/73/3 71/74/3
f 58/75/6 53/76/6 25/77/6 55/78/6
f 91/79/6 52/80/6 24/81/6 90/82/6
f 103/83/7 102/84/7 23/85/7 51/86/7
f 57/87/6 51/88/6 23/89/6 56/90/6
f 52/80/6 57/87/6 56/90/6 24/81/6
f 12/91/6 35/92/6 57/87/6 52/80/6
f 35/92/6 7/93/6 51/88/6 57/87/6
f 93/94/7 103/83/7 51/86/7 7/95/7
f 96/96/8 104/97/8 36/98/8 8/99/8
f 80/100/6 12/91/6 52/80/6 91/79/6
f 50/101/6 58/75/6 55/78/6 22/102/6
f 6/103/6 43/104/6 58/75/6 50/101/6
f 43/104/6 19/105/6 53/76/6 58/75/6
f 68/106/3 15/107/3 54/72/3 74/71/3
f 42/108/2 59/67/2 47/70/2 18/109/2
f 1/110/2 29/111/2 59/67/2 42/108/2
f 29/111/2 5/112/2 32/68/2 59/67/2
f 71/74/3 26/73/3 46/12/3 75/65/3
f 69/113/4 16/114/4 45/62/4 76/61/4
f 36/115/6 60/53/6 38/56/6 8/116/6
f 22/102/6 55/78/6 60/117/6 36/118/6
f 55/78/6 25/77/6 44/119/6 60/117/6
f 94/120/1 105/49/1 43/52/1 6/121/1
f 90/82/6 24/81/6 41/122/6 92/123/6
f 95/124/9 106/37/9 40/40/9 9/125/9
f 100/58/9 107/33/9 38/36/9 17/59/9
f 101/126/8 108/29/8 50/32/8 22/127/8
f 41/42/6 61/21/6 40/24/6 13/43/6
f 24/81/6 56/90/6 61/128/6 41/122/6
f 56/90/6 23/89/6 37/129/6 61/128/6
f 34/130/5 62/17/5 28/20/5 4/131/5
f 5/132/5 29/133/5 62/17/5 34/130/5
f 29/133/5 1/134/5 48/18/5 62/17/5
f 45/62/4 63/13/4 31/16/4 14/63/4
f 16/114/4 33/135/4 63/13/4 45/62/4
f 33/135/4 5/136/4 34/14/4 63/13/4
f 54/72/3 64/9/3 46/12/3 26/73/3
f 15/137/3 32/138/3 64/139/3 54/140/3
f 32/138/3 5/141/3 33/142/3 64/139/3
f 79/143/2 85/5/2 27/8/2 10/144/2
f 98/46/1 110/1/1 35/4/1 12/47/1
f 18/109/2 47/70/2 78/145/2 65/146/2
f 25/77/6 72/147/6 77/148/6 44/119/6
f 88/149/4 69/113/4 76/61/4 84/150/4
f 81/151/3 71/74/3 75/65/3 83/152/3
f 87/153/3 68/106/3 74/71/3 82/154/3
f 19/105/6 66/155/6 73/156/6 53/76/6
f 53/76/6 73/156/6 72/147/6 25/77/6
f 82/154/3 74/71/3 71/74/3 81/151/3
f 83/152/3 75/65/3 69/66/3 88/157/3
f 84/150/4 76/61/4 67/64/4 86/158/4
f 99/50/1 112/159/1 66/160/1 19/51/1
f 44/54/6 77/161/6 70/162/6 17/55/6
f 47/70/2 15/69/2 68/163/2 78/145/2
f 97/38/9 113/164/9 89/165/9 13/39/9
f 39/166/4 84/167/4 86/168/4 11/169/4
f 30/170/3 83/171/3 88/172/3 3/173/3
f 49/174/3 82/175/3 81/176/3 21/177/3
f 2/178/3 87/179/3 82/175/3 49/174/3
f 21/177/3 81/176/3 83/171/3 30/170/3
f 3/180/4 88/181/4 84/167/4 39/166/4
f 65/146/2 78/145/2 85/5/2 79/143/2
f 72/147/6 90/82/6 92/123/6 77/148/6
f 66/155/6 80/100/6 91/79/6 73/156/6
f 73/156/6 91/79/6 90/82/6 72/147/6
f 77/161/6 92/41/6 89/44/6 70/162/6
f 78/145/2 68/163/2 87/6/2 85/5/2
f 65/182/1 79/183/1 114/184/1 112/185/1
f 11/186/9 86/187/9 113/188/9 97/189/9
f 18/190/1 65/182/1 112/185/1 99/191/1
f 86/187/9 67/192/9 111/193/9 113/188/9
f 10/194/1 27/195/1 110/196/1 98/197/1
f 21/198/7 30/199/7 109/200/7 102/201/7
f 20/202/8 48/203/8 108/204/8 101/205/8
f 14/206/9 31/207/9 107/208/9 100/209/9
f 3/210/9 39/211/9 106/212/9 95/213/9
f 1/214/1 42/215/1 105/216/1 94/217/1
f 4/218/8 28/219/8 104/220/8 96/221/8
f 2/222/7 49/223/7 103/224/7 93/225/7
f 49/223/7 21/198/7 102/201/7 103/224/7
f 28/219/8 20/202/8 101/205/8 104/220/8
f 67/192/9 14/206/9 100/209/9 111/193/9
f 42/215/1 18/190/1 99/191/1 105/216/1
f 79/183/1 10/194/1 98/197/1 114/184/1
f 39/211/9 11/186/9 97/189/9 106/212/9
f 31/207/9 4/226/9 96/227/9 107/208/9
f 48/203/8 1/228/8 94/229/8 108/204/8
f 30/199/7 3/230/7 95/231/7 109/200/7
f 27/195/1 2/232/1 93/233/1 110/196/1
f 114/234/10 121/235/10 122/236/10 112/237/10
f 22/238/1 115/239/1 101/240/1
f 36/241/6 116/242/6 115/243/6 22/244/6
f 104/245/9 116/246/9 36/247/9
f 111/248/11 119/249/11 120/250/11 113/251/11
f 37/252/9 117/253/9 109/254/9
f 23/255/6 118/256/6 117/257/6 37/258/6
f 102/84/1 118/259/1 23/85/1
f 101/260/12 115/261/12 116/262/12 104/263/12
f 70/264/8 119/265/8 111/266/8
f 89/267/6 120/268/6 119/269/6 70/270/6
f 113/164/7 120/271/7 89/165/7
f 80/48/7 121/272/7 114/45/7
f 66/273/6 122/274/6 121/275/6 80/276/6
f 112/159/8 122/277/8 66/160/8
f 109/278/13 117/279/13 118/280/13 102/281/13

View File

@ -1,530 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: 'sideways_rocket.blend'
# www.blender.org
mtllib sideways_rocket.mtl
o Cube
v 7.901932 16.140112 9.168047
v 7.901932 0.284660 9.167605
v -7.953522 0.284662 9.167605
v -7.953518 16.140116 9.168047
v -0.025796 8.211944 25.023279
v 7.901932 16.140997 -22.614710
v 7.901932 0.285544 -22.615152
v -7.953518 16.140999 -22.614710
v -7.953522 0.285546 -22.615152
v 7.901932 3.891575 9.167706
v -7.953521 3.891577 9.167706
v 7.901932 3.892459 -22.615053
v -7.953521 3.892461 -22.615053
v -7.953519 12.065199 9.167933
v 2.611647 5.574648 19.748320
v -2.663238 5.574649 19.748320
v -7.953519 12.066084 -22.614824
v 7.901932 12.065197 9.167933
v 7.901932 12.066081 -22.614824
v 2.533081 16.140114 9.168047
v 2.533080 0.284661 9.167605
v 2.533081 16.140999 -22.614710
v 2.533080 0.285545 -22.615152
v 2.533080 3.892460 -22.615053
v 2.533080 12.066082 -22.614824
v 0.825506 5.574648 19.748320
v 7.901932 2.088118 9.167656
v -2.710219 16.140114 9.168047
v 3.938068 12.176028 17.095663
v -2.710221 0.284661 9.167605
v -7.953518 14.102657 9.167990
v 1.292926 6.893296 22.385799
v -1.344517 6.893296 22.385799
v -3.989657 12.176030 17.095663
v 7.901932 2.089002 -22.615103
v -2.710219 16.140999 -22.614710
v -2.710221 0.285545 -22.615152
v -7.953518 14.103541 -22.614767
v -7.953521 2.088120 9.167656
v -7.953521 2.089004 -22.615103
v -2.710221 3.892461 -22.615053
v 7.901932 14.102654 9.167990
v 7.901932 14.103539 -22.614767
v -2.710219 12.066083 -22.614824
v -5.308378 8.819924 14.458127
v -0.918866 5.574649 19.748320
v 5.256789 8.819922 14.458127
v 5.217506 16.140114 9.168047
v 5.217505 0.284660 9.167605
v 5.217506 16.140997 -22.614710
v 5.217505 0.285544 -22.615152
v 5.217505 3.892460 -22.615053
v 5.217506 12.066081 -22.614824
v 1.718577 5.574648 19.748320
v 2.533080 14.103540 -22.614767
v 2.533080 2.089003 -22.615103
v 5.217505 2.089002 -22.615103
v 5.217506 14.103539 -22.614767
v 4.597428 10.497975 15.776895
v -2.710219 14.103540 -22.614767
v -2.710221 2.089003 -22.615103
v 0.613925 14.158072 13.131855
v -4.649017 10.497976 15.776895
v 0.187030 6.233973 21.067060
v 7.901932 10.277217 9.167883
v 7.901932 10.278101 -22.614874
v -7.953519 10.277220 9.167883
v 3.768897 4.417463 17.433788
v -3.820488 4.417464 17.433788
v -7.953519 10.278104 -22.614874
v 1.199038 4.417463 17.433788
v 2.533080 10.278102 -22.614874
v 5.217506 10.278102 -22.614874
v 2.483967 4.417464 17.433788
v -1.310725 4.417464 17.433788
v -5.887003 7.347342 13.300837
v -2.710220 10.278103 -22.614874
v 5.835414 7.347340 13.300837
v 7.901932 6.062693 9.167767
v 7.901932 6.063578 -22.614992
v 2.079505 1.689814 11.978107
v 4.288103 1.689814 11.978107
v -2.234392 1.689814 11.978107
v -7.250905 3.876255 10.572937
v 7.199316 3.876253 10.572937
v -7.953520 6.062696 9.167767
v 6.496700 1.689814 11.978107
v -6.548290 1.689815 11.978107
v -7.953520 6.063580 -22.614992
v 2.533080 6.063578 -22.614992
v 5.217506 6.063578 -22.614992
v -2.710220 6.063579 -22.614992
v 7.901932 0.285098 -6.563862
v 7.901932 16.140549 -6.563419
v -7.953522 0.285099 -6.563862
v -7.953518 16.140553 -6.563419
v -7.953521 3.892015 -6.563761
v 7.901932 3.892013 -6.563761
v 7.901932 12.065634 -6.563534
v -7.953519 12.065637 -6.563534
v 2.533081 16.140551 -6.563419
v 2.533080 0.285098 -6.563862
v 5.217505 0.285098 -6.563862
v -2.710219 16.140553 -6.563419
v 7.901932 14.103092 -6.563477
v -7.953521 2.088557 -6.563810
v -7.953518 14.103094 -6.563477
v 5.217506 16.140551 -6.563419
v -2.710221 0.285099 -6.563862
v 7.901932 2.088555 -6.563810
v -7.953519 10.277658 -6.563583
v 7.901932 10.277655 -6.563583
v -7.953520 6.063133 -6.563700
v 7.901932 6.063131 -6.563700
v 2.533082 23.838551 -22.614496
v -2.710217 23.838551 -22.614496
v -2.710222 -7.412007 -22.615366
v 2.533079 -7.412007 -22.615366
v -15.651073 10.278105 -22.614874
v -15.651073 6.063581 -22.614992
v 15.599483 6.063578 -22.614992
v 15.599483 10.278101 -22.614874
vt 0.218981 0.852031
vt 0.194871 0.852031
vt 0.194871 0.637446
vt 0.218981 0.637446
vt 0.835301 0.494162
vt 0.800043 0.501402
vt 0.800043 0.455386
vt 0.822053 0.465229
vt 0.735697 0.136305
vt 0.715222 0.156016
vt 0.697592 0.116595
vt 0.720912 0.116595
vt 0.165430 0.139095
vt 0.193956 0.130260
vt 0.193956 0.260063
vt 0.169091 0.248943
vt 0.372611 0.097889
vt 0.431857 0.036345
vt 0.431857 0.072232
vt 0.431857 0.142328
vt 0.218981 0.283435
vt 0.194871 0.283435
vt 0.194871 0.213339
vt 0.218981 0.213339
vt 0.143243 0.951584
vt 0.073147 0.951584
vt 0.073147 0.736998
vt 0.143243 0.736998
vt 0.443640 0.853689
vt 0.407753 0.853689
vt 0.407753 0.639103
vt 0.443640 0.639103
vt 0.027696 0.736084
vt 0.000457 0.736084
vt 0.000457 0.521498
vt 0.027696 0.521498
vt 0.775019 0.643425
vt 0.750909 0.643425
vt 0.750909 0.428839
vt 0.775019 0.428839
vt 0.272116 0.283435
vt 0.243091 0.283435
vt 0.243091 0.213339
vt 0.272116 0.213339
vt 0.272116 0.852031
vt 0.243091 0.852031
vt 0.243091 0.637446
vt 0.272116 0.637446
vt 0.773025 0.427924
vt 0.745787 0.427924
vt 0.745787 0.213339
vt 0.773025 0.213339
vt 0.379600 0.283435
vt 0.352362 0.283435
vt 0.352362 0.213339
vt 0.379600 0.213339
vt 0.078837 0.736084
vt 0.054934 0.736084
vt 0.054934 0.521498
vt 0.078837 0.521498
vt 0.111871 0.155682
vt 0.136904 0.147929
vt 0.144226 0.237823
vt 0.122406 0.228065
vt 0.715674 0.082001
vt 0.682121 0.082001
vt 0.131131 0.381946
vt 0.127470 0.491795
vt 0.095283 0.463006
vt 0.102605 0.373112
vt 0.766404 0.082001
vt 0.756172 0.116595
vt 0.744232 0.116595
vt 0.749226 0.082001
vt 0.379600 0.389419
vt 0.352362 0.389419
vt 0.352362 0.353532
vt 0.379600 0.353532
vt 0.272116 0.389419
vt 0.243091 0.389419
vt 0.243091 0.353532
vt 0.272116 0.353532
vt 0.036345 0.951584
vt 0.000457 0.951584
vt 0.000457 0.736998
vt 0.036345 0.736998
vt 0.218981 0.389419
vt 0.194871 0.389419
vt 0.194871 0.353532
vt 0.218981 0.353532
vt 0.243091 0.425306
vt 0.218981 0.425306
vt 0.194871 0.425306
vt 0.072232 0.951584
vt 0.072232 0.736998
vt 0.791980 0.858925
vt 0.721884 0.858925
vt 0.721884 0.644339
vt 0.791980 0.644339
vt 0.272116 0.425306
vt 0.406838 0.389419
vt 0.406838 0.353532
vt 0.406838 0.425306
vt 0.379600 0.425306
vt 0.352362 0.425306
vt 0.783582 0.082001
vt 0.768111 0.116595
vt 0.134792 0.272098
vt 0.109927 0.283218
vt 0.159657 0.260978
vt 0.159657 0.390781
vt 0.159657 0.520584
vt 0.101336 0.083299
vt 0.129582 0.058035
vt 0.406838 0.283435
vt 0.406838 0.213339
vt 0.800263 0.427924
vt 0.800263 0.213339
vt 0.799129 0.643425
vt 0.799129 0.428839
vt 0.479528 0.853689
vt 0.479527 0.639103
vt 0.313364 0.159433
vt 0.431857 0.212424
vt 0.194871 0.106441
vt 0.313364 0.053449
vt 0.431857 0.000457
vt 0.161769 0.029246
vt 0.193956 0.000457
vt 0.750481 0.156016
vt 0.732851 0.195437
vt 0.870558 0.486921
vt 0.844062 0.475072
vt 0.077572 0.365359
vt 0.088107 0.292976
vt 0.328459 0.353532
vt 0.328459 0.283435
vt 0.034756 0.142850
vt 0.052864 0.173957
vt 0.760997 0.000457
vt 0.703325 0.000457
vt 0.820049 0.000457
vt 0.790523 0.000457
vt 0.328459 0.425306
vt 0.328459 0.389419
vt 0.645654 0.000457
vt 0.070972 0.205063
vt 0.721884 0.427924
vt 0.721884 0.213339
vt 0.328459 0.213339
vt 0.067037 0.437742
vt 0.721884 0.643425
vt 0.721884 0.428839
vt 0.022467 0.183371
vt 0.044476 0.193214
vt 0.476192 0.859839
vt 0.482553 0.901846
vt 0.424881 0.901846
vt 0.406095 0.859839
vt 0.582175 0.859839
vt 0.569750 0.901846
vt 0.540224 0.901846
vt 0.546288 0.859839
vt 0.618062 0.859839
vt 0.599276 0.901846
vt 0.000457 0.173528
vt 0.018565 0.347084
vt 0.036673 0.315978
vt 0.000457 0.378191
vt 0.566360 0.210767
vt 0.510017 0.210767
vt 0.510017 0.000457
vt 0.566360 0.000457
vt 0.407753 0.377087
vt 0.407753 0.348061
vt 0.618062 0.348062
vt 0.618062 0.377086
vt 0.590263 0.210767
vt 0.590263 0.000457
vt 0.407753 0.291719
vt 0.618062 0.291719
vt 0.480992 0.210767
vt 0.456882 0.210767
vt 0.456882 0.000457
vt 0.480992 0.000457
vt 0.335063 0.636531
vt 0.264967 0.636531
vt 0.264967 0.426221
vt 0.335063 0.426221
vt 0.407753 0.497996
vt 0.407753 0.462109
vt 0.618062 0.462109
vt 0.618062 0.497996
vt 0.407753 0.267816
vt 0.407753 0.240577
vt 0.618062 0.240577
vt 0.618062 0.267816
vt 0.407753 0.425306
vt 0.407753 0.401196
vt 0.618062 0.401196
vt 0.618062 0.425306
vt 0.644739 0.210767
vt 0.617501 0.210767
vt 0.617501 0.000457
vt 0.644739 0.000457
vt 0.407753 0.638188
vt 0.407753 0.568092
vt 0.618062 0.568092
vt 0.618062 0.638188
vt 0.406838 0.636531
vt 0.370951 0.636531
vt 0.370951 0.426221
vt 0.406838 0.426221
vt 0.407753 0.213339
vt 0.618062 0.213339
vt 0.407753 0.426221
vt 0.618062 0.426221
vt 0.194871 0.636531
vt 0.194871 0.426221
vt 0.432772 0.210767
vt 0.432772 0.000457
vt 0.886598 0.882324
vt 0.886598 0.644339
vt 0.942941 0.644339
vt 0.942941 0.882324
vt 0.582434 0.639103
vt 0.800043 0.502317
vt 0.902950 0.502317
vt 0.902950 0.572414
vt 0.800043 0.572414
vt 0.618977 0.644339
vt 0.943200 0.451324
vt 0.943200 0.213339
vt 0.999543 0.213339
vt 0.999543 0.451324
vt 0.160437 0.955852
vt 0.160437 0.852946
vt 0.375022 0.955852
vt 0.902950 0.643425
vt 0.800043 0.643425
vt 0.800043 0.573328
vt 0.902950 0.573328
vt 0.792895 0.882324
vt 0.792895 0.644339
vt 0.885683 0.688837
vt 0.872189 0.451324
vt 0.872189 0.213339
vt 0.942285 0.213339
vt 0.942285 0.451324
vt 0.181743 0.521498
vt 0.721884 0.916182
vt 0.618977 0.916182
vt 0.618977 0.859839
vt 0.721884 0.859839
vt 0.618977 0.428839
vt 0.375022 0.637446
vt 0.820964 0.000457
vt 0.923870 0.000457
vt 0.923870 0.056800
vt 0.820964 0.056800
vt 0.618977 0.213339
vt 0.801178 0.451324
vt 0.801178 0.213339
vt 0.871274 0.213339
vt 0.871274 0.451324
vn 1.0000 -0.0000 0.0000
vn 0.8944 -0.0000 0.4472
vn 0.0000 -0.8944 0.4472
vn -0.8944 -0.0000 0.4472
vn 0.0000 0.8944 0.4472
vn 0.0000 0.0000 -1.0000
vn -0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 0.0000
vn -1.0000 0.0000 0.0000
vn 0.9017 -0.0000 0.4324
vn -0.9017 -0.0000 0.4324
vn 0.0000 0.9017 0.4324
vn -0.0000 -0.9017 0.4324
usemtl Material
s off
f 110/1/1 93/2/1 7/3/1 35/4/1
f 85/5/2 87/6/2 2/7/2 27/8/2
f 64/9/3 33/10/3 16/11/3 46/12/3
f 63/13/4 34/14/4 4/15/4 31/16/4
f 62/17/5 48/18/5 20/19/5 28/20/5
f 61/21/6 37/22/6 9/23/6 40/24/6
f 109/25/7 95/26/7 9/27/7 37/28/7
f 108/29/8 94/30/8 6/31/8 50/32/8
f 107/33/9 96/34/9 8/35/9 38/36/9
f 106/37/9 97/38/9 13/39/9 40/40/9
f 92/41/6 41/42/6 13/43/6 89/44/6
f 114/45/1 98/46/1 12/47/1 80/48/1
f 105/49/1 99/50/1 19/51/1 43/52/1
f 60/53/6 44/54/6 17/55/6 38/56/6
f 111/57/9 100/58/9 17/59/9 70/60/9
f 76/61/4 45/62/4 14/63/4 67/64/4
f 75/65/3 46/12/3 16/11/3 69/66/3
f 59/67/2 32/68/2 15/69/2 47/70/2
f 74/71/3 54/72/3 26/73/3 71/74/3
f 58/75/6 53/76/6 25/77/6 55/78/6
f 91/79/6 52/80/6 24/81/6 90/82/6
f 103/83/7 102/84/7 23/85/7 51/86/7
f 57/87/6 51/88/6 23/89/6 56/90/6
f 52/80/6 57/87/6 56/90/6 24/81/6
f 12/91/6 35/92/6 57/87/6 52/80/6
f 35/92/6 7/93/6 51/88/6 57/87/6
f 93/94/7 103/83/7 51/86/7 7/95/7
f 96/96/8 104/97/8 36/98/8 8/99/8
f 80/100/6 12/91/6 52/80/6 91/79/6
f 50/101/6 58/75/6 55/78/6 22/102/6
f 6/103/6 43/104/6 58/75/6 50/101/6
f 43/104/6 19/105/6 53/76/6 58/75/6
f 68/106/3 15/107/3 54/72/3 74/71/3
f 42/108/2 59/67/2 47/70/2 18/109/2
f 1/110/2 29/111/2 59/67/2 42/108/2
f 29/111/2 5/112/2 32/68/2 59/67/2
f 71/74/3 26/73/3 46/12/3 75/65/3
f 69/113/4 16/114/4 45/62/4 76/61/4
f 36/115/6 60/53/6 38/56/6 8/116/6
f 22/102/6 55/78/6 60/53/6 36/115/6
f 55/78/6 25/77/6 44/54/6 60/53/6
f 94/117/1 105/49/1 43/52/1 6/118/1
f 90/82/6 24/81/6 41/42/6 92/41/6
f 95/119/9 106/37/9 40/40/9 9/120/9
f 100/58/9 107/33/9 38/36/9 17/59/9
f 101/121/8 108/29/8 50/32/8 22/122/8
f 41/42/6 61/21/6 40/24/6 13/43/6
f 24/81/6 56/90/6 61/21/6 41/42/6
f 56/90/6 23/89/6 37/22/6 61/21/6
f 34/123/5 62/17/5 28/20/5 4/124/5
f 5/125/5 29/126/5 62/17/5 34/123/5
f 29/126/5 1/127/5 48/18/5 62/17/5
f 45/62/4 63/13/4 31/16/4 14/63/4
f 16/114/4 33/128/4 63/13/4 45/62/4
f 33/128/4 5/129/4 34/14/4 63/13/4
f 54/72/3 64/9/3 46/12/3 26/73/3
f 15/107/3 32/130/3 64/9/3 54/72/3
f 32/130/3 5/131/3 33/10/3 64/9/3
f 79/132/2 85/5/2 27/8/2 10/133/2
f 98/46/1 110/1/1 35/4/1 12/47/1
f 18/109/2 47/70/2 78/134/2 65/135/2
f 25/77/6 72/136/6 77/137/6 44/54/6
f 88/138/4 69/113/4 76/61/4 84/139/4
f 81/140/3 71/74/3 75/65/3 83/141/3
f 87/142/3 68/106/3 74/71/3 82/143/3
f 19/105/6 66/144/6 73/145/6 53/76/6
f 53/76/6 73/145/6 72/136/6 25/77/6
f 82/143/3 74/71/3 71/74/3 81/140/3
f 83/141/3 75/65/3 69/66/3 88/146/3
f 84/139/4 76/61/4 67/64/4 86/147/4
f 99/50/1 112/148/1 66/149/1 19/51/1
f 44/54/6 77/137/6 70/150/6 17/55/6
f 47/70/2 15/69/2 68/151/2 78/134/2
f 97/38/9 113/152/9 89/153/9 13/39/9
f 39/154/4 84/139/4 86/147/4 11/155/4
f 30/156/3 83/157/3 88/158/3 3/159/3
f 49/160/3 82/161/3 81/162/3 21/163/3
f 2/164/3 87/165/3 82/161/3 49/160/3
f 21/163/3 81/162/3 83/157/3 30/156/3
f 3/166/4 88/138/4 84/139/4 39/154/4
f 65/135/2 78/134/2 85/167/2 79/168/2
f 72/136/6 90/82/6 92/41/6 77/137/6
f 66/144/6 80/100/6 91/79/6 73/145/6
f 73/145/6 91/79/6 90/82/6 72/136/6
f 77/137/6 92/41/6 89/44/6 70/150/6
f 78/134/2 68/151/2 87/169/2 85/167/2
f 65/170/1 79/171/1 114/172/1 112/173/1
f 11/174/9 86/175/9 113/176/9 97/177/9
f 18/178/1 65/170/1 112/173/1 99/179/1
f 86/175/9 67/180/9 111/181/9 113/176/9
f 10/182/1 27/183/1 110/184/1 98/185/1
f 21/186/7 30/187/7 109/188/7 102/189/7
f 20/190/8 48/191/8 108/192/8 101/193/8
f 14/194/9 31/195/9 107/196/9 100/197/9
f 3/198/9 39/199/9 106/200/9 95/201/9
f 1/202/1 42/203/1 105/204/1 94/205/1
f 4/206/8 28/207/8 104/208/8 96/209/8
f 2/210/7 49/211/7 103/212/7 93/213/7
f 49/211/7 21/186/7 102/189/7 103/212/7
f 28/207/8 20/190/8 101/193/8 104/208/8
f 67/180/9 14/194/9 100/197/9 111/181/9
f 42/203/1 18/178/1 99/179/1 105/204/1
f 79/171/1 10/182/1 98/185/1 114/172/1
f 39/199/9 11/174/9 97/177/9 106/200/9
f 31/195/9 4/214/9 96/215/9 107/196/9
f 48/191/8 1/216/8 94/217/8 108/192/8
f 30/187/7 3/218/7 95/219/7 109/188/7
f 27/183/1 2/220/1 93/221/1 110/184/1
f 114/222/10 121/223/10 122/224/10 112/225/10
f 22/122/1 115/226/1 101/121/1
f 36/227/6 116/228/6 115/229/6 22/230/6
f 104/97/9 116/231/9 36/98/9
f 111/232/11 119/233/11 120/234/11 113/235/11
f 37/236/9 117/237/9 109/238/9
f 23/239/6 118/240/6 117/241/6 37/242/6
f 102/243/1 118/244/1 23/245/1
f 101/246/12 115/247/12 116/248/12 104/249/12
f 70/60/8 119/250/8 111/57/8
f 89/251/6 120/252/6 119/253/6 70/254/6
f 113/152/7 120/255/7 89/153/7
f 80/48/7 121/256/7 114/45/7
f 66/257/6 122/258/6 121/259/6 80/260/6
f 112/148/8 122/261/8 66/149/8
f 109/262/13 117/263/13 118/264/13 102/265/13

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

2
mods/signs/.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

19
mods/signs/README.md Normal file
View File

@ -0,0 +1,19 @@
MultiCraft Game mod: signs
==========================
License of source code
----------------------
Copyright (C) 2018-2020 MultiCraft Development Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3.0 of the License, or
(at your option) any later version.
http://www.gnu.org/licenses/lgpl-3.0.html
License of textures
-------------------
Copyright (C) 2018-2020 MultiCraft Development Team
CC-BY-SA 4.0

View File

@ -1,591 +1,360 @@
minetest.register_node("signs:signs_apostrophe_sign",{
description = "Carbon Apostrophe Sign",
tiles = {"signs_apostrophe_sign.png"},
groups = {oddly_breakable_by_hand = 1},
local vadd = vector.add
local floor, pi = math.floor, math.pi
local sign_positions = {
[0] = {{x = 0, y = 0.18, z = -0.07}, pi},
[1] = {{x = -0.07, y = 0.18, z = 0}, pi * 0.5},
[2] = {{x = 0, y = 0.18, z = 0.07}, 0},
[3] = {{x = 0.07, y = 0.18, z = 0}, pi * 1.5}
}
local wall_sign_positions = {
[0] = {{x = 0.43, y = -0.005, z = 0}, pi * 0.5},
[1] = {{x = -0.43, y = -0.005, z = 0}, pi * 1.5},
[2] = {{x = 0, y = -0.005, z = 0.43}, pi},
[3] = {{x = 0, y = -0.005, z = -0.43}, 0}
}
local function generate_sign_line_texture(str, row)
local leftover = floor((20 - #str) * 16 / 2)
local texture = ""
for i = 1, 20 do
local char = str:byte(i)
if char and (char >= 32 and char <= 126) then
texture = texture .. ":" .. (i - 1) * 16 + leftover .. ","
.. row * 20 .. "=signs_" .. char .. ".png"
end
end
return texture
end
local function find_any(str, pair, start)
local ret = 0 -- 0 if not found (indices start at 1)
for _, needle in pairs(pair) do
local first = str:find(needle, start)
if first then
if ret == 0 or first < ret then
ret = first
end
end
end
return ret
end
local disposable_chars = {["\n"] = true, ["\r"] = true, ["\t"] = true, [" "] = true}
local wrap_chars = {"\n", "\r", "\t", " ", "-", "/", ";", ":", ",", ".", "?", "!"}
local slugify = dofile(minetest.get_modpath("signs") .. "/slugify.lua")
local function generate_sign_texture(str)
if not str or str == "" then
return "blank.png"
end
local row = 0
local texture = "[combine:" .. 16 * 20 .. "x100"
local result = {}
-- Transliterate text
str = slugify(str)
while #str > 0 do
if row > 4 then
break
end
local wrap_i = 0
local keep_i = 0 -- The last character that was kept
while wrap_i < #str do
wrap_i = find_any(str, wrap_chars, wrap_i + 1)
if wrap_i > 20 then
if keep_i > 1 then
wrap_i = keep_i
else
wrap_i = 20
end
break
elseif wrap_i == 0 then
if #str <= 20 then
wrap_i = #str
elseif keep_i > 0 then
wrap_i = keep_i
else
wrap_i = #str
end
break
elseif str:sub(wrap_i, wrap_i) == "\n" then
break
end
if not disposable_chars[str:sub(wrap_i, wrap_i)] then
keep_i = wrap_i
elseif wrap_i > 1 and not disposable_chars[str:sub(wrap_i - 1, wrap_i - 1)] then
keep_i = wrap_i - 1
end
end
if wrap_i > 20 then
wrap_i = 20
end
local start_remove = 0
if disposable_chars[str:sub(1, 1)] then
start_remove = 1
end
local end_remove = 0
if disposable_chars[str:sub(wrap_i, wrap_i)] then
end_remove = 1
end
local line_string = str:sub(1 + start_remove, wrap_i - end_remove)
str = str:sub(wrap_i + 1)
if line_string ~= "" then
result[row] = line_string
end
row = row + 1
end
local empty = 0
if row == 1 then
empty = 2
elseif row < 4 then
empty = 1
end
for r, s in pairs(result) do
texture = texture .. generate_sign_line_texture(s, r + empty)
end
return texture
end
minetest.register_entity("signs:sign_text", {
visual = "upright_sprite",
visual_size = {x = 0.7, y = 0.6},
collisionbox = {0},
pointable = false,
on_activate = function(self)
local ent = self.object
local pos = ent:get_pos()
-- remove entity for missing sign
local node_name = minetest.get_node(pos).name
if not node_name == "signs:sign" and not node_name == "signs:wall_sign" then
ent:remove()
return
end
local meta = minetest.get_meta(pos)
local meta_texture = meta:get_string("sign_texture")
local texture
if meta_texture and meta_texture ~= "" then
texture = meta_texture
else
local meta_text = meta:get_string("sign_text")
if meta_text and meta_text ~= "" then
texture = generate_sign_texture(meta_text)
else
texture = "blank.png"
end
meta:set_string("sign_texture", texture)
end
ent:set_properties({
textures = {texture, "blank.png"}
})
end
})
local function check_text(pos)
local meta = minetest.get_meta(pos)
local text = meta:get_string("sign_text")
local objects = minetest.get_objects_inside_radius(pos, 0.5)
if text and text ~= "" then
local count = 0
for _, obj in pairs(objects) do
local ent = obj:get_luaentity()
if ent and ent.name == "signs:sign_text" then
count = count + 1
if count > 1 then
obj:remove()
end
end
end
if count == 0 then
local node = minetest.get_node(pos)
local p2 = node.param2 or -1
local sign_pos = sign_positions
if node.name == "signs:wall_sign" then
p2 = p2 - 2
sign_pos = wall_sign_positions
end
if p2 > 3 or p2 < 0 then return end
local obj = minetest.add_entity(
vadd(pos, sign_pos[p2][1]), "signs:sign_text")
obj:set_yaw(sign_pos[p2][2])
end
else
for _, obj in pairs(objects) do
local ent = obj:get_luaentity()
if ent and ent.name == "signs:sign_text" then
obj:remove()
end
end
end
end
minetest.register_lbm({
label = "Check for sign text",
name = "signs:sign_text",
nodenames = {"signs:sign", "signs:wall_sign"},
run_at_every_load = true,
action = check_text
})
local function construct(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "size[5,3]" ..
"textarea[1.15,0.3;3.3,2;Dtext;" .. "Enter your text:" .. ";${sign_text}]" ..
"button_exit[0.85,2;3.3,1;;" .. "Save" .. "]")
end
local function destruct(pos)
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 0.5)) do
local ent = obj:get_luaentity()
if ent and ent.name == "signs:sign_text" then
obj:remove()
end
end
end
local function receive_fields(pos, _, fields, sender, wall)
local text = fields.Dtext
if not text then return end
if minetest.is_protected(pos, sender:get_player_name()) then
return
end
local p2 = minetest.get_node(pos).param2
local sign_pos = sign_positions
if wall then
p2 = p2 - 2
sign_pos = wall_sign_positions
end
if not p2 or p2 > 3 or p2 < 0 then return end
local sign
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 0.5)) do
local ent = obj:get_luaentity()
if ent and ent.name == "signs:sign_text" then
sign = obj
break
end
end
if not sign then
sign = minetest.add_entity(
vadd(pos, sign_pos[p2][1]), "signs:sign_text")
else
sign:set_pos(vadd(pos, sign_pos[p2][1]))
end
local texture = generate_sign_texture(text)
sign:set_properties({
textures = {texture, "blank.png"}
})
sign:set_yaw(sign_pos[p2][2])
local meta = minetest.get_meta(pos)
meta:set_string("sign_text", text)
meta:set_string("sign_texture", texture)
end
minetest.register_node("signs:sign", {
description = "Sign",
tiles = {"signs_wood.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_placement_prediction = "",
sunlight_propagates = true,
node_box = {
type = "fixed",
fixed = {
{-0.375, -0.125, -0.063, 0.375, 0.5, 0.063},
{-0.063, -0.5, -0.063, 0.063, -0.125, 0.063}
}
},
groups = {oddly_breakable_by_hand = 1, choppy = 3, attached_node = 1},
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then
local under = pointed_thing.under
local node = minetest.get_node(under)
local node_def = minetest.registered_nodes[node.name]
if node_def and node_def.on_rightclick and
not (placer and placer:is_player() and
placer:get_player_control().sneak) then
return node_def.on_rightclick(under, node, placer, itemstack,
pointed_thing) or itemstack
end
local undery = pointed_thing.under.y
local posy = pointed_thing.above.y
local _, result
if undery < posy then -- Floor sign
itemstack, result = minetest.item_place(itemstack,
placer, pointed_thing)
elseif undery == posy then -- Wall sign
_, result = minetest.item_place(ItemStack("signs:wall_sign"),
placer, pointed_thing)
if result and not (creative and creative.is_enabled_for and
creative.is_enabled_for(placer)) then
itemstack:take_item()
end
end
if result then
minetest.sound_play({name = "default_place_node_hard"},
{pos = pointed_thing.above})
end
end
return itemstack
end,
on_construct = construct,
on_destruct = destruct,
on_punch = check_text,
on_receive_fields = receive_fields
})
minetest.register_node("signs:wall_sign", {
tiles = {"signs_wood.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "wallmounted",
node_box = {
type = "wallmounted",
wall_side = {-0.5, -0.313, -0.438, -0.438, 0.313, 0.438}
},
drop = "signs:sign",
walkable = false,
groups = {oddly_breakable_by_hand = 1, choppy = 3,
not_in_creative_inventory = 1, attached_node = 1},
on_construct = construct,
on_destruct = destruct,
on_punch = check_text,
on_receive_fields = function(pos, _, fields, sender)
receive_fields(pos, _, fields, sender, true)
end
})
minetest.register_craft({
output = "signs:signs_apostrophe_sign",
output = "signs:sign 3",
recipe = {
{"","dye:white",""},
{"","signs:signs_blank_sign",""},
{"","",""}
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
{"", "group:stick", ""}
}
})
--block break
minetest.register_node("signs:signs_a_sign",{
description = "Carbon A Sign",
tiles = {"signs_a_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_a_sign",
recipe = {
{"","dye:white",""},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","","dye:white"}
}
type = "fuel",
recipe = "signs:sign",
burntime = 10
})
--block break
minetest.register_node("signs:signs_blank_sign",{
description = "Carbon Blank Sign",
tiles = {"signs_blank_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
type = "cooking",
output = "signs:signs_blank_sign",
recipe = "wool:white",
cooktime = 5,
})
--block break
minetest.register_node("signs:signs_b_sign",{
description = "Carbon B Sign",
tiles = {"signs_b_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_b_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_check_sign",{
description = "Carbon Check Sign",
tiles = {"signs_check_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_check_sign",
recipe = {
{"","","dye:white"},
{"dye:white","signs:signs_blank_sign",""},
{"","dye:white",""}
}
})
--block break
minetest.register_node("signs:signs_comma_sign",{
description = "Carbon Comma Sign",
tiles = {"signs_comma_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_comma_sign",
recipe = {
{"","",""},
{"","signs:signs_blank_sign",""},
{"","","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_c_sign",{
description = "Carbon C Sign",
tiles = {"signs_c_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_c_sign",
recipe = {
{"dye:white","","dye:white"},
{"","signs:signs_blank_sign",""},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_double_quote_sign",{
description = "Carbon Double Quote Sign",
tiles = {"signs_double_quote_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_double_quote_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"","",""}
}
})
--block break
minetest.register_node("signs:signs_d_sign",{
description = "Carbon D Sign",
tiles = {"signs_d_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_d_sign",
recipe = {
{"dye:white","dye:white",""},
{"","signs:signs_blank_sign","dye:white"},
{"dye:white","dye:white",""}
}
})
--block break
minetest.register_node("signs:signs_e_sign",{
description = "Carbon E Sign",
tiles = {"signs_e_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_e_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"","signs:signs_blank_sign",""},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_exclamation_sign",{
description = "Carbon Exclamation Sign",
tiles = {"signs_exclamation_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_exclamation_sign",
recipe = {
{"","","dye:white"},
{"","signs:signs_blank_sign",""},
{"","","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_f_sign",{
description = "Carbon F Sign",
tiles = {"signs_f_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_f_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"dye:white","signs:signs_blank_sign",""},
{"dye:white","",""}
}
})
--block break
minetest.register_node("signs:signs_g_sign",{
description = "Carbon G Sign",
tiles = {"signs_g_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_g_sign",
recipe = {
{"dye:white","dye:white",""},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_h_sign",{
description = "Carbon H Sign",
tiles = {"signs_h_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_h_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_i_sign",{
description = "Carbon I Sign",
tiles = {"signs_i_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_i_sign",
recipe = {
{"","","dye:white"},
{"","signs:signs_blank_sign","dye:white"},
{"","","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_j_sign",{
description = "Carbon J Sign",
tiles = {"signs_j_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_j_sign",
recipe = {
{"","","dye:white"},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_k_sign",{
description = "Carbon K Sign",
tiles = {"signs_k_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_k_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","signs:signs_blank_sign",""},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_l_sign",{
description = "Carbon L Sign",
tiles = {"signs_l_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_l_sign",
recipe = {
{"dye:white","",""},
{"dye:white","signs:signs_blank_sign",""},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_m_sign",{
description = "Carbon M Sign",
tiles = {"signs_m_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_m_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_n_sign",{
description = "Carbon N Sign",
tiles = {"signs_n_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_n_sign",
recipe = {
{"","","dye:white"},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","",""}
}
})
--block break
minetest.register_node("signs:signs_o_sign",{
description = "Carbon O Sign",
tiles = {"signs_o_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_o_sign",
recipe = {
{"","dye:white",""},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"","dye:white",""}
}
})
--block break
minetest.register_node("signs:signs_p_sign",{
description = "Carbon P Sign",
tiles = {"signs_p_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_p_sign",
recipe = {
{"dye:white","dye:white",""},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","",""}
}
})
--block break
minetest.register_node("signs:signs_q_sign",{
description = "Carbon Q Sign",
tiles = {"signs_q_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_q_sign",
recipe = {
{"","dye:white","dye:white"},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"","","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_question_sign",{
description = "Carbon Question Sign",
tiles = {"signs_question_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_question_sign",
recipe = {
{"dye:white","dye:white",""},
{"","signs:signs_blank_sign","dye:white"},
{"","dye:white",""}
}
})
--block break
minetest.register_node("signs:signs_r_sign",{
description = "Carbon R Sign",
tiles = {"signs_r_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_r_sign",
recipe = {
{"dye:white","dye:white",""},
{"dye:white","signs:signs_blank_sign",""},
{"dye:white","",""}
}
})
--block break
minetest.register_node("signs:signs_s_sign",{
description = "Carbon S Sign",
tiles = {"signs_s_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_s_sign",
recipe = {
{"","dye:white",""},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","dye:white",""}
}
})
--block break
minetest.register_node("signs:signs_t_sign",{
description = "Carbon T Sign",
tiles = {"signs_t_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_t_sign",
recipe = {
{"dye:white","dye:white","dye:white"},
{"","signs:signs_blank_sign",""},
{"","dye:white",""}
}
})
--block break
minetest.register_node("signs:signs_u_sign",{
description = "Carbon U Sign",
tiles = {"signs_u_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_u_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"","dye:white",""}
}
})
--block break
minetest.register_node("signs:signs_v_sign",{
description = "Carbon V Sign",
tiles = {"signs_v_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_v_sign",
recipe = {
{"dye:white","","dye:white"},
{"","signs:signs_blank_sign",""},
{"","dye:white",""}
}
})
--block break
minetest.register_node("signs:signs_w_sign",{
description = "Carbon W Sign",
tiles = {"signs_w_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_w_sign",
recipe = {
{"dye:white","","dye:white"},
{"dye:white","signs:signs_blank_sign","dye:white"},
{"dye:white","dye:white","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_x_sign",{
description = "Carbon X Sign",
tiles = {"signs_x_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_x_sign",
recipe = {
{"dye:white","","dye:white"},
{"signs:signs_blank_sign","dye:white",""},
{"dye:white","","dye:white"}
}
})
--block break
minetest.register_node("signs:signs_y_sign",{
description = "Carbon Y Sign",
tiles = {"signs_y_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_y_sign",
recipe = {
{"dye:white","","dye:white"},
{"signs:signs_blank_sign","dye:white",""},
{"","dye:white",""}
}
})
--block break
minetest.register_node("signs:signs_z_sign",{
description = "Carbon Z Sign",
tiles = {"signs_z_sign.png"},
groups = {oddly_breakable_by_hand = 1},
})
minetest.register_craft({
output = "signs:signs_z_sign",
recipe = {
{"dye:white","dye:white",""},
{"","signs:signs_blank_sign",""},
{"","dye:white","dye:white"}
}
})
--block break

View File

@ -1,4 +0,0 @@
Graphics : Public Domain
Code: Public Domain

View File

@ -1,4 +1,3 @@
name = signs
auhtor = MisterE
description = Adds simple sign nodes with letters that can be used for many build projects.
depends = wool, dye
depends = default
description = Lightweight wooden signs with text display and automatic formatting.

View File

@ -1 +0,0 @@
This adds sign blocks with white text on a black background. The material is carbon. There is also a blank carbon sign block, which is made from burning wool, and is the base material used to make the signs.

BIN
mods/signs/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 KiB

80
mods/signs/slugify.lua Normal file
View File

@ -0,0 +1,80 @@
--[[
Lua Slugify
Creating URL slugs properly in Lua (including transliteration for UTF-8)
<https://github.com/hs0ucy/lua-slugify>
Original version in JavaScript
<https://ourcodeworld.com/articles/read/255/creating-url-slugs-properly-in-javascript-including-transliteration-for-utf-8>
License: CC0
]]
local charmap = {
-- Latin
["À"] = "A", ["Á"] = "A", ["Â"] = "A", ["Ã"] = "A", ["Ä"] = "A", ["Å"] = "A", ["Æ"] = "AE", ["Ç"] = "C",
["È"] = "E", ["É"] = "E", ["Ê"] = "E", ["Ë"] = "E", ["Ì"] = "I", ["Í"] = "I", ["Î"] = "I", ["Ï"] = "I",
["Ð"] = "D", ["Ñ"] = "N", ["Ò"] = "O", ["Ó"] = "O", ["Ô"] = "O", ["Õ"] = "O", ["Ö"] = "O", ["Ő"] = "O",
["Ø"] = "O", ["Ù"] = "U", ["Ú"] = "U", ["Û"] = "U", ["Ü"] = "U", ["Ű"] = "U", ["Ý"] = "Y", ["Þ"] = "TH",
["Ÿ"] = "Y", [""] = "SS",
["à"] = "a", ["á"] = "a", ["â"] = "a", ["ã"] = "a", ["ä"] = "a", ["å"] = "a", ["æ"] = "ae", ["ç"] = "c",
["è"] = "e", ["é"] = "e", ["ê"] = "e", ["ë"] = "e", ["ì"] = "i", ["í"] = "i", ["î"] = "i", ["ï"] = "i",
["ð"] = "d", ["ñ"] = "n", ["ò"] = "o", ["ó"] = "o", ["ô"] = "o", ["õ"] = "o", ["ö"] = "o", ["ő"] = "o",
["ø"] = "o", ["ù"] = "u", ["ú"] = "u", ["û"] = "u", ["ü"] = "u", ["ű"] = "u", ["ý"] = "y", ["þ"] = "th",
["ÿ"] = "y", ["ß"] = "ss",
-- Latin symbols
["©"] = "(c)",
-- Greek
["Α"] = "A", ["Β"] = "B", ["Γ"] = "G", ["Δ"] = "D", ["Ε"] = "E", ["Ζ"] = "Z", ["Η"] = "H", ["Θ"] = "8",
["Ι"] = "I", ["Κ"] = "K", ["Λ"] = "L", ["Μ"] = "M", ["Ν"] = "N", ["Ξ"] = "3", ["Ο"] = "O", ["Π"] = "P",
["Ρ"] = "R", ["Σ"] = "S", ["Τ"] = "T", ["Υ"] = "Y", ["Φ"] = "F", ["Χ"] = "X", ["Ψ"] = "PS", ["Ω"] = "W",
["Ά"] = "A", ["Έ"] = "E", ["Ί"] = "I", ["Ό"] = "O", ["Ύ"] = "Y", ["Ή"] = "H", ["Ώ"] = "W", ["Ϊ"] = "I",
["Ϋ"] = "Y",
["α"] = "a", ["β"] = "b", ["γ"] = "g", ["δ"] = "d", ["ε"] = "e", ["ζ"] = "z", ["η"] = "h", ["θ"] = "8",
["ι"] = "i", ["κ"] = "k", ["λ"] = "l", ["μ"] = "m", ["ν"] = "n", ["ξ"] = "3", ["ο"] = "o", ["π"] = "p",
["ρ"] = "r", ["σ"] = "s", ["τ"] = "t", ["υ"] = "y", ["φ"] = "f", ["χ"] = "x", ["ψ"] = "ps", ["ω"] = "w",
["ά"] = "a", ["έ"] = "e", ["ί"] = "i", ["ό"] = "o", ["ύ"] = "y", ["ή"] = "h", ["ώ"] = "w", ["ς"] = "s",
["ϊ"] = "i", ["ΰ"] = "y", ["ϋ"] = "y", ["ΐ"] = "i",
-- Turkish
["Ş"] = "S", ["İ"] = "I", ["Ü"] = "U", ["Ğ"] = "G",
["ş"] = "s", ["ı"] = "i", ["ü"] = "u", ["ğ"] = "g",
-- Russian
["А"] = "A", ["Б"] = "B", ["В"] = "V", ["Г"] = "G", ["Д"] = "D", ["Е"] = "E", ["Ё"] = "YO", ["Ж"] = "ZH",
["З"] = "Z", ["И"] = "I", ["Й"] = "J", ["К"] = "K", ["Л"] = "L", ["М"] = "M", ["Н"] = "N", ["О"] = "O",
["П"] = "P", ["Р"] = "R", ["С"] = "S", ["Т"] = "T", ["У"] = "U", ["Ф"] = "F", ["Х"] = "H", ["Ц"] = "C",
["Ч"] = "CH", ["Ш"] = "SH", ["Щ"] = "SH", ["Ъ"] = "", ["Ы"] = "Y", ["Ь"] = "`", ["Э"] = "E", ["Ю"] = "YU",
["Я"] = "YA",
["а"] = "a", ["б"] = "b", ["в"] = "v", ["г"] = "g", ["д"] = "d", ["е"] = "e", ["ё"] = "yo", ["ж"] = "zh",
["з"] = "z", ["и"] = "i", ["й"] = "j", ["к"] = "k", ["л"] = "l", ["м"] = "m", ["н"] = "n", ["о"] = "o",
["п"] = "p", ["р"] = "r", ["с"] = "s", ["т"] = "t", ["у"] = "u", ["ф"] = "f", ["х"] = "h", ["ц"] = "c",
["ч"] = "ch", ["ш"] = "sh", ["щ"] = "sh", ["ъ"] = "", ["ы"] = "y", ["ь"] = "`", ["э"] = "e", ["ю"] = "yu",
["я"] = "ya",
-- Ukrainian
["Є"] = "YE", ["І"] = "I", ["Ї"] = "YI", ["Ґ"] = "G",
["є"] = "ye", ["і"] = "i", ["ї"] = "yi", ["ґ"] = "g",
-- Czech
["Ď"] = "D", ["Ě"] = "E", ["Ň"] = "N", ["Ř"] = "R", ["Š"] = "S", ["Ť"] = "T", ["Ů"] = "U",
["ď"] = "d", ["ě"] = "e", ["ň"] = "n", ["ř"] = "r", ["š"] = "s", ["ť"] = "t", ["ů"] = "u",
-- Polish
["Ą"] = "A", ["Ć"] = "C", ["Ę"] = "E", ["Ł"] = "L", ["Ń"] = "N", ["Ó"] = "O", ["Ś"] = "S", ["Ź"] = "Z",
["Ż"] = "Z",
["ą"] = "a", ["ć"] = "c", ["ę"] = "e", ["ł"] = "l", ["ń"] = "n", ["ó"] = "o", ["ś"] = "s", ["ź"] = "z",
["ż"] = "z",
-- Latvian
["Ā"] = "A", ["Ē"] = "E", ["Ģ"] = "G", ["Ī"] = "I", ["Ķ"] = "K", ["Ļ"] = "L", ["Ņ"] = "N",
["Š"] = "S", ["Ū"] = "U",
["ā"] = "a", ["ē"] = "e", ["ģ"] = "g", ["ī"] = "i", ["ķ"] = "k", ["ļ"] = "l", ["ņ"] = "n",
["š"] = "s", ["ū"] = "u",
-- Czech and Latvian
["Č"] = "C", ["Ž"] = "Z",
["č"] = "c", ["ž"] = "z"
}
local slugify = function(str)
for k, _ in pairs(charmap) do
str = str:gsub(tostring(k), charmap[k])
end
return str
end
return slugify

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Some files were not shown because too many files have changed in this diff Show More