Rename mod 'default' to 'tutorial_default'

master
Wuzzy 2022-08-02 14:45:29 +02:00
parent 05c2a05fba
commit 0c6af8dcd2
139 changed files with 103 additions and 120 deletions

View File

@ -1,3 +1,3 @@
name = arrow_signs name = arrow_signs
depends = default depends = tutorial_default
optional_depends = locks, intllib optional_depends = locks, intllib

View File

@ -1,3 +1,3 @@
name = castle name = castle
depends = default depends = tutorial_default
optional_depends = intllib optional_depends = intllib

View File

@ -1,3 +1,3 @@
name = cottages name = cottages
depends = default depends = tutorial_default
optional_depends = stairs, homedecor, intllib optional_depends = stairs, homedecor, intllib

View File

@ -107,7 +107,7 @@ end -- of cottages.register_roof( name, tiles, basic_material )
--------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------
cottages.register_roof( 'black', cottages.register_roof( 'black',
{"cottages_homedecor_shingles_asphalt.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","cottages_homedecor_shingles_asphalt.png"}, {"cottages_homedecor_shingles_asphalt.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","cottages_homedecor_shingles_asphalt.png"},
'homedecor:shingles_asphalt', 'default:coal_lump', S("black roof"), S("black roof connector"), S("black flat roof")); 'homedecor:shingles_asphalt', 'tutorial_default:coal_lump', S("black roof"), S("black roof connector"), S("black flat roof"));
cottages.register_roof( 'red', cottages.register_roof( 'red',
{"cottages_homedecor_shingles_terracotta.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","cottages_homedecor_shingles_terracotta.png"}, {"cottages_homedecor_shingles_terracotta.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","cottages_homedecor_shingles_terracotta.png"},
'homedecor:shingles_terracotta', 'default:clay_brick', S("red roof"), S("red roof connector"), S("red flat roof")); 'homedecor:shingles_terracotta', 'tutorial_default:clay_brick', S("red roof"), S("red roof connector"), S("red flat roof"));

View File

@ -1,3 +1,3 @@
name = creative name = creative
depends = default depends = tutorial_default
optional_depends = intllib optional_depends = intllib

View File

@ -1,3 +1,3 @@
name = darkage name = darkage
depends = default depends = tutorial_default
optional_depends = intllib optional_depends = intllib

View File

@ -1,9 +0,0 @@
-- mods/default/mapgen.lua
--
-- Aliases for map generator outputs
--
minetest.register_alias("mapgen_stone", "default:stone")
minetest.register_alias("mapgen_water_source", "default:water_source")
minetest.register_alias("mapgen_river_water_source", "default:water_source")

View File

@ -1,3 +0,0 @@
default
mpd
intllib?

View File

