From f7d50a80782376d2e1c068e4d0a7ce9632f28bda Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 23 Aug 2017 22:32:10 +0200 Subject: Respect object property hp_max field for players (#6287) * Respect object property hp_max field for players This allows modders to configure the maximal HP per player * Statbars: Downscale bar to full 20 HP when exceeding this value Add default max HP for players and breath constants to builtin Document the constants * Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT --- builtin/game/constants.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'builtin/game/constants.lua') diff --git a/builtin/game/constants.lua b/builtin/game/constants.lua index 50c515b24..29eeb8330 100644 --- a/builtin/game/constants.lua +++ b/builtin/game/constants.lua @@ -21,6 +21,10 @@ core.EMERGE_GENERATED = 4 -- constants.h -- Size of mapblocks in nodes core.MAP_BLOCKSIZE = 16 +-- Default maximal HP of a player +core.PLAYER_MAX_HP_DEFAULT = 20 +-- Maximal breath of a player +core.PLAYER_MAX_BREATH = 11 -- light.h -- Maximum value for node 'light_source' parameter -- cgit v1.2.3