Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
mcagabe19 committed Dec 8, 2024
2 parents 8657abf + 46580ad commit b2cb794
Show file tree
Hide file tree
Showing 20 changed files with 271 additions and 79 deletions.
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Feature Request
description: Request a new feature
labels: [enhancement]
body:
- type: textarea
attributes:
label: What feature do you want to get added in?
validations:
required: true
Binary file modified art/flashFiles/onlineDiscord.fla
Binary file not shown.
Binary file modified art/flashFiles/onlineJudges.fla
Binary file not shown.
Binary file modified assets/preload/images/onlineJudges.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions assets/preload/images/onlineJudges.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,19 @@
<SubTexture name="loser0006" x="564" y="0" width="282" height="130"/>
<SubTexture name="loser0007" x="564" y="0" width="282" height="130"/>
<SubTexture name="loser0008" x="564" y="0" width="282" height="130"/>
<SubTexture name="weiner0000" x="0" y="130" width="354" height="146"/>
<SubTexture name="weiner0001" x="0" y="130" width="354" height="146"/>
<SubTexture name="weiner0002" x="0" y="130" width="354" height="146"/>
<SubTexture name="weiner0003" x="354" y="130" width="354" height="146"/>
<SubTexture name="weiner0004" x="354" y="130" width="354" height="146"/>
<SubTexture name="weiner0005" x="354" y="130" width="354" height="146"/>
<SubTexture name="tie0000" x="0" y="130" width="252" height="116"/>
<SubTexture name="tie0001" x="0" y="130" width="252" height="116"/>
<SubTexture name="tie0002" x="0" y="130" width="252" height="116"/>
<SubTexture name="tie0003" x="252" y="130" width="252" height="116"/>
<SubTexture name="tie0004" x="252" y="130" width="252" height="116"/>
<SubTexture name="tie0005" x="252" y="130" width="252" height="116"/>
<SubTexture name="tie0006" x="504" y="130" width="252" height="116"/>
<SubTexture name="tie0007" x="504" y="130" width="252" height="116"/>
<SubTexture name="tie0008" x="504" y="130" width="252" height="116"/>
<SubTexture name="weiner0000" x="0" y="246" width="354" height="146"/>
<SubTexture name="weiner0001" x="0" y="246" width="354" height="146"/>
<SubTexture name="weiner0002" x="0" y="246" width="354" height="146"/>
<SubTexture name="weiner0003" x="354" y="246" width="354" height="146"/>
<SubTexture name="weiner0004" x="354" y="246" width="354" height="146"/>
<SubTexture name="weiner0005" x="354" y="246" width="354" height="146"/>
</TextureAtlas>
Binary file added assets/preload/images/online_twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions assets/preload/images/online_twitter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="online_twitter.png">
<!-- Created with Adobe Animate version 23.0.2.103 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="active0000" x="0" y="0" width="96" height="82"/>
<SubTexture name="active0001" x="0" y="0" width="96" height="82"/>
<SubTexture name="active0002" x="0" y="83" width="96" height="82"/>
<SubTexture name="active0003" x="0" y="83" width="96" height="82"/>
<SubTexture name="active0004" x="0" y="166" width="96" height="82"/>
<SubTexture name="active0005" x="0" y="166" width="96" height="82"/>
<SubTexture name="idle0000" x="97" y="0" width="88" height="72"/>
<SubTexture name="idle0001" x="97" y="0" width="88" height="72"/>
<SubTexture name="idle0002" x="97" y="73" width="88" height="72"/>
<SubTexture name="idle0003" x="97" y="73" width="88" height="72"/>
<SubTexture name="idle0004" x="97" y="146" width="88" height="72"/>
<SubTexture name="idle0005" x="97" y="146" width="88" height="72"/>
</TextureAtlas>
2 changes: 1 addition & 1 deletion gitVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.2
0.9.3
4 changes: 2 additions & 2 deletions source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class Main extends Sprite
public static var stage3D:AwayStage;
#end

public static final PSYCH_ONLINE_VERSION:String = "0.9.2";
public static final CLIENT_PROTOCOL:Float = 5;
public static final PSYCH_ONLINE_VERSION:String = "0.9.3";
public static final CLIENT_PROTOCOL:Float = 6;
public static final GIT_COMMIT:String = online.backend.Macros.getGitCommitHash();