@ -165,7 +165,7 @@ minetest.register_craftitem("supplemental:paper_green", {
}) })
-- Crafting example #4 -- Crafting example #4
minetest.register_craft({ minetest.register_craft({
output = "default:book", output = "tutorial_default:book",
recipe = { recipe = {
{"group:paper"}, {"group:paper"},
{"group:paper"}, {"group:paper"},

View File

@ -1,3 +1,3 @@
name = supplemental name = supplemental
depends = default, mpd depends = tutorial_default, mpd
optional_depends = intllib optional_depends = intllib

View File

@ -1466,7 +1466,7 @@ minetest.register_globalstep(function(dtime)
local state_changed = false local state_changed = false
if(tutorial.state.first_gold ~= true) then if(tutorial.state.first_gold ~= true) then
local gold_stack = ItemStack("default:gold_ingot 1") local gold_stack = ItemStack("tutorial_default:gold_ingot 1")
if(inv:contains_item("main", gold_stack)) then if(inv:contains_item("main", gold_stack)) then
tutorial.show_default_dialog( tutorial.show_default_dialog(
name, name,
@ -1478,7 +1478,7 @@ minetest.register_globalstep(function(dtime)
end end
end end
if(tutorial.state.last_gold ~= true) then if(tutorial.state.last_gold ~= true) then
local gold_stack = ItemStack("default:gold_ingot "..tostring(tutorial.gold)) local gold_stack = ItemStack("tutorial_default:gold_ingot "..tostring(tutorial.gold))
if(inv:contains_item("main", gold_stack)) then if(inv:contains_item("main", gold_stack)) then
local formspec = "size[12,6]".. local formspec = "size[12,6]"..
"label[-0.15,-0.4;"..minetest.formspec_escape(S("You've finished the tutorial!")).."]".. "label[-0.15,-0.4;"..minetest.formspec_escape(S("You've finished the tutorial!")).."]"..
@ -1500,7 +1500,7 @@ minetest.register_globalstep(function(dtime)
end end
if(tutorial.state.first_diamond ~= true) then if(tutorial.state.first_diamond ~= true) then
local diamond_stack = ItemStack("default:diamond 1") local diamond_stack = ItemStack("tutorial_default:diamond 1")
if(inv:contains_item("main", diamond_stack)) then if(inv:contains_item("main", diamond_stack)) then
tutorial.show_default_dialog( tutorial.show_default_dialog(
name, name,
@ -1512,7 +1512,7 @@ minetest.register_globalstep(function(dtime)
end end
end end
if(tutorial.state.last_diamond ~= true) then if(tutorial.state.last_diamond ~= true) then
local diamond_stack = ItemStack("default:diamond "..tostring(tutorial.diamonds)) local diamond_stack = ItemStack("tutorial_default:diamond "..tostring(tutorial.diamonds))
if(inv:contains_item("main", diamond_stack)) then if(inv:contains_item("main", diamond_stack)) then
local formspec = "size[12,6]".. local formspec = "size[12,6]"..
"label[-0.15,-0.4;"..minetest.formspec_escape(S("You have collected all hidden diamonds!")).."]".. "label[-0.15,-0.4;"..minetest.formspec_escape(S("You have collected all hidden diamonds!")).."]"..

View File

@ -1,4 +1,4 @@
name = tutorial name = tutorial
description = This mod provides some additional items neccessary for the tutorial. description = This mod provides some additional items neccessary for the tutorial.
depends = default depends = tutorial_default
optional_depends = intllib optional_depends = intllib

View File

@ -1,4 +1,4 @@
Minetest 0.4 mod: default tutorial_default mod
========================== ==========================
License of source code: License of source code:

View File

@ -1,5 +1,3 @@
-- mods/default/crafting.lua
-- --
-- Crafting (tool repair) -- Crafting (tool repair)
-- --
@ -14,14 +12,14 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "default:steel_ingot", output = "tutorial_default:steel_ingot",
recipe = "default:iron_lump", recipe = "tutorial_default:iron_lump",
}) })
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "default:gold_ingot", output = "tutorial_default:gold_ingot",
recipe = "default:gold_lump", recipe = "tutorial_default:gold_lump",
}) })
-- --
@ -36,7 +34,7 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:junglegrass", recipe = "tutorial_default:junglegrass",
burntime = 2, burntime = 2,
}) })
@ -48,25 +46,25 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:cactus", recipe = "tutorial_default:cactus",
burntime = 15, burntime = 15,
}) })
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:bookshelf", recipe = "tutorial_default:bookshelf",
burntime = 30, burntime = 30,
}) })
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:fence_wood", recipe = "tutorial_default:fence_wood",
burntime = 15, burntime = 15,
}) })
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:ladder", recipe = "tutorial_default:ladder",
burntime = 5, burntime = 5,
}) })
@ -78,30 +76,30 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:lava_source", recipe = "tutorial_default:lava_source",
burntime = 60, burntime = 60,
}) })
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:torch", recipe = "tutorial_default:torch",
burntime = 4, burntime = 4,
}) })
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:apple", recipe = "tutorial_default:apple",
burntime = 3, burntime = 3,
}) })
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:coal_lump", recipe = "tutorial_default:coal_lump",
burntime = 40, burntime = 40,
}) })
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "default:coalblock", recipe = "tutorial_default:coalblock",
burntime = 370, burntime = 370,
}) })

View File

