mirror of
https://github.com/mt-mods/plantlife_modpack.git
synced 2025-07-19 16:20: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:
@ -1,17 +1,2 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Cave Stuff"
|
||||
local version = "0.0.3"
|
||||
local mname = "cavestuff"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("cavestuff")
|
||||
|
||||
cavestuff = {}
|
||||
|
||||
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("cavestuff").."/mapgen.lua")
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
|
@ -1,11 +1,4 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Pebble=Kieselstein
|
||||
Desert Pebble=Wüstenkiesel
|
||||
Stalactite=Stalaktit
|
||||
|
@ -1,11 +1,4 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Pebble=Ŝtoneto
|
||||
Desert Pebble=Dezerta Ŝtoneto
|
||||
Stalactite=Stalaktito
|
||||
|
@ -1,11 +1,4 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Pebble=Caillou
|
||||
Desert Pebble=Caillou du désert
|
||||
Stalactite=Stalactite
|
||||
|
@ -1,11 +1,4 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Pebble=
|
||||
Desert Pebble=
|
||||
Stalactite=
|
||||
|
@ -12,33 +12,32 @@ minetest.register_node("cavestuff:pebble_1",{
|
||||
description = S("Pebble"),
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:pebble_"..math.random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:pebble_2",{
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
drop = "cavestuff:pebble_1",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:desert_pebble_1",{
|
||||
@ -100,7 +99,7 @@ minetest.register_node("cavestuff:stalactite_1",{
|
||||
if not placer then return end
|
||||
local playername = placer:get_player_name()
|
||||
if minetest.is_protected(place, playername)
|
||||
or minetest.is_protected(above, playername) then
|
||||
or minetest.is_protected(above, playername) then
|
||||
minetest.record_protection_violation(place, playername)
|
||||
return
|
||||
end
|
||||
@ -156,5 +155,3 @@ minetest.register_node("cavestuff:stalactite_3",{
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
--Stalagmites
|
||||
|
Reference in New Issue
Block a user