forked from Puppet/berry-dash-godot-remake
Finished the outdated version menu
Now I can make any version either not be able to access the servers or not be playable at all. So thats good.
This commit is contained in:
1 parent
62de4bd400
commit
0f1d574da3
4 files changed
+19
-2
No files matched your search
@@ -0,0 +1,12 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class OutdatedVersionLogic : Control {
|
||||
public override void _Ready() {
|
||||
if (Globals.AccessLevel == "client") {
|
||||
GetNode<Label>("Header/SecondaryText").Text = "You can not access the servers!";
|
||||
} else if (Globals.AccessLevel == "none") {
|
||||
GetNode<Button>("Buttons/ContinueButton").Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://5tcka2u0ra0u
|
||||
@@ -40,7 +40,9 @@ public partial class VersionChecker : Control {
|
||||
|
||||
Globals.VersionChecked = true;
|
||||
|
||||
if (Globals.AccessLevel != "all") {
|
||||
string GameVersion = ProjectSettings.GetSetting("application/config/version").AsString();
|
||||
|
||||
if (Globals.AccessLevel != "all" || GameVersion != Globals.LatestVersion) {
|
||||
var error = GetTree().ChangeSceneToFile("res://Scenes/OutdatedVersion.tscn");
|
||||
|
||||
if (error != Error.Ok) {
|
||||
|
||||
Reference in new issue
Block a user