@ -1,5 +1,3 @@
-- mods/default/craftitems.lua
-- intllib support -- intllib support
local S, F local S, F
if (minetest.get_modpath("intllib")) then if (minetest.get_modpath("intllib")) then
@ -12,37 +10,37 @@ else
F = function ( s ) return minetest.formspec_escape(s) end F = function ( s ) return minetest.formspec_escape(s) end
end end
minetest.register_craftitem("default:book", { minetest.register_craftitem("tutorial_default:book", {
description = S("book"), description = S("book"),
inventory_image = "default_book.png", inventory_image = "default_book.png",
}) })
minetest.register_craftitem("default:coal_lump", { minetest.register_craftitem("tutorial_default:coal_lump", {
description = S("coal lump"), description = S("coal lump"),
inventory_image = "default_coal_lump.png", inventory_image = "default_coal_lump.png",
}) })
minetest.register_craftitem("default:iron_lump", { minetest.register_craftitem("tutorial_default:iron_lump", {
description = S("iron lump"), description = S("iron lump"),
inventory_image = "default_iron_lump.png", inventory_image = "default_iron_lump.png",
}) })
minetest.register_craftitem("default:gold_lump", { minetest.register_craftitem("tutorial_default:gold_lump", {
description = S("gold lump"), description = S("gold lump"),
inventory_image = "default_gold_lump.png", inventory_image = "default_gold_lump.png",
}) })
minetest.register_craftitem("default:diamond", { minetest.register_craftitem("tutorial_default:diamond", {
description = S("diamond"), description = S("diamond"),
inventory_image = "default_diamond.png", inventory_image = "default_diamond.png",
}) })
minetest.register_craftitem("default:steel_ingot", { minetest.register_craftitem("tutorial_default:steel_ingot", {
description = S("steel ingot"), description = S("steel ingot"),
inventory_image = "default_steel_ingot.png", inventory_image = "default_steel_ingot.png",
}) })
minetest.register_craftitem("default:gold_ingot", { minetest.register_craftitem("tutorial_default:gold_ingot", {
description = S("gold ingot"), description = S("gold ingot"),
inventory_image = "default_gold_ingot.png" inventory_image = "default_gold_ingot.png"
}) })

View File

