Skip to content

Commit ddc81ba

Browse files
ninjamuffin99Kade-github
authored andcommitted
run prettier
1 parent d9c266a commit ddc81ba

40 files changed

+906
-785
lines changed

.github/FUNDING.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# These are supported funding model platforms
22

33
open_collective: haxe
4-
custom: ['https://haxe.org/foundation/support-plans.html', 'https://haxe.org/foundation/donate.html']
4+
custom:
5+
[
6+
"https://haxe.org/foundation/support-plans.html",
7+
"https://haxe.org/foundation/donate.html",
8+
]

.github/PULL_REQUEST_TEMPLATE/addition.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ body:
1616
- type: textarea
1717
attributes:
1818
label: Screenshots/Videos
19-
placeholder: Demonstrate your additions here...
19+
placeholder: Demonstrate your additions here...

.github/PULL_REQUEST_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ body:
1616
- type: textarea
1717
attributes:
1818
label: Screenshots/Videos
19-
placeholder: Demonstrate your enhancements here...
19+
placeholder: Demonstrate your enhancements here...

.github/PULL_REQUEST_TEMPLATE/fix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ body:
1616
- type: textarea
1717
attributes:
1818
label: Screenshots/Videos
19-
placeholder: Demonstrate your fixes here...
19+
placeholder: Demonstrate your fixes here...

.github/workflows/main.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,51 @@ name: Build and Test
22

33
on:
44
push:
5-
branches: [ main, master ]
5+
branches: [main, master]
66
pull_request:
7-
branches: [ main, master ]
7+
branches: [main, master]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v4
16-
with:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
1717
submodules: true
1818
# we need full git history for article dates
1919
fetch-depth: 0
20-
21-
- name: Setup Haxe
22-
uses: krdlab/setup-haxe@v1
23-
with:
24-
haxe-version: 4.3.5
25-
26-
- name: Install Node.js and npm
27-
uses: actions/setup-node@v4
28-
with:
29-
node-version: '20'
30-
cache: 'npm'
31-
32-
- name: Install
33-
# at some point all npm needs to be in package.json
34-
run: |
35-
npm install
36-
npm install -g [email protected]
37-
npm install -g [email protected]
38-
haxelib install CodeCookBook-neko.hxml --always --quiet
39-
haxelib install highlighting.hxml --always --quiet
40-
haxelib list
41-
42-
- name: Run build script
43-
run: haxe build.hxml
44-
45-
- name: Upload build artifacts (optional)
46-
uses: actions/upload-artifact@v4
47-
with:
48-
name: build-output
49-
path: |
50-
output/
51-
output/
52-
if-no-files-found: ignore
20+
21+
- name: Setup Haxe
22+
uses: krdlab/setup-haxe@v1
23+
with:
24+
haxe-version: 4.3.5
25+
26+
- name: Install Node.js and npm
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: "20"
30+
cache: "npm"
31+
32+
- name: Install
33+
# at some point all npm needs to be in package.json
34+
run: |
35+
npm install
36+
npm install -g [email protected]
37+
npm install -g [email protected]
38+
haxelib install CodeCookBook-neko.hxml --always --quiet
39+
haxelib install highlighting.hxml --always --quiet
40+
haxelib list
41+
42+
- name: Run build script
43+
run: haxe build.hxml
44+
45+
- name: Upload build artifacts (optional)
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: build-output
49+
path: |
50+
output/
51+
output/
52+
if-no-files-found: ignore

