[Mod] Arena_lib [4.6.0] [arena_lib]

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

[Mod] Arena_lib [4.6.0] [arena_lib]

by Zughy » Post

I won't update my mods on the forum anymore. Check them out on ContentDB instead!

Image

Arena_lib is a library for Minetest working as a core for any arena mini-game you have in mind.
It comes with an arena manager and a signs system. The latter creates a bridge inside your own server between the hub and your actual mod (deathmatch, capture the flag, assault, you name it). In other words, you don't have to do the boring job and you can focus exclusively on your minigame.

Example of how to implement arena_lib

Code: Select all

arena_lib.register_minigame("Call of Zughy", {
  prefix = "[CoZ] ",
  hub_spawn_point = { x = 5, y = 10, z = 4 },
  teams = {
    "red",
    "blue"
  },
  teams_color_overlay = {
    "crimson",
    "blue"
  },
  disabled_damage_types = {
    "fall"
  },
  queue_waiting_time = 20,
  show_minimap = true,
  properties = {
    planting_locations = {{x=30, y=20, z=40}, {x=5, y=20, z=80}}, --you can override these parameters via your mod, of course
  },
  temp_properties = {
    kill_leader = " ",
    is_bomb_planted = false
  },
  player_properties = {
    killstreak = 0,
    has_bomb = false
  },
  team_properties = {
    rounds_won = 0
  }
})

Read the full documentation
: https://gitlab.com/zughy-friends-minete ... er/DOCS.md

License: GPL 3
Mod dependencies: default, signs_lib, (optional) hub manager
Known conflicts: anything overriding the default respawn behaviour, such as Beds

Download: https://gitlab.com/zughy-friends-minete ... v4.1.0.zip

ContentDB: https://content.minetest.net/packages/Zughy/arena_lib/
GitLab: https://gitlab.com/zughy-friends-minetest/arena_lib
Issue Tracker: https://gitlab.com/zughy-friends-minete ... b/-/issues

A few mods using arena_lib
Murder by Giov4
Skywars by Giov4
Last edited by Zughy on Mon Jan 25, 2021 11:29, edited 36 times in total.

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Lib] Arena_lib

by Imk » Post

init

Code: Select all

local modname = "aion"
local modpath = minetest.get_modpath(modname) --местоположение корневой директории мода. 

-- локализация перевода
-- local S = minetest.get_translator(modname)

-- Load files
dofile(modpath .. "/arena_lib/api.lua")

minetest.log("action","[MOD] Aion loaded ...")


api quake replaced aion

Code: Select all

arena_lib = {}
arena_lib.arenas = {}
arena_lib.mod_name = minetest.get_current_modname()

dofile(minetest.get_modpath("aion") .. "/arena_lib/debug_utilities.lua")
dofile(minetest.get_modpath("aion") .. "/arena_lib/items.lua")
dofile(minetest.get_modpath("aion") .. "/arena_lib/player_manager.lua")
dofile(minetest.get_modpath("aion") .. "/arena_lib/signs.lua")

----------------------------------------------
--------------GESTIONE STORAGE----------------
----------------------------------------------

Code: Select all

ModError: Failed to load and run script from D:\main\minetest-5.2.0-0df646e-win64\bin\..\mods\aion\init.lua:
...5.2.0-0df646e-win64\bin\..\mods\aion/arena_lib/signs.lua:16: Attempt to override non-existent item default:sign_wall
stack traceback:
	[C]: in function 'error'
	...est-5.2.0-0df646e-win64\bin\..\builtin\game\register.lua:402: in function 'override_item'
	...5.2.0-0df646e-win64\bin\..\mods\aion/arena_lib/signs.lua:16: in main chunk
	[C]: in function 'dofile'
	...t-5.2.0-0df646e-win64\bin\..\mods\aion/arena_lib/api.lua:8: in main chunk
	[C]: in function 'dofile'
	...n\minetest-5.2.0-0df646e-win64\bin\..\mods\aion\init.lua:11: in main chunk
give a working example of the arena
wasn't quite sure what to do.

arena_lib.settings({
prefix = "[whatever] "
--other parameters
})
it's in init?

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Lib] Arena_lib

by Zughy » Post

Imk wrote: api quake replaced aion

Code: Select all

