1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-07-21 01:00:31 +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

@ -2,7 +2,7 @@
local function process_blossom_queue_item()
local pos = nature.blossomqueue[1][1]
local node = nature.blossomqueue[1][2]
-- local node = nature.blossomqueue[1][2]
local replace = nature.blossomqueue[1][3]
if (nature.blossomqueue[1][3] == nature.blossom_node and not nature:is_near_water(pos)) then
table.remove(nature.blossomqueue, 1) -- don't grow if it's not near water, pop from queue.
@ -32,7 +32,7 @@ end)
function nature.enqueue_node(pos, node, replace)
local idx = #nature.blossomqueue
if idx < nature.blossomqueue_max then
local enqueue_prob = 0
local enqueue_prob
if idx < nature.blossomqueue_max * 0.8 then
enqueue_prob = 1
else

View File

@ -6,8 +6,6 @@
local current_mod_name = minetest.get_current_modname()
nature = {}
-- support for i18n
local S = minetest.get_translator("nature_classic")
nature.blossomqueue = {}
nature.blossomqueue_max = 1000
@ -25,7 +23,7 @@ if minetest.get_modpath("moretrees") then
nature.blossom_node = "moretrees:apple_blossoms"
nature.blossom_leaves = "moretrees:apple_tree_leaves"
nature.blossom_textures = { "moretrees_apple_tree_leaves.png^nature_blossom.png" }
nature.blossom_groups = { snappy = 3, leafdecay = 1, leaves = 1, flammable = 2, moretrees_leaves = 1 },
nature.blossom_groups = { snappy = 3, leafdecay = 1, leaves = 1, flammable = 2, moretrees_leaves = 1 }
minetest.register_alias("nature:blossom", "default:leaves")
end
@ -39,12 +37,6 @@ nature.apple_spread = 2
nature.meta_blossom_time = "blossom_time"
nature.blossom_duration = nature.blossom_delay
function dumppos(pos)
return "("..pos.x..","..pos.y..","..pos.z..")"
end
dofile(minetest.get_modpath(current_mod_name) .. "/config.lua")
dofile(minetest.get_modpath(current_mod_name) .. "/global_function.lua")
dofile(minetest.get_modpath(current_mod_name) .. "/blossom.lua")
minetest.log("info", S("[Nature Classic] loaded!"))

View File

@ -1,10 +1,2 @@
# textdomain: nature_classic
# 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.
#
Apple blossoms=Apfelblüten
[Nature Classic] loaded!=[Nature Classic] geladen!

View File

@ -1,10 +1,2 @@
# textdomain: nature_classic
# 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.
#
Apple blossoms=Fleurs de pommier
[Nature Classic] loaded!=[Nature Classic] chargé.!

View File

@ -1,10 +1,2 @@
# textdomain: nature_classic
# 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.
#
Apple blossoms=
[Nature Classic] loaded!=