aboutsummaryrefslogtreecommitdiff
path: root/internal/game/action_gather.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-14 21:07:26 -0400
committerhistoria <[not public]>2026-06-14 21:07:26 -0400
commit1aba2bdd23aebed4032333e74aa553c40a31fcbd (patch)
treec004f4c2a139df5c3cf4029b2611bdfa09b40f86 /internal/game/action_gather.go
parenta19e6b6ab01670a5932308c7bd0e0e5eed8cbcad (diff)
downloadthehouseoficarus-1aba2bdd23aebed4032333e74aa553c40a31fcbd.tar.gz
refactor: added docs, split up some components in game package
Diffstat (limited to 'internal/game/action_gather.go')
-rw-r--r--internal/game/action_gather.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/game/action_gather.go b/internal/game/action_gather.go
index 7e53e87..201a619 100644
--- a/internal/game/action_gather.go
+++ b/internal/game/action_gather.go
@@ -32,7 +32,7 @@ func (g *Game) startGather(sess *net.Session, p *player.Player, obj *object.Obje
msg += fmt.Sprintf(" (%d ticks to respawn)", st.DepleteTimer)
}
sess.WriteLine(msg)
- } else if cfg.SharedDeplete > 0 {
+ } else if cfg.DepleteTimer > 0 {
sess.WriteLine(fmt.Sprintf("The %s has been cut down for %d more ticks.", obj.Name, st.DepleteTimer))
} else {
sess.WriteLine(fmt.Sprintf("The %s is depleted for %d more ticks.", obj.Name, st.DepleteTimer))
@@ -114,8 +114,8 @@ func (g *Game) startGather(sess *net.Session, p *player.Player, obj *object.Obje
"effective_wait": wait,
"step": 0,
}
- if cfg.SharedDeplete > 0 {
- data["shared_deplete"] = true
+ if cfg.DepleteTimer > 0 {
+ data["deplete_timer"] = true
}
p.Action = &action.Action{
Type: "gather",
@@ -137,7 +137,7 @@ func (g *Game) advanceGather(sess *net.Session, p *player.Player) {
step := p.Action.Data["step"].(int)
wait := p.Action.Data["effective_wait"].(int)
instanceKey := p.Action.Data["instance_key"].(string)
- _, shared := p.Action.Data["shared_deplete"]
+ _, shared := p.Action.Data["deplete_timer"]
if step == 0 {
if cfg.Bait != "" {
@@ -240,7 +240,7 @@ func (g *Game) advanceGather(sess *net.Session, p *player.Player) {
}
if !shared && drop.Depletes {
- delay := cfg.DepleteDelay
+ delay := cfg.RespawnTimer
if delay <= 0 {
delay = 10
}
@@ -305,7 +305,7 @@ func filterDropsByLevel(drops []action.DropEntry, level int) []action.DropEntry
func (g *Game) depleteSharedTree(sess *net.Session, p *player.Player, st *world.ObjState, cfg *action.GatherConfig, instanceKey string) {
st.Depleted = true
- st.DepleteTimer = cfg.DepleteDelay
+ st.DepleteTimer = cfg.RespawnTimer
st.SharedTimer = 0
msg := cfg.ExhaustedMessage