mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 05:20:06 +01:00
Use "not" instead of the exclamation mark in GDScript files
Also add String casts
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -2,4 +2,4 @@ extends Control
|
||||
|
||||
func _process(_delta):
|
||||
if Input.is_action_just_pressed("toggle_control_hints"):
|
||||
visible = !visible
|
||||
visible = not visible
|
||||
|
||||
Reference in New Issue
Block a user