Prehistoric 0.1.8
22
.gitattributes
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
*.sln merge=union
|
||||
*.csproj merge=union
|
||||
*.vbproj merge=union
|
||||
*.fsproj merge=union
|
||||
*.dbproj merge=union
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
215
.gitignore
vendored
Normal file
@ -0,0 +1,215 @@
|
||||
#################
|
||||
## Eclipse
|
||||
#################
|
||||
|
||||
*.pydevproject
|
||||
.project
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.classpath
|
||||
.settings/
|
||||
.loadpath
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# CDT-specific
|
||||
.cproject
|
||||
|
||||
# PDT-specific
|
||||
.buildpath
|
||||
|
||||
|
||||
#################
|
||||
## Visual Studio
|
||||
#################
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
build/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.log
|
||||
*.scc
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
*.pubxml
|
||||
|
||||
# NuGet Packages Directory
|
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||
#packages/
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
App_Data/*.mdf
|
||||
App_Data/*.ldf
|
||||
|
||||
#############
|
||||
## Windows detritus
|
||||
#############
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac crap
|
||||
.DS_Store
|
||||
|
||||
|
||||
#############
|
||||
## Python
|
||||
#############
|
||||
|
||||
*.py[co]
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist/
|
||||
build/
|
||||
eggs/
|
||||
parts/
|
||||
var/
|
||||
sdist/
|
||||
develop-eggs/
|
||||
.installed.cfg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
*.mo
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
257
archaetools/crafting.lua
Normal file
@ -0,0 +1,257 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Archae Tools - Crafting Recipes 0.1.0
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Axe -> Club
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'default:axe_wood',
|
||||
recipe = {
|
||||
{'default:stick', 'default:stick'},
|
||||
{'default:stick', 'default:stick'},
|
||||
{'', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Stone Axe
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'default:axe_stone',
|
||||
recipe = {
|
||||
{'flint:flintstone', 'flint:flintstone'},
|
||||
{'flint:flintstone', 'default:stick'},
|
||||
{'', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
if BONE_TOOLS == true then
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Pick -> Antler Pick
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- animalmaterials
|
||||
output = 'default:pick_wood',
|
||||
recipe = {
|
||||
{'animalmaterials:bone', 'animalmaterials:bone', 'animalmaterials:bone'},
|
||||
{'', 'default:stick', ''},
|
||||
{'', 'default:stick', ''},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'default:pick_wood',
|
||||
recipe = {
|
||||
{'animalmaterials:bone', 'animalmaterials:bone', 'animalmaterials:bone'},
|
||||
{'', 'animalmaterials:bone', ''},
|
||||
{'', 'animalmaterials:bone', ''},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- bone
|
||||
output = 'default:pick_wood',
|
||||
recipe = {
|
||||
{'bone:bone', 'bone:bone', 'bone:bone'},
|
||||
{'', 'default:stick', ''},
|
||||
{'', 'default:stick', ''},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'default:pick_wood',
|
||||
recipe = {
|
||||
{'bone:bone', 'bone:bone', 'bone:bone'},
|
||||
{'', 'bone:bone', ''},
|
||||
{'', 'bone:bone', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({ -- gnawedbones
|
||||
output = 'default:pick_wood',
|
||||
recipe = {
|
||||
{'gnawedbones:bone', 'gnawedbones:bone', 'gnawedbones:bone'},
|
||||
{'', 'default:stick', ''},
|
||||
{'', 'default:stick', ''},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'default:pick_wood',
|
||||
recipe = {
|
||||
{'gnawedbones:bone', 'gnawedbones:bone', 'gnawedbones:bone'},
|
||||
{'', 'gnawedbones:bone', ''},
|
||||
{'', 'gnawedbones:bone', ''},
|
||||
}
|
||||
})
|
||||
-- get rid of old recipe
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 14',
|
||||
recipe = {
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
{'', 'default:stick', ''},
|
||||
{'', 'default:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Stone Pickaxe
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'default:pick_stone',
|
||||
recipe = {
|
||||
{'flint:flintstone', 'flint:flintstone', 'flint:flintstone'},
|
||||
{'', 'default:stick', ''},
|
||||
{'', 'default:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
if BONE_TOOLS == true then
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Shovel -> Bone Shovel
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({ -- animalmaterials
|
||||
output = 'default:shovel_wood',
|
||||
recipe = {
|
||||
{''},
|
||||
{'animalmaterials:bone'},
|
||||
{'animalmaterials:bone'},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'default:shovel_wood',
|
||||
recipe = {
|
||||
{'animalmaterials:bone'},
|
||||
{'default:stick'},
|
||||
{'default:stick'},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- bone
|
||||
output = 'default:shovel_wood',
|
||||
recipe = {
|
||||
{''},
|
||||
{'bone:bone'},
|
||||
{'bone:bone'},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'default:shovel_wood',
|
||||
recipe = {
|
||||
{'bone:bone'},
|
||||
{'default:stick'},
|
||||
{'default:stick'},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({ -- gnawedbones
|
||||
output = 'default:shovel_wood',
|
||||
recipe = {
|
||||
{''},
|
||||
{'gnawedbones:bone'},
|
||||
{'gnawedbones:bone'},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'default:shovel_wood',
|
||||
recipe = {
|
||||
{'gnawedbones:bone'},
|
||||
{'default:stick'},
|
||||
{'default:stick'},
|
||||
}
|
||||
})
|
||||
-- get rid of old recipe
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 6',
|
||||
recipe = {
|
||||
{'group:wood'},
|
||||
{'default:stick'},
|
||||
{'default:stick'},
|
||||
}
|
||||
})
|
||||
end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Stone Shovel
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'default:shovel_stone',
|
||||
recipe = {
|
||||
{'flint:flintstone'},
|
||||
{'default:stick'},
|
||||
{'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Sword -> Wooden Spear
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'default:sword_wood',
|
||||
recipe = {
|
||||
{'default:stick'},
|
||||
{'default:stick'},
|
||||
{'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Stone Sword -> Stone Spear
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'default:sword_stone',
|
||||
recipe = {
|
||||
{'flint:flintstone'},
|
||||
{'flint:flintstone'},
|
||||
{'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
if (minetest.get_modpath("farming")) ~= nil then
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Hoe -> Digging Stick
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'farming:hoe_wood',
|
||||
recipe = {
|
||||
{'default:stick', 'default:stick'},
|
||||
{'', 'default:stick'},
|
||||
{'', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Stone Hoe
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'farming:hoe_stone',
|
||||
recipe = {
|
||||
{'flint:flintstone', 'flint:flintstone'},
|
||||
{'', 'default:stick'},
|
||||
{'', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
if (minetest.get_modpath("stoneage")) ~= nil then
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Biface
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'stoneage:biface',
|
||||
recipe = {
|
||||
{'flint:flintstone'},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Firestriker
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
type = 'shapeless',
|
||||
output = 'stoneage:firestriker_stone',
|
||||
recipe = {'flint:flintstone', 'group:stone'},
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
2
archaetools/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
default
|
||||
farming
|
207
archaetools/init.lua
Normal file
@ -0,0 +1,207 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Archae Tools"
|
||||
local version = "0.1.1"
|
||||
local mname = "archaetools"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: default, farming, flint & stoneage
|
||||
-- Looked at code from: animalmaterials, bone
|
||||
-- Dependencies: default, farming
|
||||
-- Supports: animalmaterials, bone, flint, gnawedbones, stoneage
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
dofile(minetest.get_modpath("archaetools").."/settings.txt")
|
||||
dofile(minetest.get_modpath("archaetools").."/crafting.lua")
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Axe -> Club
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_tool(":default:axe_wood", {
|
||||
description = "Club",
|
||||
inventory_image = "archaetools_woodclub.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
choppy={times={[3]=0.80}, uses=10, maxlevel=1},
|
||||
fleshy={times={[2]=1.50, [3]=0.80}, uses=10, maxlevel=1},
|
||||
snappy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
},
|
||||
})
|
||||
|
||||
if BONE_TOOLS == true then
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Pick -> Antler Pick
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_tool(":default:pick_wood", {
|
||||
description = "Deer Antler Pickaxe",
|
||||
inventory_image = "archaetools_antlerpick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
cracky = {times={[3]=1.60}, uses=10, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
},
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Shovel -> Bone Shovel
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_tool(":default:shovel_wood", {
|
||||
description = "Bone Shovel",
|
||||
inventory_image = "archaetools_boneshovel.png",
|
||||
wield_image = "archaetools_boneshovel.png^[transformFX",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
crumbly = {times={[1]=3.00, [2]=1.60, [3]=0.60}, uses=10, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
},
|
||||
})
|
||||
|
||||
else
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Shovel
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_tool(":default:shovel_wood", {
|
||||
description = "Wooden Shovel",
|
||||
inventory_image = "archaetools_woodshovel.png",
|
||||
wield_image = "archaetools_woodshovel.png^[transformFX",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
crumbly = {times={[1]=3.00, [2]=1.60, [3]=0.60}, uses=10, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
},
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Stone Shovel
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_tool(":default:shovel_stone", {
|
||||
description = "Stone Shovel",
|
||||
inventory_image = "archaetools_stoneshovel.png",
|
||||
wield_image = "archaetools_stoneshovel.png^[transformFX",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.4,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
crumbly = {times={[1]=1.80, [2]=1.20, [3]=0.50}, uses=20, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
},
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Sword -> Wooden Spear
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_tool(":default:sword_wood", {
|
||||
description = "Wooden Spear",
|
||||
inventory_image = "archaetools_woodspear.png",
|
||||
wield_image = "archaetools_woodspear.png^[transformFX",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
snappy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=2},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Stone Sword -> Stone Spear
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_tool(":default:sword_stone", {
|
||||
description = "Stone Spear",
|
||||
inventory_image = "archaetools_stonespear.png",
|
||||
wield_image = "archaetools_stonespear.png^[transformFX",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
snappy={times={[2]=1.4, [3]=0.40}, uses=20, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wooden Hoe -> Digging Stick
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if (minetest.get_modpath("farming")) ~= nil then
|
||||
-- turns nodes with group soil=1 into soil
|
||||
local function hoe_on_use(itemstack, user, pointed_thing, uses)
|
||||
local pt = pointed_thing
|
||||
-- check if pointing at a node
|
||||
if not pt then
|
||||
return
|
||||
end
|
||||
if pt.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local under = minetest.get_node(pt.under)
|
||||
local p = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
|
||||
local above = minetest.get_node(p)
|
||||
|
||||
-- return if any of the nodes is not registered
|
||||
if not minetest.registered_nodes[under.name] then
|
||||
return
|
||||
end
|
||||
if not minetest.registered_nodes[above.name] then
|
||||
return
|
||||
end
|
||||
|
||||
-- check if the node above the pointed thing is air
|
||||
if above.name ~= "air" then
|
||||
return
|
||||
end
|
||||
|
||||
-- check if pointing at dirt
|
||||
if minetest.get_item_group(under.name, "soil") ~= 1 then
|
||||
return
|
||||
end
|
||||
|
||||
-- turn the node into soil, wear out item and play sound
|
||||
minetest.set_node(pt.under, {name="farming:soil"})
|
||||
minetest.sound_play("default_dig_crumbly", {
|
||||
pos = pt.under,
|
||||
gain = 0.5,
|
||||
})
|
||||
if minetest.get_modpath("fishing") ~= nil then
|
||||
if math.random(1, 100) < 60 then
|
||||
local inv = user:get_inventory()
|
||||
if inv:room_for_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) then
|
||||
inv:add_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""})
|
||||
end
|
||||
end
|
||||
end
|
||||
itemstack:add_wear(65535/(uses-1))
|
||||
return itemstack
|
||||
end
|
||||
|
||||
minetest.register_tool(":farming:hoe_wood", {
|
||||
description = "Digging Stick",
|
||||
inventory_image = "archaetools_wooddigstick.png",
|
||||
wield_image = "archaetools_wooddigstick.png^[transformFX",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
return hoe_on_use(itemstack, user, pointed_thing, 30)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
1
archaetools/settings.txt
Normal file
@ -0,0 +1 @@
|
||||
BONE_TOOLS = true
|
BIN
archaetools/textures/archaetools_antlerpick.png
Normal file
After (image error) Size: 297 B |
BIN
archaetools/textures/archaetools_boneshovel.png
Normal file
After (image error) Size: 371 B |
BIN
archaetools/textures/archaetools_stoneshovel.png
Normal file
After (image error) Size: 324 B |
BIN
archaetools/textures/archaetools_stonespear.png
Normal file
After (image error) Size: 229 B |
BIN
archaetools/textures/archaetools_woodclub.png
Normal file
After (image error) Size: 276 B |
BIN
archaetools/textures/archaetools_wooddigstick.png
Normal file
After (image error) Size: 226 B |
BIN
archaetools/textures/archaetools_woodshovel.png
Normal file
After (image error) Size: 352 B |
BIN
archaetools/textures/archaetools_woodspear.png
Normal file
After (image error) Size: 204 B |
BIN
archaetools/textures/default_stick.png
Normal file
After (image error) Size: 277 B |
BIN
archaetools/textures/default_tool_stoneaxe.png
Normal file
After (image error) Size: 304 B |
BIN
archaetools/textures/default_tool_stonepick.png
Normal file
After (image error) Size: 354 B |
BIN
archaetools/textures/default_tool_woodpick.png
Normal file
After (image error) Size: 307 B |
BIN
archaetools/textures/farming_tool_stonehoe.png
Normal file
After (image error) Size: 288 B |
1
burningmaterials/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
stoneage
|
255
burningmaterials/init.lua
Normal file
@ -0,0 +1,255 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Burning Materials"
|
||||
local version = "0.0.4"
|
||||
local mname = "burningmaterials"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: campfire, stoneage
|
||||
-- Looked at code from:
|
||||
-- Dependencies: stoneage
|
||||
-- Supports: darkage, dryplants
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
dofile(minetest.get_modpath("burningmaterials").."/settings.txt")
|
||||
|
||||
tinder = {
|
||||
"flowers:cotton",
|
||||
"default:paper",
|
||||
"default:coal_lump",
|
||||
"garden:cotton",
|
||||
|
||||
"default:dry_shrub",
|
||||
"darkage:dry_leaves",
|
||||
"darkage:straw",
|
||||
"dryplants:hay",
|
||||
"dryplants:reed",
|
||||
}
|
||||
|
||||
for _,tinder in ipairs(tinder) do
|
||||
minetest.register_craft({
|
||||
output = 'stoneage:bonfire',
|
||||
recipe = {
|
||||
{'', 'default:stick', ''},
|
||||
{'default:stick', tinder, 'default:stick'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
if BONFIRE_FOR_COOKING == true then
|
||||
|
||||
minetest.register_node(":stoneage:bonfire_unlit", {
|
||||
description = "Bonfire",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"stoneage_bonfire_unlit.png"},
|
||||
inventory_image = "stoneage_bonfire_unlit.png",
|
||||
wield_image = "stoneage_bonfire_unlit.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
drop = "default:coal_lump",
|
||||
groups = {snappy=3,flammable=2,attached_node=1},
|
||||
after_dig_node = function(pos, node, oldmetadata, puncher)
|
||||
local wield = puncher:get_wielded_item():get_name()
|
||||
if wield == "default:torch" then
|
||||
node.name = "stoneage:bonfire"
|
||||
minetest.env:set_node(pos, node)
|
||||
local inv = puncher:get_inventory()
|
||||
inv:remove_item("main", "default:coal_lump")
|
||||
end
|
||||
end,
|
||||
sounds = default.node_sound_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/3, -1/2, -1/3, 1/3, 1/6, 1/3},
|
||||
},
|
||||
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
meta:set_string("infotext", "Campfire")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("fuel", 1)
|
||||
inv:set_size("src", 1)
|
||||
inv:set_size("dst", 4)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty("fuel") then
|
||||
return false
|
||||
elseif not inv:is_empty("dst") then
|
||||
return false
|
||||
elseif not inv:is_empty("src") then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node(":stoneage:bonfire", {
|
||||
description = "Bonfire",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {
|
||||
{name="stoneage_bonfire_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}}
|
||||
},
|
||||
inventory_image = "stoneage_bonfire_unlit.png",
|
||||
wield_image = "stoneage_bonfire_unlit.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
drop = "",
|
||||
damage_per_second = 1,
|
||||
light_source = LIGHT_MAX-1,
|
||||
groups = {dig_immediate=3,igniter=1,attached_node=1},
|
||||
after_place_node = function(pos, placer)
|
||||
-- fire.on_flame_add_at(pos)
|
||||
end,
|
||||
after_dig_node = function(pos, node, oldmetadata, puncher)
|
||||
node.name = "stoneage:bonfire_unlit"
|
||||
minetest.env:set_node(pos, node)
|
||||
-- fire.on_flame_remove_at(pos)
|
||||
puncher:set_hp(puncher:get_hp()-3)
|
||||
end,
|
||||
sounds = default.node_sound_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/3, -1/2, -1/3, 1/3, 1/6, 1/3},
|
||||
},
|
||||
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
meta:set_string("formspec", default.furnace_inactive_formspec)
|
||||
meta:set_string("infotext", "Bonfire");
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("fuel", 1)
|
||||
inv:set_size("src", 1)
|
||||
inv:set_size("dst", 4)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty("fuel") then
|
||||
return false
|
||||
elseif not inv:is_empty("dst") then
|
||||
return false
|
||||
elseif not inv:is_empty("src") then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
})
|
||||
|
||||
function hacky_swap_node(pos,name)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local meta0 = meta:to_table()
|
||||
if node.name == name then
|
||||
return
|
||||
end
|
||||
node.name = name
|
||||
local meta0 = meta:to_table()
|
||||
minetest.env:set_node(pos,node)
|
||||
meta = minetest.env:get_meta(pos)
|
||||
meta:from_table(meta0)
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"stoneage:bonfire_unlit","stoneage:bonfire"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
for i, name in ipairs({
|
||||
"fuel_totaltime",
|
||||
"fuel_time",
|
||||
"src_totaltime",
|
||||
"src_time"
|
||||
}) do
|
||||
if meta:get_string(name) == "" then
|
||||
meta:set_float(name, 0.0)
|
||||
end
|
||||
end
|
||||
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
local srclist = inv:get_list("src")
|
||||
local cooked = nil
|
||||
|
||||
if srclist then
|
||||
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||
end
|
||||
|
||||
local was_active = false
|
||||
|
||||
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
||||
was_active = true
|
||||
meta:set_float("fuel_time", meta:get_float("fuel_time") + 0.25)
|
||||
meta:set_float("src_time", meta:get_float("src_time") + 0.25)
|
||||
if cooked and cooked.item and meta:get_float("src_time") >= cooked.time then
|
||||
-- check if there's room for output in "dst" list
|
||||
if inv:room_for_item("dst",cooked.item) then
|
||||
-- Put result in "dst" list
|
||||
inv:add_item("dst", cooked.item)
|
||||
-- take stuff from "src" list
|
||||
srcstack = inv:get_stack("src", 1)
|
||||
srcstack:take_item()
|
||||
inv:set_stack("src", 1, srcstack)
|
||||
else
|
||||
print("Could not insert '"..cooked.item:to_string().."'")
|
||||
end
|
||||
meta:set_string("src_time", 0)
|
||||
end
|
||||
end
|
||||
|
||||
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
|
||||
local percent = math.floor(meta:get_float("fuel_time") /
|
||||
meta:get_float("fuel_totaltime") * 100)
|
||||
meta:set_string("infotext","Furnace active: "..percent.."%")
|
||||
hacky_swap_node(pos,"stoneage:bonfire")
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"image[2,2;1,1;default_furnace_fire_bg.png^[lowpart:"..
|
||||
(100-percent)..":default_furnace_fire_fg.png]"..
|
||||
"list[current_name;fuel;2,3;1,1;]"..
|
||||
"list[current_name;src;2,1;1,1;]"..
|
||||
"list[current_name;dst;5,1;2,2;]"..
|
||||
"list[current_player;main;0,5;8,4;]")
|
||||
return
|
||||
end
|
||||
|
||||
local fuel = nil
|
||||
local cooked = nil
|
||||
local fuellist = inv:get_list("fuel")
|
||||
local srclist = inv:get_list("src")
|
||||
|
||||
if srclist then
|
||||
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||
end
|
||||
if fuellist then
|
||||
fuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
|
||||
end
|
||||
|
||||
if fuel.time <= 0 then
|
||||
meta:set_string("infotext","Put more wood on the fire!")
|
||||
hacky_swap_node(pos,"stoneage:bonfire_unlit")
|
||||
meta:set_string("formspec", default.furnace_inactive_formspec)
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
|
||||
meta:set_string("fuel_totaltime", fuel.time)
|
||||
meta:set_string("fuel_time", 0)
|
||||
|
||||
local stack = inv:get_stack("fuel", 1)
|
||||
stack:take_item()
|
||||
inv:set_stack("fuel", 1, stack)
|
||||
end,
|
||||
})
|
||||
|
||||
end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
1
burningmaterials/settings.txt
Normal file
@ -0,0 +1 @@
|
||||
BONFIRE_FOR_COOKING = false
|
2
gnawedbones/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
default
|
||||
legacy
|
218
gnawedbones/init.lua
Normal file
@ -0,0 +1,218 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Gnawed Bones"
|
||||
local version = "0.0.3"
|
||||
local mname = "gnawedbones"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: animalmaterials, fishing, legacy, mobs
|
||||
-- Looked at code from:
|
||||
-- Dependencies: default, legacy
|
||||
-- Supports: animalmaterials, mobs
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Bone
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("gnawedbones:bone", {
|
||||
description = "Bone",
|
||||
inventory_image = "gnawedbones_bone.png",
|
||||
})
|
||||
|
||||
-- replace, just in case bones from animalmaterials and/or bone are in inventory/world and mod(s) disabled/deinstalled
|
||||
minetest.register_alias("bone:bone", "gnawedbones:bone")
|
||||
minetest.register_alias("animalmaterials:bone", "gnawedbones:bone")
|
||||
|
||||
local heal_1 = function(itemstack, user, pointed_thing)
|
||||
local inv = user:get_inventory()
|
||||
local heal = user:get_hp() + 1
|
||||
user:set_hp(heal)
|
||||
itemstack:take_item()
|
||||
if inv:room_for_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""}) then
|
||||
inv:add_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""})
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local heal_3 = function(itemstack, user, pointed_thing)
|
||||
local inv = user:get_inventory()
|
||||
local heal = user:get_hp() + 3
|
||||
user:set_hp(heal)
|
||||
itemstack:take_item()
|
||||
if inv:room_for_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""}) then
|
||||
inv:add_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""})
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Old items (legacy)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Rat
|
||||
minetest.register_craftitem(":rat", {
|
||||
description = "Rat",
|
||||
inventory_image = "rat.png",
|
||||
on_use = heal_3,
|
||||
})
|
||||
-- Cooked Rat
|
||||
minetest.register_craftitem(":cooked_rat", {
|
||||
description = "Cooked rat",
|
||||
inventory_image = "cooked_rat.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local inv = user:get_inventory()
|
||||
local heal = user:get_hp() + 6
|
||||
user:set_hp(heal)
|
||||
itemstack:take_item()
|
||||
if inv:room_for_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""}) then
|
||||
inv:add_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""})
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Simple Mobs
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if minetest.get_modpath("mobs") ~= nil then
|
||||
-- Raw Meat
|
||||
minetest.register_craftitem(":mobs:meat_raw", {
|
||||
description = "Raw Meat",
|
||||
inventory_image = "mobs_meat_raw.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local inv = user:get_inventory()
|
||||
local heal = user:get_hp() + 4
|
||||
user:set_hp(heal)
|
||||
itemstack:take_item()
|
||||
if inv:room_for_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""}) then
|
||||
inv:add_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""})
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
-- Meat
|
||||
minetest.register_craftitem(":mobs:meat", {
|
||||
description = "Meat",
|
||||
inventory_image = "mobs_meat.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local inv = user:get_inventory()
|
||||
local heal = user:get_hp() + 8
|
||||
user:set_hp(heal)
|
||||
itemstack:take_item()
|
||||
if inv:room_for_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""}) then
|
||||
inv:add_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""})
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
-- Rat
|
||||
minetest.register_craftitem(":mobs:rat", {
|
||||
description = "Rat",
|
||||
inventory_image = "mobs_rat_inventory.png",
|
||||
on_use = heal_1,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.env:add_entity(pointed_thing.above, "mobs:rat")
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
-- Cooked Rat
|
||||
minetest.register_craftitem(":mobs:rat_cooked", {
|
||||
description = "Cooked Rat",
|
||||
inventory_image = "mobs_cooked_rat.png",
|
||||
on_use = heal_3,
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Mobf
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if minetest.get_modpath("animalmaterials") ~= nil then
|
||||
minetest.register_craftitem(":animalmaterials:meat_raw", {
|
||||
description = "Raw meat",
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = heal_1,
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem(":animalmaterials:meat_pork", {
|
||||
description = "Pork (raw)",
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = heal_1,
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem(":animalmaterials:meat_beef", {
|
||||
description = "Beef (raw)",
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = heal_1,
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem(":animalmaterials:meat_chicken", {
|
||||
description = "Chicken (raw)",
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = heal_1,
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem(":animalmaterials:meat_lamb", {
|
||||
description = "Lamb (raw)",
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = heal_1,
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem(":animalmaterials:meat_venison", {
|
||||
description = "Venison (raw)",
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = heal_1,
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem(":animalmaterials:meat_undead", {
|
||||
description = "Meat (not quite dead)",
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local inv = user:get_inventory()
|
||||
local heal = user:get_hp() - 2
|
||||
user:set_hp(heal)
|
||||
itemstack:take_item()
|
||||
if inv:room_for_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""}) then
|
||||
inv:add_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""})
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=5
|
||||
})
|
||||
minetest.register_craftitem(":animalmaterials:meat_toxic", {
|
||||
description = "Toxic Meat",
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local inv = user:get_inventory()
|
||||
local heal = user:get_hp() - 5
|
||||
user:set_hp(heal)
|
||||
itemstack:take_item()
|
||||
if inv:room_for_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""}) then
|
||||
inv:add_item("main", {name="gnawedbones:bone", count=1, wear=0, metadata=""})
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=5
|
||||
})
|
||||
minetest.register_craftitem(":animalmaterials:meat_ostrich", {
|
||||
description = "Ostrich Meat",
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = heal_3,
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=5
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
BIN
gnawedbones/textures/gnawedbones_bone.png
Normal file
After (image error) Size: 316 B |
1
huntertools/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
throwing
|
126
huntertools/init.lua
Normal file
@ -0,0 +1,126 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Hunter Tools"
|
||||
local version = "0.0.3"
|
||||
local mname = "huntertools"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: throwing
|
||||
-- Looked at code from: default
|
||||
-- Dependencies: throwing
|
||||
-- Supports: animalmaterials, flint, stoneage
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- add obsidian shard?
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Bow
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:bow_wood',
|
||||
recipe = {
|
||||
{'farming:string', 'default:stick', ''},
|
||||
{'farming:string', '', 'default:stick'},
|
||||
{'farming:string', 'default:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:bow_wood',
|
||||
recipe = {
|
||||
{'', 'default:stick', 'farming:string'},
|
||||
{'default:stick', '', 'farming:string'},
|
||||
{'', 'default:stick', 'farming:string'},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Arrow
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- default
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:arrow 16',
|
||||
recipe = {
|
||||
{'group:stone', 'default:stick', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
-- stoneage
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:arrow 16',
|
||||
recipe = {
|
||||
{'stoneage:silex', 'default:stick', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
-- flint
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:arrow 16',
|
||||
recipe = {
|
||||
{'flint:flintstone', 'default:stick', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
-- with feathers
|
||||
|
||||
-- animalmaterials
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:arrow 16',
|
||||
recipe = {
|
||||
{'', 'group:stone', ''},
|
||||
{'', 'default:stick', ''},
|
||||
{'', 'animalmaterials:feather', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:arrow 16',
|
||||
recipe = {
|
||||
{'group:stone', 'default:stick', 'animalmaterials:feather'},
|
||||
}
|
||||
})
|
||||
|
||||
-- animalmaterials & stoneage
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:arrow 16',
|
||||
recipe = {
|
||||
{'', 'stoneage:silex', ''},
|
||||
{'', 'default:stick', ''},
|
||||
{'', 'animalmaterials:feather', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:arrow 16',
|
||||
recipe = {
|
||||
{'stoneage:silex', 'default:stick', 'animalmaterials:feather'},
|
||||
}
|
||||
})
|
||||
|
||||
-- animalmaterials & flint
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:arrow 16',
|
||||
recipe = {
|
||||
{'', 'flint:flintstone', ''},
|
||||
{'', 'default:stick', ''},
|
||||
{'', 'animalmaterials:feather', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'throwing:arrow 16',
|
||||
recipe = {
|
||||
{'flint:flintstone', 'default:stick', 'animalmaterials:feather'},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
BIN
huntertools/textures/alternates/throwing_bow_wood.png
Normal file
After (image error) Size: 365 B |
BIN
huntertools/textures/animalmaterials_feather.png
Normal file
After (image error) Size: 461 B |
BIN
huntertools/textures/throwing_arrow.png
Normal file
After (image error) Size: 318 B |
BIN
huntertools/textures/throwing_bow_wood.png
Normal file
After (image error) Size: 253 B |
0
modpack.txt
Normal file
1
moresilex/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
stoneage
|
83
moresilex/init.lua
Normal file
@ -0,0 +1,83 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "More Silex"
|
||||
local version = "0.0.4"
|
||||
local mname = "moresilex"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: stoneage
|
||||
-- Looked at code from:
|
||||
-- Dependencies: stoneage
|
||||
-- Supports:
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_node("moresilex:desert_sand_with_silex", {
|
||||
description = "Silex",
|
||||
tiles = {"default_desert_sand.png^stoneage_silex_ore.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, falling_node=1},
|
||||
drop = 'stoneage:silex',
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("moresilex:gravel_with_silex", {
|
||||
description = "Silex",
|
||||
tiles = {"default_gravel.png^stoneage_silex_ore.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, falling_node=1},
|
||||
drop = 'stoneage:silex',
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Generating
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, ore_per_chunk, height_min, height_max)
|
||||
if maxp.y < height_min or minp.y > height_max then
|
||||
return
|
||||
end
|
||||
local y_min = math.max(minp.y, height_min)
|
||||
local y_max = math.min(maxp.y, height_max)
|
||||
local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1)
|
||||
local pr = PseudoRandom(seed)
|
||||
local num_chunks = math.floor(chunks_per_volume * volume)
|
||||
local chunk_size = 3
|
||||
if ore_per_chunk <= 4 then
|
||||
chunk_size = 2
|
||||
end
|
||||
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
|
||||
--print("generate_ore num_chunks: "..dump(num_chunks))
|
||||
for i=1,num_chunks do
|
||||
local y0 = pr:next(y_min, y_max-chunk_size+1)
|
||||
if y0 >= height_min and y0 <= height_max then
|
||||
local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
|
||||
local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
|
||||
local p0 = {x=x0, y=y0, z=z0}
|
||||
for x1=0,chunk_size-1 do
|
||||
for y1=0,chunk_size-1 do
|
||||
for z1=0,chunk_size-1 do
|
||||
if pr:next(1,inverse_chance) == 1 then
|
||||
local x2 = x0+x1
|
||||
local y2 = y0+y1
|
||||
local z2 = z0+z1
|
||||
local p2 = {x=x2, y=y2, z=z2}
|
||||
if minetest.env:get_node(p2).name == wherein then
|
||||
minetest.env:set_node(p2, {name=name})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
generate_ore("moresilex:desert_sand_with_silex", "default:desert_sand", minp, maxp, seed+485, 1/21/21/21, 11, -16, 32)
|
||||
generate_ore("moresilex:gravel_with_silex", "default:gravel", minp, maxp, seed+485, 1/21/21/21, 11, -16, 32)
|
||||
end)
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
2
primitivedeco/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
default
|
||||
dye
|
75
primitivedeco/init.lua
Normal file
@ -0,0 +1,75 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Primitive Deco"
|
||||
local version = "0.0.3"
|
||||
local mname = "primitivedeco"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: sign
|
||||
-- Looked at code from: animalmaterials, dye
|
||||
-- Dependencies: default, dye
|
||||
-- Supports: animalmaterials
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Fur Cover
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if (minetest.get_modpath("animalmaterials")) ~= nil then
|
||||
minetest.register_node("primitivedeco:fur", {
|
||||
description = "Fur Cover",
|
||||
inventory_image = "animalmaterials_fur.png",
|
||||
wield_image = "animalmaterials_fur.png",
|
||||
drawtype = "signlike",
|
||||
tiles = { "animalmaterials_fur.png" },
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
--paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
groups = {choppy=2,dig_immediate=2,attached_node=1},
|
||||
legacy_wallmounted = true,
|
||||
})
|
||||
-- craft
|
||||
minetest.register_craft({
|
||||
output = 'primitivedeco:fur',
|
||||
recipe = {
|
||||
{'animalmaterials:fur'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wisent Painting
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("primitivedeco:wisent", {
|
||||
description = "Wisent Painting",
|
||||
inventory_image = "primitivedeco_wisent.png",
|
||||
wield_image = "dye_red.png",
|
||||
drawtype = "signlike",
|
||||
tiles = { "primitivedeco_wisent.png" },
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
groups = {choppy=2,dig_immediate=2,attached_node=1},
|
||||
legacy_wallmounted = true,
|
||||
})
|
||||
-- craft
|
||||
minetest.register_craft({
|
||||
output = 'primitivedeco:wisent',
|
||||
recipe = {
|
||||
{'dye:black', '', 'dye:black'},
|
||||
{'dye:red', 'dye:red', 'dye:red'},
|
||||
{'', 'dye:red', ''},
|
||||
}
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
BIN
primitivedeco/textures/primitivedeco_wisent.png
Normal file
After (image error) Size: 498 B |
1
resin/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
default
|
28
resin/init.lua
Normal file
@ -0,0 +1,28 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Dry Plants - Resin 0.0.2 (not in use)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Looked at code from: default, plants_lib, trees
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Resin
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[minetest.register_node("dryplants:resin", {
|
||||
description = "Resin",
|
||||
drawtype = "signlike",
|
||||
tile_images = { "dryplants_resin.png" },
|
||||
inventory_image = "dryplants_resin.png",
|
||||
wield_image = "dryplants_resin.png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
walkable = false,
|
||||
groups = { snappy = 3},]]
|
||||
--sounds = default.node_sound_leaves_defaults(),
|
||||
--[[selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
buildable_to = true,
|
||||
})]]
|
BIN
resin/textures/dryplants_dandelion_leave.png
Normal file
After (image error) Size: 456 B |
BIN
resin/textures/dryplants_resin.png
Normal file
After (image error) Size: 536 B |
BIN
resin/textures/resin.png
Normal file
After (image error) Size: 514 B |
BIN
resin/textures/resin_palette.png
Normal file
After (image error) Size: 203 B |
1
stringrecipes/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
farming
|
63
stringrecipes/init.lua
Normal file
@ -0,0 +1,63 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "String Recipes"
|
||||
local version = "0.0.5"
|
||||
local mname = "stringrecipes"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from:
|
||||
-- Looked at code from: animaltools, default, farming
|
||||
-- Dependencies: default, farming
|
||||
-- Supports: animalmaterials, dryplants
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:string 4", -- looked ad farming mod and thought: why not the other way around?
|
||||
recipe = {
|
||||
{"group:wool"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:string 4",
|
||||
recipe = {
|
||||
{"animalmaterials:fur"},
|
||||
{"animalmaterials:fur"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:string 2",
|
||||
recipe = {
|
||||
{"default:grass_1"},
|
||||
{"default:grass_1"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:string 4", -- wanted the recipe of the original throwing mod, but with more output
|
||||
recipe = {
|
||||
{"default:junglegrass"},
|
||||
{"default:junglegrass"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:string 4",
|
||||
recipe = {
|
||||
{"default:papyrus"},
|
||||
{"default:papyrus"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:string 4",
|
||||
recipe = {
|
||||
{"dryplants:reedmace_sapling"},
|
||||
{"dryplants:reedmace_sapling"},
|
||||
}
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
61
woodstuff/crafting.lua
Normal file
@ -0,0 +1,61 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wood Stuff - Crafting 0.0.1
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Looked at code from: default, darkage, stairs, stoneage
|
||||
-- Dependencies: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = 'woodstuff:twigs',
|
||||
recipe = {
|
||||
{'default:stick','default:stick'},
|
||||
{'default:stick','default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 4',
|
||||
recipe = {
|
||||
{'woodstuff:twigs'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'woodstuff:twigs_slab 6',
|
||||
recipe = {
|
||||
{'woodstuff:twigs','woodstuff:twigs','woodstuff:twigs'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 2',
|
||||
recipe = {
|
||||
{'woodstuff:twigs_slab'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'woodstuff:twigs_roof 4',
|
||||
recipe = {
|
||||
{'woodstuff:twigs',''},
|
||||
{'','woodstuff:twigs'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'woodstuff:twigs_roof 4',
|
||||
recipe = {
|
||||
{'','woodstuff:twigs'},
|
||||
{'woodstuff:twigs',''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'woodstuff:twigs_roof_corner 8',
|
||||
recipe = {
|
||||
{'','woodstuff:twigs',''},
|
||||
{'woodstuff:twigs','','woodstuff:twigs'},
|
||||
}
|
||||
})
|
||||
|
1
woodstuff/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
default
|
46
woodstuff/init.lua
Normal file
@ -0,0 +1,46 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Wood Stuff"
|
||||
local version = "0.0.4"
|
||||
local mname = "woodstuff"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: trees
|
||||
-- Looked at code from: default, stoneage
|
||||
-- Dependencies: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
dofile(minetest.get_modpath("woodstuff").."/settings.txt")
|
||||
dofile(minetest.get_modpath("woodstuff").."/crafting.lua")
|
||||
dofile(minetest.get_modpath("woodstuff").."/poles.lua")
|
||||
dofile(minetest.get_modpath("woodstuff").."/twigs.lua")
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 6',
|
||||
recipe = {
|
||||
{'group:leafdecay'},
|
||||
{'group:leafdecay'},
|
||||
{'group:leafdecay'},
|
||||
}
|
||||
})
|
||||
|
||||
if PLANKS_NOW_LOGS == true then
|
||||
minetest.register_node(":default:junglewood", {
|
||||
description = "Junglewood Logs",
|
||||
tiles = {"default_junglewood.png"},
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node(":default:wood", {
|
||||
description = "Wooden Logs",
|
||||
tiles = {"default_wood.png"},
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
117
woodstuff/poles.lua
Normal file
@ -0,0 +1,117 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wood Stuff - Poles 0.0.1
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Looked at code from: default, mobf, throwing
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- POLE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("woodstuff:pole", {
|
||||
description = "Pole",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
"woodstuff_pole_top.png",
|
||||
"woodstuff_pole_top.png",
|
||||
"woodstuff_pole.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
|
||||
},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- WATER POLE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("woodstuff:water_pole", {
|
||||
description = "Water Pole",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
"woodstuff_pole_top.png",
|
||||
"woodstuff_pole_top.png",
|
||||
"woodstuff_pole.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_place = function (itemstack, placer, pointed_thing)
|
||||
minetest.add_entity(pointed_thing.above, "woodstuff:pole_entity")
|
||||
if string.find(minetest.env:get_node(pointed_thing.under).name, "woodstuff:water_pole") then
|
||||
minetest.remove_node(pointed_thing.under, {name="woodstuff:water_pole"})
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- WATER POLE ENTITY
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_entity("woodstuff:pole_entity",{
|
||||
physical = true,
|
||||
hp_max = 8,
|
||||
visual = "wielditem",
|
||||
visual_size = {x=2/3, y=2/3, z=2/3},
|
||||
textures = {"woodstuff:water_pole"},
|
||||
collisionbox = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
|
||||
on_punch = function(self, puncher)
|
||||
self.object:set_hp(self.object:get_hp()-1)
|
||||
minetest.sound_play("default_dig_oddly_breakable_by_hand", {
|
||||
pos = self.object:getpos(),
|
||||
gain = 0.4,
|
||||
})
|
||||
if self.object:get_hp() == 0 then
|
||||
if puncher:is_player() and puncher:get_inventory() then
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
puncher:get_inventory():add_item("main", "woodstuff:water_pole")
|
||||
end
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- CRAFTING
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = "woodstuff:pole 12",
|
||||
recipe = {
|
||||
{'default:tree'},
|
||||
{'default:tree'},
|
||||
{'default:tree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "woodstuff:water_pole",
|
||||
recipe = {
|
||||
{"woodstuff:pole"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "woodstuff:pole",
|
||||
recipe = {
|
||||
{"woodstuff:water_pole"},
|
||||
}
|
||||
})
|
2
woodstuff/settings.txt
Normal file
@ -0,0 +1,2 @@
|
||||
PLANKS_NOW_LOGS = true
|
||||
AUTO_ROOF_CORNER = true
|
BIN
woodstuff/textures/default_junglewood.png
Normal file
After (image error) Size: 773 B |
BIN
woodstuff/textures/default_wood.png
Normal file
After (image error) Size: 889 B |
BIN
woodstuff/textures/old/default_junglewood_old.png
Normal file
After (image error) Size: 344 B |
BIN
woodstuff/textures/old/default_wood_old.png
Normal file
After (image error) Size: 338 B |
BIN
woodstuff/textures/old/woodstuff_pole_algae.png
Normal file
After (image error) Size: 409 B |
BIN
woodstuff/textures/old/woodstuff_pole_algae_top.png
Normal file
After (image error) Size: 302 B |
BIN
woodstuff/textures/old/woodstuff_twigs_old2.png
Normal file
After (image error) Size: 753 B |
BIN
woodstuff/textures/woodstuff_pole.png
Normal file
After (image error) Size: 417 B |
BIN
woodstuff/textures/woodstuff_pole_top.png
Normal file
After (image error) Size: 307 B |
BIN
woodstuff/textures/woodstuff_twigs.png
Normal file
After (image error) Size: 759 B |
BIN
woodstuff/textures/woodstuff_twigs_corner.png
Normal file
After (image error) Size: 730 B |
BIN
woodstuff/textures/woodstuff_twigs_top.png
Normal file
After (image error) Size: 615 B |
221
woodstuff/twigs.lua
Normal file
@ -0,0 +1,221 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Wood Stuff - Twigs 0.0.4
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Looked at code from: default, darkage, stairs, stoneage
|
||||
-- Dependencies: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- TWIGS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("woodstuff:twigs", {
|
||||
description = "Twigs",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"woodstuff_twigs.png"},
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- TWIGS SLAB
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("woodstuff:twigs_slab", {
|
||||
description = "Twigs Slab",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"woodstuff_twigs.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- TWIGS ROOF
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("woodstuff:twigs_roof", {
|
||||
description = "Twigs Roof",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"woodstuff_twigs.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, -1/2, -1/2, 1/2, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- TWIGS ROOF CORNER
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("woodstuff:twigs_roof_corner", {
|
||||
description = "Twigs Roof Corner",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {
|
||||
"woodstuff_twigs_corner.png",
|
||||
"woodstuff_twigs_corner.png",
|
||||
"woodstuff_twigs.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, 0, 0, 0, 1/2, 1/2},
|
||||
{0, -1/2, 0, 1/2, 0, 1/2},
|
||||
{-1/2, -1/2, -1/2, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- TWIGS ROOF CORNER 2
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("woodstuff:twigs_roof_corner_2", {
|
||||
description = "Twigs Roof Corner 2",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {
|
||||
"woodstuff_twigs_corner.png",
|
||||
"woodstuff_twigs_corner.png",
|
||||
"woodstuff_twigs.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- { left , bottom , front , right , top , back }
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1/2, -1/2, 0, 0, 0, 1/2},
|
||||
{0, 0, 0, 1/2, 1/2, 1/2},
|
||||
{-1/2, 0, -1/2, 0, 1/2, 0},
|
||||
}
|
||||
},
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
if AUTO_ROOF_CORNER == true then
|
||||
|
||||
local roof = "woodstuff:twigs_roof"
|
||||
local corner = "woodstuff:twigs_roof_corner"
|
||||
local corner_2 = "woodstuff:twigs_roof_corner_2"
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {roof},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
|
||||
local node_east = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z })
|
||||
local node_west = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z })
|
||||
local node_north = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1})
|
||||
local node_south = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z-1})
|
||||
-- corner 1
|
||||
if ((node_west.name == roof and node_west.param2 == 0)
|
||||
or (node_west.name == corner and node_west.param2 == 1))
|
||||
and ((node_north.name == roof and node_north.param2 == 3)
|
||||
or (node_north.name == corner and node_north.param2 == 3))
|
||||
then
|
||||
minetest.env:add_node(pos, {name=corner, param2=0})
|
||||
end
|
||||
|
||||
if ((node_north.name == roof and node_north.param2 == 1)
|
||||
or (node_north.name == corner and node_north.param2 == 2))
|
||||
and ((node_east.name == roof and node_east.param2 == 0)
|
||||
or (node_east.name == corner and node_east.param2 == 0))
|
||||
then
|
||||
minetest.env:add_node(pos, {name=corner, param2=1})
|
||||
end
|
||||
|
||||
if ((node_east.name == roof and node_east.param2 == 2)
|
||||
or (node_east.name == corner and node_east.param2 == 3))
|
||||
and ((node_south.name == roof and node_south.param2 == 1)
|
||||
or (node_south.name == corner and node_south.param2 == 1))
|
||||
then
|
||||
minetest.env:add_node(pos, {name=corner, param2=2})
|
||||
end
|
||||
|
||||
if ((node_south.name == roof and node_south.param2 == 3)
|
||||
or (node_south.name == corner and node_south.param2 == 0))
|
||||
and ((node_west.name == roof and node_west.param2 == 2)
|
||||
or (node_west.name == corner and node_west.param2 == 2))
|
||||
then
|
||||
minetest.env:add_node(pos, {name=corner, param2=3})
|
||||
end
|
||||
-- corner 2
|
||||
if ((node_west.name == roof and node_west.param2 == 2)
|
||||
or (node_west.name == corner_2 and node_west.param2 == 1))
|
||||
and ((node_north.name == roof and node_north.param2 == 1)
|
||||
or (node_north.name == corner_2 and node_north.param2 == 3))
|
||||
then
|
||||
minetest.env:add_node(pos, {name=corner_2, param2=0})
|
||||
end
|
||||
|
||||
if ((node_north.name == roof and node_north.param2 == 3)
|
||||
or (node_north.name == corner_2 and node_north.param2 == 2))
|
||||
and ((node_east.name == roof and node_east.param2 == 2)
|
||||
or (node_east.name == corner_2 and node_east.param2 == 0))
|
||||
then
|
||||
minetest.env:add_node(pos, {name=corner_2, param2=1})
|
||||
end
|
||||
|
||||
if ((node_east.name == roof and node_east.param2 == 0)
|
||||
or (node_east.name == corner_2 and node_east.param2 == 3))
|
||||
and ((node_south.name == roof and node_south.param2 == 3)
|
||||
or (node_south.name == corner_2 and node_south.param2 == 1))
|
||||
then
|
||||
minetest.env:add_node(pos, {name=corner_2, param2=2})
|
||||
end
|
||||
|
||||
if ((node_south.name == roof and node_south.param2 == 1)
|
||||
or (node_south.name == corner_2 and node_south.param2 == 0))
|
||||
and ((node_west.name == roof and node_west.param2 == 0)
|
||||
or (node_west.name == corner_2 and node_west.param2 == 2))
|
||||
then
|
||||
minetest.env:add_node(pos, {name=corner_2, param2=3})
|
||||
end
|
||||
|
||||
end,
|
||||
})
|
||||
end
|