arena_lib = {}
arena_lib.arenas = {}
arena_lib.mod_name = minetest.get_current_modname()

dofile(minetest.get_modpath("aion") .. "/arena_lib/debug_utilities.lua")
dofile(minetest.get_modpath("aion") .. "/arena_lib/items.lua")
dofile(minetest.get_modpath("aion") .. "/arena_lib/player_manager.lua")
dofile(minetest.get_modpath("aion") .. "/arena_lib/signs.lua")

Whoops, I forgot about that: I updated the repo, now there is no need to specify your mod name anymore
Imk wrote:

Code: Select all

ModError: Failed to load and run script from D:\main\minetest-5.2.0-0df646e-win64\bin\..\mods\aion\init.lua:
...5.2.0-0df646e-win64\bin\..\mods\aion/arena_lib/signs.lua:16: Attempt to override non-existent item default:sign_wall
stack traceback:
	[C]: in function 'error'
	...est-5.2.0-0df646e-win64\bin\..\builtin\game\register.lua:402: in function 'override_item'
	...5.2.0-0df646e-win64\bin\..\mods\aion/arena_lib/signs.lua:16: in main chunk
	[C]: in function 'dofile'
	...t-5.2.0-0df646e-win64\bin\..\mods\aion/arena_lib/api.lua:8: in main chunk
	[C]: in function 'dofile'
	...n\minetest-5.2.0-0df646e-win64\bin\..\mods\aion\init.lua:11: in main chunk
I edited the main post as I forgot to add "Default" as a dependency. Basically it didn't find the default sign wall node.
Imk wrote:give a working example of the arena
Check my Quake mod: it's a work in progress but it works already https://gitlab.com/zughy-friends-minete ... test-quake
Imk wrote: arena_lib.settings({
prefix = "[whatever] "
--other parameters
})
it's in init?
Yup

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Lib] Arena_lib

by Imk » Post

thank you . Спасибо)

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Lib] Arena_lib

by Zughy » Post

UPDATE - first version released (1.0.0)

After a few changes, we (my friends and I) decided to release the first stable version. It's been running on our server for a few weeks giving apparently no problems (better said, we fixed stuff as days went by).

If someone was using arena_lib already, the only major change is in two functions:

Code: Select all

arena_lib.send_message_players_in_arena(arena)

Code: Select all

arena_lib.arena_get_players_count(arena)
and two callbacks:

Code: Select all

arena_lib.on_start(arena)

Code: Select all

arena_lib.on_celebration(arena, winner_name)
Before they all took the arena ID instead of the whole arena as an argument (thanks to Giov4 for the PR)

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.0.0] [arena_lib]

by Zughy » Post

Well, apparently I miscalculated a few things and.. WHATEVER

UPDATE - Second major version released (2.0.0)

Now it acts a standalone mod and it can run multiple mini-games on the same server.
A lot of changes has been made, so be sure to check the docs in the first post. Also, if you were using it before in a mod of yours... well, now it's simply broken. I'm truly sorry for that, I needed to rewrite from scratch a lot of things in order to make it viable per mod. So if this is the case, just delete the arena_lib folder inside your own mod and follow the config section in the docs.

Also, now it's on ContentDB: https://content.minetest.net/packages/Zughy/arena_lib/

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.1.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 2.1.0

Translation system added. Strings are now in English by default and a full Italian translation is provided

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.2.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 2.2.0

- storage management improved
- customise your arena even more with the new fields properties and temp_properties

Gonna keep arena_lib resting for a while, all the main features I wanted are there. For anything, tho, feel free to ask and I'll see what I can do :)

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.2.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 2.2.1

I missed a couple bugs: arenas weren't really removed from the new storage and temp_properties not properly reset

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.3.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 2.3.0

- Added reason as a parameter in on_death callback
- Added is_eliminated as a parameter in remove_player_from_arena
- Input manager removed. Please use Controls

EDIT: rolled 2.3.1 too as the player wasn't teleported back to the hub when removed with is_eliminated

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.4.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 2.4.0

What's new
  • check if a player is inside an arena of a specific mod
  • new parameters for more customisation in arena_lib.settings:
    • queue_waiting_time
    • show_nametags
    • show_minimap
  • DOCS updated
Bugfixes
  • when a player was eliminated, the nickname didn't turn visible
