detect mangohud
This commit is contained in:
parent
96131747bb
commit
4c6e795a74
3 changed files with 12 additions and 9 deletions
17
Label2.gd
17
Label2.gd
|
@ -1,5 +1,6 @@
|
||||||
extends Label
|
extends Label
|
||||||
var housefreedom
|
var housefreedom
|
||||||
|
var welcometext = ""
|
||||||
func _ready():
|
func _ready():
|
||||||
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_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:
|
||||||
|
@ -8,15 +9,15 @@ func _ready():
|
||||||
_sk()
|
_sk()
|
||||||
else:
|
else:
|
||||||
if Global.firstrun:
|
if Global.firstrun:
|
||||||
if housefreedom:
|
welcometext = "Welcome to your first session "+OS.get_data_dir().rsplit("/", true, 7)[2]
|
||||||
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 "+OS.get_data_dir().rsplit("/", true, 7)[2]
|
||||||
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"
|
||||||
|
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");
|
||||||
|
|
3
fps.gd
3
fps.gd
|
@ -1,4 +1,5 @@
|
||||||
extends Label
|
extends Label
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
set_text("FPS: " + str(Engine.get_frames_per_second()));
|
if !Global.mangohud:
|
||||||
|
set_text("FPS: " + str(Engine.get_frames_per_second()));
|
||||||
|
|
|
@ -13,6 +13,7 @@ const pchars = ["res://sprites/common/midori/midori.tscn"]
|
||||||
const npchars = []
|
const npchars = []
|
||||||
var cpchar = 0
|
var cpchar = 0
|
||||||
var dcpchar = 0
|
var dcpchar = 0
|
||||||
|
var mangohud = false
|
||||||
var cspawnarea = [null, null]
|
var cspawnarea = [null, null]
|
||||||
var owlocation = [[null, null], [null, null]]
|
var owlocation = [[null, null], [null, null]]
|
||||||
var hiscoresfile = "user://hiscores.save"
|
var hiscoresfile = "user://hiscores.save"
|
||||||
|
|
Loading…
Reference in a new issue