Browse Source

Merge pull request #631 from aaronfranke/not

Use "not" instead of the exclamation mark in GDScript files
Aaron Franke 4 years ago
parent
commit
85c1805d33
30 changed files with 67 additions and 66 deletions
  1. 1 1
      2d/finite_state_machine/debug/states_stack_displayer.gd
  2. 1 1
      2d/finite_state_machine/player/states/debug/state_name_displayer.gd
  3. 1 1
      2d/navigation_astar/character.gd
  4. 1 1
      2d/physics_tests/tests/functional/test_collision_pairs.gd
  5. 2 2
      2d/physics_tests/tests/functional/test_raycasting.gd
  6. 1 1
      2d/physics_tests/tests/performance/test_perf_contacts.gd
  7. 1 1
      2d/pong/logic/paddle.gd
  8. 2 1
      2d/pong/project.godot
  9. 2 2
      2d/screen_space_shaders/screen_shaders.gd
  10. 1 1
      3d/material_testers/tester.gd
  11. 1 1
      3d/physics_tests/tests/functional/test_collision_pairs.gd
  12. 1 1
      3d/physics_tests/tests/performance/test_perf_contacts.gd
  13. 3 3
      3d/platformer/player/follow_camera.gd
  14. 1 1
      3d/platformer/player/player.gd
  15. 1 1
      3d/voxel/menu/debug.gd
  16. 1 1
      3d/voxel/menu/ingame/pause_menu.gd
  17. 1 1
      audio/bpm_sync/bpm_sync.gd
  18. 6 6
      misc/2.5d/addons/node25d/main_screen/gizmo_25d.gd
  19. 4 4
      misc/2.5d/addons/node25d/main_screen/viewport_25d.gd
  20. 1 1
      misc/2.5d/addons/node25d/node_25d.gd
  21. 1 1
      misc/2.5d/assets/player/player_math_25d.gd
  22. 1 1
      misc/2.5d/assets/player/player_sprite.gd
  23. 1 1
      misc/2.5d/assets/ui/control_hints.gd
  24. 19 19
      misc/window_management/control.gd
  25. 1 1
      misc/window_management/observer/observer.gd
  26. 2 2
      mobile/android_iap/iap_demo.gd
  27. 3 3
      mobile/multitouch_cubes/GestureArea.gd
  28. 4 4
      mono/2.5d/addons/node25d-cs/main_screen/viewport_25d.gd
  29. 1 1
      mono/2.5d/assets/ui/control_hints.gd
  30. 1 1
      networking/multiplayer_bomber/player.gd

+ 1 - 1
2d/finite_state_machine/debug/states_stack_displayer.gd

@@ -7,7 +7,7 @@ func _process(_delta):
 	var numbers = ""
 	var numbers = ""
 	var index = 0
 	var index = 0
 	for state in fsm_node.states_stack:
 	for state in fsm_node.states_stack:
-		states_names += state.get_name() + "\n"
+		states_names += String(state.get_name()) + "\n"
 		numbers += str(index) + "\n"
 		numbers += str(index) + "\n"
 		index += 1
 		index += 1
 	$States.text = states_names
 	$States.text = states_names

+ 1 - 1
2d/finite_state_machine/player/states/debug/state_name_displayer.gd

@@ -11,4 +11,4 @@ func _physics_process(_delta):
 
 
 
 
 func _on_StateMachine_state_changed(current_state):
 func _on_StateMachine_state_changed(current_state):
-	text = current_state.get_name()
+	text = String(current_state.get_name())

+ 1 - 1
2d/navigation_astar/character.gd

@@ -6,7 +6,7 @@ const MASS = 10.0
 const ARRIVE_DISTANCE = 10.0
 const ARRIVE_DISTANCE = 10.0
 
 
 export(float) var speed = 200.0
 export(float) var speed = 200.0
-var _state = null
+var _state = States.IDLE
 
 
 var _path = []
 var _path = []
 var _target_point_world = Vector2()
 var _target_point_world = Vector2()

+ 1 - 1
2d/physics_tests/tests/functional/test_collision_pairs.gd

