Add durable recipe discovery and profession crafting

This commit is contained in:
dingo
2026-09-09 13:28:07 -04:00
parent 940a345613
commit b65f3e8562
42 changed files with 2183 additions and 136 deletions
+1 -1
View File
@@ -260,7 +260,7 @@ func (w *World) consumeGathering(c *Character, id string) error {
if len(c.View.GatheringEffects) >= 64 && !slices.ContainsFunc(c.View.GatheringEffects, func(e p.TimedGatheringEffect) bool { return e.Source == id }) {
return errors.New("too many active gathering effects")
}
c.View.Inventory[id]--
TakeStack(c, id, 1)
w.applyGatheringEffect(c, p.TimedGatheringEffect{Source: id, Name: v.Name, ExpiresAt: float64(w.now.UnixMilli())/1000 + v.Seconds, Modifiers: protocolModifiers(v.Modifiers)})
w.RefreshStats(c)
c.Message = "Used " + v.Name