initial commit

master
Brandon Bohannon 2013-02-19 22:05:49 -06:00
commit 2f3dd459bd
7 changed files with 329 additions and 0 deletions

22
.gitattributes vendored Normal file
View 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
View 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

1
depends.txt Normal file
View File

@ -0,0 +1 @@
default

91
init.lua Normal file
View File

@ -0,0 +1,91 @@
local stairpick = {}
minetest.register_tool("stairpick:stairpick_steel",{
description = "Pick specifically designed for carving stairs",
groups = {hard=3,metal=3},
inventory_image = "stairpick_steel.png",
stack_max=1,
liquids_pointable = false,
on_use = function (itemstack, player, pointed_thing)
return stairpick.use_pick(itemstack,player,pointed_thing)
end
})
minetest.register_tool("stairpick:stairpick_steel",{
description = "Pick specifically designed for carving stairs",
groups = {hard=3,metal=3},
inventory_image = "stairpick_steel.png",
stack_max=1,
liquids_pointable = false,
on_use = function (itemstack, player, pointed_thing)
return stairpick.use_pick(itemstack,player,pointed_thing)
end
})
minetest.register_tool("stairpick:stairpick_mese",{
description = "Pick specifically designed for carving stairs",
groups = {hard=3,metal=3},
inventory_image = "stairpick_mese.png",
stack_max=1,
liquids_pointable = false,
on_use = function (itemstack, player, pointed_thing)
return stairpick.use_pick(itemstack,player,pointed_thing)
end
})
function stairpick.use_pick(itemstack, player, pointed_thing)
-- not exactly sure what to do here, pointed thing is a nodeDef?
--minetest.log("action",minetest.pos_to_string(pointed_thing.under))
--minetest.env:remove_node(pointed_thing.under)
node = minetest.env:get_node(pointed_thing.under)
local modname, nodename = string.match(node.name, "([^ ]+):([^ ]+)")
minetest.log('action',nodename)
local stairmod = nil
if ( minetest.registered_nodes["stairs:stair_"..nodename] ~= nil ) then
stairmod = "stairs"
elseif ( minetest.registered_nodes["stairsplus:stair_"..nodename] ~= nil ) then
stairmod = "stairsplus"
end
if ( stairmod ~= nil ) then
-- stairs exist for this node
minetest.env:remove_node(pointed_thing.under)
local fakestack = ItemStack(minetest.registered_nodes[stairmod..":stair_"..nodename])
minetest.item_place(fakestack, player, pointed_thing)
if ( itemstack:get_name() == "stairpick:stairpick_steel" ) then
minetest.log("action","wear on stairpick_steel "..tostring(itemstack:get_wear()))
itemstack:add_wear(1300)
minetest.log("action","wear on stairpick_steel "..tostring(itemstack:get_wear()))
end
if ( itemstack:get_name() == "stairpick:stairpick_mese" ) then
minetest.log("action","wear on stairpick_mese "..tostring(itemstack:get_wear()))
itemstack:add_wear(900)
minetest.log("action","wear on stairpick_mese "..tostring(itemstack:get_wear()))
end
end
return itemstack
end
minetest.register_craft({
output = "stairpick:stairpick_steel",
recipe = {
{'','default:steel_ingot','default:steel_ingot'},
{'default:steel_ingot','','default:stick'},
{'default:steel_ingot','','default:stick'}
}
})
minetest.register_craft({
output = "stairpick:stairpick_mese",
recipe = {
{'','default:mese_crystal','default:mese_crystal'},
{'default:mese_crystal','','default:stick'},
{'default:mese_crystal','','default:stick'}
}
})

BIN
textures/stairpick.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

BIN
textures/stairpick_mese.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B