feat: add faction war and moderation

This commit is contained in:
goose
2026-10-03 21:20:29 -04:00
parent 4bb818e5e0
commit 5ee033a3ab
28 changed files with 668 additions and 1 deletions
@@ -111,6 +111,11 @@ func apply_effect(effect: Dictionary, context: Dictionary) -> Dictionary:
&"add_rep":
var faction := StringName(effect.get("faction", ""))
player.reputation[faction] = player.reputation.get(faction, 0) + int(effect.get("amount", 0))
&"moderation_violation":
var moderation_fn: Callable = context.get("moderation_fn", Callable())
if not moderation_fn.is_valid():
return {"applied": false, "type": kind, "reason": &"missing_moderation_context"}
return moderation_fn.call(StringName(effect.get("reason", "propos_interdits")))
&"join_party":
var party: PartyState = context.get("party")
var recruit: ActorState = context.get("recruit")