Last edited by Zughy on Sat May 09, 2020 11:30, edited 1 time in total.

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.5.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 2.5.0 EDIT: and 2.5.1


What's new
  • customise your players properties by using the new player_parameters field in arena_lib.settings
  • you can now leave a queue by entering a new one without having to leave the former first
  • default killstreak player property removed
  • kill_cap parameter removed. Goals shouldn't be up to arena_lib as explained here
  • DOCS updated
  • Better example file
Bugfixes
  • crashfix: wrong field declaration in print_arena_stats made the game crash when a match wasn't in progress
  • signs weren't showing when an arena was terminating
2.5.1
BUGFIX RELEASE: beware the refactoring set_sign -> give_sign_tool. Arenas signs weren't overrided properly

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.6.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 2.6.0

What's new
  • two HUDs implemented: use them to broadcast messages to players while in game
  • queues visually improved using the aforementioned HUDs
  • Join/leave messages visually improved
  • queues default time now is 10 (before it was 5)
  • when queues timer is 5 or lower, players are notified with a sound every second
  • DOCS updated

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.7.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 2.7.0

What's new
  • Soft dependency added: Hub Manager
  • Timers per arena implemented
  • Minigame parameter is_timer_incrementing added: use it to define the behaviour of timers in your minigame
  • Removed the global hub_spawn_point. If you want a global hub spawn point, use Hub Manager
  • Immunity item moved from slot 9 to slot 8: it's now visible in the hotbar
  • If a queue is full, the waiting time decreases to 5 if not lower already
  • arena_lib.remove_player_from_arena(p_name, <reason>) expanded with a kick and a quit reason
  • Callbacks added: on_eliminate, on_kick, on_quit, on_timeout, on_timer_tick
  • DOCS updated

Deprecated
  • arena_lib.get_arena_players_count(...). Use whateverarena.players_amount to retrieve the number instead
  • arena_lib.initialize(...). It's not needed anymore
  • arena_lib.settings(...). It's been renamed to arena_lib.register_minigame(...)
  • (warnings appear in the log, to make the server owner aware)

Bugfixes
  • Bugfix: immunity item can't be dropped nor placed anymore
  • Crashfix: when checking for a player queue or arena ID, if the player wasn't inside any, the game crashed

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Arena_lib [2.7.0] [arena_lib]

by orwell » Post

Wow, this looks impressive so far. Reminds me of something I wanted to do once. Really looking forward to the hub manager!

Are there any servers using this already?
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [2.7.0] [arena_lib]

by Zughy » Post

orwell wrote:
Wed May 27, 2020 13:27
Wow, this looks impressive so far. Reminds me of something I wanted to do once. Really looking forward to the hub manager!

Are there any servers using this already?
Thank you :)
Actually yes, there is mine haha. There is Quake and Murder on it, and even if it's an Italian server, it's geolocalised already. Just look for "FOSSa delle Papere" (ducks pit, Italian wordplay with FOSS). Be sure to bring a friend as it's not advertised yet, so there is not a lot of people coming and going for now

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [3.0.0] [arena_lib]

by Zughy » Post

BOOM BABY, IT'S MAJOR RELEASE TIME: 3.0.0, aka TEAMS and GUI ARENA EDITOR

What's new
  • Teams are here: declare how many teams as you want! (team_properties included)
  • GUI Editor implemented: stop learning all those commands! (arena_lib from now on will support both the GUI editor and the command line)
  • Minigame property keep_inventory added
  • arena_lib.enable and arena_lib.disable now take the arena name as a parameter instead of the arena ID
  • set_sign can be used without the editor just looking at a sign
  • set_spawner now takes generic parameters for a more complete customisation (check the DOCS)
  • Spawners are now randomised when a match starts
  • Spawners get reset and the arena disabled when the teams amount is changed in order to avoid any collateral damage
  • Immunity: players are now immune to any sort of default damage
  • Hotbar HUD now follows screen size
  • Debug commands more clean and readable
  • When arena_lib is enabled, now it prints its version in console
  • Lighter storage and cleaner code
  • DOCS updated
Bugfixes
  • CRASHFIX: printing the arenas info without any sign declared made the game crash
  • Bugfix: arenas were storing some unnecessary parameters
  • Bugfix: arenas HUDs weren't disappearing if people were in queue and someone disabled the arena
  • Bugfix: is now impossible to create arenas with min_players = 0 or min_players > max_players

