aboutsummaryrefslogtreecommitdiff
path: root/internal/game
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game')
-rw-r--r--internal/game/act.go2
-rw-r--r--internal/game/act_clean.go2
-rw-r--r--internal/game/act_combine.go4
-rw-r--r--internal/game/act_fletch.go12
-rw-r--r--internal/game/act_use.go4
-rw-r--r--internal/game/cmd_clean.go4
-rw-r--r--internal/game/cmd_craft.go2
-rw-r--r--internal/game/cmd_smelt.go2
-rw-r--r--internal/game/cmd_trigger_utility.go2
-rw-r--r--internal/game/cmd_use.go6
-rw-r--r--internal/game/core_production.go2
-rw-r--r--internal/game/production_engine.go16
12 files changed, 29 insertions, 29 deletions
diff --git a/internal/game/act.go b/internal/game/act.go
index c8101ab..6d4a208 100644
--- a/internal/game/act.go
+++ b/internal/game/act.go
@@ -263,7 +263,7 @@ func (g *Game) AdvanceActions() {
switch p.BackgroundAction.Type {
case "fletch":
g.advanceFletch(sess, p)
- case "clean":
+ case "cleaning":
g.advanceClean(sess, p)
}
if p.BackgroundAction == nil {
diff --git a/internal/game/act_clean.go b/internal/game/act_clean.go
index 7647f4f..f5f86d6 100644
--- a/internal/game/act_clean.go
+++ b/internal/game/act_clean.go
@@ -25,7 +25,7 @@ func (g *Game) advanceClean(sess *net.Session, p *player.Player) {
return
}
- items := g.CraftIndex.BySubtype("clean")
+ items := g.CraftIndex.BySubtype("cleaning")
var matchItem *item.ItemDef
for _, item := range items {
diff --git a/internal/game/act_combine.go b/internal/game/act_combine.go
index 8937d38..db7fee1 100644
--- a/internal/game/act_combine.go
+++ b/internal/game/act_combine.go
@@ -38,7 +38,7 @@ func (g *Game) startCombine(sess *net.Session, p *player.Player, item *item.Item
Remaining: count,
StartMessage: startMsg,
EndMessage: endMsg,
- Wait: craft.Wait,
+ TicksPerCycle: craft.TicksPerCycle,
},
WaitLeft: engine.ToTicks(1),
}
@@ -69,7 +69,7 @@ func (g *Game) advanceCombine(sess *net.Session, p *player.Player) {
if len(craft.Steps) > 0 {
p.Action.WaitLeft = engine.ToTicks(craft.Steps[0].Delay)
} else {
- firstWait := craft.Wait
+ firstWait := craft.TicksPerCycle
if firstWait <= 0 {
firstWait = 4
}
diff --git a/internal/game/act_fletch.go b/internal/game/act_fletch.go
index ce3a525..c4dcef0 100644
--- a/internal/game/act_fletch.go
+++ b/internal/game/act_fletch.go
@@ -15,7 +15,7 @@ func (g *Game) startFletchAction(sess *net.Session, p *player.Player, def *item.
g.setPlayerFlag(p, "last_fletch", def.ID)
g.AccountStore.SaveCharacter(p)
- if def.FirstCraft().Wait <= 0 {
+ if def.FirstCraft().TicksPerCycle <= 0 {
g.doInstantFletch(sess, p, def, count)
return
}
@@ -113,10 +113,10 @@ func (g *Game) startTimedFletch(sess *net.Session, p *player.Player, def *item.I
TargetID: def.ID,
TargetName: def.Name,
Data: &behavior.FletchData{
- ItemID: def.ID,
- Phase: 0,
- Wait: craft.Wait,
- Remaining: count,
+ ItemID: def.ID,
+ Phase: 0,
+ TicksPerCycle: craft.TicksPerCycle,
+ Remaining: count,
},
WaitLeft: engine.ToTicks(1),
}
@@ -130,7 +130,7 @@ func (g *Game) advanceFletch(sess *net.Session, p *player.Player) {
}
itemID := data.ItemID
phase := data.Phase
- wait := data.Wait
+ wait := data.TicksPerCycle
remaining := data.Remaining
def := g.loadCraftItem(itemID)
diff --git a/internal/game/act_use.go b/internal/game/act_use.go
index 1e9d8e9..46ca304 100644
--- a/internal/game/act_use.go
+++ b/internal/game/act_use.go
@@ -84,7 +84,7 @@ func (g *Game) advanceUse(sess *net.Session, p *player.Player) {
if cfg.FailMessage != "" {
sess.WriteLine(cfg.FailMessage)
}
- p.Action.WaitLeft = engine.ToTicks(cfg.Wait)
+ p.Action.WaitLeft = engine.ToTicks(cfg.TicksPerCycle)
return
}
}
@@ -137,5 +137,5 @@ func (g *Game) advanceUse(sess *net.Session, p *player.Player) {
sess.WriteLine(cfg.EndMessage)
}
- p.Action.WaitLeft = engine.ToTicks(cfg.Wait)
+ p.Action.WaitLeft = engine.ToTicks(cfg.TicksPerCycle)
}
diff --git a/internal/game/cmd_clean.go b/internal/game/cmd_clean.go
index f77ff57..9fc37b7 100644
--- a/internal/game/cmd_clean.go
+++ b/internal/game/cmd_clean.go
@@ -22,7 +22,7 @@ func (g *Game) doClean(sess *net.Session, input string) {
return
}
- items := g.CraftIndex.BySubtype("clean")
+ items := g.CraftIndex.BySubtype("cleaning")
filter := strings.TrimSpace(input)
@@ -63,7 +63,7 @@ func (g *Game) doClean(sess *net.Session, input string) {
g.cancelBgAction(p)
p.BackgroundAction = &behavior.Action{
- Type: "clean",
+ Type: "cleaning",
TargetID: "clean_herbs",
Data: &behavior.CleanData{
Phase: 0,
diff --git a/internal/game/cmd_craft.go b/internal/game/cmd_craft.go
index 3d23f85..37038c0 100644
--- a/internal/game/cmd_craft.go
+++ b/internal/game/cmd_craft.go
@@ -171,7 +171,7 @@ func (g *Game) startItem(sess *net.Session, p *player.Player, def *item.ItemDef,
}
func (g *Game) hasGrimyHerbs(p *player.Player) bool {
- items := g.CraftIndex.BySubtype("clean")
+ items := g.CraftIndex.BySubtype("cleaning")
for _, def := range items {
if def.FindCraft(func(c item.CraftDef) bool {
return craftHasAllItems(&c, p.HasItem)
diff --git a/internal/game/cmd_smelt.go b/internal/game/cmd_smelt.go
index b551e76..4500c64 100644
--- a/internal/game/cmd_smelt.go
+++ b/internal/game/cmd_smelt.go
@@ -23,7 +23,7 @@ func (g *Game) doSmelt(sess *net.Session, input string) {
return
}
- items := g.CraftIndex.BySubtype("smelt")
+ items := g.CraftIndex.BySubtype("smelting")
if input == "" {
g.showSmeltMenu(sess, p, items, stationDefID, stationName)
diff --git a/internal/game/cmd_trigger_utility.go b/internal/game/cmd_trigger_utility.go
index 1697417..5a4dcc7 100644
--- a/internal/game/cmd_trigger_utility.go
+++ b/internal/game/cmd_trigger_utility.go
@@ -170,7 +170,7 @@ func (g *Game) triggerSuperheat(sess *net.Session, p *player.Player, mod *ModDef
}
var match *item.ItemDef
- for _, item := range g.CraftIndex.BySubtype("smelt") {
+ for _, item := range g.CraftIndex.BySubtype("smelting") {
if craftMatchesEntry(item.FirstCraft(), inv.ItemID) {
match = item
break
diff --git a/internal/game/cmd_use.go b/internal/game/cmd_use.go
index 1989a3e..72de3d6 100644
--- a/internal/game/cmd_use.go
+++ b/internal/game/cmd_use.go
@@ -225,11 +225,11 @@ func (g *Game) doUseItemOnTarget(sess *net.Session, p *player.Player, itemAName,
if len(recipes[0].Craft) > 0 {
firstSubtype = recipes[0].FirstCraft().Subtype
}
- if firstSubtype == "smelt" {
+ if firstSubtype == "smelting" {
var filtered []*item.ItemDef
for _, item := range recipes {
c := item.FirstCraft()
- if c.Subtype != "smelt" {
+ if c.Subtype != "smelting" {
continue
}
if !craftHasAllItemsQty(c, p.CountItem) {
@@ -417,7 +417,7 @@ func (g *Game) doUseItemOnTarget(sess *net.Session, p *player.Player, itemAName,
}
func (g *Game) isGrimyHerb(itemID string) bool {
- items := g.CraftIndex.BySubtype("clean")
+ items := g.CraftIndex.BySubtype("cleaning")
for _, item := range items {
for _, e := range item.FirstCraft().Ingredients {
for _, id := range e.Items {
diff --git a/internal/game/core_production.go b/internal/game/core_production.go
index e6a62d4..e88f512 100644
--- a/internal/game/core_production.go
+++ b/internal/game/core_production.go
@@ -58,7 +58,7 @@ var productionTypes = map[string]productionTypeInfo{
EndMessage: "You've finished cooking.",
FailMessage: "You accidentally burn the %i1.",
},
- "smelt": {
+ "smelting": {
ActionType: behavior.TypeSmelt,
DisplayVerb: "smelting",
StartMessage: "You place the %i1 into the furnace.",
diff --git a/internal/game/production_engine.go b/internal/game/production_engine.go
index 1d54714..2fb7968 100644
--- a/internal/game/production_engine.go
+++ b/internal/game/production_engine.go
@@ -95,7 +95,7 @@ func (g *Game) startProduction(sess *net.Session, p *player.Player, item *item.I
outDef, _ := g.ItemStore.Load(item.ID)
- wait := craft.Wait
+ wait := craft.TicksPerCycle
if wait <= 0 {
wait = 4
}
@@ -110,12 +110,12 @@ func (g *Game) startProduction(sess *net.Session, p *player.Player, item *item.I
TargetID: item.ID,
TargetName: outputName,
Data: &behavior.ProductionData{
- ItemID: item.ID,
- Phase: 0,
- Wait: wait,
- StartMessage: startMsg,
- EndMessage: endMsg,
- Remaining: count,
+ ItemID: item.ID,
+ Phase: 0,
+ TicksPerCycle: wait,
+ StartMessage: startMsg,
+ EndMessage: endMsg,
+ Remaining: count,
},
WaitLeft: engine.ToTicks(1),
}
@@ -181,7 +181,7 @@ func (g *Game) advanceProduction(sess *net.Session, p *player.Player) bool {
}
itemID := d.ItemID
phase := d.Phase
- wait := d.Wait
+ wait := d.TicksPerCycle
startMsg := d.StartMessage
endMsg := d.EndMessage
remaining := d.Remaining