brugh
This commit is contained in:
CyndaquilDAC 2021-04-25 19:39:53 -05:00 committed by GitHub
commit 2521986313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 21 deletions

View File

@ -117,7 +117,7 @@
<haxelib name="faxe" if='switch'/> <haxelib name="faxe" if='switch'/>
<haxelib name="polymod"/> <haxelib name="polymod"/>
<haxelib name="discord_rpc" if="windows"/> <haxelib name="discord_rpc" if="windows"/>
<haxelib name="linc_luajit"/> <haxelib name="linc_luajit" if="windows"/>
<!-- <haxelib name="hxcpp-debug-server" if="desktop"/> --> <!-- <haxelib name="hxcpp-debug-server" if="desktop"/> -->

View File

@ -12,7 +12,7 @@ import flixel.system.FlxAssets;
// Lua // Lua
#if cpp #if windows
import llua.Convert; import llua.Convert;
import llua.Lua; import llua.Lua;
import llua.State; import llua.State;
@ -65,7 +65,7 @@ import openfl.filters.ShaderFilter;
#if windows #if windows
import Discord.DiscordClient; import Discord.DiscordClient;
#end #end
#if cpp #if windows
import Sys; import Sys;
import sys.FileSystem; import sys.FileSystem;
#end #end
@ -213,7 +213,7 @@ class PlayState extends MusicBeatState
// LUA SHIT // LUA SHIT
#if cpp #if windows
public static var lua:State = null; public static var lua:State = null;
@ -1277,7 +1277,7 @@ class PlayState extends MusicBeatState
generateStaticArrows(1); generateStaticArrows(1);
#if cpp #if windows
if (executeModchart) // dude I hate lua (jkjkjkjk) if (executeModchart) // dude I hate lua (jkjkjkjk)
{ {
trace('opening a lua state (because we are cool :))'); trace('opening a lua state (because we are cool :))');
@ -1478,7 +1478,7 @@ class PlayState extends MusicBeatState
getActorByName(id).x = x; getActorByName(id).x = x;
})); }));
trace(Lua_helper.add_callback(lua,"setActorAlpha", function(alpha:Int,id:String) { trace(Lua_helper.add_callback(lua,"setActorAlpha", function(alpha:Float,id:String) {
getActorByName(id).alpha = alpha; getActorByName(id).alpha = alpha;
})); }));
@ -1841,7 +1841,7 @@ class PlayState extends MusicBeatState
var playerCounter:Int = 0; var playerCounter:Int = 0;
// Per song offset check // Per song offset check
#if cpp #if windows
var songPath = 'assets/data/' + PlayState.SONG.song.toLowerCase() + '/'; var songPath = 'assets/data/' + PlayState.SONG.song.toLowerCase() + '/';
for(file in sys.FileSystem.readDirectory(songPath)) for(file in sys.FileSystem.readDirectory(songPath))
{ {
@ -2120,7 +2120,7 @@ class PlayState extends MusicBeatState
perfectMode = false; perfectMode = false;
#end #end
#if cpp #if windows
if (executeModchart && lua != null && songStarted) if (executeModchart && lua != null && songStarted)
{ {
setVar('songPos',Conductor.songPosition); setVar('songPos',Conductor.songPosition);
@ -2240,7 +2240,7 @@ class PlayState extends MusicBeatState
DiscordClient.changePresence("Chart Editor", null, null, true); DiscordClient.changePresence("Chart Editor", null, null, true);
#end #end
FlxG.switchState(new ChartingState()); FlxG.switchState(new ChartingState());
#if cpp #if windows
if (lua != null) if (lua != null)
{ {
Lua.close(lua); Lua.close(lua);
@ -2427,7 +2427,7 @@ class PlayState extends MusicBeatState
} }
} }
#if cpp #if windows
if (lua != null) if (lua != null)
setVar("mustHit",PlayState.SONG.notes[Std.int(curStep / 16)].mustHitSection); setVar("mustHit",PlayState.SONG.notes[Std.int(curStep / 16)].mustHitSection);
#end #end
@ -2436,7 +2436,7 @@ class PlayState extends MusicBeatState
{ {
var offsetX = 0; var offsetX = 0;
var offsetY = 0; var offsetY = 0;
#if cpp #if windows
if (lua != null) if (lua != null)
{ {
offsetX = getVar("followXOffset", "float"); offsetX = getVar("followXOffset", "float");
@ -2444,7 +2444,7 @@ class PlayState extends MusicBeatState
} }
#end #end
camFollow.setPosition(dad.getMidpoint().x + 150 + offsetX, dad.getMidpoint().y - 100 + offsetY); camFollow.setPosition(dad.getMidpoint().x + 150 + offsetX, dad.getMidpoint().y - 100 + offsetY);
#if cpp #if windows
if (lua != null) if (lua != null)
callLua('playerTwoTurn', []); callLua('playerTwoTurn', []);
#end #end
@ -2470,7 +2470,7 @@ class PlayState extends MusicBeatState
{ {
var offsetX = 0; var offsetX = 0;
var offsetY = 0; var offsetY = 0;
#if cpp #if windows
if (lua != null) if (lua != null)
{ {
offsetX = getVar("followXOffset", "float"); offsetX = getVar("followXOffset", "float");
@ -2479,7 +2479,7 @@ class PlayState extends MusicBeatState
#end #end
camFollow.setPosition(boyfriend.getMidpoint().x - 100 + offsetX, boyfriend.getMidpoint().y - 100 + offsetY); camFollow.setPosition(boyfriend.getMidpoint().x - 100 + offsetX, boyfriend.getMidpoint().y - 100 + offsetY);
#if cpp #if windows
if (lua != null) if (lua != null)
callLua('playerOneTurn', []); callLua('playerOneTurn', []);
#end #end
@ -2621,7 +2621,7 @@ class PlayState extends MusicBeatState
dad.playAnim('singLEFT' + altAnim, true); dad.playAnim('singLEFT' + altAnim, true);
} }
#if cpp #if windows
if (lua != null) if (lua != null)
callLua('playerTwoSing', [Math.abs(daNote.noteData), Conductor.songPosition]); callLua('playerTwoSing', [Math.abs(daNote.noteData), Conductor.songPosition]);
#end #end
@ -2715,7 +2715,7 @@ class PlayState extends MusicBeatState
if (!loadRep) if (!loadRep)
rep.SaveReplay(); rep.SaveReplay();
#if cpp #if windows
if (executeModchart) if (executeModchart)
{ {
Lua.close(lua); Lua.close(lua);
@ -2757,7 +2757,7 @@ class PlayState extends MusicBeatState
FlxG.switchState(new StoryMenuState()); FlxG.switchState(new StoryMenuState());
#if cpp #if windows
if (lua != null) if (lua != null)
{ {
Lua.close(lua); Lua.close(lua);
@ -3551,7 +3551,7 @@ class PlayState extends MusicBeatState
boyfriend.playAnim('singRIGHTmiss', true); boyfriend.playAnim('singRIGHTmiss', true);
} }
#if cpp #if windows
if (lua != null) if (lua != null)
callLua('playerOneMiss', [direction, Conductor.songPosition]); callLua('playerOneMiss', [direction, Conductor.songPosition]);
#end #end
@ -3700,7 +3700,7 @@ class PlayState extends MusicBeatState
boyfriend.playAnim('singLEFT', true); boyfriend.playAnim('singLEFT', true);
} }
#if cpp #if windows
if (lua != null) if (lua != null)
callLua('playerOneSing', [note.noteData, Conductor.songPosition]); callLua('playerOneSing', [note.noteData, Conductor.songPosition]);
#end #end
@ -3823,7 +3823,7 @@ class PlayState extends MusicBeatState
resyncVocals(); resyncVocals();
} }
#if cpp #if windows
if (executeModchart && lua != null) if (executeModchart && lua != null)
{ {
setVar('curStep',curStep); setVar('curStep',curStep);
@ -3862,7 +3862,7 @@ class PlayState extends MusicBeatState
notes.sort(FlxSort.byY, FlxSort.DESCENDING); notes.sort(FlxSort.byY, FlxSort.DESCENDING);
} }
#if cpp #if windows
if (executeModchart && lua != null) if (executeModchart && lua != null)
{ {
setVar('curBeat',curBeat); setVar('curBeat',curBeat);