some formatting and licensing information

master
Fernando Zapata 2012-05-17 20:39:51 -06:00
parent 690632fb98
commit d0247f6b43
5 changed files with 95 additions and 57 deletions

View File

@ -1,6 +1,13 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Custom Commands -- Custom Commands
--------------------------------------------------------------------------------
-- Many custom commands, currently includes:
-- /killme Suicide
--
-- (c)2012 Fernando Zapata -- (c)2012 Fernando Zapata
-- Code licensed under GNU GPLv2
-- http://www.gnu.org/licenses/gpl-2.0.html
--
-- 2012-05-12 01:03:30 -- 2012-05-12 01:03:30
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -13,4 +20,6 @@ minetest.register_chatcommand( 'killme', {
end end
}) })
print( ' ++ loaded : Custom Commands, by ZLovesPancakes' )
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -1,11 +1,22 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Magic Teleporting Ball -- Farwalk Orb
--------------------------------------------------------------------------------
-- Throw the orb to teleport to it's landing position.
--
-- (c)2012 Fernando Zapata (ZLovesPancakes, Franz.ZPT) -- (c)2012 Fernando Zapata (ZLovesPancakes, Franz.ZPT)
-- Code licensed under GNU GPLv2
-- http://www.gnu.org/licenses/gpl-2.0.html
-- Content licensed under CC BY-SA 3.0
-- http://creativecommons.org/licenses/by-sa/3.0/
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
------------------------------------------------------ Global Variables --------
local V = 18 local V = 18
local G = 9 local G = 9
------------------------------------------------------------ Definition --------
local throw_orb = function( itemstack, user, pointed ) local throw_orb = function( itemstack, user, pointed )
if itemstack:take_item() ~= nil then if itemstack:take_item() ~= nil then
@ -76,21 +87,25 @@ farorb_ent.on_step = function( self, dtime )
end end
-------------------------------------------------------------- Register --------
minetest.register_entity( 'farorb:farorb_ent', farorb_ent ) minetest.register_entity( 'farorb:farorb_ent', farorb_ent )
minetest.register_craftitem( 'farorb:farorb', { minetest.register_craftitem( 'farorb:farorb', {
description = 'Farwalk Orb', description = 'Farwalk Orb',
inventory_image = 'farorb_farorb.png', inventory_image = 'farorb_farorb.png',
on_use = throw_orb on_use = throw_orb
}) })
minetest.register_craft({ minetest.register_craft({
output = 'farorb:farorb', output = 'farorb:farorb',
recipe = { recipe = {
{ '', 'default:glass', '' }, { '', 'default:glass', '' },
{ 'default:glass', 'default:mese', 'default:glass' }, { 'default:glass', 'default:mese', 'default:glass' },
{ '', 'default:glass', '' } { '', 'default:glass', '' }
} }
}) })
----------------------------------------------------------- End of File -------- print( ' ++ loaded : Farwalk Orb, by ZLovesPancakes' )
--------------------------------------------------------------------------------

View File

