mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-06-20 01:02:19 +00:00
Merge branch 'master' into feature/week-6-dialogue
This commit is contained in:
commit
f932422d74
10
.github/actions/setup-haxeshit/action.yml
vendored
10
.github/actions/setup-haxeshit/action.yml
vendored
|
@ -10,11 +10,19 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
haxelib config
|
haxelib config
|
||||||
shell: bash
|
shell: bash
|
||||||
|
- name: Restore/create existing haxelib cache for faster downloads
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-haxelib-windows
|
||||||
|
with:
|
||||||
|
# wha?
|
||||||
|
key: cache-haxelib-${{ runner.os }}-${{ hashFiles('**/hmm.json')}}
|
||||||
|
path: |
|
||||||
|
.haxelib/
|
||||||
- name: Installing Haxe lol
|
- name: Installing Haxe lol
|
||||||
run: |
|
run: |
|
||||||
haxe -version
|
haxe -version
|
||||||
haxelib git haxelib https://github.com/HaxeFoundation/haxelib.git
|
haxelib git haxelib https://github.com/HaxeFoundation/haxelib.git
|
||||||
haxelib version
|
haxelib version
|
||||||
haxelib --global install hmm
|
haxelib --global install hmm
|
||||||
haxelib --global run hmm install --quiet
|
haxelib --global run hmm install
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
44
.github/workflows/build-shit.yml
vendored
44
.github/workflows/build-shit.yml
vendored
|
@ -2,7 +2,7 @@ name: build-upload
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_date:
|
check_date:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -44,18 +44,6 @@ jobs:
|
||||||
actions: write
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Restore existing build cache for faster compilation
|
|
||||||
uses: actions/cache/restore@v3
|
|
||||||
id: cache-windows-shit
|
|
||||||
with:
|
|
||||||
# wha?
|
|
||||||
key: cache-build-win
|
|
||||||
path: |
|
|
||||||
.haxelib/
|
|
||||||
export/debug/windows/haxe/
|
|
||||||
export/debug/windows/obj/
|
|
||||||
restore-keys: |
|
|
||||||
cache-build-windows
|
|
||||||
- uses: ./.github/actions/setup-haxeshit
|
- uses: ./.github/actions/setup-haxeshit
|
||||||
- name: Build game
|
- name: Build game
|
||||||
run: |
|
run: |
|
||||||
|
@ -66,33 +54,3 @@ jobs:
|
||||||
butler-key: ${{ secrets.BUTLER_API_KEY}}
|
butler-key: ${{ secrets.BUTLER_API_KEY}}
|
||||||
build-dir: export/debug/windows/bin
|
build-dir: export/debug/windows/bin
|
||||||
target: win
|
target: win
|
||||||
- name: Clearing already existing cache
|
|
||||||
uses: actions/github-script@v6
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const caches = await github.rest.actions.getActionsCacheList({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
})
|
|
||||||
for (const cache of caches.data.actions_caches) {
|
|
||||||
if (cache.key == "cache-build-windows") {
|
|
||||||
console.log('Clearing ' + cache.key + '...')
|
|
||||||
await github.rest.actions.deleteActionsCacheById({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
cache_id: cache.id,
|
|
||||||
})
|
|
||||||
console.log("Cache cleared.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- name: Uploading new cache
|
|
||||||
uses: actions/cache/save@v3
|
|
||||||
with:
|
|
||||||
# caching again since for some reason it doesnt work with the first post cache shit
|
|
||||||
key: cache-build-windows
|
|
||||||
path: |
|
|
||||||
.haxelib/
|
|
||||||
export/debug/windows/haxe/
|
|
||||||
export/debug/windows/obj/
|
|
||||||
restore-keys: |
|
|
||||||
cache-build-windows
|
|
||||||
|
|
4
hmm.json
4
hmm.json
|
@ -68,8 +68,8 @@
|
||||||
"name": "hxCodec",
|
"name": "hxCodec",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"dir": null,
|
"dir": null,
|
||||||
"ref": "c42ab99",
|
"ref": "a56f4b4",
|
||||||
"url": "https://github.com/polybiusproxy/hxCodec"
|
"url": "https://github.com/FunkinCrew/hxCodec"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "hxcpp",
|
"name": "hxcpp",
|
||||||
|
|
|
@ -16,7 +16,7 @@ class FlxAtlasSprite extends FlxAnimate
|
||||||
FrameRate: 24.0,
|
FrameRate: 24.0,
|
||||||
Reversed: false,
|
Reversed: false,
|
||||||
// ?OnComplete:Void -> Void,
|
// ?OnComplete:Void -> Void,
|
||||||
ShowPivot: #if debug true #else false #end,
|
ShowPivot: #if debug false #else false #end,
|
||||||
Antialiasing: true,
|
Antialiasing: true,
|
||||||
ScrollFactor: new FlxPoint(1, 1),
|
ScrollFactor: new FlxPoint(1, 1),
|
||||||
// Offset: new FlxPoint(0, 0), // This is just FlxSprite.offset
|
// Offset: new FlxPoint(0, 0), // This is just FlxSprite.offset
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package funkin.play;
|
package funkin.play;
|
||||||
|
|
||||||
|
import flixel.FlxG;
|
||||||
import flixel.FlxObject;
|
import flixel.FlxObject;
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.system.FlxSound;
|
import flixel.system.FlxSound;
|
||||||
|
@ -97,7 +98,6 @@ class GameOverSubState extends MusicBeatSubState
|
||||||
boyfriend.isDead = true;
|
boyfriend.isDead = true;
|
||||||
add(boyfriend);
|
add(boyfriend);
|
||||||
boyfriend.resetCharacter();
|
boyfriend.resetCharacter();
|
||||||
boyfriend.playAnimation('firstDeath', true, true);
|
|
||||||
|
|
||||||
// Assign a camera follow point to the boyfriend's position.
|
// Assign a camera follow point to the boyfriend's position.
|
||||||
cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1);
|
cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1);
|
||||||
|
@ -118,15 +118,30 @@ class GameOverSubState extends MusicBeatSubState
|
||||||
|
|
||||||
// The conductor now represents the BPM of the game over music.
|
// The conductor now represents the BPM of the game over music.
|
||||||
Conductor.songPosition = 0;
|
Conductor.songPosition = 0;
|
||||||
|
|
||||||
// Play the "blue balled" sound. May play a variant if one has been assigned.
|
|
||||||
playBlueBalledSFX();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hasStartedAnimation:Bool = false;
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
|
if (!hasStartedAnimation)
|
||||||
|
{
|
||||||
|
hasStartedAnimation = true;
|
||||||
|
|
||||||
|
if (boyfriend.hasAnimation('fakeoutDeath') && FlxG.random.bool((1 / 4096) * 100))
|
||||||
|
{
|
||||||
|
boyfriend.playAnimation('fakeoutDeath', true, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
boyfriend.playAnimation('firstDeath', true, true);
|
||||||
|
// Play the "blue balled" sound. May play a variant if one has been assigned.
|
||||||
|
playBlueBalledSFX();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Handle user inputs.
|
// Handle user inputs.
|
||||||
//
|
//
|
||||||
|
@ -145,14 +160,18 @@ class GameOverSubState extends MusicBeatSubState
|
||||||
}
|
}
|
||||||
|
|
||||||
// KEYBOARD ONLY: Restart the level when pressing the assigned key.
|
// KEYBOARD ONLY: Restart the level when pressing the assigned key.
|
||||||
if (controls.ACCEPT)
|
if (controls.ACCEPT && blueballed)
|
||||||
{
|
{
|
||||||
|
blueballed = false;
|
||||||
confirmDeath();
|
confirmDeath();
|
||||||
}
|
}
|
||||||
|
|
||||||
// KEYBOARD ONLY: Return to the menu when pressing the assigned key.
|
// KEYBOARD ONLY: Return to the menu when pressing the assigned key.
|
||||||
if (controls.BACK)
|
if (controls.BACK)
|
||||||
{
|
{
|
||||||
|
blueballed = false;
|
||||||
|
PlayState.instance.deathCounter = 0;
|
||||||
|
// PlayState.seenCutscene = false; // old thing...
|
||||||
gameOverMusic.stop();
|
gameOverMusic.stop();
|
||||||
|
|
||||||
if (PlayStatePlaylist.isStoryMode) FlxG.switchState(new StoryMenuState());
|
if (PlayStatePlaylist.isStoryMode) FlxG.switchState(new StoryMenuState());
|
||||||
|
@ -252,12 +271,15 @@ class GameOverSubState extends MusicBeatSubState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static var blueballed:Bool = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Play the sound effect that occurs when
|
* Play the sound effect that occurs when
|
||||||
* boyfriend's testicles get utterly annihilated.
|
* boyfriend's testicles get utterly annihilated.
|
||||||
*/
|
*/
|
||||||
function playBlueBalledSFX()
|
public static function playBlueBalledSFX()
|
||||||
{
|
{
|
||||||
|
blueballed = true;
|
||||||
FlxG.sound.play(Paths.sound('fnf_loss_sfx' + blueBallSuffix));
|
FlxG.sound.play(Paths.sound('fnf_loss_sfx' + blueBallSuffix));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,10 @@ class Level implements IRegistryEntry<LevelData>
|
||||||
for (propIndex in 0..._data.props.length)
|
for (propIndex in 0..._data.props.length)
|
||||||
{
|
{
|
||||||
var propData = _data.props[propIndex];
|
var propData = _data.props[propIndex];
|
||||||
var propSprite:LevelProp = LevelProp.build(propData);
|
|
||||||
|
var propSprite:Null<LevelProp> = LevelProp.build(propData);
|
||||||
|
if (propSprite == null) continue;
|
||||||
|
|
||||||
propSprite.x += FlxG.width * 0.25 * propIndex;
|
propSprite.x += FlxG.width * 0.25 * propIndex;
|
||||||
props.push(propSprite);
|
props.push(propSprite);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,10 @@ class LevelProp extends Bopper
|
||||||
playAnimation('confirm', true, true);
|
playAnimation('confirm', true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function build(propData:LevelPropData):Null<LevelProp>
|
public static function build(propData:Null<LevelPropData>):Null<LevelProp>
|
||||||
{
|
{
|
||||||
|
if (propData == null) return null;
|
||||||
|
|
||||||
var isAnimated:Bool = propData.animations.length > 0;
|
var isAnimated:Bool = propData.animations.length > 0;
|
||||||
var prop:LevelProp = new LevelProp(propData.danceEvery);
|
var prop:LevelProp = new LevelProp(propData.danceEvery);
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,11 @@ class StoryMenuState extends MusicBeatState
|
||||||
*/
|
*/
|
||||||
var scoreText:FlxText;
|
var scoreText:FlxText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mode text at the top-middle.
|
||||||
|
*/
|
||||||
|
var modeText:FlxText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of songs on the left.
|
* The list of songs on the left.
|
||||||
*/
|
*/
|
||||||
|
@ -146,16 +151,22 @@ class StoryMenuState extends MusicBeatState
|
||||||
|
|
||||||
updateProps();
|
updateProps();
|
||||||
|
|
||||||
scoreText = new FlxText(10, 10, 0, 'HIGH SCORE: 42069420');
|
|
||||||
scoreText.setFormat("VCR OSD Mono", 32);
|
|
||||||
add(scoreText);
|
|
||||||
|
|
||||||
tracklistText = new FlxText(FlxG.width * 0.05, levelBackground.x + levelBackground.height + 100, 0, "Tracks", 32);
|
tracklistText = new FlxText(FlxG.width * 0.05, levelBackground.x + levelBackground.height + 100, 0, "Tracks", 32);
|
||||||
tracklistText.setFormat("VCR OSD Mono", 32);
|
tracklistText.setFormat("VCR OSD Mono", 32);
|
||||||
tracklistText.alignment = CENTER;
|
tracklistText.alignment = CENTER;
|
||||||
tracklistText.color = 0xFFe55777;
|
tracklistText.color = 0xFFe55777;
|
||||||
add(tracklistText);
|
add(tracklistText);
|
||||||
|
|
||||||
|
scoreText = new FlxText(10, 10, 0, 'HIGH SCORE: 42069420');
|
||||||
|
scoreText.setFormat("VCR OSD Mono", 32);
|
||||||
|
add(scoreText);
|
||||||
|
|
||||||
|
modeText = new FlxText(10, 10, 0, 'Base Game Levels [TAB to switch]');
|
||||||
|
modeText.setFormat("VCR OSD Mono", 32);
|
||||||
|
modeText.screenCenter(X);
|
||||||
|
modeText.visible = hasModdedLevels();
|
||||||
|
add(modeText);
|
||||||
|
|
||||||
levelTitleText = new FlxText(FlxG.width * 0.7, 10, 0, 'LEVEL 1');
|
levelTitleText = new FlxText(FlxG.width * 0.7, 10, 0, 'LEVEL 1');
|
||||||
levelTitleText.setFormat("VCR OSD Mono", 32, FlxColor.WHITE, RIGHT);
|
levelTitleText.setFormat("VCR OSD Mono", 32, FlxColor.WHITE, RIGHT);
|
||||||
levelTitleText.alpha = 0.7;
|
levelTitleText.alpha = 0.7;
|
||||||
|
@ -256,7 +267,7 @@ class StoryMenuState extends MusicBeatState
|
||||||
displayingModdedLevels = moddedLevels;
|
displayingModdedLevels = moddedLevels;
|
||||||
buildLevelTitles();
|
buildLevelTitles();
|
||||||
|
|
||||||
changeLevel(0);
|
changeLevel(999999); // Jump past the end of the list to the beginning.
|
||||||
changeDifficulty(0);
|
changeDifficulty(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,6 +279,9 @@ class StoryMenuState extends MusicBeatState
|
||||||
|
|
||||||
scoreText.text = 'LEVEL SCORE: ${Math.round(highScoreLerp)}';
|
scoreText.text = 'LEVEL SCORE: ${Math.round(highScoreLerp)}';
|
||||||
|
|
||||||
|
modeText.text = displayingModdedLevels ? 'Mods [TAB to switch]' : 'Base Game [TAB to switch]';
|
||||||
|
modeText.screenCenter(X);
|
||||||
|
|
||||||
levelTitleText.text = currentLevel.getTitle();
|
levelTitleText.text = currentLevel.getTitle();
|
||||||
levelTitleText.x = FlxG.width - (levelTitleText.width + 10); // Right align.
|
levelTitleText.x = FlxG.width - (levelTitleText.width + 10); // Right align.
|
||||||
|
|
||||||
|
@ -322,7 +336,7 @@ class StoryMenuState extends MusicBeatState
|
||||||
changeDifficulty(-1);
|
changeDifficulty(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.TAB)
|
if (FlxG.keys.justPressed.TAB && modeText.visible)
|
||||||
{
|
{
|
||||||
switchMode(!displayingModdedLevels);
|
switchMode(!displayingModdedLevels);
|
||||||
}
|
}
|
||||||
|
@ -342,6 +356,11 @@ class StoryMenuState extends MusicBeatState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hasModdedLevels():Bool
|
||||||
|
{
|
||||||
|
return LevelRegistry.instance.listModdedLevelIds().length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the selected level.
|
* Changes the selected level.
|
||||||
* @param change +1 (down), -1 (up)
|
* @param change +1 (down), -1 (up)
|
||||||
|
|
Loading…
Reference in a new issue