.vscode/settings.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{"files.associations": {
2-
"*.mtt": "html"
3-
}
4-
}
1+
{
2+
"files.associations": {
3+
"*.mtt": "html"
4+
}
5+
}

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Funkin' Code CookBook
2+
23
## [**READ THE DOCUMENTATION HERE**](https://thekade.net/funkin-cookbook/)
4+
35
> The link above is a **TEMPORARY** link, and **WILL BE CHANGED** in the future!
46
57
Forked from [Haxe Code CookBook](https://github.com/HaxeFoundation/code-cookbook), this is a one stop shop for all Funkin' Modding Tutorials!
@@ -15,11 +17,14 @@ You need [Haxe 3.4.2+](https://haxe.org/download/list/) installed.
1517
The static site generator source depends on [hxtemplo](https://lib.haxe.org/p/hxtemplo) and [haxe-markdown (funkin crew fork!)](https://github.com/FunkinCrew/haxe-markdown).
1618

1719
Install the libraries using haxelib, run the following command in the root of the project:
20+
1821
```
1922
haxelib install all
2023
```
21-
The CSS files are compressed using [less](http://lesscss.org/#using-less).
24+
25+
The CSS files are compressed using [less](http://lesscss.org/#using-less).
2226
Install from npm:
27+
2328
```
2429
npm install
2530
```

assets/content/cookbook/Advanced/01.HScript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ As you can see, you can basically use HScript like regular haxe, making it ideal
7373

7474
[^philly]: <https://github.com/FunkinCrew/funkin.assets/blob/main/preload/scripts/stages/phillyStreets.hxc>
7575

76-
> Author: [EliteMasterEric](https://github.com/EliteMasterEric)
76+
> Author: [EliteMasterEric](https://github.com/EliteMasterEric)

assets/content/cookbook/Advanced/02.ScriptedClasses.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ class BallisticSong extends Song {
2525
There is a predefined list of classes which the game has set up to be scriptable, and will automatically load and execute when relevant. More of these will be added in the future.
2626

2727
- `funkin.play.song.Song` for providing unique behavior to custom songs, including playing cutscenes and other stuff. See [Scripted Songs](03.ScriptedSongs.md).
28-
- See also [Video Cutscenes](09.VideoCutscenes.md), [Ingame Cutscenes](21-scripted-classes/21-04-ingame-cutscenes.md), and [Dialogue Cutscenes](08.DialogueCutscenes.md)
28+
- See also [Video Cutscenes](09.VideoCutscenes.md), [Ingame Cutscenes](21-scripted-classes/21-04-ingame-cutscenes.md), and [Dialogue Cutscenes](08.DialogueCutscenes.md)
2929
- `funkin.play.character.BaseCharacter` for providing unique behavior to custom characters (such as playing custom animations in certain circumstances). See [Scripted Characters](04.ScriptedCharacters.md).
30+
- Note that you need to choose the correct subclass of this class for the animation type of your character!
31+
- `funkin.play.character.SparrowCharacter` is used for characters that have Sparrow spritesheet animations.
32+
- `funkin.play.character.MultiSparrowCharacter` is used for characters that have several Sparrow spritesheet animations to combine into one character.
33+
- `funkin.play.character.PackerCharacter` is used for characters that have Packer spritesheet animations.
34+
- `funkin.play.character.AnimateAtlasCharacter` is used for characters that have Adobe Animate texture atlases.
35+
- `funkin.play.character.BaseCharacter` has empty stubs for all the rendering and animation handlers, and is only useful for people who want to reimplement their character's animation system by hand.
3036

31-
- Note that you need to choose the correct subclass of this class for the animation type of your character!
32-
33-
- `funkin.play.character.SparrowCharacter` is used for characters that have Sparrow spritesheet animations.
34-
- `funkin.play.character.MultiSparrowCharacter` is used for characters that have several Sparrow spritesheet animations to combine into one character.
35-
- `funkin.play.character.PackerCharacter` is used for characters that have Packer spritesheet animations.
36-
- `funkin.play.character.AnimateAtlasCharacter` is used for characters that have Adobe Animate texture atlases.
37-
- `funkin.play.character.BaseCharacter` has empty stubs for all the rendering and animation handlers, and is only useful for people who want to reimplement their character's animation system by hand.
3837
- `funkin.play.stage.Stage` for providing unique behavior to custom stages, such as creating custom moving props and defining when props animate or when sound effects play in sync with the stage. See [Scripted Stages](21-scripted-classes/24-06-scripted-stages.md).
3938
- `funkin.ui.story.Level` for providing unique behavior to levels in Story Mode. See [Scripted Story Levels](21-scripted-classes/25-07-scripted-story-levels.md).
4039
- `funkin.play.notes.notekind.NoteKind` for providing unique visuals and behavior to certain kinds of notes, which can then be placed in the Chart Editor. See [Custom Note Kinds](21-scripted-classes/26-00-custom-note-kinds.md).
@@ -62,4 +61,4 @@ There are also scripted classes are also set up to be scriptable, but will only
6261
- `flixel.FlxState` for basic groups of sprites which represent a given game state. Use this only if you can't use MusicBeatState.
6362
- `flixel.FlxSubState` for groups of sprites representing a substate of an existing state
6463

65-
> Author: [EliteMasterEric](https://github.com/EliteMasterEric)
64+
> Author: [EliteMasterEric](https://github.com/EliteMasterEric)

assets/content/cookbook/Advanced/03.ScriptedSongs.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[tags]: / "advanced,hscript,song"
2+
23
# Scripted Songs
34

45
This chapter will walk you through the process of adding a script to a Song, and giving examples of the kind of custom behavior which can be implemented with this functionality.
@@ -27,6 +28,7 @@ You can then add override functions to perform custom behavior.
2728
## Variation-Specific Song Scripts
2829

2930
As of 0.7.4, if in the constructor you were to add an anonymous structure with the field `variation` as a parameter next to the song id, the song script will only be active for that variation. This prevents many conflicts with base game scripts and other mods that may add a variation, as the game would only call the functions from the variation-specific script. If a song doesn't have a variation-specific script, it will fallback to the default one, if it exists. An example of a variation-specific script can be found for Darnell Erect[^darnell]
31+
3032
```haxe
3133
import funkin.play.song.Song;
3234
import funkin.save.Save;
@@ -48,6 +50,7 @@ class DarnellErectSong extends Song
4850
## Custom 'NEW'-Label criteria
4951

5052
Usually, in the Freeplay menu, a song would not have the glowing 'NEW' label. However if you override the function `isSongNew`, you can have the label appear if a specific criteria is met. An example of this is found in the script for Cocoa (Pico Mix)[^cocoa] which returns true if the variation is Pico and the player hasn't beaten Cocoa Pico Mix.
53+
5154
```haxe
5255
// ...
5356
@@ -65,6 +68,7 @@ public override function isSongNew(currentDifficulty:String, currentVariation:St
6568
## Custom Alternate Instrumental behavior
6669

6770
Instead of reading from the song's metadata file for possible alternate instrumentals, you can use scripts to lock some of them out of being used until a criteria is met. An example of this is found in the script for Stress[^stress] which locks the pico instrumental behind completing the pico remix, as well as not provide the default instrumental if the song is selected on the pico variation.
71+
6872
```haxe
6973
// ...
7074
@@ -89,9 +93,10 @@ public override function listAltInstrumentalIds(difficultyId:String, variationId
8993
## Hiding the Song from the Freeplay Menu
9094

9195
The most important thing to override here is the function `listDifficulties`. If you return an empty array, the song will be omitted from the Freeplay menu. An example to this is in the song 2hot[^2hot]
96+
9297
```haxe
9398
// ...
94-
99+
95100
// Line 51
96101
public function listDifficulties(variationId:String, variationIds:Array<String>, showLocked:Bool):Array<String>
97102
{
@@ -108,8 +113,11 @@ public function listDifficulties(variationId:String, variationIds:Array<String>,
108113
```
109114

110115
[^darnell]: <https://github.com/FunkinCrew/funkin.assets/blob/main/preload/scripts/songs/darnell-erect.hxc>
116+
111117
[^cocoa]: <https://github.com/FunkinCrew/funkin.assets/blob/main/preload/scripts/songs/cocoa-pico.hxc>
118+
112119
[^stress]: <https://github.com/FunkinCrew/funkin.assets/blob/main/preload/scripts/songs/stress.hxc>
120+
113121
[^2hot]: <https://github.com/FunkinCrew/funkin.assets/blob/main/preload/scripts/songs/2hot.hxc>
114122

115-
> Author: [EliteMasterEric](https://github.com/EliteMasterEric)
123+
> Author: [EliteMasterEric](https://github.com/EliteMasterEric)

0 commit comments

Comments
 (0)