commit c315581544e86a443f428e636993ed76c631a4d1 Author: Neuromancer Date: Thu Dec 20 19:16:46 2012 -0600 initual commit 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..5ebd21a --- /dev/null +++ b/.gitignore @@ -0,0 +1,163 @@ +################# +## 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/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.vspscc +.builds +*.dotCover + +## TODO: If you have NuGet Package Restore enabled, uncomment this +#packages/ + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp + +# ReSharper is a .NET coding add-in +_ReSharper* + +# 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 + +# Others +[Bb]in +[Oo]bj +sql +TestResults +*.Cache +ClientBin +stylecop.* +~$* +*.dbmdl +Generated_Code #added for RIA/Silverlight projects + +# 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 + + + +############ +## Windows +############ + +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +# Mac crap +.DS_Store diff --git a/modpack.txt b/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/phonics/depends.txt b/phonics/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/phonics/depends.txt @@ -0,0 +1 @@ +default diff --git a/phonics/init.lua b/phonics/init.lua new file mode 100644 index 0000000..b9ec657 --- /dev/null +++ b/phonics/init.lua @@ -0,0 +1,169 @@ +-- +--Phonics by bacon and Neuromancer +--License code and textures WTFPL +--code borrows heavilly from InfinityProject's firework mod. +--Requirements: +--Mouth block right click says the word it wants you to spell +--mouth block left click (punch) sounds out what you have spelled (to the right of it) +--if what you have spelled matches one of the spellings for the word the block is looking for +--it makes a firework sound (eventually launching blocks into the air as fireworks) +--if you have not spelled the word the mouth block is looking for, it makes a sad noise. +--as it says each sound the corresponding block lights up +--if you destroy mouth block, it destroys all letters to the right of it (explode or fire burn) +--gray blocks are silent letters which are not sounded out +-- this means we have to create sounds for words and an array of spellings for each word. +--someday have an NPC Tutor. +--maybe have it spell out the correct answer if you put a show answer block on top of it. +--if you don't want a word and want a new word, just destroy the mouth block. + +minetest.register_abm({ + nodenames = {"phonics:a", "phonics:c"}, + interval = 8, + chance = 1, + + action = function(pos, node, active_object_count, active_object_count_wider) +-- if node.name == "fireworks:red" then +-- minetest.env:remove_node(pos,{name="fireworks:red"}) +-- elseif node.name == "fireworks:blue" then +-- minetest.env:remove_node(pos,{name="fireworks:blue"}) +-- elseif node.name == "fireworks:green" then +-- minetest.env:remove_node(pos,{name="fireworks:green"}) +-- elseif node.name == "fireworks:purple" then +-- minetest.env:remove_node(pos,{name="fireworks:purple"}) +-- elseif node.name == "fireworks:orange" then +-- minetest.env:remove_node(pos,{name="fireworks:orange"}) +-- elseif node.name == "fireworks:yellow" then +-- minetest.env:remove_node(pos,{name="fireworks:yellow"}) +-- elseif node.name == "fireworks:rainbow" then +-- minetest.env:remove_node(pos,{name="fireworks:rainbow"}) +-- +-- end + end +}) + +minetest.register_node("phonics:SayWord", { + description = "say word", + tiles = { + "white.jpg", + "white.jpg", + "white.jpg", + "white.jpg", + "white.jpg", + "mouthspeaking.jpg",}, + is_ground_content = true, + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) +--minetest.register_node("fireworks:red", { +-- drawtype = "plantlike", +-- description = "Red", +-- tiles = {"fireworks_red.png"}, +-- light_source = 14, --********** +-- walkable = false, +-- is_ground_content = true, +-- pointable = false, +-- groups = {cracky=3,not_in_creative_inventory=1}, +-- sounds = default.node_sound_stone_defaults(), +--}) + + +minetest.register_node("phonics:a", { + description = "a", + tiles = {"a.jpg"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = { + footstep = default.node_sound_stone_defaults(), + dig = {name="a", gain= 1}, -- "__group" = group-based sound (default) + dug = default.node_sound_stone_defaults(), + }, +}) + +minetest.register_node("phonics:c", { + description = "c", + tiles = {"c.jpg"}, + light_source = 14, --********** + is_ground_content = true, + groups = {cracky=3}, + sounds = { + footstep = default.node_sound_stone_defaults(), + dig = {name="c", gain= 1}, -- "__group" = group-based sound (default) + place = {name="c", gain= 1}, + dug = default.node_sound_stone_defaults(), + }, +}) + +--minetest.register_node("fireworks:red", { +-- drawtype = "plantlike", +-- description = "Red", +-- tiles = {"fireworks_red.png"}, +-- light_source = 14, +-- walkable = false, +-- is_ground_content = true, +-- pointable = false, +-- groups = {cracky=3,not_in_creative_inventory=1}, +-- sounds = default.node_sound_stone_defaults(), +--}) + + + +local phonics = { + handler = {}, + {name="a", length=1.3, gain=1}, + {name="c", length=.3, gain=1} +} +local play_sound = function(list, number) + local gain = 1.0 + minetest.chat_send_all("number" .. number ..">" ) + --minetest.chat_send_all("list[1].name" .. list[1].name ..">" ) + --minetest.chat_send_all("list[number].name" .. list[number].name ..">" ) + local handler = minetest.sound_play(number, {gain=gain}) + --local handler = minetest.sound_play(number, {gain=gain}) +end + +function phonics_activate (pos, node) + minetest.chat_send_all("pos.x" .. pos.x ..">" ) + minetest.chat_send_all("pos.y" .. pos.y ..">" ) + minetest.chat_send_all("pos.z" .. pos.z ..">" ) +play_sound(phonics, node) +end + +--if +-- node.name == "phonics:a" +--then +--end +--elseif +-- node.name == "phonics:c" +--then +--end +-- +--end --function + +--minetest.env:remove_node(pos,{name="fireworks:firework_green"}) + +minetest.register_on_punchnode( function(pos, node, puncher) + +--minetest.chat_send_all("number" .. descr ..">" ) +--if node.name == "phonics:a" +-- then phonics_activate(pos, node.description) --1 +--end +--if node.name == "phonics:c" +-- then phonics_activate(pos, node.description) --2 +--end +--phonics_activate(pos, node.description) +if node.name == "phonics:SayWord" + then + pos.z = pos.z-2 + minetest.env:punch_node(pos) + --minetest.env:dig_node(pos) + --http://minetest.net/forum/viewtopic.php?id=2602 + --https://c9.io/lkjoel/minetest-modder/workspace/parseme.txt +end + +end + + ) + +print("Phonics Mod Loaded!") \ No newline at end of file diff --git a/phonics/sounds/SoundLicences.txt b/phonics/sounds/SoundLicences.txt new file mode 100644 index 0000000..331ad56 --- /dev/null +++ b/phonics/sounds/SoundLicences.txt @@ -0,0 +1,15 @@ +Sound Licenses +File: fireworks_triangle +Created By:Syna-Max +Licence: Attribution Noncommercial License. +URL: http://www.freesound.org/people/Syna-Max/sounds/56606/ + +File:RomanCandlesandShells.mp3 +CreatedBy: Mr Sensible +License: This work is licensed under the Creative Commons 0 License. +URL:http://www.freesound.org/people/Mr%20Sensible/sounds/15000/ + +File: MrSensibleFireworks.mp3 +CreatedBy: Mr Sensible +License: This work is licensed under the Creative Commons 0 License. +http://www.freesound.org/people/Mr%20Sensible/sounds/27757/ \ No newline at end of file diff --git a/phonics/sounds/a.ogg b/phonics/sounds/a.ogg new file mode 100644 index 0000000..989abbc Binary files /dev/null and b/phonics/sounds/a.ogg differ diff --git a/phonics/sounds/c.ogg b/phonics/sounds/c.ogg new file mode 100644 index 0000000..cbb819b Binary files /dev/null and b/phonics/sounds/c.ogg differ diff --git a/phonics/textures/a.jpg b/phonics/textures/a.jpg new file mode 100644 index 0000000..8743e65 Binary files /dev/null and b/phonics/textures/a.jpg differ diff --git a/phonics/textures/b.jpg b/phonics/textures/b.jpg new file mode 100644 index 0000000..676e14f Binary files /dev/null and b/phonics/textures/b.jpg differ diff --git a/phonics/textures/blue.jpg b/phonics/textures/blue.jpg new file mode 100644 index 0000000..a477c91 Binary files /dev/null and b/phonics/textures/blue.jpg differ diff --git a/phonics/textures/c.jpg b/phonics/textures/c.jpg new file mode 100644 index 0000000..845ab9a Binary files /dev/null and b/phonics/textures/c.jpg differ diff --git a/phonics/textures/d.jpg b/phonics/textures/d.jpg new file mode 100644 index 0000000..aa969c8 Binary files /dev/null and b/phonics/textures/d.jpg differ diff --git a/phonics/textures/e.jpg b/phonics/textures/e.jpg new file mode 100644 index 0000000..c4de6b2 Binary files /dev/null and b/phonics/textures/e.jpg differ diff --git a/phonics/textures/f.jpg b/phonics/textures/f.jpg new file mode 100644 index 0000000..6780e3f Binary files /dev/null and b/phonics/textures/f.jpg differ diff --git a/phonics/textures/fireworks_blue.png b/phonics/textures/fireworks_blue.png new file mode 100644 index 0000000..99fa90b Binary files /dev/null and b/phonics/textures/fireworks_blue.png differ diff --git a/phonics/textures/fireworks_green.png b/phonics/textures/fireworks_green.png new file mode 100644 index 0000000..b6568ea Binary files /dev/null and b/phonics/textures/fireworks_green.png differ diff --git a/phonics/textures/fireworks_orange.png b/phonics/textures/fireworks_orange.png new file mode 100644 index 0000000..66c0628 Binary files /dev/null and b/phonics/textures/fireworks_orange.png differ diff --git a/phonics/textures/fireworks_purple.png b/phonics/textures/fireworks_purple.png new file mode 100644 index 0000000..f7722a1 Binary files /dev/null and b/phonics/textures/fireworks_purple.png differ diff --git a/phonics/textures/fireworks_rainbow.png b/phonics/textures/fireworks_rainbow.png new file mode 100644 index 0000000..bd23588 Binary files /dev/null and b/phonics/textures/fireworks_rainbow.png differ diff --git a/phonics/textures/fireworks_red.png b/phonics/textures/fireworks_red.png new file mode 100644 index 0000000..cb76c57 Binary files /dev/null and b/phonics/textures/fireworks_red.png differ diff --git a/phonics/textures/fireworks_yellow.png b/phonics/textures/fireworks_yellow.png new file mode 100644 index 0000000..5216c3b Binary files /dev/null and b/phonics/textures/fireworks_yellow.png differ diff --git a/phonics/textures/g.jpg b/phonics/textures/g.jpg new file mode 100644 index 0000000..aaf9e68 Binary files /dev/null and b/phonics/textures/g.jpg differ diff --git a/phonics/textures/h.jpg b/phonics/textures/h.jpg new file mode 100644 index 0000000..657a3b2 Binary files /dev/null and b/phonics/textures/h.jpg differ diff --git a/phonics/textures/i.jpg b/phonics/textures/i.jpg new file mode 100644 index 0000000..fa8944a Binary files /dev/null and b/phonics/textures/i.jpg differ diff --git a/phonics/textures/j.jpg b/phonics/textures/j.jpg new file mode 100644 index 0000000..b9d3af7 Binary files /dev/null and b/phonics/textures/j.jpg differ diff --git a/phonics/textures/k.jpg b/phonics/textures/k.jpg new file mode 100644 index 0000000..b4c8d30 Binary files /dev/null and b/phonics/textures/k.jpg differ diff --git a/phonics/textures/l.jpg b/phonics/textures/l.jpg new file mode 100644 index 0000000..c35e01a Binary files /dev/null and b/phonics/textures/l.jpg differ diff --git a/phonics/textures/mouthspeaking.jpg b/phonics/textures/mouthspeaking.jpg new file mode 100644 index 0000000..6c92a40 Binary files /dev/null and b/phonics/textures/mouthspeaking.jpg differ diff --git a/phonics/textures/white.jpg b/phonics/textures/white.jpg new file mode 100644 index 0000000..83e5649 Binary files /dev/null and b/phonics/textures/white.jpg differ