From 98aa59f85a7fad50b84bba951244f9d20b9babbf Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 21 Nov 2023 01:37:49 -0500 Subject: [PATCH 1/3] open log on debug menu --- source/funkin/ui/debug/DebugMenuSubState.hx | 21 ++++++++++++++++++++- source/funkin/util/logging/CrashHandler.hx | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/source/funkin/ui/debug/DebugMenuSubState.hx b/source/funkin/ui/debug/DebugMenuSubState.hx index ef02a802e..e1f340770 100644 --- a/source/funkin/ui/debug/DebugMenuSubState.hx +++ b/source/funkin/ui/debug/DebugMenuSubState.hx @@ -7,6 +7,7 @@ import funkin.ui.MusicBeatSubState; import funkin.ui.TextMenuList; import funkin.ui.debug.charting.ChartEditorState; import funkin.ui.MusicBeatSubState; +import funkin.util.logging.CrashHandler; class DebugMenuSubState extends MusicBeatSubState { @@ -50,7 +51,9 @@ class DebugMenuSubState extends MusicBeatSubState createItem("ANIMATION EDITOR", openAnimationEditor); createItem("STAGE EDITOR", openStageEditor); createItem("TEST STICKERS", testStickers); - + #if sys + createItem("OPEN CRASH LOG FOLDER", openLogFolder); + #end FlxG.camera.focusOn(new FlxPoint(camFocusPoint.x, camFocusPoint.y)); FlxG.camera.focusOn(new FlxPoint(camFocusPoint.x, camFocusPoint.y + 500)); } @@ -101,6 +104,22 @@ class DebugMenuSubState extends MusicBeatSubState trace('Stage Editor'); } + #if sys + function openLogFolder() + { + #if windows + Sys.command('explorer', [CrashHandler.LOG_FOLDER]); + #elseif mac + // mac could be fuckie with where the log folder is relative to the game file... + // if this comment is still here... it means it has NOT been verified on mac yet! + Sys.command('open', [CrashHandler.LOG_FOLDER]); + #end + + // TODO: implement linux + // some shit with xdg-open :thinking: emoji... + } + #end + function exitDebugMenu() { // TODO: Add a transition? diff --git a/source/funkin/util/logging/CrashHandler.hx b/source/funkin/util/logging/CrashHandler.hx index 9d1d3f1b9..e254909eb 100644 --- a/source/funkin/util/logging/CrashHandler.hx +++ b/source/funkin/util/logging/CrashHandler.hx @@ -9,7 +9,7 @@ import openfl.events.UncaughtErrorEvent; @:nullSafety class CrashHandler { - static final LOG_FOLDER = 'logs'; + public static final LOG_FOLDER = 'logs'; /** * Initializes From 818062605ca9cfac3c9d256d0f830d6b5efde36f Mon Sep 17 00:00:00 2001 From: Hazel Date: Tue, 21 Nov 2023 19:29:38 +0100 Subject: [PATCH 2/3] ci: use our own hardware (#226) * attempt selfhosted linux runner * try container option * run check_date job on own hardware too * prep container * importing actions before checkout doesn't work thanks github * dockering * attempt 2 * attempt 3 * typo * permission issues * try using safe.directory * github actions moment * container prep time! * container prep time! --- .github/workflows/build-shit.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-shit.yml b/.github/workflows/build-shit.yml index ed10cbdc2..22fccbf09 100644 --- a/.github/workflows/build-shit.yml +++ b/.github/workflows/build-shit.yml @@ -5,11 +5,14 @@ on: jobs: check_date: - runs-on: ubuntu-latest + runs-on: [self-hosted, linux] + container: ubuntu:latest name: Check latest commit outputs: should_run: ${{ steps.should_run.outputs.should_run }} steps: + - name: ensure git cli is installed + run: apt update && apt install sudo git -y - uses: actions/checkout@v3 - name: print latest_commit run: echo ${{ github.sha }} @@ -21,8 +24,15 @@ jobs: create-nightly-html5: needs: check_date if: ${{ needs.check_date.outputs.should_run != 'false'}} - runs-on: ubuntu-latest + runs-on: [self-hosted, linux] + container: ubuntu:latest steps: + - name: prepare container + run: | + apt update + apt install sudo git curl unzip -y + echo $GITHUB_WORKSPACE + git config --global --add safe.directory $GITHUB_WORKSPACE - uses: actions/checkout@v3 with: submodules: 'recursive' @@ -30,7 +40,6 @@ jobs: - uses: ./.github/actions/setup-haxeshit - name: Build game run: | - sudo apt-get update sudo apt-get install -y libx11-dev xorg-dev libgl-dev libxi-dev libxext-dev libasound2-dev libxinerama-dev libxrandr-dev libgl1-mesa-dev haxelib run lime build html5 -release --times ls From 620cd50c1d0392c0afd3c1b3906f4b7b63cfa763 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 21 Nov 2023 15:10:18 -0500 Subject: [PATCH 3/3] Chart Editor: Sustain Note polish (#223) * light lerp polish on ghost sustains * small hold fix * small number tweak --------- Co-authored-by: Eric --- source/funkin/ui/debug/charting/ChartEditorState.hx | 3 ++- .../charting/components/ChartEditorHoldNoteSprite.hx | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index a3aeccc02..4772fab7c 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -3399,13 +3399,14 @@ class ChartEditorState extends HaxeUIState gridGhostHoldNote.noteData = gridGhostNote.noteData; gridGhostHoldNote.noteDirection = gridGhostNote.noteData.getDirection(); - gridGhostHoldNote.setHeightDirectly(dragLengthPixels); + gridGhostHoldNote.setHeightDirectly(dragLengthPixels, true); gridGhostHoldNote.updateHoldNotePosition(renderedHoldNotes); } else { gridGhostHoldNote.visible = false; + gridGhostHoldNote.setHeightDirectly(0); } } diff --git a/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx b/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx index 0e8c02758..e5971db08 100644 --- a/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx +++ b/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx @@ -9,6 +9,7 @@ import flixel.graphics.frames.FlxTileFrames; import flixel.math.FlxPoint; import funkin.play.notes.SustainTrail; import funkin.data.song.SongData.SongNoteData; +import flixel.math.FlxMath; /** * A sprite that can be used to display the trail of a hold note in a chart. @@ -42,9 +43,12 @@ class ChartEditorHoldNoteSprite extends SustainTrail * Set the height directly, to a value in pixels. * @param h The desired height in pixels. */ - public function setHeightDirectly(h:Float) + public function setHeightDirectly(h:Float, ?lerp:Bool = false) { - sustainLength = h / (getScrollSpeed() * Constants.PIXELS_PER_MS); + if (lerp != null && lerp) sustainLength = FlxMath.lerp(sustainLength, h / (getScrollSpeed() * Constants.PIXELS_PER_MS), 0.25); + else + sustainLength = h / (getScrollSpeed() * Constants.PIXELS_PER_MS); + fullSustainLength = sustainLength; }