Skip to content

Commit

Permalink
update some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MaybeMaru committed Apr 18, 2024
1 parent c44302c commit 93e6724
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ haxelib install flixel-ui
haxelib git haxeui-openfl https://github.com/haxeui/haxeui-openfl
haxelib git haxeui-core https://github.com/haxeui/haxeui-core
haxelib git maru-hscript https://github.com/MaybeMaru/hscript-improved
haxelib git hxCodec https://github.com/MaybeMaru/hxCodec
haxelib git hxvlc https://github.com/MaybeMaru/hxvlc
haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
```
You should have everything ready for compiling the game!
Expand Down
31 changes: 28 additions & 3 deletions example_mods/TemplateScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ StringTools
FlxG
FlxSpriteExt
FlxSprite // Same as FlxSpriteExt, duplicate for backwards compatibility and shortcuts
FlxBackdrop
FlxText
FlxTypedGroup
FlxSpriteGroup
Expand All @@ -62,13 +63,13 @@ FlxTween
FlxEase
FlxTrail

// HxCodec
// hxVlc
FlxVideo
FlxVideoSprite

// Compilation Defines
BUILD_TARGET // Target the build was compiled to (windows or linux)
VIDEOS_ALLOWED // If hxcodec is enabled
VIDEOS_ALLOWED // If hxvlc is enabled
DISCORD_ALLOWED // If discord presence is enabled
ZIPS_ALLOWED // If osu and quaver zips are enabled

Expand Down Expand Up @@ -185,7 +186,7 @@ cacheCharacter(charName:String);
cacheImage(imagePath:String, ?imageLibrary:String, ?quadCamera:FlxCamera);

/*
Runs a PlayState song event
Runs a PlayState song event and adds a event script if neccesary
@param eventName --> Name of the event to call
@param eventValues --> Values of the event to call (OPTIONAL)
*/
Expand All @@ -197,6 +198,19 @@ runEvent(eventName:String, ?eventValues:Array<Dynamic>);
*/
getBlendMode(blendModeName:String);

/*
Returns a parsed json
@param jsonString --> Contents of the json file
*/
parseJson(jsonString:String);

/*
Returns a json as a string
@param jsonValues --> Values of the json
@param beautyJson --> If to compact the json or make it readable (OPTIONAL)
*/
stringifyJson(jsonValues:Dynamic, ?beautyJson:Bool);

/*
Returns the preference variable
@param prefName --> Identifier name of the preference EX: 'downscroll'
Expand Down Expand Up @@ -289,6 +303,17 @@ pauseSounds();
*/
resumeSounds();

/*
Returns a new cutscene manager instance
@param targetSound -> Sound for the cutscene to be synced to (OPTION)
*/
makeCutsceneManager(?targetSound:FlxSound);

/*
Returns a new modchart manager instance
*/
makeModchartManager();

/*
Changes the current Discord client presence
@param details --> Small text of the Discord presence
Expand Down
10 changes: 5 additions & 5 deletions source/funkin/util/modding/FunkScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ class FunkScript extends hscript.Script implements IFlxDestroyable
public function implement():Void { //Preloaded Variables
implementNonStatic();

set("trace", Reflect.makeVarArgs(function(el) {
var v = el.shift();
ModdingUtil.print(Std.string(v), NONE);
}));

// Wip

set('STOP_FUNCTION', STOP_FUNCTION);
Expand Down Expand Up @@ -194,11 +199,6 @@ class FunkScript extends hscript.Script implements IFlxDestroyable
return Controls.getKeyOld(key);
});

set("trace", Reflect.makeVarArgs(function(el) {
var v = el.shift();
ModdingUtil.print(Std.string(v), NONE);
}));

set('getSound', function (key:String):FlxSound {
return CoolUtil.getSound(key);
});
Expand Down

0 comments on commit 93e6724

Please sign in to comment.