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:
Puppet committed 2025-08-28 11:29:10 -07:00
1 parent 62de4bd400
commit 0f1d574da3
4 files changed
+19 -2

No files matched your search

+3 -1
View File
@@ -1,5 +1,6 @@
[gd_scene load_steps=6 format=3 uid="uid://dggreseg0i3de"] [gd_scene load_steps=7 format=3 uid="uid://dggreseg0i3de"]
[ext_resource type="Script" uid="uid://5tcka2u0ra0u" path="res://Scripts/OutdatedVersionLogic.cs" id="1_1ejpl"]
[ext_resource type="FontFile" uid="uid://dq7nkk7n7wrq4" path="res://Fonts/Lexend.ttf" id="1_4oqe8"] [ext_resource type="FontFile" uid="uid://dq7nkk7n7wrq4" path="res://Fonts/Lexend.ttf" id="1_4oqe8"]
[ext_resource type="Script" uid="uid://bc4miccifwrk0" path="res://Scripts/SceneSwitcher.cs" id="2_1ejpl"] [ext_resource type="Script" uid="uid://bc4miccifwrk0" path="res://Scripts/SceneSwitcher.cs" id="2_1ejpl"]
@@ -23,6 +24,7 @@ anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("1_1ejpl")
[node name="Header" type="Control" parent="."] [node name="Header" type="Control" parent="."]
layout_mode = 1 layout_mode = 1
+12
View File
@@ -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;
}
}
}
+1
View File
@@ -0,0 +1 @@
uid://5tcka2u0ra0u
+3 -1
View File
@@ -40,7 +40,9 @@ public partial class VersionChecker : Control {
Globals.VersionChecked = true; 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"); var error = GetTree().ChangeSceneToFile("res://Scenes/OutdatedVersion.tscn");
if (error != Error.Ok) { if (error != Error.Ok) {