Added more furniture and a new task.

master
Nathan Salapat 2022-01-16 13:01:40 -06:00
parent aea0c291bd
commit ced50d5c81
13 changed files with 298 additions and 44 deletions

View File

@ -6,7 +6,6 @@ artwork.register_full('a15', 'Travelers')
artwork.register_full('a17', 'View of Rhenen')
artwork.register_full('a19', 'Vanitas Still Life')
artwork.register_landscape('a2', 'Mountains')
artwork.register_landscape('a8', 'River Landscape')
artwork.register_landscape('a10', 'Wild Strawberries')
@ -15,7 +14,6 @@ artwork.register_landscape('a16', 'River Scene')
artwork.register_landscape('a18', 'Dunes by the Sea')
artwork.register_landscape('a20', 'Herdsmen Tending Cattle')
artwork.register_portrait('a3', 'Lady in White')
artwork.register_portrait('a4', 'Cupid with Wheel of Time')
artwork.register_portrait('a5', 'Portrait of a Man')
@ -23,13 +21,13 @@ artwork.register_portrait('a6', 'Giuliano de\' Medici')
artwork.register_portrait('a7', 'Ginevra de\' Benci')
artwork.register_portrait('a11', 'Tulips')
artwork.register_full('b4', 'Hawk in Flight')
artwork.register_full('b5', 'Tractor')
artwork.register_full('b6', 'Goldfish')
artwork.register_full('b11', 'Waterlilly')
artwork.register_full('b12', 'Firework')
artwork.register_landscape('b2', 'Cardinal')
artwork.register_landscape('b3', 'Robin')
artwork.register_landscape('b7', 'Goldfish')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -10,10 +10,10 @@ local lectern_formspec =
function furniture.lectern_edit_sign(title, content)
local formspec =
lectern_formspec..
"field[0.5,1;7.5,0;title;"..esc("Title:")..";"..esc(title) .. "]" ..
"label[0.25,1.1;Body:]"..
"textarea[0.5,1.5;10.6,5.5;content;;"..esc(content).."]" ..
"button_exit[4,6.5;4,1;save;Save]"
'field[0.5,1;7.5,0;title;'..esc('Title:')..';'..esc(title) .. ']' ..
'label[0.25,1.1;Body:]'..
'textarea[0.5,1.5;10.6,5.5;content;;'..esc(content)..']' ..
'button_exit[4,6.5;4,1;save;Save]'
return formspec
end
@ -21,30 +21,30 @@ function furniture.lectern_view_sign(title, content)
local formspec =
lectern_formspec..
'hypertext[0,0;11,1;;<center><style color=black size=40>'..esc(title)..'</style></center>]'..
"textarea[0.5,1.5;10.6,6.5;;;"..esc(content).."]"
'textarea[0.5,1.5;10.6,6.5;;;'..esc(content)..']'
return formspec
end
local news_stand_formspec =
'size[11,8]'..
'no_prepend[]'..
'bgcolor[#080808BB;true]'
--'background[0,0;11,8;furniture_lectern_formspec.png]'
'formspec_version[3]'..
'size[11,10]'..
'bgcolor[#080808BB;true]'..
'background[0,0;11,10;furniture_news_stand_fs_bg.png]'
function furniture.news_stand_edit(title, content)
local formspec =
news_stand_formspec..
"field[0.5,1;7.5,0;title;"..esc("Title:")..";"..esc(title) .. "]" ..
"label[0.25,1.1;Body:]"..
"textarea[0.5,1.5;10.6,5.5;content;;"..esc(content).."]" ..
"button_exit[4,6.5;4,1;save;Save]"
'field[0.5,.5;4,.6;title;'..esc('Title:')..';'..esc(title) .. ']' ..
'label[0.5,1.25;Body:]'..
'textarea[0.5,1.5;10,7.5;content;;'..esc(content)..']' ..
'button_exit[3.5,9;4,1;save;Save]'
return formspec
end
function furniture.news_stand_view(title, content)
local formspec =
news_stand_formspec..
'hypertext[0,0;11,1;;<center><style color=black size=40>'..esc(title)..'</style></center>]'..
"textarea[0.5,1.5;10.6,6.5;;;"..esc(content).."]"
'hypertext[0,.2;11,1;;<center><style color=black size=40>~~'..title..'~~</style></center>]'..
'textarea[.25,1.5;10.5,8.5;;;'..content..']'
return formspec
end

