Use "not" instead of the exclamation mark in GDScript files

Also add String casts
This commit is contained in:
Aaron Franke
2021-06-28 23:30:05 -04:00
parent 7bfc57d1ae
commit 7e129db12e
30 changed files with 67 additions and 66 deletions

View File

@@ -21,7 +21,7 @@ func _ready():
yield(get_tree(), "idle_frame")
yield(get_tree(), "idle_frame")
var edited_scene_root = get_tree().edited_scene_root
if !edited_scene_root:
if not edited_scene_root:
# Godot hasn't finished loading yet, so try loading the plugin again.
editor_interface.set_plugin_enabled("node25d", false)
editor_interface.set_plugin_enabled("node25d", true)
@@ -34,7 +34,7 @@ func _ready():
func _process(delta):
if !editor_interface: # Something's not right... bail!
if not editor_interface: # Something's not right... bail!
return
# View mode polling.
@@ -70,9 +70,9 @@ func _process(delta):
for overlay_child in overlay_children:
var contains = false
for selected in selection:
if selected == overlay_child.get("node25d") and !view_mode_changed_this_frame:
if selected == overlay_child.get("node25d") and not view_mode_changed_this_frame:
contains = true
if !contains:
if not contains:
overlay_child.queue_free()
# Add new gizmos.

View File

@@ -2,4 +2,4 @@ extends Control
func _process(_delta):
if Input.is_action_just_pressed("toggle_control_hints"):
visible = !visible
visible = not visible