From 1aba2bdd23aebed4032333e74aa553c40a31fcbd Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sun, 14 Jun 2026 21:07:26 -0400 Subject: refactor: added docs, split up some components in game package --- internal/action/behavior.go | 4 ++-- internal/action/doc.go | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 internal/action/doc.go (limited to 'internal/action') diff --git a/internal/action/behavior.go b/internal/action/behavior.go index 7abe0ae..e0b8cdf 100644 --- a/internal/action/behavior.go +++ b/internal/action/behavior.go @@ -13,10 +13,10 @@ type GatherConfig struct { ExhaustedMessage string `yaml:"exhausted_message"` FailMsg string `yaml:"fail_message"` Drops []DropEntry `yaml:"drops"` - DepleteDelay int `yaml:"deplete_delay"` + RespawnTimer int `yaml:"respawn_timer"` RespawnMsg string `yaml:"respawn_message"` RespawnBroadcast string `yaml:"respawn_broadcast"` - SharedDeplete int `yaml:"shared_deplete"` + DepleteTimer int `yaml:"deplete_timer"` NestChance int `yaml:"nest_chance"` } diff --git a/internal/action/doc.go b/internal/action/doc.go new file mode 100644 index 0000000..c1a898d --- /dev/null +++ b/internal/action/doc.go @@ -0,0 +1,11 @@ +// Package action defines the behavior type system, action state tracking, +// and drop table resolution for the game world. +// +// Behaviors are YAML-driven and come in four types: gather, talk, use, and toggle. +// This package provides configuration structs for each type, the Action struct +// that tracks per-player action state (type, target, tick countdown), and the +// Store for loading behaviors and resolving weighted drop tables. +// +// The SuccessChance function implements the OSRS-style skill check formula. +// Drop table resolution supports nested sub-tables via the ResolveDrop method. +package action -- cgit v1.2.3