diff --git a/source/funkin/ui/story/Level.hx b/source/funkin/ui/story/Level.hx index c93ad41a6..b548b7b1e 100644 --- a/source/funkin/ui/story/Level.hx +++ b/source/funkin/ui/story/Level.hx @@ -201,8 +201,15 @@ class Level implements IRegistryEntry 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 { diff --git a/source/funkin/ui/story/LevelProp.hx b/source/funkin/ui/story/LevelProp.hx index 5af383de9..b126f0243 100644 --- a/source/funkin/ui/story/LevelProp.hx +++ b/source/funkin/ui/story/LevelProp.hx @@ -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) { diff --git a/source/funkin/ui/story/StoryMenuState.hx b/source/funkin/ui/story/StoryMenuState.hx index ba1d2ed21..8b477feee 100644 --- a/source/funkin/ui/story/StoryMenuState.hx +++ b/source/funkin/ui/story/StoryMenuState.hx @@ -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; } /**