Compare commits
46 Commits
4ff9fe733b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| a3846876ec | |||
| 1705722908 | |||
| b62ffd6996 | |||
| 0397a7a911 | |||
| 31df071956 | |||
| 8a28cbfddb | |||
| ce0ca11f31 | |||
| edcfc93db3 | |||
| 88b8e857cb | |||
| dcaa8e5d63 | |||
| ba91a3df1b | |||
| 57d740cf4f | |||
| 343911c1c9 | |||
| d0fc5ca2e5 | |||
| a892365de4 | |||
| 8a08384a6c | |||
| 8f0806b0a4 | |||
| 5f60a72df9 | |||
| 6d67496bd6 | |||
| 02a7044e19 | |||
| adefaaf592 | |||
| 0a0ecf49b4 | |||
| b4b589f864 | |||
| 0a15121fbf | |||
| e41623d029 | |||
| 89c8b55d8d | |||
| 6036182625 | |||
| 09f544e34c | |||
| f385686b3d | |||
| 1622e5cd6d | |||
| cbeab46431 | |||
| 73e63d452f | |||
| 7eae59a8ca | |||
| 0a7f3829f3 | |||
|
|
a17a49bbfd | ||
|
|
275ef8f3a1 | ||
|
|
a9a5a9bcb5 | ||
|
|
60fec2cb4f | ||
| 49cf5f16f9 | |||
|
|
5233a3aa6f | ||
| f62082d9c6 | |||
|
|
27d36b0e8b | ||
|
|
e281b06031 | ||
|
|
f739bcab43 | ||
|
|
e32fed7ebc | ||
|
|
d97c031888 |
@@ -0,0 +1,8 @@
|
||||
The MIT License (MIT)
|
||||
Copyright © 2023 Kacper Kostka & Looki2000 (Łukasz Brzostowski)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
BIN
menu/theme.ogg
Normal file
@@ -33,7 +33,7 @@ minetest.register_node("amogus_blocks:tv", {
|
||||
{items = {'amogus_items:pcb'}, rarity = 1},
|
||||
|
||||
},
|
||||
}, groups = {stone=3},
|
||||
}, groups = {crumbly = 3},
|
||||
})
|
||||
|
||||
minetest.register_node("amogus_blocks:bricks", {
|
||||
@@ -72,6 +72,12 @@ minetest.register_node("amogus_blocks:black_bricks", {
|
||||
|
||||
drop = 'amogus_blocks:black_bricks',
|
||||
})
|
||||
minetest.register_node("amogus_blocks:purple_bricks", {
|
||||
description = "purple Bricks",
|
||||
tiles = {"Bricks_purple.png"}, groups = {stone=3},
|
||||
|
||||
drop = 'amogus_blocks:purple_bricks',
|
||||
})
|
||||
minetest.register_node("amogus_blocks:planks", {
|
||||
description = "Planks",
|
||||
tiles = {"Planks.png"},
|
||||
@@ -137,6 +143,29 @@ minetest.register_node("amogus_blocks:transparent", {
|
||||
groups = {cracky=3,oddly_breakable_by_hand=3},
|
||||
})
|
||||
|
||||
---- grasses and dirts (blocks) ----
|
||||
|
||||
minetest.register_node("amogus_blocks:dirt", {
|
||||
description = "Dirt",
|
||||
tiles = {"d.png"},
|
||||
groups = {crumbly = 3},
|
||||
|
||||
drop = {
|
||||
max_items = 2,
|
||||
items = {
|
||||
{
|
||||
items = {"amogus_blocks:dirt"}, -- always drop one dirt
|
||||
rarity = 1,
|
||||
},
|
||||
{
|
||||
items = {"amogus_items:rock"},
|
||||
rarity = 3,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node("amogus_blocks:grass", {
|
||||
description = "Grass",
|
||||
tiles = {
|
||||
@@ -152,15 +181,16 @@ minetest.register_node("amogus_blocks:grass", {
|
||||
max_items = 2,
|
||||
items = {
|
||||
{
|
||||
items = {'amogus_blocks:dirt 5'},
|
||||
rarity = 3,
|
||||
items = {'amogus_blocks:dirt'},
|
||||
rarity = 1,
|
||||
},
|
||||
{
|
||||
items = {'amogus_items:rock'},
|
||||
rarity = 2,
|
||||
rarity = 3,
|
||||
},
|
||||
},
|
||||
}, groups = {crumbly=3},
|
||||
},
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
|
||||
minetest.register_node("amogus_blocks:grass_green", {
|
||||
@@ -179,22 +209,24 @@ minetest.register_node("amogus_blocks:grass_green", {
|
||||
items = {
|
||||
{
|
||||
items = {'amogus_blocks:dirt'},
|
||||
rarity = 3,
|
||||
rarity = 1,
|
||||
},
|
||||
{
|
||||
items = {'amogus_items:rock'},
|
||||
rarity = 2,
|
||||
rarity = 3,
|
||||
},
|
||||
},
|
||||
}, groups = {crumbly=3},
|
||||
})
|
||||
|
||||
---------------------------------
|
||||
|
||||
|
||||
minetest.register_node("amogus_blocks:wood", {
|
||||
description = "Wood",
|
||||
tiles = {"wood.png"},
|
||||
|
||||
drop = 'amogus_items:wooden_plank',
|
||||
drop = 'amogus_blocks:wood',
|
||||
groups = {choppy = 3, flammable = 3, wood = 1},
|
||||
})
|
||||
|
||||
@@ -267,29 +299,10 @@ minetest.register_node("amogus_blocks:water_flowing", {
|
||||
groups = {water = 3, liquid = 3, not_in_creative_inventory = 1, cools_lava = 1}
|
||||
})
|
||||
|
||||
minetest.register_node("amogus_blocks:dirt", {
|
||||
description = "Dirt",
|
||||
tiles = {"d.png"},
|
||||
groups = {crumbly = 3},
|
||||
|
||||
drop = {
|
||||
max_items = 2,
|
||||
items = {
|
||||
{
|
||||
items = {'amogus_blocks:dirt'},
|
||||
rarity = 3,
|
||||
},
|
||||
{
|
||||
items = {'amogus_items:rock'},
|
||||
rarity = 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
})minetest.register_node("amogus_blocks:sand", {
|
||||
minetest.register_node("amogus_blocks:sand", {
|
||||
description = "Sand",
|
||||
tiles = {"sand.png"},
|
||||
groups = {crumbly = 3},
|
||||
groups = {crumbly = 3, falling_node = 1},
|
||||
})
|
||||
|
||||
minetest.register_node("amogus_blocks:stone", {
|
||||
@@ -326,25 +339,56 @@ minetest.register_node("amogus_blocks:iron_ore", {
|
||||
--sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
local loot = {
|
||||
"amogus_items:amogus",
|
||||
"amogus_items:sprite",
|
||||
"amogus_items:coke",
|
||||
"amogus_items:fanta",
|
||||
"amogus_items:tomato",
|
||||
"amogus_items:lightsaber_blue",
|
||||
"amogus_items:lightsaber_red",
|
||||
"amogus_items:lightsaber_green",
|
||||
-- item name, probability (larger number = larger probability relative to numbers of other items)
|
||||
local lucky_loot = {
|
||||
{"amogus_items:dynamite" , 3.0},
|
||||
{"amogus_items:amogus" , 4.0},
|
||||
{"amogus_items:coke" , 2.0},
|
||||
{"amogus_items:fanta" , 2.0},
|
||||
{"amogus_items:tomato" , 2.0},
|
||||
{"amogus_items:sugar" , 4.0},
|
||||
{"amogus_items:water" , 4.0},
|
||||
{"amogus_items:sprite" , 2.0},
|
||||
{"amogus_items:lightsaber_blue" , 1.0},
|
||||
{"amogus_items:lightsaber_red" , 1.0},
|
||||
{"amogus_items:lightsaber_green" , 1.0},
|
||||
}
|
||||
|
||||
-- sum of all numbers in second column
|
||||
local lucky_loot_propability_sum = 0
|
||||
|
||||
local last_lucky_loot_propability_sum = 0
|
||||
|
||||
for _, item in ipairs(lucky_loot) do
|
||||
last_lucky_loot_propability_sum = lucky_loot_propability_sum
|
||||
lucky_loot_propability_sum = lucky_loot_propability_sum + item[2]
|
||||
|
||||
item[2] = last_lucky_loot_propability_sum
|
||||
|
||||
-- create new column element
|
||||
item[3] = lucky_loot_propability_sum
|
||||
end
|
||||
|
||||
|
||||
minetest.register_node("amogus_blocks:lucky_block", {
|
||||
description = "Lucky Block",
|
||||
tiles = {"luckyblock.png"},
|
||||
|
||||
groups = {cracky = 3},
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local item = loot[math.random(#loot)]
|
||||
minetest.add_item(pos, item)
|
||||
|
||||
local random_number = math.random() * lucky_loot_propability_sum
|
||||
|
||||
for _, item in ipairs(lucky_loot) do
|
||||
-- if random_number is in range of current item (inclusive start, exclusive end)
|
||||
if random_number >= item[2] and random_number < item[3] then
|
||||
minetest.add_item(pos, item[1])
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
--local item = lucky_loot[math.random(#lucky_loot)]
|
||||
--minetest.add_item(pos, item)
|
||||
minetest.add_particlespawner({
|
||||
amount = 100,
|
||||
time = 0.1,
|
||||
@@ -530,3 +574,18 @@ minetest.register_node("amogus_blocks:golden_block", {
|
||||
|
||||
groups = {stone=2},
|
||||
})
|
||||
|
||||
minetest.register_node("amogus_blocks:grass_yellow", {
|
||||
description = "Yellow Grass",
|
||||
tiles = {
|
||||
"grass_yellow_top.png",
|
||||
"d.png",
|
||||
"grass_yellow_side.png",
|
||||
"grass_yellow_side.png",
|
||||
"grass_yellow_side.png",
|
||||
"grass_yellow_side.png"
|
||||
},
|
||||
|
||||
groups = {crumbly=3,soil=1},
|
||||
drop = 'amogus_blocks:dirt',
|
||||
})
|
||||
1
mods/amogus_blocks/mod.conf
Normal file
@@ -0,0 +1 @@
|
||||
name = amogus_blocks
|
||||
BIN
mods/amogus_blocks/textures/Bricks_purple.png
Normal file
|
After Width: | Height: | Size: 314 B |
BIN
mods/amogus_blocks/textures/grass_yellow_side.png
Normal file
|
After Width: | Height: | Size: 308 B |
BIN
mods/amogus_blocks/textures/grass_yellow_top.png
Normal file
|
After Width: | Height: | Size: 238 B |
@@ -3,16 +3,16 @@ minetest.register_craft({
|
||||
output = "amogus_items:goldenplumba",
|
||||
recipe = {
|
||||
{"amogus_items:gold_ingot", "amogus_items:gold_ingot", "amogus_items:gold_ingot"},
|
||||
{"amogus_items:gold_ingot", "amogus_items:wooden_plank", "amogus_items:gold_ingot"},
|
||||
{"amogus_items:gold_ingot", "amogus_items:wooden_plank", "amogus_items:gold_ingot"},
|
||||
{"amogus_items:gold_ingot", "amogus_blocks:planks", "amogus_items:gold_ingot"},
|
||||
{"amogus_items:gold_ingot", "amogus_blocks:planks", "amogus_items:gold_ingot"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "amogus_items:susplumba",
|
||||
recipe = {
|
||||
{"amogus_items:sussium_ingot", "amogus_items:sussium_ingot", "amogus_items:sussium_ingot"},
|
||||
{"amogus_items:sussium_ingot", "amogus_items:wooden_plank", "amogus_items:sussium_ingot"},
|
||||
{"amogus_items:sussium_ingot", "amogus_items:wooden_plank", "amogus_items:sussium_ingot"},
|
||||
{"amogus_items:sussium_ingot", "amogus_blocks:planks", "amogus_items:sussium_ingot"},
|
||||
{"amogus_items:sussium_ingot", "amogus_blocks:planks", "amogus_items:sussium_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -33,11 +33,11 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "amogus_blocks:planks",
|
||||
output = "amogus_blocks:planks 4",
|
||||
recipe = {
|
||||
{"amogus_items:wooden_plank", "amogus_items:wooden_plank", "amogus_items:wooden_plank"},
|
||||
{"amogus_items:wooden_plank", "amogus_items:wooden_plank", "amogus_items:wooden_plank"},
|
||||
{"amogus_items:wooden_plank", "amogus_items:wooden_plank", "amogus_items:wooden_plank"},
|
||||
{"", "", ""},
|
||||
{"", "amogus_blocks:wood", ""},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -45,8 +45,8 @@ minetest.register_craft({
|
||||
output = "amogus_items:sussiumshovel",
|
||||
recipe = {
|
||||
{"", "amogus_blocks:sussium_block", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -54,8 +54,8 @@ minetest.register_craft({
|
||||
output = "amogus_items:goldenshovel",
|
||||
recipe = {
|
||||
{"", "amogus_items:gold_ingot", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -63,8 +63,8 @@ minetest.register_craft({
|
||||
output = "amogus_items:stoneshovel",
|
||||
recipe = {
|
||||
{"", "amogus_items:rock", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -73,16 +73,16 @@ minetest.register_craft({
|
||||
output = "amogus_items:stoneaxe",
|
||||
recipe = {
|
||||
{"", "amogus_items:rock", "amogus_items:rock"},
|
||||
{"", "amogus_items:wooden_plank", "amogus_items:rock"},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_blocks:planks", "amogus_items:rock"},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "amogus_items:stoneaxe",
|
||||
recipe = {
|
||||
{"amogus_items:rock", "amogus_items:rock", ""},
|
||||
{"amogus_items:rock", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"amogus_items:rock", "amogus_blocks:planks", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -90,16 +90,16 @@ minetest.register_craft({
|
||||
output = "amogus_items:goldenaxe",
|
||||
recipe = {
|
||||
{"amogus_items:gold_ingot", "amogus_items:gold_ingot", ""},
|
||||
{"amogus_items:gold_ingot", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"amogus_items:gold_ingot", "amogus_blocks:planks", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "amogus_items:goldenaxe",
|
||||
recipe = {
|
||||
{"", "amogus_items:gold_ingot", "amogus_items:gold_ingot"},
|
||||
{"", "amogus_items:wooden_plank", "amogus_items:gold_ingot"},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_blocks:planks", "amogus_items:gold_ingot"},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -107,8 +107,8 @@ minetest.register_craft({
|
||||
output = "amogus_items:sussiumaxe",
|
||||
recipe = {
|
||||
{"", "amogus_blocks:sussium_block", "amogus_blocks:sussium_block"},
|
||||
{"", "amogus_items:wooden_plank", "amogus_blocks:sussium_block"},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_blocks:planks", "amogus_blocks:sussium_block"},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -116,8 +116,8 @@ minetest.register_craft({
|
||||
output = "amogus_items:sussiumaxe",
|
||||
recipe = {
|
||||
{"amogus_blocks:sussium_block", "amogus_blocks:sussium_block", ""},
|
||||
{"amogus_blocks:sussium_block", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"amogus_blocks:sussium_block", "amogus_blocks:planks", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -157,8 +157,8 @@ minetest.register_craft({
|
||||
output = "amogus_items:stonepickaxe",
|
||||
recipe = {
|
||||
{"amogus_items:rock", "amogus_items:rock", "amogus_items:rock"},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -166,8 +166,8 @@ minetest.register_craft({
|
||||
output = "amogus_items:goldenpickaxe",
|
||||
recipe = {
|
||||
{"amogus_items:gold_ingot", "amogus_items:gold_ingot", "amogus_items:gold_ingot"},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -175,8 +175,8 @@ minetest.register_craft({
|
||||
output = "amogus_items:sussiumpickaxe",
|
||||
recipe = {
|
||||
{"amogus_blocks:sussium_block", "amogus_blocks:sussium_block", "amogus_blocks:sussium_block"},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
{"", "amogus_blocks:planks", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -186,7 +186,7 @@ minetest.register_craft({
|
||||
recipe = {
|
||||
{"amogus_blocks:obsusian", "amogus_blocks:obsusian", "amogus_blocks:obsusian"},
|
||||
{"amogus_blocks:obsusian", "amogus_blocks:obsusian", "amogus_blocks:obsusian"},
|
||||
{"", "amogus_items:wooden_plank", ""},
|
||||
{"amogus_blocks:obsusian", "amogus_blocks:planks", "amogus_blocks:obsusian"},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -257,7 +257,7 @@ minetest.register_craft({
|
||||
recipe = {
|
||||
{"amogus_items:capacitor", "amogus_items:capacitor", "amogus_items:capacitor"},
|
||||
{"amogus_items:capacitor", "amogus_items:pcb", "amogus_items:capacitor"},
|
||||
{"amogus_blocks:obsusian", "amogus_blocks:obsusian", "amogus_blocks:obsusian"},
|
||||
{"amogus_blocks:obsusian", "amogus_items:iron_ingot", "amogus_blocks:obsusian"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
@@ -273,16 +273,63 @@ minetest.register_craft({
|
||||
output = "carts:powerrail 16",
|
||||
recipe = {
|
||||
{"amogus_items:iron_ingot", "amogus_items:pcb", "amogus_items:iron_ingot"},
|
||||
{"amogus_items:iron_ingot", "amogus_items:wooden_plank", "amogus_items:iron_ingot"},
|
||||
{"amogus_items:iron_ingot", "amogus_items:wooden_plank", "amogus_items:iron_ingot"},
|
||||
{"amogus_items:iron_ingot", "amogus_blocks:planks", "amogus_items:iron_ingot"},
|
||||
{"amogus_items:iron_ingot", "amogus_blocks:planks", "amogus_items:iron_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "carts:rail 16",
|
||||
recipe = {
|
||||
{"amogus_items:iron_ingot", "amogus_items:wooden_plank", "amogus_items:iron_ingot"},
|
||||
{"amogus_items:iron_ingot", "amogus_items:wooden_plank", "amogus_items:iron_ingot"},
|
||||
{"amogus_items:iron_ingot", "amogus_items:wooden_plank", "amogus_items:iron_ingot"},
|
||||
{"amogus_items:iron_ingot", "amogus_blocks:planks", "amogus_items:iron_ingot"},
|
||||
{"amogus_items:iron_ingot", "amogus_blocks:planks", "amogus_items:iron_ingot"},
|
||||
{"amogus_items:iron_ingot", "amogus_blocks:planks", "amogus_items:iron_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "amogus_items:empty_bucket",
|
||||
recipe = {
|
||||
{"amogus_items:iron_ingot", "", "amogus_items:iron_ingot"},
|
||||
{"", "amogus_items:iron_ingot", ""},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "amogus_blocks:purple_bricks",
|
||||
recipe = {
|
||||
{"", "amogus_blocks:purpleblock", ""},
|
||||
{"", "amogus_blocks:grey_bricks", ""},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "amogus_items:obsusian_sword",
|
||||
recipe = {
|
||||
{"amogus_blocks:obsusian"},
|
||||
{"amogus_blocks:obsusian"},
|
||||
{"amogus_blocks:planks"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "amogus_items:obsusian_shovel",
|
||||
recipe = {
|
||||
{"amogus_blocks:obsusian"},
|
||||
{"amogus_blocks:planks"},
|
||||
{"amogus_blocks:planks"},
|
||||
}
|
||||
})
|
||||
|
||||
-- create recipe for pooper out of PCB and mogus and dirt
|
||||
minetest.register_craft({
|
||||
output = "amogus_items:pooper",
|
||||
recipe = {
|
||||
{"amogus_items:pcb", "amogus_items:mogus", "amogus_items:pcb"},
|
||||
{"amogus_items:pcb", "amogus_blocks:dirt", "amogus_items:pcb"},
|
||||
{"amogus_items:pcb", "amogus_items:pcb", "amogus_items:pcb"},
|
||||
}
|
||||
})
|
||||
1
mods/amogus_craftings/mod.conf
Normal file
@@ -0,0 +1 @@
|
||||
name = amogus_craftings
|
||||
@@ -15,6 +15,11 @@ local entity = {
|
||||
mesh = "amogus_entity.obj",
|
||||
on_rightclick = function(self, clicker)
|
||||
minetest.chat_send_player(clicker:get_player_name(), "WHY ARE YOU SUCH SUSSY BAKA?")
|
||||
-- give player mogus item
|
||||
local inv = clicker:get_inventory()
|
||||
inv:add_item("main", "amogus_items:mogus")
|
||||
-- remove entity
|
||||
self.object:remove()
|
||||
end,
|
||||
|
||||
|
||||
@@ -48,7 +53,6 @@ local entity = {
|
||||
self.min_max_jump_force_diff = self.max_jump_force - self.min_jump_force
|
||||
end,
|
||||
|
||||
|
||||
on_step = function(self, dtime)
|
||||
|
||||
-- play amogus sound randomly
|
||||
@@ -120,14 +124,20 @@ local entity = {
|
||||
pos.z = pos.z + dir_sin
|
||||
|
||||
local bnode = minetest.get_node(pos)
|
||||
if bnode.name == "air" or bnode.name == "amogus_blocks:water_source" or bnode.name == "amogus_blocks:water_flowing" then
|
||||
--if bnode.name == "air" or bnode.name == "amogus_blocks:water_source" or bnode.name == "amogus_blocks:water_flowing" then
|
||||
-- if node is not solid OR is a liquid
|
||||
if minetest.registered_nodes[bnode.name].walkable == false or minetest.registered_nodes[bnode.name].liquidtype ~= "none" then
|
||||
self.block_lastly_in_front = false
|
||||
-- if node next to the entity is a solid block
|
||||
else
|
||||
if self.block_lastly_in_front == false then
|
||||
self.block_lastly_in_front = true
|
||||
local vel = self.object:get_velocity()
|
||||
vel.y = vel.y + (math.random() * self.min_max_jump_force_diff + self.min_jump_force)
|
||||
self.object:set_velocity(vel)
|
||||
-- randomly jump in the next iteration even if theres still a block in front
|
||||
elseif math.random(10) == 1 then
|
||||
self.block_lastly_in_front = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -66,11 +66,11 @@ local entity = {
|
||||
|
||||
player = nil,
|
||||
player_pos = nil,
|
||||
mini_crewmate_pos = nil,
|
||||
crewmate_player_vector = nil,
|
||||
entity_pos = nil,
|
||||
entity_player_vector = nil,
|
||||
distance = nil,
|
||||
current_distance = nil,
|
||||
current_crewmate_player_vector = nil,
|
||||
current_entity_player_vector = nil,
|
||||
|
||||
|
||||
|
||||
@@ -136,30 +136,29 @@ local entity = {
|
||||
self.player = minetest.get_connected_players()[1]
|
||||
|
||||
self.player_pos = self.player:get_pos()
|
||||
self.mini_crewmate_pos = self.object:get_pos()
|
||||
self.crewmate_player_vector = vector.subtract(self.player_pos, self.mini_crewmate_pos)
|
||||
self.distance = vector.length(self.crewmate_player_vector)
|
||||
self.entity_pos = self.object:get_pos()
|
||||
self.entity_player_vector = vector.subtract(self.player_pos, self.entity_pos)
|
||||
self.distance = vector.length(self.entity_player_vector)
|
||||
-- if on multiplayer mode, calculate distance between nearest player and mini crewmate
|
||||
else
|
||||
self.player = minetest.get_connected_players()
|
||||
|
||||
self.distance = nil
|
||||
self.crewmate_player_vector = nil
|
||||
self.entity_player_vector = nil
|
||||
|
||||
self.mini_crewmate_pos = self.object:get_pos()
|
||||
self.entity_pos = self.object:get_pos()
|
||||
|
||||
-- iterate over all players
|
||||
for i = 1, #self.player do
|
||||
minetest.chat_send_all("player " .. i)
|
||||
self.player_pos = self.player[i]:get_pos()
|
||||
--self.crewmate_player_vector = vector.subtract(self.player_pos, self.mini_crewmate_pos)
|
||||
self.current_crewmate_player_vector = vector.subtract(self.player_pos, self.mini_crewmate_pos)
|
||||
self.current_distance = vector.length(self.current_crewmate_player_vector)
|
||||
--self.entity_player_vector = vector.subtract(self.player_pos, self.entity_pos)
|
||||
self.current_entity_player_vector = vector.subtract(self.player_pos, self.entity_pos)
|
||||
self.current_distance = vector.length(self.current_entity_player_vector)
|
||||
|
||||
-- if distance is nil or current_distance is smaller than distance, set distance to current_distance
|
||||
if self.distance == nil or self.current_distance < self.distance then
|
||||
self.distance = self.current_distance
|
||||
self.crewmate_player_vector = self.current_crewmate_player_vector
|
||||
self.entity_player_vector = self.current_entity_player_vector
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -240,10 +239,10 @@ local entity = {
|
||||
-- if mode is 3 (run away) set rotation so mini crewmate is facing either at the player or away from the player depending on situation
|
||||
if self.mode == 3 then
|
||||
-- look away from the player
|
||||
self.object:set_yaw(math.atan2(-self.crewmate_player_vector.z, -self.crewmate_player_vector.x))
|
||||
self.object:set_yaw(math.atan2(-self.entity_player_vector.z, -self.entity_player_vector.x))
|
||||
else
|
||||
-- look at the player
|
||||
self.object:set_yaw(math.atan2(self.crewmate_player_vector.z, self.crewmate_player_vector.x))
|
||||
self.object:set_yaw(math.atan2(self.entity_player_vector.z, self.entity_player_vector.x))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -281,14 +280,20 @@ local entity = {
|
||||
pos.z = pos.z + dir_sin
|
||||
|
||||
local bnode = minetest.get_node(pos)
|
||||
if bnode.name == "air" or bnode.name == "amogus_blocks:water_source" or bnode.name == "amogus_blocks:water_flowing" then
|
||||
--if bnode.name == "air" or bnode.name == "amogus_blocks:water_source" or bnode.name == "amogus_blocks:water_flowing" then
|
||||
-- if node is not solid OR is a liquid
|
||||
if minetest.registered_nodes[bnode.name].walkable == false or minetest.registered_nodes[bnode.name].liquidtype ~= "none" then
|
||||
self.block_lastly_in_front = false
|
||||
-- if node next to the entity is a solid block
|
||||
else
|
||||
if self.block_lastly_in_front == false then
|
||||
self.block_lastly_in_front = true
|
||||
local vel = self.object:get_velocity()
|
||||
vel.y = vel.y + self.jump_force
|
||||
self.object:set_velocity(vel)
|
||||
-- randomly jump in the next iteration even if theres still a block in front
|
||||
elseif math.random(10) == 1 then
|
||||
self.block_lastly_in_front = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
303
mods/amogus_entities/entities/sussy_imposter_entity.lua
Normal file
@@ -0,0 +1,303 @@
|
||||
--local textures_b = {
|
||||
-- "amogus_entity.png",
|
||||
-- "amogus_entity_b.png",
|
||||
-- "amogus_entity_g.png",
|
||||
-- "amogus_entity_br.png"
|
||||
--}
|
||||
|
||||
local entity = {
|
||||
physical = true,
|
||||
collisionbox = {-0.75, 0, -0.75, 0.75, 1.5, 0.75},
|
||||
|
||||
visual = "mesh",
|
||||
visual_size = {x=15, y=15, z=15},
|
||||
|
||||
mesh = "sussy_imposter_entity.obj",
|
||||
textures = {"sussy_imposter_entity.png"},
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
minetest.chat_send_player(clicker:get_player_name(), "YOU MET THE MOST SUS THING IN THE WORLD!")
|
||||
|
||||
amogus_general.play_random_sound(
|
||||
"sus_sound",
|
||||
self.object:get_pos(),
|
||||
1.0, -- gain
|
||||
40, -- max_hear_distance
|
||||
1.0 -- pitch
|
||||
)
|
||||
end,
|
||||
|
||||
-- impostor config --
|
||||
walk_acceleration_speed = 0.08, -- acceleration speed when no panic, no stress
|
||||
run_acceleration_speed = 0.15, -- acceleration speed when chasing player
|
||||
|
||||
rotation_acceleration_speed = 0.5, -- self explainatory
|
||||
|
||||
gravity = 9.81, -- m/s^2
|
||||
|
||||
jump_force = 8, -- self explainatory
|
||||
|
||||
friction = 0.6, -- friction (0.0 - no friction like perfectly smooth ice | 1.0 - full friction and can't even move)
|
||||
rotation_friction = 0.8, -- the same but for rotation
|
||||
|
||||
|
||||
largest_distance_to_find_player = 12, -- largest distance to find player
|
||||
smallest_distance_to_lost_player = 16, -- smallest distance to lost player
|
||||
|
||||
largest_distance_to_hurt_player = 1.5, -- largest distance to hurt player
|
||||
|
||||
--------------------------
|
||||
|
||||
block_lastly_in_front = false,
|
||||
rotation_velocity = 0,
|
||||
rotation_direction = nil,
|
||||
|
||||
sound_pitch = nil,
|
||||
sound_propability = nil,
|
||||
|
||||
-- player detection variables
|
||||
|
||||
player = nil,
|
||||
player_pos = nil,
|
||||
entity_pos = nil,
|
||||
entity_player_vector = nil,
|
||||
distance = nil,
|
||||
current_distance = nil,
|
||||
current_entity_player_vector = nil,
|
||||
|
||||
nearest_player_index = nil,
|
||||
|
||||
|
||||
|
||||
|
||||
mode = 0, -- | 0 - stand still | 1 - walk | 2 - chase
|
||||
|
||||
on_activate = function(self, staticdata)
|
||||
self.object:set_yaw(math.random() * 2 * math.pi)
|
||||
self.rotation_direction = math.random(-1, 1)
|
||||
end,
|
||||
|
||||
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir)
|
||||
amogus_general.play_random_sound(
|
||||
"sus_sound",
|
||||
self.object:get_pos(),
|
||||
1.0, -- gain
|
||||
40, -- max_hear_distance
|
||||
1.5 -- pitch
|
||||
)
|
||||
end,
|
||||
|
||||
on_step = function(self, dtime)
|
||||
|
||||
-- play sus sound randomly with different pitch depending on situation
|
||||
|
||||
if self.mode == 0 or self.mode == 1 then -- stand still or walk
|
||||
self.sound_pitch = 0.8
|
||||
self.sound_propability = 100
|
||||
|
||||
else -- chase (2)
|
||||
self.sound_pitch = 1.2
|
||||
self.sound_propability = 50
|
||||
end
|
||||
|
||||
|
||||
if math.random(self.sound_propability) == 1 then
|
||||
amogus_general.play_random_sound(
|
||||
"sus_sound",
|
||||
self.object:get_pos(),
|
||||
1.0, -- gain
|
||||
40, -- max_hear_distance
|
||||
self.sound_pitch -- pitch
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- if on singpleplayer mode or only one player is connected, calculate distance between player and mini crewmate
|
||||
if minetest.is_singleplayer() or #minetest.get_connected_players() == 1 then
|
||||
-- get first player
|
||||
self.player = minetest.get_connected_players()[1]
|
||||
|
||||
self.player_pos = self.player:get_pos()
|
||||
self.entity_pos = self.object:get_pos()
|
||||
self.entity_player_vector = vector.subtract(self.player_pos, self.entity_pos)
|
||||
self.distance = vector.length(self.entity_player_vector)
|
||||
-- if on multiplayer mode, calculate distance between nearest player and mini crewmate
|
||||
else
|
||||
self.player = minetest.get_connected_players()
|
||||
|
||||
self.distance = nil
|
||||
self.entity_player_vector = nil
|
||||
|
||||
self.nearest_player_index = nil
|
||||
|
||||
self.entity_pos = self.object:get_pos()
|
||||
|
||||
-- iterate over all players
|
||||
for i = 1, #self.player do
|
||||
self.player_pos = self.player[i]:get_pos()
|
||||
--self.entity_player_vector = vector.subtract(self.player_pos, self.entity_pos)
|
||||
self.current_entity_player_vector = vector.subtract(self.player_pos, self.entity_pos)
|
||||
self.current_distance = vector.length(self.current_entity_player_vector)
|
||||
|
||||
-- if distance is nil or current_distance is smaller than distance, set distance to current_distance
|
||||
if self.distance == nil or self.current_distance < self.distance then
|
||||
self.distance = self.current_distance
|
||||
self.entity_player_vector = self.current_entity_player_vector
|
||||
self.nearest_player_index = i
|
||||
end
|
||||
end
|
||||
|
||||
-- get nearest player
|
||||
self.player = self.player[self.nearest_player_index]
|
||||
end
|
||||
|
||||
|
||||
-- if mode is 0 or 1 (stand still or walk) and distance is smaller or equal to largest_distance_to_find_player, set mode to 2 (chase)
|
||||
if (self.mode == 0 or self.mode == 1) and self.distance <= self.largest_distance_to_find_player then
|
||||
self.mode = 2
|
||||
-- elseif mode is 2 (chase)
|
||||
elseif self.mode == 2 then
|
||||
-- if distance is greater or equal to smallest_distance_to_lost_player, set mode to 0 (stand still)
|
||||
if self.distance >= self.smallest_distance_to_lost_player then
|
||||
self.mode = 0
|
||||
-- else if distance is smaller or equal to largest_distance_to_hurt_player, hurt player
|
||||
elseif self.distance <= self.largest_distance_to_hurt_player then
|
||||
if math.random(10) == 1 then
|
||||
self.player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 5},
|
||||
}, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- if if not performing an action related to the player
|
||||
if self.mode ~= 2 then
|
||||
|
||||
-- make mini crewmate sometimes stand still and sometimes walk
|
||||
if math.random(100) == 1 then
|
||||
if self.mode == 0 then
|
||||
self.mode = 1
|
||||
else
|
||||
self.mode = 0
|
||||
end
|
||||
end
|
||||
|
||||
-- some chance of chaning rotation_direction to random value
|
||||
if math.random(10) == 1 then
|
||||
--self.rotation_direction = math.random(-1, 1)
|
||||
local rand = math.random()
|
||||
|
||||
if rand < 0.2 then
|
||||
self.rotation_direction = 1
|
||||
elseif rand < 0.4 then
|
||||
self.rotation_direction = -1
|
||||
else
|
||||
self.rotation_direction = 0
|
||||
end
|
||||
end
|
||||
|
||||
-- update rotation_velocity
|
||||
self.rotation_velocity = self.rotation_velocity + self.rotation_direction * self.rotation_acceleration_speed * dtime
|
||||
|
||||
-- update rotation
|
||||
self.object:set_yaw(self.object:get_yaw() + self.rotation_velocity * dtime)
|
||||
|
||||
-- apply rotation_friction
|
||||
self.rotation_velocity = self.rotation_velocity * (1 - self.rotation_friction * dtime)
|
||||
|
||||
else -- else performing an action related to the player
|
||||
self.rotation_velocity = 0;
|
||||
|
||||
-- set rotation so entity is facing at the player
|
||||
self.object:set_yaw(math.atan2(self.entity_player_vector.z, self.entity_player_vector.x))
|
||||
end
|
||||
|
||||
-- perform calculations on direction
|
||||
local dir = self.object:get_yaw()
|
||||
local dir_cos = math.cos(dir)
|
||||
local dir_sin = math.sin(dir)
|
||||
|
||||
-- if not standing still
|
||||
if self.mode ~= 0 then
|
||||
-- make mini crewmate walk or run
|
||||
local vel = self.object:get_velocity()
|
||||
-- if walking
|
||||
if self.mode == 1 then
|
||||
vel.x = vel.x + dir_cos * self.walk_acceleration_speed
|
||||
vel.z = vel.z + dir_sin * self.walk_acceleration_speed
|
||||
else -- chasing (2)
|
||||
vel.x = vel.x + dir_cos * self.run_acceleration_speed
|
||||
vel.z = vel.z + dir_sin * self.run_acceleration_speed
|
||||
end
|
||||
|
||||
self.object:set_velocity(vel)
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- Make it also jump when some block is in front of it
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.x = pos.x + dir_cos
|
||||
pos.z = pos.z + dir_sin
|
||||
|
||||
local bnode = minetest.get_node(pos)
|
||||
--if bnode.name == "air" or bnode.name == "amogus_blocks:water_source" or bnode.name == "amogus_blocks:water_flowing" then
|
||||
-- if node is not solid OR is a liquid
|
||||
if minetest.registered_nodes[bnode.name].walkable == false or minetest.registered_nodes[bnode.name].liquidtype ~= "none" then
|
||||
self.block_lastly_in_front = false
|
||||
-- if node next to the entity is a solid block
|
||||
else
|
||||
if self.block_lastly_in_front == false then
|
||||
self.block_lastly_in_front = true
|
||||
local vel = self.object:get_velocity()
|
||||
vel.y = vel.y + self.jump_force
|
||||
self.object:set_velocity(vel)
|
||||
-- randomly jump in the next iteration even if theres still a block in front
|
||||
elseif math.random(10) == 1 then
|
||||
self.block_lastly_in_front = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
local vel = self.object:get_velocity()
|
||||
|
||||
-- change velocity by gravity
|
||||
vel.y = vel.y - self.gravity * dtime * 2
|
||||
|
||||
-- change velocity by friction
|
||||
vel.x = vel.x * (1 - self.friction * dtime)
|
||||
vel.z = vel.z * (1 - self.friction * dtime)
|
||||
|
||||
self.object:set_velocity(vel)
|
||||
end
|
||||
|
||||
}
|
||||
|
||||
minetest.register_entity("amogus_entities:sussy_imposter", entity)
|
||||
|
||||
-- register spawn egg
|
||||
minetest.register_craftitem("amogus_entities:sussy_imposter_spawn_egg", {
|
||||
description = "Sussy Imposter Spawn Egg",
|
||||
inventory_image = "imposta_egg.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = pointed_thing.above
|
||||
local node = minetest.get_node(pos)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
if not def or not def.buildable_to then
|
||||
return
|
||||
end
|
||||
|
||||
minetest.add_entity(pos, "amogus_entities:sussy_imposter")
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
@@ -1,3 +1,4 @@
|
||||
-- Load the entity's lua file
|
||||
dofile(minetest.get_modpath("amogus_entities") .. "/entities/amogus_entity.lua")
|
||||
dofile(minetest.get_modpath("amogus_entities") .. "/entities/mini_crewmate_entity.lua")
|
||||
dofile(minetest.get_modpath("amogus_entities") .. "/entities/sussy_imposter_entity.lua")
|
||||
1
mods/amogus_entities/mod.conf
Normal file
@@ -0,0 +1 @@
|
||||
name = amogus_entities
|
||||
288
mods/amogus_entities/models/sussy_imposter_entity.obj
Normal file
@@ -0,0 +1,288 @@
|
||||
# Blender 3.4.0
|
||||
# www.blender.org
|
||||
o body
|
||||
v -0.250000 1.312500 -0.250000
|
||||
v -0.375000 1.312500 -0.250000
|
||||
v -0.250000 1.000000 -0.250000
|
||||
v -0.375000 1.000000 -0.250000
|
||||
v -0.375000 1.312500 0.250000
|
||||
v -0.250000 1.312500 0.250000
|
||||
v -0.375000 1.000000 0.250000
|
||||
v -0.250000 1.000000 0.250000
|
||||
v 0.437500 1.125000 -0.312500
|
||||
v 0.250000 1.125000 -0.312500
|
||||
v 0.437500 0.375000 -0.312500
|
||||
v 0.250000 0.375000 -0.312500
|
||||
v 0.250000 1.125000 0.312500
|
||||
v 0.437500 1.125000 0.312500
|
||||
v 0.250000 0.375000 0.312500
|
||||
v 0.437500 0.375000 0.312500
|
||||
v 0.250000 1.437500 -0.375000
|
||||
v -0.250000 1.437500 -0.375000
|
||||
v 0.250000 0.312500 -0.375000
|
||||
v -0.250000 0.312500 -0.375000
|
||||
v -0.250000 1.437500 0.375000
|
||||
v 0.250000 1.437500 0.375000
|
||||
v -0.250000 0.312500 0.375000
|
||||
v 0.250000 0.312500 0.375000
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.000000 1.000000
|
||||
vt 0.125000 1.000000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.000000 0.687500
|
||||
vt 0.500000 1.000000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.000000 0.687500
|
||||
vt 0.125000 0.687500
|
||||
vt 0.500000 0.875000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.125000 0.687500
|
||||
vt 0.500000 0.875000
|
||||
vt -0.000000 0.687500
|
||||
vt 0.500000 1.000000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.500000 0.687500
|
||||
vt 0.125000 1.000000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
s 0
|
||||
f 4/9/1 7/18/1 5/12/1 2/3/1
|
||||
f 3/6/2 4/10/2 2/4/2 1/1/2
|
||||
f 12/26/3 19/33/3 17/31/3 10/24/3
|
||||
f 7/19/4 8/21/4 6/15/4 5/13/4
|
||||
f 6/16/5 1/1/5 2/5/5 5/14/5
|
||||
f 7/20/6 4/11/6 3/7/6 8/21/6
|
||||
f 13/27/3 10/24/3 17/31/3 22/36/3
|
||||
f 11/25/2 12/26/2 10/24/2 9/23/2
|
||||
f 16/30/3 11/25/3 9/23/3 14/28/3
|
||||
f 15/29/4 16/30/4 14/28/4 13/27/4
|
||||
f 14/28/5 9/23/5 10/24/5 13/27/5
|
||||
f 15/29/6 12/26/6 11/25/6 16/30/6
|
||||
f 15/29/3 13/27/3 22/36/3 24/38/3
|
||||
f 19/33/2 20/34/2 18/32/2 17/31/2
|
||||
f 23/37/4 24/38/4 22/36/4 21/35/4
|
||||
f 22/36/5 17/31/5 18/32/5 21/35/5
|
||||
f 23/37/6 20/34/6 19/33/6 24/38/6
|
||||
f 15/29/3 24/38/3 19/33/3 12/26/3
|
||||
f 6/17/1 21/35/1 18/32/1 1/2/1
|
||||
f 8/22/1 23/37/1 21/35/1 6/17/1
|
||||
f 3/8/1 1/2/1 18/32/1 20/34/1
|
||||
f 8/22/1 3/8/1 20/34/1 23/37/1
|
||||
o left_leg
|
||||
v 0.187500 0.437500 0.062500
|
||||
v -0.187500 0.437500 0.062500
|
||||
v 0.187500 -0.000000 0.062500
|
||||
v -0.187500 -0.000000 0.062500
|
||||
v -0.187500 0.437500 0.312500
|
||||
v 0.187500 0.437500 0.312500
|
||||
v -0.187500 -0.000000 0.312500
|
||||
v 0.187500 -0.000000 0.312500
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
s 0
|
||||
f 28/42/7 31/45/7 29/43/7 26/40/7
|
||||
f 27/41/8 28/42/8 26/40/8 25/39/8
|
||||
f 32/46/9 27/41/9 25/39/9 30/44/9
|
||||
f 31/45/10 32/46/10 30/44/10 29/43/10
|
||||
f 30/44/11 25/39/11 26/40/11 29/43/11
|
||||
f 31/45/12 28/42/12 27/41/12 32/46/12
|
||||
o right_leg
|
||||
v 0.187500 0.437500 -0.312500
|
||||
v -0.187500 0.437500 -0.312500
|
||||
v 0.187500 0.000000 -0.312500
|
||||
v -0.187500 0.000000 -0.312500
|
||||
v -0.187500 0.437500 -0.062500
|
||||
v 0.187500 0.437500 -0.062500
|
||||
v -0.187500 0.000000 -0.062500
|
||||
v 0.187500 0.000000 -0.062500
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
s 0
|
||||
f 36/50/13 39/53/13 37/51/13 34/48/13
|
||||
f 35/49/14 36/50/14 34/48/14 33/47/14
|
||||
f 40/54/15 35/49/15 33/47/15 38/52/15
|
||||
f 39/53/16 40/54/16 38/52/16 37/51/16
|
||||
f 38/52/17 33/47/17 34/48/17 37/51/17
|
||||
f 39/53/18 36/50/18 35/49/18 40/54/18
|
||||
o knife
|
||||
v -0.187500 0.750000 -0.531250
|
||||
v -0.562500 0.750000 -0.531250
|
||||
v -0.187500 0.625000 -0.531250
|
||||
v -0.437500 0.625000 -0.531250
|
||||
v -0.562500 0.750000 -0.468750
|
||||
v -0.187500 0.750000 -0.468750
|
||||
v -0.437500 0.625000 -0.468750
|
||||
v -0.187500 0.625000 -0.468750
|
||||
v 0.062500 0.734375 -0.531250
|
||||
v -0.125000 0.734375 -0.531250
|
||||
v 0.062500 0.640625 -0.531250
|
||||
v -0.125000 0.640625 -0.531250
|
||||
v -0.125000 0.734375 -0.468750
|
||||
v 0.062500 0.734375 -0.468750
|
||||
v -0.125000 0.640625 -0.468750
|
||||
v 0.062500 0.640625 -0.468750
|
||||
v -0.125000 0.812500 -0.562500
|
||||
v -0.187500 0.812500 -0.562500
|
||||
v -0.125000 0.562500 -0.562500
|
||||
v -0.187500 0.562500 -0.562500
|
||||
v -0.187500 0.812500 -0.437500
|
||||
v -0.125000 0.812500 -0.437500
|
||||
v -0.187500 0.562500 -0.437500
|
||||
v -0.125000 0.562500 -0.437500
|
||||
v -0.237500 0.625000 -0.531250
|
||||
v -0.287500 0.640625 -0.531250
|
||||
v -0.337500 0.625000 -0.531250
|
||||
v -0.387500 0.640625 -0.531250
|
||||
v -0.237500 0.750000 -0.531250
|
||||
v -0.287500 0.750000 -0.531250
|
||||
v -0.337500 0.750000 -0.531250
|
||||
v -0.387500 0.750000 -0.531250
|
||||
v -0.387500 0.750000 -0.468750
|
||||
v -0.337500 0.750000 -0.468750
|
||||
v -0.287500 0.750000 -0.468750
|
||||
v -0.237500 0.750000 -0.468750
|
||||
v -0.387500 0.640625 -0.468750
|
||||
v -0.337500 0.625000 -0.468750
|
||||
v -0.287500 0.640625 -0.468750
|
||||
v -0.237500 0.625000 -0.468750
|
||||
vn -0.7071 -0.7071 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn 0.2983 -0.9545 -0.0000
|
||||
vn -0.2983 -0.9545 -0.0000
|
||||
vt 0.593750 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.593750 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
vt 0.656250 0.968750
|
||||
s 0
|
||||
usemtl none
|
||||
f 44/60/19 47/64/19 45/61/19 42/57/19
|
||||
f 68/86/20 44/60/20 42/57/20 72/90/20
|
||||
f 52/70/21 59/77/21 57/75/21 50/68/21
|
||||
f 80/98/22 48/65/22 46/63/22 76/94/22
|
||||
f 73/91/23 72/90/23 42/57/23 45/61/23
|
||||
f 80/98/24 65/83/24 43/59/24 48/65/24
|
||||
f 53/71/21 50/68/21 57/75/21 62/80/21
|
||||
f 51/69/20 52/70/20 50/68/20 49/67/20
|
||||
f 56/74/21 51/69/21 49/67/21 54/72/21
|
||||
f 55/73/22 56/74/22 54/72/22 53/71/22
|
||||
f 54/72/23 49/67/23 50/68/23 53/71/23
|
||||
f 55/73/24 52/70/24 51/69/24 56/74/24
|
||||
f 55/73/21 64/82/21 59/77/21 52/70/21
|
||||
f 59/77/20 60/78/20 58/76/20 57/75/20
|
||||
f 55/73/21 53/71/21 62/80/21 64/82/21
|
||||
f 63/81/22 64/82/22 62/80/22 61/79/22
|
||||
f 62/80/23 57/75/23 58/76/23 61/79/23
|
||||
f 63/81/24 60/78/24 59/77/24 64/82/24
|
||||
f 48/66/25 43/58/25 60/78/25 63/81/25
|
||||
f 43/58/25 41/55/25 58/76/25 60/78/25
|
||||
f 46/62/25 61/79/25 58/76/25 41/55/25
|
||||
f 48/66/25 63/81/25 61/79/25 46/62/25
|
||||
f 47/64/26 44/60/26 68/86/26 77/95/26
|
||||
f 77/95/27 68/86/27 67/85/27 78/96/27
|
||||
f 78/96/26 67/85/26 66/84/26 79/97/26
|
||||
f 79/97/27 66/84/27 65/83/27 80/98/27
|
||||
f 46/63/23 41/56/23 69/87/23 76/94/23
|
||||
f 76/94/23 69/87/23 70/88/23 75/93/23
|
||||
f 75/93/23 70/88/23 71/89/23 74/92/23
|
||||
f 74/92/23 71/89/23 72/90/23 73/91/23
|
||||
f 47/64/22 77/95/22 73/91/22 45/61/22
|
||||
f 77/95/22 78/96/22 74/92/22 73/91/22
|
||||
f 78/96/22 79/97/22 75/93/22 74/92/22
|
||||
f 79/97/22 80/98/22 76/94/22 75/93/22
|
||||
f 43/59/20 65/83/20 69/87/20 41/56/20
|
||||
f 65/83/20 66/84/20 70/88/20 69/87/20
|
||||
f 66/84/20 67/85/20 71/89/20 70/88/20
|
||||
f 67/85/20 68/86/20 72/90/20 71/89/20
|
||||
|
Before Width: | Height: | Size: 696 B |
BIN
mods/amogus_entities/textures/imposta_egg.png
Normal file
|
After Width: | Height: | Size: 182 B |
BIN
mods/amogus_entities/textures/sussy_imposter_entity.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
@@ -2,14 +2,29 @@ minetest.register_on_joinplayer(function(player)
|
||||
player:set_physics_override({speed = 2})
|
||||
--player:set_sky({r=0, g=0, b=0}, "plain", {})
|
||||
|
||||
-- set time to midday
|
||||
minetest.set_timeofday(0.5)
|
||||
|
||||
-- play music in loop without position
|
||||
--minetest.sound_play("amogus_incomming", {
|
||||
-- to_player = player:get_player_name(),
|
||||
-- loop = true,
|
||||
-- gain = 1
|
||||
--})
|
||||
if true then
|
||||
minetest.sound_play("amogus_incomming", {
|
||||
to_player = player:get_player_name(),
|
||||
loop = true,
|
||||
gain = 1
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
-- idk what is this crap. it's doing nothing
|
||||
--minetest.register_on_joinplayer(function(player)
|
||||
--
|
||||
--
|
||||
-- player:set_lighting({
|
||||
-- shadows = {intensity = 0.5}
|
||||
-- })
|
||||
--
|
||||
--end)
|
||||
|
||||
amogus_general = { }
|
||||
|
||||
---- SOUNDS CONFIGURATION ----
|
||||
@@ -17,6 +32,7 @@ sounds_config = {
|
||||
-- format: {sound name, number of sounds to ramdomly choose from}
|
||||
-- so for example if sound name is "test" and the number of sounds is 3, file names that will be randomly chosen are: "test1", "test2", "test3"
|
||||
{"amogus_sound", 3},
|
||||
{"sus_sound", 3}
|
||||
}
|
||||
|
||||
|
||||
|
||||
1
mods/amogus_general/mod.conf
Normal file
@@ -0,0 +1 @@
|
||||
name = amogus_general
|
||||
BIN
mods/amogus_general/sounds/sus_sound1.ogg
Normal file
BIN
mods/amogus_general/sounds/sus_sound2.ogg
Normal file
BIN
mods/amogus_general/sounds/sus_sound3.ogg
Normal file
@@ -2,6 +2,10 @@
|
||||
minetest.register_alias("mapgen_stone", "amogus_blocks:stone")
|
||||
minetest.register_alias("mapgen_dirt", "amogus_blocks:dirt")
|
||||
minetest.register_alias("mapgen_water_source", "amogus_blocks:water_source")
|
||||
minetest.register_alias("mapgen_river_water_source", "amogus_blocks:water_source")
|
||||
|
||||
-- I need to register alias of amogus_blocks:water that doesn't even exist in any of the mods to air because Minetest is f****d up and tries to use "water" by default
|
||||
minetest.register_alias("amogus_blocks:water", "air")
|
||||
|
||||
minetest.register_biome({
|
||||
name = "amogus_beach",
|
||||
@@ -11,10 +15,7 @@ minetest.register_biome({
|
||||
depth_filler = 3,
|
||||
node_stone = "amogus_blocks:stone",
|
||||
|
||||
--node_water_top = "amogus_blocks:water",
|
||||
--depth_water_top = 1,
|
||||
node_water = "amogus_blocks:amogus_blocks:water_source",
|
||||
--node_river_water = "amogus_blocks:water",
|
||||
node_water = "amogus_blocks:water_source",
|
||||
|
||||
y_max = 6,
|
||||
y_min = -5,
|
||||
@@ -23,17 +24,13 @@ minetest.register_biome({
|
||||
})
|
||||
minetest.register_biome({
|
||||
name = "amogus_green_biome",
|
||||
--node_dust = "amogus_blocks:stone",
|
||||
node_top = "amogus_blocks:grass_green",
|
||||
depth_top = 1,
|
||||
node_filler = "amogus_blocks:dirt",
|
||||
depth_filler = 1,
|
||||
node_stone = "amogus_blocks:stone",
|
||||
|
||||
--node_water_top = "amogus_blocks:water",
|
||||
--depth_water_top = 1,
|
||||
node_water = "amogus_blocks:amogus_blocks:water_source",
|
||||
--node_river_water = "amogus_blocks:water",
|
||||
node_water = "amogus_blocks:water_source",
|
||||
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
@@ -42,17 +39,13 @@ minetest.register_biome({
|
||||
})
|
||||
minetest.register_biome({
|
||||
name = "amogus_biome",
|
||||
--node_dust = "amogus_blocks:stone",
|
||||
node_top = "amogus_blocks:grass",
|
||||
depth_top = 1,
|
||||
node_filler = "amogus_blocks:dirt",
|
||||
depth_filler = 1,
|
||||
node_stone = "amogus_blocks:stone",
|
||||
|
||||
--node_water_top = "amogus_blocks:water",
|
||||
--depth_water_top = 1,
|
||||
node_water = "amogus_blocks:amogus_blocks:water_source",
|
||||
--node_river_water = "amogus_blocks:water",
|
||||
node_water = "amogus_blocks:water_source",
|
||||
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
@@ -60,6 +53,47 @@ minetest.register_biome({
|
||||
humidity_point = 50,
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "yellow_biome",
|
||||
node_top = "amogus_blocks:grass_yellow",
|
||||
depth_top = 1,
|
||||
node_filler = "amogus_blocks:dirt",
|
||||
depth_filler = 1,
|
||||
node_stone = "amogus_blocks:stone",
|
||||
node_water_top = "amogus_blocks:water_source",
|
||||
node_water = "amogus_blocks:water_source",
|
||||
node_river_water = "amogus_blocks:water_source",
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"amogus_blocks:grass_yellow"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.01,
|
||||
biomes = {"yellow_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/lucky_tree_1.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"amogus_blocks:grass_yellow"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.01,
|
||||
biomes = {"yellow_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/lucky_tree_2.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "amogus_blocks:sussium_ore",
|
||||
@@ -226,7 +260,7 @@ minetest.register_decoration({
|
||||
biomes = {"amogus_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/tree.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/tree.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -238,7 +272,7 @@ minetest.register_decoration({
|
||||
biomes = {"green__biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/green_tree.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/green_tree.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -250,7 +284,7 @@ minetest.register_decoration({
|
||||
biomes = {"green__biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/green_tree_tall.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/green_tree_tall.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -262,7 +296,7 @@ minetest.register_decoration({
|
||||
biomes = {"amogus_biome","green_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/fallen.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/fallen.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -274,7 +308,7 @@ minetest.register_decoration({
|
||||
biomes = {"amogus_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/treer.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/treer.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})minetest.register_decoration({
|
||||
@@ -292,7 +326,7 @@ minetest.register_decoration({
|
||||
biomes = {"amogus_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/minihouse.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/minihouse.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -312,7 +346,7 @@ minetest.register_decoration({
|
||||
biomes = {"amogus_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/amogus_statue.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/amogus_statue.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -332,7 +366,7 @@ minetest.register_decoration({
|
||||
biomes = {"amogus_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/lucky_tree_2.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/lucky_tree_2.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -351,7 +385,7 @@ minetest.register_decoration({
|
||||
biomes = {"amogus_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/lucky_tree_1.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/lucky_tree_1.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -371,7 +405,7 @@ minetest.register_decoration({
|
||||
biomes = {"green_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/lucky_tree_2.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/lucky_tree_2.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -390,7 +424,7 @@ minetest.register_decoration({
|
||||
biomes = {"green_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/lucky_tree_1.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/lucky_tree_1.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -410,7 +444,7 @@ minetest.register_decoration({
|
||||
biomes = {"green_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/STONE1.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/STONE1.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -429,7 +463,7 @@ minetest.register_decoration({
|
||||
biomes = {"green_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/STONE2.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/STONE2.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@@ -448,43 +482,32 @@ minetest.register_decoration({
|
||||
biomes = {"green_biome"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = "/schematics/STONE3.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/STONE3.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
--minetest.register_abm({
|
||||
-- label = "Spawn random entities",
|
||||
-- nodenames = {"group:soil", "group:crumbly", "group:choppy", "group:snappy", "group:cracky"},
|
||||
-- interval = 15,
|
||||
-- chance = 50,
|
||||
-- action = function(pos)
|
||||
-- local r = math.random(1, 500)
|
||||
-- if r <= 50 then
|
||||
-- minetest.add_entity({x = pos.x + math.random(-10, 10),
|
||||
-- y = pos.y + 1,
|
||||
-- z = pos.z + math.random(-10, 10)}, "amogus_entities:amogus")
|
||||
-- minetest.sound_play("amogus_sound", {
|
||||
-- pos = pos,
|
||||
-- gain = 1.0,
|
||||
-- max_hear_distance = 5
|
||||
-- })
|
||||
|
||||
-- end
|
||||
-- end
|
||||
--})
|
||||
amogus_spawn_random_spread = 2
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
--local is_newchunk = true
|
||||
--for , pos in ipairs(minetest.find_nodes_in_area(minp, maxp, "mymod:amogus_spawner")) do
|
||||
--is_new_chunk = false
|
||||
-- break
|
||||
--end
|
||||
--if is_new_chunk then
|
||||
for i = 1, math.random(10, 15) do
|
||||
minetest.add_entity({x = minp.x + math.random(16), y = minp.y + 1, z = minp.z + math.random(16)}, "amogus_entities:amogus")
|
||||
--minetest.sound_play("amogus_sound", { pos = pos,gain = 1.0,max_hear_distance = 5})
|
||||
|
||||
if math.random(0, 100) < 75 then -- percentage chance of spawning group of amoguses in a chunk
|
||||
|
||||
-- spawn random amount of amoguses around random point in chunk
|
||||
local spawn_position = {x = minp.x + math.random(0, 79), y = minp.y + math.random(0, 10), z = minp.z + math.random(0, 79)}
|
||||
|
||||
for i = 1, math.random(5, 15) do
|
||||
math.randomseed(seed + i)
|
||||
|
||||
minetest.add_entity({
|
||||
x = spawn_position.x + math.random(-amogus_spawn_random_spread, amogus_spawn_random_spread),
|
||||
y = spawn_position.y + math.random(-amogus_spawn_random_spread, amogus_spawn_random_spread),
|
||||
z = spawn_position.z + math.random(-amogus_spawn_random_spread, amogus_spawn_random_spread)
|
||||
}, "amogus_entities:amogus")
|
||||
|
||||
end
|
||||
--end
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
|
||||
@@ -497,7 +520,7 @@ minetest.register_decoration({
|
||||
y_min = 1,
|
||||
biomes = {"amogus_beach"},
|
||||
|
||||
schematic = "/schematics/sand_house_1.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/sand_house_1.mts",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
@@ -509,7 +532,7 @@ minetest.register_decoration({
|
||||
y_min = 1,
|
||||
biomes = {"amogus_beach"},
|
||||
|
||||
schematic = "/schematics/sand_house_2.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/sand_house_2.mts",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
@@ -521,7 +544,7 @@ minetest.register_decoration({
|
||||
y_min = 1,
|
||||
biomes = {"amogus_beach"},
|
||||
|
||||
schematic = "/schematics/sand_house_3.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/sand_house_3.mts",
|
||||
})
|
||||
|
||||
|
||||
@@ -534,20 +557,46 @@ minetest.register_decoration({
|
||||
y_min = 1,
|
||||
biomes = {"green_biome"},
|
||||
|
||||
schematic = "/schematics/STATUE_GIANT.mts",
|
||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/STATUE_GIANT.mts",
|
||||
})
|
||||
|
||||
|
||||
-- wtf is this??
|
||||
--minetest.register_on_generated(function(minp, maxp, seed)
|
||||
-- for x = minp.x, maxp.x do
|
||||
-- for y = minp.y, maxp.y do
|
||||
-- for z = minp.z, maxp.z do
|
||||
-- local p = {x=x, y=y, z=z}
|
||||
-- if minetest.get_node(p).name == "default:water_source" then
|
||||
-- minetest.set_node(p, {name="default:water_source", param2=0})
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end)
|
||||
-- DEBUG
|
||||
--imposters_spawned = 0
|
||||
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Spawn Imposter",
|
||||
nodenames = {"air"},
|
||||
neighbors = {"group:stone"},
|
||||
interval = 10,
|
||||
|
||||
-- IMPORTANT !! spawning chance is actualy interpreted as 1 / chance so the bigger the number the lower the actual chance of imposter being spawned
|
||||
chance = 200,
|
||||
|
||||
action = function(pos)
|
||||
-- DEBUG
|
||||
--imposters_spawned = imposters_spawned + 1
|
||||
--minetest.chat_send_all("Imposters spawned: " .. imposters_spawned)
|
||||
|
||||
-- only spawn on solid blocks AND in the dark
|
||||
if minetest.registered_nodes[minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name].walkable and minetest.get_node_light(pos) < 10 then
|
||||
-- do not spawn if there is already an sussy imposter nearby
|
||||
local nearby_entities = minetest.get_objects_inside_radius(pos, 30)
|
||||
local imposter_nearby = false
|
||||
|
||||
for _, entity in pairs(nearby_entities) do
|
||||
if (entity:get_luaentity() and entity:get_luaentity().name or "") == "amogus_entities:sussy_imposter" then
|
||||
imposter_nearby = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if not imposter_nearby then
|
||||
minetest.add_entity(pos, "amogus_entities:sussy_imposter")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
1
mods/amogus_generator/mod.conf
Normal file
@@ -0,0 +1 @@
|
||||
name = amogus_generator
|
||||
@@ -1,6 +1,6 @@
|
||||
minetest.register_item(":", { -- Hand
|
||||
type = "none",
|
||||
wield_image = "coke.png",
|
||||
wield_image = "CRT.png",
|
||||
wield_scale = {x=.3,y=2,z=2.5},
|
||||
range = 5,
|
||||
tool_capabilities = {
|
||||
@@ -12,7 +12,7 @@ minetest.register_item(":", { -- Hand
|
||||
cracky = {times = {[1] = 1.0, [2] = 0.7, [3] = 0.5}, uses = 20, maxlevel = 1},
|
||||
flower = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 10, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy = 1, snappy = 1, cracky=1},
|
||||
damage_groups = {fleshy = 0.5, snappy = 1, cracky=1},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -87,28 +87,30 @@ minetest.register_craftitem("amogus_items:amogus", {
|
||||
})
|
||||
|
||||
minetest.register_craftitem("amogus_items:sprite", {
|
||||
description = "Sprite",
|
||||
description = "Zprite - Soda",
|
||||
inventory_image = "sprite.png",
|
||||
on_use = minetest.item_eat(10),
|
||||
})
|
||||
minetest.register_craftitem("amogus_items:coke", {
|
||||
description = "Coke",
|
||||
description = "koka Cola - Soda",
|
||||
inventory_image = "coke.png",
|
||||
on_use = minetest.item_eat(10),
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
minetest.register_craftitem("amogus_items:fanta", {
|
||||
description = "Fanta",
|
||||
description = "Funta - Soda",
|
||||
inventory_image = "fanta.png",
|
||||
on_use = minetest.item_eat(10),
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
minetest.register_craftitem("amogus_items:tomato", {
|
||||
description = "Tomato",
|
||||
inventory_image = "tomato.png",
|
||||
on_use = minetest.item_eat(10),
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("amogus_items:water", {
|
||||
inventory_image = "water.png",
|
||||
on_use = minetest.item_eat(10),
|
||||
description = "Water",
|
||||
inventory_image = "water_bottle.png",
|
||||
on_use = minetest.item_eat(8),
|
||||
})
|
||||
|
||||
minetest.register_tool("amogus_items:lightsaber_blue", {
|
||||
@@ -120,9 +122,9 @@ minetest.register_tool("amogus_items:lightsaber_blue", {
|
||||
groupcaps={
|
||||
snappy={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=0, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=10},
|
||||
damage_groups = {fleshy=1.01},
|
||||
},
|
||||
sound = {breaks = "amogus_sound"},
|
||||
--sound = {breaks = "amogus_sound"},
|
||||
})
|
||||
|
||||
minetest.register_tool("amogus_items:lightsaber_red", {
|
||||
@@ -134,10 +136,10 @@ minetest.register_tool("amogus_items:lightsaber_red", {
|
||||
groupcaps={
|
||||
snappy={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=0, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=10},
|
||||
damage_groups = {fleshy=1.01},
|
||||
},
|
||||
|
||||
sound = {breaks = "amogus_sound"},
|
||||
--sound = {breaks = "amogus_sound"},
|
||||
})
|
||||
|
||||
minetest.register_tool("amogus_items:lightsaber_green", {
|
||||
@@ -149,27 +151,38 @@ minetest.register_tool("amogus_items:lightsaber_green", {
|
||||
groupcaps={
|
||||
snappy={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=0, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=10},
|
||||
damage_groups = {fleshy=1.01},
|
||||
},
|
||||
sound = {breaks = "amogus_sound"},
|
||||
--sound = {breaks = "amogus_sound"},
|
||||
})
|
||||
|
||||
-- add theese items : goldenpickaxe, wooden plank, gold_ingot, sussium_ingot
|
||||
minetest.register_craftitem("amogus_items:wooden_plank", {
|
||||
description = "Wooden Plank",
|
||||
inventory_image = "wood.png",
|
||||
})
|
||||
minetest.register_craftitem("amogus_items:gold_ingot", {
|
||||
description = "Gold Ingot",
|
||||
inventory_image = "gold_ingot.png",
|
||||
})minetest.register_craftitem("amogus_items:rock", {
|
||||
tool_capabilities = {
|
||||
damage_groups = {fleshy = 1.0},
|
||||
full_punch_interval = 1.5,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("amogus_items:rock", {
|
||||
description = "Rock",
|
||||
inventory_image = "rocks.png",
|
||||
tool_capabilities = {
|
||||
damage_groups = {fleshy = 1.0},
|
||||
full_punch_interval = 1.5,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("amogus_items:sussium_ingot", {
|
||||
description = "Sussium Ingot",
|
||||
inventory_image = "sussium_ingot.png",
|
||||
tool_capabilities = {
|
||||
damage_groups = {fleshy = 1.0},
|
||||
full_punch_interval = 1.5,
|
||||
},
|
||||
})
|
||||
|
||||
--add theese items goldenpickaxe, stonepickaxe and allow them slowly break nodes and destroy it after 30 uses
|
||||
minetest.register_tool("amogus_items:goldenplumba", {
|
||||
description = "Golden Plumba",
|
||||
@@ -186,7 +199,7 @@ minetest.register_tool("amogus_items:goldenplumba", {
|
||||
crumbly = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 10, maxlevel=3},
|
||||
cracky = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 10, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy = 10},
|
||||
damage_groups = {fleshy = 2},
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
@@ -213,7 +226,7 @@ minetest.register_tool("amogus_items:susplumba", {
|
||||
crumbly = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 10, maxlevel=3},
|
||||
cracky = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 10, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy = 10},
|
||||
damage_groups = {fleshy = 2},
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
@@ -234,7 +247,7 @@ minetest.register_tool("amogus_items:stonepickaxe", {
|
||||
groupcaps={
|
||||
stone={times={[1]=2.5, [2]=1.0, [3]=0.50}, uses=30, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
@@ -247,7 +260,7 @@ minetest.register_tool("amogus_items:goldenpickaxe", {
|
||||
groupcaps={
|
||||
stone={times={[1]=1.3, [2]=0.60, [3]=0.40}, uses=30, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
@@ -260,7 +273,7 @@ minetest.register_tool("amogus_items:sussiumpickaxe", {
|
||||
groupcaps={
|
||||
stone={times={[0.5]=2.0,[1]=0.85, [2]=0.40, [3]=0.20}, uses=30, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
@@ -273,7 +286,7 @@ minetest.register_tool("amogus_items:goldenaxe", {
|
||||
groupcaps={
|
||||
choppy={times={[1]=2.50, [2]=1.40, [3]=0.45}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
groups = {flammable = 2}
|
||||
})
|
||||
@@ -286,7 +299,7 @@ minetest.register_tool("amogus_items:stoneaxe", {
|
||||
groupcaps={
|
||||
choppy={times={[1]=2.50, [2]=1.40, [3]=0.80}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
groups = {flammable = 2}
|
||||
})
|
||||
@@ -299,7 +312,7 @@ minetest.register_tool("amogus_items:sussiumaxe", {
|
||||
groupcaps={
|
||||
choppy={times={[1]=0.90, [2]=0.80, [3]=0.35}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
|
||||
groups = {flammable = 2}
|
||||
@@ -314,7 +327,7 @@ minetest.register_tool("amogus_items:stoneshovel", {
|
||||
groupcaps={
|
||||
crumbly={times={[1]=1.5, [2]=1.0, [3]=0.9}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
groups = {flammable = 2}
|
||||
})
|
||||
@@ -329,7 +342,7 @@ minetest.register_tool("amogus_items:goldenshovel", {
|
||||
groupcaps={
|
||||
crumbly={times={[1]=1.0, [2]=0.8, [3]=0.6}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
groups = {flammable = 2}
|
||||
})
|
||||
@@ -342,7 +355,7 @@ minetest.register_tool("amogus_items:sussiumshovel", {
|
||||
groupcaps={
|
||||
crumbly={times={[1]=0.8, [2]=0.6, [3]=0.35}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
groups = {flammable = 2}
|
||||
})
|
||||
@@ -356,10 +369,10 @@ minetest.register_tool("amogus_items:obsussian_hammer", {
|
||||
groupcaps={
|
||||
choppy={times={[1]=0.90, [2]=0.40, [3]=0.06}, uses=30, maxlevel=2},
|
||||
crumbly={times={[1]=0.90, [2]=0.40, [3]=0.06}, uses=30, maxlevel=2},
|
||||
stone={times={[1]=0.90, [2]=0.40, [3]=0.06}, uses=30, maxlevel=1},
|
||||
stone={times={[0.5]=1.4,[1]=0.90, [2]=0.40, [3]=0.06}, uses=30, maxlevel=1},
|
||||
crumbly={times={[1]=0.90, [2]=0.40, [3]=0.06}, uses=30, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
damage_groups = {fleshy=1.0},
|
||||
},
|
||||
|
||||
groups = {flammable = 2}
|
||||
@@ -368,26 +381,47 @@ minetest.register_tool("amogus_items:obsussian_hammer", {
|
||||
minetest.register_craftitem("amogus_items:pcb", {
|
||||
description = "PCB",
|
||||
inventory_image = "PCB.png",
|
||||
tool_capabilities = {
|
||||
damage_groups = {fleshy = 1.0},
|
||||
full_punch_interval = 2.0,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("amogus_items:capacitor", {
|
||||
description = "Capacitor",
|
||||
inventory_image = "capacitor.png",
|
||||
tool_capabilities = {
|
||||
damage_groups = {fleshy = 1.0},
|
||||
full_punch_interval = 2.0,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("amogus_items:sugar", {
|
||||
description = "Sugar",
|
||||
inventory_image = "sugar.png",
|
||||
on_use = minetest.item_eat(20),
|
||||
tool_capabilities = {
|
||||
damage_groups = {fleshy = 1.0},
|
||||
full_punch_interval = 2.0,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("amogus_items:iron_ingot", {
|
||||
description = "Iron Ingot",
|
||||
inventory_image = "iron_ingot.png",
|
||||
tool_capabilities = {
|
||||
damage_groups = {fleshy = 1.0},
|
||||
full_punch_interval = 1.5,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_tool("amogus_items:dynamite", {
|
||||
description = "dynamite",
|
||||
inventory_image = "dynamite.png",
|
||||
tool_capabilities = {
|
||||
damage_groups = {fleshy = 1.0},
|
||||
full_punch_interval = 1.5,
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
@@ -591,6 +625,10 @@ minetest.register_craftitem("amogus_items:empty_bucket", {
|
||||
description = (bucket_names_prefixes[math.random(1, #bucket_names_prefixes)] .. " " .. empty_bucket_names[math.random(1, #empty_bucket_names)]),
|
||||
inventory_image = "empty_bucket.png",
|
||||
groups = {tool = 1},
|
||||
tool_capabilities = {
|
||||
damage_groups = {fleshy = 1.0},
|
||||
full_punch_interval = 1.0,
|
||||
},
|
||||
liquids_pointable = true,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type == "object" then
|
||||
@@ -677,4 +715,95 @@ bucket.register_liquid(
|
||||
{tool = 1, water_bucket = 1}
|
||||
)
|
||||
|
||||
-- end of modifed code from bucket mod from minetest_game
|
||||
minetest.register_tool("amogus_items:obsusian_shovel", {
|
||||
description = "Obsidian Shovel",
|
||||
inventory_image = "obsusian_shovel.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
crumbly = {times = {[1] = 0.80, [2] = 0.40, [3] = 0.20}, uses = 30, maxlevel = 3},
|
||||
},
|
||||
damage_groups = {fleshy = 1.6},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_tool("amogus_items:obsusian_sword", {
|
||||
description = "Obsidian Sword",
|
||||
inventory_image = "obsusian_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
snappy = {times = {[2] = 0.70, [3] = 0.30}, uses = 30, maxlevel = 3},
|
||||
},
|
||||
damage_groups = {fleshy = 16},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
-- create mogus item that can be eaten
|
||||
|
||||
minetest.register_craftitem("amogus_items:mogus", {
|
||||
description = "Mogus",
|
||||
inventory_image = "mogus.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
|
||||
function sraj_dzwiek()
|
||||
--make random sound
|
||||
local sounds = {
|
||||
"shitting1",
|
||||
"shitting2",
|
||||
"shitting3"}
|
||||
local sound = sounds[math.random(1, #sounds)]
|
||||
minetest.sound_play(sound, {pos = pos, gain = 2.0, max_hear_distance = 10})
|
||||
|
||||
end
|
||||
|
||||
minetest.register_node("amogus_items:Poop", {
|
||||
description = "Just Poop",
|
||||
tiles = {"Poop.png"},
|
||||
drop = 'amogus_items:Poop', groups = {falling_node = 1, cracky=3, stone=1},
|
||||
})
|
||||
minetest.register_node("amogus_items:Poop2", {
|
||||
description = "Just Poop",
|
||||
tiles = {"Poop2.png"},
|
||||
drop = 'amogus_items:Poop', groups = {falling_node = 1, cracky=3, stone=1},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("amogus_items:pooper", {
|
||||
description = "Pooper",
|
||||
inventory_image = "SHITitem.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
-- check if pointing at a node
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
-- make a random number between 1 and 10
|
||||
local random_number = math.random(1, 10)
|
||||
if random_number < 5 then
|
||||
local node = minetest.get_node(pointed_thing.above)
|
||||
if node.name == "air" then
|
||||
minetest.add_node(pointed_thing.above, {name="amogus_items:Poop"})
|
||||
minetest.check_for_falling(pointed_thing.above)
|
||||
else
|
||||
minetest.add_node(pointed_thing.under, {name="amogus_items:Poop"})
|
||||
minetest.check_for_falling(pointed_thing.under)
|
||||
end
|
||||
else
|
||||
local node = minetest.get_node(pointed_thing.above)
|
||||
if node.name == "air" then
|
||||
minetest.add_node(pointed_thing.above, {name="amogus_items:Poop2"})
|
||||
minetest.check_for_falling(pointed_thing.above)
|
||||
else
|
||||
minetest.add_node(pointed_thing.under, {name="amogus_items:Poop2"})
|
||||
minetest.check_for_falling(pointed_thing.under)
|
||||
end
|
||||
end
|
||||
sraj_dzwiek()
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
1
mods/amogus_items/mod.conf
Normal file
@@ -0,0 +1 @@
|
||||
name = amogus_items
|
||||
BIN
mods/amogus_items/sounds/shitting1.ogg
Normal file
BIN
mods/amogus_items/sounds/shitting2.ogg
Normal file
BIN
mods/amogus_items/sounds/shitting3.ogg
Normal file
2
mods/amogus_items/sounds/sounds_numbers.config
Normal file
@@ -0,0 +1,2 @@
|
||||
shit_packing=3
|
||||
shitting=3
|
||||
BIN
mods/amogus_items/textures/Poop.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
mods/amogus_items/textures/Poop2.png
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
mods/amogus_items/textures/SHITitem.png
Normal file
|
After Width: | Height: | Size: 318 B |
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 273 B |
BIN
mods/amogus_items/textures/mogus.png
Normal file
|
After Width: | Height: | Size: 154 B |
BIN
mods/amogus_items/textures/obsusian_pick.png
Normal file
|
After Width: | Height: | Size: 289 B |
BIN
mods/amogus_items/textures/obsusian_shovel.png
Normal file
|
After Width: | Height: | Size: 272 B |
BIN
mods/amogus_items/textures/obsusian_sword.png
Normal file
|
After Width: | Height: | Size: 273 B |
|
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 273 B |
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 273 B |
|
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 284 B |
|
Before Width: | Height: | Size: 187 B |
BIN
mods/amogus_items/textures/wooden_plank.png
Normal file
|
After Width: | Height: | Size: 237 B |
@@ -131,43 +131,43 @@ local function init_bags(player)
|
||||
end
|
||||
end
|
||||
|
||||
local bag_recipes = {
|
||||
small = {
|
||||
rcp = {
|
||||
{"", "farming:string", ""},
|
||||
{"group:wool", "group:wool", "group:wool"},
|
||||
{"group:wool", "group:wool", "group:wool"},
|
||||
},
|
||||
size = 2,
|
||||
},
|
||||
medium = {
|
||||
rcp = {
|
||||
{"farming:string", "i3:bag_small", "farming:string"},
|
||||
{"farming:string", "i3:bag_small", "farming:string"},
|
||||
},
|
||||
size = 3,
|
||||
},
|
||||
large = {
|
||||
rcp = {
|
||||
{"farming:string", "i3:bag_medium", "farming:string"},
|
||||
{"farming:string", "i3:bag_medium", "farming:string"},
|
||||
},
|
||||
size = 4,
|
||||
},
|
||||
}
|
||||
|
||||
for size, item in pairs(bag_recipes) do
|
||||
local bagname = fmt("i3:bag_%s", size)
|
||||
|
||||
core.register_craftitem(bagname, {
|
||||
description = fmt("%s Backpack", size:gsub("^%l", string.upper)),
|
||||
inventory_image = fmt("i3_bag_%s.png", size),
|
||||
groups = {bag = item.size},
|
||||
stack_max = 1,
|
||||
})
|
||||
|
||||
core.register_craft{output = bagname, recipe = item.rcp}
|
||||
core.register_craft{type = "fuel", recipe = bagname, burntime = 3}
|
||||
end
|
||||
--local bag_recipes = {
|
||||
-- small = {
|
||||
-- rcp = {
|
||||
-- {"", "farming:string", ""},
|
||||
-- {"group:wool", "group:wool", "group:wool"},
|
||||
-- {"group:wool", "group:wool", "group:wool"},
|
||||
-- },
|
||||
-- size = 2,
|
||||
-- },
|
||||
-- medium = {
|
||||
-- rcp = {
|
||||
-- {"farming:string", "i3:bag_small", "farming:string"},
|
||||
-- {"farming:string", "i3:bag_small", "farming:string"},
|
||||
-- },
|
||||
-- size = 3,
|
||||
-- },
|
||||
-- large = {
|
||||
-- rcp = {
|
||||
-- {"farming:string", "i3:bag_medium", "farming:string"},
|
||||
-- {"farming:string", "i3:bag_medium", "farming:string"},
|
||||
-- },
|
||||
-- size = 4,
|
||||
-- },
|
||||
--}
|
||||
--
|
||||
--for size, item in pairs(bag_recipes) do
|
||||
-- local bagname = fmt("i3:bag_%s", size)
|
||||
--
|
||||
-- core.register_craftitem(bagname, {
|
||||
-- description = fmt("%s Backpack", size:gsub("^%l", string.upper)),
|
||||
-- inventory_image = fmt("i3_bag_%s.png", size),
|
||||
-- groups = {bag = item.size},
|
||||
-- stack_max = 1,
|
||||
-- })
|
||||
--
|
||||
-- core.register_craft{output = bagname, recipe = item.rcp}
|
||||
-- core.register_craft{type = "fuel", recipe = bagname, burntime = 3}
|
||||
--end
|
||||
|
||||
return init_bags
|
||||
|
||||
@@ -467,8 +467,8 @@ local function get_container(fs, data, player, yoffset, ctn_len, award_list, awa
|
||||
fs("list[current_player;craft;%f,%f;3,3;]", 0, yoffset + 1.45)
|
||||
image(3.47, yoffset + 2.69, 0.85, 0.85, PNG.arrow)
|
||||
fs("list[current_player;craftpreview;%f,%f;1,1;]", 4.45, yoffset + 2.6)
|
||||
fs("list[detached:i3_trash;main;%f,%f;1,1;]", 4.45, yoffset + 3.75)
|
||||
image(4.45, yoffset + 3.75, 1, 1, PNG.trash)
|
||||
--fs("list[detached:i3_trash;main;%f,%f;1,1;]", 4.45, yoffset + 3.75)
|
||||
--image(4.45, yoffset + 3.75, 1, 1, PNG.trash)
|
||||
|
||||
local yextra = damage_enabled and 5.5 or 5
|
||||
|
||||
|
||||
11
mods/item_drop/.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
on: [push, pull_request]
|
||||
name: build
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: lint
|
||||
uses: Roang-zero1/factorio-mod-luacheck@master
|
||||
with:
|
||||
luacheckrc_url: https://raw.githubusercontent.com/minetest-mods/item_drop/master/.luacheckrc
|
||||
19
mods/item_drop/.luacheckrc
Normal file
@@ -0,0 +1,19 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
max_line_length = 999
|
||||
|
||||
ignore = {
|
||||
"name", "drops", "i",
|
||||
}
|
||||
|
||||
globals = {
|
||||
"minetest",
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
string = {fields = {"split", "trim"}},
|
||||
table = {fields = {"copy", "getn"}},
|
||||
|
||||
"vector", "ItemStack",
|
||||
"dump",
|
||||
}
|
||||
3
mods/item_drop/CONTRIBUTING.md
Normal file
@@ -0,0 +1,3 @@
|
||||
- The `master` branch should be stable to end-users at all times. It should target latest Minetest point release.
|
||||
- Put rewrites and new features in branches.
|
||||
- Conform with setting defaults so that end-user upgrades doesn't change expected in-game behavior. Discuss default changes in an issue if one really need to change.
|
||||
504
mods/item_drop/LICENSE
Normal file
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
(This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.)
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This library 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 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random
|
||||
Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
60
mods/item_drop/README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Item Drop [](https://github.com/minetest-mods/item_drop/actions) [](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
|
||||
|
||||
A highly configurable mod providing item magnet and in-world node drops\
|
||||
By [PilzAdam](https://github.com/PilzAdam),
|
||||
[texmex](https://github.com/tacotexmex/), [hybriddog](https://github.com/hybriddog/).
|
||||
|
||||
## Licensing
|
||||
LGPLv2.1/CC BY-SA 3.0. Particle code from WCILA mod by Aurailus, originally licensed MIT.
|
||||
|
||||
## Notes
|
||||
`item_drop` can be played with Minetest 0.4.16 or above. It was originally
|
||||
developed by [PilzAdam](https://github.com/PilzAdam/item_drop).
|
||||
|
||||
## List of features
|
||||
* All settings may be configured from within the game itself.
|
||||
(Settings tab > Advanced settings > Mods > item_drop)
|
||||
* Drops nodes as in-world items on dig if `item_drop.enable_item_drop` is
|
||||
`true` (true by default) It does nothing in creative mode.
|
||||
* Puts dropped items to the player's inventory if `item_drop.enable_item_pickup`
|
||||
is `true` (true by default)
|
||||
* Multiple items are picked in a quick succession instead of all at once which
|
||||
is indicated by the pickup sound.
|
||||
* It uses a node radius set in `item_drop.pickup_radius` (default 0.75),
|
||||
if items are within this radius around the player's belt, they're picked.
|
||||
* If `item_drop.pickup_age` is something positive, items dropped by players
|
||||
are ignored for this time to avoid instantly picking up when dropping.
|
||||
* If `item_drop.pickup_age` is `-1`, items are only picked when they don't
|
||||
move, it's another fix for instant item picking.
|
||||
* If `item_drop.magnet_radius` is bigger than `item_drop.pickup_radius`,
|
||||
items between these radii are flying to the player for
|
||||
`item_drop.magnet_time` seconds, after this time, they're picked or stop
|
||||
flying.
|
||||
* Enable manual item pickups by mouse only if `item_drop.mouse_pickup` is
|
||||
`true` (true by default)
|
||||
* Plays a sound when the items are picked up with the gain level set to
|
||||
`item_drop.pickup_sound_gain` (default 0.2)
|
||||
* Requires a key to be pressed in order to pick items if
|
||||
`item_drop.enable_pickup_key` is `true` (true by default)
|
||||
* The keytypes to choose from by setting `item_pickup_keytype` are:
|
||||
* Use key (`Use`)
|
||||
* Sneak key (`Sneak`)
|
||||
* Left and Right keys combined (`LeftAndRight`)
|
||||
* Right mouse button (`RMB`)
|
||||
* Sneak key and right mouse button combined (`SneakAndRMB`)
|
||||
* If `item_drop.pickup_keyinvert` is `true`, items are
|
||||
collected when the key is not pressed instead of when it's pressed.
|
||||
* Displays a particle of the picked item above the player if
|
||||
`item_drop.pickup_particle` is `true` (true by default)
|
||||
|
||||
|
||||
## Known issues
|
||||
|
||||
## Bug reports and suggestions
|
||||
You can report bugs or suggest ideas by
|
||||
[filing an issue](http://github.com/minetest-mods/item_drop/issues/new).
|
||||
|
||||
## Links
|
||||
* [Download ZIP](https://github.com/minetest-mods/item_drop/archive/master.zip)
|
||||
* [Source](https://github.com/minetest-mods/item_drop/)
|
||||
* [Forum thread](https://forum.minetest.net/viewtopic.php?t=16913)
|
||||
1
mods/item_drop/description.txt
Normal file
@@ -0,0 +1 @@
|
||||
A highly configurable mod providing item magnet and in-world node drops
|
||||
436
mods/item_drop/init.lua
Normal file
@@ -0,0 +1,436 @@
|
||||
local load_time_start = minetest.get_us_time()
|
||||
|
||||
-- Functions which can be overridden by mods
|
||||
item_drop = {
|
||||
-- This function is executed before picking up an item or making it fly to
|
||||
-- the player. If it does not return true, the item is ignored.
|
||||
-- It is also executed before collecting the item after it flew to
|
||||
-- the player and did not reach him/her for magnet_time seconds.
|
||||
can_pickup = function(entity, player)
|
||||
if entity.item_drop_picked then
|
||||
-- Ignore items where picking has already failed
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
|
||||
-- before_collect and after_collect are executed before and after an item
|
||||
-- is collected by a player
|
||||
before_collect = function(entity, pos, player)
|
||||
end,
|
||||
after_collect = function(entity, pos, player)
|
||||
entity.item_drop_picked = true
|
||||
end,
|
||||
}
|
||||
|
||||
local function legacy_setting_getbool(name_new, name_old, default)
|
||||
local v = minetest.settings:get_bool(name_new)
|
||||
if v == nil then
|
||||
v = minetest.settings:get_bool(name_new)
|
||||
end
|
||||
if default then
|
||||
return v ~= false
|
||||
end
|
||||
return v
|
||||
end
|
||||
|
||||
local function legacy_setting_getnumber(name_new, name_old, default)
|
||||
return tonumber(minetest.settings:get(name_new))
|
||||
or tonumber(minetest.settings:get(name_old))
|
||||
or default
|
||||
end
|
||||
|
||||
if legacy_setting_getbool("item_drop.enable_item_pickup",
|
||||
"enable_item_pickup", true) then
|
||||
local pickup_gain = legacy_setting_getnumber("item_drop.pickup_sound_gain",
|
||||
"item_pickup_gain", 0.2)
|
||||
local pickup_particle =
|
||||
minetest.settings:get_bool("item_drop.pickup_particle", true)
|
||||
local pickup_radius = legacy_setting_getnumber("item_drop.pickup_radius",
|
||||
"item_pickup_radius", 2.0)
|
||||
local magnet_radius = tonumber(
|
||||
minetest.settings:get("item_drop.magnet_radius")) or -1
|
||||
local magnet_time = tonumber(
|
||||
minetest.settings:get("item_drop.magnet_time")) or 5.0
|
||||
local pickup_age = tonumber(
|
||||
minetest.settings:get("item_drop.pickup_age")) or 1.0
|
||||
local key_triggered = legacy_setting_getbool("item_drop.enable_pickup_key",
|
||||
"enable_item_pickup_key", true)
|
||||
local key_invert = minetest.settings:get_bool(
|
||||
"item_drop.pickup_keyinvert") ~= false
|
||||
local keytype
|
||||
if key_triggered then
|
||||
keytype = minetest.settings:get("item_drop.pickup_keytype") or
|
||||
minetest.settings:get("item_pickup_keytype") or "Use"
|
||||
-- disable pickup age if picking is explicitly enabled by the player
|
||||
if not key_invert then
|
||||
pickup_age = math.min(pickup_age, 0)
|
||||
end
|
||||
end
|
||||
local mouse_pickup = minetest.settings:get_bool(
|
||||
"item_drop.mouse_pickup") ~= false
|
||||
if not mouse_pickup then
|
||||
minetest.registered_entities["__builtin:item"].pointable = false
|
||||
end
|
||||
|
||||
local magnet_mode = magnet_radius > pickup_radius
|
||||
local zero_velocity_mode = pickup_age == -1
|
||||
if magnet_mode
|
||||
and zero_velocity_mode then
|
||||
error"zero velocity mode can't be used together with magnet mode"
|
||||
end
|
||||
|
||||
-- tells whether an inventorycube should be shown as pickup_particle or not
|
||||
-- for known drawtypes
|
||||
local inventorycube_drawtypes = {
|
||||
normal = true,
|
||||
allfaces = true,
|
||||
allfaces_optional = true,
|
||||
glasslike = true,
|
||||
glasslike_framed = true,
|
||||
glasslike_framed_optional = true,
|
||||
liquid = true,
|
||||
flowingliquid = true,
|
||||
}
|
||||
|
||||
-- Get an image string from a tile definition
|
||||
local function tile_to_image(tile, fallback_image)
|
||||
if not tile then
|
||||
return fallback_image
|
||||
end
|
||||
local tile_type = type(tile)
|
||||
if tile_type == "string" then
|
||||
return tile
|
||||
end
|
||||
assert(tile_type == "table", "Tile definition is not a string or table")
|
||||
local image = tile.name or tile.image
|
||||
assert(image, "Tile definition has no image file specified")
|
||||
if tile.color then
|
||||
local colorstr = minetest.colorspec_to_colorstring(tile.color)
|
||||
if colorstr then
|
||||
return image .. "^[multiply:" .. colorstr
|
||||
end
|
||||
end
|
||||
return image
|
||||
end
|
||||
|
||||
-- adds the item to the inventory and removes the object
|
||||
local function collect_item(ent, pos, player)
|
||||
item_drop.before_collect(ent, pos, player)
|
||||
minetest.sound_play("item_drop_pickup", {
|
||||
pos = pos,
|
||||
gain = pickup_gain,
|
||||
}, true)
|
||||
if pickup_particle then
|
||||
local item = minetest.registered_nodes[
|
||||
ent.itemstring:gsub("(.*)%s.*$", "%1")]
|
||||
local image
|
||||
if item and item.tiles and item.tiles[1] then
|
||||
if inventorycube_drawtypes[item.drawtype] then
|
||||
local tiles = item.tiles
|
||||
-- color in the tile definition is handled by tile_to_image.
|
||||
-- color in the node definition is not yet supported here.
|
||||
local top = tile_to_image(tiles[1])
|
||||
local left = tile_to_image(tiles[3], top)
|
||||
local right = tile_to_image(tiles[5], left)
|
||||
image = minetest.inventorycube(top, left, right)
|
||||
else
|
||||
image = item.inventory_image or item.tiles[1]
|
||||
end
|
||||
minetest.add_particle({
|
||||
pos = {x = pos.x, y = pos.y + 1.5, z = pos.z},
|
||||
velocity = {x = 0, y = 1, z = 0},
|
||||
acceleration = {x = 0, y = -4, z = 0},
|
||||
expirationtime = 0.2,
|
||||
size = 3,--math.random() + 0.5,
|
||||
vertical = false,
|
||||
texture = image,
|
||||
})
|
||||
end
|
||||
end
|
||||
ent:on_punch(player)
|
||||
item_drop.after_collect(ent, pos, player)
|
||||
end
|
||||
|
||||
-- opt_get_ent gets the object's luaentity if it can be collected
|
||||
local opt_get_ent
|
||||
if zero_velocity_mode then
|
||||
function opt_get_ent(object)
|
||||
if object:is_player()
|
||||
or not vector.equals(object:get_velocity(), {x=0, y=0, z=0}) then
|
||||
return
|
||||
end
|
||||
local ent = object:get_luaentity()
|
||||
if not ent
|
||||
or ent.name ~= "__builtin:item"
|
||||
or ent.itemstring == "" then
|
||||
return
|
||||
end
|
||||
return ent
|
||||
end
|
||||
else
|
||||
function opt_get_ent(object)
|
||||
if object:is_player() then
|
||||
return
|
||||
end
|
||||
local ent = object:get_luaentity()
|
||||
if not ent
|
||||
or ent.name ~= "__builtin:item"
|
||||
or (ent.dropped_by and ent.age < pickup_age)
|
||||
or ent.itemstring == "" then
|
||||
return
|
||||
end
|
||||
return ent
|
||||
end
|
||||
end
|
||||
|
||||
local afterflight
|
||||
if magnet_mode then
|
||||
-- take item or reset velocity after flying a second
|
||||
function afterflight(object, inv, player)
|
||||
-- TODO: test what happens if player left the game
|
||||
local ent = opt_get_ent(object)
|
||||
if not ent then
|
||||
return
|
||||
end
|
||||
local item = ItemStack(ent.itemstring)
|
||||
if inv
|
||||
and inv:room_for_item("main", item)
|
||||
and item_drop.can_pickup(ent, player) then
|
||||
collect_item(ent, object:get_pos(), player)
|
||||
else
|
||||
-- the acceleration will be reset by the object's on_step
|
||||
object:set_velocity({x=0,y=0,z=0})
|
||||
ent.is_magnet_item = false
|
||||
end
|
||||
end
|
||||
|
||||
-- disable velocity and acceleration changes of items flying to players
|
||||
minetest.after(0, function()
|
||||
local ObjectRef
|
||||
local blocked_methods = {"set_acceleration", "set_velocity",
|
||||
"setacceleration", "setvelocity"}
|
||||
local itemdef = minetest.registered_entities["__builtin:item"]
|
||||
local old_on_step = itemdef.on_step
|
||||
local function do_nothing() end
|
||||
function itemdef.on_step(self, ...)
|
||||
if not self.is_magnet_item then
|
||||
return old_on_step(self, ...)
|
||||
end
|
||||
ObjectRef = ObjectRef or getmetatable(self.object)
|
||||
local old_funcs = {}
|
||||
for i = 1, #blocked_methods do
|
||||
local method = blocked_methods[i]
|
||||
old_funcs[method] = ObjectRef[method]
|
||||
ObjectRef[method] = do_nothing
|
||||
end
|
||||
old_on_step(self, ...)
|
||||
for i = 1, #blocked_methods do
|
||||
local method = blocked_methods[i]
|
||||
ObjectRef[method] = old_funcs[method]
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
-- set keytype to the key name if possible
|
||||
if keytype == "Use" then
|
||||
keytype = "aux1"
|
||||
elseif keytype == "Sneak" then
|
||||
keytype = "sneak"
|
||||
elseif keytype == "LeftAndRight" then -- LeftAndRight combination
|
||||
keytype = 0
|
||||
elseif keytype == "SneakAndRMB" then -- SneakAndRMB combination
|
||||
keytype = 1
|
||||
end
|
||||
|
||||
|
||||
-- tests if the player has the keys pressed to enable item picking
|
||||
local function has_keys_pressed(player)
|
||||
if not key_triggered then
|
||||
return true
|
||||
end
|
||||
|
||||
local control = player:get_player_control()
|
||||
local keys_pressed
|
||||
if keytype == 0 then -- LeftAndRight combination
|
||||
keys_pressed = control.left and control.right
|
||||
elseif keytype == 1 then -- SneakAndRMB combination
|
||||
keys_pressed = control.sneak and control.RMB
|
||||
else
|
||||
keys_pressed = control[keytype]
|
||||
end
|
||||
|
||||
return keys_pressed ~= key_invert
|
||||
end
|
||||
|
||||
local function is_inside_map(pos)
|
||||
local bound = 31000
|
||||
return -bound < pos.x and pos.x < bound
|
||||
and -bound < pos.y and pos.y < bound
|
||||
and -bound < pos.z and pos.z < bound
|
||||
end
|
||||
|
||||
-- called for each player to possibly collect an item, returns true if so
|
||||
local function pickupfunc(player)
|
||||
if not has_keys_pressed(player)
|
||||
or not minetest.get_player_privs(player:get_player_name()).interact
|
||||
or player:get_hp() <= 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = player:get_pos()
|
||||
if not is_inside_map(pos) then
|
||||
-- get_objects_inside_radius crashes for too far positions
|
||||
return
|
||||
end
|
||||
pos.y = pos.y+0.5
|
||||
local inv = player:get_inventory()
|
||||
|
||||
local objectlist = minetest.get_objects_inside_radius(pos,
|
||||
magnet_mode and magnet_radius or pickup_radius)
|
||||
for i = 1,#objectlist do
|
||||
local object = objectlist[i]
|
||||
local ent = opt_get_ent(object)
|
||||
if ent
|
||||
and item_drop.can_pickup(ent, player) then
|
||||
local item = ItemStack(ent.itemstring)
|
||||
if inv:room_for_item("main", item) then
|
||||
local flying_item
|
||||
local pos2
|
||||
if magnet_mode then
|
||||
pos2 = object:get_pos()
|
||||
flying_item = vector.distance(pos, pos2) > pickup_radius
|
||||
end
|
||||
if not flying_item then
|
||||
-- The item is near enough to pick it
|
||||
collect_item(ent, pos, player)
|
||||
-- Collect one item at a time to avoid the loud pop
|
||||
return true
|
||||
end
|
||||
-- The item is not too far a way but near enough to be
|
||||
-- magnetised, make it fly to the player
|
||||
local vel = vector.multiply(vector.subtract(pos, pos2), 3)
|
||||
vel.y = vel.y + 0.6
|
||||
object:set_velocity(vel)
|
||||
if not ent.is_magnet_item then
|
||||
ent.object:set_acceleration({x=0, y=0, z=0})
|
||||
ent.is_magnet_item = true
|
||||
|
||||
minetest.after(magnet_time, afterflight,
|
||||
object, inv, player)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function pickup_step()
|
||||
local got_item
|
||||
local players = minetest.get_connected_players()
|
||||
for i = 1,#players do
|
||||
got_item = got_item or pickupfunc(players[i])
|
||||
end
|
||||
-- lower step if takeable item(s) were found
|
||||
local time
|
||||
if got_item then
|
||||
time = 0.02
|
||||
else
|
||||
time = 0.2
|
||||
end
|
||||
minetest.after(time, pickup_step)
|
||||
end
|
||||
minetest.after(3.0, pickup_step)
|
||||
end
|
||||
|
||||
if legacy_setting_getbool("item_drop.enable_item_drop", "enable_item_drop", true)
|
||||
and not minetest.settings:get_bool("creative_mode") then
|
||||
-- Workaround to test if an item metadata (ItemStackMetaRef) is empty
|
||||
local function itemmeta_is_empty(meta)
|
||||
local t = meta:to_table()
|
||||
for k, v in pairs(t) do
|
||||
if k ~= "fields" then
|
||||
return false
|
||||
end
|
||||
assert(type(v) == "table")
|
||||
if next(v) ~= nil then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
-- Tests if the item has special information such as metadata
|
||||
local function can_split_item(item)
|
||||
return item:get_wear() == 0 and itemmeta_is_empty(item:get_meta())
|
||||
end
|
||||
|
||||
local function spawn_items(pos, items_to_spawn)
|
||||
for i = 1,#items_to_spawn do
|
||||
local obj = minetest.add_item(pos, items_to_spawn[i])
|
||||
if not obj then
|
||||
error("Couldn't spawn item " .. name .. ", drops: "
|
||||
.. dump(drops))
|
||||
end
|
||||
|
||||
local vel = obj:get_velocity()
|
||||
local x = math.random(-5, 4)
|
||||
if x >= 0 then
|
||||
x = x+1
|
||||
end
|
||||
vel.x = 1 / x
|
||||
local z = math.random(-5, 4)
|
||||
if z >= 0 then
|
||||
z = z+1
|
||||
end
|
||||
vel.z = 1 / z
|
||||
obj:set_velocity(vel)
|
||||
end
|
||||
end
|
||||
|
||||
local old_handle_node_drops = minetest.handle_node_drops
|
||||
function minetest.handle_node_drops(pos, drops, player)
|
||||
if not player or player.is_fake_player then
|
||||
-- Node Breaker or similar machines should receive items in the
|
||||
-- inventory
|
||||
return old_handle_node_drops(pos, drops, player)
|
||||
end
|
||||
for i = 1,#drops do
|
||||
local item = drops[i]
|
||||
if type(item) == "string" then
|
||||
-- The string is not necessarily only the item name,
|
||||
-- so always convert it to ItemStack
|
||||
item = ItemStack(item)
|
||||
end
|
||||
local count = item:get_count()
|
||||
local name = item:get_name()
|
||||
|
||||
-- Sometimes nothing should be dropped
|
||||
if name == ""
|
||||
or not minetest.registered_items[name] then
|
||||
count = 0
|
||||
end
|
||||
|
||||
if count > 0 then
|
||||
-- Split items if possible
|
||||
local items_to_spawn = {item}
|
||||
if can_split_item(item) then
|
||||
for i = 1,count do
|
||||
items_to_spawn[i] = name
|
||||
end
|
||||
end
|
||||
|
||||
spawn_items(pos, items_to_spawn)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local time = (minetest.get_us_time() - load_time_start) / 1000000
|
||||
local msg = "[item_drop] loaded after ca. " .. time .. " seconds."
|
||||
if time > 0.01 then
|
||||
print(msg)
|
||||
else
|
||||
minetest.log("info", msg)
|
||||
end
|
||||
2
mods/item_drop/mod.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
name = item_drop
|
||||
description = A highly configurable mod providing item magnet and in-world node drops
|
||||
BIN
mods/item_drop/screenshot.png
Normal file
|
After Width: | Height: | Size: 216 KiB |
38
mods/item_drop/settingtypes.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
#Pick up items automatically
|
||||
item_drop.enable_item_pickup (Enable item pickups) bool true
|
||||
|
||||
#Drop items in-world on dig, does nothing in creative mode
|
||||
item_drop.enable_item_drop (Enable item drops) bool true
|
||||
|
||||
#Use a key to pick up items
|
||||
item_drop.enable_pickup_key (Use pickup key) bool true
|
||||
|
||||
#Collect items when the key is not pressed instead of when it is pressed
|
||||
item_drop.pickup_keyinvert (Invert pickup key) bool true
|
||||
|
||||
#What keytype to use as pickup key
|
||||
item_drop.pickup_keytype (Pickup keytype) enum Use Use,Sneak,LeftAndRight,RMB,SneakAndRMB
|
||||
|
||||
#The volume of the pickup sound
|
||||
item_drop.pickup_sound_gain (Pickup sound gain) float 0.4
|
||||
|
||||
#Display a particle of the item picked up above the player
|
||||
item_drop.pickup_particle (Pickup particle) bool true
|
||||
|
||||
#Player pickup radius, the maximum distance from which items can be collected
|
||||
item_drop.pickup_radius (Pickup radius) float 2.0
|
||||
|
||||
#Magnet radius, items between pickup_radius and this begin flying to the player
|
||||
#Set it to -1 (or something else smaller than pickup_radius) to disable item
|
||||
#flying
|
||||
item_drop.magnet_radius (Magnet radius) float -1
|
||||
|
||||
#Item flight duration, items flying for more than this time are added to the
|
||||
#player's inventory
|
||||
item_drop.magnet_time (Magnet time) float 5.0
|
||||
|
||||
#Time delay in seconds after autopicking an item if it's dropped by a player
|
||||
item_drop.pickup_age (Pickup age) float 0.5
|
||||
|
||||
#Enable manual item pickups by mouse
|
||||
item_drop.mouse_pickup (Mouse pickup) bool true
|
||||
BIN
mods/item_drop/sounds/item_drop_pickup.1.ogg
Normal file
BIN
mods/item_drop/sounds/item_drop_pickup.2.ogg
Normal file
BIN
mods/item_drop/sounds/item_drop_pickup.3.ogg
Normal file
BIN
mods/item_drop/sounds/item_drop_pickup.4.ogg
Normal file
@@ -2,31 +2,22 @@ dofile(minetest.get_modpath("player_api") .. "/api.lua")
|
||||
|
||||
|
||||
-- Default player appearance
|
||||
player_api.register_model("amogus_entity.obj", {
|
||||
player_api.register_model("susman.obj", {
|
||||
animation_speed = 30,
|
||||
textures = {"amogus_entity.png"},
|
||||
animations = {
|
||||
-- Standard animations.
|
||||
stand = {x = 0, y = 79},
|
||||
lay = {x = 162, y = 166, eye_height = 0.3, override_local = true,
|
||||
collisionbox = {-0.6, 0.0, -0.6, 0.6, 0.3, 0.6}},
|
||||
walk = {x = 168, y = 187},
|
||||
mine = {x = 189, y = 198},
|
||||
walk_mine = {x = 200, y = 219},
|
||||
sit = {x = 81, y = 160, eye_height = 0.8, override_local = true,
|
||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.0, 0.3}}
|
||||
},
|
||||
textures = {"susman.png"},
|
||||
|
||||
animations = {},
|
||||
stepheight = 0.6,
|
||||
eye_height = 1.47,
|
||||
|
||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
|
||||
|
||||
visual = "mesh",
|
||||
visual_size = {x=15, y=15, z=15},
|
||||
visual_size = {x=10, y=10, z=10},
|
||||
|
||||
})
|
||||
|
||||
-- Update appearance when the player joins
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
player_api.set_model(player, "amogus_entity.obj")
|
||||
player_api.set_model(player, "susman.obj")
|
||||
end)
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
# Blender 3.4.0
|
||||
# www.blender.org
|
||||
o body
|
||||
v -0.250000 1.312500 -0.250000
|
||||
v -0.375000 1.312500 -0.250000
|
||||
v -0.250000 1.000000 -0.250000
|
||||
v -0.375000 1.000000 -0.250000
|
||||
v -0.375000 1.312500 0.250000
|
||||
v -0.250000 1.312500 0.250000
|
||||
v -0.375000 1.000000 0.250000
|
||||
v -0.250000 1.000000 0.250000
|
||||
v 0.437500 1.125000 -0.312500
|
||||
v 0.250000 1.125000 -0.312500
|
||||
v 0.437500 0.375000 -0.312500
|
||||
v 0.250000 0.375000 -0.312500
|
||||
v 0.250000 1.125000 0.312500
|
||||
v 0.437500 1.125000 0.312500
|
||||
v 0.250000 0.375000 0.312500
|
||||
v 0.437500 0.375000 0.312500
|
||||
v 0.250000 1.437500 -0.375000
|
||||
v -0.250000 1.437500 -0.375000
|
||||
v 0.250000 0.312500 -0.375000
|
||||
v -0.250000 0.312500 -0.375000
|
||||
v -0.250000 1.437500 0.375000
|
||||
v 0.250000 1.437500 0.375000
|
||||
v -0.250000 0.312500 0.375000
|
||||
v 0.250000 0.312500 0.375000
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.000000 1.000000
|
||||
vt 0.125000 1.000000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.000000 0.687500
|
||||
vt 0.500000 1.000000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.000000 0.687500
|
||||
vt 0.125000 0.687500
|
||||
vt 0.500000 0.875000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.125000 0.687500
|
||||
vt 0.500000 0.875000
|
||||
vt -0.000000 0.687500
|
||||
vt 0.500000 1.000000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.500000 0.687500
|
||||
vt 0.125000 1.000000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
s 0
|
||||
f 4/9/1 7/18/1 5/12/1 2/3/1
|
||||
f 3/6/2 4/10/2 2/4/2 1/1/2
|
||||
f 12/26/3 19/33/3 17/31/3 10/24/3
|
||||
f 7/19/4 8/21/4 6/15/4 5/13/4
|
||||
f 6/16/5 1/1/5 2/5/5 5/14/5
|
||||
f 7/20/6 4/11/6 3/7/6 8/21/6
|
||||
f 13/27/3 10/24/3 17/31/3 22/36/3
|
||||
f 11/25/2 12/26/2 10/24/2 9/23/2
|
||||
f 16/30/3 11/25/3 9/23/3 14/28/3
|
||||
f 15/29/4 16/30/4 14/28/4 13/27/4
|
||||
f 14/28/5 9/23/5 10/24/5 13/27/5
|
||||
f 15/29/6 12/26/6 11/25/6 16/30/6
|
||||
f 15/29/3 13/27/3 22/36/3 24/38/3
|
||||
f 19/33/2 20/34/2 18/32/2 17/31/2
|
||||
f 23/37/4 24/38/4 22/36/4 21/35/4
|
||||
f 22/36/5 17/31/5 18/32/5 21/35/5
|
||||
f 23/37/6 20/34/6 19/33/6 24/38/6
|
||||
f 15/29/3 24/38/3 19/33/3 12/26/3
|
||||
f 6/17/1 21/35/1 18/32/1 1/2/1
|
||||
f 8/22/1 23/37/1 21/35/1 6/17/1
|
||||
f 3/8/1 1/2/1 18/32/1 20/34/1
|
||||
f 8/22/1 3/8/1 20/34/1 23/37/1
|
||||
o left_leg
|
||||
v 0.187500 0.437500 0.062500
|
||||
v -0.187500 0.437500 0.062500
|
||||
v 0.187500 -0.000000 0.062500
|
||||
v -0.187500 0.000000 0.062500
|
||||
v -0.187500 0.437500 0.312500
|
||||
v 0.187500 0.437500 0.312500
|
||||
v -0.187500 0.000000 0.312500
|
||||
v 0.187500 -0.000000 0.312500
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
s 0
|
||||
f 28/42/7 31/45/7 29/43/7 26/40/7
|
||||
f 27/41/8 28/42/8 26/40/8 25/39/8
|
||||
f 32/46/9 27/41/9 25/39/9 30/44/9
|
||||
f 31/45/10 32/46/10 30/44/10 29/43/10
|
||||
f 30/44/11 25/39/11 26/40/11 29/43/11
|
||||
f 31/45/12 28/42/12 27/41/12 32/46/12
|
||||
o right_leg
|
||||
v 0.187500 0.437500 -0.312500
|
||||
v -0.187500 0.437500 -0.312500
|
||||
v 0.187500 -0.000000 -0.312500
|
||||
v -0.187500 0.000000 -0.312500
|
||||
v -0.187500 0.437500 -0.062500
|
||||
v 0.187500 0.437500 -0.062500
|
||||
v -0.187500 0.000000 -0.062500
|
||||
v 0.187500 -0.000000 -0.062500
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
vt 0.968971 0.969702
|
||||
s 0
|
||||
f 36/50/13 39/53/13 37/51/13 34/48/13
|
||||
f 35/49/14 36/50/14 34/48/14 33/47/14
|
||||
f 40/54/15 35/49/15 33/47/15 38/52/15
|
||||
f 39/53/16 40/54/16 38/52/16 37/51/16
|
||||
f 38/52/17 33/47/17 34/48/17 37/51/17
|
||||
f 39/53/18 36/50/18 35/49/18 40/54/18
|
||||
|
Before Width: | Height: | Size: 614 B |
632
mods/player_api/models/susman.obj
Normal file
@@ -0,0 +1,632 @@
|
||||
# Blender 3.5.0
|
||||
# www.blender.org
|
||||
o body_1
|
||||
v 0.312500 1.062500 0.125000
|
||||
v 0.312500 1.062500 -0.125000
|
||||
v 0.312500 0.375000 0.125000
|
||||
v 0.312500 0.375000 -0.125000
|
||||
v -0.312500 1.062500 -0.125000
|
||||
v -0.312500 1.062500 0.125000
|
||||
v -0.312500 0.375000 -0.125000
|
||||
v -0.312500 0.375000 0.125000
|
||||
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
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 4/4/1 7/7/1 5/5/1 2/2/1
|
||||
f 3/3/2 4/4/2 2/2/2 1/1/2
|
||||
f 8/8/3 3/3/3 1/1/3 6/6/3
|
||||
f 7/7/4 8/8/4 6/6/4 5/5/4
|
||||
f 6/6/5 1/1/5 2/2/5 5/5/5
|
||||
f 7/7/6 4/4/6 3/3/6 8/8/6
|
||||
o body_3
|
||||
v 0.250000 1.125000 0.125000
|
||||
v 0.250000 1.125000 -0.125000
|
||||
v 0.250000 1.062500 0.125000
|
||||
v 0.250000 1.062500 -0.125000
|
||||
v -0.250000 1.125000 -0.125000
|
||||
v -0.250000 1.125000 0.125000
|
||||
v -0.250000 1.062500 -0.125000
|
||||
v -0.250000 1.062500 0.125000
|
||||
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
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 12/12/7 15/15/7 13/13/7 10/10/7
|
||||
f 11/11/8 12/12/8 10/10/8 9/9/8
|
||||
f 16/16/9 11/11/9 9/9/9 14/14/9
|
||||
f 15/15/10 16/16/10 14/14/10 13/13/10
|
||||
f 14/14/11 9/9/11 10/10/11 13/13/11
|
||||
o head
|
||||
v 0.000000 1.187500 0.125000
|
||||
v 0.000000 1.937500 0.125000
|
||||
v 0.187500 1.887259 0.074759
|
||||
v 0.324760 1.750000 0.037981
|
||||
v 0.375000 1.562500 0.024519
|
||||
v 0.324760 1.375000 0.037981
|
||||
v 0.187500 1.237741 0.074759
|
||||
v 0.137260 1.887259 -0.012260
|
||||
v 0.237740 1.750000 -0.112741
|
||||
v 0.274519 1.562500 -0.149519
|
||||
v 0.237740 1.375000 -0.112741
|
||||
v 0.137260 1.237741 -0.012260
|
||||
v 0.050240 1.887259 -0.062500
|
||||
v 0.087019 1.750000 -0.199760
|
||||
v 0.100481 1.562500 -0.250000
|
||||
v 0.087019 1.375000 -0.199760
|
||||
v 0.050240 1.237741 -0.062500
|
||||
v -0.050240 1.887259 -0.062500
|
||||
v -0.087019 1.750000 -0.199760
|
||||
v -0.100481 1.562500 -0.250000
|
||||
v -0.087019 1.375000 -0.199760
|
||||
v -0.050240 1.237741 -0.062500
|
||||
v -0.137260 1.887259 -0.012260
|
||||
v -0.237740 1.750000 -0.112741
|
||||
v -0.274519 1.562500 -0.149519
|
||||
v -0.237740 1.375000 -0.112741
|
||||
v -0.137260 1.237741 -0.012260
|
||||
v -0.187500 1.887259 0.074759
|
||||
v -0.324760 1.750000 0.037981
|
||||
v -0.375000 1.562500 0.024519
|
||||
v -0.324760 1.375000 0.037981
|
||||
v -0.187500 1.237741 0.074759
|
||||
v -0.187500 1.887259 0.175240
|
||||
v -0.324760 1.750000 0.212019
|
||||
v -0.375000 1.562500 0.225481
|
||||
v -0.324760 1.375000 0.212019
|
||||
v -0.187500 1.237741 0.175240
|
||||
v -0.137260 1.887259 0.262259
|
||||
v -0.237740 1.750000 0.362740
|
||||
v -0.274519 1.562500 0.399519
|
||||
v -0.237740 1.375000 0.362740
|
||||
v -0.137260 1.237741 0.262259
|
||||
v -0.050240 1.887259 0.312500
|
||||
v -0.087019 1.750000 0.449759
|
||||
v -0.100481 1.562500 0.500000
|
||||
v -0.087019 1.375000 0.449759
|
||||
v -0.050240 1.237741 0.312500
|
||||
v 0.050240 1.887259 0.312500
|
||||
v 0.087019 1.750000 0.449759
|
||||
v 0.100481 1.562500 0.500000
|
||||
v 0.087019 1.375000 0.449759
|
||||
v 0.050240 1.237741 0.312500
|
||||
v 0.137260 1.887259 0.262259
|
||||
v 0.237740 1.750000 0.362740
|
||||
v 0.274519 1.562500 0.399519
|
||||
v 0.237740 1.375000 0.362740
|
||||
v 0.137260 1.237741 0.262259
|
||||
v 0.187500 1.887259 0.175240
|
||||
v 0.324760 1.750000 0.212019
|
||||
v 0.375000 1.562500 0.225481
|
||||
v 0.324760 1.375000 0.212019
|
||||
v 0.187500 1.237741 0.175240
|
||||
vn 0.2241 0.9659 -0.1294
|
||||
vn 0.6124 0.7071 -0.3536
|
||||
vn 0.8365 0.2588 -0.4830
|
||||
vn 0.8365 -0.2588 -0.4830
|
||||
vn 0.6124 -0.7071 -0.3536
|
||||
vn 0.2241 -0.9659 -0.1294
|
||||
vn 0.1294 0.9659 -0.2241
|
||||
vn 0.3536 0.7071 -0.6124
|
||||
vn 0.4830 0.2588 -0.8365
|
||||
vn 0.4830 -0.2588 -0.8365
|
||||
vn 0.3536 -0.7071 -0.6124
|
||||
vn 0.1294 -0.9659 -0.2241
|
||||
vn -0.0000 0.9659 -0.2588
|
||||
vn -0.0000 0.7071 -0.7071
|
||||
vn -0.0000 0.2588 -0.9659
|
||||
vn -0.0000 -0.2588 -0.9659
|
||||
vn -0.0000 -0.7071 -0.7071
|
||||
vn -0.0000 -0.9659 -0.2588
|
||||
vn -0.1294 0.9659 -0.2241
|
||||
vn -0.3536 0.7071 -0.6124
|
||||
vn -0.4830 0.2588 -0.8365
|
||||
vn -0.4830 -0.2588 -0.8365
|
||||
vn -0.3536 -0.7071 -0.6124
|
||||
vn -0.1294 -0.9659 -0.2241
|
||||
vn -0.2241 0.9659 -0.1294
|
||||
vn -0.6124 0.7071 -0.3536
|
||||
vn -0.8365 0.2588 -0.4830
|
||||
vn -0.8365 -0.2588 -0.4830
|
||||
vn -0.6124 -0.7071 -0.3536
|
||||
vn -0.2241 -0.9659 -0.1294
|
||||
vn -0.2588 0.9659 -0.0000
|
||||
vn -0.7071 0.7071 -0.0000
|
||||
vn -0.9659 0.2588 -0.0000
|
||||
vn -0.9659 -0.2588 -0.0000
|
||||
vn -0.7071 -0.7071 -0.0000
|
||||
vn -0.2588 -0.9659 -0.0000
|
||||
vn -0.2241 0.9659 0.1294
|
||||
vn -0.6124 0.7071 0.3536
|
||||
vn -0.8365 0.2588 0.4830
|
||||
vn -0.8365 -0.2588 0.4830
|
||||
vn -0.6124 -0.7071 0.3536
|
||||
vn -0.2241 -0.9659 0.1294
|
||||
vn -0.1294 0.9659 0.2241
|
||||
vn -0.3536 0.7071 0.6124
|
||||
vn -0.4830 0.2588 0.8365
|
||||
vn -0.4830 -0.2588 0.8365
|
||||
vn -0.3536 -0.7071 0.6124
|
||||
vn -0.1294 -0.9659 0.2241
|
||||
vn -0.0000 0.9659 0.2588
|
||||
vn -0.0000 0.7071 0.7071
|
||||
vn -0.0000 0.2588 0.9659
|
||||
vn -0.0000 -0.2588 0.9659
|
||||
vn -0.0000 -0.7071 0.7071
|
||||
vn -0.0000 -0.9659 0.2588
|
||||
vn 0.1294 0.9659 0.2241
|
||||
vn 0.3536 0.7071 0.6124
|
||||
vn 0.4830 0.2588 0.8365
|
||||
vn 0.4830 -0.2588 0.8365
|
||||
vn 0.3536 -0.7071 0.6124
|
||||
vn 0.1294 -0.9659 0.2241
|
||||
vn 0.2241 0.9659 0.1294
|
||||
vn 0.6124 0.7071 0.3536
|
||||
vn 0.8365 0.2588 0.4830
|
||||
vn 0.8365 -0.2588 0.4830
|
||||
vn 0.6124 -0.7071 0.3536
|
||||
vn 0.2241 -0.9659 0.1294
|
||||
vn 0.2588 0.9659 -0.0000
|
||||
vn 0.7071 0.7071 -0.0000
|
||||
vn 0.9659 0.2588 -0.0000
|
||||
vn 0.9659 -0.2588 -0.0000
|
||||
vn 0.7071 -0.7071 -0.0000
|
||||
vn 0.2588 -0.9659 -0.0000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.080000 1.000000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.080000 0.750000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.080000 0.500000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.080000 0.250000
|
||||
vt 0.080000 0.000000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.360000 1.000000
|
||||
vt 0.360000 0.750000
|
||||
vt 0.360000 0.500000
|
||||
vt 0.360000 0.250000
|
||||
vt 0.360000 0.000000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.640000 1.000000
|
||||
vt 0.640000 0.750000
|
||||
vt 0.640000 0.500000
|
||||
vt 0.640000 0.250000
|
||||
vt 0.640000 0.000000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.920000 1.000000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.920000 0.750000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.920000 0.500000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.920000 0.250000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.920000 0.000000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 19/19/12 24/24/12 18/18/12
|
||||
f 19/19/13 20/20/13 25/25/13 24/24/13
|
||||
f 20/20/14 21/21/14 26/26/14 25/25/14
|
||||
f 21/21/15 22/22/15 27/27/15 26/26/15
|
||||
f 22/22/16 23/23/16 28/28/16 27/27/16
|
||||
f 28/28/17 23/23/17 17/17/17
|
||||
f 24/24/18 29/29/18 18/18/18
|
||||
f 24/24/19 25/25/19 30/30/19 29/29/19
|
||||
f 25/25/20 26/26/20 31/31/20 30/30/20
|
||||
f 26/26/21 27/27/21 32/32/21 31/31/21
|
||||
f 27/27/22 28/28/22 33/33/22 32/32/22
|
||||
f 33/33/23 28/28/23 17/17/23
|
||||
f 29/29/24 34/34/24 18/18/24
|
||||
f 29/29/25 30/30/25 35/35/25 34/34/25
|
||||
f 30/30/26 31/31/26 36/36/26 35/35/26
|
||||
f 31/31/27 32/32/27 37/37/27 36/36/27
|
||||
f 32/32/28 33/33/28 38/38/28 37/37/28
|
||||
f 38/38/29 33/33/29 17/17/29
|
||||
f 34/34/30 39/39/30 18/18/30
|
||||
f 34/34/31 35/35/31 40/40/31 39/39/31
|
||||
f 35/35/32 36/36/32 41/41/32 40/40/32
|
||||
f 36/36/33 37/37/33 42/42/33 41/41/33
|
||||
f 37/37/34 38/38/34 43/43/34 42/42/34
|
||||
f 43/43/35 38/38/35 17/17/35
|
||||
f 39/39/36 44/44/36 18/18/36
|
||||
f 39/39/37 40/40/37 45/45/37 44/44/37
|
||||
f 40/40/38 41/41/38 46/46/38 45/45/38
|
||||
f 41/41/39 42/42/39 47/47/39 46/46/39
|
||||
f 42/42/40 43/43/40 48/48/40 47/47/40
|
||||
f 48/48/41 43/43/41 17/17/41
|
||||
f 44/44/42 49/49/42 18/18/42
|
||||
f 44/44/43 45/45/43 50/50/43 49/49/43
|
||||
f 45/45/44 46/46/44 51/51/44 50/50/44
|
||||
f 46/46/45 47/47/45 52/52/45 51/51/45
|
||||
f 47/47/46 48/48/46 53/53/46 52/52/46
|
||||
f 53/53/47 48/48/47 17/17/47
|
||||
f 49/49/48 54/54/48 18/18/48
|
||||
f 49/49/49 50/50/49 55/56/49 54/54/49
|
||||
f 50/50/50 51/51/50 56/58/50 55/56/50
|
||||
f 51/51/51 52/52/51 57/60/51 56/58/51
|
||||
f 52/52/52 53/53/52 58/63/52 57/60/52
|
||||
f 58/63/53 53/53/53 17/17/53
|
||||
f 54/54/54 59/64/54 18/18/54
|
||||
f 54/55/55 55/57/55 60/66/55 59/65/55
|
||||
f 55/57/56 56/59/56 61/67/56 60/66/56
|
||||
f 56/59/57 57/61/57 62/68/57 61/67/57
|
||||
f 57/61/58 58/62/58 63/69/58 62/68/58
|
||||
f 63/70/59 58/63/59 17/17/59
|
||||
f 59/64/60 64/71/60 18/18/60
|
||||
f 59/65/61 60/66/61 65/73/61 64/72/61
|
||||
f 60/66/62 61/67/62 66/74/62 65/73/62
|
||||
f 61/67/63 62/68/63 67/75/63 66/74/63
|
||||
f 62/68/64 63/69/64 68/76/64 67/75/64
|
||||
f 68/77/65 63/70/65 17/17/65
|
||||
f 64/71/66 69/79/66 18/18/66
|
||||
f 64/72/67 65/73/67 70/80/67 69/78/67
|
||||
f 65/73/68 66/74/68 71/82/68 70/80/68
|
||||
f 66/74/69 67/75/69 72/84/69 71/82/69
|
||||
f 67/75/70 68/76/70 73/86/70 72/84/70
|
||||
f 73/87/71 68/77/71 17/17/71
|
||||
f 69/79/72 74/88/72 18/18/72
|
||||
f 69/79/73 70/81/73 75/89/73 74/88/73
|
||||
f 70/81/74 71/83/74 76/90/74 75/89/74
|
||||
f 71/83/75 72/85/75 77/91/75 76/90/75
|
||||
f 72/85/76 73/87/76 78/92/76 77/91/76
|
||||
f 78/92/77 73/87/77 17/17/77
|
||||
f 74/88/78 19/19/78 18/18/78
|
||||
f 74/88/79 75/89/79 20/20/79 19/19/79
|
||||
f 75/89/80 76/90/80 21/21/80 20/20/80
|
||||
f 76/90/81 77/91/81 22/22/81 21/21/81
|
||||
f 77/91/82 78/92/82 23/23/82 22/22/82
|
||||
f 23/23/83 78/92/83 17/17/83
|
||||
o left_arm_1
|
||||
v 0.296875 1.062108 0.139389
|
||||
v 0.296875 0.981759 0.043633
|
||||
v 0.296875 0.726963 0.420609
|
||||
v 0.296875 0.646615 0.324853
|
||||
v 0.171875 0.981759 0.043633
|
||||
v 0.171875 1.062108 0.139389
|
||||
v 0.171875 0.646615 0.324853
|
||||
v 0.171875 0.726963 0.420609
|
||||
vn -0.0000 -0.6428 -0.7660
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 0.6428 0.7660
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 0.7660 -0.6428
|
||||
vn -0.0000 -0.7660 0.6428
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 82/96/84 85/99/84 83/97/84 80/94/84
|
||||
f 81/95/85 82/96/85 80/94/85 79/93/85
|
||||
f 86/100/86 81/95/86 79/93/86 84/98/86
|
||||
f 85/99/87 86/100/87 84/98/87 83/97/87
|
||||
f 84/98/88 79/93/88 80/94/88 83/97/88
|
||||
f 85/99/89 82/96/89 81/95/89 86/100/89
|
||||
o left_arm_2
|
||||
v 0.277035 0.746507 0.455107
|
||||
v 0.319624 0.742780 0.337645
|
||||
v 0.266140 0.621982 0.455107
|
||||
v 0.308730 0.618256 0.337645
|
||||
v -0.323956 0.799086 0.102507
|
||||
v -0.366546 0.802813 0.219968
|
||||
v -0.334850 0.674562 0.102507
|
||||
v -0.377440 0.678288 0.219968
|
||||
vn 0.3407 -0.0298 -0.9397
|
||||
vn 0.9361 -0.0819 0.3420
|
||||
vn -0.3407 0.0298 0.9397
|
||||
vn -0.9361 0.0819 -0.3420
|
||||
vn 0.0872 0.9962 -0.0000
|
||||
vn -0.0872 -0.9962 -0.0000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 90/104/90 93/107/90 91/105/90 88/102/90
|
||||
f 89/103/91 90/104/91 88/102/91 87/101/91
|
||||
f 94/108/92 89/103/92 87/101/92 92/106/92
|
||||
f 93/107/93 94/108/93 92/106/93 91/105/93
|
||||
f 92/106/94 87/101/94 88/102/94 91/105/94
|
||||
f 93/107/95 90/104/95 89/103/95 94/108/95
|
||||
o left_foot
|
||||
v 0.312500 0.125000 0.312500
|
||||
v 0.312500 0.125000 -0.125000
|
||||
v 0.312500 0.000000 0.312500
|
||||
v 0.312500 -0.000000 -0.125000
|
||||
v 0.125000 0.125000 -0.125000
|
||||
v 0.125000 0.125000 0.312500
|
||||
v 0.125000 -0.000000 -0.125000
|
||||
v 0.125000 0.000000 0.312500
|
||||
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
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 98/112/96 101/115/96 99/113/96 96/110/96
|
||||
f 97/111/97 98/112/97 96/110/97 95/109/97
|
||||
f 102/116/98 97/111/98 95/109/98 100/114/98
|
||||
f 101/115/99 102/116/99 100/114/99 99/113/99
|
||||
f 100/114/100 95/109/100 96/110/100 99/113/100
|
||||
f 101/115/101 98/112/101 97/111/101 102/116/101
|
||||
o left_leg
|
||||
v 0.312500 0.375000 0.125000
|
||||
v 0.312500 0.375000 -0.125000
|
||||
v 0.312500 0.125000 0.125000
|
||||
v 0.312500 0.125000 -0.125000
|
||||
v 0.125000 0.375000 -0.125000
|
||||
v 0.125000 0.375000 0.125000
|
||||
v 0.125000 0.125000 -0.125000
|
||||
v 0.125000 0.125000 0.125000
|
||||
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
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 106/120/102 109/123/102 107/121/102 104/118/102
|
||||
f 105/119/103 106/120/103 104/118/103 103/117/103
|
||||
f 110/124/104 105/119/104 103/117/104 108/122/104
|
||||
f 109/123/105 110/124/105 108/122/105 107/121/105
|
||||
o neck
|
||||
v 0.093750 1.312500 0.093750
|
||||
v 0.093750 1.312500 -0.093750
|
||||
v 0.093750 1.125000 0.093750
|
||||
v 0.093750 1.125000 -0.093750
|
||||
v -0.093750 1.312500 -0.093750
|
||||
v -0.093750 1.312500 0.093750
|
||||
v -0.093750 1.125000 -0.093750
|
||||
v -0.093750 1.125000 0.093750
|
||||
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
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 114/128/106 117/131/106 115/129/106 112/126/106
|
||||
f 113/127/107 114/128/107 112/126/107 111/125/107
|
||||
f 118/132/108 113/127/108 111/125/108 116/130/108
|
||||
f 117/131/109 118/132/109 116/130/109 115/129/109
|
||||
o right_arm_1
|
||||
v -0.171875 1.062108 0.139389
|
||||
v -0.171875 0.981759 0.043633
|
||||
v -0.171875 0.726963 0.420609
|
||||
v -0.171875 0.646615 0.324853
|
||||
v -0.296875 0.981759 0.043633
|
||||
v -0.296875 1.062108 0.139389
|
||||
v -0.296875 0.646615 0.324853
|
||||
v -0.296875 0.726963 0.420609
|
||||
vn -0.0000 -0.6428 -0.7660
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 0.6428 0.7660
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 0.7660 -0.6428
|
||||
vn -0.0000 -0.7660 0.6428
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 122/136/110 125/139/110 123/137/110 120/134/110
|
||||
f 121/135/111 122/136/111 120/134/111 119/133/111
|
||||
f 126/140/112 121/135/112 119/133/112 124/138/112
|
||||
f 125/139/113 126/140/113 124/138/113 123/137/113
|
||||
f 124/138/114 119/133/114 120/134/114 123/137/114
|
||||
f 125/139/115 122/136/115 121/135/115 126/140/115
|
||||
o right_arm_2
|
||||
v -0.000139 0.927813 0.321505
|
||||
v -0.035159 0.903291 0.204044
|
||||
v 0.071559 0.825419 0.321505
|
||||
v 0.036538 0.800897 0.204044
|
||||
v -0.323816 0.701171 0.332301
|
||||
v -0.288795 0.725693 0.449763
|
||||
v -0.252119 0.598777 0.332301
|
||||
v -0.217098 0.623299 0.449763
|
||||
vn -0.2802 -0.1962 -0.9397
|
||||
vn 0.7698 0.5390 -0.3420
|
||||
vn 0.2802 0.1962 0.9397
|
||||
vn -0.7698 -0.5390 0.3420
|
||||
vn -0.5736 0.8192 -0.0000
|
||||
vn 0.5736 -0.8192 -0.0000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 130/144/116 133/147/116 131/145/116 128/142/116
|
||||
f 129/143/117 130/144/117 128/142/117 127/141/117
|
||||
f 134/148/118 129/143/118 127/141/118 132/146/118
|
||||
f 133/147/119 134/148/119 132/146/119 131/145/119
|
||||
f 132/146/120 127/141/120 128/142/120 131/145/120
|
||||
f 133/147/121 130/144/121 129/143/121 134/148/121
|
||||
o right_arm_3
|
||||
v 0.378429 0.823872 0.211723
|
||||
v 0.336690 0.833125 0.094262
|
||||
v 0.351374 0.701835 0.211723
|
||||
v 0.309635 0.711088 0.094262
|
||||
v -0.064681 0.922107 0.243895
|
||||
v -0.022942 0.912853 0.361357
|
||||
v -0.091736 0.800070 0.243895
|
||||
v -0.049997 0.790816 0.361357
|
||||
vn -0.3339 0.0740 -0.9397
|
||||
vn 0.9174 -0.2034 -0.3420
|
||||
vn 0.3339 -0.0740 0.9397
|
||||
vn -0.9174 0.2034 0.3420
|
||||
vn 0.2164 0.9763 -0.0000
|
||||
vn -0.2164 -0.9763 -0.0000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 138/152/122 141/155/122 139/153/122 136/150/122
|
||||
f 137/151/123 138/152/123 136/150/123 135/149/123
|
||||
f 142/156/124 137/151/124 135/149/124 140/154/124
|
||||
f 141/155/125 142/156/125 140/154/125 139/153/125
|
||||
f 140/154/126 135/149/126 136/150/126 139/153/126
|
||||
f 141/155/127 138/152/127 137/151/127 142/156/127
|
||||
o right_foot
|
||||
v -0.125000 0.125000 0.312500
|
||||
v -0.125000 0.125000 -0.125000
|
||||
v -0.125000 0.000000 0.312500
|
||||
v -0.125000 -0.000000 -0.125000
|
||||
v -0.312500 0.125000 -0.125000
|
||||
v -0.312500 0.125000 0.312500
|
||||
v -0.312500 -0.000000 -0.125000
|
||||
v -0.312500 0.000000 0.312500
|
||||
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
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 146/160/128 149/163/128 147/161/128 144/158/128
|
||||
f 145/159/129 146/160/129 144/158/129 143/157/129
|
||||
f 150/164/130 145/159/130 143/157/130 148/162/130
|
||||
f 149/163/131 150/164/131 148/162/131 147/161/131
|
||||
f 148/162/132 143/157/132 144/158/132 147/161/132
|
||||
f 149/163/133 146/160/133 145/159/133 150/164/133
|
||||
o right_leg
|
||||
v -0.125000 0.375000 0.125000
|
||||
v -0.125000 0.375000 -0.125000
|
||||
v -0.125000 0.125000 0.125000
|
||||
v -0.125000 0.125000 -0.125000
|
||||
v -0.312500 0.375000 -0.125000
|
||||
v -0.312500 0.375000 0.125000
|
||||
v -0.312500 0.125000 -0.125000
|
||||
v -0.312500 0.125000 0.125000
|
||||
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
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
vt 0.100000 0.900000
|
||||
s 0
|
||||
f 154/168/134 157/171/134 155/169/134 152/166/134
|
||||
f 153/167/135 154/168/135 152/166/135 151/165/135
|
||||
f 158/172/136 153/167/136 151/165/136 156/170/136
|
||||
f 157/171/137 158/172/137 156/170/137 155/169/137
|
||||
BIN
mods/player_api/models/susman.png
Normal file
|
After Width: | Height: | Size: 147 B |
@@ -1,2 +0,0 @@
|
||||
Wuzzy <Wuzzy@disroot.org> <Wuzzy2@mail.ru>
|
||||
Wuzzy <Wuzzy@disroot.org> <almikes@aol.com>
|
||||
@@ -1,16 +0,0 @@
|
||||
MIT License
|
||||
Copyright (c) 2017-2020 Elijah Duffy and Wuzzy
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
||||
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,39 +0,0 @@
|
||||
# Schematic Editor [`schemedit`]
|
||||
|
||||
## Version
|
||||
1.7.1
|
||||
|
||||
## Description
|
||||
This is a mod which allows you to edit and export schematics (`.mts` files).
|
||||
|
||||
This mod works in Minetest 5.0.0 or later, but recommended is version 5.1.0
|
||||
or later.
|
||||
|
||||
It supports node probabilities, forced node placement and slice probabilities.
|
||||
|
||||
It adds 3 items:
|
||||
|
||||
* Schematic Creator: Used to mark a region and export or import it as schematic
|
||||
* Schematic Void: Marks a position in a schematic which should not replace anything when placed as a schematic
|
||||
* Schematic Node Probability Tool: Set per-node probabilities and forced node placement
|
||||
|
||||
Note: The import feature requires Minetest 5.1.0 or later.
|
||||
|
||||
It also adds these server commands:
|
||||
|
||||
* `placeschem` to place a schematic
|
||||
* `mts2lua` to convert .mts files to .lua files (Lua code)
|
||||
|
||||
There's also a setting `schemedit_export_lua` to enable automatic export to .lua files.
|
||||
|
||||
## Usage help
|
||||
This mod assumes you already have a basic understanding about how schematics in Minetest work.
|
||||
If not, refer to the Minetest Lua API documentation to understand more about schematics.
|
||||
|
||||
To learn how to use all the items in this mod, read `USAGE.md`.
|
||||
|
||||
You can also find the same help texts in-game if you if you use the optional Help modpack
|
||||
(mods `doc` and `doc_items`).
|
||||
|
||||
## License of everything
|
||||
MIT License
|
||||
@@ -1,44 +0,0 @@
|
||||
## Usage help
|
||||
In this section you'll learn how to use the items of this mod.
|
||||
Note: If you have the `doc` and `doc_items` mods installed, you can also access the same help texts in-game (possibly translated).
|
||||
|
||||
### Schematic Creator
|
||||
The schematic creator is used to save a region of the world into a schematic file (.mts).
|
||||
|
||||
#### Usage
|
||||
To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “`schematic_override`” privilege.
|
||||
To save a region, use the block, enter the size and a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.
|
||||
|
||||
Importing a schematic will load a schematic from the world directory, place it in front of the schematic creator and sets probability and force-place data accordingly.
|
||||
The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.
|
||||
|
||||
Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occurs only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 = bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occur always.
|
||||
|
||||
With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.
|
||||
|
||||
|
||||
### Schematic Node Probability Tool
|
||||
This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.
|
||||
It allows you to set two things:
|
||||
1) Set probability: Chance for any particular node to be actually placed (default: always placed)
|
||||
2) Enable force placement: These nodes replace node other than air and ignore when placed in a schematic (default: off)
|
||||
|
||||
#### Usage
|
||||
|
||||
BASIC USAGE:
|
||||
Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.
|
||||
Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.
|
||||
|
||||
NODE HUD:
|
||||
To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.
|
||||
To disable the node HUD, unselect the tool or hit “place” while not pointing anything.
|
||||
|
||||
UPDATING THE NODE HUD:
|
||||
The node HUD is not updated automatically and may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simultaneously. If you sneak-punch a schematic creator, then the node HUD is updated for all nodes within the schematic creator's region, even if this region is very big.
|
||||
|
||||
|
||||
### Schematic Void
|
||||
This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.
|
||||
|
||||
#### Usage
|
||||
Just place the schematic void like any other block and use the schematic creator to save a portion of the world.
|
||||
@@ -1,85 +0,0 @@
|
||||
# textdomain: schemedit
|
||||
<world path>=<Weltpfad>
|
||||
Insufficient privileges! You need the “@1” privilege to use this.=Unzureichende Privilegien! Sie benötigen das „@1“-Privileg, um dies benutzen zu können.
|
||||
Exported schematic to @1=Schematic nach @1 exportiert
|
||||
Failed to export schematic to @1=Schematic konnte nicht nach @1 exportiert werden
|
||||
Probability: @1=Wahrscheinlichkeit: @1
|
||||
Not Set=Nicht gesetzt
|
||||
Force placement=Platzierung erzwingen
|
||||
Import schematic=Schematic importieren
|
||||
Main=Grundeinstellungen
|
||||
Hide border=Rand verbergen
|
||||
Show border=Rand anzeigen
|
||||
Position: @1=Position: @1
|
||||
Owner: @1=Eigentümer: @1
|
||||
Schematic name: @1=Schematic-Name: @1
|
||||
Size: @1=Größe: @1
|
||||
Schematic name:=Schematic-Name:
|
||||
OK=OK
|
||||
Save schematic name=Schematic-Name speichern
|
||||
Export schematic=Schematic exportieren
|
||||
Export/import path:@n@1=Export-/Importpfad:@n@1
|
||||
<name>=<Name>
|
||||
Air to voids=Luft zu Lücken
|
||||
Voids to air=Lücken zu Luft
|
||||
Turn all air nodes into schematic void nodes=Alle Luft-Nodes zu Schematic-Lücken umwandeln
|
||||
Turn all schematic void nodes into air nodes=Alle Schematic-Lücken zu Luft-Nodes umwandeln
|
||||
X size:=X-Größe:
|
||||
Y size:=Y-Größe:
|
||||
Z size:=Z-Größe:
|
||||
Save size=Größe speichern
|
||||
Help=Hilfe
|
||||
Could not emerge area from @1 to @2: Emerging was cancelled. Nothing was exported.=Gebiet von @1 zu @2 konnte nicht emergt werden: Emergen wurde abgebrochen. Nichts wurde exportiert.
|
||||
Could not emerge area from @1 to @2: Error while emerging. Nothing was exported.=Gebiet von @1 zu @2 konnte nicht emergt werden: Fehler beim Emergen. Nichts wurde exportiert.
|
||||
Could not emerge area from @1 to @2: Unknown action in emerge callback. Nothing was exported.=Gebiet von @1 zu @2 konnte nicht emergt werden: Unbekannte Aktion im Emerge-Callback. Nichts wurde exportiert.
|
||||
Imported schematic from @1=Schematic von @1 importiert
|
||||
Failed to import schematic from @1=Schematic konnte nicht von @1 importiert werden
|
||||
Y Slices=Y-Scheiben
|
||||
Y @= @1; Probability @= @2=Y @= @1; Wahrscheinlichkeit @= @2
|
||||
Add=Hinzufügen
|
||||
Apply=Anwenden
|
||||
Y position (max. @1):=Y-Position (max. @1):
|
||||
Probability (0-255):=Wahrscheinlichkeit (0-255):
|
||||
Cancel=Abbrechen
|
||||
Add slice=Neue Scheibe
|
||||
Remove slice=Scheibe entfernen
|
||||
Edit slice=Scheibe anpassen
|
||||
Back=Zurück
|
||||
Schematic Node Probability Tool=Schematic-Node-Wahrscheinlichkeitswerkzeug
|
||||
Probability (0-255)=Wahrscheinlichkeit (0-255)
|
||||
Probability that the node will be placed=Wahrscheinlichkeit, dass der Node platizert wird
|
||||
If enabled, the node will replace nodes other than air and ignore=Wenn aktiviert, wird der Node alle Nodes außer Luft und Ignorieren ersetzen
|
||||
Allows you to access schemedit nodes not owned by you=Damit können Sie auf Schemedit-Nodes, die ihnen nicht gehören, zugreifen
|
||||
Importing a schematic will load a schematic from the world directory, place it in front of the schematic creator and sets probability and force-place data accordingly.=Das Importieren eines Schematics wird eine Schematicdatei aus dem Weltverzeichnis laden, sie vor dem Schematic-Macher platzieren und die Wahrscheinlichkeits- und Zwangsplatzierungsdaten entsprechend setzen.
|
||||
Schematic Creator=Schematic-Macher
|
||||
The schematic creator is used to save a region of the world into a schematic file (.mts).=Der Schematic-Macher wird benutzt, um eine Region der Welt in eine Schematic-Datei (.mts) zu speichern.
|
||||
To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “schematic_override” privilege.=Um anzufangen, platzieren Sie den Block direkt vor einer beliebigen unteren linken Ecke des Gebäudes, das Sie speichern möchten. Dieser Block kann nur vom Platzierer oder von Spielern mit dem „schematic_override“-Privileg benutzt werden.
|
||||
To save a region, use the block, enter the size and a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.=Um eine Region zu speichern, benutzen Sie den Block, geben Sie die Größe und einen Schematic-Namen ein und klicken Sie auf „Schematic exportieren“. Die Datei wird immer im Weltverzeichnis gespeichert. Beachten Sie, dass Sie diesen Namen im „/placeschem“-Befehl benutzen können, um das Schematic erneut zu platzieren.
|
||||
The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.=Die anderen Funktionen des Schematic-Machers sind optional und werden für Zufälligkeit und Feinjustierungen benutzt.
|
||||
Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occurs only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 @= bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occur always.=Y-Scheiben werden benutzt, um ganze Scheiben mit einer gewissen Wahrscheinlichkeit auszulassen. Für jede Scheibe der Schematic-Region entlang der Y-Achse können Sie festlegen, dass sie nur mit einer gewissen Wahrscheinlichkeit auftritt. In der Registerkarte „Y-Scheiben“ müssen Sie die Höhe der Y-Scheibe festlegen (0 @= Boden) sowie eine Wahrscheinlichkeit zwischen 0 und 255 (255 steht für 100%). Standardmäßig treten alle Y-Scheiben immer auf.
|
||||
With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.=Mit einem Schematic-Node-Wahrscheinlichkeitswerkzeug können Sie die Wahrscheinlichkeit für jeden Node setzen und sie dazu aktivieren, alle Nodes zu ersetzen, wenn sie als Schematic platziert werden. Dieses Werkzeug muss vor dem Dateiexport benutzt werden.
|
||||
(owned by @1)=(Eigentümer: @1)
|
||||
This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.=Dies ist ein fortgeschrittenes Werkzeug, der nur sinnvoll in Verwendung mit einem Schematic-Macher benutzt werden kann. Er wird benutzt, um die Art und Weise, wie Nodes aus einem Schematic platziert werden, feinzujustieren.
|
||||
It allows you to set two things:=Damit können Sie zwei Dinge setzen:
|
||||
1) Set probability: Chance for any particular node to be actually placed (default: always placed)=1) Wahrscheinlichkeit setzen: Wahrscheinlichkeit für einen bestimmten Node, dass er tatsächlich platziert wird (Standard: immer platziert)
|
||||
2) Enable force placement: These nodes replace node other than air and ignore when placed in a schematic (default: off)=2) Zwangsplatzierung aktivieren: Diese Nodes ersetzen alle Nodes außer Luft und Ignorieren, wenn Sie in einem Schematic platziert werden (Standard: aus)
|
||||
BASIC USAGE:=GRUNDLEGENDE BENUTZUNG:
|
||||
Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.=Schlagen Sie zu, um das Werkzeug zu konfigurieren. Wählen Sie eine Wahrscheinlichkeit (0-255; 255 steht für 100%) und aktivieren oder deaktivieren Sie die erzwungene Platzierung. Platzieren Sie nun das Werkzeug auf einen beliebigen Node, um diese Werte auf dem Node anzuwenden. Diese Information bleibt im Node erhalten, bis er zerstört oder erneut vom Werkzeug geändert wird. Dieses Werkzeug hat keine Auswirkung auf Schematic-Lücken.
|
||||
Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.=Anschließend können Sie einen Schematic-Macher benutzen, um eine Region wie gewöhnlich zu speichern, die Nodes werden nun mit den besonderen Node-Einstellungen gespeichert.
|
||||
NODE HUD:=NODE-HUD:
|
||||
To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.=Um Ihnen dabei zu helfen, sich die Node-Werte zu merken, werden die Nodes mit besonderen Werten in der Benutzeroberfläche gekennzeichnet. Die erste Zeile zeigt die Wahrscheinlichkeit und die Zwangsplatzierung (mit „[F]“) an. Die zweite Zeile zeigt die momentane Entfernung zum Node an. Nodes mit den Standardeinstellungen und Schematic-Lücken werden nicht gekennzeichnet.
|
||||
To disable the node HUD, unselect the tool or hit “place” while not pointing anything.=Um die Node-HUD zu deaktivieren, wählen Sie das Werkzeug ab oder drücken Sie die Platzierentaste, während Sie auf nichts zeigen.
|
||||
UPDATING THE NODE HUD:=NODE-HUD AKTUALISIEREN:
|
||||
The node HUD is not updated automatically and may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simultaneously. If you sneak-punch a schematic creator, then the node HUD is updated for all nodes within the schematic creator's region, even if this region is very big.=Die Node-HUD wird nicht automatisch aktualisiert und kann veraltet sein. Die Node-HUD wird nur die HUD für Nodes in Ihrer Nähe aktualisieren oder wenn Sie das Werkzeug benutzen oder gleichzeitig die Schlag- und Schleichtaste drücken. Wenn Sie auf einen Schematic-Macher schleichschlagen, wird die Node-HUD für alle Nodes innerhalb der Region des Schematic-Machers aktualisiert, selbst, wenn diese Region sehr groß ist.
|
||||
Schematic Void=Schematic-Lücke
|
||||
This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.=Dies ist ein Hilfsblock, der bei der Erstellung von Schematic-Dateien benutzt wird. Er sollte zusammen mit einem Schematic-Macher benutzt werden. Wenn ein Schematic gespeichert wird, werden alle Nodes mit einer Schematic-Lücke unverändert gelassen, wenn das Schematic erneut platziert wird. Technisch gesehen ist dieses Verhalten identisch mit einem Block, der eine Node-Wahrscheinlichkeit von 0 hat.
|
||||
Just place the schematic void like any other block and use the schematic creator to save a portion of the world.=Platzieren Sie einfach die Schematic-Lücke wie jeden anderen Block und benutzen Sie den Schematic-Macher, um einen Teil der Welt zu speichern.
|
||||
Place schematic at the position specified or the current player position (loaded from @1). “-c” will clear the area first=Schematic an der angegebenen Position oder der aktuellen Spielerposition platzieren (geladen von @1). Mit „-c“ wird das Gebiet zuerst geleert
|
||||
<schematic name>[.mts] [-c] [<x> <y> <z>]=<Schematic-Name>[.mts] [-c] [<x> <y> <z>]
|
||||
No schematic file specified.=Keinen Schematic-Namen angegeben.
|
||||
Schematic file could not be loaded!=Schematic-Datei konnte nicht geladen werden!
|
||||
List schematic files in world path=Schematic-Dateien im Weltpfad auflisten
|
||||
No schematic files.=Keine Schematic-Dateien.
|
||||
Convert .mts schematic file to .lua file (loaded from @1)=„.mts“-Schematicdatei zu „.lua“-Datei konvertieren (geladen von @1)
|
||||
<schematic name>[.mts] [comments]=<Schematic-Name>[.mts] [comments]
|
||||
Failed!=Fehlgeschlagen!
|
||||
@@ -1,85 +0,0 @@
|
||||
# textdomain: schemedit
|
||||
<world path>=
|
||||
Insufficient privileges! You need the “@1” privilege to use this.=
|
||||
Exported schematic to @1=
|
||||
Failed to export schematic to @1=
|
||||
Probability: @1=
|
||||
Not Set=
|
||||
Force placement=
|
||||
Import schematic=
|
||||
Main=
|
||||
Hide border=
|
||||
Show border=
|
||||
Position: @1=
|
||||
Owner: @1=
|
||||
Schematic name: @1=
|
||||
Size: @1=
|
||||
Schematic name:=
|
||||
OK=
|
||||
Save schematic name=
|
||||
Export schematic=
|
||||
Export/import path:@n@1=
|
||||
<name>=
|
||||
Air to voids=
|
||||
Voids to air=
|
||||
Turn all air nodes into schematic void nodes=
|
||||
Turn all schematic void nodes into air nodes=
|
||||
X size:=
|
||||
Y size:=
|
||||
Z size:=
|
||||
Save size=
|
||||
Help=
|
||||
Could not emerge area from @1 to @2: Emerging was cancelled. Nothing was exported.=
|
||||
Could not emerge area from @1 to @2: Error while emerging. Nothing was exported.=
|
||||
Could not emerge area from @1 to @2: Unknown action in emerge callback. Nothing was exported.=
|
||||
Imported schematic from @1=
|
||||
Failed to import schematic from @1=
|
||||
Y Slices=
|
||||
Y @= @1; Probability @= @2=
|
||||
Add=
|
||||
Apply=
|
||||
Y position (max. @1):=
|
||||
Probability (0-255):=
|
||||
Cancel=
|
||||
Add slice=
|
||||
Remove slice=
|
||||
Edit slice=
|
||||
Back=
|
||||
Schematic Node Probability Tool=
|
||||
Probability (0-255)=
|
||||
Probability that the node will be placed=
|
||||
If enabled, the node will replace nodes other than air and ignore=
|
||||
Allows you to access schemedit nodes not owned by you=
|
||||
Importing a schematic will load a schematic from the world directory, place it in front of the schematic creator and sets probability and force-place data accordingly.=
|
||||
Schematic Creator=
|
||||
The schematic creator is used to save a region of the world into a schematic file (.mts).=
|
||||
To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “schematic_override” privilege.=
|
||||
To save a region, use the block, enter the size and a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.=
|
||||
The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.=
|
||||
Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occurs only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 @= bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occur always.=
|
||||
With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.=
|
||||
(owned by @1)=
|
||||
This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.=
|
||||
It allows you to set two things:=
|
||||
1) Set probability: Chance for any particular node to be actually placed (default: always placed)=
|
||||
2) Enable force placement: These nodes replace node other than air and ignore when placed in a schematic (default: off)=
|
||||
BASIC USAGE:=
|
||||
Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.=
|
||||
Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.=
|
||||
NODE HUD:=
|
||||
To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.=
|
||||
To disable the node HUD, unselect the tool or hit “place” while not pointing anything.=
|
||||
UPDATING THE NODE HUD:=
|
||||
The node HUD is not updated automatically and may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simultaneously. If you sneak-punch a schematic creator, then the node HUD is updated for all nodes within the schematic creator's region, even if this region is very big.=
|
||||
Schematic Void=
|
||||
This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.=
|
||||
Just place the schematic void like any other block and use the schematic creator to save a portion of the world.=
|
||||
Place schematic at the position specified or the current player position (loaded from @1). “-c” will clear the area first=
|
||||
<schematic name>[.mts] [-c] [<x> <y> <z>]=
|
||||
No schematic file specified.=
|
||||
Schematic file could not be loaded!=
|
||||
List schematic files in world path=
|
||||
No schematic files.=
|
||||
Convert .mts schematic file to .lua file (loaded from @1)=
|
||||
<schematic name>[.mts] [comments]=
|
||||
Failed!=
|
||||
@@ -1,69 +0,0 @@
|
||||
-- This file adds a command for generating the schemedit usage help readme
|
||||
-- file, in Markdown format. The text is extracted from the metadata of
|
||||
-- the items. This is only used for development purposes, after the
|
||||
-- help text of any of the items was changed.
|
||||
|
||||
-- How to use: Temporarily set MAKE_README to true in init.lua, then
|
||||
-- start the game as admin and run “/make_schemedit_readme”. Copy the
|
||||
-- generated file back to the mod directory (USAGE.md).
|
||||
|
||||
-- Everything here is intentionally NOT translated because it is for text
|
||||
-- files only.
|
||||
|
||||
|
||||
-- Extract text from item definition
|
||||
local get_text = function(item, field)
|
||||
local text = minetest.registered_items[item][field]
|
||||
|
||||
-- Remove translation escapes
|
||||
text = string.gsub(text, "\x1BE", "")
|
||||
text = string.gsub(text, "\x1B%(T@schemedit%)", "")
|
||||
|
||||
-- Fix Markdown syntax error
|
||||
text = string.gsub(text, "schematic_override", "`schematic_override`")
|
||||
return text
|
||||
end
|
||||
|
||||
|
||||
-- Schemedit items to generate the readme from
|
||||
local items = { "creator", "probtool", "void" }
|
||||
|
||||
minetest.register_chatcommand("make_schemedit_readme", {
|
||||
description = "Generate the schemedit usage help readme file",
|
||||
privs = {server=true},
|
||||
func = function(name, param)
|
||||
|
||||
local readme = "## Usage help".."\n"
|
||||
readme = readme .. "In this section you'll learn how to use the items of this mod.".."\n"
|
||||
readme = readme .. "Note: If you have the `doc` and `doc_items` mods installed, you can also access the same help texts in-game (possibly translated).".."\n\n"
|
||||
|
||||
local entries = {}
|
||||
for i=1, #items do
|
||||
local item = items[i]
|
||||
local desc = get_text("schemedit:"..item, "description")
|
||||
local longdesc = get_text("schemedit:"..item, "_doc_items_longdesc")
|
||||
local usagehelp = get_text("schemedit:"..item, "_doc_items_usagehelp")
|
||||
|
||||
readme = readme .. "### "..desc.."\n"
|
||||
readme = readme .. longdesc .."\n\n"
|
||||
readme = readme .. "#### Usage\n"
|
||||
readme = readme .. usagehelp
|
||||
if i < #items then
|
||||
readme = readme .. "\n\n\n"
|
||||
end
|
||||
end
|
||||
|
||||
local path = minetest.get_worldpath().."/schemedit_readme.md"
|
||||
local file = io.open(path, "w")
|
||||
if not file then
|
||||
return false, "Failed to open file!"
|
||||
end
|
||||
local ok = file:write(readme)
|
||||
file:close()
|
||||
if ok then
|
||||
return true, "File written to: "..path
|
||||
else
|
||||
return false, "Failed to write file!"
|
||||
end
|
||||
end
|
||||
})
|
||||
@@ -1,5 +0,0 @@
|
||||
name = schemedit
|
||||
title = Schematic Editor
|
||||
optional_depends = doc
|
||||
description = Advanced tool for modders and advanced users to create and edit schematics.
|
||||
min_minetest_version = 5.0
|
||||
|
Before Width: | Height: | Size: 48 KiB |
@@ -1,8 +0,0 @@
|
||||
# If enabled, exporting a schematic will also create a .lua file
|
||||
# in addition to the .mts file.
|
||||
schemedit_export_lua (.lua file schematic export) bool false
|
||||
|
||||
# Specify the style of the visual border markers.
|
||||
# * edges: Show borders at the edges
|
||||
# * checkers: Checker pattern at the sides
|
||||
schemedit_border_style (Border style) enum edges edges,checkers
|
||||
|
Before Width: | Height: | Size: 102 B |
|
Before Width: | Height: | Size: 90 B |
|
Before Width: | Height: | Size: 97 B |
|
Before Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 89 B |
|
Before Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 159 B |
|
Before Width: | Height: | Size: 116 B |