// You can pretty much ignore everything from here on - your code should go in your states.
Expand Down
3 changes: 3 additions & 0 deletions source/online/backend/schema/Player.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class Player extends Schema {
@:type("number")
public var shits: Dynamic = 0;

@:type("number")
public var songPoints: Dynamic = 0;

@:type("string")
public var name: String = "";

Expand Down
3 changes: 3 additions & 0 deletions source/online/backend/schema/Room.hx
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ class Room extends Schema {

@:type("boolean")
public var hideGF:Bool = false;

@:type("number")
public var winCondition: Dynamic = 0;
}
79 changes: 59 additions & 20 deletions source/online/states/OnlineState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class OnlineState extends MusicBeatState {
var itemDesc:FlxText;
var playersOnline:FlxText;

public static var twitterIsDead:Bool = false;
static var curSelected = 0;

var inputWait = false;
Expand Down Expand Up @@ -58,6 +59,7 @@ class OnlineState extends MusicBeatState {
var discord:FlxSprite;
var github:FlxSprite;
var bsky:FlxSprite;
var twitter:FlxSprite;

function onRoomJoin(err:Dynamic) {
if (err != null) {
Expand Down Expand Up @@ -170,17 +172,33 @@ class OnlineState extends MusicBeatState {
github.alpha = 0.8;
add(github);

bsky = new FlxSprite();
bsky.antialiasing = ClientPrefs.data.antialiasing;
bsky.frames = Paths.getSparrowAtlas('online_bsky');
bsky.animation.addByPrefix('idle', "idle", 24);
bsky.animation.addByPrefix('active', "active", 24);
bsky.animation.play('idle');
bsky.updateHitbox();
bsky.x = github.x + github.width + 20;
bsky.y = FlxG.height - bsky.height - 28;
bsky.alpha = 0.8;
add(bsky);
if (twitterIsDead) {
bsky = new FlxSprite();
bsky.antialiasing = ClientPrefs.data.antialiasing;
bsky.frames = Paths.getSparrowAtlas('online_bsky');
bsky.animation.addByPrefix('idle', "idle", 24);
bsky.animation.addByPrefix('active', "active", 24);
bsky.animation.play('idle');
bsky.updateHitbox();
bsky.x = github.x + github.width + 20;
bsky.y = FlxG.height - bsky.height - 28;
bsky.alpha = 0.8;
add(bsky);
}
else {
twitter = new FlxSprite();
twitter.antialiasing = ClientPrefs.data.antialiasing;
twitter.frames = Paths.getSparrowAtlas('online_twitter');
twitter.animation.addByPrefix('idle', "idle", 24);
twitter.animation.addByPrefix('active', "active", 24);
twitter.animation.play('idle');
twitter.updateHitbox();
twitter.x = github.x + github.width + 20;
twitter.y = FlxG.height - twitter.height - 28;
twitter.alpha = 0.8;
add(twitter);
}


itemDesc = new FlxText(0, FlxG.height - 170);
itemDesc.setFormat("VCR OSD Mono", 25, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
Expand Down Expand Up @@ -382,20 +400,41 @@ class OnlineState extends MusicBeatState {
github.animation.play("idle");
}

if (FlxG.mouse.overlaps(bsky)) {
bsky.alpha = 1;
bsky.animation.play("active");
if (twitterIsDead) {
if (FlxG.mouse.overlaps(bsky)) {
bsky.alpha = 1;
bsky.animation.play("active");

itemDesc.text = "Follow the official Psych Online Bluesky account!";
itemDesc.screenCenter(X);
itemDesc.text = "Follow the official Psych Online Bluesky account!";
itemDesc.screenCenter(X);

if (FlxG.mouse.justPressed) {
RequestSubstate.requestURL("https://bsky.app/profile/funkin.sniro.boo", true);
if (FlxG.mouse.justPressed) {
RequestSubstate.requestURL("https://bsky.app/profile/funkin.sniro.boo", true);
}
}
else {
bsky.alpha = 0.8;
bsky.animation.play("idle");
}
}
else {
bsky.alpha = 0.8;
bsky.animation.play("idle");
if (FlxG.mouse.overlaps(twitter)) {
twitter.alpha = 1;
twitter.animation.play("active");
twitter.offset.set(5, 5);

itemDesc.text = "Follow the official Psych Online Twitter account!";
itemDesc.screenCenter(X);

if (FlxG.mouse.justPressed) {
RequestSubstate.requestURL("https://twitter.com/PsychOnlineFNF", true);
}
}
else {
twitter.alpha = 0.8;
twitter.animation.play("idle");
twitter.offset.set(0, 0);
}
}
}
}
Expand Down
Loading

0 comments on commit b2cb794

Please sign in to comment.