View File

@ -0,0 +1,191 @@
# Blender v2.93.5 OBJ File: 'furniture.blend'
# www.blender.org
o Sofa_Cube.060
v -1.375000 -0.437500 0.500000
v -1.375000 -0.062500 0.500000
v -1.375000 -0.437500 -0.437500
v -1.375000 -0.062500 -0.437500
v 0.375000 -0.437500 0.500000
v 0.375000 -0.062500 0.500000
v 0.375000 -0.437500 -0.437500
v 0.375000 -0.062500 -0.437500
v 0.437500 -0.437500 0.312500
v 0.437500 -0.500000 0.312500
v 0.437500 -0.437500 0.437500
v 0.437500 -0.500000 0.437500
v 0.312500 -0.437500 0.312500
v 0.312500 -0.500000 0.312500
v 0.312500 -0.437500 0.437500
v 0.312500 -0.500000 0.437500
v 0.375000 0.437500 0.312500
v 0.375000 -0.062500 0.312500
v 0.375000 0.437500 0.500000
v 0.375000 -0.062500 0.500000
v -1.375000 0.437500 0.312500
v -1.375000 -0.062500 0.312500
v -1.375000 0.437500 0.500000
v -1.375000 -0.062500 0.500000
v -1.500000 -0.437500 0.500000
v -1.500000 0.187500 0.500000
v -1.500000 -0.437500 -0.500000
v -1.500000 0.187500 -0.500000
v -1.375000 -0.437500 0.500000
v -1.375000 0.187500 0.500000
v -1.375000 -0.437500 -0.500000
v -1.375000 0.187500 -0.500000
v 0.500000 0.187500 -0.500000
v 0.500000 -0.437500 -0.500000
v 0.500000 0.187500 0.500000
v 0.500000 -0.437500 0.500000
v 0.375000 0.187500 -0.500000
v 0.375000 -0.437500 -0.500000
v 0.375000 0.187500 0.500000
v 0.375000 -0.437500 0.500000
v 0.437500 -0.437500 -0.375000
v 0.437500 -0.500000 -0.375000
v 0.437500 -0.437500 -0.250000
v 0.437500 -0.500000 -0.250000
v 0.312500 -0.437500 -0.375000
v 0.312500 -0.500000 -0.375000
v 0.312500 -0.437500 -0.250000
v 0.312500 -0.500000 -0.250000
v -1.312500 -0.437500 0.312500
v -1.312500 -0.500000 0.312500
v -1.312500 -0.437500 0.437500
v -1.312500 -0.500000 0.437500
v -1.437500 -0.437500 0.312500
v -1.437500 -0.500000 0.312500
v -1.437500 -0.437500 0.437500
v -1.437500 -0.500000 0.437500
v -1.312500 -0.437500 -0.375000
v -1.312500 -0.500000 -0.375000
v -1.312500 -0.437500 -0.250000
v -1.312500 -0.500000 -0.250000
v -1.437500 -0.437500 -0.375000
v -1.437500 -0.500000 -0.375000
v -1.437500 -0.437500 -0.250000
v -1.437500 -0.500000 -0.250000
vt 0.695312 0.312500
vt 0.539062 0.312500
vt 0.539062 0.281250
vt 0.695312 0.281250
vt 0.484375 0.000000
vt 0.484375 0.093750
vt 0.046875 0.093750
vt 0.046875 0.000000
vt 0.695312 0.562500
vt 0.539062 0.562500
vt 0.046875 0.421875
vt 0.046875 0.328125
vt 0.484375 0.328125
vt 0.484375 0.421875
vt 0.539062 0.031250
vt 0.695312 0.031250
vt 0.539062 0.000000
vt 0.695312 0.000000
vt 0.703125 0.281250
vt 0.859375 0.281250
vt 0.859375 0.312500
vt 0.703125 0.312500
vt 0.507812 0.281250
vt 0.507812 0.031250
vt 0.703125 0.031250
vt 0.859375 0.031250
vt 0.859375 0.562500
vt 0.703125 0.562500
vt 0.703125 -0.000000
vt 0.859375 -0.000000
vt 0.890625 0.281250
vt 0.890625 0.031250
vt 0.484375 0.429688
vt 0.484375 0.554688
vt 0.046875 0.554688
vt 0.046875 0.429688
vt 0.046875 0.726562
vt 0.046875 0.601562
vt 0.484375 0.601562
vt 0.484375 0.726562
vt 0.531250 0.601562
vt 0.531250 0.726562
vt 0.000000 0.726562
vt 0.000000 0.601562
vt 0.031250 0.984375
vt 0.031250 1.000000
vt -0.000000 1.000000
vt -0.000000 0.984375
vt 0.125000 0.984375
vt 0.125000 1.000000
vt 0.093750 1.000000
vt 0.093750 0.984375
vt 0.062500 1.000000
vt 0.062500 0.984375
vt 0.093750 0.960938
vt 0.093750 0.976562
vt 0.062500 0.976562
vt 0.062500 0.960938
vt 0.125000 0.960938
vt 0.125000 0.976562
vt 0.031250 0.976562
vt 0.031250 0.960938
vt -0.000000 0.976562
vt -0.000000 0.960938
vt 0.062500 0.937500
vt 0.062500 0.953125
vt 0.031250 0.953125
vt 0.031250 0.937500
vt -0.000000 0.953125
vt -0.000000 0.937500
vt 0.125000 0.937500
vt 0.125000 0.953125
vt 0.093750 0.953125
vt 0.093750 0.937500
vt 0.062500 0.914062
vt 0.062500 0.929688
vt 0.031250 0.929688
vt 0.031250 0.914062
vt 0.093750 0.914062
vt 0.093750 0.929688
vt 0.000000 0.929688
vt 0.000000 0.914062
vt 0.125000 0.914062
vt 0.125000 0.929688
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 1.0000 0.0000
s off
f 38/1/1 37/2/1 33/3/1 34/4/1
f 3/5/1 4/6/1 8/7/1 7/8/1
f 40/9/2 39/10/2 37/2/2 38/1/2
f 5/11/3 6/12/3 2/13/3 1/14/3
f 34/4/4 33/3/4 35/15/4 36/16/4
f 8/7/5 4/6/5 2/13/5 6/12/5
f 36/16/3 35/15/3 39/17/3 40/18/3
f 27/19/1 28/20/1 32/21/1 31/22/1
f 33/3/5 37/23/5 39/24/5 35/15/5
f 25/25/2 26/26/2 28/20/2 27/19/2
f 31/22/4 32/21/4 30/27/4 29/28/4
f 29/29/3 30/30/3 26/26/3 25/25/3
f 32/31/5 28/20/5 26/26/5 30/32/5
f 22/33/1 21/34/1 17/35/1 18/36/1
f 20/37/3 19/38/3 23/39/3 24/40/3
f 17/35/5 21/34/5 23/39/5 19/38/5
f 21/41/2 22/42/2 24/40/2 23/39/2
f 18/43/4 17/44/4 19/38/4 20/37/4
f 16/45/2 15/46/2 13/47/2 14/48/2
f 14/49/1 13/50/1 9/51/1 10/52/1
f 10/52/4 9/51/4 11/53/4 12/54/4
f 12/54/3 11/53/3 15/46/3 16/45/3
f 46/55/1 45/56/1 41/57/1 42/58/1
f 48/59/2 47/60/2 45/56/2 46/55/2
f 42/58/4 41/57/4 43/61/4 44/62/4
f 44/62/3 43/61/3 47/63/3 48/64/3
f 56/65/2 55/66/2 53/67/2 54/68/2
f 54/68/1 53/67/1 49/69/1 50/70/1
f 50/71/4 49/72/4 51/73/4 52/74/4
f 52/74/3 51/73/3 55/66/3 56/65/3
f 62/75/1 61/76/1 57/77/1 58/78/1
f 64/79/2 63/80/2 61/76/2 62/75/2
f 58/78/4 57/77/4 59/81/4 60/82/4
f 60/83/3 59/84/3 63/80/3 64/79/3

