From ee48eab1e36cdd0a996ae46fb1e5ea4d71e17240 Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Mon, 31 May 2021 15:08:31 +0200 Subject: [PATCH] Added flashing and distractions as variables in modcharts --- docs/modchart.md | 2 ++ source/ModchartState.hx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/modchart.md b/docs/modchart.md index 3dc8309..6b2fd8a 100644 --- a/docs/modchart.md +++ b/docs/modchart.md @@ -150,6 +150,8 @@ Kade Engine provides a list of global variables to be used in the lua scripting | scrollSpeed | Int | The current scrollspeed | | mustHit | Bool | If the current section is a must hit section | | strumLineY | Float | The current Strum Line Y Position | +| distractions | Bool | Whether the player has distractions enabled | +| flashing | Bool | Whether the player has flashing lights enabled | ## Functions diff --git a/source/ModchartState.hx b/source/ModchartState.hx index 28200b3..28e6b2b 100644 --- a/source/ModchartState.hx +++ b/source/ModchartState.hx @@ -332,6 +332,8 @@ class ModchartState setVar("scrollspeed", FlxG.save.data.scrollSpeed != 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed); setVar("fpsCap", FlxG.save.data.fpsCap); setVar("downscroll", FlxG.save.data.downscroll); + setVar("flashing", FlxG.save.data.flashing); + setVar("distractions", FlxG.save.data.distractions); setVar("curStep", 0); setVar("curBeat", 0);