Skip to content

Commit

Permalink
dumb fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Jan 13, 2024
1 parent 862a22b commit 8e5a526
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 84 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
haxelib git linc_luajit https://github.com/Leather128/linc_luajit.git
haxelib git hscript-improved https://github.com/FNF-CNE-Devs/hscript-improved
haxelib install away3d
haxelib install systools
haxelib git scriptless-polymod https://github.com/swordcube/scriptless-polymod
haxelib install hxCodec
haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
Expand Down Expand Up @@ -141,6 +142,7 @@ jobs:
haxelib git flixelTextureAtlas https://github.com/Smokey555/Flixel-TextureAtlas.git
haxelib git fnf-modcharting-tools https://github.com/TheZoroForce240/FNF-Modcharting-Tools
haxelib git flxanimate https://github.com/Dot-Stuff/flxanimate
haxelib install systools
haxelib install flixel-screenshot-plugin
haxelib install hxcpp-debug-server
haxelib list
Expand Down Expand Up @@ -178,6 +180,7 @@ jobs:
haxelib install away3d
haxelib install flixel-ui
haxelib install flixel-addons
haxelib install systools
haxelib git linc_luajit https://github.com/Leather128/linc_luajit.git
haxelib git hscript-improved https://github.com/FNF-CNE-Devs/hscript-improved
haxelib git scriptless-polymod https://github.com/swordcube/scriptless-polymod
Expand Down
1 change: 1 addition & 0 deletions Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
<haxelib name="away3d" if="THREE_D_ALLOWED" />
<haxelib name="hxCodec" if="VIDEOS_ALLOWED" />
<haxelib name="hxNoise"/>
<haxelib name="systools" if="cpp" />
<haxelib name="fnf-modcharting-tools" />

<!-- ______________________________ Haxedefines _____________________________ -->
Expand Down
26 changes: 13 additions & 13 deletions source/flixel/addons/display/FlxRuntimeShader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ class FlxRuntimeShader extends FlxShader
@:privateAccess
if (prop == null)
{
trace('[WARN] Shader float property ${name} not found.');
trace('Shader float property ${name} not found.', WARNING);
return;
}
prop.value = [value];
Expand All @@ -547,7 +547,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Float> = Reflect.field(this.data, name);
if (prop == null)
{
trace('[WARN] Shader float[] property ${name} not found.');
trace('Shader float[] property ${name} not found.', WARNING);
return;
}
prop.value = value;
Expand All @@ -563,7 +563,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Int> = Reflect.field(this.data, name);
if (prop == null)
{
trace('[WARN] Shader int property ${name} not found.');
trace('Shader int property ${name} not found.', WARNING);
return;
}
prop.value = [value];
Expand All @@ -579,7 +579,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Int> = Reflect.field(this.data, name);
if (prop == null)
{
trace('[WARN] Shader int[] property ${name} not found.');
trace('Shader int[] property ${name} not found.', WARNING);
return;
}
prop.value = value;
Expand All @@ -595,7 +595,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Bool> = Reflect.field(this.data, name);
if (prop == null)
{
trace('[WARN] Shader bool property ${name} not found.');
trace('Shader bool property ${name} not found.',WARNING);
return;
}
prop.value = [value];
Expand All @@ -611,7 +611,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Bool> = Reflect.field(this.data, name);
if (prop == null)
{
trace('[WARN] Shader bool[] property ${name} not found.');
trace('Shader bool[] property ${name} not found.', WARNING);
return;
}
prop.value = value;
Expand All @@ -627,7 +627,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderInput<BitmapData> = Reflect.field(this.data, name);
if(prop == null)
{
trace('[WARNING] Shader sampler2D property ${name} not found.');
trace('Shader sampler2D property ${name} not found.', WARNING);
return;
}
prop.input = value;
Expand All @@ -642,7 +642,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Float> = Reflect.field(this.data, name);
if (prop == null || prop.value.length == 0)
{
trace('[WARN] Shader float property ${name} not found.');
trace('Shader float property ${name} not found.', WARNING);
return null;
}
return prop.value[0];
Expand All @@ -657,7 +657,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Float> = Reflect.field(this.data, name);
if (prop == null)
{
trace('[WARN] Shader float[] property ${name} not found.');
trace('Shader float[] property ${name} not found.', WARNING);
return null;
}
return prop.value;
Expand All @@ -672,7 +672,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Int> = Reflect.field(this.data, name);
if (prop == null || prop.value.length == 0)
{
trace('[WARN] Shader int property ${name} not found.');
trace('Shader int property ${name} not found.', WARNING);
return null;
}
return prop.value[0];
Expand All @@ -687,7 +687,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Int> = Reflect.field(this.data, name);
if (prop == null)
{
trace('[WARN] Shader int[] property ${name} not found.');
trace('Shader int[] property ${name} not found.', WARNING);
return null;
}
return prop.value;
Expand All @@ -702,7 +702,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Bool> = Reflect.field(this.data, name);
if (prop == null || prop.value.length == 0)
{
trace('[WARN] Shader bool property ${name} not found.');
trace('Shader bool property ${name} not found.', WARNING);
return null;
}
return prop.value[0];
Expand All @@ -717,7 +717,7 @@ class FlxRuntimeShader extends FlxShader
var prop:ShaderParameter<Bool> = Reflect.field(this.data, name);
if (prop == null)
{
trace('[WARN] Shader bool[] property ${name} not found.');
trace('Shader bool[] property ${name} not found.',WARNING);
return null;
}
return prop.value;
Expand Down
3 changes: 3 additions & 0 deletions source/game/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,9 @@ class Character extends FlxSprite {
animation.play(AnimName, Force, Reversed, Frame);
}

