M2.6: server rules (PvP, raiding, locks and friends, death penalty, difficulty, wolf grace), chat, admin commands, server console
This commit is contained in:
@@ -39,6 +39,7 @@ var _rest_build := 0.0
|
||||
var buffs: Dictionary = {}
|
||||
var _hurt_cd := 0.0 ## no natural healing for a few seconds after a hit
|
||||
var cause := "" ## what last hurt you, as the death screen says it ("You froze")
|
||||
var drain_mult := 1.0 ## hunger and diet drain (a server's difficulty, rules.gd)
|
||||
|
||||
signal hurt(amount: float, from: Vector3)
|
||||
const HURT_NO_REGEN := 6.0
|
||||
@@ -111,7 +112,7 @@ func step(dt: float) -> void:
|
||||
# Warm up faster than you cool down: getting to a fire should feel good.
|
||||
warmth = move_toward(warmth, target, (7.0 if target > warmth else 1.6) * dt)
|
||||
|
||||
hunger = maxf(hunger - HUNGER_DRAIN * dt * (1.5 if warmth < 30.0 else 1.0), 0.0)
|
||||
hunger = maxf(hunger - HUNGER_DRAIN * drain_mult * dt * (1.5 if warmth < 30.0 else 1.0), 0.0)
|
||||
|
||||
if _stamina_wait > 0.0:
|
||||
_stamina_wait -= dt
|
||||
@@ -121,7 +122,7 @@ func step(dt: float) -> void:
|
||||
* (0.7 if malnourished else 1.0) * dt, MAX)
|
||||
|
||||
for g in DIET_GROUPS:
|
||||
diet[g] = maxf(float(diet[g]) - DIET_DRAIN * dt, 0.0)
|
||||
diet[g] = maxf(float(diet[g]) - DIET_DRAIN * drain_mult * dt, 0.0)
|
||||
var lacking := diet_lacking()
|
||||
|
||||
for id in buffs.keys():
|
||||
|
||||
Reference in New Issue
Block a user