M2.6: server rules (PvP, raiding, locks and friends, death penalty, difficulty, wolf grace), chat, admin commands, server console

This commit is contained in:
Paul Bailey
2026-11-04 22:54:40 +00:00
parent 47fc116839
commit 2ab79b68c6
26 changed files with 1195 additions and 57 deletions

View File

@@ -198,6 +198,11 @@ func piece_state(p: Node3D) -> void:
_all("_s2c_piece_state", [int(p.get_meta("nid", 0)), p.save_extra()])
func _on_piece_added(p: Node3D) -> void:
# Whoever's request placed it owns it (graves: whoever died).
var by: Node = PlayerNet.proxies.get(PlayerNet._acting)
if by != null and not p.has_meta("owner"):
p.set_meta("owner", String(by.player_id))
p.set_meta("owner_name", String(by.display))
_register(p)
_all("_s2c_piece_added", [world.piece_entry(p)])