Skip to content

Commit

Permalink
Extend UMS AI team detection to more maps
Browse files Browse the repository at this point in the history
  • Loading branch information
icza committed Oct 11, 2024
1 parent 18783c7 commit 9103d58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/screp/screp.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

const (
appName = "screp"
appVersion = "v1.12.1"
appVersion = "v1.12.2"
appAuthor = "Andras Belicza"
appHome = "https://github.com/icza/screp"
)
Expand Down
9 changes: 4 additions & 5 deletions rep/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,13 @@ func (r *Replay) Compute() {
if r.MapData != nil {
mapName = r.MapData.Name
}
// counter-example: " \aai \x04hunters \x02remastered \x062.0"
// counter-examples: " \aai \x04hunters \x02remastered \x062.0", "\x03(XB2)\x06 Big Game Hunters"
mapName = strings.ToLower(stringsx.Clean(mapName))
// "[ai]" maps are special, we can do better than in general:
switch {

case mapName == " hunters kespa soulclan ai" || mapName == ":da hunters ai":
fallthrough
case strings.Contains(mapName, "[ai]") || strings.Contains(mapName, "ai hunters") || strings.Contains(mapName, "bgh random teams"):
case mapName == " hunters kespa soulclan ai" || mapName == ":da hunters ai" ||
mapName == "(xb2) big game hunters" || strings.HasPrefix(mapName, "王牌猎人") ||
strings.Contains(mapName, "[ai]") || strings.Contains(mapName, "ai hunters") || strings.Contains(mapName, "bgh random teams"):
r.detectObservers(pidBuilds, obsProfileUMSAI)
r.computeUMSTeamsAI()

Expand Down
2 changes: 1 addition & 1 deletion repparser/repparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import (

const (
// Version is a Semver2 compatible version of the parser.
Version = "v1.12.1"
Version = "v1.12.2"
)

var (
Expand Down

0 comments on commit 9103d58

Please sign in to comment.