@@ -92,7 +92,7 @@ func _initialize_collision_shapes():
 	for node in $Shapes.get_children():
 	for node in $Shapes.get_children():
 		var body = node as PhysicsBody2D
 		var body = node as PhysicsBody2D
 		var shape = body.shape_owner_get_shape(0, 0)
 		var shape = body.shape_owner_get_shape(0, 0)
-		shape.resource_name = node.name.substr("RigidBody".length())
+		shape.resource_name = String(node.name).substr("RigidBody".length())
 
 
 		_collision_shapes.push_back(shape)
 		_collision_shapes.push_back(shape)
 
 

+ 2 - 2
2d/physics_tests/tests/functional/test_raycasting.gd

@@ -25,7 +25,7 @@ func _physics_process(_delta):
 	for node in $Shapes.get_children():
 	for node in $Shapes.get_children():
 		var body = node as PhysicsBody2D
 		var body = node as PhysicsBody2D
 		var space_state = body.get_world_2d().direct_space_state
 		var space_state = body.get_world_2d().direct_space_state
-		var body_name = body.name.substr("RigidBody".length())
+		var body_name = String(body.name).substr("RigidBody".length())
 
 
 		Log.print_log("* Testing: %s" % body_name)
 		Log.print_log("* Testing: %s" % body_name)
 
 
@@ -45,7 +45,7 @@ func _physics_process(_delta):
 		res = _add_raycast(space_state, center, center + Vector2(0, 40))
 		res = _add_raycast(space_state, center, center + Vector2(0, 40))
 		Log.print_log("Raycast inside: %s" % ("HIT" if res else "NO HIT"))
 		Log.print_log("Raycast inside: %s" % ("HIT" if res else "NO HIT"))
 
 
-		if body.name.ends_with("ConcavePolygon"):
+		if String(body.name).ends_with("ConcavePolygon"):
 			# Raycast inside an internal face.
 			# Raycast inside an internal face.
 			center.x += 20
 			center.x += 20
 			res = _add_raycast(space_state, center, center + Vector2(0, 40))
 			res = _add_raycast(space_state, center, center + Vector2(0, 40))

+ 1 - 1
2d/physics_tests/tests/performance/test_perf_contacts.gd

@@ -91,7 +91,7 @@ func _on_option_selected(option):
 func _find_type_index(type_name):
 func _find_type_index(type_name):
 	for type_index in range(_object_templates.size()):
 	for type_index in range(_object_templates.size()):
 		var type_node = _object_templates[type_index]
 		var type_node = _object_templates[type_index]
-		if type_node.name.find(type_name) > -1:
+		if String(type_node.name).find(type_name) > -1:
 			return type_index
 			return type_index
 
 
 	Log.print_error("Invalid shape type: " + type_name)
 	Log.print_error("Invalid shape type: " + type_name)

+ 1 - 1
2d/pong/logic/paddle.gd

@@ -9,7 +9,7 @@ var _down
 onready var _screen_size_y = get_viewport_rect().size.y
 onready var _screen_size_y = get_viewport_rect().size.y
 
 
 func _ready():
 func _ready():
-	var n = name.to_lower()
+	var n = String(name).to_lower()
 	_up = n + "_move_up"
 	_up = n + "_move_up"
 	_down = n + "_move_down"
 	_down = n + "_move_down"
 	if n == "left":
 	if n == "left":

+ 2 - 1
2d/pong/project.godot

@@ -65,7 +65,8 @@ right_move_up={
 [rendering]
 [rendering]
 
 
 quality/driver/driver_name="GLES2"
 quality/driver/driver_name="GLES2"
-quality/2d/use_pixel_snap=true
+2d/snapping/use_gpu_pixel_snap=true
 vram_compression/import_etc=true
 vram_compression/import_etc=true
 vram_compression/import_etc2=false
 vram_compression/import_etc2=false
+quality/2d/use_pixel_snap=true
 viewport/default_clear_color=Color( 0, 0, 0, 1 )
 viewport/default_clear_color=Color( 0, 0, 0, 1 )

+ 2 - 2
2d/screen_space_shaders/screen_shaders.gd

@@ -8,9 +8,9 @@ onready var pictures = $Pictures
 
 
 func _ready():
 func _ready():
 	for c in pictures.get_children():
 	for c in pictures.get_children():
-		picture.add_item("PIC: " + c.get_name())
+		picture.add_item("PIC: " + String(c.get_name()))
 	for c in effects.get_children():
 	for c in effects.get_children():
-		effect.add_item("FX: " + c.get_name())
+		effect.add_item("FX: " + String(c.get_name()))
 
 
 
 
 func _on_picture_item_selected(ID):
 func _on_picture_item_selected(ID):

+ 1 - 1
3d/material_testers/tester.gd

@@ -54,7 +54,7 @@ func _unhandled_input(ev):
 
 
 func _process(delta):
 func _process(delta):
 	var current_tester = testers.get_child(tester_index)
 	var current_tester = testers.get_child(tester_index)
-	material_name.text = current_tester.get_name()
+	material_name.text = String(current_tester.get_name())
 	# This code assumes CameraHolder's Y and Z coordinates are already correct.
 	# This code assumes CameraHolder's Y and Z coordinates are already correct.
 	var target_position = current_tester.transform.origin.x
 	var target_position = current_tester.transform.origin.x
 	var current_position = camera_holder.transform.origin.x
 	var current_position = camera_holder.transform.origin.x

+ 1 - 1
3d/physics_tests/tests/functional/test_collision_pairs.gd

@@ -95,7 +95,7 @@ func _initialize_collision_shapes():
 	for node in $Shapes.get_children():
 	for node in $Shapes.get_children():
 		var body = node as PhysicsBody
 		var body = node as PhysicsBody
 		var shape = body.shape_owner_get_shape(0, 0)
 		var shape = body.shape_owner_get_shape(0, 0)
-		shape.resource_name = node.name.substr("RigidBody".length())
+		shape.resource_name = String(node.name).substr("RigidBody".length())
 
 
 		_collision_shapes.push_back(shape)
 		_collision_shapes.push_back(shape)
 
 

+ 1 - 1
3d/physics_tests/tests/performance/test_perf_contacts.gd

@@ -87,7 +87,7 @@ func _on_option_selected(option):
 func _find_type_index(type_name):
 func _find_type_index(type_name):
 	for type_index in range(_object_templates.size()):
 	for type_index in range(_object_templates.size()):
 		var type_node = _object_templates[type_index]
 		var type_node = _object_templates[type_index]
-		if type_node.name.find(type_name) > -1:
+		if String(type_node.name).find(type_name) > -1:
 			return type_index
 			return type_index
 
 
 	Log.print_error("Invalid shape type: " + type_name)
 	Log.print_error("Invalid shape type: " + type_name)

+ 3 - 3
3d/platformer/player/follow_camera.gd

@@ -49,13 +49,13 @@ func _physics_process(dt):
 	var col = ds.intersect_ray(target, target + delta, collision_exception)
 	var col = ds.intersect_ray(target, target + delta, collision_exception)
 	var col_right = ds.intersect_ray(target, target + Basis(Vector3.UP, deg2rad(-autoturn_ray_aperture)).xform(delta), collision_exception)
 	var col_right = ds.intersect_ray(target, target + Basis(Vector3.UP, deg2rad(-autoturn_ray_aperture)).xform(delta), collision_exception)
 
 
-	if !col.empty():
+	if not col.empty():
 		# If main ray was occluded, get camera closer, this is the worst case scenario.
 		# If main ray was occluded, get camera closer, this is the worst case scenario.
 		delta = col.position - target
 		delta = col.position - target
-	elif !col_left.empty() and col_right.empty():
+	elif not col_left.empty() and col_right.empty():
 		# If only left ray is occluded, turn the camera around to the right.
 		# If only left ray is occluded, turn the camera around to the right.
 		delta = Basis(Vector3.UP, deg2rad(-dt * autoturn_speed)).xform(delta)
 		delta = Basis(Vector3.UP, deg2rad(-dt * autoturn_speed)).xform(delta)
-	elif col_left.empty() and !col_right.empty():
+	elif col_left.empty() and not col_right.empty():
 		# If only right ray is occluded, turn the camera around to the left.
 		# If only right ray is occluded, turn the camera around to the left.
 		delta = Basis(Vector3.UP, deg2rad(dt  *autoturn_speed)).xform(delta)
 		delta = Basis(Vector3.UP, deg2rad(dt  *autoturn_speed)).xform(delta)
 	# Do nothing otherwise, left and right are occluded but center is not, so do not autoturn.
 	# Do nothing otherwise, left and right are occluded but center is not, so do not autoturn.

+ 1 - 1
3d/platformer/player/player.gd

@@ -56,7 +56,7 @@ func _physics_process(delta):
 	if is_on_floor():
 	if is_on_floor():
 		var sharp_turn = hspeed > 0.1 and rad2deg(acos(dir.dot(hdir))) > SHARP_TURN_THRESHOLD
 		var sharp_turn = hspeed > 0.1 and rad2deg(acos(dir.dot(hdir))) > SHARP_TURN_THRESHOLD
 
 
-		if dir.length() > 0.1 and !sharp_turn:
+		if dir.length() > 0.1 and not sharp_turn:
 			if hspeed > 0.001:
 			if hspeed > 0.001:
 				hdir = adjust_facing(hdir, dir, delta, 1.0 / hspeed * TURN_SPEED, Vector3.UP)
 				hdir = adjust_facing(hdir, dir, delta, 1.0 / hspeed * TURN_SPEED, Vector3.UP)
 			else:
 			else:

+ 1 - 1
3d/voxel/menu/debug.gd

@@ -7,7 +7,7 @@ onready var voxel_world = $"../VoxelWorld"
 
 
 func _process(_delta):
 func _process(_delta):
 	if Input.is_action_just_pressed("debug"):
 	if Input.is_action_just_pressed("debug"):
-		visible = !visible
+		visible = not visible
 
 
 	text = "Position: " + _vector_to_string_appropriate_digits(player.transform.origin)
 	text = "Position: " + _vector_to_string_appropriate_digits(player.transform.origin)
 	text += "\nEffective render distance: " + str(voxel_world.effective_render_distance)
 	text += "\nEffective render distance: " + str(voxel_world.effective_render_distance)

+ 1 - 1
3d/voxel/menu/ingame/pause_menu.gd

@@ -11,7 +11,7 @@ onready var voxel_world = $"../VoxelWorld"
 func _process(_delta):
 func _process(_delta):
 	if Input.is_action_just_pressed("pause"):
 	if Input.is_action_just_pressed("pause"):
 		pause.visible = crosshair.visible
 		pause.visible = crosshair.visible
-		crosshair.visible = !crosshair.visible
+		crosshair.visible = not crosshair.visible
 		options.visible = false
 		options.visible = false
 		if crosshair.visible:
 		if crosshair.visible:
 			Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
 			Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

+ 1 - 1
audio/bpm_sync/bpm_sync.gd

@@ -27,7 +27,7 @@ func strsec(secs):
 
 
 
 
 func _process(_delta):
 func _process(_delta):
-	if !playing or !$Player.playing:
+	if not playing or not $Player.playing:
 		return
 		return
 
 
 	var time = 0.0
 	var time = 0.0

+ 6 - 6
misc/2.5d/addons/node25d/main_screen/gizmo_25d.gd

@@ -23,14 +23,14 @@ onready var lines_root = $Lines
 onready var lines = [$Lines/X, $Lines/Y, $Lines/Z]
 onready var lines = [$Lines/X, $Lines/Y, $Lines/Z]
 
 
 func _process(_delta):
 func _process(_delta):
-	if !lines:
+	if not lines:
 		return # Somehow this node hasn't been set up yet.
 		return # Somehow this node hasn't been set up yet.
-	if !node_25d:
+	if not node_25d:
 		return # We're most likely viewing the Gizmo25D scene.
 		return # We're most likely viewing the Gizmo25D scene.
 	# While getting the mouse position works in any viewport, it doesn't do
 	# While getting the mouse position works in any viewport, it doesn't do
 	# anything significant unless the mouse is in the 2.5D viewport.
 	# anything significant unless the mouse is in the 2.5D viewport.
 	var mouse_position = get_local_mouse_position()
 	var mouse_position = get_local_mouse_position()
-	if !_moving:
+	if not _moving:
 		# If the mouse is farther than this many pixels, it won't grab anything.
 		# If the mouse is farther than this many pixels, it won't grab anything.
 		var closest_distance = 20.0
 		var closest_distance = 20.0
 		dominant_axis = -1
 		dominant_axis = -1
@@ -46,9 +46,9 @@ func _process(_delta):
 			return
 			return
 
 
 	lines[dominant_axis].modulate.a = 1
 	lines[dominant_axis].modulate.a = 1
-	if !wants_to_move:
+	if not wants_to_move:
 		_moving = false
 		_moving = false
-	elif wants_to_move and !_moving:
+	elif wants_to_move and not _moving:
 		_moving = true
 		_moving = true
 		_start_position = mouse_position
 		_start_position = mouse_position
 
 
@@ -90,7 +90,7 @@ func initialize():
 # specialized for this script, it assumes that each segment starts at
 # specialized for this script, it assumes that each segment starts at
 # (0, 0) and it provides a deadzone around the origin.
 # (0, 0) and it provides a deadzone around the origin.
 func _distance_to_segment_at_index(index, point):
 func _distance_to_segment_at_index(index, point):
-	if !lines:
+	if not lines:
 		return INF
 		return INF
 	if point.length_squared() < 400:
 	if point.length_squared() < 400:
 		return INF
 		return INF

+ 4 - 4
misc/2.5d/addons/node25d/main_screen/viewport_25d.gd

@@ -21,7 +21,7 @@ func _ready():
 	yield(get_tree(), "idle_frame")
 	yield(get_tree(), "idle_frame")
 	yield(get_tree(), "idle_frame")
 	yield(get_tree(), "idle_frame")
 	var edited_scene_root = get_tree().edited_scene_root
 	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.
 		# 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", false)
 		editor_interface.set_plugin_enabled("node25d", true)
 		editor_interface.set_plugin_enabled("node25d", true)
@@ -34,7 +34,7 @@ func _ready():
 
 
 
 
 func _process(delta):
 func _process(delta):
-	if !editor_interface: # Something's not right... bail!
+	if not editor_interface: # Something's not right... bail!
 		return
 		return
 
 
 	# View mode polling.
 	# View mode polling.
@@ -70,9 +70,9 @@ func _process(delta):
 	for overlay_child in overlay_children:
 	for overlay_child in overlay_children:
 		var contains = false
 		var contains = false
 		for selected in selection:
 		for selected in selection:
-			if selected == overlay_child.node_25d and !view_mode_changed_this_frame:
+			if selected == overlay_child.node_25d and not view_mode_changed_this_frame:
 				contains = true
 				contains = true
-		if !contains:
+		if not contains:
 			overlay_child.queue_free()
 			overlay_child.queue_free()
 
 
 	# Add new gizmos.
 	# Add new gizmos.

+ 1 - 1
misc/2.5d/addons/node25d/node_25d.gd

@@ -60,7 +60,7 @@ func get_basis():
 
 
 
 
 func get_spatial_position():
 func get_spatial_position():
-	if !_spatial_node:
+	if not _spatial_node:
 		_spatial_node = get_child(0)
 		_spatial_node = get_child(0)
 	return _spatial_node.translation
 	return _spatial_node.translation
 
 

+ 1 - 1
misc/2.5d/assets/player/player_math_25d.gd

@@ -16,7 +16,7 @@ func _process(delta):
 		return
 		return
 
 
 	if Input.is_action_just_pressed("toggle_isometric_controls"):
 	if Input.is_action_just_pressed("toggle_isometric_controls"):
-		isometric_controls = !isometric_controls
+		isometric_controls = not isometric_controls
 	if Input.is_action_just_pressed("reset_position"):
 	if Input.is_action_just_pressed("reset_position"):
 		transform = Transform(Basis(), Vector3.UP * 10)
 		transform = Transform(Basis(), Vector3.UP * 10)
 		vertical_speed = 0
 		vertical_speed = 0

+ 1 - 1
misc/2.5d/assets/player/player_sprite.gd

@@ -103,7 +103,7 @@ func _check_movement() -> bool:
 
 
 	# Check for isometric controls and add more to movement accordingly.
 	# Check for isometric controls and add more to movement accordingly.
 	# For efficiency, only check the X axis since this X axis value isn't used anywhere else.
 	# For efficiency, only check the X axis since this X axis value isn't used anywhere else.
-	if !_parent_math.isometric_controls and is_equal_approx(Node25D.SCALE * 0.86602540378, _parent_node25d.get_basis()[0].x):
+	if not _parent_math.isometric_controls and is_equal_approx(Node25D.SCALE * 0.86602540378, _parent_node25d.get_basis()[0].x):
 		if Input.is_action_pressed("move_right"):
 		if Input.is_action_pressed("move_right"):
 			z += 1
 			z += 1
 		if Input.is_action_pressed("move_left"):
 		if Input.is_action_pressed("move_left"):

+ 1 - 1
misc/2.5d/assets/ui/control_hints.gd

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

+ 19 - 19
misc/window_management/control.gd

@@ -16,7 +16,7 @@ func _physics_process(_delta):
 		modetext += "Fullscreen\n"
 		modetext += "Fullscreen\n"
 	else:
 	else:
 		modetext += "Windowed\n"
 		modetext += "Windowed\n"
-	if !OS.is_window_resizable():
+	if not OS.is_window_resizable():
 		modetext += "FixedSize\n"
 		modetext += "FixedSize\n"
 	if OS.is_window_minimized():
 	if OS.is_window_minimized():
 		modetext += "Minimized\n"
 		modetext += "Minimized\n"
@@ -55,7 +55,7 @@ func _physics_process(_delta):
 		$Label_Screen1_DPI.hide()
 		$Label_Screen1_DPI.hide()
 
 
 	$Button_Fullscreen.set_pressed(OS.is_window_fullscreen())
 	$Button_Fullscreen.set_pressed(OS.is_window_fullscreen())
-	$Button_FixedSize.set_pressed(!OS.is_window_resizable())
+	$Button_FixedSize.set_pressed(not OS.is_window_resizable())
 	$Button_Minimized.set_pressed(OS.is_window_minimized())
 	$Button_Minimized.set_pressed(OS.is_window_minimized())
 	$Button_Maximized.set_pressed(OS.is_window_maximized())
 	$Button_Maximized.set_pressed(OS.is_window_maximized())
 	$Button_MouseModeVisible.set_pressed(Input.get_mouse_mode() == Input.MOUSE_MODE_VISIBLE)
 	$Button_MouseModeVisible.set_pressed(Input.get_mouse_mode() == Input.MOUSE_MODE_VISIBLE)
@@ -82,39 +82,39 @@ func _unhandled_input(event):
 
 
 func check_wm_api():
 func check_wm_api():
 	var s = ""
 	var s = ""
-	if !OS.has_method("get_screen_count"):
+	if not OS.has_method("get_screen_count"):
 		s += " - get_screen_count()\n"
 		s += " - get_screen_count()\n"
-	if !OS.has_method("get_current_screen"):
+	if not OS.has_method("get_current_screen"):
 		s += " - get_current_screen()\n"
 		s += " - get_current_screen()\n"
-	if !OS.has_method("set_current_screen"):
+	if not OS.has_method("set_current_screen"):
 		s += " - set_current_screen()\n"
 		s += " - set_current_screen()\n"
-	if !OS.has_method("get_screen_position"):
+	if not OS.has_method("get_screen_position"):
 		s += " - get_screen_position()\n"
 		s += " - get_screen_position()\n"
-	if !OS.has_method("get_screen_size"):
+	if not OS.has_method("get_screen_size"):
 		s += " - get_screen_size()\n"
 		s += " - get_screen_size()\n"
-	if !OS.has_method("get_window_position"):
+	if not OS.has_method("get_window_position"):
 		s += " - get_window_position()\n"
 		s += " - get_window_position()\n"
-	if !OS.has_method("set_window_position"):
+	if not OS.has_method("set_window_position"):
 		s += " - set_window_position()\n"
 		s += " - set_window_position()\n"
-	if !OS.has_method("get_window_size"):
+	if not OS.has_method("get_window_size"):
 		s += " - get_window_size()\n"
 		s += " - get_window_size()\n"
-	if !OS.has_method("set_window_size"):
+	if not OS.has_method("set_window_size"):
 		s += " - set_window_size()\n"
 		s += " - set_window_size()\n"
-	if !OS.has_method("set_window_fullscreen"):
+	if not OS.has_method("set_window_fullscreen"):
 		s += " - set_window_fullscreen()\n"
 		s += " - set_window_fullscreen()\n"
-	if !OS.has_method("is_window_fullscreen"):
+	if not OS.has_method("is_window_fullscreen"):
 		s += " - is_window_fullscreen()\n"
 		s += " - is_window_fullscreen()\n"
-	if !OS.has_method("set_window_resizable"):
+	if not OS.has_method("set_window_resizable"):
 		s += " - set_window_resizable()\n"
 		s += " - set_window_resizable()\n"
-	if !OS.has_method("is_window_resizable"):
+	if not OS.has_method("is_window_resizable"):
 		s += " - is_window_resizable()\n"
 		s += " - is_window_resizable()\n"
-	if !OS.has_method("set_window_minimized"):
+	if not OS.has_method("set_window_minimized"):
 		s += " - set_window_minimized()\n"
 		s += " - set_window_minimized()\n"
-	if !OS.has_method("is_window_minimized"):
+	if not OS.has_method("is_window_minimized"):
 		s += " - is_window_minimized()\n"
 		s += " - is_window_minimized()\n"
-	if !OS.has_method("set_window_maximized"):
+	if not OS.has_method("set_window_maximized"):
 		s += " - set_window_maximized()\n"
 		s += " - set_window_maximized()\n"
-	if !OS.has_method("is_window_maximized"):
+	if not OS.has_method("is_window_maximized"):
 		s += " - is_window_maximized()\n"
 		s += " - is_window_maximized()\n"
 
 
 	if s.length() == 0:
 	if s.length() == 0:

+ 1 - 1
misc/window_management/observer/observer.gd

@@ -28,7 +28,7 @@ func _input(event):
 	if event is InputEventMouseMotion:
 	if event is InputEventMouseMotion:
 		r_pos = -event.relative
 		r_pos = -event.relative
 
 
-	if event.is_action("ui_cancel") and event.is_pressed() and !event.is_echo():
+	if event.is_action("ui_cancel") and event.is_pressed() and not event.is_echo():
 		if (state == STATE_GRAB):
 		if (state == STATE_GRAB):
 			Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
 			Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
 			state = STATE_MENU
 			state = STATE_MENU

+ 2 - 2
mobile/android_iap/iap_demo.gd

@@ -53,7 +53,7 @@ func _on_connected():
 	var query = payment.queryPurchases("inapp") # Use "subs" for subscriptions.
 	var query = payment.queryPurchases("inapp") # Use "subs" for subscriptions.
 	if query.status == OK:
 	if query.status == OK:
 		for purchase in query.purchases:
 		for purchase in query.purchases:
-			if !purchase.is_acknowledged:
+			if not purchase.is_acknowledged:
 				print("Purchase " + str(purchase.sku) + " has not been acknowledged. Acknowledging...")
 				print("Purchase " + str(purchase.sku) + " has not been acknowledged. Acknowledging...")
 				payment.acknowledgePurchase(purchase.purchase_token)
 				payment.acknowledgePurchase(purchase.purchase_token)
 	else:
 	else:
@@ -70,7 +70,7 @@ func _on_purchases_updated(purchases):
 
 
 	# See _on_connected
 	# See _on_connected
 	for purchase in purchases:
 	for purchase in purchases:
-		if !purchase.is_acknowledged:
+		if not purchase.is_acknowledged:
 			print("Purchase " + str(purchase.sku) + " has not been acknowledged. Acknowledging...")
 			print("Purchase " + str(purchase.sku) + " has not been acknowledged. Acknowledging...")
 			payment.acknowledgePurchase(purchase.purchase_token)
 			payment.acknowledgePurchase(purchase.purchase_token)
 
 

+ 3 - 3
mobile/multitouch_cubes/GestureArea.gd

@@ -24,8 +24,8 @@ func _ready():
 
 
 func _gui_input(event):
 func _gui_input(event):
 	# We must start touching inside, but we can drag or unpress outside.
 	# We must start touching inside, but we can drag or unpress outside.
-#	if !(event is InputEventScreenDrag or
-#		(event is InputEventScreenTouch and (!event.pressed or get_global_rect().has_point(event.position)))):
+#	if not (event is InputEventScreenDrag or
+#		(event is InputEventScreenTouch and (not event.pressed or get_global_rect().has_point(event.position)))):
 #		return
 #		return
 
 
 	var finger_count = base_state.size()
 	var finger_count = base_state.size()
@@ -75,7 +75,7 @@ func _gui_input(event):
 		# Two fingers => To pinch-zoom and rotate around Z.
 		# Two fingers => To pinch-zoom and rotate around Z.
 		# Accept unpress or drag.
 		# Accept unpress or drag.
 		if event is InputEventScreenTouch:
 		if event is InputEventScreenTouch:
-			if !event.pressed and base_state.has(event.index):
+			if not event.pressed and base_state.has(event.index):
 				# Some known touching finger released.
 				# Some known touching finger released.
 
 
 				# Remove released finger from the base state.
 				# Remove released finger from the base state.

+ 4 - 4
mono/2.5d/addons/node25d-cs/main_screen/viewport_25d.gd

@@ -21,7 +21,7 @@ func _ready():
 	yield(get_tree(), "idle_frame")
 	yield(get_tree(), "idle_frame")
 	yield(get_tree(), "idle_frame")
 	yield(get_tree(), "idle_frame")
 	var edited_scene_root = get_tree().edited_scene_root
 	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.
 		# 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", false)
 		editor_interface.set_plugin_enabled("node25d", true)
 		editor_interface.set_plugin_enabled("node25d", true)
@@ -34,7 +34,7 @@ func _ready():
 
 
 
 
 func _process(delta):
 func _process(delta):
-	if !editor_interface: # Something's not right... bail!
+	if not editor_interface: # Something's not right... bail!
 		return
 		return
 
 
 	# View mode polling.
 	# View mode polling.
@@ -70,9 +70,9 @@ func _process(delta):
 	for overlay_child in overlay_children:
 	for overlay_child in overlay_children:
 		var contains = false
 		var contains = false
 		for selected in selection:
 		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
 				contains = true
-		if !contains:
+		if not contains:
 			overlay_child.queue_free()
 			overlay_child.queue_free()
 
 
 	# Add new gizmos.
 	# Add new gizmos.

+ 1 - 1
mono/2.5d/assets/ui/control_hints.gd

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

+ 1 - 1
networking/multiplayer_bomber/player.gd

@@ -41,7 +41,7 @@ func _physics_process(_delta):
 			motion = Vector2()
 			motion = Vector2()
 
 
 		if bombing and not prev_bombing:
 		if bombing and not prev_bombing:
-			var bomb_name = get_name() + str(bomb_index)
+			var bomb_name = String(get_name()) + str(bomb_index)
 			var bomb_pos = position
 			var bomb_pos = position
 			rpc("setup_bomb", bomb_name, bomb_pos, get_tree().get_network_unique_id())
 			rpc("setup_bomb", bomb_name, bomb_pos, get_tree().get_network_unique_id())