namespace settings, alternative rainbow staff
This commit is contained in:
parent
0fa121024c
commit
2c5d2ebee6
5
init.lua
5
init.lua
@ -1,8 +1,9 @@
|
|||||||
local path = minetest.get_modpath("nssm")
|
local path = minetest.get_modpath("nssm")
|
||||||
nssm = {}
|
nssm = {}
|
||||||
|
|
||||||
nssm.mymapgenis = tonumber(minetest.setting_get('mymapgenis')) or 7
|
nssm.mymapgenis = tonumber(minetest.settings:get('nssm.mymapgenis')) or 7
|
||||||
nssm.multimobs = tonumber(minetest.setting_get('multimobs')) or 1000
|
nssm.multimobs = tonumber(minetest.settings:get('nssm.multimobs')) or 1000
|
||||||
|
nssm.init_rainbow_staff = minetest.settings:get_bool('nssm.classic_rainbow_staff')
|
||||||
|
|
||||||
dofile(path.."/spawn.lua")
|
dofile(path.."/spawn.lua")
|
||||||
|
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
--rainbow!
|
-- The Rainbow Staff is a reward for defeating the final boss
|
||||||
|
-- Classic implementation produces ranbow blocks in any direction it is pointed at and used
|
||||||
|
-- This tends to be problematic on servers, so is replaced with a powerful tool instead
|
||||||
|
-- if classic rainbow staff is not enabled
|
||||||
|
|
||||||
|
if nssm.classic_rainbow_staff then
|
||||||
minetest.register_entity("nssm:rainbow", {
|
minetest.register_entity("nssm:rainbow", {
|
||||||
textures = {"transparent.png"},
|
textures = {"transparent.png"},
|
||||||
velocity = 10,
|
velocity = 10,
|
||||||
@ -44,3 +49,24 @@ minetest.register_tool("nssm:rainbow_staff", {
|
|||||||
end,
|
end,
|
||||||
groups = {not_in_creative_inventory=1,}
|
groups = {not_in_creative_inventory=1,}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
else
|
||||||
|
minetest.register_tool("nssm:rainbow_staff", {
|
||||||
|
description = "Rainbow Bludgeon",
|
||||||
|
inventory_image = "rainbow_staff.png",
|
||||||
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 0.2,
|
||||||
|
max_drop_level=1,
|
||||||
|
groupcaps={
|
||||||
|
snappy={times={[1]=0.80, [2]=0.40, [3]=0.20}, uses=70, maxlevel=1},
|
||||||
|
crumbly={times={[1]=0.80, [2]=0.40, [3]=0.20}, uses=70, maxlevel=1},
|
||||||
|
choppy={times={[1]=0.80, [2]=0.40, [3]=0.20}, uses=70, maxlevel=1},
|
||||||
|
cracky={times={[1]=0.80, [2]=0.40, [3]=0.20}, uses=70, maxlevel=1},
|
||||||
|
fleshy={times={[1]=0.80, [2]=0.60, [3]=0.20}, uses=140, maxlevel=1}
|
||||||
|
},
|
||||||
|
damage_groups = {fleshy=20},
|
||||||
|
},
|
||||||
|
|
||||||
|
groups = {not_in_creative_inventory=1,}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
# ABOUT SETTINGS
|
# ABOUT SETTINGS
|
||||||
|
|
||||||
# Mapgen: write here (after "int") 6 (mgv6) or 7 (mgv7 or valleys or fractal or flat)
|
# Mapgen: write here (after "int") 6 (mgv6) or 7 (mgv7 or valleys or fractal or flat)
|
||||||
mymapgenis (Mapgen) int 7
|
nssm.mymapgenis (Mapgen) int 7
|
||||||
|
|
||||||
# Mobs-Multiplier: multiplier defining the spawn abundance for the mobs:
|
# Mobs-Multiplier: multiplier defining the spawn abundance for the mobs:
|
||||||
# 0 = spawn disabled
|
# 0 = spawn disabled
|
||||||
# a number between 0 and 1000 = less then default
|
# a number between 0 and 1000 = less then default
|
||||||
# 1000 = default
|
# 1000 = default
|
||||||
# more than 1000 = suicide is not the fastest way of dying
|
# more than 1000 = suicide is not the fastest way of dying
|
||||||
multimobs (Multimobs) int 1000
|
nssm.multimobs (Multimobs) int 1000
|
||||||
|
|
||||||
# Difficult-level:
|
# Difficult-level:
|
||||||
# Multiplier to raise life and damage of the mobs
|
# Multiplier to raise life and damage of the mobs
|
||||||
mob_difficulty (Mob_difficulty) int 1
|
nssm.mob_difficulty (Mob difficulty) int 1
|
||||||
|
|
||||||
|
nssm.classic_rainbow_staff (Use the classical rainbow staff) bool true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user