mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add being able to override the one-way recolor
Disabling the one-way recolor if assets are mounted is needed to make existing levels not look bad, but what about levels that want to use the recolor anyway? The best solution here is to just introduce another bool into the XML, and make the re-color opt-in and only present if assets are mounted if that tag is present.
This commit is contained in:
@@ -398,6 +398,8 @@ void editorclass::reset()
|
||||
|
||||
ghosts.clear();
|
||||
currentghosts = 0;
|
||||
|
||||
onewaycol_override = false;
|
||||
}
|
||||
|
||||
void editorclass::gethooks()
|
||||
@@ -1708,6 +1710,11 @@ bool editorclass::load(std::string& _path)
|
||||
{
|
||||
website = pText;
|
||||
}
|
||||
|
||||
if(pKey == "onewaycol_override")
|
||||
{
|
||||
onewaycol_override = atoi(pText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1993,6 +2000,13 @@ bool editorclass::save(std::string& _path)
|
||||
meta->LinkEndChild( doc.NewText( website.c_str() ));
|
||||
msg->LinkEndChild( meta );
|
||||
|
||||
if (onewaycol_override)
|
||||
{
|
||||
meta = doc.NewElement( "onewaycol_override" );
|
||||
meta->LinkEndChild( doc.NewText( help.String(onewaycol_override).c_str() ));
|
||||
msg->LinkEndChild( meta );
|
||||
}
|
||||
|
||||
data->LinkEndChild( msg );
|
||||
|
||||
msg = doc.NewElement( "mapwidth" );
|
||||
|
||||
Reference in New Issue
Block a user