Skip to content

Commit

Permalink
new lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Dec 14, 2023
1 parent e05f58b commit 901e886
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,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 git hxNoise https://github.com/whuop/hxNoise
haxelib install flixel-screenshot-plugin
haxelib install hxcpp-debug-server
haxelib list
Expand Down Expand Up @@ -93,6 +94,7 @@ jobs:
haxelib git fnf-modcharting-tools https://github.com/TheZoroForce240/FNF-Modcharting-Tools
haxelib install flixel-screenshot-plugin
haxelib git flxanimate https://github.com/Dot-Stuff/flxanimate
haxelib git hxNoise https://github.com/whuop/hxNoise
haxelib install away3d
haxelib list
- name: Create Version Tag
Expand Down Expand Up @@ -132,6 +134,7 @@ jobs:
haxelib git hscript-improved https://github.com/FNF-CNE-Devs/hscript-improved
haxelib git scriptless-polymod https://github.com/swordcube/scriptless-polymod
haxelib install away3d
haxelib git hxNoise https://github.com/whuop/hxNoise
haxelib git hxCodec https://github.com/polybiusproxy/hxCodec
haxelib git openfl https://github.com/openfl/openfl
haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
Expand Down Expand Up @@ -179,6 +182,7 @@ jobs:
haxelib git hscript-improved https://github.com/FNF-CNE-Devs/hscript-improved
haxelib git scriptless-polymod https://github.com/swordcube/scriptless-polymod
haxelib git hxCodec https://github.com/polybiusproxy/hxCodec
haxelib git hxNoise https://github.com/whuop/hxNoise
haxelib git openfl https://github.com/openfl/openfl
haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
haxelib git flixelTextureAtlas https://github.com/Smokey555/Flixel-TextureAtlas.git
Expand Down
4 changes: 2 additions & 2 deletions Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

<!-- ____________________________ Window Settings ___________________________ -->

<!--These
window settings apply to all targets-->
<!--These window settings apply to all targets-->
<window width="1280" height="720" fps="60" background="#000000" hardware="true" vsync="false" />

<!--HTML5-specific-->
Expand Down Expand Up @@ -115,6 +114,7 @@
<haxelib name="flixel-screenshot-plugin" if="SCREENSHOTS_ALLOWED"/>
<haxelib name="away3d" if="THREE_D_ALLOWED" />
<haxelib name="hxCodec" if="VIDEOS_ALLOWED" />
<haxelib name="hxNoise"/>
<haxelib name="fnf-modcharting-tools" />

<!-- ______________________________ Haxedefines _____________________________ -->
Expand Down
9 changes: 9 additions & 0 deletions source/modding/ModchartUtilities.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package modding;

import hxnoise.Perlin;
import utilities.NoteVariables;
import flixel.input.gamepad.FlxGamepad;
import flixel.input.FlxInput.FlxInputState;
Expand Down Expand Up @@ -180,6 +181,8 @@ class ModchartUtilities {

public var extra_scripts:Array<ModchartUtilities> = [];

public var perlin:Perlin;

/**
* Easy wrapper for `Lua_helper.add_callback`.
* @param name Function name
Expand All @@ -191,6 +194,8 @@ class ModchartUtilities {

public function new(?path:Null<String>) {
oldMultiplier = PlayState.songMultiplier;

perlin = new Perlin();

lua_Sprites.set("boyfriend", PlayState.boyfriend);
lua_Sprites.set("girlfriend", PlayState.gf);
Expand Down Expand Up @@ -355,6 +360,10 @@ class ModchartUtilities {

// callbacks

setLuaFunction("perlin", function(x:Float, y:Float, z:Float) {
return perlin.perlin(x,y,z);
});

setLuaFunction("trace", function(str:Dynamic = "") {
trace(str);
});
Expand Down

0 comments on commit 901e886

Please sign in to comment.