commit 067d4da7a2dd0d302c81faea4777f739b7cd51a1 Author: thefamilygrog Date: Sat Jun 8 16:37:02 2013 -0400 initial upload diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..412eeda --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9d6bd9 --- /dev/null +++ b/.gitignore @@ -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 diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..9f1148a --- /dev/null +++ b/README.txt @@ -0,0 +1,73 @@ +Mob Spawn Eggs (spawneggs) mod for Minetest + + +by thefamilygrog66 + +Description: +This mod randomly spawns "spawning eggs", which when combined with various materials, will become mob spawning eggs (compatible only with PilzAdam's Simple Mobs mod). When the player places one of these, the corresponding mob will appear. + +Recipes: + +Dirt Monster ++---------------+---------------+ +| spawning egg | dirt | ++---------------+---------------+ + +Dungeon Master ++---------------+---------------+ +| spawning egg | mese | ++---------------+---------------+ + +Oerkki ++---------------+---------------+ +| spawning egg | obsidian | ++---------------+---------------+ + +Rat ++---------------+---------------+ +| spawning egg | rat | ++---------------+---------------+ + +Sand Monster ++---------------+---------------+ +| spawning egg | sand | ++---------------+---------------+ + +Sheep ++---------------+---------------+ +| spawning egg | white wool | ++---------------+---------------+ + +Stone Monster ++---------------+---------------+ +| spawning egg | stone | ++---------------+---------------+ + +Tree Monster ++---------------+---------------+ +| spawning egg | sapling | ++---------------+---------------+ + + +Mod dependencies: default, mobs, wool + +License: +Sourcecode: WTFPL (see below) +Graphics: WTFPL (see below) + +See also: +http://minetest.net/ + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + 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 + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..980589e --- /dev/null +++ b/depends.txt @@ -0,0 +1,3 @@ +default +mobs +wool diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..b7fe209 --- /dev/null +++ b/init.lua @@ -0,0 +1,62 @@ +local spawneggs_list = { + { "Spawn Dirt Monster", "dirt_monster", "default:dirt"}, + { "Spawn Dungeon Master", "dungeon_master", "default:mese"}, + { "Spawn Oerkki", "oerkki", "default:obsidian"}, + { "Spawn Rat", "rat", "mobs:rat"}, + { "Spawn Sand Monster", "sand_monster", "default:sand"}, + { "Spawn Sheep", "sheep", "wool:white"}, + { "Spawn Stone Monster", "stone_monster", "default:stone"}, + { "Spawn Tree Monster", "tree_monster", "default:sapling"}, +} + +for i in ipairs(spawneggs_list) do + local spawneggdesc = spawneggs_list[i][1] + local eggtype = spawneggs_list[i][2] + local ingredient = spawneggs_list[i][3] + + minetest.register_craftitem("spawneggs:"..eggtype, { + description = spawneggdesc, + inventory_image = "spawneggs_"..eggtype..".png", + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.above then + minetest.env:add_entity(pointed_thing.above, "mobs:"..eggtype) + itemstack:take_item() + end + return itemstack + end, + }) + + minetest.register_craft({ + output = "spawneggs:"..eggtype, + recipe = { + {"spawneggs:egg", ingredient, ""}, + {"", "", ""}, + {"", "", ""}, + }, + }) +end + +minetest.register_node("spawneggs:egg", { + description = "Spawning Egg", + drawtype = "plantlike", + tiles = {"spawneggs_egg.png"}, + inventory_image = "spawneggs_egg.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.3125} + }, + groups = {cracky=3}, + drop = "spawneggs:egg", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_abm( + {nodenames = {"default:grass_1"}, + interval = 30, + chance = 100, + action = function(pos) + minetest.env:add_node(pos, {name="spawneggs:egg"}) + end, +}) diff --git a/textures/spawneggs_dirt_monster.png b/textures/spawneggs_dirt_monster.png new file mode 100644 index 0000000..7fdfabb Binary files /dev/null and b/textures/spawneggs_dirt_monster.png differ diff --git a/textures/spawneggs_dungeon_master.png b/textures/spawneggs_dungeon_master.png new file mode 100644 index 0000000..104e26e Binary files /dev/null and b/textures/spawneggs_dungeon_master.png differ diff --git a/textures/spawneggs_egg.png b/textures/spawneggs_egg.png new file mode 100644 index 0000000..8ffb509 Binary files /dev/null and b/textures/spawneggs_egg.png differ diff --git a/textures/spawneggs_oerkki.png b/textures/spawneggs_oerkki.png new file mode 100644 index 0000000..7be406a Binary files /dev/null and b/textures/spawneggs_oerkki.png differ diff --git a/textures/spawneggs_rat.png b/textures/spawneggs_rat.png new file mode 100644 index 0000000..002f8de Binary files /dev/null and b/textures/spawneggs_rat.png differ diff --git a/textures/spawneggs_sand_monster.png b/textures/spawneggs_sand_monster.png new file mode 100644 index 0000000..175f5fe Binary files /dev/null and b/textures/spawneggs_sand_monster.png differ diff --git a/textures/spawneggs_sheep.png b/textures/spawneggs_sheep.png new file mode 100644 index 0000000..219a7eb Binary files /dev/null and b/textures/spawneggs_sheep.png differ diff --git a/textures/spawneggs_stone_monster.png b/textures/spawneggs_stone_monster.png new file mode 100644 index 0000000..9ec718b Binary files /dev/null and b/textures/spawneggs_stone_monster.png differ diff --git a/textures/spawneggs_tree_monster.png b/textures/spawneggs_tree_monster.png new file mode 100644 index 0000000..2efe54d Binary files /dev/null and b/textures/spawneggs_tree_monster.png differ