wormball-cd2025/init.lua
2023-08-14 00:25:20 +02:00

76 lines
1.9 KiB
Lua

wormball = {}
wormball.HUD = {}
dofile(minetest.get_modpath("wormball") .. "/globals.lua")
arena_lib.register_minigame("wormball", {
name = "Wormball",
prefix = "[Wormball] ",
icon = "magiccompass_wormball.png",
chat_all_prefix = "[WB]",
player_aspect = {
visual = "sprite",
textures = {"blank.png"},
},
hotbar = {
slots = 0,
background_image = "blank.png",
selected_image = "blank.png",
},
min_players = 1,
max_players = 10,
spectate_mode = true,
disable_inventory = true,
keep_attachments = false,
show_nametags = true,
time_mode = 'incremental',
load_time = 5,
celebration_time = 10,
in_game_physics = {
speed = 1,
jump = 1,
sneak = false,
gravity = 1,
},
disabled_damage_types = {"punch","fall"},
properties = {
min_food_factor = 2,
min_food = 20,
singleplayer_leaderboard = {},
multi_scores = {},
},
temp_properties = {
mode = 'singleplayer',
dots = {},
num_players = 0,
time_to_next_elim = 60,
elims = 0,
},
initial_time = 300,
player_properties = {
alive = true,
direction = {x=0,y=1,z=0},
old_direction = {x=0,y=1,z=0},
nodes = {},
score = 1,
color = "",
move = true,
attached = false,
eliminated = false,
},
})
--nodes includes the attachment entity, also there are creative decorative worm body parts for decorating minigame hubs
dofile(minetest.get_modpath("wormball") .. "/nodes.lua")
dofile(minetest.get_modpath("wormball") .. "/privs.lua")
dofile(minetest.get_modpath("wormball") .. "/leaderboard.lua")
dofile(minetest.get_modpath("wormball") .. "/commands.lua")
--minigame_manager simply runs all the files in the folder minigame_manager
dofile(minetest.get_modpath("wormball") .. "/minigame_manager.lua")