diff --git a/widgets/yearMood.go b/widgets/yearMood.go index ed69bb0..c18033d 100644 --- a/widgets/yearMood.go +++ b/widgets/yearMood.go @@ -296,8 +296,10 @@ func (widget *MoodText) Keyboard(k *terminalapi.Keyboard, _ *widgetapi.EventMeta widget.WriteMood(2) case '3': widget.WriteMood(3) + ChangeMood("happy") default: widget.WriteMood(-1) + ChangeMood("cry") } return widget.drawTable() } diff --git a/widgets/zukitchi.go b/widgets/zukitchi.go index f61f0e5..2f85b26 100644 --- a/widgets/zukitchi.go +++ b/widgets/zukitchi.go @@ -46,3 +46,18 @@ func draw(widget *text.Text) error { lastFrame = time.Now() return nil } + +func ChangeMood(mood string) { + pet.ChangeMood(mood) + go func() { + ticker := time.NewTicker(10 * time.Second) + for { + select { + case <-ticker.C: + pet.ChangeMood("idle") + ticker.Stop() + } + } + }() + +} diff --git a/widgets/zukitchi/assets.go b/widgets/zukitchi/assets.go index 9a51d25..acd7efb 100644 --- a/widgets/zukitchi/assets.go +++ b/widgets/zukitchi/assets.go @@ -6,6 +6,9 @@ import ( ) var idleFrames = []string{idle0, idle1, idle2, idle1} +var happyFrames = []string{happy9, happy1, happy2, happy1} +var poopFrames = []string{poop0, poop1} +var cryFrames = []string{cry0, cry1} var sleepFrames = []string{sleep0, sleep1} type Zukitchi struct { @@ -42,6 +45,15 @@ func (a *Zukitchi) ChangeMood(mood string) { case "idle": a.animation = idleFrames break + case "happy": + a.animation = happyFrames + break + case "poop": + a.animation = poopFrames + break + case "cry": + a.animation = cryFrames + break case "sleep": default: a.animation = sleepFrames @@ -136,6 +148,142 @@ const idle2 = ` ` +const happy9 = ` + ▄▄▄▄ + ███████▄ + █████████ ▄▄▄████▄ + ▀▀▀██████▄▄▄▄▄▄▄▄ ▄█████████ + ▀███████████████████████▀ + ██████████████████▀▀ + ███▀▄▄▄▀████▀▄▄▄▀███ + ███ ███ ████ ███ ███ + ████████████████████ + █ █ █ █ █ █ + █ █▀▀▀▀▀▀▀▀▀▀▀▀█ █ + █ ▀▄▄ ▄▄▀ █ + ▄ ▀▄▄ ▀▀▀▀▀▀▀▀ ▄▄▀ ▄ + ▀▀▀▀ ▀▀▀█▀▀▀█▀▀ ▀▀▀ + ▄▀ ▀▄ + ▀▀ ▀▀ + +` +const happy1 = ` + + ▄████▄▄ + ████████▄ ▄▄▄▄ + ▀████████▄ ▄████████ + ▀█████████████▄▄██████████ + ▄███████████████████▀▀▀▀ + ▄███▀▀▀██████▀▀▀███▄ + ███ ███ ████ ███ ███ + ███▄███▄████▄███▄███ + ▀█▀█▀▀▀█▀▀▀▀█▀▀▀█▀█▀ + █ █▄▄▄█▄▄▄▄█▄▄▄█ █ + █ ▀▄▄ ▄▄▀ █ + ▀▄▄ ▀▀▀▀▀▀▀▀ ▄▄▀ + ▄▀ ▀▀▀█▀▀▀█▀▀ ▀▄ + ▀▀ █ ▀▄ ▀▀ + ▀ ▀ + +` +const happy2 = ` + + ▄▄▄▄ + ███████▄ + █████████ ▄▄▄████▄ + ▀▀▀██████▄▄▄▄▄▄▄▄ ▄█████████ + ▀███████████████████████▀ + ██████████████████▀▀ + ███▀▄▄▄▀████▀▄▄▄▀███ + ███ ███ ████ ███ ███ + ████████████████████ + █ █▄▄▄█▄▄▄▄█▄▄▄█ █ + ▀▄ ▀▀▄▄▄▄▄▄▄▄▀▀ ▄▀ + █▀▄▄▄▄▄▄▄▄▄▄▀█ + █ █ █ █ + █ █ █ █ + + +` + +const poop0 = ` + ▄▄ ▄▄▄ + ▄████ ▄██████ + ▄████▀ ▄███████ + ███▀ ▄████▀▀▀ ▄▀▀▄ + ▄███▄▄▄███▀ █ █ + ▄█████████████▄▄ █ █ + ██████████████████ █ █ + █████▀█▀▀▀██████████ ▄▀ █ + █████▄█▄▄▄██████████ █ ▄▀ + ████████████████████▄▀ █ + ▀█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▀█ █ + ▀▄ ▄▀ █ ▄▀ + ▄▄▄▀▀▀█▀▀██▀▀▀█▀▀██▀▀▀▀▀▀█▀ + █▀█▀▀▀▀▀▀▀█▀▀▀█▀▀▀█▀ + █▄▄▄▄▄ █ █ ▄▀ + ▀█ █ + ▀▀▀▀▀▀▀▀▀▀▀ +` +const poop1 = ` + ▄▄▄▄ + ▄██████ ▄▄▄▄ + ▄▄▄▄▄ ████▀▀▄████████ + ████████████▄███████████ + ████▀▀█▀█████████▀▀▀▀█▀ █ + ███████▄▄ ▀████████ █ █ + ▄█▄▀▀▀███████████████ █ █ + █ █▀▀▄ ▀▀▀█████████▄▀ █ + ▀▀▀█▄▄▄█ ▀▀▀█████ ▄▀ + █ ██▄▀ █ + █▀█▀▀█▀ █ █ █ + █▀▀▀▀ ▄▀ █ ▄▀ + ▄▄▄▀▀▀█▀▀██▀▀▀█▀▀██▀▀▀▀▀▀█▀ + █▀█▀▀▀▀▀▀▀█▀▀▀█▀▀▀█▀ + █▄▄▄▄▄ █ █ ▄▀ + ▀█ █ + ▀▀▀▀▀▀▀▀▀▀▀ +` + +const cry0 = ` + + + + ▄████▄▄▄ ▄▄▄████▄ + █████████▄ ▄▄▄▄▄▄▄▄ ▄█████████ + ▀██████████████████████████████▀ + ▀▀██████████████████▀▀ + ██▀▄▄▄▄ ▀██▀▄▄▄▄ ▀██ + ██ █ ██ ██ █ ██ ██ + ██ ▀██▄█ ██ ▀██▄█ ██ + ███▄ ▄▄████▄▄ ▄███ + █ █ █ █ █ █ + ▄ ▄██ █ █ █▀▄ ▄ + ▀▀▀███ █▀██████ █ ▀▀▀ + █ ▀ █▄██████ ██▀▄ + ▄▀▀▀ ▀▀▀▀▀▀ ▀▀█ + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ +` +const cry1 = ` + + + + ▄█████▄▄ ▄▄█████▄ + ██████████▄▄████████▄▄██████████ + █████▀████████████████████▀█████ + ▀▀▀ ▄██▀▀▀▀▀████▀▀▀▀▀██▄ ▀▀▀ + ██ ▄█▀▀█ ██ ▄█▀▀█ ██ + ██ █▀▄▄█ ██ █▀▄▄█ ██ + ██▄▀▀▀▀ ▄██▄▀▀▀▀ ▄██ + ▀█▀█ █▀▀▀▀▀▀█ █▀█▀ + ▀▄█ █ █ █▄▀ + ▀▄▄▄▀ █ █▄▄▄▄▄▄█ █ ▀▄▄▄▀ + █ ███ ███ █ + ▄▀▀█ █▀ ▀█ █▄ + ▀▄▄ █ ▀▄ █ + ▀▀▀▀▀ ▀▀▀▀ +` + const sleep0 = ` ▄▄▄ ▄▄▄ █ █ █ █ @@ -253,63 +401,7 @@ const image8 = ` ▀ ▀▄ ▀ ` -const image9 = ` - ▄▄▄▄ - ███████▄ - █████████ ▄▄▄████▄ - ▀▀▀██████▄▄▄▄▄▄▄▄ ▄█████████ - ▀███████████████████████▀ - ██████████████████▀▀ - ███▀▄▄▄▀████▀▄▄▄▀███ - ███ ███ ████ ███ ███ - ████████████████████ - █ █ █ █ █ █ - █ █▀▀▀▀▀▀▀▀▀▀▀▀█ █ - █ ▀▄▄ ▄▄▀ █ - ▄ ▀▄▄ ▀▀▀▀▀▀▀▀ ▄▄▀ ▄ - ▀▀▀▀ ▀▀▀█▀▀▀█▀▀ ▀▀▀ - ▄▀ ▀▄ - ▀▀ ▀▀ - -` -const image10 = ` - - ▄████▄▄ - ████████▄ ▄▄▄▄ - ▀████████▄ ▄████████ - ▀█████████████▄▄██████████ - ▄███████████████████▀▀▀▀ - ▄███▀▀▀██████▀▀▀███▄ - ███ ███ ████ ███ ███ - ███▄███▄████▄███▄███ - ▀█▀█▀▀▀█▀▀▀▀█▀▀▀█▀█▀ - █ █▄▄▄█▄▄▄▄█▄▄▄█ █ - █ ▀▄▄ ▄▄▀ █ - ▀▄▄ ▀▀▀▀▀▀▀▀ ▄▄▀ - ▄▀ ▀▀▀█▀▀▀█▀▀ ▀▄ - ▀▀ █ ▀▄ ▀▀ - ▀ ▀ - -` -const image11 = ` - - ▄▄▄▄ - ███████▄ - █████████ ▄▄▄████▄ - ▀▀▀██████▄▄▄▄▄▄▄▄ ▄█████████ - ▀███████████████████████▀ - ██████████████████▀▀ - ███▀▄▄▄▀████▀▄▄▄▀███ - ███ ███ ████ ███ ███ - ████████████████████ - █ █▄▄▄█▄▄▄▄█▄▄▄█ █ - ▀▄ ▀▀▄▄▄▄▄▄▄▄▀▀ ▄▀ - █▀▄▄▄▄▄▄▄▄▄▄▀█ - █ █ █ █ - █ █ █ █ - - -` + const image12 = ` ▄▄ ▄▄▄ ▄████ ▄██████ @@ -386,44 +478,6 @@ const image15 = ` ▀▄ ▀▀ ` -const image16 = ` - ▄▄ ▄▄▄ - ▄████ ▄██████ - ▄████▀ ▄███████ - ███▀ ▄████▀▀▀ ▄▀▀▄ - ▄███▄▄▄███▀ █ █ - ▄█████████████▄▄ █ █ - ██████████████████ █ █ - █████▀█▀▀▀██████████ ▄▀ █ - █████▄█▄▄▄██████████ █ ▄▀ - ████████████████████▄▀ █ - ▀█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▀█ █ - ▀▄ ▄▀ █ ▄▀ - ▄▄▄▀▀▀█▀▀██▀▀▀█▀▀██▀▀▀▀▀▀█▀ - █▀█▀▀▀▀▀▀▀█▀▀▀█▀▀▀█▀ - █▄▄▄▄▄ █ █ ▄▀ - ▀█ █ - ▀▀▀▀▀▀▀▀▀▀▀ -` -const image17 = ` - ▄▄▄▄ - ▄██████ ▄▄▄▄ - ▄▄▄▄▄ ████▀▀▄████████ - ████████████▄███████████ - ████▀▀█▀█████████▀▀▀▀█▀ █ - ███████▄▄ ▀████████ █ █ - ▄█▄▀▀▀███████████████ █ █ - █ █▀▀▄ ▀▀▀█████████▄▀ █ - ▀▀▀█▄▄▄█ ▀▀▀█████ ▄▀ - █ ██▄▀ █ - █▀█▀▀█▀ █ █ █ - █▀▀▀▀ ▄▀ █ ▄▀ - ▄▄▄▀▀▀█▀▀██▀▀▀█▀▀██▀▀▀▀▀▀█▀ - █▀█▀▀▀▀▀▀▀█▀▀▀█▀▀▀█▀ - █▄▄▄▄▄ █ █ ▄▀ - ▀█ █ - ▀▀▀▀▀▀▀▀▀▀▀ -` const image27 = ` @@ -958,44 +1012,7 @@ const image56 = ` █▄▄█ ▀▀▀▀▄█▄▄▄▄▄██▀▀▀▀▀▄▄▀▀▀ ▀▀ ▀▀ ` -const image57 = ` - - - - ▄████▄▄▄ ▄▄▄████▄ - █████████▄ ▄▄▄▄▄▄▄▄ ▄█████████ - ▀██████████████████████████████▀ - ▀▀██████████████████▀▀ - ██▀▄▄▄▄ ▀██▀▄▄▄▄ ▀██ - ██ █ ██ ██ █ ██ ██ - ██ ▀██▄█ ██ ▀██▄█ ██ - ███▄ ▄▄████▄▄ ▄███ - █ █ █ █ █ █ - ▄ ▄██ █ █ █▀▄ ▄ - ▀▀▀███ █▀██████ █ ▀▀▀ - █ ▀ █▄██████ ██▀▄ - ▄▀▀▀ ▀▀▀▀▀▀ ▀▀█ - ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ -` -const image58 = ` - - - - ▄█████▄▄ ▄▄█████▄ - ██████████▄▄████████▄▄██████████ - █████▀████████████████████▀█████ - ▀▀▀ ▄██▀▀▀▀▀████▀▀▀▀▀██▄ ▀▀▀ - ██ ▄█▀▀█ ██ ▄█▀▀█ ██ - ██ █▀▄▄█ ██ █▀▄▄█ ██ - ██▄▀▀▀▀ ▄██▄▀▀▀▀ ▄██ - ▀█▀█ █▀▀▀▀▀▀█ █▀█▀ - ▀▄█ █ █ █▄▀ - ▀▄▄▄▀ █ █▄▄▄▄▄▄█ █ ▀▄▄▄▀ - █ ███ ███ █ - ▄▀▀█ █▀ ▀█ █▄ - ▀▄▄ █ ▀▄ █ - ▀▀▀▀▀ ▀▀▀▀ -` + const image59 = ` ▄███▄ @@ -1053,18 +1070,7 @@ const image61 = ` ▀▄ ▀▀ ▀ ▀ ` -const image62 = ` - -` -const image63 = ` - -` -const image64 = ` - -` -const image65 = ` - -` + const image66 = ` ▄▄▄▄ ▄▄▄▄ ████████▄ ▄████████