Added spears, added music credits (I forgot to)
This commit is contained in:
parent
6e82de5d1f
commit
275921d758
12
credits.md
12
credits.md
@ -38,3 +38,15 @@ Tools used:
|
||||
* for creative mode building
|
||||
* [Audacity](https://www.audacityteam.org/)
|
||||
* for recording and editing sound effect
|
||||
|
||||
External Mods:
|
||||
|
||||
* [Spears](https://content.minetest.net/packages/Echoes91/spears)
|
||||
* For spear functionality
|
||||
* [MPD](https://content.minetest.net/packages/orwell/mpd/)
|
||||
* Background music
|
||||
|
||||
Music:
|
||||
|
||||
* [Kevin Hartnell - Cells](http://kevinhartnell.com/)
|
||||
* Music
|
||||
|
@ -1,3 +1,3 @@
|
||||
give_initial_stuff = true
|
||||
initial_stuff = mtr_weapons:sharp_stick
|
||||
initial_stuff = spears:spear_sharp
|
||||
time_speed = 0
|
||||
|
@ -5,7 +5,7 @@ label[7,0.75;What do you want to do?]
|
||||
button[8.0,1.5;3,0.5;form;MAKE ROCK]
|
||||
label[7.0,2.5;Use 5 pebbles to make a rock!]
|
||||
button[8.0,3.0;3,0.5;sharpen;SHARPEN]
|
||||
label[7.90,4.0;Sharpen your stick!]
|
||||
label[7.90,4.0;Sharpen your spear with a stick!]
|
||||
image[0.5,0.25;4.5,4.5;anvil_pic.png]
|
||||
background[0,0;14,5;brick_background.png]
|
||||
button[13,0.2;0.5,0.5;back;<]
|
||||
|
@ -1,17 +1,39 @@
|
||||
formspec_version[4]
|
||||
|
||||
size[13.5,5]
|
||||
position[0.5,0.5]
|
||||
label[7,0.9;What do you want to buy/sell?]
|
||||
button[5.5,1.5;3,0.5;bdirt;BUY (3g)]
|
||||
button[10.5,1.5;3,0.5;sdirt;SELL (1g)]
|
||||
button[5.5,2.5;3,0.5;bpebble;BUY (10g)]
|
||||
button[10.5,2.5;3,0.5;spebble;SELL (5g)]
|
||||
button[5.5,3.5;3,0.5;bstick;BUY (5g)]
|
||||
button[10.5,3.5;3,0.5;sstick;SELL (3g)]
|
||||
image[0.5,0.25;4.5,4.5;gold_pic.png]
|
||||
|
||||
background[0,0;14,5;brick_background.png]
|
||||
button[13,0.2;0.5,0.5;back;<]
|
||||
|
||||
label[7,0.9;What do you want to buy/sell?]
|
||||
|
||||
button[5.5,1.25;1.5,0.5;bdirt;BUY (3g)]
|
||||
button[7.0,1.25;1.5,0.5;bdirt16;BUY x16 (48g)]
|
||||
button[5.5,1.75;1.5,0.5;bdirt64;BUY x64 (192g)]
|
||||
|
||||
button[10.5,1.25;1.5,0.5;sdirt;SELL (1g)]
|
||||
button[12.0,1.25;1.5,0.5;sdirt16;SELL (16g)]
|
||||
button[10.5,1.75;1.5,0.5;sdirt64;SELL (64g)]
|
||||
|
||||
button[5.5,2.25;1.5,0.5;bpebble;BUY (10g)]
|
||||
button[7.0,2.25;1.5,0.5;bpebble16;BUY x16 (160g)]
|
||||
button[5.5,2.75;1.5,0.5;bpebble64;BUY x64 (640g)]
|
||||
|
||||
button[10.5,2.25;1.5,0.5;spebble;SELL (5g)]
|
||||
button[12.0,2.25;1.5,0.5;spebble16;SELL x16 (80g)]
|
||||
button[10.5,2.75;1.5,0.5;spebble64;SELL x64 (320g)]
|
||||
|
||||
button[5.5,3.25;1.5,0.5;bstick;BUY (5g)]
|
||||
button[7.0,3.25;1.5,0.5;bstick16;BUY x16 (80g)]
|
||||
button[5.5,3.75;1.5,0.5;bstick64;BUY x64 (320g)]
|
||||
|
||||
button[10.5,3.25;1.5,0.5;sstick;SELL (3g)]
|
||||
button[12.0,3.25;1.5,0.5;sstick x16;SELL x16 (48g)]
|
||||
button[10.5,3.75;1.5,0.5;sstick x64;SELL x64 (192g)]
|
||||
|
||||
image[0.5,0.25;4.5,4.5;gold_pic.png]
|
||||
image[8.9,1.15;1.1,3.1;white_tranlu.png]
|
||||
image[8.95,1.2;1.0,1.0;dirt_pic.png]
|
||||
image[8.7,2;1.5,1.5;pebble_pic.png]
|
||||
image[8.95,3.2;1.0,1.0;stick_pic.png]
|
||||
button[13,0.2;0.5,0.5;back;<]
|
||||
|
39
mods/mtr_shop/buy_sell_shop.spec.new
Normal file
39
mods/mtr_shop/buy_sell_shop.spec.new
Normal file
@ -0,0 +1,39 @@
|
||||
formspec_version[4]
|
||||
|
||||
size[13.5,5]
|
||||
position[0.5,0.5]
|
||||
|
||||
background[0,0 ;14,5 ;brick_background.png]
|
||||
button[13,0.2 ;0.5,0.5 ;back;<]
|
||||
|
||||
label[7,0.9;What do you want to buy/sell?]
|
||||
|
||||
button[5.5,1.25 ;1.5,0.5 ;bdirt ;BUY (3g)]
|
||||
button[7.0,1.25 ;1.5,0.5 ;bdirt16 ;BUY x16 (48g)]
|
||||
button[5.5,1.75 ;1.5,0.5 ;bdirt64 ;BUY x64 (192g)]
|
||||
|
||||
button[10.5,1.25 ;1.5,0.5 ;sdirt ;SELL (1g)]
|
||||
button[12.0,1.25 ;1.5,0.5 ;sdirt16 ;SELL (16g)]
|
||||
button[10.5,1.75 ;1.5,0.5 ;sdirt64 ;SELL (64g)]
|
||||
|
||||
button[5.5,2.25 ;1.5,0.5 ;bpebble ;BUY (10g)]
|
||||
button[7.0,2.25 ;1.5,0.5 ;bpebble16 ;BUY x16 (160g)]
|
||||
button[5.5,2.75 ;1.5,0.5 ;bpebble64 ;BUY x64 (640g)]
|
||||
|
||||
button[10.5,2.25 ;1.5,0.5 ;spebble ;SELL (5g)]
|
||||
button[12.0,2.25 ;1.5,0.5 ;spebble16 ;SELL x16 (80g)]
|
||||
button[10.5,2.75 ;1.5,0.5 ;spebble64 ;SELL x64 (320g)]
|
||||
|
||||
button[5.5,3.25 ;1.5,0.5 ;bstick ;BUY (5g)]
|
||||
button[7.0,3.25 ;1.5,0.5 ;bstick16 ;BUY x16 (80g)]
|
||||
button[5.5,3.75 ;1.5,0.5 ;bstick64 ;BUY x64 (320g)]
|
||||
|
||||
button[10.5,3.25 ;1.5,0.5 ;sstick ;SELL (3g)]
|
||||
button[12.0,3.25 ;1.5,0.5 ;sstick x16 ;SELL x16 (48g)]
|
||||
button[10.5,3.75 ;1.5,0.5 ;sstick x64 ;SELL x64 (192g)]
|
||||
|
||||
image[0.5,0.25 ;4.5,4.5 ;gold_pic.png]
|
||||
image[8.9,1.15 ;1.1,3.1 ;white_tranlu.png]
|
||||
image[8.95,1.2 ;1.0,1.0 ;dirt_pic.png]
|
||||
image[8.7,2 ;1.5,1.5 ;pebble_pic.png]
|
||||
image[8.95,3.2 ;1.0,1.0 ;stick_pic.png]
|
17
mods/mtr_shop/buy_sell_shop.spec.old
Normal file
17
mods/mtr_shop/buy_sell_shop.spec.old
Normal file
@ -0,0 +1,17 @@
|
||||
formspec_version[4]
|
||||
size[13.5,5]
|
||||
position[0.5,0.5]
|
||||
label[7,0.9;What do you want to buy/sell?]
|
||||
button[5.5,1.5;3,0.5;bdirt;BUY (3g)]
|
||||
button[10.5,1.5;3,0.5;sdirt;SELL (1g)]
|
||||
button[5.5,2.5;3,0.5;bpebble;BUY (10g)]
|
||||
button[10.5,2.5;3,0.5;spebble;SELL (5g)]
|
||||
button[5.5,3.5;3,0.5;bstick;BUY (5g)]
|
||||
button[10.5,3.5;3,0.5;sstick;SELL (3g)]
|
||||
image[0.5,0.25;4.5,4.5;gold_pic.png]
|
||||
background[0,0;14,5;brick_background.png]
|
||||
image[8.9,1.15;1.1,3.1;white_tranlu.png]
|
||||
image[8.95,1.2;1.0,1.0;dirt_pic.png]
|
||||
image[8.7,2;1.5,1.5;pebble_pic.png]
|
||||
image[8.95,3.2;1.0,1.0;stick_pic.png]
|
||||
button[13,0.2;0.5,0.5;back;<]
|
@ -13,115 +13,199 @@ minetest.register_node("mtr_shop:shopkeeper", {
|
||||
tiles = { {name = "colors_a6a549.png"}, {name = "colors_e0d968.png"}, {name = "colors_796a44.png"}, {name = "colors_5f4617.png"}, {name = "colors_48280d.png"}, {name = "colors_483712.png"} },
|
||||
visual_scale = (1.0/16.0),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-6 / 16, -6 / 16, -6 / 16, 6 / 16, 22 / 16, 6 / 16},
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.show_formspec(clicker:get_player_name(), "mtr_shop:opening_shop", get_formspec("opening_shop.spec"))
|
||||
end,
|
||||
groups = {plastic = 5},
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-6 / 16, -6 / 16, -6 / 16, 6 / 16, 22 / 16, 6 / 16},
|
||||
},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
minetest.show_formspec(clicker:get_player_name(), "mtr_shop:opening_shop", get_formspec("opening_shop.spec"))
|
||||
end,
|
||||
groups = {plastic = 5},
|
||||
})
|
||||
|
||||
-- main shop formspec
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "mtr_shop:opening_shop" then
|
||||
return
|
||||
end
|
||||
if formname ~= "mtr_shop:opening_shop" then
|
||||
return
|
||||
end
|
||||
|
||||
if fields.exit then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:exit", "") -- TODO: figure out how to close formspecs programatically
|
||||
end
|
||||
|
||||
if fields.shop then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:buy_sell_shop", get_formspec("buy_sell_shop.spec"))
|
||||
end
|
||||
|
||||
-- TODO: warn or stop players who try to use the anvil without any items that can be transformed at the anvil
|
||||
if fields.anvil and mtr_currency.subtract_credits(10, player:get_player_name()) then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:anvil", get_formspec("anvil.spec"))
|
||||
end
|
||||
if fields.exit then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:exit", "") -- TODO: figure out how to close formspecs programatically
|
||||
end
|
||||
|
||||
if fields.shop then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:buy_sell_shop", get_formspec("buy_sell_shop.spec"))
|
||||
end
|
||||
|
||||
-- TODO: warn or stop players who try to use the anvil without any items that can be transformed at the anvil
|
||||
if fields.anvil and mtr_currency.subtract_credits(10, player:get_player_name()) then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:anvil", get_formspec("anvil.spec"))
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "mtr_shop:buy_sell_shop" then
|
||||
return
|
||||
end
|
||||
if formname ~= "mtr_shop:buy_sell_shop" then
|
||||
return
|
||||
end
|
||||
|
||||
if fields.back then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:opening_shop", get_formspec("opening_shop.spec"))
|
||||
end
|
||||
|
||||
local playerInvRef = minetest.get_inventory({type="player", name=player:get_player_name()})
|
||||
|
||||
-- buy dirt
|
||||
if fields.back then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:opening_shop", get_formspec("opening_shop.spec"))
|
||||
end
|
||||
|
||||
local playerInvRef = minetest.get_inventory({type="player", name=player:get_player_name()})
|
||||
|
||||
-- buy dirt
|
||||
if fields.bdirt then
|
||||
if (playerInvRef:room_for_item("main", ItemStack("mtr_resources:dirt_pieces")) and mtr_currency.subtract_credits(3, player:get_player_name())) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_resources:dirt_pieces"))
|
||||
end
|
||||
end
|
||||
|
||||
-- buy dirt x16
|
||||
if fields.bdirt16 then
|
||||
if (playerInvRef:room_for_item("main", ItemStack("mtr_resources:dirt_pieces 16")) and mtr_currency.subtract_credits(3*16, player:get_player_name())) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_resources:dirt_pieces 16"))
|
||||
end
|
||||
end
|
||||
-- buy dirt x64
|
||||
if fields.bdirt64 then
|
||||
if (playerInvRef:room_for_item("main", ItemStack("mtr_resources:dirt_pieces 64")) and mtr_currency.subtract_credits(3*64, player:get_player_name())) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_resources:dirt_pieces 64"))
|
||||
end
|
||||
end
|
||||
|
||||
-- sell dirt
|
||||
if fields.sdirt then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_resources:dirt_pieces")) and playerInvRef:remove_item("main", ItemStack("mtr_resources:dirt_pieces"))) then
|
||||
mtr_currency.add_credits(1, player:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- sell dirt x16
|
||||
if fields.sdirt16 then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_resources:dirt_pieces 16")) and playerInvRef:remove_item("main", ItemStack("mtr_resources:dirt_pieces 16"))) then
|
||||
mtr_currency.add_credits(1*16, player:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
-- sell dirt x64
|
||||
if fields.sdirt64 then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_resources:dirt_pieces 64")) and playerInvRef:remove_item("main", ItemStack("mtr_resources:dirt_pieces 64"))) then
|
||||
mtr_currency.add_credits(1*64, player:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
-- buy pebble
|
||||
if fields.bpebble then
|
||||
if (playerInvRef:room_for_item("main", ItemStack("mtr_weapons:pebble")) and mtr_currency.subtract_credits(10, player:get_player_name())) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_weapons:pebble"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- buy pebble x16
|
||||
if fields.bpebble16 then
|
||||
if (playerInvRef:room_for_item("main", ItemStack("mtr_weapons:pebble 16")) and mtr_currency.subtract_credits(10*16, player:get_player_name())) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_weapons:pebble 16"))
|
||||
end
|
||||
end
|
||||
|
||||
-- buy pebble x64
|
||||
if fields.bpebble64 then
|
||||
if (playerInvRef:room_for_item("main", ItemStack("mtr_weapons:pebble 16")) and mtr_currency.subtract_credits(10*16, player:get_player_name())) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_weapons:pebble 16"))
|
||||
end
|
||||
end
|
||||
|
||||
-- sell pebble
|
||||
if fields.spebble then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_weapons:pebble")) and playerInvRef:remove_item("main", ItemStack("mtr_weapons:pebble"))) then
|
||||
mtr_currency.add_credits(5, player:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- sell pebble x16
|
||||
if fields.spebble16 then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_weapons:pebble 16")) and playerInvRef:remove_item("main", ItemStack("mtr_weapons:pebble 16"))) then
|
||||
mtr_currency.add_credits(5*16, player:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
-- sell pebble x64
|
||||
if fields.spebble64 then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_weapons:pebble 64")) and playerInvRef:remove_item("main", ItemStack("mtr_weapons:pebble 64"))) then
|
||||
mtr_currency.add_credits(5*64, player:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
-- buy stick
|
||||
if fields.bstick then
|
||||
if (playerInvRef:room_for_item("main", ItemStack("mtr_resources:stick")) and mtr_currency.subtract_credits(5, player:get_player_name())) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_resources:stick"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- buy stick x16
|
||||
if fields.bstick16 then
|
||||
if (playerInvRef:room_for_item("main", ItemStack("mtr_resources:stick 16")) and mtr_currency.subtract_credits(5*16, player:get_player_name())) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_resources:stick 16"))
|
||||
end
|
||||
end
|
||||
|
||||
-- buy stick x64
|
||||
if fields.bstick64 then
|
||||
if (playerInvRef:room_for_item("main", ItemStack("mtr_resources:stick 64")) and mtr_currency.subtract_credits(5*64, player:get_player_name())) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_resources:stick 64"))
|
||||
end
|
||||
end
|
||||
|
||||
-- sell stick
|
||||
if fields.sstick then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_resources:stick")) and playerInvRef:remove_item("main", ItemStack("mtr_resources:stick"))) then
|
||||
mtr_currency.add_credits(3, player:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- sell stick x16
|
||||
if fields.sstick16 then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_resources:stick 16")) and playerInvRef:remove_item("main", ItemStack("mtr_resources:stick 16"))) then
|
||||
mtr_currency.add_credits(3*16, player:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
-- sell stick x64
|
||||
if fields.sstick64 then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_resources:stick 64")) and playerInvRef:remove_item("main", ItemStack("mtr_resources:stick 64"))) then
|
||||
mtr_currency.add_credits(3*64, player:get_player_name())
|
||||
end
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "mtr_shop:anvil" then
|
||||
return
|
||||
end
|
||||
if formname ~= "mtr_shop:anvil" then
|
||||
return
|
||||
end
|
||||
|
||||
if fields.back then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:opening_shop", get_formspec("opening_shop.spec"))
|
||||
end
|
||||
|
||||
local playerInvRef = minetest.get_inventory({type="player", name=player:get_player_name()})
|
||||
|
||||
-- make rock
|
||||
if fields.back then
|
||||
minetest.show_formspec(player:get_player_name(), "mtr_shop:opening_shop", get_formspec("opening_shop.spec"))
|
||||
end
|
||||
|
||||
local playerInvRef = minetest.get_inventory({type="player", name=player:get_player_name()})
|
||||
|
||||
-- make rock
|
||||
if fields.form then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_weapons:pebble 5")) and playerInvRef:room_for_item("main", ItemStack("mtr_weapons:rock")) and playerInvRef:remove_item("main", ItemStack("mtr_weapons:pebble 5"))) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_weapons:rock"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- sharpen stick
|
||||
if fields.sharpen then
|
||||
if (playerInvRef:contains_item("main", ItemStack("mtr_resources:stick")) and playerInvRef:room_for_item("main", ItemStack("mtr_weapons:sharp_stick")) and playerInvRef:remove_item("main", ItemStack("mtr_resources:stick"))) then
|
||||
playerInvRef:add_item("main", ItemStack("mtr_weapons:sharp_stick"))
|
||||
if (playerInvRef:contains_item("main", ItemStack("spears:spear_sharp")) and playerInvRef:room_for_item("main", ItemStack("spears:spear_sharp")) and playerInvRef:remove_item("main", ItemStack("mtr_resources:stick"))) then
|
||||
playerInvRef:remove_item("main", ItemStack("spears:spear_sharp"))
|
||||
playerInvRef:remove_item("main", ItemStack("mtr_resources:stick"))
|
||||
playerInvRef:add_item("main", ItemStack("spears:spear_sharp"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end)
|
||||
|
1
mods/spears
Submodule
1
mods/spears
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 32d0ee567aed58fca8729a334b3f1d2f33fed9f7
|
Loading…
x
Reference in New Issue
Block a user