From 952f4b5f79f41f7512044de949f13c5ff12b5131 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 3 Sep 2019 21:07:55 +0200 Subject: [PATCH] Add descriptions to settings, fix broken settings --- mods/bed/init.lua | 2 +- mods/mobs/api.lua | 2 ++ settingtypes.txt | 43 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/mods/bed/init.lua b/mods/bed/init.lua index 03dfefa..b1d153f 100644 --- a/mods/bed/init.lua +++ b/mods/bed/init.lua @@ -360,7 +360,7 @@ minetest.register_node( meta:set_string("player", "") elseif meta:get_string("player") == "" and not default.player_attached[name] and bed.userdata[name].in_bed == false then - if not minetest.settings:get_bool("bed_enabled") then + if not minetest.settings:get_bool("bed_enable", true) then return end diff --git a/mods/mobs/api.lua b/mods/mobs/api.lua index 9d80927..072322c 100644 --- a/mods/mobs/api.lua +++ b/mods/mobs/api.lua @@ -372,6 +372,7 @@ function mobs:register_mob(name, def) if self.type == "monster" and peaceful_only then + minetest.log("action", "[mobs] Hostile mob "..self.name.." removed at "..minetest.pos_to_string(vector.round(self.object:get_pos()))) self.object:remove() return end @@ -1209,6 +1210,7 @@ function mobs:register_mob(name, def) if self.type == "monster" and peaceful_only then + minetest.log("action", "[mobs] Hostile mob "..self.name.." removed at "..minetest.pos_to_string(vector.round(self.object:get_pos()))) self.object:remove() end diff --git a/settingtypes.txt b/settingtypes.txt index fd156ea..199ff1c 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -7,43 +7,74 @@ ## Player stuff +# If enabled, players drop their items when they die. drop_items_on_die (Drop items on death) bool true ## Initial items +# If enabled, new players will start with a couple of initial items, set in the give_initial_items setting. give_initial_enable (Enable initial items) bool false +# Comma-separated list of initial items to give to new players. You must use itemstrings as the item identifiers. This only works if give_initial_enable is active. give_initial_items (Initial items) string default:pick_stone,default:torch_weak 10 ## TNT +# This enables TNT. TNT is a block that, if ignited, will explode, deal damage and destroy blocks around it. +# If disabled, TNT will be completely removed from the game. +# +# Warning: If you disable this setting in a world in which TNT already existed, there will be bugs! tnt_enable (Enable TNT) bool true -tnt_radius (TNT radius) int 3 + +# The radius in which blocks will be destroyed by a TNT explosion. +tnt_radius (TNT radius) int 3 0 ## Mobs -mobs_peaceful (Peaceful mobs) bool false +# If enabled, only peaceful, non-hostile mobs will appear. Hostile mobs will disappear and cannot be spawned at all. +# This setting is only read at startup. +only_peaceful_mobs (Only peaceful mobs) bool false + +# If enabled, hostile mobs will not attack near the player spawn on multiplayer servers. This setting is ignored in singleplayer, mobs will attack regardless. +# The safety radius is set in static_spawn_radius. mobs_safe_spawn (Safe spawn from mobs) bool true ## Spawning -static_spawn_radius (Spawnpoint safety radius) int 256 +# Radius around the player spawn point in which mobs don't attack. +# This is only the case in multiplayer servers and if the setting mobs_safe_spawn is enabled. In singleplayer, mobs will attack regardless. +# +# Additionally, this radius also specifies the radius around +# spawn in which villages don't generate. +static_spawn_radius (Spawnpoint safety radius) int 256 0 ## Beds -bed_enable (Enable beds) bool true +# If enabled, players can sleep in beds. If the majority of all players game sleep in the bed at night, the night will be skipped. +# If disabled, beds are just decoration and can't be interacted with. +bed_enable (Enable sleeping in beds) bool true ## Music -music_enable (Enable music players) bool true +# If enabled, music players will be able to play music. +# If disabled, music players will stay silent. +music_enable (Enable music player playback) bool true ## Weather +# If enabled, the weather will change from time to time. weather_enable (Enable dynamic weather) bool true -## Ambiance +## Ambience +# Enables ambient sounds, such as birds, crickets, etc. ambiance_enable (Enable ambient sounds) bool true ## Player skins +# Here you can add your custom player skins. List each skin by name here, separated by commas. +# The player skin files are read from mods/player_skins/textures in the game's directory. +# Each skin requires two PNG files, where is the skin name: +# +# * player_skins_.png: Player skin +# * player_skins_icon_.png: Player skin icon player_skins_names (Player skin list) string male,female