1
0
mirror of https://github.com/Sokomine/cottages.git synced 2024-12-29 12:10:33 +01:00

took care of unregistered-globals-warnings

This commit is contained in:
Sokomine 2015-07-27 17:51:58 +02:00
parent 2d05ae5b7d
commit 9d5db547f0
11 changed files with 26 additions and 63 deletions

View File

@ -19,10 +19,12 @@ VanessaE (CC-by-SA 3.0):
cottages_homedecor_shingles_asphalt.png
cottages_homedecor_shingles_terracotta.png
cottages_homedecor_shingles_wood.png
glooptest_tool_steelhammer.png
cottages_sleepingmat.png
cottages_barrel.png
CC-by-SA; done by GloopMaster (CC-by-SA):
glooptest_tool_steelhammer.png
badger436 (created for this mod; CC BY-SA 3.0):
cottages_feldweg.png

View File

@ -4,6 +4,9 @@
-- License: GPLv3
--
-- Modified:
-- 27.07.15 Moved into its own repository.
-- Made sure textures and craft receipe indigrents are available or can be replaced.
-- Took care of "unregistered globals" warnings.
-- 23.01.14 Added conversion receipes in case of installed castle-mod (has its own anvil)
-- 23.01.14 Added hammer and anvil as decoration and for repairing tools.
-- Added hatches (wood and steel).
@ -19,6 +22,13 @@
cottages = {}
-- Boilerplate to support localized strings if intllib mod is installed.
if minetest.get_modpath( "intllib" ) and intllib then
cottages.S = intllib.Getter()
else
cottages.S = function(s) return s end
end
--cottages.config_use_mesh_barrel = false;
--cottages.config_use_mesh_handmill = true;
@ -39,3 +49,6 @@ dofile(minetest.get_modpath("cottages").."/nodes_barrel.lua");
-- this is only required and useful if you run versions of the random_buildings mod where the nodes where defined inside that mod
dofile(minetest.get_modpath("cottages").."/alias.lua");
-- variable no longer needed
cottages.S = nil;

View File

@ -7,13 +7,7 @@
-- License of the hammer picture: CC-by-SA; done by GloopMaster; source:
-- https://github.com/GloopMaster/glooptest/blob/master/glooptest/textures/glooptest_tool_steelhammer.png
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = cottages.S
-- the hammer for the anvil
minetest.register_tool("cottages:hammer", {

View File

@ -21,13 +21,7 @@
-- TODO: option so that it works without nodeboxes
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = cottages.S
barrel = {};

View File

@ -3,12 +3,7 @@
-- TODO: add bags (not for carrying around but for decoration)
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = cottages.S
cottages_chests = {}
-- uses default.chest_formspec for now

View File

@ -10,13 +10,7 @@
-- abm that opens/closes the window shutters is called. Anything less than 10 minutes
-- (600 seconds) ought to be ok.
-----------------------------------------------------------------------------------------------------------
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = cottages.S
-----------------------------------------------------------------------------------------------------------
-- small window shutters for single-node-windows; they open at day and close at night if the abm is working

View File

@ -1,12 +1,6 @@
-- 22.01.13 Changed texture to that of the wood from the minimal development game
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = cottages.S
minetest.register_node("cottages:fence_small", {
description = S("small fence"),

View File

@ -13,13 +13,7 @@
---------------------------------------------------------------------------------------
-- TODO: change the textures of the bed (make the clothing white, foot path not entirely covered with cloth)
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = cottages.S
-- a bed without functionality - just decoration
minetest.register_node("cottages:bed_foot", {

View File

@ -8,13 +8,7 @@
-- * glass pane - an improvement compared to fence posts as windows :-)
---------------------------------------------------------------------------------------
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = cottages.S
-- can be used to buid real stationary wagons or attached to walls as decoration
minetest.register_node("cottages:wagon_wheel", {
@ -62,7 +56,7 @@ minetest.register_node("cottages:loam", {
})
-- create stairs if possible
if( stairs and stairs.register_stair_and_slab) then
if( minetest.get_modpath("stairs") and stairs and stairs.register_stair_and_slab) then
stairs.register_stair_and_slab("feldweg", "cottages:feldweg",
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
{"cottages_feldweg.png","default_dirt.png", "default_grass.png","default_grass.png","cottages_feldweg.png","cottages_feldweg.png"},

View File

@ -1,10 +1,5 @@
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = cottages.S
---------------------------------------------------------------------------------------
-- roof parts

View File

@ -4,13 +4,7 @@
-- * straw mat - for animals and very poor NPC; also basis for other straw things
-- * straw bale - well, just a good source for building and decoration
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = cottages.S
-- an even simpler from of bed - usually for animals
-- it is a nodebox and not wallmounted because that makes it easier to replace beds with straw mats