mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Merge pull request #364 from FunkinCrew/bugfix/story-mode-color
Fix issues with story mode colors breaking
This commit is contained in:
commit
921ffb6526
3 changed files with 25 additions and 7 deletions
|
@ -201,8 +201,15 @@ class Level implements IRegistryEntry<LevelData>
|
|||
if (existingProp != null)
|
||||
{
|
||||
existingProp.propData = propData;
|
||||
existingProp.x = propData.offsets[0] + FlxG.width * 0.25 * propIndex;
|
||||
existingProp.visible = true;
|
||||
if (existingProp.propData == null)
|
||||
{
|
||||
existingProp.visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
existingProp.visible = true;
|
||||
existingProp.x = propData.offsets[0] + FlxG.width * 0.25 * propIndex;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -11,11 +11,11 @@ class LevelProp extends Bopper
|
|||
function set_propData(value:LevelPropData):LevelPropData
|
||||
{
|
||||
// Only reset the prop if the asset path has changed.
|
||||
if (propData == null || value.assetPath != this.propData.assetPath)
|
||||
if (propData == null || value?.assetPath != propData?.assetPath)
|
||||
{
|
||||
this.visible = (value != null);
|
||||
this.propData = value;
|
||||
danceEvery = this.propData.danceEvery;
|
||||
danceEvery = this.propData?.danceEvery ?? 0;
|
||||
applyData();
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,16 @@ class LevelProp extends Bopper
|
|||
|
||||
function applyData():Void
|
||||
{
|
||||
if (propData == null)
|
||||
{
|
||||
this.visible = false;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.visible = true;
|
||||
}
|
||||
|
||||
var isAnimated:Bool = propData.animations.length > 0;
|
||||
if (isAnimated)
|
||||
{
|
||||
|
|
|
@ -141,10 +141,10 @@ class StoryMenuState extends MusicBeatState
|
|||
|
||||
persistentUpdate = persistentDraw = true;
|
||||
|
||||
updateData();
|
||||
|
||||
rememberSelection();
|
||||
|
||||
updateData();
|
||||
|
||||
// Explicitly define the background color.
|
||||
this.bgColor = FlxColor.BLACK;
|
||||
|
||||
|
@ -403,7 +403,8 @@ class StoryMenuState extends MusicBeatState
|
|||
|
||||
function hasModdedLevels():Bool
|
||||
{
|
||||
return LevelRegistry.instance.listModdedLevelIds().length > 0;
|
||||
return false;
|
||||
// return LevelRegistry.instance.listModdedLevelIds().length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue