minor improvements

This commit is contained in:
Page Asgardius 2024-02-01 20:15:52 -07:00
parent 2f221bbb7a
commit 192371e4f7
2 changed files with 28 additions and 11 deletions

View file

@ -1,22 +1,39 @@
extends Label extends Label
var housefreedom var housefreedom
var welcometext = ""
var playername
func _ready(): func _ready():
if OS.get_data_dir().begins_with("/home"):
playername = OS.get_data_dir().rsplit("/", true, 7)[2]
else:
playername = "player"
housefreedom = OS.get_processor_name().contains("AMD Custom APU") && OS.get_processor_name().contains("0405") housefreedom = OS.get_processor_name().contains("AMD Custom APU") && OS.get_processor_name().contains("0405")
if (OS.get_name() != "Linux" && !OS.get_name().ends_with("BSD")) || OS.get_distribution_name().contains("Kali") || !OS.get_data_dir().begins_with("/home") || OS.get_environment("WSL_DISTRO_NAME").length() < 0: if OS.get_distribution_name().contains("Kali") || OS.get_environment("WSL_DISTRO_NAME").length() < 0:
Global.sk = true Global.sk = true
if Global.sk: if Global.sk:
_sk() _sk()
else: else:
if Global.firstrun: if Global.firstrun:
if housefreedom: welcometext = "Welcome to your first session "+playername
set_text("Welcome to your first session "+OS.get_data_dir().rsplit("/", true, 7)[2]+"\nSteam machines are not dead yet");
else:
set_text("Welcome to your first session "+OS.get_data_dir().rsplit("/", true, 7)[2]);
else: else:
if housefreedom: welcometext = "Welcome back "+playername
set_text("Welcome back "+OS.get_data_dir().rsplit("/", true, 7)[2]+"\nSteam machines are not dead yet"); if housefreedom:
else: welcometext = welcometext+"\nSteam machines are not dead yet"
set_text("Welcome back "+OS.get_data_dir().rsplit("/", true, 7)[2]); if OS.get_environment("MANGOHUD").contains("1"):
Global.mangohud = true
welcometext = welcometext+"\nYour overlay already has a FPS counter, built-in one is disabled"
#This can be used to detect background process, may be useful later
#var output = []
# Execute "get-process" in powershell and save data in "output":
#var chrome_active = false
#OS.execute('/bin/bash', ['-c', "ps aux | grep obs"], output, true)
#var result = output[0].rsplit("/", true, 7).size()
#print(output)
#chrome_active = result > 5 # If there is more than 0 chrome processes, it will be true
#if chrome_active:
# welcometext = welcometext+"\nBe careful"
#print("Number of chrome processes: " + str(result))
set_text(welcometext)
func _sk(): func _sk():
set_text("Script Kiddie detected, only true hackers can cheat here"); set_text("Script Kiddie detected, only true hackers can cheat here");

View file

@ -10,8 +10,8 @@ Made with Godot Engine
# Known issues # Known issues
* PlayStation 4 controller does not recognize some buttons
This game only offers official releases for GNU/Linux. Don't ask for releases on other platforms (except for BSD). This game only offers official releases for GNU/Linux. Don't ask for releases on other platforms (except for BSD).
Remember: Godot Does what Unitydn't (if you are from the 1990 decade you will know where it came from) Remember: Godot Does what Unitydn't (if you are from the 1990 decade you will know where it came from)
Official video channel https://video.asgardius.company/c/asgardius_virtualx