1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-06-28 14:16:11 +02:00

cleanup codebase (#46)

* cleanup codebase

* fix typo

* add nil checks to on_place

* nuke all mod loaded statements
This commit is contained in:
Niklp
2023-07-11 00:24:25 +02:00
committed by GitHub
parent d9782771c3
commit c7f65aac83
98 changed files with 200 additions and 877 deletions

View File

@ -53,7 +53,7 @@ minetest.register_craft({
{"default:stick",""}
}
})
if minetest.get_modpath("flint") ~= nil then
if minetest.get_modpath("flint") then
minetest.register_craft({
output = "dryplants:sickle",
recipe = {
@ -63,7 +63,7 @@ if minetest.get_modpath("flint") ~= nil then
}
})
end
if minetest.get_modpath("stoneage") ~= nil then
if minetest.get_modpath("stoneage") then
minetest.register_craft({
output = "dryplants:sickle",
recipe = {

View File

@ -1,8 +1,3 @@
-----------------------------------------------------------------------------------------------
local title = "Grasses" -- former "Dry plants"
local version = "0.1.5"
local mname = "dryplants"
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- textures & ideas partly by Neuromancer
@ -20,13 +15,13 @@ dofile(minetest.get_modpath("dryplants").."/crafting.lua")
dofile(minetest.get_modpath("dryplants").."/settings.txt")
dofile(minetest.get_modpath("dryplants").."/reed.lua")
if REEDMACE_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
end
if SMALL_JUNCUS_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/juncus.lua")
dofile(minetest.get_modpath("dryplants").."/juncus.lua")
end
if EXTRA_TALL_GRASS_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
end
--dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua")
@ -201,7 +196,3 @@ minetest.register_abm({
end
end,
})
-----------------------------------------------------------------------------------------------
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
-----------------------------------------------------------------------------------------------

View File

@ -46,6 +46,10 @@ minetest.register_node("dryplants:juncus", {
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
},
on_place = function(itemstack, placer, pointed_thing)
if not itemstack or not placer or not pointed_thing then
return
end
local playername = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, playername) or
minetest.is_protected(pointed_thing.under, playername) then

View File

@ -1,11 +1,4 @@
# textdomain: dryplants
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# reusityback, 2022.
#
Sickle=Sichel
Cut Grass=Gras schneiden
Hay=Heu

View File

@ -1,11 +1,4 @@
# textdomain: dryplants
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Sickle=
Cut Grass=Tranĉita Herbenon
Hay=Fojno

View File

@ -1,11 +1,4 @@
# textdomain: dryplants
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# fat115 <fat115@framasoft.org>, 2017.
#
Sickle=Faucille
Cut Grass=Herbe coupée
Hay=Foin

View File

@ -1,11 +1,4 @@
# textdomain: dryplants
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
Sickle=
Cut Grass=
Hay=