Skip to content

Commit

Permalink
Merge branch 'rewrite/master' into abnormalpoof/opening-urls
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteMasterEric authored Sep 19, 2024
2 parents aae7dcd + a128afe commit d81e09b
Show file tree
Hide file tree
Showing 22 changed files with 222 additions and 80 deletions.
44 changes: 44 additions & 0 deletions .github/label-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Configuration for Label Actions - https://github.com/dessant/label-actions

# Automatically close issues and pull requests when the `status: duplicate` label is applied
'status: duplicate':
issues:
# Post a comment
comment: >
This issue is a duplicate. Please direct all discussion to the original issue.
# Close the issue
close: true
# Remove other status labels
unlabel:
- 'status: pending triage'
# Set a close reason
close-reason: 'not planned'
prs:
# Post a comment
comment: >
This pull request is a duplicate. Please direct all discussion to the original pull request.
# Remove other status labels
unlabel:
- 'status: pending triage'
# Close the pull request
close: true
# Set a close reason
close-reason: 'not planned'

'status: rejected':
issues:
# Close the issue
close: true
# Remove other status labels
unlabel:
- 'status: pending triage'
# Set a close reason
close-reason: 'not planned'
prs:
# Close the pull request
close: true
# Remove other status labels
unlabel:
- 'status: pending triage'
# Set a close reason
close-reason: 'not planned'
29 changes: 29 additions & 0 deletions .github/workflows/label-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Perform actions when labels are applied to issues, discussions, or pull requests
# See .github/label-actions.yml
name: 'Label Actions'

on:
issues:
types:
- labeled
- unlabeled
pull_request_target:
types:
- labeled
- unlabeled
discussion:
types:
- labeled
- unlabeled

permissions:
contents: read
issues: write
pull-requests: write
discussions: write

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v4
52 changes: 52 additions & 0 deletions .github/workflows/label-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Issue Labeler"
on:
issues:
types:
- opened
- reopened
- edited

