sm modcharts
This commit is contained in:
parent
952a4464da
commit
9bfcd4141c
@ -1520,6 +1520,7 @@ class ChartingState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var doInput = true;
|
var doInput = true;
|
||||||
|
|
||||||
for (i in Typeables)
|
for (i in Typeables)
|
||||||
|
@ -297,7 +297,12 @@ class ModchartState
|
|||||||
case 'philly-nice': songLowercase = 'philly';
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
}
|
}
|
||||||
|
|
||||||
var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + songLowercase + '/' + spritePath + ".png");
|
var path = Sys.getCwd() + "assets/data/" + songLowercase + '/';
|
||||||
|
|
||||||
|
if (PlayState.isSM)
|
||||||
|
path = PlayState.pathToSm + "/";
|
||||||
|
|
||||||
|
var data:BitmapData = BitmapData.fromFile(path + spritePath + ".png");
|
||||||
|
|
||||||
var sprite:FlxSprite = new FlxSprite(0,0);
|
var sprite:FlxSprite = new FlxSprite(0,0);
|
||||||
var imgWidth:Float = FlxG.width / data.width;
|
var imgWidth:Float = FlxG.width / data.width;
|
||||||
@ -369,7 +374,11 @@ class ModchartState
|
|||||||
case 'philly-nice': songLowercase = 'philly';
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = LuaL.dofile(lua, Paths.lua(songLowercase + "/modchart")); // execute le file
|
var path = Paths.lua(songLowercase + "/modchart");
|
||||||
|
if (PlayState.isSM)
|
||||||
|
path = PlayState.pathToSm + "/modchart.lua";
|
||||||
|
|
||||||
|
var result = LuaL.dofile(lua, path); // execute le file
|
||||||
|
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
{
|
{
|
||||||
|
@ -326,6 +326,8 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
#if windows
|
#if windows
|
||||||
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
|
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
|
||||||
|
if (isSM)
|
||||||
|
executeModchart = FileSystem.exists(pathToSm + "/modchart.lua");
|
||||||
if (executeModchart)
|
if (executeModchart)
|
||||||
PlayStateChangeables.Optimize = false;
|
PlayStateChangeables.Optimize = false;
|
||||||
#end
|
#end
|
||||||
@ -2333,6 +2335,7 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
luaModchart.setVar('songPos', Conductor.songPosition);
|
luaModchart.setVar('songPos', Conductor.songPosition);
|
||||||
luaModchart.setVar('hudZoom', camHUD.zoom);
|
luaModchart.setVar('hudZoom', camHUD.zoom);
|
||||||
|
luaModchart.setVar('curBeat', HelperFunctions.truncateFloat(curDecimalBeat,3);
|
||||||
luaModchart.setVar('cameraZoom', FlxG.camera.zoom);
|
luaModchart.setVar('cameraZoom', FlxG.camera.zoom);
|
||||||
luaModchart.executeState('update', [elapsed]);
|
luaModchart.executeState('update', [elapsed]);
|
||||||
|
|
||||||
@ -4455,7 +4458,6 @@ class PlayState extends MusicBeatState
|
|||||||
#if windows
|
#if windows
|
||||||
if (executeModchart && luaModchart != null)
|
if (executeModchart && luaModchart != null)
|
||||||
{
|
{
|
||||||
luaModchart.setVar('curBeat', curBeat);
|
|
||||||
luaModchart.executeState('beatHit', [curBeat]);
|
luaModchart.executeState('beatHit', [curBeat]);
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user