Compare commits

..

2 Commits

Author SHA1 Message Date
8fe5d4dd43
Show blocked moves as an animated X.
I am not convinced the sprite is very good. This could help the player learn what pulls were considered before proposing the ones that would occur if the player pulled the tongue. Or it's just visual noise that sucks. Anyway, this correctly captures what the blocked considered moves were, and we can decide whether to use it or not.
2023-01-02 15:05:18 -08:00
04d2a680dd
block writes while reading
Disabling writes during "wipe" and "first load" is not quite semantically what we want, it's writes during read we want to block. This happens because turning the music on or off tries to save the state, and it's easier to just ignore that persistence request than to rework the music code so it doesn't. "wipe" and "first load" are when we're actually reading (and enacting) state, but it's the act of reading rather than those two acts that should block writes.

It is also unwilling to write until it's done its first read, which I think is a feature; it makes it harder to accidentally blank out the player's data.
2023-01-02 15:04:27 -08:00

View File

@ -1927,24 +1927,23 @@ function persist:init0()
cartdata("ulimate_lizard_total_destruction_0_1")
self.init0 = self.read
self:read()
self.ready=true
end
function persist:read()
self.ready=false
local m = dget(0) == 0
self.music = m
if m then music_on() else music_off() end
self.max_level = dget(1)
self.recent_level = dget(2)
self.ready=true
end
function persist:wipe()
self.ready=false
for i=0,64 do
dset(i,0)
end
self:read()
self.ready=true
end
function persist:lvlstart()