Initial upload

master
thefamilygrog 2013-09-26 21:59:42 -04:00
commit df7ab03fbf
10 changed files with 317 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

26
README Normal file
View File

@ -0,0 +1,26 @@
Magic Beans (magicbeans) mod for Minetest
by thefamilygrog66
Description: This mod randomly spawns three different types of magic beans - running, jumping and flying - which when eaten, give the player that magical ability for 30 seconds. Because of the inherent danger of temporarily flying, jumping really high or runnng really fast, it's highly recommended that this mod is only used with 'enable damage' unchecked!
Note: The default textures are 64px - if you prefer 16px, they're included as well. Simply change the texture file names (e.g. magicbeans_jumping.png --> magicbeans_jumping64.png, magicbeans_jumping16.png --> magicbeans_jumping.png, etc.) accordingly.
Mod dependencies: default
License: Sourcecode: WTFPL (see below) Graphics: WTFPL (see below)
Thank you very much Simonster for the cool mod idea and your constant inspiration!
------------------------------------------------------------------------
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar sam@hocevar.net
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
You just DO WHAT THE FUCK YOU WANT TO.

54
init.lua Normal file
View File

@ -0,0 +1,54 @@
magicbeans_list = {
{ "Magic Jumping Beans", "jumping", 1, 5, 1},
{ "Magic Flying Beans", "flying", 2, 1, 0.02},
{ "Magic Running Beans", "running", 3, 1, 1},
}
for i in ipairs(magicbeans_list) do
local beandesc = magicbeans_list[i][1]
local bean = magicbeans_list[i][2]
local beanspeed = magicbeans_list[i][3]
local beanjump = magicbeans_list[i][4]
local beangrav = magicbeans_list[i][5]
--Item Registering
minetest.register_craftitem("magicbeans:"..bean, {
description = beandesc,
inventory_image = "magicbeans_"..bean..".png",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.above then
minetest.env:add_item(pointed_thing.above, {name="magicbeans:"..bean})
itemstack:take_item()
end
return itemstack
end,
on_use = function(itemstack, user, pointed_thing)
user:set_physics_override(beanspeed, beanjump, beangrav)
minetest.chat_send_player(user:get_player_name(),"Whoa, that was a strong magic "..bean.." bean!")
local normjump = function()
user:set_physics_override(1, 1, 1)
minetest.chat_send_player(user:get_player_name(),"Looks like you're back to normal now - no more crazy "..bean.."!")
end
minetest.after(30, normjump)
itemstack:take_item()
return itemstack
end,
})
end
-- Bean Spawning
minetest.register_abm(
{nodenames = {"default:dirt_with_grass"},
interval = 600,
chance = 3000,
action = function(pos)
pos.y = pos.y + 1
math.randomseed(os.time())
local j = math.random(3)
local bean = magicbeans_list[j][2]
minetest.env:add_item(pos, {name="magicbeans:"..bean})
end,
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B