jobs:
# When an issue is opened, perform a similarity check for potential duplicates.
# If some are found, add a label and comment listing the potential duplicate issues.
potential-duplicate:
name: Detect potential duplicate issues
runs-on: ubuntu-latest
steps:
- uses: wow-actions/potential-duplicates@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Issue title filter work with anymatch https://www.npmjs.com/package/anymatch.
# Any matched issue will stop detection immediately.
# You can specify multi filters in each line.
filter: ''
# Exclude keywords in title before detecting.
exclude: ''
# Label to set, when potential duplicates are detected.
label: 'potential duplicate'
# Get issues with state to compare. Supported state: 'all', 'closed', 'open'.
state: all
# If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
# Turn this up if the detection is too sensitive
threshold: 0.6
# Reactions to be add to comment when potential duplicates are detected.
# Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
# reactions: '-1'
# Comment to post when potential duplicates are detected.
comment: >
Potential duplicates: {{#issues}}
- [#{{ number }}] {{ title }} ({{ accuracy }}%)
{{/issues}}
# When an issue is opened, detect if it has an empty body or incomplete issue form.
# If it does, close the issue immediately.
empty-issues:
name: Close empty issues
runs-on: ubuntu-latest
steps:
- name: Run empty issues closer action
uses: rickstaa/empty-issues-closer-action@v1
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
close_comment: Closing this issue because it appears to be empty. Please update the issue for it to be reopened.
open_comment: Reopening this issue because the author provided more information.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
- pull_request_target

jobs:
# Apply labels to pull requests based on which files were edited
labeler:
permissions:
contents: read
Expand All @@ -13,6 +14,7 @@ jobs:
uses: actions/labeler@v5
with:
sync-labels: true
# Apply labels to pull requests based on how many lines were edited
changed-lines-count-labeler:
permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "assets"]
path = assets
url = https://github.com/FunkinCrew/funkin.assets
url = https://github.com/FunkinCrew/Funkin-assets-secret
[submodule "art"]
path = art
url = https://github.com/FunkinCrew/funkin.art
url = https://github.com/FunkinCrew/Funkin-art-secret
2 changes: 1 addition & 1 deletion assets
2 changes: 1 addition & 1 deletion example_mods/introMod/_polymod_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "EliteMasterEric"
}
],
"api_version": "0.1.0",
"api_version": "0.5.0",
"mod_version": "1.0.0",
"license": "Apache-2.0"
}
4 changes: 2 additions & 2 deletions hmm.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@
"name": "haxeui-core",
"type": "git",
"dir": null,
"ref": "22f7c5a8ffca90d4677cffd6e570f53761709fbc",
"ref": "c9d96b168ea2a19274ad7c766ab1a34b57baa793",
"url": "https://github.com/haxeui/haxeui-core"
},
{
"name": "haxeui-flixel",
"type": "git",
"dir": null,
"ref": "28bb710d0ae5d94b5108787593052165be43b980",
"ref": "013b9d4e56bfe9a034e028a8d685f0b274cb73c4",
"url": "https://github.com/haxeui/haxeui-flixel"
},
{
Expand Down
1 change: 1 addition & 0 deletions source/funkin/data/freeplay/player/PlayerData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ typedef PlayerResultsData =
{
var music:PlayerResultsMusicData;

var perfectGold:Array<PlayerResultsAnimationData>;
var perfect:Array<PlayerResultsAnimationData>;
var excellent:Array<PlayerResultsAnimationData>;
var great:Array<PlayerResultsAnimationData>;
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class FlxAtlasSprite extends FlxAnimate

// Move to the first frame of the animation.
// goToFrameLabel(id);
trace('Playing animation $id');
// trace('Playing animation $id');
if ((id == null || id == "") || this.anim.symbolDictionary.exists(id) || (this.anim.getByName(id) != null))
{
this.anim.play(id, restart, false, startFrame);
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/modding/PolymodHandler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class PolymodHandler
Polymod.blacklistImport('cpp.Lib');

// `Unserializer`
// Unserializerr.DEFAULT_RESOLVER.resolveClass() can access blacklisted packages
// Unserializer.DEFAULT_RESOLVER.resolveClass() can access blacklisted packages
Polymod.blacklistImport('Unserializer');

// `lime.system.CFFI`
Expand Down
3 changes: 3 additions & 0 deletions source/funkin/play/ResultState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,12 @@ class ResultState extends MusicBeatSubState
{
ease: FlxEase.quartOut,
onUpdate: _ -> {
clearPercentLerp = Math.round(clearPercentLerp);
clearPercentCounter.curNumber = Math.round(clearPercentCounter.curNumber);
// Only play the tick sound if the number increased.
if (clearPercentLerp != clearPercentCounter.curNumber)
{
trace('$clearPercentLerp and ${clearPercentCounter.curNumber}');
clearPercentLerp = clearPercentCounter.curNumber;
FunkinSound.playOnce(Paths.sound('scrollMenu'));
}
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/play/notes/notestyle/NoteStyle.hx
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ class NoteStyle implements IRegistryEntry<NoteStyleData>
var result = _data.assets.judgementBad?.isPixel;
if (result == null && fallback != null) result = fallback.isJudgementSpritePixel(rating);
return result ?? false;
case "GO":
case "shit":
var result = _data.assets.judgementShit?.isPixel;
if (result == null && fallback != null) result = fallback.isJudgementSpritePixel(rating);
return result ?? false;
Expand Down
20 changes: 14 additions & 6 deletions source/funkin/save/Save.hx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import thx.semver.Version;
@:nullSafety
class Save
{
public static final SAVE_DATA_VERSION:thx.semver.Version = "2.0.5";
public static final SAVE_DATA_VERSION:thx.semver.Version = "2.0.4";
public static final SAVE_DATA_VERSION_RULE:thx.semver.VersionRule = "2.0.x";

// We load this version's saves from a new save path, to maintain SOME level of backwards compatibility.
Expand All @@ -34,19 +34,19 @@ class Save
{
if (_instance == null)
{
_instance = new Save(FlxG.save.data);
return _instance = load();
}
return _instance;
}

var data:RawSaveData;

public static function load():Void
public static function load():Save
{
trace("[SAVE] Loading save...");

// Bind save data.
loadFromSlot(1);
return loadFromSlot(1);
}

/**
Expand All @@ -65,7 +65,9 @@ class Save
public static function getDefault():RawSaveData
{
return {
version: Save.SAVE_DATA_VERSION,
// Version number is an abstract(Array) internally.
// This means it copies by reference, so merging save data overides the version number lol.
version: thx.Dynamics.clone(Save.SAVE_DATA_VERSION),

volume: 1.0,
mute: false,
Expand Down Expand Up @@ -433,7 +435,9 @@ class Save
{
if (!data.unlocks.charactersSeen.contains(character))
{
trace('Character seen: ' + character);
data.unlocks.charactersSeen.push(character);
trace('New characters seen list: ' + data.unlocks.charactersSeen);
flush();
}
}
Expand Down Expand Up @@ -832,7 +836,7 @@ class Save
* If you set slot to `2`, it will load an independe
* @param slot
*/
static function loadFromSlot(slot:Int):Void
static function loadFromSlot(slot:Int):Save
{
trace("[SAVE] Loading save from slot " + slot + "...");

Expand All @@ -850,19 +854,23 @@ class Save
trace('[SAVE] Found legacy save data, converting...');
var gameSave = SaveDataMigrator.migrateFromLegacy(legacySaveData);
FlxG.save.mergeData(gameSave.data, true);
return gameSave;
}
else
{
trace('[SAVE] No legacy save data found.');
var gameSave = new Save();
FlxG.save.mergeData(gameSave.data, true);
return gameSave;
}
}
else
{
trace('[SAVE] Found existing save data.');
var gameSave = SaveDataMigrator.migrate(FlxG.save.data);
FlxG.save.mergeData(gameSave.data, true);

return gameSave;
}
}

Expand Down
6 changes: 6 additions & 0 deletions source/funkin/save/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.4] - 2024-09-12
Note to self: Only update to 2.1.0 when migration is needed.
### Added
- `unlocks.charactersSeen:Array<String>` to `Save`
- `unlocks.oldChar:Bool` to `Save`

## [2.0.5] - 2024-05-21
### Fixed
- Resolved an issue where HTML5 wouldn't store the semantic version properly, causing the game to fail to load the save.
Expand Down
1 change: 0 additions & 1 deletion source/funkin/ui/charSelect/CharSelectPlayer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class CharSelectPlayer extends FlxAtlasSprite implements IBPMSyncedScriptedClass
//
if (getCurrentAnimation() == "idle")
{
trace('Player beat hit');
playAnimation("idle", true, false, false);
}
};
Expand Down
Loading

0 comments on commit d81e09b

Please sign in to comment.