User avatar
Giov4
Member
Posts: 31
Joined: Mon Mar 30, 2020 12:09

Re: [Mod] Arena_lib [3.0.0] [arena_lib]

by Giov4 » Post

I just love the editor mode, it's so refreshing to have some cute items to use :))

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [3.0.0] [arena_lib]

by Zughy » Post

Giov4 wrote:
Mon Jun 08, 2020 17:30
I just love the editor mode, it's so refreshing to have some cute items to use :))
<3

Also, UPDATE - ARENA_LIB 3.1.0

What's new
  • Separated chats: players in a match can't see messages of players outside and vice versa
  • Minigame property disabled_damage_types added
  • Players automatically healed when entering and leaving a match
  • General /quit command implemented
  • General /kick player_name command implemented. It requires the arenalib_admin privilege
  • DOCS and example file updated

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [3.2.0] [arena_lib]

by Zughy » Post

UPDATE - ARENA_LIB 3.2.0

What's new
  • Arenas can now be renamed via arena_lib.rename_arena(...)
  • Min/max players can now be edited via arena_lib.change_players_amount(...) (also implemented in the editor)
  • Editor: spawners now visible as waypoints
  • Editor: icon to leave *and* enable an arena implemented + new section "Players"
  • Editor: inventory temporarily saved when entering the editor and retrieved when leaving it
  • Editor: players automatically teleported when entering the editor (there must be at least one spawner) and teleported back when leaving it
  • Editor: arenas automatically disabled when entering the editor
  • on_disconnect() callback implemented
  • arena_lib.teleport_in_arena(...) utility implemented
  • Now the craft inventory is emptied too
  • Formspecs automatically closed when entering an arena
  • Code cleaning
  • DOCS updated
Bugfixes
  • CRASHFIX: removing a player from an arena when teams were enabled, made the game crash
  • CRASHFIX: leaving a non-started queue with 2 or more players, made the game crash
  • Bugfix: team properties weren't working
  • Bugfix: overwritten/deleted spawners weren't updated in the storage

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [3.3.0] [arena_lib]

by Zughy » Post

UPDATE - ARENA_LIB 3.3.0

What's new
  • Play with your friends! Soft dependency Parties added
  • Teams can now be enabled per arena
  • in-game team and global chat implemented (respectively /t and /all)
  • Customise team and global chat's prefixes and colours (chat_all_prefix, chat_team_prefix, chat_all_color, chat_team_color)
  • Minigame property is_team_chat_default implemented
  • Arena property teams_enabled (bool) implemented
  • Editor: min/max players amount are now shown as stacks
  • Signs: when an arena is queueing, it now says 'queueing' instead of 'waiting'
  • DOCS updated
Bugfixes
  • CRASHFIX: quitting as the last player in the arena made the game crash
  • Bugfix: upper HUD didn't disappear when switching to another arena's queue

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [3.4.0] [arena_lib]

by Zughy » Post

UPDATE - ARENA_LIB 3.4.0

In short
Testing on our server, we noticed how rapidly distinguish players in a game such as Quake was a must, and arena_lib didn't allow us to do so. That's why in 3.4.0 there is a property to (optionally) colorise players' skins, so that enemies are instantly recognisable without using external soft dependencies like 3D Armor. This, tho, caused mods like SkinsDB to not work anymore, as they create a full armor on the player - and applying colour filters on skinsDB skins, well.. breaks them - but thanks to MT 5.3 and its ability to change textures at runtime this won't be a problem for long.
Also, even if 3.3.0 implemented the Parties mod, there were no checks to see whether a player could have been invited or not. So I added those checks :D

What's new
  • Minigame property `teams_color_overlay` implemented, for better distinguish players in enemy teams
  • Parties callbacks set: invites now work only when they should
  • Chat: when teams are enabled, allies in global chat now appear in white
  • Changing the minimum amount of players doesn't reset spawners anymore
  • Performances improved
  • DOCS updated
Bugfixes
  • Bugfix: teams were shown in the editor Spawners section even if teams were disabled
  • Bugfix: an error was shown when editing the amount of players while in the editor (even if the action was performed)

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [3.5.0] [arena_lib]

by Zughy » Post