@ -1,5 +1,3 @@
-- mods/default/functions.lua
-- --
-- Sounds -- Sounds
-- --
@ -139,7 +137,7 @@ minetest.register_on_punchnode(on_punchnode)
-- --
minetest.register_abm({ minetest.register_abm({
nodenames = {"default:sapling"}, nodenames = {"tutorial_default:sapling"},
interval = 10, interval = 10,
chance = 50, chance = 50,
action = function(pos, node) action = function(pos, node)
@ -162,7 +160,7 @@ minetest.register_abm({
}) })
minetest.register_abm({ minetest.register_abm({
nodenames = {"default:junglesapling"}, nodenames = {"tutorial_default:junglesapling"},
interval = 10, interval = 10,
chance = 50, chance = 50,
action = function(pos, node) action = function(pos, node)
@ -189,17 +187,17 @@ minetest.register_abm({
-- --
default.cool_lava_source = function(pos) default.cool_lava_source = function(pos)
minetest.set_node(pos, {name="default:obsidian"}) minetest.set_node(pos, {name="tutorial_default:obsidian"})
minetest.sound_play("default_cool_lava", {pos = pos, gain = 0.25}) minetest.sound_play("default_cool_lava", {pos = pos, gain = 0.25})
end end
default.cool_lava_flowing = function(pos) default.cool_lava_flowing = function(pos)
minetest.set_node(pos, {name="default:stone"}) minetest.set_node(pos, {name="tutorial_default:stone"})
minetest.sound_play("default_cool_lava", {pos = pos, gain = 0.25}) minetest.sound_play("default_cool_lava", {pos = pos, gain = 0.25})
end end
minetest.register_abm({ minetest.register_abm({
nodenames = {"default:lava_flowing"}, nodenames = {"tutorial_default:lava_flowing"},
neighbors = {"group:water"}, neighbors = {"group:water"},
interval = 1, interval = 1,
chance = 1, chance = 1,
@ -209,7 +207,7 @@ minetest.register_abm({
}) })
minetest.register_abm({ minetest.register_abm({
nodenames = {"default:lava_source"}, nodenames = {"tutorial_default:lava_source"},
neighbors = {"group:water"}, neighbors = {"group:water"},
interval = 1, interval = 1,
chance = 1, chance = 1,

View File

@ -1,4 +1,3 @@
-- Minetest 0.4 mod: default
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
-- The API documentation in here was moved into doc/lua_api.txt -- The API documentation in here was moved into doc/lua_api.txt
@ -53,10 +52,10 @@ default.gui_suvival_form = "size[8,10]"..
default.get_hotbar_bg(0,4.25) default.get_hotbar_bg(0,4.25)
-- Load files -- Load files
dofile(minetest.get_modpath("default").."/functions.lua") dofile(minetest.get_modpath("tutorial_default").."/functions.lua")
dofile(minetest.get_modpath("default").."/nodes.lua") dofile(minetest.get_modpath("tutorial_default").."/nodes.lua")
dofile(minetest.get_modpath("default").."/tools.lua") dofile(minetest.get_modpath("tutorial_default").."/tools.lua")
dofile(minetest.get_modpath("default").."/craftitems.lua") dofile(minetest.get_modpath("tutorial_default").."/craftitems.lua")
dofile(minetest.get_modpath("default").."/crafting.lua") dofile(minetest.get_modpath("tutorial_default").."/crafting.lua")
dofile(minetest.get_modpath("default").."/mapgen.lua") dofile(minetest.get_modpath("tutorial_default").."/mapgen.lua")
dofile(minetest.get_modpath("default").."/player.lua") dofile(minetest.get_modpath("tutorial_default").."/player.lua")

View File

@ -0,0 +1,7 @@
--
-- Aliases for map generator outputs
--
minetest.register_alias("mapgen_stone", "tutorial_default:stone")
minetest.register_alias("mapgen_water_source", "tutorial_default:water_source")
minetest.register_alias("mapgen_river_water_source", "tutorial_default:water_source")

View File

@ -1,2 +1,2 @@
name = default name = tutorial_default
optional_depends = intllib optional_depends = intllib

View File

@ -1,5 +1,3 @@
-- mods/default/nodes.lua
-- intllib support -- intllib support
local S, F local S, F
if (minetest.get_modpath("intllib")) then if (minetest.get_modpath("intllib")) then
@ -14,64 +12,64 @@ end
local WATER_VISC = 1 local WATER_VISC = 1
minetest.register_node("default:stone", { minetest.register_node("tutorial_default:stone", {
description = S("stone"), description = S("stone"),
tiles = {"default_stone.png"}, tiles = {"default_stone.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3, stone=1}, groups = {cracky=3, stone=1},
drop = 'default:cobble', drop = 'tutorial_default:cobble',
legacy_mineral = true, legacy_mineral = true,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("default:stone_with_coal", { minetest.register_node("tutorial_default:stone_with_coal", {
description = S("coal ore"), description = S("coal ore"),
tiles = {"default_stone.png^default_mineral_coal.png"}, tiles = {"default_stone.png^default_mineral_coal.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3}, groups = {cracky=3},
drop = 'default:coal_lump', drop = 'tutorial_default:coal_lump',
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("default:stone_with_iron", { minetest.register_node("tutorial_default:stone_with_iron", {
description = S("iron ore"), description = S("iron ore"),
tiles = {"default_stone.png^default_mineral_iron.png"}, tiles = {"default_stone.png^default_mineral_iron.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=2}, groups = {cracky=2},
drop = 'default:iron_lump', drop = 'tutorial_default:iron_lump',
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("default:stone_with_gold", { minetest.register_node("tutorial_default:stone_with_gold", {
description = S("gold ore"), description = S("gold ore"),
tiles = {"default_stone.png^default_mineral_gold.png"}, tiles = {"default_stone.png^default_mineral_gold.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=2}, groups = {cracky=2},
drop = "default:gold_lump", drop = "tutorial_default:gold_lump",
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("default:stone_with_diamond", { minetest.register_node("tutorial_default:stone_with_diamond", {
description = S("diamond ore"), description = S("diamond ore"),
tiles = {"default_stone.png^default_mineral_diamond.png"}, tiles = {"default_stone.png^default_mineral_diamond.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=1}, groups = {cracky=1},
drop = "default:diamond", drop = "tutorial_default:diamond",
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("default:dirt_with_grass", { minetest.register_node("tutorial_default:dirt_with_grass", {
description = S("dirt with grass"), description = S("dirt with grass"),
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
is_ground_content = true, is_ground_content = true,
groups = {creative_breakable=1}, groups = {creative_breakable=1},
drop = 'default:dirt', drop = 'tutorial_default:dirt',
sounds = default.node_sound_dirt_defaults({ sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.25}, footstep = {name="default_grass_footstep", gain=0.25},
}), }),
}) })
minetest.register_node("default:dirt", { minetest.register_node("tutorial_default:dirt", {
description = S("dirt"), description = S("dirt"),
tiles = {"default_dirt.png"}, tiles = {"default_dirt.png"},
is_ground_content = true, is_ground_content = true,
@ -79,7 +77,7 @@ minetest.register_node("default:dirt", {
sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_dirt_defaults(),
}) })
minetest.register_node("default:sand", { minetest.register_node("tutorial_default:sand", {
description = S("sand"), description = S("sand"),
tiles = {"default_sand.png"}, tiles = {"default_sand.png"},
is_ground_content = true, is_ground_content = true,
@ -87,7 +85,7 @@ minetest.register_node("default:sand", {
sounds = default.node_sound_sand_defaults(), sounds = default.node_sound_sand_defaults(),
}) })
minetest.register_node("default:tree", { minetest.register_node("tutorial_default:tree", {
description = S("tree trunk"), description = S("tree trunk"),
tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
@ -97,7 +95,7 @@ minetest.register_node("default:tree", {
on_place = minetest.rotate_node on_place = minetest.rotate_node
}) })
minetest.register_node("default:leaves", { minetest.register_node("tutorial_default:leaves", {
description = S("leaves"), description = S("leaves"),
drawtype = "allfaces_optional", drawtype = "allfaces_optional",
waving = 1, waving = 1,
@ -108,7 +106,7 @@ minetest.register_node("default:leaves", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("default:grass_5", { minetest.register_node("tutorial_default:grass_5", {
description = S("grass"), description = S("grass"),
tiles = {"default_grass_5.png"}, tiles = {"default_grass_5.png"},
is_ground_content = true, is_ground_content = true,
@ -122,7 +120,7 @@ minetest.register_node("default:grass_5", {
walkable = false, walkable = false,
}) })
minetest.register_node("default:ladder", { minetest.register_node("tutorial_default:ladder", {
description = S("ladder"), description = S("ladder"),
drawtype = "signlike", drawtype = "signlike",
tiles = {"default_ladder.png"}, tiles = {"default_ladder.png"},
@ -141,14 +139,14 @@ minetest.register_node("default:ladder", {
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
minetest.register_node("default:wood", { minetest.register_node("tutorial_default:wood", {
description = S("wooden planks"), description = S("wooden planks"),
tiles = {"default_wood.png"}, tiles = {"default_wood.png"},
groups = {choppy=2,wood=1}, groups = {choppy=2,wood=1},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
minetest.register_node("default:water_flowing", { minetest.register_node("tutorial_default:water_flowing", {
description = S("flowing water"), description = S("flowing water"),
inventory_image = minetest.inventorycube("default_water.png"), inventory_image = minetest.inventorycube("default_water.png"),
drawtype = "flowingliquid", drawtype = "flowingliquid",
@ -175,15 +173,15 @@ minetest.register_node("default:water_flowing", {
drop = "", drop = "",
drowning = 1, drowning = 1,
liquidtype = "flowing", liquidtype = "flowing",
liquid_alternative_flowing = "default:water_flowing", liquid_alternative_flowing = "tutorial_default:water_flowing",
liquid_alternative_source = "default:water_source", liquid_alternative_source = "tutorial_default:water_source",
liquid_viscosity = WATER_VISC, liquid_viscosity = WATER_VISC,
post_effect_color = {a=64, r=100, g=100, b=200}, post_effect_color = {a=64, r=100, g=100, b=200},
groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1}, groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1},
sounds = default.node_sound_water_defaults(), sounds = default.node_sound_water_defaults(),
}) })
minetest.register_node("default:water_source", { minetest.register_node("tutorial_default:water_source", {
description = S("water source"), description = S("water source"),
inventory_image = minetest.inventorycube("default_water.png"), inventory_image = minetest.inventorycube("default_water.png"),
drawtype = "liquid", drawtype = "liquid",
@ -207,15 +205,15 @@ minetest.register_node("default:water_source", {
drop = "", drop = "",
drowning = 1, drowning = 1,
liquidtype = "source", liquidtype = "source",
liquid_alternative_flowing = "default:water_flowing", liquid_alternative_flowing = "tutorial_default:water_flowing",
liquid_alternative_source = "default:water_source", liquid_alternative_source = "tutorial_default:water_source",
liquid_viscosity = WATER_VISC, liquid_viscosity = WATER_VISC,
post_effect_color = {a=64, r=100, g=100, b=200}, post_effect_color = {a=64, r=100, g=100, b=200},
groups = {water=3, liquid=3, puts_out_fire=1, freezes=1}, groups = {water=3, liquid=3, puts_out_fire=1, freezes=1},
sounds = default.node_sound_water_defaults(), sounds = default.node_sound_water_defaults(),
}) })
minetest.register_node("default:torch", { minetest.register_node("tutorial_default:torch", {
description = S("torch"), description = S("torch"),
drawtype = "torchlike", drawtype = "torchlike",
--tiles = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"}, --tiles = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"},
@ -260,7 +258,7 @@ function default.chest_formspec()
default.get_hotbar_bg(0,4.85) default.get_hotbar_bg(0,4.85)
end end
minetest.register_node("default:chest", { minetest.register_node("tutorial_default:chest", {
description = S("storage chest"), description = S("storage chest"),
tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"}, "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
@ -368,7 +366,7 @@ default.furnace_inactive_formspec =
"label[0,8.5;"..default.gui_controls.."]".. "label[0,8.5;"..default.gui_controls.."]"..
default.get_hotbar_bg(0,4.25) default.get_hotbar_bg(0,4.25)
minetest.register_node("default:furnace", { minetest.register_node("tutorial_default:furnace", {
description = S("furnace"), description = S("furnace"),
tiles = {"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_side.png", tiles = {"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_side.png",
"default_furnace_side.png", "default_furnace_side.png", "default_furnace_front.png"}, "default_furnace_side.png", "default_furnace_side.png", "default_furnace_front.png"},
@ -449,7 +447,7 @@ minetest.register_node("default:furnace", {
end, end,
}) })
minetest.register_node("default:furnace_active", { minetest.register_node("tutorial_default:furnace_active", {
description = S("furnace"), description = S("furnace"),
tiles = { tiles = {
"default_furnace_top.png", "default_furnace_top.png",
@ -470,7 +468,7 @@ minetest.register_node("default:furnace_active", {
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
light_source = 8, light_source = 8,
drop = "default:furnace", drop = "tutorial_default:furnace",
groups = {creative_breakable=1,not_in_creative_inventory=1,hot=1}, groups = {creative_breakable=1,not_in_creative_inventory=1,hot=1},
legacy_facedir_simple = true, legacy_facedir_simple = true,
is_ground_content = false, is_ground_content = false,
@ -557,7 +555,7 @@ local function swap_node(pos,name)
end end
minetest.register_abm({ minetest.register_abm({
nodenames = {"default:chest"}, nodenames = {"tutorial_default:chest"},
interval = 5, interval = 5,
chance = 1, chance = 1,
action = function(pos,node,active_object_count, active_object_count_wider) action = function(pos,node,active_object_count, active_object_count_wider)
@ -568,7 +566,7 @@ minetest.register_abm({
}) })
minetest.register_abm({ minetest.register_abm({
nodenames = {"default:furnace","default:furnace_active"}, nodenames = {"tutorial_default:furnace","tutorial_default:furnace_active"},
interval = 1.0, interval = 1.0,
chance = 1, chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider) action = function(pos, node, active_object_count, active_object_count_wider)
@ -618,7 +616,7 @@ minetest.register_abm({
local percent = math.floor(meta:get_float("fuel_time") / local percent = math.floor(meta:get_float("fuel_time") /
meta:get_float("fuel_totaltime") * 100) meta:get_float("fuel_totaltime") * 100)
meta:set_string("infotext",string.format(S("Active furnace (Flame used: %d%%) (Rightclick to examine)"), percent)) meta:set_string("infotext",string.format(S("Active furnace (Flame used: %d%%) (Rightclick to examine)"), percent))
swap_node(pos,"default:furnace_active") swap_node(pos,"tutorial_default:furnace_active")
meta:set_string("formspec",default.get_furnace_active_formspec(pos, percent)) meta:set_string("formspec",default.get_furnace_active_formspec(pos, percent))
return return
end end
@ -638,7 +636,7 @@ minetest.register_abm({
if not fuel or fuel.time <= 0 then if not fuel or fuel.time <= 0 then
meta:set_string("infotext",S("Furnace without fuel (Rightclick to examine)")) meta:set_string("infotext",S("Furnace without fuel (Rightclick to examine)"))
swap_node(pos,"default:furnace") swap_node(pos,"tutorial_default:furnace")
meta:set_string("formspec", default.furnace_inactive_formspec) meta:set_string("formspec", default.furnace_inactive_formspec)
return return
end end
@ -646,7 +644,7 @@ minetest.register_abm({
if cooked.item:is_empty() then if cooked.item:is_empty() then
if was_active then if was_active then
meta:set_string("infotext",S("Empty furnace (Rightclick to examine)")) meta:set_string("infotext",S("Empty furnace (Rightclick to examine)"))
swap_node(pos,"default:furnace") swap_node(pos,"tutorial_default:furnace")
meta:set_string("formspec", default.furnace_inactive_formspec) meta:set_string("formspec", default.furnace_inactive_formspec)
end end
return return
@ -659,7 +657,7 @@ minetest.register_abm({
end, end,
}) })
minetest.register_node("default:cobble", { minetest.register_node("tutorial_default:cobble", {
description = S("cobblestone"), description = S("cobblestone"),
tiles = {"default_cobble.png"}, tiles = {"default_cobble.png"},
is_ground_content = true, is_ground_content = true,
@ -667,7 +665,7 @@ minetest.register_node("default:cobble", {
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("default:apple", { minetest.register_node("tutorial_default:apple", {
description = S("apple"), description = S("apple"),
drawtype = "plantlike", drawtype = "plantlike",
visual_scale = 1.0, visual_scale = 1.0,
@ -686,7 +684,7 @@ minetest.register_node("default:apple", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer, itemstack) after_place_node = function(pos, placer, itemstack)
if placer:is_player() then if placer:is_player() then
minetest.set_node(pos, {name="default:apple", param2=1}) minetest.set_node(pos, {name="tutorial_default:apple", param2=1})
end end
end, end,
}) })

View File

@ -1,4 +1,3 @@
-- Minetest 0.4 mod: player
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
--[[ --[[

View File

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 441 B

View File

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 261 B

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 252 B

View File

Before

Width:  |  Height:  |  Size: 301 B

After

Width:  |  Height:  |  Size: 301 B

View File

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 210 B

View File

Before

Width:  |  Height:  |  Size: 682 B

After

Width:  |  Height:  |  Size: 682 B

View File

Before

Width:  |  Height:  |  Size: 638 B

After

Width:  |  Height:  |  Size: 638 B

View File

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 627 B

View File

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 290 B

View File

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

View File

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 323 B

View File

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 397 B

View File

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 442 B

View File

Before

Width:  |  Height:  |  Size: 747 B

After

Width:  |  Height:  |  Size: 747 B

View File

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

View File

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 602 B

View File

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 204 B

View File

Before

Width:  |  Height:  |  Size: 719 B

After

Width:  |  Height:  |  Size: 719 B

View File

Before

Width:  |  Height:  |  Size: 553 B

After

Width:  |  Height:  |  Size: 553 B

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 602 B

View File

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 602 B

View File

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 421 B

View File

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 259 B

View File

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

View File

Before

Width:  |  Height:  |  Size: 657 B

After

Width:  |  Height:  |  Size: 657 B

View File

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 628 B

View File

Before

Width:  |  Height:  |  Size: 470 B

After

Width:  |  Height:  |  Size: 470 B

View File

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 253 B

View File

Before

Width:  |  Height:  |  Size: 343 B

After

Width:  |  Height:  |  Size: 343 B

Some files were not shown because too many files have changed in this diff Show More