@ -1,18 +1,20 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Gemstones! -- Gemstones!
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- This mod adds gems such as rubies, sapphires, emeralds, etc. Tools and -- This mod adds gems such as rubies, sapphires, emeralds, etc. Tools and
-- "solid" blocks can be crafted from the gems. -- 'solid' blocks can be crafted from the gems.
-- --
-- (c) 2011 Fernando Zapata -- (c)2012 Fernando Zapata (ZLovesPancakes, Franz.ZPT)
-- Code now licensed under GNU GPLv2 -- Code licensed under GNU GPLv2
-- Content licensed under CC BY-SA 3.0 -- http://www.gnu.org/licenses/gpl-2.0.html
-- Content licensed under CC BY-SA 3.0
-- http://creativecommons.org/licenses/by-sa/3.0/
-- --
-- 2011-12-04 13:26:40 -- 2011-12-04 13:26:40
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Name of the mod -- -- Name of the mod --
gemsmodn = "gemstones" gemsmodn = 'gemstones'
-- List containing the names and quantity of the ores -- -- List containing the names and quantity of the ores --
minerallist = {} minerallist = {}
@ -25,17 +27,17 @@ minerallist = {}
register_gem = function( modname, gemtype, rarity, basetime, durability, toolrules ) register_gem = function( modname, gemtype, rarity, basetime, durability, toolrules )
-- Ores -- -- Ores --
mineralname = modname .. ":mineral_" .. gemtype mineralname = modname .. ':mineral_'..gemtype
mineraltex = "default_stone.png^" .. modname .. "_mineral_" .. gemtype .. ".png" mineraltex = 'default_stone.png^'..modname..'_mineral_'..gemtype..'.png'
-- Gems/lumps -- -- Gems/lumps --
gemname = modname .. ":gem_" .. gemtype gemname = modname..':gem_'..gemtype
gemtex = modname .. "_gem_" .. gemtype .. ".png" gemtex = modname..'_gem_'..gemtype..'.png'
craftname = gemname craftname = gemname
-- Solid block -- -- Solid block --
blockname = modname .. ":block_" .. gemtype blockname = modname..':block_'..gemtype
blocktex = modname .. "_block_" .. gemtype .. ".png" blocktex = modname..'_block_'..gemtype..'.png'
table.insert( minerallist, { mineralname, rarity } ) table.insert( minerallist, { mineralname, rarity } )
@ -46,27 +48,28 @@ register_gem = function( modname, gemtype, rarity, basetime, durability, toolrul
-- Mineral block -- -- Mineral block --
minetest.register_node( mineralname, { minetest.register_node( mineralname, {
description = 'Stone with ' .. gemtype, description = 'Stone with '..gemtype,
tile_images = { mineraltex }, tile_images = { mineraltex },
is_ground_content = true, is_ground_content = true,
material = minetest.digprop_stonelike(1.0), material = minetest.digprop_stonelike(1.0),
groups = { cracky=3 }, groups = { cracky=3 },
drop = craftname .. ' 1', drop = craftname..' 1',
} ) } )
-- Solid block -- -- Solid block --
minetest.register_node( blockname, { minetest.register_node( blockname, {
description = gemtype .. ' block', description = gemtype..' block',
--drawtype = "glasslike", --drawtype = 'glasslike',
tile_images = { blocktex }, tile_images = { blocktex },
--alpha = 200, --alpha = 200,
is_ground_content = true, is_ground_content = true,
groups = { cracky=2 } groups = { cracky=2 }
} ) } )
-- Tools, inspired by "add_tool" by MarkTraceur -- Tools, inspired by 'add_tool' by MarkTraceur
--register_multitool( modname, gemtype, craftname, basetime, durability, toolrules ) --register_multitool( modname, gemtype, craftname, basetime, durability,
-- toolrules )
-- Crafting blocks -- -- Crafting blocks --
minetest.register_craft( { minetest.register_craft( {
@ -88,8 +91,8 @@ end
---- Create gems on chunk generation ------------------------------------------- ---- Create gems on chunk generation -------------------------------------------
-- celeron55 said: -- celeron55 said:
-- "It is somewhat doable, but not very fancily. Off the top of my head -- 'It is somewhat doable, but not very fancily. Off the top of my head
-- without any testing:" -- without any testing:'
-- + My fixes -- + My fixes
local generate_gem = function( minp, maxp ) local generate_gem = function( minp, maxp )
for c, oreinfo in ipairs( minerallist ) do for c, oreinfo in ipairs( minerallist ) do
@ -102,20 +105,25 @@ local generate_gem = function( minp, maxp )
z = math.random( minp.z, maxp.z ), z = math.random( minp.z, maxp.z ),
} }
for i = -1, 1 do for i = -1, 1 do
for j = -1, 1 do for j = -1, 1 do
for k = -1, 1 do for k = -1, 1 do
if math.random() > 0.2 then if math.random() > 0.2 then
--continue --continue
else else
local p = { x=pos.x+i, y=pos.y+j, z=pos.z+k } local p = {
local n = minetest.env:get_node( p ) x = pos.x + i,
if n.name == "default:stone" then y = pos.y + j,
minetest.env:add_node( p, { name = oreinfo[1] } ) z = pos.z + k
end }
end local n = minetest.env:get_node( p )
if n.name == 'default:stone' then
minetest.env:add_node( p, {
name = oreinfo[1] } )
end end
end end
end end
end
end
end end
end end
end end
@ -126,24 +134,24 @@ minetest.register_on_generated( generate_gem )
---- Amethyst ---- ---- Amethyst ----
-- Less durable but slightly faster than steel. -- Less durable but slightly faster than steel.
register_gem( gemsmodn, "amethyst", 5, 0.9, 250, { sword_time = 1 } ) register_gem( gemsmodn, 'amethyst', 5, 0.9, 250, { sword_time = 1 } )
---- Cubic Zirconia ---- ---- Cubic Zirconia ----
-- Almost wood slow, but almost mese-like durability -- Almost wood slow, but almost mese-like durability
register_gem( gemsmodn, "czirconia", 5, 1.6, 1000, { sword_time = 1 } ) register_gem( gemsmodn, 'czirconia', 5, 1.6, 1000, { sword_time = 1 } )
---- Emerald ---- ---- Emerald ----
-- Just a bit less durable than steel -- Just a bit less durable than steel
register_gem( gemsmodn, "emerald", 5, 1.0, 300, { sword_time = 1 } ) register_gem( gemsmodn, 'emerald', 5, 1.0, 300, { sword_time = 1 } )
---- Ruby ---- ---- Ruby ----
-- Faster, but much less durable than steel -- Faster, but much less durable than steel
register_gem( gemsmodn, "ruby", 5, 0.7, 180, { sword_time = 1 } ) register_gem( gemsmodn, 'ruby', 5, 0.7, 180, { sword_time = 1 } )
---- Sapphire ---- ---- Sapphire ----
-- Slow, but more durable than steel -- Slow, but more durable than steel
register_gem( gemsmodn, "sapphire", 5, 1.2, 500, { sword_time = 1 } ) register_gem( gemsmodn, 'sapphire', 5, 1.2, 500, { sword_time = 1 } )
---- Was loaded? --------------------------------------------------------------- ---- Was loaded? ---------------------------------------------------------------
-- Just to be sure, may remove if you like. -- Just to be sure, may remove if you like.
print( " ++ loaded : Gemstones, by ZLovesPancakes" ) print( ' ++ loaded : Gemstones, by ZLovesPancakes' )

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- TNT -- TNT
--------------------------------------------------------------------------------
-- A simple TNT mod which damages both terrain and entities.
-- Based on bcmpinc's pull request.
--
-- (c)2012 Fernando Zapata (ZLovesPancakes, Franz.ZPT) -- (c)2012 Fernando Zapata (ZLovesPancakes, Franz.ZPT)
-- Based on bcmpinc's pull request -- Code licensed under GNU GPLv2
-- http://www.gnu.org/licenses/gpl-2.0.html
-- Content licensed under CC BY-SA 3.0
-- http://creativecommons.org/licenses/by-sa/3.0/
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
local RANGE = 3 local RANGE = 3
@ -115,6 +122,6 @@ minetest.register_on_punchnode( function( pos, node )
end) end)
----------------------------------------------------------------- Debug -------- ----------------------------------------------------------------- Debug --------
print( '++ loaded: TNT, fixed by ZLovesPancakes' ) print( ' ++ loaded : TNT, fixed by ZLovesPancakes' )
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -5,8 +5,10 @@
-- Now included with vainilla Minetest. -- Now included with vainilla Minetest.
-- --
-- (c) 2011-2012 Fernando Zapata -- (c) 2011-2012 Fernando Zapata
-- Code now licensed under GNU GPLv2 -- Code licensed under GNU GPLv2
-- http://www.gnu.org/licenses/gpl-2.0.html
-- Content licensed under CC BY-SA 3.0 -- Content licensed under CC BY-SA 3.0
-- http://creativecommons.org/licenses/by-sa/3.0/
-- --
-- 2012-01-08 11:03:57 -- 2012-01-08 11:03:57
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -16,10 +18,7 @@ local WALLMZ = 5
local WALLPX = 2 local WALLPX = 2
local WALLPZ = 4 local WALLPZ = 4
-------------------------------------------------------------------------------- -------------------------------------------------------- Register Nodes --------
minetest.register_node( 'zlpdoors:door', { minetest.register_node( 'zlpdoors:door', {
description = 'Door', description = 'Door',
@ -103,7 +102,7 @@ minetest.register_node( 'zlpdoors:door_b_o', {
drop = 'zlpdoors:door', drop = 'zlpdoors:door',
}) })
-------------------------------------------------------------------------------- ----------------------------------------------------------- Definitions --------
local round = function( n ) local round = function( n )
if n >= 0 then if n >= 0 then
@ -204,12 +203,12 @@ local on_door_digged = function( pos, node, digger )
end end
end end
-------------------------------------------------------------------------------- ---------------------------------------------------- Register Functions --------
minetest.register_on_placenode( on_door_placed ) minetest.register_on_placenode( on_door_placed )
minetest.register_on_punchnode( on_door_punched ) minetest.register_on_punchnode( on_door_punched )
minetest.register_on_dignode( on_door_digged ) minetest.register_on_dignode( on_door_digged )
-------------------------------------------------------------------------------- print( ' ++ loaded : Doors, by ZLovesPancakes' )
print( ' ++ loaded : Doors by ZLovesPancakes' ) --------------------------------------------------------------------------------