UPDATE - ARENA_LIB 3.5.0

In short
3.5.0 is about back-end. Properties are way more manageable now, as they update themselves automatically. They can also be tweaked in the new editor section - "settings" - where arenas can also be renamed and deleted on the go. I've also spent time thinking about how the administration of an arena should work, or better said, how to avoid giving admins too much power without consequences: by default, when a player gets kicked by an admin and when an arena is manually ended through /forceend, involved players will be notified about who did it. This should prevent dictator-like admins to abuse of their powers - and if they do, there'll be proof.

What's new
  • Arenas can now forcibly terminated by admins via /forceend
  • Change arena properties through your mod via arena_lib.change_arena_property(...)
  • Properties are now automatically updated when changed in register_minigame
  • Arena properties can now be tweaked in-game, both via editor and via chat
  • Editor: new section - settings
  • Editor: arenas can now be renamed via settings > rename arena
  • Editor: arenas can now be deleted via settings > delete arena
  • Editor: right-click items now use on_secondary_use instead of on_place
  • Editor: better players and sign icons
  • Commands: parameters added in the /help window
  • on_quit now gets called automatically if on_kick/on_eliminate is not declared (when kicking/eliminating a player)
  • when eliminated/kicked, players can now be informed about who did it via the 'executioner' field in remove_player_from_arena(...). By default on /kick and /forceend
  • (add-on) Hub Manager: if present, it'll set its physical values when matches end and when people quit
  • DOCS updated
Deprecated
  • arena_lib.update_properties(mod). This is now automatic
Bugfixes
  • CRASHFIX: broadcasting a message via the builtin HUD made the game crash
  • CRASHFIX: toggling teams on/off and changing the players amount made the game crash if a sign wasn't declared
  • CRASHFIX: declaring an unknown mod in get_arena_by_name made the game crash
  • CRASHFIX: the debug utility wasn't converting tables in strings, making the game crash if a table was present

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [3.6.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 3.6.0

In short
Image

What's new
  • New signs: arena_lib now uses signs_lib's signs, to provide more customisation. 3.6.0 comes with a new appearance
  • Callbacks: added on_enable and on_disable to run custom checks when enabling/disabling an arena
  • Timers are now settable per arena
  • Editor: team toggler is now hidden if no team has been declared

Bugfixes
  • CRASHFIX: /forceend made arenas with timers crash
  • Bugfix: timers didn't work
  • Bugfix: on_disconnect wasn't called
Attachments
signs.png
signs.png (42.58 KiB) Viewed 2746 times

User avatar
Zughy
Member
Posts: 301
Joined: Thu Mar 26, 2020 18:23
GitHub: belongs_to_microsoft
In-game: Zughy
Location: Italy
Contact:

Re: [Mod] Arena_lib [4.0.0] [arena_lib]

by Zughy » Post

UPDATE - Arena_lib 4.0.0

In short
I've been aiming at having an even more flexible and generic API. About flexibility, now the editor can take an additional section per minigame. About being generic, the immunity system has been removed, as a lot of minigames don't need it. Also, timers structure was kind confusing, so I redid it from scratch: now it all fits in a single parameter, namely `time_mode`. You can find more about it in the docs . Lastly, the version bump allowed me to remove some deprecated code here and there

What's new
  • Editor can be extended with a custom section per minigame, via arena_lib.register_editor_section(modname, params)
  • Time system redo
  • Immunity removed: it shouldn't be up to arena_lib, as many minigames don't need it
  • Editor: settings section now features timers
  • Arena names now features signs_lib supported characters only
  • Prevent arena properties to have the same name of default ones
  • Not declaring on_timeout when a decreasing timer is used makes the server crash with a custom message
  • Deprecated functions now address the corresponding minigame
  • DOCS updated
Deprecated
  • arena property is_timer_incrementing: use time_mode = 1 instead
  • arena property timer: use time_mode = 2 instead
  • arena properties immunity_time and immunity_slot: arena_lib doesn't support immunity anymore
  • callback on_timer_tick: use on_time_tick instead
Bugfixes
  • CRASHFIX: hitting a sign while being in a party not as a party leader made the game crash
  • CRASHFIX: punching players while in queue made the server crash if the arena featured teams
  • Bugfix: player_properties tables weren't properly assigned

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 27 guests