Jump to content

The post-Aporkalypse Fiesta does not persist through saving and reloading


Faintly Macabre
  • Version: PC/MAC/Linux Fixed

The city pig celebration that occurs if you survive two full consecutive days of the Aporkalypse before stopping it doesn't survive a save/quit and reload.


Steps to Reproduce
Survive two days of the Aporkalypse, end it, save/quit and reload, visit some city pigs. Nada.



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

There's some other piece to this puzzle, because I couldn't reproduce this bug.

Share this comment


Link to comment
Share on other sites

Huh. That's really strange. I was definitely having a problem with this a week or two ago. I'll play around some more and see if I can figure out what the deal is. At the time, the problem seemed to be that the Aporkalypse component's "fiesta_begin_date" variable is completely meaningless -- it's never set to anything other than 0. But now despite that it seems to be working fine...? Has the way tasks are handled changed recently?

Share this comment


Link to comment
Share on other sites

Ah, there it is. I was right, I just wasn't taking my doublecheck's circumstances into account. I'm guessing you checked the way I doublechecked: start a new game, begin the Aporkalypse immediately, wait a couple days, end it. This works out because when the game is loaded back in, it determines how much longer the fiesta should last by subtracting the fiesta_begin_date from the current date, and then starting a new task to end the fiesta based on that time subtracted from the default fiesta duration, which is 5 days. Even though fiesta_begin_date will never be anything but 0, if the world is less than 5 days old, the fiesta won't end upon save and reload because if, say, it's the third day, you end up with 3 - 0 and then 5 - 3, meaning despite the fact that none of this is working as it should you end up with 2 days left anyway. If the world is older than 5 days though, the task's timer will end up being less than 0, causing it to be processed immediately and so immediately ending the fiesta as I described.

TLDR: Start a new world, c_skipdays(10), GetAporkalypse():BeginFiesta(), then check. Or to be thorough, c_skipdays(10), GetAporkalypse():BeginAporkalypse(), c_skipdays(2), GetAporkalypse():EndAporkalypse(). Either way, you'll see it works as described now.

Fixing this should be as simple as

function Aporkalypse:BeginFiesta()
	self.fiesta_active = true
	self.fiesta_begin_date = GetClock():GetTotalTime() -- Just add this
	self.inst:PushEvent("beginfiesta")
	self.fiesta_task = self.inst:DoTaskInTime(self.fiesta_duration, function()
		self:EndFiesta()
	end)	
end

but you may want to check around. You might also want to clear fiesta_begin_date in EndFiesta() just as a precaution; I don't know why that should ever cause an issue, but y'know.

Edited by Faintly Macabre

Share this comment


Link to comment
Share on other sites


×
  • Create New...