From aedac402cf7ec925bfd010e8cdbc2aaf92d0dda0 Mon Sep 17 00:00:00 2001
From: Cameron Taylor <cameron.taylor.ninja@gmail.com>
Date: Tue, 15 Dec 2020 22:00:22 -0500
Subject: [PATCH] NGio bootleg API bullshit

---
 .github/workflows/superlinter.yml | 16 ++++++++--------
 source/MainMenuState.hx           |  3 +++
 source/NGio.hx                    |  5 +++++
 source/TitleState.hx              |  2 ++
 4 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/superlinter.yml b/.github/workflows/superlinter.yml
index 799adf821..7f2c82e13 100644
--- a/.github/workflows/superlinter.yml
+++ b/.github/workflows/superlinter.yml
@@ -1,10 +1,10 @@
-name: learn-github-actions
-on: [push]
 jobs:
-  check-bats-version:
-    runs-on: ubuntu-latest
+  build:
+    runs-on: [ubuntu-latest, macos-latest]
     steps:
-      - uses: actions/checkout@v2
-      - uses: actions/setup-node@v1
-      - run: npm install -g bats
-      - run: bats -v
+      - uses: krdlab/setup-haxe@v1
+        with:
+          haxe-version: 4.0.5
+      - run: |
+          haxe -version
+          haxelib install hxnodejs
\ No newline at end of file
diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx
index 3446f4721..fceb951a4 100644
--- a/source/MainMenuState.hx
+++ b/source/MainMenuState.hx
@@ -10,6 +10,7 @@ import flixel.text.FlxText;
 import flixel.tweens.FlxEase;
 import flixel.tweens.FlxTween;
 import flixel.util.FlxColor;
+import io.newgrounds.NG;
 import lime.app.Application;
 
 class MainMenuState extends MusicBeatState
@@ -86,6 +87,8 @@ class MainMenuState extends MusicBeatState
 		versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
 		add(versionShit);
 
+		NG.core.calls.event.logEvent('swag').send();
+
 		changeItem();
 
 		super.create();
diff --git a/source/NGio.hx b/source/NGio.hx
index 2073c073b..cafc26b37 100644
--- a/source/NGio.hx
+++ b/source/NGio.hx
@@ -22,6 +22,11 @@ class NGio
 	public static var ngDataLoaded(default, null):FlxSignal = new FlxSignal();
 	public static var ngScoresLoaded(default, null):FlxSignal = new FlxSignal();
 
+	public static function noLogin(api:String)
+	{
+		NG.create(api);
+	}
+
 	public function new(api:String, encKey:String, ?sessionId:String)
 	{
 		trace("connecting to newgrounds");
diff --git a/source/TitleState.hx b/source/TitleState.hx
index 26bb4405b..f2ca6f8f1 100644
--- a/source/TitleState.hx
+++ b/source/TitleState.hx
@@ -51,6 +51,8 @@ class TitleState extends MusicBeatState
 
 		super.create();
 
+		NGio.noLogin(APIStuff.API);
+
 		#if ng
 		var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey);
 		trace('NEWGROUNDS LOL');