Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
lewri edited this pageMar 2, 2025 ·5 revisions

lewri: Hotfix process needs updating now we pre-allocate savegame versions post-release.

Hotfixes should be highly avoided in CorsixTH. However, there may be times where a bug not caught before release has such a significant impact it requires addressing.

Identifying bugs for a hotfix

  1. Make sure an issue exists for the bug.
  2. Discuss with the developers the bug and the impact it will have on playing the game.
    • If the bug can be worked around or rarely encountered a hotfix is likely not necessary.
    • If the bug was found near the end of a release cycle, can it wait until the release?
  3. If approved the issue should be marked asP1 Critical to denote an urgent fix.

Creating the hotfix

It is important to establish what broke in the code and work the proper solution. Then, check if the hotfix can be applied in the same manner.
Note: Hotfixes do not follow regularSAVEGAME_VERSION checks and instead should follow their own numbering.

Use the following templates for the hotfix.

Replacexxx with the class the hotfix is applied to
ReplaceY with the hotfix number for the release (starting at 1)
Assign the affected class (e.g.Map:Map()) with a flag for this hotfix:self.hotfixY = true
Hotfix function (inserted above xxx:afterLoad(old, new))

--! Apply a hotfix to this save.--!param num (int) the hotfix number--!param issue (int) the issue numberfunctionxxx:applyHotfix(num,issue)assert((numandissue),"Hotfix parameters given are undefined!")ifnum==Ythen-- Put hotfix code hereself.hotfixY=truelocalstring="Game successfully patched with hotfix"..num.." (Issue #"..issue..")"self.app.world:gameLog(string)elselocalstring="Hotfix"..num.." not found. The game may result in unexpected behavior."self.app.world:gameLog(string)endend

Add the following toafterLoad(old, new) --i is the relevant issue number of github.

-- Comment, if desiredifnotself.hotfixYthenself:applyHotfix(Y,i)end

Remember to adjust the version number inApp:getVersion() e.g.0.65 to0.65.Y and finally add an entry tochangelog.txt.

Once these steps are done, make a Pull Request targeting the current release branch (not master).

Applying the permanent solution

Make your fixes on the master branch too as your normally would. However, in yourafterLoad make sure you delete the hotfix parameter for next release:
self.hotfixY = nil\

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp