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()
|
shoot_bullet()
|
||||||
else:
|
else:
|
||||||
shoot_bullet()
|
shoot_bullet()
|
||||||
if Input.is_action_just_pressed("console"):
|
if Global.consoleEnabled:
|
||||||
var scene_trs = load("res://scenes/console.tscn")
|
if Input.is_action_just_pressed("console"):
|
||||||
var scene = scene_trs.instantiate()
|
var scene_trs = load("res://scenes/console.tscn")
|
||||||
if not Global.consoleOpen:
|
var scene = scene_trs.instantiate()
|
||||||
Global.consoleOpen = true
|
if not Global.consoleOpen:
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
Global.consoleOpen = true
|
||||||
add_child(scene)
|
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||||
elif Global.consoleOpen:
|
add_child(scene)
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
elif Global.consoleOpen:
|
||||||
Global.consoleOpen = false # We remove the scene in console.gd
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
|
Global.consoleOpen = false # We remove the scene in console.gd
|
||||||
if Global.roundInSession == false:
|
if Global.roundInSession == false:
|
||||||
if teddyAuthority == 1:
|
if teddyAuthority == 1:
|
||||||
if Global.HUDStartLabelText == "":
|
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://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="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="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"]
|
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_5ejs4"]
|
||||||
sky_top_color = Color(1, 0.509804, 0.384314, 1)
|
sky_top_color = Color(1, 0.509804, 0.384314, 1)
|
||||||
|
|
|
@ -2,20 +2,18 @@ extends Node
|
||||||
|
|
||||||
var scenePlayground = "res://scenes/playground.tscn"
|
var scenePlayground = "res://scenes/playground.tscn"
|
||||||
var sceneTutorial = "res://scenes/tutorial.tscn"
|
var sceneTutorial = "res://scenes/tutorial.tscn"
|
||||||
var consoleEnabled = false
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if consoleEnabled == true:
|
if not Global.consoleOpen:
|
||||||
if not Global.consoleOpen:
|
self.queue_free()
|
||||||
self.queue_free()
|
if Input.is_action_just_pressed("console_send"):
|
||||||
if Input.is_action_just_pressed("console_send"):
|
Global.consoleCommand = $consoleEdit.text
|
||||||
Global.consoleCommand = $consoleEdit.text
|
print ("Console command run: ", Global.consoleCommand)
|
||||||
print ("Console command run: ", Global.consoleCommand)
|
run_command(Global.consoleCommand)
|
||||||
run_command(Global.consoleCommand)
|
|
||||||
|
|
||||||
func run_command(command):
|
func run_command(command):
|
||||||
if command == "tele playground":
|
if command == "tele playground":
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
var consoleEnabled = false # Change this to enable console
|
||||||
var mouseSensitivity = 0.01 # Unless otherwise changed by user in settings
|
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 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
|
var fatigue = 100 # Makes it so you can't run forever, you have limited energy
|
||||||
|
|
Loading…
Reference in a new issue