if (AnimName.contains('dodge'))
preventDanceForAnim = true;

var daOffset = animOffsets.get(AnimName);

if (animOffsets.exists(AnimName))
Expand Down
2 changes: 1 addition & 1 deletion source/game/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class Note extends FlxSprite {
override function update(elapsed:Float) {
super.update(elapsed);

angle = angle + modAngle + localAngle;
angle = modAngle + localAngle;

calculateCanBeHit();

Expand Down
3 changes: 3 additions & 0 deletions source/game/StrumNote.hx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class StrumNote extends FlxSprite
public var isPlayer:Float;

public var jsonData:JsonData;

public var modAngle:Float = 0;


public function new(x:Float, y:Float, leData:Int, ?ui_Skin:String, ?ui_settings:Array<String>, ?mania_size:Array<String>, ?keyCount:Int, ?isPlayer:Float, customColors:Bool = false)
Expand Down Expand Up @@ -99,6 +101,7 @@ class StrumNote extends FlxSprite

override function update(elapsed:Float)
{
angle = modAngle;
if (resetAnim > 0)
{
resetAnim -= elapsed;
Expand Down
25 changes: 15 additions & 10 deletions source/modding/ModchartUtilities.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1284,8 +1284,12 @@ class ModchartUtilities {
});

setLuaFunction("setRenderedNoteScale", function(scale:Float, id:Int) {
PlayState.instance.notes.members[id].scale.set(scale, scale);
});
PlayState.instance.notes.members[id].setGraphicSize(Std.int(PlayState.instance.notes.members[id].width * scale));
});

setLuaFunction("setRenderedNoteScale", function(scaleX:Int, scaleY:Int, id:Int) {
PlayState.instance.notes.members[id].setGraphicSize(scaleX,scaleY);
});

setLuaFunction("setRenderedNoteScaleX", function(scale:Float, id:Int) {
PlayState.instance.notes.members[id].scale.x = scale;
Expand Down Expand Up @@ -1745,15 +1749,16 @@ class ModchartUtilities {
getActorByName(id).modAngle = angle;
});

setLuaFunction("setActorScale", function(scale:Float, id:String) {
if (getActorByName(id) != null)
getActorByName(id).scale.set(scale, scale);
});
setLuaFunction("setActorScale", function(scale:Float,id:String) {
if(getActorByName(id) != null)
getActorByName(id).setGraphicSize(Std.int(getActorByName(id).width * scale));
});

setLuaFunction("setActorScaleXY", function(scaleX:Float, scaleY:Float, id:String) {
if (getActorByName(id) != null)
getActorByName(id).scale.set(scaleX, scaleY);
});
setLuaFunction("setActorScaleXY", function(scaleX:Float, scaleY:Float, id:String)
{
if(getActorByName(id) != null)
getActorByName(id).setGraphicSize(Std.int(getActorByName(id).width * scaleX), Std.int(getActorByName(id).height * scaleY));
});

setLuaFunction("setActorFlipX", function(flip:Bool, id:String) {
if (getActorByName(id) != null)
Expand Down
Loading

0 comments on commit 8e5a526

Please sign in to comment.