Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Fix campaign editor #104

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Quipyowert2
Copy link
Contributor

The campaign editor has been broken since at least April 30th.

When attempting to edit one of the four maps in the tutorial campaign, clicking Edit Map allows you to edit the translation key, name, and which maps it is unlocked by. Clicking Ok on the "Campaign Editor" screen (level select) goes from that menu back to the screen which just says "Editor", strangely enough. Clicking Edit Map goes to the CampaignMapEntryEditor class. It's onAction method would probably be the place to add another edit button that launches MapEdit.

TODO:

  • Campaign maps are saved in wrong folder when saving. I should add some code to check if the map saved successfully, and if so, backup campaigns/tutorial-N.map and then overwrite it with maps/tutorial-N.map

@Quipyowert2
Copy link
Contributor Author

Quipyowert2 commented Aug 28, 2023

Overwriting the old campaign map with the one I just saved produces a couple of USL errors for some reason when I load the map. This error happens regardless of whether I restart the game before loading the newly saved map or not.

libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
* Failed to load data/usl/Language/Runtime/
* Failed to load data/usl/Glob2/Runtime/
music dir found: original
selecting music dir original

In MapScriptUSL::compileCode(), fileName is the empty string and fullFileName is "data/usl/Language/Runtime". It would seem that FileManager::getNextDirectoryEntry() is returning "", which happens because Toolkit::getFileManager) returns NULL for some reason in compileCode(), even though a few lines earlier it wasn't NULL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant