From ee687498fc02f12f017ec9387d4b9f6537e1b2de Mon Sep 17 00:00:00 2001 From: Josh Deprez Date: Wed, 25 Aug 2021 16:50:50 +1000 Subject: [PATCH] reload --- game/assets/level1.gobz | Bin 1213 -> 1218 bytes main.go | 9 +++++++++ 2 files changed, 9 insertions(+) diff --git a/game/assets/level1.gobz b/game/assets/level1.gobz index edcf84a98b4450918cd1cd0cfa2e3100956c3798..9f680a6a488dc6409a15e9e665a440a12905af1e 100644 GIT binary patch literal 1218 zcmV;z1U>s7iwFP!00000|EyTuZW~1uKHu!d-nedREGx3o(3n!?q5=nQ5mH)G3YCZ& z)s>(`RhZfnXX$#^+TFIH2nh-lD5aEApp*jT=NS-Jh%4@SgT4Vgfe)HZ9Gp@MA2m1D zjOW{LzVkC@XU{2q#{tF~O%odMB|;AB*bx*7x#yyDVJiW@M<^^roo*DGFipT861*dR zqR#}T1x3ic=(k!X%!aQXk6R{&M?|yyu7hnX3eKV*f-e)CMZInZL^J%p6|fZfVVW%| z;1#$8oPtY4)BJ$~CYDe8VQS)4-88i~-^xUkh?e;h@_{*Tf|aKM%wwK_p86d8po0Ja2&#vBL%=gA#D05i3vFrb?FU zu>-hv1inge`|`&Yq9BS<8X6M5!B-EelHbv7GuO1>`U|msgFmr+b_BjgR{SaCh$zq3 z9JGjb_boVPALLJMys{zq`e4HRyQ#ONV;ux~9Uj41ijs|>H{vGv#&%6J{FwuI8Q%%B znymxwl1|r9w3>hA>rcTu(_YDBtKPkNpoe+zUj&qNl9)7^OS-yg>fNwS=>0uUd-{q` z`hn@_E`RO-`OOLVCSkmvGzk}5haxA@u8W}NOkHrEsd+F zj3OpS2k*o5sNf0YFf}?@NthL?qk>DQNMv{t=9)}~z`(MASqaRW9bH5jIf-HqQ&j1n zp2MNv(Wzx?=wWn+BSlBY__7shs^qXgsto%R5-zuQIe0qQ}dp>)d?-14b8(Y!`7Vg-R zKDIG&?Fl~@>(r0JjBti;@3kUOr7TNOus=mqNx2q)3e*q}+t^%+t3(D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e*C(YqpYm2Y%-}8_1_7j5gmd;cW2=RzSNfapzKY@?0e@|a!mhygY?0+o z#ky+}@OOm#nb0)XqSOXu>~z>Ro7Vi;Ilpxw$-4F_{#F5%rR4#}?EUO@zE9NPZ)_(H zY}~hK`1hzd)4ioq6qv8(Q zK0}S***`W0S;Z#|TCM0%hlBiZ>H@E;?lw5LC66Q%+?+QX!l=X!Gd_)4SND9)Gg|7JIUpxYFN?=E;5ytr%Ht8qu{B9q4vY)VN1GNQW# diff --git a/main.go b/main.go index da779b0..31fc00e 100644 --- a/main.go +++ b/main.go @@ -79,6 +79,15 @@ func repl(g *engine.Game) { if err := s.Save(); err != nil { log.Printf("Couldn't save %q: %v", id, err) } + case "reload": + g.Disable() + g.Hide() + if err := g.Load(game.Assets); err != nil { + log.Printf("Couldn't load: %v", err) + } + g.Prepare() + g.Enable() + g.Show() } } if err := sc.Err(); err != nil {