Player scoreboard name option

This commit is contained in:
Haze Weathers 2024-12-01 21:37:15 -05:00
parent b61a5122f4
commit 65053aa223
7 changed files with 95 additions and 6 deletions

View file

@ -37,7 +37,7 @@ func _ready():
func _physics_process(delta):
#DEBUG
if debug == true && !entry && !entry_index > 0:
if debug == true && !entry && !entry_index > 0 && !Options.entry:
#Move player to mouse
if Input.is_action_just_pressed("debug_move_player"):
Audio.play_sound(Audio.a_mkey,Audio.ac_jump)
@ -67,6 +67,9 @@ func _physics_process(delta):
if infinite_arrows: Game.arrows = 99
func _input(event):
if Options.entry:
return
if event is InputEventKey && event.is_pressed():
var character = OS.get_scancode_string(event.scancode)
if character.length() > 1:

View file

@ -18,7 +18,7 @@ const TRANS_SPEEDS := [0.8, 0.4, 0.2, 0.0000001]
#Game
var rumble: int = RumbleMode.FULL
var gore: int = Gore.FULL
var scoreboard_name: String = ""
var scoreboard_name: String = "" setget _set_scoreboard_name
var scoreboard_id: int = -1
#Video
@ -42,6 +42,9 @@ var last_file: int = 0
# default values
var defaults = null
# text is being entered
var entry: bool = false
func _ready() -> void:
pause_mode = PAUSE_MODE_PROCESS
@ -51,7 +54,7 @@ func _ready() -> void:
load_options()
func _unhandled_input(event: InputEvent) -> void:
if Debug.entry == false:
if not Debug.entry and not entry:
if event.is_action_pressed("fullscreen"):
OS.window_fullscreen = not OS.window_fullscreen
@ -125,6 +128,10 @@ func save_options() -> void:
# Setters
# game setters
func _set_scoreboard_name(value: String) -> void:
scoreboard_name = value.substr(0, 10).to_lower()
# video setters
func _set_fullscreen(value: bool) -> void:
fullscreen = value