offset desktop only pt.2
This commit is contained in:
parent
6e93df0437
commit
7162b4dd86
@ -39,10 +39,10 @@ import lime.utils.Assets;
|
|||||||
import openfl.display.BlendMode;
|
import openfl.display.BlendMode;
|
||||||
import openfl.display.StageQuality;
|
import openfl.display.StageQuality;
|
||||||
import openfl.filters.ShaderFilter;
|
import openfl.filters.ShaderFilter;
|
||||||
import Sys;
|
|
||||||
|
|
||||||
#if windows
|
#if windows
|
||||||
import Discord.DiscordClient;
|
import Discord.DiscordClient;
|
||||||
|
import Sys;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
using StringTools;
|
using StringTools;
|
||||||
@ -1230,23 +1230,26 @@ class PlayState extends MusicBeatState
|
|||||||
var playerCounter:Int = 0;
|
var playerCounter:Int = 0;
|
||||||
|
|
||||||
// Per song offset check
|
// Per song offset check
|
||||||
var songPath = 'assets/data/' + PlayState.SONG.song.toLowerCase() + '/';
|
#if desktop
|
||||||
for(file in sys.FileSystem.readDirectory(songPath))
|
var songPath = 'assets/data/' + PlayState.SONG.song.toLowerCase() + '/';
|
||||||
{
|
for(file in sys.FileSystem.readDirectory(songPath))
|
||||||
var path = haxe.io.Path.join([songPath, file]);
|
|
||||||
if(!sys.FileSystem.isDirectory(path))
|
|
||||||
{
|
{
|
||||||
if(path.endsWith('.offset'))
|
var path = haxe.io.Path.join([songPath, file]);
|
||||||
|
if(!sys.FileSystem.isDirectory(path))
|
||||||
{
|
{
|
||||||
trace('Found offset file: ' + path);
|
if(path.endsWith('.offset'))
|
||||||
songOffset = Std.parseFloat(file.substring(0, file.indexOf('.off')));
|
{
|
||||||
break;
|
trace('Found offset file: ' + path);
|
||||||
}else {
|
songOffset = Std.parseFloat(file.substring(0, file.indexOf('.off')));
|
||||||
trace('Offset file not found. Creating one @: ' + songPath);
|
break;
|
||||||
sys.io.File.saveContent(songPath + songOffset + '.offset', '');
|
}else {
|
||||||
|
trace('Offset file not found. Creating one @: ' + songPath);
|
||||||
|
sys.io.File.saveContent(songPath + songOffset + '.offset', '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
#end
|
||||||
|
|
||||||
var daBeats:Int = 0; // Not exactly representative of 'daBeats' lol, just how much it has looped
|
var daBeats:Int = 0; // Not exactly representative of 'daBeats' lol, just how much it has looped
|
||||||
for (section in noteData)
|
for (section in noteData)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user