Skip to content

Commit

Permalink
New objective assets
Browse files Browse the repository at this point in the history
  • Loading branch information
pidgy committed Aug 21, 2023
1 parent 644b7f4 commit 9821daa
Show file tree
Hide file tree
Showing 23 changed files with 38 additions and 20 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/profiles/player/switch/game/regice_ally.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/profiles/player/switch/game/regieleki_ally.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/profiles/player/switch/game/regieleki_enemy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/profiles/player/switch/game/regirock_ally.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/profiles/player/switch/game/regirock_enemy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/profiles/player/switch/game/registeel_ally.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/profiles/player/switch/game/registeel_enemy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ func loadProfileAssetsBroadcaster() {
"killed": {},
"secure": {
team.Game.Name: {
filter.New(team.Game, Current.ProfileAssets()+"/game/rayquaza_ally.png", state.RayquazaSecurePurple.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/rayquaza_enemy.png", state.RayquazaSecureOrange.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/regice_ally.png", state.RegiceSecurePurple.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/regice_enemy.png", state.RegiceSecureOrange.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/regirock_ally.png", state.RegirockSecurePurple.Int(), false),
Expand All @@ -368,8 +370,6 @@ func loadProfileAssetsBroadcaster() {
filter.New(team.Game, Current.ProfileAssets()+"/game/registeel_enemy.png", state.RegisteelSecureOrange.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/regieleki_ally.png", state.RegielekiSecurePurple.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/regieleki_enemy.png", state.RegielekiSecureOrange.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/rayquaza_ally.png", state.RayquazaSecurePurple.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/rayquaza_enemy.png", state.RayquazaSecureOrange.Int(), false),
},
},
"ko": {
Expand Down Expand Up @@ -424,6 +424,8 @@ func loadProfileAssetsPlayer() {
},
"secure": {
team.Game.Name: {
filter.New(team.Game, Current.ProfileAssets()+"/game/rayquaza_ally.png", state.RayquazaSecurePurple.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/rayquaza_enemy.png", state.RayquazaSecureOrange.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/regieleki_ally.png", state.RegielekiSecurePurple.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/regieleki_enemy.png", state.RegielekiSecureOrange.Int(), false),
filter.New(team.Game, Current.ProfileAssets()+"/game/regice_ally.png", state.RegiceSecurePurple.Int(), false),
Expand Down
23 changes: 18 additions & 5 deletions detect/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func Objectives() {
continue
}

done := false
early := false

if time.Since(top) > time.Minute {
switch e := state.EventType(e); e {
Expand All @@ -279,67 +279,80 @@ func Objectives() {
server.SetRegieleki(team.Orange)
top = time.Now()

done = true
early = true
case state.RegielekiSecurePurple:
state.Add(e, server.Clock(), 0)
notify.Feed(team.Purple.NRGBA, "[%s] [%s] Regieleki secured", server.Clock(), strings.Title(team.Purple.Name))
server.SetRegieleki(team.Purple)
top = time.Now()

done = true
early = true
}
}

if !done && time.Since(bottom) > time.Minute {
if !early && time.Since(bottom) > time.Minute {
switch e := state.EventType(e); e {
case state.RegiceSecureOrange:
state.Add(e, server.Clock(), 0)
notify.Feed(team.Orange.NRGBA, "[%s] [%s] Regice secured", server.Clock(), strings.Title(team.Orange.Name))
server.SetRegice(team.Orange)
bottom = time.Now()

early = true
case state.RegiceSecurePurple:
state.Add(e, server.Clock(), 0)
notify.Feed(team.Purple.NRGBA, "[%s] [%s] Regice secured", server.Clock(), strings.Title(team.Purple.Name))
server.SetRegice(team.Purple)
bottom = time.Now()

early = true
case state.RegirockSecureOrange:
state.Add(e, server.Clock(), 0)
notify.Feed(team.Orange.NRGBA, "[%s] [%s] Regirock secured", server.Clock(), strings.Title(team.Orange.Name))
server.SetRegirock(team.Orange)
bottom = time.Now()

early = true
case state.RegirockSecurePurple:
state.Add(e, server.Clock(), 0)
notify.Feed(team.Purple.NRGBA, "[%s] [%s] Regirock secured", server.Clock(), strings.Title(team.Purple.Name))
server.SetRegirock(team.Purple)
bottom = time.Now()

early = true
case state.RegisteelSecureOrange:
state.Add(e, server.Clock(), 0)
notify.Feed(team.Orange.NRGBA, "[%s] [%s] Registeel secured", server.Clock(), strings.Title(team.Orange.Name))
server.SetRegisteel(team.Orange)
bottom = time.Now()

early = true
case state.RegisteelSecurePurple:
state.Add(e, server.Clock(), 0)
notify.Feed(team.Purple.NRGBA, "[%s] [%s] Registeel secured", server.Clock(), strings.Title(team.Purple.Name))
server.SetRegisteel(team.Purple)
bottom = time.Now()

early = true
}
}

if !done && time.Since(middle) > time.Minute {
if !early && time.Since(middle) > time.Minute {
switch e := state.EventType(e); e {
case state.RayquazaSecureOrange:
state.Add(e, server.Clock(), 0)
notify.Feed(team.Orange.NRGBA, "[%s] [%s] Rayquaza secured", server.Clock(), strings.Title(team.Orange.Name))
server.SetRayquaza(team.Orange)
middle = time.Now()

early = true
case state.RayquazaSecurePurple:
state.Add(e, server.Clock(), 0)
notify.Feed(team.Purple.NRGBA, "[%s] [%s] Rayquaza secured", server.Clock(), strings.Title(team.Purple.Name))
server.SetRayquaza(team.Purple)
middle = time.Now()

early = true
}
}

Expand Down
4 changes: 4 additions & 0 deletions gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ func New() {
max int
ticks int
}{0, 60, 0},

cpu: "0%",
ram: "0MB",
uptime: "00:00",
}

Window.Bar = title.New(
Expand Down
19 changes: 8 additions & 11 deletions gui/loading.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type loading struct {
func (g *GUI) loading() {
l := &loading{
message: "Loading...",
tick: time.NewTicker(time.Second / 2).C,
tick: time.NewTicker(time.Millisecond * 250).C,
}

go l.while(g)
Expand All @@ -51,19 +51,18 @@ func (g *GUI) loading() {
dims := layout.Dimensions{}
inset := layout.Inset{}

messageLabel := material.Label(fonts.Calibri().Theme, unit.Sp(28), l.message)
messageLabel := material.Label(fonts.Calibri().Theme, unit.Sp(18.5), l.message)
messageLabel.Alignment = text.Middle
messageLabel.Color = nrgba.White.Color()
messageLabel.Font.Weight = 400
messageLabel.Font.Weight = 50

g.Window.Perform(system.ActionCenter)
g.Window.Perform(system.ActionRaise)

var ops op.Ops

for g.is == is.Loading {
e := <-g.Events()
switch e := e.(type) {
switch e := (<-g.Events()).(type) {
case app.ViewEvent:
g.HWND = e.HWND
case system.DestroyEvent:
Expand Down Expand Up @@ -99,7 +98,6 @@ func (g *GUI) loading() {
return messageLabel.Layout(gtx)
})
})

})

g.frame(gtx, e)
Expand All @@ -110,10 +108,9 @@ func (g *GUI) loading() {
}

func (l *loading) while(g *GUI) {
for iter := 0; g.is == is.Loading; {
select {
case <-l.tick:
l.message, iter = notify.Iter(iter)
}
i := 0

for ; g.is == is.Loading; <-l.tick {
l.message, i = notify.Iter(i)
}
}
4 changes: 3 additions & 1 deletion gui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ func (g *GUI) main() {
}

uptimeLabel := material.H5(g.normal, g.uptime)
uptimeLabel.Color = nrgba.Slate.Color()
uptimeLabel.Color = nrgba.DreamyPurple.Color()
uptimeLabel.Alignment = text.Middle
uptimeLabel.TextSize = unit.Sp(14)

Expand Down Expand Up @@ -727,6 +727,8 @@ func (g *GUI) main() {
}
}
{
uptimeLabel.Text = g.uptime

layout.Inset{
Top: unit.Dp(50),
Left: unit.Dp(float32(gtx.Constraints.Max.X - 90)),
Expand Down
2 changes: 1 addition & 1 deletion gui/projector.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (g *GUI) projector() {
theme: g.normal,
since: time.Now(),

listTextSize: float32(12),
listTextSize: float32(14),
}

session, err := audio.New(audio.Disabled, audio.Default)
Expand Down

0 comments on commit 9821daa

Please sign in to comment.