View File

@ -31,7 +31,7 @@ minetest.register_node('furniture:news_stand', {
meta:set_string('formspec', furniture.news_stand_edit(title, content))
else
if content ~= '' then
meta:set_string('formspec', furniture.news_stand_view(title, content))
minetest.show_formspec(name, 'furniture:news', furniture.news_stand_view(title, content))
else
minetest.show_formspec(name, 'furniture:news', news_formspec)
end
@ -44,31 +44,27 @@ minetest.register_node('furniture:news_stand', {
meta:set_string('infotext', fields.title)
meta:set_string('title', fields.title)
meta:set_string('content', fields.content)
minetest.log("action", (player_name or "").." wrote \""..fields.title.."\" to lectern at "..minetest.pos_to_string(pos))
minetest.log("action", (player_name or "").." wrote \""..fields.title.."\" to news stand at "..minetest.pos_to_string(pos))
end
end,
on_punch = function(pos, node, puncher)
minetest.show_formspec(puncher:get_player_name(), 'furniture:new', news_formspec)
end,
})
local news = {
'1/7/22',
'Updated textures/UVs on a bunch of the furniture models.',
'',
'1/8/22',
'Added news stand.',
'',
'',}
local news = [[
1/7/22
Updated textures/UVs on a bunch of the furniture models.
for i = 1, #news do
news[i] = minetest.formspec_escape(news[i])
end
news.txt = table.concat(news, ',')
1/8/22
Added news stand. Fixed some rare bugs with the map buttons.
1/10/22
Added placeblock command. Places a block at your feet. Thanks to PoohBear to letting me know we needed such a feature.
]]
news_formspec =
'formspec_version[3]'..
'size[11,10]'..
'no_prepend[]'..
'bgcolor[#080808BB;true]'..
'hypertext[0,.2;12,1;;<center><style color=black size=40>~~News~~</style></center>]'..
'textlist[2,1.5;11,6;msg;'..news.txt..';0;true]'
'background[0,0;11,10;furniture_news_stand_fs_bg.png]'..
'hypertext[0,.2;11,1;;<center><style color=black size=40>~~News~~</style></center>]'..
'textarea[.25,1.5;10.5,8.5;;;'..news..']'

View File

@ -232,7 +232,7 @@ for i in ipairs(dye_table) do
overlay_tiles = {'', {name = 'furniture_chair_waitingroom_cushion.png', color = hex}},
paramtype = 'light',
paramtype2 = 'colorfacedir',
palette = 'furniture_stain_palette.png',
palette = 'furniture_frame_palette.png',
selection_box = {
type = 'fixed',
fixed = {
@ -248,6 +248,35 @@ for i in ipairs(dye_table) do
}
},
groups = {breakable=1},
on_rightclick = furniture.right_click,
on_punch = furniture.punch
})
minetest.register_node('furniture:Sofa_'..name, {
description = desc..' Sofa',
drawtype = 'mesh',
mesh = 'furniture_sofa.obj',
tiles = {'furniture_sofa.png^[multiply:'..hex},
paramtype = 'light',
paramtype2 = 'colorfacedir',
palette = 'furniture_frame_palette.png',
selection_box = {
type = 'fixed',
fixed = {
{-.375, -.5, -.375, .375, 0, .4375},
{-.375, 0, .3125, .375, .5, .4375}
}
},
collision_box = {
type = 'fixed',
fixed = {
{-.375, -.5, -.375, .375, 0, .375},
{-.375, 0, .375, .375, .5, .5}
}
},
groups = {breakable=1},
on_rightclick = furniture.right_click,
on_punch = furniture.punch
})
minetest.register_node('furniture:cushion_half_'..name, {
@ -263,7 +292,6 @@ for i in ipairs(dye_table) do
})
minetest.register_node('furniture:cushion_full_'..name, {
_doc_items_crafting = 'This is crafted in the Sewing Station.',
description = desc..' Full Cushion',
tiles = {'furniture_cushion.png^[multiply:'..hex},
groups = {breakable=1, bouncy=50, fall_damage_add_percent=-50},

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -90,6 +90,7 @@ minetest.register_node('lobby:button_0', {
local player_name = sender:get_player_name()
if fields ['claim'] then
if lobby.take_xp(sender, 15) then
minetest.show_formspec(player_name, 'lobby:get_started', lobby.getting_started)
meta:set_string('owner', player_name)
local pos_string = random_pos()
local pos = minetest.string_to_pos(pos_string)
@ -98,7 +99,6 @@ minetest.register_node('lobby:button_0', {
if not minetest.is_protected(pos, sender) and run then
minetest.load_area(pos)
meta:set_string('pos', pos_string)
--print(dump(pos))
worldedit.cube(pos, 5, 1, 5, 'color:grey_blocks', false)
minetest.set_node(pos, {name = 'lights:block_4'})
run = false
@ -197,7 +197,7 @@ minetest.register_node('lobby:button_1', {
local game_data = lobby.savedata.data[map_id]
local game_pos = game_data['level_pos']
if minetest.check_player_privs(puncher:get_player_name(), { creative = true }) and puncher:get_player_control().sneak then
puncher:set_pos({x=game_pos.x+(math.random(-2,2)),y=game_pos.y,z=game_pos.z+(math.random(-2,2))})
puncher:set_pos({x=game_pos.x+(math.random(-2,2)),y=game_pos.y+2,z=game_pos.z+(math.random(-2,2))})
minetest.chat_send_player(puncher:get_player_name(), 'Taking you to the level. Return to the lobby with /spawn')
else
local needed_players = tonumber(meta:get_string('player_count')) or 8

View File

@ -24,6 +24,21 @@ minetest.register_chatcommand('msg', {
end
})
minetest.register_chatcommand('placeblock', {
description = 'Places a block where player stands.',
privs = {creative=true},
func = function(name)
local user = minetest.get_player_by_name(name)
local pos = user:get_pos()
if minetest.is_protected(pos, name) then
minetest.chat_send_player(name, 'Try again. You can\'t run this in a protected area.')
else
minetest.set_node(pos, {name='color:white'})
minetest.chat_send_player(name, 'Placed starter block for you. Have fun building.')
end
end
})
minetest.register_chatcommand('lobby', {
description = 'Travel back to the lobby when a ghost.',
func = function(name)
@ -141,3 +156,10 @@ minetest.register_chatcommand('checkxp', {
end
end
})
minetest.register_chatcommand('level_help', {
description = 'Show level building help screen.',
func = function(name)
minetest.show_formspec(name, 'lobby:get_started', lobby.getting_started)
end
})

View File

@ -17,7 +17,6 @@ local page_2 = "Tasks\n"..
"We won't get into detail about every task here, because there are more being added all the time, and you'll "..
"have an oppertunity to try some different tasks out upon completing this short corse."
local page_3 = "Voting\n"..
"Voting is one way to try and defeat the traitor. When a corpse is reported all players on a level will teleport "..
"to that level's spawn location, and have a chance to discuss who they think the traitor is, and then vote. "..
@ -89,3 +88,23 @@ function lobby.voting_formspec(survivors)
'button_exit[4.5,5;3,1;go;Discuss]'
return formspec
end
local text_body = [[
Welcome to the exciting world of level building! You are only limited by your imagination, and to some degree the nodes available. (Send a message to Admin with any requests.)
There are a few things you should know, they'll make your building experiences better/faster.
When you claim a button it will be given a random map location, and a platform will be placed there. If you want to enter a different location you can, but no new platform will be placed. Starting out as a new builder you won't have worldedit, so you'll need to use the /placeblock chat command. This chat command will place a single block at your feet.
Protect your area(s). Any builders can visit your level once you have it linked to a button, and could place/remove nodes if you don't protect the area. Use /area_pos1 and /area_pos2 in alternate corners. You can always add extra areas or make a new larger area if need be.
After you've built a little something send Admin an letter in the mailbox located outside of the post office and request worldedit, be sure and send some coordinates for your level. You'll likely be granted the privileges within several days.
You view this information at any time by using the /level_help chat command.
]]
lobby.getting_started =
'formspec_version[3]'..
'size[12,10]'..
'textarea[.5,.5;11,8;;;'..text_body..']'..
'button_exit[4,9;4,1;close;Close This Dialog]'

View File

@ -3,7 +3,7 @@ local formspec_good =
'textarea[1,1;5,2;;;Working Fine.]'
local formspec_bad =
'formspec_version[3]'..
'formspec_version[3]'..
'size[10.5,7]'..
'textarea[.5,.5;5,1;;;Shields down!!!\nNew Quantum Coil Needed ASAP.]' ..
'button_exit[3.5,1.5;3,1;gimme;Grab a part request form]'..