Actually disallowed console
This commit is contained in:
parent
1a14c26560
commit
134729208b
4 changed files with 19 additions and 19 deletions
|
@ -173,16 +173,17 @@ func _physics_process(delta):
|
|||
shoot_bullet()
|
||||
else:
|
||||
shoot_bullet()
|
||||
if Input.is_action_just_pressed("console"):
|
||||
var scene_trs = load("res://scenes/console.tscn")
|
||||
var scene = scene_trs.instantiate()
|
||||
if not Global.consoleOpen:
|
||||
Global.consoleOpen = true
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
add_child(scene)
|
||||
elif Global.consoleOpen:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
Global.consoleOpen = false # We remove the scene in console.gd
|
||||
if Global.consoleEnabled:
|
||||
if Input.is_action_just_pressed("console"):
|
||||
var scene_trs = load("res://scenes/console.tscn")
|
||||
var scene = scene_trs.instantiate()
|
||||
if not Global.consoleOpen:
|
||||
Global.consoleOpen = true
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
add_child(scene)
|
||||
elif Global.consoleOpen:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
Global.consoleOpen = false # We remove the scene in console.gd
|
||||
if Global.roundInSession == false:
|
||||
if teddyAuthority == 1:
|
||||
if Global.HUDStartLabelText == "":
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://b3l10agcjfgdx" path="res://characters/teddy/model_glb/teddy.glb" id="2_mie3v"]
|
||||
[ext_resource type="PackedScene" uid="uid://cyiyctp6y3n3x" path="res://scenes/mainmenu.tscn" id="3_bj3gc"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://cfsnb4hd7rws7" path="res://characters/Mr. Brown/0_SFusion.obj" id="5_44sv4"]
|
||||
[ext_resource type="PackedScene" uid="uid://b02eb46bq4v2s" path="res://scenes/islands-map.tscn" id="5_ep6fx"]
|
||||
[ext_resource type="PackedScene" uid="uid://cmrooias7kpru" path="res://scenes/islands-map.tscn" id="5_ep6fx"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_5ejs4"]
|
||||
sky_top_color = Color(1, 0.509804, 0.384314, 1)
|
||||
|
|
|
@ -2,20 +2,18 @@ extends Node
|
|||
|
||||
var scenePlayground = "res://scenes/playground.tscn"
|
||||
var sceneTutorial = "res://scenes/tutorial.tscn"
|
||||
var consoleEnabled = false
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if consoleEnabled == true:
|
||||
if not Global.consoleOpen:
|
||||
self.queue_free()
|
||||
if Input.is_action_just_pressed("console_send"):
|
||||
Global.consoleCommand = $consoleEdit.text
|
||||
print ("Console command run: ", Global.consoleCommand)
|
||||
run_command(Global.consoleCommand)
|
||||
if not Global.consoleOpen:
|
||||
self.queue_free()
|
||||
if Input.is_action_just_pressed("console_send"):
|
||||
Global.consoleCommand = $consoleEdit.text
|
||||
print ("Console command run: ", Global.consoleCommand)
|
||||
run_command(Global.consoleCommand)
|
||||
|
||||
func run_command(command):
|
||||
if command == "tele playground":
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
extends Node
|
||||
var consoleEnabled = false # Change this to enable console
|
||||
var mouseSensitivity = 0.01 # Unless otherwise changed by user in settings
|
||||
var playingGame = false # Should be true while in a map, set by menus
|
||||
var fatigue = 100 # Makes it so you can't run forever, you have limited energy
|
||||
|
|
Loading…
Reference in a new issue