From f43345dc6f201114fe4c8077eeca75eb9f12fce1 Mon Sep 17 00:00:00 2001 From: Pat <27511950+ThePat02@users.noreply.github.com> Date: Thu, 30 Nov 2023 11:23:18 +0100 Subject: [PATCH 01/11] add: Conifg warnings for FSM Nodes --- .../finite_state_machine/fsm.gd | 31 ++++++++++++++- .../finite_state_machine/fsm_state.gd | 15 ++++++++ .../fsm_state_integrated_bt.gd | 38 +++++++++++++++++-- .../fsm_state_integration_return.gd | 13 +++++++ .../finite_state_machine/fsm_transition.gd | 32 ++++++++++++++-- 5 files changed, 121 insertions(+), 8 deletions(-) diff --git a/addons/behaviour_toolkit/finite_state_machine/fsm.gd b/addons/behaviour_toolkit/finite_state_machine/fsm.gd index 3c70461..ed254ef 100644 --- a/addons/behaviour_toolkit/finite_state_machine/fsm.gd +++ b/addons/behaviour_toolkit/finite_state_machine/fsm.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/FiniteStateMachine.svg") class_name FiniteStateMachine extends BehaviourToolkit ## An implementation of a simple finite state machine. @@ -33,8 +34,10 @@ signal state_changed(state: FSMState) ## Whether the FSM is active or not. @export var active: bool = true ## The initial state of the FSM. -@export var initial_state: FSMState - +@export var initial_state: FSMState: + set(value): + initial_state = value + update_configuration_warnings() ## The actor of the FSM. @export var actor: Node ## The blackboard of the FSM. @@ -52,6 +55,12 @@ var current_bt_status: BTBehaviour.BTStatus func _ready() -> void: + # Don't run in editor + if Engine.is_editor_hint(): + set_physics_process(false) + set_process(false) + return + connect("state_changed", _on_state_changed) if blackboard == null: @@ -163,3 +172,21 @@ func _setup_processing() -> void: func _on_state_changed(state: FSMState) -> void: pass + + +func _get_configuration_warnings() -> PackedStringArray: + var warnings: Array = [] + + if not initial_state: + warnings.append("Initial state is not set.") + + var children: Array = get_children() + + if children.size() == 0: + warnings.append("No states found.") + + for child in children: + if not child is FSMState: + warnings.append("Node '" + child.get_name() + "' is not a FSMState.") + + return warnings diff --git a/addons/behaviour_toolkit/finite_state_machine/fsm_state.gd b/addons/behaviour_toolkit/finite_state_machine/fsm_state.gd index 9128f33..c95eb95 100644 --- a/addons/behaviour_toolkit/finite_state_machine/fsm_state.gd +++ b/addons/behaviour_toolkit/finite_state_machine/fsm_state.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/FSMState.svg") class_name FSMState extends BehaviourToolkit ## A state in a [FiniteStateMachine]. @@ -8,6 +9,10 @@ var transitions: Array[FSMTransition] = [] func _ready() -> void: + # Don't run in editor + if Engine.is_editor_hint(): + return + for transition in get_children(): if transition is FSMTransition: transitions.append(transition) @@ -26,3 +31,13 @@ func _on_update(_delta: float, _actor: Node, _blackboard: Blackboard) -> void: ## Executes before the state is exited. func _on_exit(_actor: Node, _blackboard: Blackboard) -> void: pass + + +func _get_configuration_warnings(): + var warnings = [] + + var parent: Node = get_parent() + if not parent is FiniteStateMachine: + warnings.append("FSMState should be a child of a FiniteStateMachine node.") + + return warnings diff --git a/addons/behaviour_toolkit/finite_state_machine/fsm_state_integrated_bt.gd b/addons/behaviour_toolkit/finite_state_machine/fsm_state_integrated_bt.gd index 0dfe27d..cde55fc 100644 --- a/addons/behaviour_toolkit/finite_state_machine/fsm_state_integrated_bt.gd +++ b/addons/behaviour_toolkit/finite_state_machine/fsm_state_integrated_bt.gd @@ -1,14 +1,20 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/FSMStateIntegration.svg") class_name FSMStateIntegratedBT extends FSMState - @onready var behaviour_tree: BTRoot = _get_behaviour_tree() -@export var fire_event_on_status: bool = false +@export var fire_event_on_status: bool = false: + set(value): + fire_event_on_status = value + update_configuration_warnings() @export var on_status: BTBehaviour.BTStatus = BTBehaviour.BTStatus.SUCCESS -@export var event: String +@export var event: String: + set(value): + event = value + update_configuration_warnings() ## Executes after the state is entered. @@ -29,6 +35,10 @@ func _on_exit(_actor: Node, _blackboard: Blackboard) -> void: func _get_behaviour_tree() -> BTRoot: + # Don't run in editor + if Engine.is_editor_hint(): + return null + if get_child_count() == 0: return null @@ -37,3 +47,25 @@ func _get_behaviour_tree() -> BTRoot: return child return null + +func _get_configuration_warnings() -> PackedStringArray: + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + var children: Array = get_children() + + var has_root: bool = false + for child in children: + if child is BTRoot: + has_root = true + elif not child is FSMTransition: + warnings.append("FSMStateIntegratedBT can only have BTRoot and FSMTransition children.") + + if not has_root: + warnings.append("FSMStateIntegratedBT must have a BTRoot child node.") + + if fire_event_on_status and event == "": + warnings.append("FSMStateIntegratedBT has fire_event_on_status enabled, but no event is set.") + + return warnings diff --git a/addons/behaviour_toolkit/finite_state_machine/fsm_state_integration_return.gd b/addons/behaviour_toolkit/finite_state_machine/fsm_state_integration_return.gd index ff0011b..049855e 100644 --- a/addons/behaviour_toolkit/finite_state_machine/fsm_state_integration_return.gd +++ b/addons/behaviour_toolkit/finite_state_machine/fsm_state_integration_return.gd @@ -22,3 +22,16 @@ func _on_update(_delta: float, _actor: Node, _blackboard: Blackboard) -> void: ## Executes before the state is exited. func _on_exit(_actor: Node, _blackboard: Blackboard) -> void: pass + + +func _get_configuration_warnings() -> PackedStringArray: + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + var fsm_parent: Node = get_parent().get_parent() + + if not fsm_parent is BTIntegratedFSM: + warnings.append("Can only return from a BTIntegratedFSM.") + + return warnings diff --git a/addons/behaviour_toolkit/finite_state_machine/fsm_transition.gd b/addons/behaviour_toolkit/finite_state_machine/fsm_transition.gd index 7971efe..97995f8 100644 --- a/addons/behaviour_toolkit/finite_state_machine/fsm_transition.gd +++ b/addons/behaviour_toolkit/finite_state_machine/fsm_transition.gd @@ -1,16 +1,26 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/FSMTransition.svg") class_name FSMTransition extends BehaviourToolkit ## A transition between two [FSMState]s in a [FiniteStateMachine]. ## The state to transition to. -@export var next_state: FSMState +@export var next_state: FSMState: + set(value): + next_state = value + update_configuration_warnings() @export_category("Transition Logic") ## If true, the FSM will check for the event to trigger the transition. -@export var use_event: bool = false +@export var use_event: bool = false: + set(value): + use_event = value + update_configuration_warnings() ## The event that triggers the transition. -@export var event: String = "" +@export var event: String = "": + set(value): + event = value + update_configuration_warnings() ## Executed when the transition is taken. @@ -33,3 +43,19 @@ func is_valid_event(current_event: String) -> bool: ## Returns which state to transition to, when valid. func get_next_state() -> FSMState: return next_state + + +func _get_configuration_warnings(): + var warnings = [] + + var parent: Node = get_parent() + if not parent is FSMState: + warnings.append("FSMTransition should be a child of FSMState.") + + if not next_state: + warnings.append("FSMTransition has no next state.") + + if use_event and event == "": + warnings.append("FSMTransition has no event set.") + + return warnings From 4a658cc9f962acaec462c1f03668ad9aa668bc56 Mon Sep 17 00:00:00 2001 From: Pat <27511950+ThePat02@users.noreply.github.com> Date: Fri, 1 Dec 2023 10:59:47 +0100 Subject: [PATCH 02/11] Squashed commit of the following: commit 1fa64e4efc5221c10b1dc0721a4096394b06c647 Author: Pat <27511950+ThePat02@users.noreply.github.com> Date: Fri Dec 1 10:59:01 2023 +0100 misc: Color coded folders commit 63e85ae0ed8466e47daa054eb7aae6ddf08386df Author: Pat <27511950+ThePat02@users.noreply.github.com> Date: Fri Dec 1 10:54:39 2023 +0100 Upgrade to Godot 4.2 --- addons/behaviour_toolkit/ui/toolkit_ui.tscn | 3 +-- examples/behaviour_example/NPCs/villager.tscn | 2 +- examples/behaviour_example/behaviour_example.tscn | 7 ++----- project.godot | 13 ++++++++++++- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/addons/behaviour_toolkit/ui/toolkit_ui.tscn b/addons/behaviour_toolkit/ui/toolkit_ui.tscn index d6568a8..a98b97e 100644 --- a/addons/behaviour_toolkit/ui/toolkit_ui.tscn +++ b/addons/behaviour_toolkit/ui/toolkit_ui.tscn @@ -1,5 +1,4 @@ -[gd_scene load_steps=37 format=3 uid="uid://o16emp4t4wb1"] - +[gd_scene load_steps=38 format=3 uid="uid://o16emp4t4wb1"] [ext_resource type="Script" path="res://addons/behaviour_toolkit/ui/toolkit_ui.gd" id="1_51rvx"] [ext_resource type="Texture2D" uid="uid://boof0yioplbqr" path="res://addons/behaviour_toolkit/icons/FSMState.svg" id="1_hqqj5"] diff --git a/examples/behaviour_example/NPCs/villager.tscn b/examples/behaviour_example/NPCs/villager.tscn index 12a82b9..4e588f1 100644 --- a/examples/behaviour_example/NPCs/villager.tscn +++ b/examples/behaviour_example/NPCs/villager.tscn @@ -160,10 +160,10 @@ ghost_state_machine = NodePath("Behaviour/Select/BeAGhost/BehaveLikeAGhost/Finit autostart = true [node name="AnimationPlayer" type="AnimationPlayer" parent="."] -playback_default_blend_time = 0.15 libraries = { "": SubResource("AnimationLibrary_bvcex") } +playback_default_blend_time = 0.15 [node name="Sprite2D" type="Sprite2D" parent="."] texture = ExtResource("2_p6pfm") diff --git a/examples/behaviour_example/behaviour_example.tscn b/examples/behaviour_example/behaviour_example.tscn index 1f4cb76..777f24a 100644 --- a/examples/behaviour_example/behaviour_example.tscn +++ b/examples/behaviour_example/behaviour_example.tscn @@ -13,8 +13,10 @@ tile_data = PackedInt32Array(0, 0, 4, 65536, 0, 5, 131072, 0, 6, 196608, 0, 6, 1 vertices = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)]) outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)]) +source_geometry_group_name = &"navigation_polygon_source_group" [sub_resource type="NavigationPolygon" id="NavigationPolygon_vjqsw"] +source_geometry_group_name = &"navigation_polygon_source_group" [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_1dtjq"] texture = ExtResource("1_sisj3") @@ -554,11 +556,6 @@ format = 2 layer_0/name = "Ground" layer_0/tile_data = PackedInt32Array(131072, 0, 0, 458752, 0, 0, 1310721, 0, 0, 393218, 65536, 2, 524290, 65536, 3, 327683, 65536, 2, 786435, 0, 0, 1048579, 0, 0, 917508, 0, 0, 983044, 0, 0, 786437, 0, 2, 1376261, 0, 2, 6, 0, 0, 458758, 65536, 2, 7, 0, 0, 524295, 327680, 3, 589831, 131072, 2, 655367, 131072, 2, 1114119, 131072, 2, 65544, 0, 0, 393225, 65536, 2, 1179657, 0, 0, 1245193, 0, 0, 1048586, 0, 0, 131084, 0, 0, 786445, 0, 0, 1310734, 0, 0, 1179663, 458752, 3, 851985, 65536, 0, 917521, 0, 0, 524306, 0, 0, 917522, 65536, 0, 983058, 0, 0, 1048594, 0, 0, 65555, 0, 0, 524307, 131072, 0, 786451, 0, 0, 1114131, 0, 0, 1179667, 0, 0, 1376275, 0, 0, 589844, 65536, 0, 983061, 0, 0, 65559, 0, 0, 786455, 0, 0, 917527, 0, 0, 24, 0, 0, 524313, 0, 2, 131098, 0, 0, 196634, 0, 0, 851994, 65536, 2, 1179674, 65536, 2, 65563, 0, 0, 458779, 65536, 2, 851995, 65536, 2, 1310747, 65536, 2, 851996, 131072, 2, 65565, 0, 0, 851997, 0, 0, 1310749, 65536, 2, 720926, 0, 0, 786462, 0, 0, 1048606, 65536, 1, 196639, 0, 0, 327711, 65536, 2, 851999, 0, 0, 1310751, 65536, 2, 131104, 0, 0, 0, 0, 0, 65536, 0, 0, 196608, 0, 0, 262144, 0, 0, 327680, 0, 0, 393216, 0, 0, 524288, 0, 0, 589824, 0, 0, 655360, 0, 0, 720896, 0, 0, 786432, 0, 0, 851968, 0, 0, 917504, 0, 0, 983040, 0, 0, 1048576, 0, 0, 1114112, 0, 0, 1179648, 0, 0, 1245184, 0, 0, 1310720, 131072, 0, 1376256, 0, 0, 1441792, 0, 0, 1507328, 0, 0, 1572864, 0, 0, 1638400, 0, 0, 1703936, 0, 0, 1769472, 0, 0, 1835008, 0, 0, 1, 0, 0, 65537, 0, 0, 131073, 0, 1, 196609, 0, 2, 262145, 0, 2, 327681, 0, 2, 393217, 0, 2, 458753, 0, 2, 524289, 0, 3, 589825, 0, 0, 655361, 0, 0, 720897, 0, 0, 786433, 0, 0, 851969, 0, 0, 917505, 0, 0, 983041, 0, 0, 1048577, 0, 0, 1114113, 0, 0, 1179649, 0, 0, 1245185, 0, 0, 1376257, 0, 0, 1441793, 0, 0, 1507329, 0, 0, 1572865, 0, 0, 1638401, 0, 0, 1703937, 0, 0, 1769473, 0, 0, 1835009, 0, 0, 2, 131072, 0, 65538, 0, 0, 131074, 65536, 1, 196610, 65536, 2, 262146, 65536, 2, 327682, 65536, 2, 458754, 65536, 2, 589826, 0, 0, 655362, 0, 0, 720898, 0, 0, 786434, 0, 0, 851970, 0, 0, 917506, 0, 0, 983042, 0, 0, 1048578, 0, 0, 1114114, 0, 0, 1179650, 0, 0, 1245186, 0, 0, 1310722, 0, 0, 1376258, 0, 0, 1441794, 0, 0, 1507330, 131072, 0, 1572866, 0, 0, 1638402, 131072, 0, 1703938, 0, 0, 1769474, 0, 0, 1835010, 0, 0, 3, 0, 0, 65539, 0, 0, 131075, 65536, 1, 196611, 65536, 2, 262147, 65536, 2, 393219, 65536, 2, 458755, 65536, 2, 524291, 65536, 3, 589827, 0, 0, 655363, 0, 0, 720899, 0, 0, 851971, 0, 0, 917507, 0, 0, 983043, 0, 0, 1114115, 0, 0, 1179651, 0, 0, 1245187, 0, 0, 1310723, 0, 0, 1376259, 0, 0, 1441795, 0, 0, 1507331, 0, 0, 1572867, 131072, 0, 1638403, 0, 0, 1703939, 0, 0, 1769475, 0, 0, 1835011, 0, 0, 4, 0, 0, 65540, 0, 0, 131076, 65536, 1, 196612, 65536, 2, 262148, 65536, 2, 327684, 65536, 2, 393220, 65536, 2, 458756, 65536, 2, 524292, 65536, 3, 589828, 131072, 0, 655364, 0, 0, 720900, 0, 0, 786436, 0, 0, 851972, 0, 0, 1048580, 0, 0, 1114116, 0, 0, 1179652, 0, 0, 1245188, 0, 0, 1310724, 0, 0, 1376260, 65536, 0, 1441796, 0, 0, 1507332, 0, 0, 1572868, 0, 0, 1638404, 0, 0, 1703940, 0, 0, 1769476, 0, 0, 1835012, 0, 0, 5, 0, 0, 65541, 0, 0, 131077, 65536, 1, 196613, 65536, 2, 262149, 65536, 2, 327685, 65536, 2, 393221, 65536, 2, 458757, 65536, 2, 524293, 393216, 3, 589829, 0, 2, 655365, 0, 2, 720901, 0, 2, 851973, 0, 2, 917509, 0, 2, 983045, 0, 2, 1048581, 0, 2, 1114117, 0, 2, 1179653, 0, 2, 1245189, 0, 2, 1310725, 0, 2, 1441797, 0, 2, 1507333, 0, 2, 1572869, 0, 2, 1638405, 0, 2, 1703941, 0, 2, 1769477, 0, 2, 1835013, 0, 2, 65542, 0, 0, 131078, 65536, 1, 196614, 65536, 2, 262150, 65536, 2, 327686, 65536, 2, 393222, 65536, 2, 524294, 65536, 2, 589830, 65536, 2, 655366, 65536, 2, 720902, 65536, 2, 786438, 65536, 2, 851974, 65536, 2, 917510, 65536, 2, 983046, 65536, 2, 1048582, 65536, 2, 1114118, 65536, 2, 1179654, 65536, 2, 1245190, 65536, 2, 1310726, 65536, 2, 1376262, 65536, 2, 1441798, 65536, 2, 1507334, 65536, 2, 1572870, 65536, 2, 1638406, 65536, 2, 1703942, 65536, 2, 1769478, 65536, 2, 1835014, 65536, 2, 65543, 0, 0, 131079, 65536, 1, 196615, 65536, 2, 262151, 65536, 2, 327687, 65536, 2, 393223, 65536, 2, 458759, 65536, 2, 720903, 131072, 2, 786439, 131072, 2, 851975, 131072, 2, 917511, 131072, 2, 983047, 131072, 2, 1048583, 131072, 2, 1179655, 131072, 2, 1245191, 131072, 2, 1310727, 131072, 2, 1376263, 131072, 2, 1441799, 131072, 2, 1507335, 131072, 2, 1572871, 131072, 2, 1638407, 131072, 2, 1703943, 131072, 2, 1769479, 131072, 2, 1835015, 131072, 2, 8, 0, 0, 131080, 65536, 1, 196616, 65536, 2, 262152, 65536, 2, 327688, 65536, 2, 393224, 65536, 2, 458760, 65536, 2, 524296, 65536, 3, 589832, 458752, 3, 655368, 0, 0, 720904, 131072, 0, 786440, 0, 0, 851976, 0, 0, 917512, 0, 0, 983048, 0, 0, 1048584, 0, 0, 1114120, 0, 0, 1179656, 0, 0, 1245192, 458752, 3, 1310728, 458752, 3, 1376264, 458752, 3, 1441800, 458752, 3, 1507336, 0, 0, 1572872, 0, 0, 1638408, 0, 0, 1703944, 0, 0, 1769480, 0, 0, 1835016, 131072, 0, 9, 131072, 0, 65545, 0, 0, 131081, 65536, 1, 196617, 65536, 2, 262153, 65536, 2, 327689, 65536, 2, 458761, 65536, 2, 786441, 0, 0, 851977, 65536, 0, 917513, 0, 0, 983049, 0, 0, 1048585, 0, 0, 1114121, 0, 0, 1310729, 458752, 3, 1376265, 458752, 3, 1441801, 458752, 3, 1507337, 65536, 0, 1572873, 0, 0, 1638409, 0, 0, 1703945, 0, 0, 1769481, 0, 0, 1835017, 65536, 0, 10, 0, 0, 65546, 0, 0, 131082, 65536, 1, 196618, 65536, 2, 262154, 65536, 2, 327690, 65536, 2, 393226, 65536, 2, 458762, 65536, 2, 786442, 65536, 0, 851978, 0, 0, 917514, 0, 0, 983050, 0, 0, 1114122, 0, 0, 1179658, 0, 0, 1245194, 0, 0, 1310730, 0, 0, 1376266, 458752, 3, 1441802, 458752, 3, 1507338, 0, 0, 1572874, 0, 0, 1638410, 0, 0, 1703946, 0, 0, 1769482, 0, 0, 1835018, 0, 0, 11, 0, 0, 65547, 0, 0, 131083, 131072, 1, 196619, 131072, 2, 262155, 262144, 3, 327691, 65536, 2, 393227, 327680, 3, 458763, 131072, 2, 786443, 131072, 0, 851979, 0, 0, 917515, 0, 0, 983051, 131072, 0, 1048587, 0, 0, 1114123, 65536, 0, 1179659, 0, 0, 1245195, 458752, 3, 1310731, 458752, 3, 1376267, 458752, 3, 1441803, 0, 0, 1507339, 0, 0, 1572875, 0, 0, 1638411, 0, 0, 1703947, 0, 0, 1769483, 0, 0, 1835019, 0, 0, 12, 0, 0, 65548, 0, 0, 196620, 0, 0, 262156, 65536, 1, 327692, 65536, 2, 393228, 65536, 3, 458764, 0, 0, 786444, 0, 0, 851980, 65536, 0, 917516, 0, 0, 983052, 0, 0, 1048588, 0, 0, 1114124, 0, 0, 1179660, 458752, 3, 1245196, 458752, 3, 1310732, 0, 0, 1376268, 0, 0, 1441804, 0, 0, 1507340, 0, 0, 1572876, 0, 0, 1638412, 0, 0, 1703948, 131072, 0, 1769484, 0, 0, 1835020, 0, 0, 13, 0, 0, 65549, 0, 0, 131085, 0, 0, 196621, 0, 0, 262157, 65536, 1, 327693, 65536, 2, 393229, 65536, 3, 458765, 0, 0, 851981, 0, 0, 917517, 0, 0, 983053, 0, 0, 1048589, 0, 0, 1114125, 0, 0, 1179661, 458752, 3, 1245197, 0, 0, 1310733, 0, 0, 1376269, 0, 0, 1441805, 0, 0, 1507341, 0, 0, 1572877, 0, 0, 1638413, 0, 0, 1703949, 131072, 0, 1769485, 131072, 0, 1835021, 0, 0, 14, 0, 0, 65550, 0, 0, 131086, 0, 0, 196622, 0, 0, 262158, 65536, 1, 327694, 65536, 2, 393230, 65536, 3, 458766, 0, 0, 786446, 0, 0, 851982, 0, 0, 917518, 0, 0, 983054, 0, 0, 1048590, 0, 0, 1114126, 0, 0, 1179662, 458752, 3, 1245198, 0, 0, 1376270, 0, 0, 1441806, 0, 0, 1507342, 0, 0, 1572878, 0, 0, 1638414, 0, 0, 1703950, 0, 0, 1769486, 0, 0, 1835022, 0, 0, 15, 0, 0, 65551, 0, 0, 131087, 0, 0, 196623, 131072, 0, 262159, 65536, 1, 327695, 65536, 2, 393231, 65536, 3, 458767, 0, 0, 786447, 0, 0, 851983, 0, 0, 917519, 0, 0, 983055, 0, 0, 1048591, 0, 0, 1114127, 0, 0, 1245199, 458752, 3, 1310735, 0, 0, 1376271, 0, 0, 1441807, 0, 0, 1507343, 0, 0, 1572879, 65536, 0, 1638415, 0, 0, 1703951, 0, 0, 1769487, 65536, 0, 1835023, 0, 0, 16, 0, 0, 65552, 0, 0, 131088, 0, 0, 196624, 0, 0, 262160, 65536, 1, 327696, 65536, 2, 393232, 65536, 3, 458768, 131072, 0, 524304, 0, 0, 589840, 0, 0, 655376, 0, 0, 720912, 0, 0, 786448, 0, 0, 851984, 0, 0, 917520, 65536, 0, 983056, 131072, 0, 1048592, 131072, 0, 1114128, 131072, 0, 1179664, 0, 0, 1245200, 458752, 3, 1310736, 458752, 3, 1376272, 0, 0, 1441808, 0, 0, 1507344, 65536, 0, 1572880, 0, 0, 1638416, 0, 0, 1703952, 0, 0, 1769488, 0, 0, 1835024, 0, 0, 17, 0, 0, 65553, 0, 0, 131089, 0, 0, 196625, 0, 0, 262161, 65536, 1, 327697, 65536, 2, 393233, 65536, 3, 458769, 0, 0, 524305, 0, 0, 589841, 0, 0, 655377, 0, 0, 720913, 0, 0, 786449, 0, 0, 983057, 0, 0, 1048593, 0, 0, 1114129, 0, 0, 1179665, 0, 0, 1245201, 0, 0, 1310737, 458752, 3, 1376273, 0, 0, 1441809, 0, 0, 1507345, 0, 0, 1572881, 0, 0, 1638417, 0, 0, 1703953, 0, 0, 1769489, 458752, 3, 1835025, 458752, 3, 18, 0, 0, 65554, 0, 0, 131090, 0, 0, 196626, 0, 0, 262162, 65536, 1, 327698, 65536, 2, 393234, 65536, 3, 458770, 0, 0, 589842, 0, 0, 655378, 0, 0, 720914, 0, 0, 786450, 0, 0, 851986, 131072, 0, 1114130, 0, 0, 1179666, 65536, 0, 1245202, 65536, 0, 1310738, 458752, 3, 1376274, 0, 0, 1441810, 0, 0, 1507346, 0, 0, 1572882, 0, 0, 1638418, 0, 0, 1703954, 0, 0, 1769490, 458752, 3, 1835026, 458752, 3, 19, 0, 0, 131091, 0, 0, 196627, 131072, 0, 262163, 65536, 1, 327699, 65536, 2, 393235, 65536, 3, 458771, 0, 0, 589843, 0, 0, 655379, 0, 0, 720915, 0, 0, 851987, 0, 0, 917523, 0, 0, 983059, 0, 0, 1048595, 65536, 0, 1245203, 0, 0, 1310739, 458752, 3, 1441811, 0, 0, 1507347, 65536, 0, 1572883, 0, 0, 1638419, 0, 0, 1703955, 458752, 3, 1769491, 458752, 3, 1835027, 458752, 3, 20, 0, 0, 65556, 0, 0, 131092, 0, 0, 196628, 65536, 0, 262164, 65536, 1, 327700, 65536, 2, 393236, 65536, 3, 458772, 0, 0, 524308, 0, 0, 655380, 0, 0, 720916, 65536, 0, 786452, 0, 0, 851988, 0, 0, 917524, 0, 0, 983060, 0, 0, 1048596, 0, 0, 1114132, 0, 0, 1179668, 0, 0, 1245204, 0, 0, 1310740, 458752, 3, 1376276, 0, 0, 1441812, 0, 0, 1507348, 0, 0, 1572884, 458752, 3, 1638420, 458752, 3, 1703956, 458752, 3, 1769492, 458752, 3, 1835028, 458752, 3, 21, 0, 0, 65557, 0, 0, 131093, 0, 0, 196629, 65536, 0, 262165, 65536, 1, 327701, 65536, 2, 393237, 65536, 3, 458773, 0, 0, 524309, 0, 0, 589845, 0, 0, 655381, 131072, 0, 720917, 0, 0, 786453, 0, 0, 851989, 0, 0, 917525, 0, 0, 1048597, 0, 0, 1114133, 0, 0, 1179669, 0, 0, 1245205, 0, 0, 1310741, 458752, 3, 1376277, 0, 0, 1441813, 0, 0, 1507349, 0, 0, 1572885, 458752, 3, 1638421, 0, 0, 1703957, 65536, 0, 1769493, 0, 0, 1835029, 458752, 3, 22, 0, 0, 65558, 0, 0, 131094, 0, 0, 196630, 0, 0, 262166, 65536, 1, 327702, 65536, 2, 393238, 65536, 3, 458774, 0, 0, 524310, 0, 0, 589846, 0, 0, 655382, 0, 0, 720918, 0, 0, 786454, 131072, 0, 851990, 0, 0, 917526, 0, 0, 983062, 0, 0, 1048598, 131072, 0, 1114134, 131072, 0, 1179670, 0, 0, 1245206, 458752, 3, 1310742, 458752, 3, 1376278, 0, 0, 1441814, 0, 0, 1507350, 458752, 3, 1572886, 458752, 3, 1638422, 0, 0, 1703958, 0, 0, 1769494, 0, 0, 1835030, 0, 0, 23, 0, 0, 131095, 131072, 0, 196631, 65536, 0, 262167, 65536, 1, 327703, 65536, 2, 393239, 65536, 3, 458775, 0, 0, 524311, 0, 0, 589847, 0, 0, 655383, 0, 0, 720919, 0, 0, 851991, 0, 0, 983063, 0, 0, 1048599, 0, 1, 1114135, 0, 2, 1179671, 0, 2, 1245207, 0, 2, 1310743, 0, 2, 1376279, 0, 2, 1441815, 0, 2, 1507351, 0, 3, 1572887, 458752, 3, 1638423, 0, 0, 1703959, 0, 0, 1769495, 0, 0, 1835031, 0, 0, 65560, 0, 0, 131096, 0, 0, 196632, 0, 0, 262168, 65536, 1, 327704, 65536, 2, 393240, 65536, 3, 458776, 0, 0, 524312, 0, 0, 589848, 0, 0, 655384, 131072, 0, 720920, 0, 0, 786456, 65536, 0, 851992, 65536, 0, 917528, 131072, 0, 983064, 0, 0, 1048600, 65536, 1, 1114136, 65536, 2, 1179672, 65536, 2, 1245208, 65536, 2, 1310744, 65536, 2, 1376280, 65536, 2, 1441816, 65536, 2, 1507352, 65536, 3, 1572888, 0, 0, 1638424, 0, 0, 1703960, 0, 0, 1769496, 0, 0, 1835032, 0, 0, 25, 0, 0, 65561, 0, 0, 131097, 0, 0, 196633, 0, 0, 262169, 65536, 1, 327705, 65536, 2, 393241, 393216, 3, 458777, 0, 2, 589849, 0, 2, 655385, 0, 2, 720921, 0, 2, 786457, 0, 2, 851993, 0, 2, 917529, 0, 2, 983065, 0, 2, 1048601, 196608, 3, 1114137, 65536, 2, 1179673, 65536, 2, 1245209, 65536, 2, 1310745, 65536, 2, 1376281, 65536, 2, 1441817, 65536, 2, 1507353, 65536, 3, 1572889, 0, 0, 1638425, 0, 0, 1703961, 0, 0, 1769497, 0, 0, 1835033, 0, 0, 26, 0, 0, 65562, 65536, 0, 262170, 65536, 1, 327706, 65536, 2, 393242, 65536, 2, 458778, 65536, 2, 524314, 65536, 2, 589850, 65536, 2, 655386, 65536, 2, 720922, 65536, 2, 786458, 65536, 2, 917530, 65536, 2, 983066, 65536, 2, 1048602, 65536, 2, 1114138, 65536, 2, 1245210, 65536, 2, 1310746, 65536, 2, 1376282, 65536, 2, 1441818, 65536, 2, 1507354, 65536, 3, 1572890, 458752, 3, 1638426, 0, 0, 1703962, 0, 0, 1769498, 0, 0, 1835034, 0, 0, 27, 0, 0, 131099, 0, 0, 196635, 0, 0, 262171, 65536, 1, 327707, 65536, 2, 393243, 65536, 2, 524315, 65536, 2, 589851, 65536, 2, 655387, 65536, 2, 720923, 65536, 2, 786459, 65536, 2, 917531, 65536, 2, 983067, 65536, 2, 1048603, 65536, 2, 1114139, 65536, 2, 1179675, 65536, 2, 1245211, 65536, 2, 1376283, 65536, 2, 1441819, 65536, 2, 1507355, 65536, 3, 1572891, 458752, 3, 1638427, 458752, 3, 1703963, 458752, 3, 1769499, 458752, 3, 1835035, 0, 0, 28, 0, 0, 65564, 0, 0, 131100, 0, 0, 196636, 0, 0, 262172, 65536, 1, 327708, 65536, 2, 393244, 327680, 3, 458780, 131072, 2, 524316, 131072, 2, 589852, 131072, 2, 655388, 131072, 2, 720924, 131072, 2, 786460, 131072, 2, 917532, 131072, 2, 983068, 131072, 2, 1048604, 262144, 3, 1114140, 65536, 2, 1179676, 65536, 2, 1245212, 65536, 2, 1310748, 65536, 2, 1376284, 65536, 2, 1441820, 65536, 2, 1507356, 65536, 3, 1572892, 458752, 3, 1638428, 458752, 3, 1703964, 0, 0, 1769500, 458752, 3, 1835036, 458752, 3, 29, 0, 0, 131101, 0, 0, 196637, 131072, 0, 262173, 65536, 1, 327709, 65536, 2, 393245, 65536, 3, 458781, 0, 0, 524317, 0, 0, 589853, 0, 0, 655389, 0, 0, 720925, 0, 0, 786461, 0, 0, 917533, 0, 0, 983069, 0, 0, 1048605, 65536, 1, 1114141, 65536, 2, 1179677, 65536, 2, 1245213, 65536, 2, 1376285, 65536, 2, 1441821, 65536, 2, 1507357, 65536, 3, 1572893, 0, 0, 1638429, 0, 0, 1703965, 65536, 0, 1769501, 65536, 0, 1835037, 458752, 3, 30, 0, 0, 65566, 131072, 0, 131102, 0, 0, 196638, 0, 0, 262174, 65536, 1, 327710, 65536, 2, 393246, 65536, 3, 458782, 0, 0, 524318, 0, 0, 589854, 0, 0, 655390, 0, 0, 851998, 0, 0, 917534, 0, 0, 983070, 131072, 0, 1114142, 65536, 2, 1179678, 65536, 2, 1245214, 65536, 2, 1310750, 65536, 2, 1376286, 65536, 2, 1441822, 65536, 2, 1507358, 65536, 3, 1572894, 0, 0, 1638430, 0, 0, 1703966, 0, 0, 1769502, 0, 0, 1835038, 458752, 3, 31, 131072, 0, 65567, 0, 0, 131103, 0, 0, 262175, 65536, 1, 393247, 65536, 3, 458783, 0, 0, 524319, 0, 0, 589855, 0, 0, 655391, 0, 0, 720927, 0, 0, 786463, 0, 0, 917535, 0, 0, 983071, 0, 0, 1048607, 65536, 1, 1114143, 65536, 2, 1179679, 65536, 2, 1245215, 65536, 2, 1376287, 65536, 2, 1441823, 65536, 2, 1507359, 65536, 3, 1572895, 0, 0, 1638431, 0, 0, 1703967, 131072, 0, 1769503, 0, 0, 1835039, 458752, 3, 32, 0, 0, 65568, 0, 0, 196640, 0, 0, 262176, 65536, 1, 327712, 65536, 2, 393248, 65536, 3, 458784, 0, 0, 524320, 0, 0, 589856, 0, 0, 655392, 0, 0, 720928, 0, 0, 786464, 0, 0, 852000, 0, 0, 917536, 0, 0, 983072, 0, 0, 1048608, 65536, 1, 1114144, 65536, 2, 1179680, 65536, 2, 1245216, 65536, 2, 1310752, 65536, 2, 1376288, 65536, 2, 1441824, 65536, 2, 1507360, 65536, 3, 1572896, 0, 0, 1638432, 0, 0, 1703968, 0, 0, 1769504, 0, 0, 1835040, 65536, 0, 33, 0, 0, 65569, 65536, 0, 131105, 0, 0, 196641, 0, 0, 262177, 65536, 1, 327713, 65536, 2, 393249, 65536, 3, 458785, 0, 0, 524321, 0, 0, 589857, 0, 0, 655393, 0, 0, 720929, 0, 0, 786465, 0, 0, 852001, 0, 0, 917537, 0, 0, 983073, 65536, 0, 1048609, 131072, 1, 1114145, 131072, 2, 1179681, 131072, 2, 1245217, 131072, 2, 1310753, 131072, 2, 1376289, 131072, 2, 1441825, 131072, 2, 1507361, 131072, 3, 1572897, 0, 0, 1638433, 0, 0, 1703969, 0, 0, 1769505, 0, 0, 1835041, 65536, 0, 34, 0, 0, 65570, 0, 0, 131106, 0, 0, 196642, 0, 0, 262178, 65536, 1, 327714, 65536, 2, 393250, 65536, 3, 458786, 0, 0, 524322, 0, 0, 589858, 0, 0, 655394, 0, 0, 720930, 0, 0, 786466, 0, 0, 852002, 0, 0, 917538, 0, 0, 983074, 0, 0, 1048610, 0, 0, 1114146, 0, 0, 1179682, 0, 0, 1245218, 131072, 0, 1310754, 0, 0, 1376290, 0, 0, 1441826, 0, 0, 1507362, 0, 0, 1572898, 65536, 0, 1638434, 0, 0, 1703970, 0, 0, 1769506, 0, 0, 1835042, 458752, 3, 35, 0, 0, 65571, 0, 0, 131107, 0, 0, 196643, 131072, 0, 262179, 65536, 1, 327715, 65536, 2, 393251, 65536, 3, 458787, 0, 0, 524323, 0, 0, 589859, 0, 0, 655395, 0, 0, 720931, 0, 0, 786467, 0, 0, 852003, 0, 0, 917539, 0, 0, 983075, 0, 0, 1048611, 0, 0, 1114147, 0, 0, 1179683, 0, 0, 1245219, 0, 0, 1310755, 0, 0, 1376291, 0, 0, 1441827, 0, 0, 1507363, 0, 0, 1572899, 0, 0, 1638435, 0, 0, 1703971, 0, 0, 1769507, 0, 0, 1835043, 458752, 3, 36, 0, 0, 65572, 0, 0, 131108, 0, 0, 196644, 0, 0, 262180, 65536, 1, 327716, 65536, 2, 393252, 65536, 3, 458788, 0, 0, 524324, 0, 0, 589860, 0, 0, 655396, 0, 0, 720932, 0, 0, 786468, 0, 0, 852004, 0, 0, 917540, 0, 0, 983076, 0, 0, 1048612, 0, 0, 1114148, 0, 0, 1179684, 0, 0, 1245220, 0, 0, 1310756, 0, 0, 1376292, 0, 0, 1441828, 0, 0, 1507364, 131072, 0, 1572900, 131072, 0, 1638436, 0, 0, 1703972, 458752, 3, 1769508, 458752, 3, 1835044, 458752, 3, 37, 0, 0, 65573, 0, 0, 131109, 0, 0, 196645, 0, 0, 262181, 65536, 1, 327717, 65536, 2, 393253, 65536, 3, 458789, 0, 0, 524325, 0, 0, 589861, 0, 0, 655397, 0, 0, 720933, 0, 0, 786469, 0, 0, 852005, 0, 0, 917541, 0, 0, 983077, 0, 0, 1048613, 0, 0, 1114149, 0, 0, 1179685, 0, 0, 1245221, 0, 0, 1310757, 0, 0, 1376293, 0, 0, 1441829, 0, 0, 1507365, 0, 0, 1572901, 458752, 3, 1638437, 458752, 3, 1703973, 458752, 3, 1769509, 65536, 0, 1835045, 0, 0, 38, 0, 0, 65574, 131072, 0, 131110, 0, 0, 196646, 0, 0, 262182, 65536, 1, 327718, 65536, 2, 393254, 65536, 3, 458790, 0, 0, 524326, 0, 0, 589862, 0, 0, 655398, 0, 0, 720934, 0, 0, 786470, 0, 0, 852006, 0, 0, 917542, 0, 0, 983078, 0, 0, 1048614, 0, 0, 1114150, 0, 0, 1179686, 0, 0, 1245222, 0, 0, 1310758, 0, 0, 1376294, 458752, 3, 1441830, 458752, 3, 1507366, 458752, 3, 1572902, 458752, 3, 1638438, 0, 0, 1703974, 458752, 3, 1769510, 0, 0, 1835046, 0, 0, 39, 0, 0, 65575, 0, 0, 131111, 0, 0, 196647, 0, 0, 262183, 65536, 1, 327719, 65536, 2, 393255, 65536, 3, 458791, 0, 0, 524327, 0, 0, 589863, 65536, 0, 655399, 0, 0, 720935, 0, 0, 786471, 0, 0, 852007, 131072, 0, 917543, 0, 0, 983079, 0, 0, 1048615, 0, 0, 1114151, 0, 0, 1179687, 0, 0, 1245223, 0, 0, 1310759, 458752, 3, 1376295, 458752, 3, 1441831, 0, 0, 1507367, 0, 0, 1572903, 0, 0, 1638439, 0, 0, 1703975, 458752, 3, 1769511, 458752, 3, 1835047, 0, 0, 40, 0, 0, 65576, 0, 0, 131112, 0, 0, 196648, 0, 0, 262184, 65536, 1, 327720, 65536, 2, 393256, 65536, 3, 458792, 0, 0, 524328, 0, 0, 589864, 65536, 0, 655400, 0, 0, 720936, 0, 0, 786472, 0, 0, 852008, 0, 0, 917544, 0, 0, 983080, 131072, 0, 1048616, 0, 0, 1114152, 0, 0, 1179688, 0, 0, 1245224, 458752, 3, 1310760, 458752, 3, 1376296, 0, 0, 1441832, 0, 0, 1507368, 0, 0, 1572904, 0, 0, 1638440, 0, 0, 1703976, 0, 0, 1769512, 458752, 3, 1835048, 458752, 3, 41, 0, 0, 65577, 0, 0, 131113, 0, 0, 196649, 131072, 0, 262185, 65536, 1, 327721, 65536, 2, 393257, 65536, 3, 458793, 0, 0, 524329, 0, 0, 589865, 0, 0, 655401, 0, 0, 720937, 131072, 0, 786473, 0, 0, 852009, 0, 0, 917545, 65536, 0, 983081, 0, 0, 1048617, 0, 0, 1114153, 65536, 0, 1179689, 0, 0, 1245225, 458752, 3, 1310761, 0, 0, 1376297, 0, 0, 1441833, 0, 0, 1507369, 0, 0, 1572905, 0, 0, 1638441, 0, 0, 1703977, 0, 0, 1769513, 0, 0, 1835049, 458752, 3, 42, 0, 0, 65578, 0, 0, 131114, 0, 0, 196650, 131072, 0, 262186, 65536, 1, 327722, 65536, 2, 393258, 65536, 3, 458794, 0, 0, 524330, 0, 1, 589866, 0, 2, 655402, 0, 2, 720938, 0, 2, 786474, 0, 2, 852010, 0, 3, 917546, 0, 0, 983082, 0, 0, 1048618, 0, 0, 1114154, 0, 0, 1179690, 0, 0, 1245226, 458752, 3, 1310762, 0, 0, 1376298, 0, 0, 1441834, 0, 0, 1507370, 0, 0, 1572906, 65536, 0, 1638442, 0, 0, 1703978, 458752, 3, 1769514, 458752, 3, 1835050, 458752, 3, 43, 0, 0, 65579, 0, 0, 131115, 0, 0, 196651, 0, 0, 262187, 65536, 1, 327723, 65536, 2, 393259, 65536, 3, 458795, 0, 0, 524331, 65536, 1, 589867, 65536, 2, 655403, 65536, 2, 720939, 65536, 2, 786475, 65536, 2, 852011, 65536, 3, 917547, 0, 0, 983083, 65536, 0, 1048619, 0, 0, 1114155, 0, 0, 1179691, 458752, 3, 1245227, 458752, 3, 1310763, 458752, 3, 1376299, 0, 0, 1441835, 0, 0, 1507371, 0, 0, 1572907, 0, 0, 1638443, 458752, 3, 1703979, 458752, 3, 1769515, 458752, 3, 1835051, 458752, 3, 44, 0, 0, 65580, 0, 0, 131116, 0, 0, 196652, 0, 0, 262188, 65536, 1, 327724, 65536, 2, 393260, 65536, 3, 458796, 0, 0, 524332, 65536, 1, 589868, 65536, 2, 655404, 65536, 2, 720940, 65536, 2, 786476, 65536, 2, 852012, 393216, 3, 917548, 0, 2, 983084, 0, 2, 1048620, 0, 2, 1114156, 0, 2, 1179692, 0, 2, 1245228, 0, 3, 1310764, 458752, 3, 1376300, 0, 0, 1441836, 0, 0, 1507372, 0, 0, 1572908, 0, 0, 1638444, 458752, 3, 1703980, 458752, 3, 1769516, 458752, 3, 1835052, 458752, 3, 45, 0, 0, 65581, 131072, 0, 131117, 0, 0, 196653, 0, 0, 262189, 65536, 1, 327725, 65536, 2, 393261, 393216, 3, 458797, 0, 2, 524333, 196608, 3, 589869, 65536, 2, 655405, 65536, 2, 720941, 65536, 2, 786477, 65536, 2, 852013, 65536, 2, 917549, 65536, 2, 983085, 65536, 2, 1048621, 65536, 2, 1114157, 65536, 2, 1179693, 65536, 2, 1245229, 65536, 3, 1310765, 0, 0, 1376301, 0, 0, 1441837, 0, 0, 1507373, 0, 0, 1572909, 0, 0, 1638445, 0, 0, 1703981, 0, 0, 1769517, 0, 0, 1835053, 0, 0, 46, 0, 0, 65582, 0, 0, 131118, 0, 0, 196654, 0, 0, 262190, 65536, 1, 327726, 65536, 2, 393262, 65536, 2, 458798, 65536, 2, 524334, 65536, 2, 589870, 65536, 2, 655406, 65536, 2, 720942, 65536, 2, 786478, 65536, 2, 852014, 327680, 3, 917550, 131072, 2, 983086, 131072, 2, 1048622, 131072, 2, 1114158, 262144, 3, 1179694, 65536, 2, 1245230, 65536, 3, 1310766, 0, 0, 1376302, 0, 0, 1441838, 0, 0, 1507374, 0, 0, 1572910, 0, 0, 1638446, 0, 0, 1703982, 0, 0, 1769518, 0, 0, 1835054, 0, 0, 47, 131072, 0, 65583, 0, 0, 131119, 0, 0, 196655, 0, 0, 262191, 131072, 1, 327727, 131072, 2, 393263, 131072, 2, 458799, 131072, 2, 524335, 262144, 3, 589871, 65536, 2, 655407, 65536, 2, 720943, 65536, 2, 786479, 65536, 2, 852015, 65536, 3, 917551, 0, 0, 983087, 0, 0, 1048623, 0, 0, 1114159, 65536, 1, 1179695, 65536, 2, 1245231, 65536, 3, 1310767, 0, 0, 1376303, 0, 0, 1441839, 0, 0, 1507375, 0, 0, 1572911, 0, 0, 1638447, 0, 0, 1703983, 0, 0, 1769519, 0, 0, 1835055, 131072, 0, 48, 0, 0, 65584, 0, 0, 131120, 0, 0, 196656, 0, 0, 262192, 0, 0, 327728, 0, 0, 393264, 65536, 0, 458800, 131072, 0, 524336, 65536, 1, 589872, 65536, 2, 655408, 65536, 2, 720944, 65536, 2, 786480, 65536, 2, 852016, 65536, 3, 917552, 0, 0, 983088, 0, 0, 1048624, 0, 0, 1114160, 65536, 1, 1179696, 65536, 2, 1245232, 65536, 3, 1310768, 0, 0, 1376304, 0, 0, 1441840, 0, 0, 1507376, 0, 0, 1572912, 0, 0, 1638448, 0, 0, 1703984, 0, 0, 1769520, 0, 0, 1835056, 0, 0, 49, 131072, 0, 65585, 0, 0, 131121, 0, 0, 196657, 0, 0, 262193, 0, 0, 327729, 0, 0, 393265, 0, 0, 458801, 0, 0, 524337, 65536, 1, 589873, 65536, 2, 655409, 65536, 2, 720945, 65536, 2, 786481, 65536, 2, 852017, 65536, 3, 917553, 0, 0, 983089, 0, 0, 1048625, 0, 0, 1114161, 65536, 1, 1179697, 65536, 2, 1245233, 393216, 3, 1310769, 0, 2, 1376305, 0, 2, 1441841, 0, 2, 1507377, 0, 2, 1572913, 0, 2, 1638449, 0, 2, 1703985, 0, 2, 1769521, 0, 2, 1835057, 0, 2, 50, 0, 0, 65586, 0, 0, 131122, 131072, 0, 196658, 0, 0, 262194, 0, 0, 327730, 0, 0, 393266, 0, 0, 458802, 0, 0, 524338, 65536, 1, 589874, 65536, 2, 655410, 65536, 2, 720946, 65536, 2, 786482, 65536, 2, 852018, 65536, 3, 917554, 0, 0, 983090, 0, 0, 1048626, 0, 0, 1114162, 65536, 1, 1179698, 65536, 2, 1245234, 65536, 2, 1310770, 65536, 2, 1376306, 65536, 2, 1441842, 65536, 2, 1507378, 65536, 2, 1572914, 65536, 2, 1638450, 65536, 2, 1703986, 65536, 2, 1769522, 65536, 2, 1835058, 65536, 2, 51, 0, 0, 65587, 0, 0, 131123, 0, 0, 196659, 0, 0, 262195, 0, 0, 327731, 0, 0, 393267, 0, 0, 458803, 0, 0, 524339, 131072, 1, 589875, 131072, 2, 655411, 131072, 2, 720947, 131072, 2, 786483, 131072, 2, 852019, 131072, 3, 917555, 0, 0, 983091, 0, 0, 1048627, 0, 0, 1114163, 131072, 1, 1179699, 131072, 2, 1245235, 131072, 2, 1310771, 131072, 2, 1376307, 131072, 2, 1441843, 131072, 2, 1507379, 131072, 2, 1572915, 131072, 2, 1638451, 131072, 2, 1703987, 131072, 2, 1769523, 131072, 2, 1835059, 131072, 2, 52, 0, 0, 65588, 0, 0, 131124, 0, 0, 196660, 0, 0, 262196, 0, 0, 327732, 0, 0, 393268, 0, 0, 458804, 0, 0, 524340, 0, 0, 589876, 0, 0, 655412, 0, 0, 720948, 65536, 0, 786484, 0, 0, 852020, 0, 0, 917556, 0, 0, 983092, 131072, 0, 1048628, 131072, 0, 1114164, 0, 0, 1179700, 0, 0, 1245236, 0, 0, 1310772, 65536, 0, 1376308, 0, 0, 1441844, 0, 0, 1507380, 0, 0, 1572916, 0, 0, 1638452, 0, 0, 1703988, 0, 0, 1769524, 0, 0, 1835060, 0, 0, 53, 65536, 0, 65589, 0, 0, 131125, 0, 0, 196661, 0, 0, 262197, 0, 0, 327733, 65536, 0, 393269, 0, 0, 458805, 0, 0, 524341, 0, 0, 589877, 0, 0, 655413, 0, 0, 720949, 0, 0, 786485, 0, 0, 852021, 0, 0, 917557, 0, 0, 983093, 0, 0, 1048629, 0, 0, 1114165, 0, 0, 1179701, 0, 0, 1245237, 0, 0, 1310773, 0, 0, 1376309, 131072, 0, 1441845, 0, 0, 1507381, 131072, 0, 1572917, 0, 0, 1638453, 0, 0, 1703989, 0, 0, 1769525, 0, 0, 1835061, 0, 0, 54, 65536, 0, 65590, 0, 0, 131126, 0, 0, 196662, 0, 0, 262198, 0, 0, 327734, 0, 0, 393270, 0, 0, 458806, 0, 0, 524342, 0, 0, 589878, 0, 0, 655414, 0, 0, 720950, 0, 0, 786486, 0, 0, 852022, 0, 0, 917558, 0, 0, 983094, 0, 0, 1048630, 0, 0, 1114166, 0, 0, 1179702, 0, 0, 1245238, 0, 0, 1310774, 65536, 0, 1376310, 0, 0, 1441846, 0, 0, 1507382, 0, 0, 1572918, 0, 0, 1638454, 0, 0, 1703990, 0, 0, 1769526, 131072, 0, 1835062, 0, 0, 55, 0, 0, 65591, 0, 0, 131127, 0, 0, 196663, 0, 0, 262199, 0, 0, 327735, 0, 0, 393271, 0, 0, 458807, 0, 0, 524343, 0, 0, 589879, 0, 0, 655415, 0, 0, 720951, 0, 0, 786487, 0, 0, 852023, 0, 0, 917559, 0, 0, 983095, 0, 0, 1048631, 0, 0, 1114167, 0, 0, 1179703, 0, 0, 1245239, 65536, 0, 1310775, 0, 0, 1376311, 0, 0, 1441847, 0, 0, 1507383, 0, 0, 1572919, 0, 0, 1638455, 0, 0, 1703991, 0, 0, 1769527, 0, 0, 1835063, 0, 0, 56, 0, 0, 65592, 0, 0, 131128, 0, 0, 196664, 0, 0, 262200, 0, 0, 327736, 0, 0, 393272, 0, 0, 458808, 0, 0, 524344, 0, 0, 589880, 0, 0, 655416, 0, 0, 720952, 131072, 0, 786488, 0, 0, 852024, 0, 0, 917560, 0, 0, 983096, 0, 0, 1048632, 0, 0, 1114168, 0, 0, 1179704, 65536, 0, 1245240, 0, 0, 1310776, 0, 0, 1376312, 0, 0, 1441848, 0, 0, 1507384, 0, 0, 1572920, 0, 0, 1638456, 65536, 0, 1703992, 0, 0, 1769528, 0, 0, 1835064, 0, 0, 57, 0, 0, 65593, 0, 0, 131129, 0, 0, 196665, 0, 0, 262201, 0, 0, 327737, 0, 0, 393273, 0, 0, 458809, 0, 0, 524345, 0, 0, 589881, 0, 0, 655417, 0, 0, 720953, 0, 0, 786489, 0, 0, 852025, 0, 0, 917561, 0, 0, 983097, 0, 0, 1048633, 0, 0, 1114169, 0, 0, 1179705, 0, 0, 1245241, 0, 0, 1310777, 0, 0, 1376313, 65536, 0, 1441849, 0, 0, 1507385, 65536, 0, 1572921, 0, 0, 1638457, 65536, 0, 1703993, 0, 0, 1769529, 0, 0, 1835065, 0, 0, 58, 0, 0, 65594, 0, 0, 131130, 0, 0, 196666, 0, 0, 262202, 0, 0, 327738, 0, 0, 393274, 0, 0, 458810, 0, 0, 524346, 0, 0, 589882, 0, 0, 655418, 0, 0, 720954, 0, 0, 786490, 0, 0, 852026, 0, 0, 917562, 0, 0, 983098, 0, 0, 1048634, 0, 0, 1114170, 0, 0, 1179706, 0, 0, 1245242, 0, 0, 1310778, 65536, 0, 1376314, 0, 0, 1441850, 0, 0, 1507386, 0, 0, 1572922, 131072, 0, 1638458, 0, 0, 1703994, 0, 0, 1769530, 0, 0, 1835066, 0, 0, 59, 0, 0, 65595, 0, 0, 131131, 0, 0, 196667, 0, 0, 262203, 0, 0, 327739, 0, 0, 393275, 0, 0, 458811, 0, 0, 524347, 0, 0, 589883, 0, 0, 655419, 0, 0, 720955, 0, 0, 786491, 0, 0, 852027, 0, 0, 917563, 0, 0, 983099, 0, 0, 1048635, 0, 0, 1114171, 0, 0, 1179707, 0, 0, 1245243, 0, 0, 1310779, 0, 0, 1376315, 0, 0, 1441851, 0, 0, 1507387, 0, 0, 1572923, 0, 0, 1638459, 0, 0, 1703995, 0, 0, 1769531, 0, 0, 1835067, 0, 0, 60, 0, 0, 65596, 0, 0, 131132, 0, 0, 196668, 0, 0, 262204, 0, 0, 327740, 65536, 0, 393276, 0, 0, 458812, 0, 0, 524348, 0, 0, 589884, 0, 0, 655420, 0, 0, 720956, 0, 0, 786492, 0, 0, 852028, 0, 0, 917564, 131072, 0, 983100, 0, 0, 1048636, 0, 0, 1114172, 0, 0, 1179708, 0, 0, 1245244, 0, 0, 1310780, 0, 0, 1376316, 0, 0, 1441852, 0, 0, 1507388, 0, 0, 1572924, 0, 0, 1638460, 0, 0, 1703996, 0, 0, 1769532, 0, 0, 1835068, 0, 0, -327684, 0, 0, -262148, 0, 0, -196612, 0, 0, -131076, 0, 0, -65540, 0, 0, -4, 0, 0, 65532, 0, 0, 131068, 0, 0, 196604, 0, 0, 262140, 0, 0, 327676, 0, 0, 393212, 0, 0, 458748, 0, 0, 524284, 0, 0, 589820, 0, 0, 655356, 65536, 0, 720892, 0, 0, 786428, 0, 0, 851964, 0, 0, 917500, 0, 0, 983036, 0, 0, 1048572, 0, 0, 1114108, 0, 0, 1179644, 0, 0, 1245180, 0, 0, 1310716, 0, 0, 1376252, 0, 0, 1441788, 0, 0, 1507324, 0, 0, 1572860, 65536, 0, 1638396, 0, 0, 1703932, 0, 0, 1769468, 0, 0, 1835004, 0, 0, 1900540, 0, 0, 1966076, 0, 0, 2031612, 0, 0, 2097148, 0, 0, 2162684, 0, 0, 2228220, 0, 0, 2293756, 0, 0, 2359292, 0, 0, 2424828, 65536, 0, 2490364, 0, 0, 2555900, 0, 0, -327683, 0, 0, -262147, 0, 0, -196611, 0, 0, -131075, 0, 0, -65539, 0, 0, -3, 0, 0, 65533, 0, 0, 131069, 0, 0, 196605, 131072, 0, 262141, 0, 0, 327677, 0, 0, 393213, 131072, 0, 458749, 0, 0, 524285, 0, 0, 589821, 0, 0, 655357, 0, 0, 720893, 0, 0, 786429, 0, 0, 851965, 0, 0, 917501, 0, 0, 983037, 0, 0, 1048573, 131072, 0, 1114109, 0, 0, 1179645, 0, 0, 1245181, 0, 0, 1310717, 0, 0, 1376253, 0, 0, 1441789, 0, 0, 1507325, 0, 0, 1572861, 0, 0, 1638397, 0, 0, 1703933, 0, 0, 1769469, 0, 0, 1835005, 0, 0, 1900541, 0, 0, 1966077, 0, 0, 2031613, 0, 0, 2097149, 0, 0, 2162685, 0, 0, 2228221, 0, 0, 2293757, 0, 0, 2359293, 0, 0, 2424829, 0, 0, 2490365, 0, 0, 2555901, 0, 0, -327682, 0, 0, -262146, 0, 0, -196610, 0, 0, -131074, 0, 0, -65538, 0, 0, -2, 0, 0, 65534, 0, 0, 131070, 65536, 0, 196606, 0, 0, 262142, 0, 0, 327678, 131072, 0, 393214, 0, 0, 458750, 0, 0, 524286, 131072, 0, 589822, 0, 0, 655358, 0, 0, 720894, 0, 0, 786430, 0, 0, 851966, 0, 0, 917502, 0, 0, 983038, 0, 0, 1048574, 0, 0, 1114110, 0, 0, 1179646, 0, 0, 1245182, 0, 0, 1310718, 0, 0, 1376254, 0, 0, 1441790, 0, 0, 1507326, 0, 0, 1572862, 0, 0, 1638398, 0, 0, 1703934, 0, 0, 1769470, 0, 0, 1835006, 0, 0, 1900542, 0, 0, 1966078, 0, 0, 2031614, 0, 0, 2097150, 0, 0, 2162686, 0, 0, 2228222, 0, 0, 2293758, 0, 0, 2359294, 0, 0, 2424830, 65536, 0, 2490366, 0, 0, 2555902, 0, 0, -327681, 0, 0, -262145, 0, 0, -196609, 0, 0, -131073, 0, 0, -65537, 65536, 0, -1, 0, 0, 65535, 0, 0, 131071, 0, 0, 196607, 0, 0, 262143, 0, 0, 327679, 0, 0, 393215, 65536, 0, 458751, 0, 0, 524287, 0, 0, 589823, 65536, 0, 655359, 0, 0, 720895, 0, 0, 786431, 0, 0, 851967, 0, 0, 917503, 0, 0, 983039, 0, 0, 1048575, 0, 0, 1114111, 0, 0, 1179647, 0, 0, 1245183, 0, 0, 1310719, 131072, 0, 1376255, 0, 0, 1441791, 0, 0, 1507327, 0, 0, 1572863, 0, 0, 1638399, 0, 0, 1703935, 0, 0, 1769471, 65536, 0, 1835007, 0, 0, 1900543, 0, 0, 1966079, 0, 0, 2031615, 131072, 0, 2097151, 0, 0, 2162687, 0, 0, 2228223, 0, 0, 2293759, 0, 0, 2359295, 0, 0, 2424831, 0, 0, 2490367, 0, 0, 2555903, 0, 0, -393216, 0, 0, -327680, 0, 0, -262144, 0, 0, -196608, 0, 0, -131072, 0, 0, -65536, 0, 0, 1900544, 0, 0, 1966080, 0, 0, 2031616, 0, 0, 2097152, 0, 0, 2162688, 0, 0, 2228224, 0, 0, 2293760, 0, 0, 2359296, 0, 0, 2424832, 0, 0, 2490368, 0, 0, -393215, 0, 0, -327679, 0, 0, -262143, 0, 0, -196607, 0, 0, -131071, 0, 0, -65535, 0, 0, 1900545, 0, 0, 1966081, 0, 0, 2031617, 0, 0, 2097153, 65536, 0, 2162689, 0, 0, 2228225, 0, 0, 2293761, 0, 0, 2359297, 0, 0, 2424833, 65536, 0, 2490369, 0, 0, -393214, 0, 0, -327678, 0, 0, -262142, 0, 0, -196606, 0, 0, -131070, 0, 0, -65534, 0, 0, 1900546, 0, 0, 1966082, 0, 0, 2031618, 0, 0, 2097154, 0, 0, 2162690, 0, 0, 2228226, 131072, 0, 2293762, 0, 0, 2359298, 0, 0, 2424834, 0, 0, 2490370, 0, 0, -393213, 0, 0, -327677, 0, 0, -262141, 0, 0, -196605, 0, 0, -131069, 0, 0, -65533, 0, 0, 1900547, 0, 0, 1966083, 131072, 0, 2031619, 0, 0, 2097155, 0, 0, 2162691, 0, 0, 2228227, 0, 0, 2293763, 0, 0, 2359299, 0, 0, 2424835, 0, 0, 2490371, 0, 0, -393212, 131072, 0, -327676, 0, 0, -262140, 0, 0, -196604, 0, 0, -131068, 131072, 0, -65532, 0, 0, 1900548, 65536, 0, 1966084, 0, 0, 2031620, 0, 0, 2097156, 131072, 0, 2162692, 0, 0, 2228228, 0, 0, 2293764, 0, 0, 2359300, 0, 0, 2424836, 0, 0, 2490372, 0, 0, -393211, 0, 0, -327675, 0, 0, -262139, 131072, 0, -196603, 0, 0, -131067, 131072, 0, -65531, 0, 0, 1900549, 0, 2, 1966085, 0, 2, 2031621, 0, 2, 2097157, 0, 2, 2162693, 0, 2, 2228229, 0, 2, 2293765, 0, 2, 2359301, 0, 3, 2424837, 0, 0, 2490373, 0, 0, -393210, 0, 0, -327674, 0, 0, -262138, 0, 0, -196602, 0, 0, -131066, 0, 0, -65530, 0, 0, 1900550, 65536, 2, 1966086, 65536, 2, 2031622, 65536, 2, 2097158, 65536, 2, 2162694, 65536, 2, 2228230, 65536, 2, 2293766, 65536, 2, 2359302, 65536, 3, 2424838, 131072, 0, 2490374, 0, 0, -393209, 0, 0, -327673, 65536, 0, -262137, 0, 0, -196601, 0, 0, -131065, 65536, 0, -65529, 0, 0, 1900551, 131072, 2, 1966087, 131072, 2, 2031623, 262144, 3, 2097159, 65536, 2, 2162695, 65536, 2, 2228231, 65536, 2, 2293767, 65536, 2, 2359303, 65536, 3, 2424839, 0, 0, 2490375, 0, 0, -393208, 131072, 0, -327672, 0, 0, -262136, 0, 0, -196600, 0, 0, -131064, 0, 0, -65528, 0, 0, 1900552, 0, 0, 1966088, 0, 0, 2031624, 65536, 1, 2097160, 65536, 2, 2162696, 65536, 2, 2228232, 65536, 2, 2293768, 65536, 2, 2359304, 65536, 3, 2424840, 0, 0, 2490376, 0, 0, -393207, 0, 0, -327671, 0, 0, -262135, 0, 0, -196599, 0, 0, -131063, 0, 0, -65527, 0, 0, 1900553, 0, 0, 1966089, 0, 0, 2031625, 65536, 1, 2097161, 65536, 2, 2162697, 65536, 2, 2228233, 65536, 2, 2293769, 65536, 2, 2359305, 65536, 3, 2424841, 0, 0, 2490377, 0, 0, -393206, 0, 0, -327670, 0, 0, -262134, 0, 0, -196598, 0, 0, -131062, 0, 0, -65526, 65536, 0, 1900554, 0, 0, 1966090, 0, 0, 2031626, 65536, 1, 2097162, 65536, 2, 2162698, 65536, 2, 2228234, 65536, 2, 2293770, 65536, 2, 2359306, 65536, 3, 2424842, 0, 0, 2490378, 0, 0, -393205, 0, 0, -327669, 0, 0, -262133, 0, 0, -196597, 0, 0, -131061, 0, 0, -65525, 0, 0, 1900555, 0, 0, 1966091, 0, 0, 2031627, 65536, 1, 2097163, 65536, 2, 2162699, 65536, 2, 2228235, 65536, 2, 2293771, 65536, 2, 2359307, 65536, 3, 2424843, 0, 0, 2490379, 0, 0, -393204, 0, 0, -327668, 0, 0, -262132, 0, 0, -196596, 0, 0, -131060, 0, 0, -65524, 0, 0, 1900556, 0, 0, 1966092, 0, 0, 2031628, 131072, 1, 2097164, 131072, 2, 2162700, 262144, 3, 2228236, 65536, 2, 2293772, 327680, 3, 2359308, 131072, 3, 2424844, 0, 0, 2490380, 0, 0, -393203, 0, 0, -327667, 0, 0, -262131, 0, 0, -196595, 65536, 0, -131059, 0, 0, -65523, 0, 0, 1900557, 0, 0, 1966093, 0, 0, 2031629, 0, 0, 2097165, 0, 0, 2162701, 65536, 1, 2228237, 65536, 2, 2293773, 65536, 3, 2359309, 0, 0, 2424845, 0, 0, 2490381, 0, 0, -393202, 0, 0, -327666, 0, 0, -262130, 0, 0, -196594, 0, 0, -131058, 0, 0, -65522, 0, 0, 1900558, 0, 0, 1966094, 0, 0, 2031630, 0, 0, 2097166, 0, 0, 2162702, 65536, 1, 2228238, 65536, 2, 2293774, 65536, 3, 2359310, 0, 0, 2424846, 0, 0, 2490382, 0, 0, -393201, 0, 0, -327665, 131072, 0, -262129, 0, 0, -196593, 0, 0, -131057, 0, 0, -65521, 0, 0, 1900559, 131072, 0, 1966095, 131072, 0, 2031631, 0, 0, 2097167, 131072, 0, 2162703, 65536, 1, 2228239, 65536, 2, 2293775, 65536, 3, 2359311, 0, 0, 2424847, 0, 0, 2490383, 0, 0, -393200, 0, 0, -327664, 0, 0, -262128, 131072, 0, -196592, 0, 0, -131056, 0, 0, -65520, 0, 0, 1900560, 0, 0, 1966096, 0, 0, 2031632, 0, 0, 2097168, 0, 0, 2162704, 65536, 1, 2228240, 65536, 2, 2293776, 65536, 3, 2359312, 0, 0, 2424848, 0, 0, 2490384, 131072, 0, -393199, 0, 0, -327663, 0, 0, -262127, 65536, 0, -196591, 0, 0, -131055, 0, 0, -65519, 0, 0, 1900561, 458752, 3, 1966097, 458752, 3, 2031633, 0, 0, 2097169, 0, 0, 2162705, 65536, 1, 2228241, 65536, 2, 2293777, 65536, 3, 2359313, 0, 0, 2424849, 0, 0, 2490385, 0, 0, -393198, 0, 0, -327662, 0, 0, -262126, 0, 0, -196590, 0, 0, -131054, 0, 0, -65518, 0, 0, 1900562, 458752, 3, 1966098, 458752, 3, 2031634, 458752, 3, 2097170, 0, 0, 2162706, 65536, 1, 2228242, 65536, 2, 2293778, 65536, 3, 2359314, 0, 0, 2424850, 0, 0, 2490386, 0, 0, -393197, 0, 0, -327661, 0, 0, -262125, 0, 0, -196589, 131072, 0, -131053, 0, 0, -65517, 0, 0, 1900563, 0, 0, 1966099, 458752, 3, 2031635, 458752, 3, 2097171, 0, 0, 2162707, 65536, 1, 2228243, 65536, 2, 2293779, 65536, 3, 2359315, 0, 0, 2424851, 131072, 0, 2490387, 0, 0, -393196, 0, 0, -327660, 0, 0, -262124, 0, 0, -196588, 0, 0, -131052, 0, 0, -65516, 0, 0, 1900564, 458752, 3, 1966100, 458752, 3, 2031636, 458752, 3, 2097172, 0, 0, 2162708, 65536, 1, 2228244, 65536, 2, 2293780, 65536, 3, 2359316, 0, 0, 2424852, 0, 0, 2490388, 0, 0, -393195, 0, 0, -327659, 0, 0, -262123, 0, 0, -196587, 0, 0, -131051, 131072, 0, -65515, 0, 0, 1900565, 458752, 3, 1966101, 458752, 3, 2031637, 0, 0, 2097173, 0, 0, 2162709, 65536, 1, 2228245, 65536, 2, 2293781, 65536, 3, 2359317, 0, 0, 2424853, 131072, 0, 2490389, 0, 0, -393194, 0, 0, -327658, 0, 0, -262122, 0, 0, -196586, 131072, 0, -131050, 0, 0, -65514, 65536, 0, 1900566, 0, 0, 1966102, 0, 0, 2031638, 0, 0, 2097174, 0, 0, 2162710, 65536, 1, 2228246, 65536, 2, 2293782, 65536, 3, 2359318, 0, 0, 2424854, 0, 0, 2490390, 0, 0, -393193, 0, 0, -327657, 0, 0, -262121, 0, 0, -196585, 0, 0, -131049, 0, 0, -65513, 0, 0, 1900567, 0, 0, 1966103, 0, 0, 2031639, 0, 0, 2097175, 0, 0, 2162711, 65536, 1, 2228247, 65536, 2, 2293783, 65536, 3, 2359319, 0, 0, 2424855, 0, 0, 2490391, 0, 0, -393192, 0, 0, -327656, 0, 0, -262120, 0, 0, -196584, 0, 0, -131048, 0, 0, -65512, 0, 0, 1900568, 0, 0, 1966104, 0, 0, 2031640, 0, 0, 2097176, 0, 0, 2162712, 65536, 1, 2228248, 65536, 2, 2293784, 65536, 3, 2359320, 0, 0, 2424856, 0, 0, 2490392, 0, 0, -393191, 0, 0, -327655, 0, 0, -262119, 0, 0, -196583, 0, 0, -131047, 0, 0, -65511, 0, 0, 1900569, 0, 0, 1966105, 0, 0, 2031641, 0, 0, 2097177, 0, 0, 2162713, 65536, 1, 2228249, 65536, 2, 2293785, 65536, 3, 2359321, 0, 0, 2424857, 0, 0, 2490393, 0, 0, -393190, 0, 0, -327654, 0, 0, -262118, 0, 0, -196582, 0, 0, -131046, 0, 0, -65510, 0, 0, 1900570, 0, 0, 1966106, 0, 0, 2031642, 0, 0, 2097178, 0, 0, 2162714, 65536, 1, 2228250, 65536, 2, 2293786, 65536, 3, 2359322, 0, 0, 2424858, 0, 0, 2490394, 0, 0, -393189, 0, 0, -327653, 65536, 0, -262117, 0, 0, -196581, 0, 0, -131045, 0, 0, -65509, 0, 0, 1900571, 0, 0, 1966107, 0, 0, 2031643, 0, 0, 2097179, 458752, 3, 2162715, 65536, 1, 2228251, 65536, 2, 2293787, 65536, 3, 2359323, 0, 0, 2424859, 0, 0, 2490395, 0, 0, -393188, 0, 0, -327652, 0, 0, -262116, 0, 0, -196580, 131072, 0, -131044, 0, 0, -65508, 0, 0, 1900572, 458752, 3, 1966108, 458752, 3, 2031644, 458752, 3, 2097180, 458752, 3, 2162716, 65536, 1, 2228252, 65536, 2, 2293788, 65536, 3, 2359324, 0, 0, 2424860, 0, 0, 2490396, 0, 0, -393187, 0, 0, -327651, 0, 0, -262115, 0, 0, -196579, 0, 0, -131043, 65536, 0, -65507, 0, 0, 1900573, 131072, 0, 1966109, 0, 0, 2031645, 458752, 3, 2097181, 458752, 3, 2162717, 65536, 1, 2228253, 65536, 2, 2293789, 65536, 3, 2359325, 0, 0, 2424861, 0, 0, 2490397, 0, 0, -393186, 0, 0, -327650, 0, 0, -262114, 0, 0, -196578, 0, 0, -131042, 65536, 0, -65506, 0, 0, 1900574, 0, 0, 1966110, 131072, 0, 2031646, 0, 0, 2097182, 458752, 3, 2162718, 65536, 1, 2228254, 65536, 2, 2293790, 65536, 3, 2359326, 0, 0, 2424862, 0, 0, 2490398, 0, 0, -393185, 0, 0, -327649, 0, 0, -262113, 131072, 0, -196577, 0, 0, -131041, 131072, 0, -65505, 0, 0, 1900575, 458752, 3, 1966111, 131072, 0, 2031647, 0, 0, 2097183, 0, 0, 2162719, 65536, 1, 2228255, 65536, 2, 2293791, 65536, 3, 2359327, 0, 0, 2424863, 0, 0, 2490399, 0, 0, -393184, 0, 0, -327648, 131072, 0, -262112, 0, 0, -196576, 0, 0, -131040, 0, 0, -65504, 0, 0, 1900576, 458752, 3, 1966112, 0, 0, 2031648, 0, 0, 2097184, 0, 0, 2162720, 65536, 1, 2228256, 65536, 2, 2293792, 65536, 3, 2359328, 0, 0, 2424864, 0, 0, 2490400, 0, 0, -393183, 0, 0, -327647, 0, 0, -262111, 0, 0, -196575, 0, 0, -131039, 0, 0, -65503, 0, 0, 1900577, 458752, 3, 1966113, 0, 0, 2031649, 0, 0, 2097185, 0, 0, 2162721, 65536, 1, 2228257, 65536, 2, 2293793, 65536, 3, 2359329, 65536, 0, 2424865, 0, 0, 2490401, 0, 0, -393182, 0, 0, -327646, 0, 0, -262110, 0, 0, -196574, 0, 0, -131038, 0, 0, -65502, 0, 0, 1900578, 458752, 3, 1966114, 0, 0, 2031650, 0, 0, 2097186, 0, 0, 2162722, 65536, 1, 2228258, 65536, 2, 2293794, 65536, 3, 2359330, 131072, 0, 2424866, 0, 0, 2490402, 0, 0, -393181, 0, 0, -327645, 0, 0, -262109, 0, 0, -196573, 0, 0, -131037, 0, 0, -65501, 0, 0, 1900579, 0, 0, 1966115, 0, 0, 2031651, 0, 0, 2097187, 0, 0, 2162723, 65536, 1, 2228259, 65536, 2, 2293795, 65536, 3, 2359331, 0, 0, 2424867, 0, 0, 2490403, 0, 0, -393180, 0, 0, -327644, 0, 0, -262108, 131072, 0, -196572, 0, 0, -131036, 0, 0, -65500, 0, 0, 1900580, 0, 0, 1966116, 0, 0, 2031652, 0, 0, 2097188, 65536, 0, 2162724, 65536, 1, 2228260, 65536, 2, 2293796, 65536, 3, 2359332, 0, 0, 2424868, 65536, 0, 2490404, 0, 0, -393179, 0, 0, -327643, 0, 0, -262107, 0, 0, -196571, 0, 0, -131035, 65536, 0, -65499, 0, 0, 1900581, 0, 0, 1966117, 0, 0, 2031653, 0, 0, 2097189, 0, 0, 2162725, 65536, 1, 2228261, 65536, 2, 2293797, 65536, 3, 2359333, 0, 0, 2424869, 0, 0, 2490405, 0, 0, -393178, 0, 0, -327642, 0, 0, -262106, 0, 0, -196570, 0, 0, -131034, 0, 0, -65498, 0, 0, 1900582, 0, 0, 1966118, 0, 0, 2031654, 0, 0, 2097190, 0, 0, 2162726, 65536, 1, 2228262, 65536, 2, 2293798, 65536, 3, 2359334, 0, 0, 2424870, 0, 0, 2490406, 0, 0, -393177, 0, 0, -327641, 0, 0, -262105, 0, 0, -196569, 0, 0, -131033, 0, 0, -65497, 0, 0, 1900583, 0, 0, 1966119, 0, 0, 2031655, 65536, 0, 2097191, 0, 0, 2162727, 65536, 1, 2228263, 65536, 2, 2293799, 65536, 3, 2359335, 0, 0, 2424871, 0, 0, 2490407, 0, 0, -393176, 0, 0, -327640, 0, 0, -262104, 0, 0, -196568, 0, 0, -131032, 131072, 0, -65496, 0, 0, 1900584, 0, 0, 1966120, 0, 0, 2031656, 0, 0, 2097192, 0, 0, 2162728, 65536, 1, 2228264, 65536, 2, 2293800, 65536, 3, 2359336, 0, 0, 2424872, 0, 0, 2490408, 0, 0, -393175, 0, 0, -327639, 0, 0, -262103, 0, 0, -196567, 0, 0, -131031, 0, 0, -65495, 0, 0, 1900585, 0, 0, 1966121, 0, 0, 2031657, 0, 0, 2097193, 0, 0, 2162729, 65536, 1, 2228265, 65536, 2, 2293801, 65536, 3, 2359337, 0, 0, 2424873, 0, 0, 2490409, 131072, 0, -393174, 0, 0, -327638, 0, 0, -262102, 0, 0, -196566, 0, 0, -131030, 65536, 0, -65494, 0, 0, 1900586, 458752, 3, 1966122, 0, 0, 2031658, 0, 0, 2097194, 0, 0, 2162730, 65536, 1, 2228266, 65536, 2, 2293802, 65536, 3, 2359338, 65536, 0, 2424874, 0, 0, 2490410, 0, 0, -393173, 0, 0, -327637, 0, 0, -262101, 65536, 0, -196565, 0, 0, -131029, 0, 0, -65493, 131072, 0, 1900587, 458752, 3, 1966123, 0, 0, 2031659, 0, 0, 2097195, 65536, 0, 2162731, 65536, 1, 2228267, 65536, 2, 2293803, 65536, 3, 2359339, 0, 0, 2424875, 65536, 0, 2490411, 0, 0, -393172, 0, 0, -327636, 0, 0, -262100, 65536, 0, -196564, 0, 0, -131028, 0, 0, -65492, 0, 0, 1900588, 458752, 3, 1966124, 0, 0, 2031660, 0, 0, 2097196, 0, 0, 2162732, 65536, 1, 2228268, 65536, 2, 2293804, 65536, 3, 2359340, 131072, 0, 2424876, 0, 0, 2490412, 0, 0, -393171, 0, 0, -327635, 0, 0, -262099, 0, 0, -196563, 0, 0, -131027, 0, 0, -65491, 0, 0, 1900589, 0, 0, 1966125, 0, 0, 2031661, 0, 0, 2097197, 0, 0, 2162733, 65536, 1, 2228269, 65536, 2, 2293805, 65536, 3, 2359341, 0, 0, 2424877, 0, 0, 2490413, 0, 0, -393170, 0, 0, -327634, 0, 0, -262098, 0, 0, -196562, 0, 0, -131026, 0, 0, -65490, 0, 0, 1900590, 0, 0, 1966126, 0, 0, 2031662, 0, 0, 2097198, 0, 0, 2162734, 65536, 1, 2228270, 65536, 2, 2293806, 65536, 3, 2359342, 0, 0, 2424878, 0, 0, 2490414, 131072, 0, -393169, 0, 0, -327633, 0, 0, -262097, 0, 0, -196561, 65536, 0, -131025, 0, 0, -65489, 0, 0, 1900591, 0, 0, 1966127, 0, 0, 2031663, 0, 1, 2097199, 0, 2, 2162735, 196608, 3, 2228271, 65536, 2, 2293807, 393216, 3, 2359343, 0, 3, 2424879, 0, 0, 2490415, 0, 0, -393168, 65536, 0, -327632, 0, 0, -262096, 0, 0, -196560, 0, 0, -131024, 0, 0, -65488, 0, 0, 1900592, 0, 0, 1966128, 0, 0, 2031664, 65536, 1, 2097200, 65536, 2, 2162736, 65536, 2, 2228272, 65536, 2, 2293808, 65536, 2, 2359344, 65536, 3, 2424880, 0, 0, 2490416, 0, 0, -393167, 0, 0, -327631, 0, 0, -262095, 0, 0, -196559, 0, 0, -131023, 0, 0, -65487, 0, 0, 1900593, 0, 2, 1966129, 0, 2, 2031665, 196608, 3, 2097201, 65536, 2, 2162737, 65536, 2, 2228273, 65536, 2, 2293809, 65536, 2, 2359345, 65536, 3, 2424881, 0, 0, 2490417, 0, 0, -393166, 0, 0, -327630, 0, 0, -262094, 0, 0, -196558, 0, 0, -131022, 0, 0, -65486, 65536, 0, 1900594, 65536, 2, 1966130, 65536, 2, 2031666, 65536, 2, 2097202, 65536, 2, 2162738, 65536, 2, 2228274, 65536, 2, 2293810, 65536, 2, 2359346, 65536, 3, 2424882, 0, 0, 2490418, 0, 0, -393165, 65536, 0, -327629, 0, 0, -262093, 0, 0, -196557, 0, 0, -131021, 0, 0, -65485, 0, 0, 1900595, 131072, 2, 1966131, 131072, 2, 2031667, 262144, 3, 2097203, 65536, 2, 2162739, 65536, 2, 2228275, 65536, 2, 2293811, 65536, 2, 2359347, 65536, 3, 2424883, 0, 0, 2490419, 0, 0, -393164, 0, 0, -327628, 0, 0, -262092, 0, 0, -196556, 0, 0, -131020, 0, 0, -65484, 0, 0, 1900596, 0, 0, 1966132, 0, 0, 2031668, 131072, 1, 2097204, 131072, 2, 2162740, 131072, 2, 2228276, 131072, 2, 2293812, 131072, 2, 2359348, 131072, 3, 2424884, 0, 0, 2490420, 0, 0, -393163, 0, 0, -327627, 0, 0, -262091, 0, 0, -196555, 65536, 0, -131019, 0, 0, -65483, 0, 0, 1900597, 0, 0, 1966133, 0, 0, 2031669, 0, 0, 2097205, 0, 0, 2162741, 0, 0, 2228277, 0, 0, 2293813, 0, 0, 2359349, 0, 0, 2424885, 0, 0, 2490421, 131072, 0, -393162, 0, 0, -327626, 0, 0, -262090, 0, 0, -196554, 0, 0, -131018, 0, 0, -65482, 0, 0, 1900598, 0, 0, 1966134, 0, 0, 2031670, 0, 0, 2097206, 0, 0, 2162742, 0, 0, 2228278, 0, 0, 2293814, 0, 0, 2359350, 0, 0, 2424886, 0, 0, 2490422, 0, 0, -393161, 0, 0, -327625, 0, 0, -262089, 0, 0, -196553, 0, 0, -131017, 0, 0, -65481, 0, 0, 1900599, 131072, 0, 1966135, 131072, 0, 2031671, 0, 0, 2097207, 0, 0, 2162743, 131072, 0, 2228279, 0, 0, 2293815, 0, 0, 2359351, 0, 0, 2424887, 0, 0, 2490423, 0, 0, -393160, 0, 0, -327624, 0, 0, -262088, 0, 0, -196552, 0, 0, -131016, 0, 0, -65480, 0, 0, 1900600, 0, 0, 1966136, 0, 0, 2031672, 0, 0, 2097208, 0, 0, 2162744, 0, 0, 2228280, 65536, 0, 2293816, 0, 0, 2359352, 0, 0, 2424888, 0, 0, 2490424, 0, 0, -393159, 0, 0, -327623, 0, 0, -262087, 0, 0, -196551, 0, 0, -131015, 0, 0, -65479, 0, 0, 1900601, 65536, 0, 1966137, 0, 0, 2031673, 0, 0, 2097209, 0, 0, 2162745, 0, 0, 2228281, 131072, 0, 2293817, 0, 0, 2359353, 0, 0, 2424889, 0, 0, 2490425, 0, 0, -393158, 0, 0, -327622, 0, 0, -262086, 0, 0, -196550, 0, 0, -131014, 0, 0, -65478, 0, 0, 1900602, 0, 0, 1966138, 0, 0, 2031674, 0, 0, 2097210, 0, 0, 2162746, 0, 0, 2228282, 0, 0, 2293818, 0, 0, 2359354, 0, 0, 2424890, 0, 0, 2490426, 0, 0, -393157, 0, 0, -327621, 0, 0, -262085, 0, 0, -196549, 0, 0, -131013, 0, 0, -65477, 0, 0, 1900603, 0, 0, 1966139, 0, 0, 2031675, 0, 0, 2097211, 0, 0, 2162747, 0, 0, 2228283, 0, 0, 2293819, 0, 0, 2359355, 0, 0, 2424891, 0, 0, 2490427, 0, 0, -393156, 0, 0, -327620, 0, 0, -262084, 0, 0, -196548, 0, 0, -131012, 0, 0, -65476, 0, 0, 1900604, 0, 0, 1966140, 0, 0, 2031676, 131072, 0, 2097212, 0, 0, 2162748, 0, 0, 2228284, 0, 0, 2293820, 65536, 0, 2359356, 0, 0, 2424892, 0, 0, 2490428, 0, 0, 2293755, 65536, 0, 2228219, 0, 0, 2162683, 0, 0, 2293754, 0, 0, 2228218, 0, 0, 2162682, 0, 0, -458758, 0, 0, -393222, 0, 0, -327686, 131072, 0, -262150, 0, 0, -196614, 0, 0, -131078, 0, 0, -65542, 0, 0, -6, 65536, 0, 65530, 0, 0, 131066, 0, 0, 196602, 0, 0, 262138, 0, 0, 327674, 65536, 0, 393210, 0, 0, 458746, 0, 0, 524282, 0, 0, 589818, 0, 0, 655354, 0, 0, 720890, 0, 0, 786426, 65536, 0, 851962, 0, 0, 917498, 0, 0, 983034, 0, 0, 1048570, 0, 0, 1114106, 0, 0, 1179642, 0, 0, 1245178, 0, 0, 1310714, 0, 0, 1376250, 0, 0, 1441786, 0, 0, 1507322, 0, 0, 1572858, 0, 0, 1638394, 0, 0, 1703930, 0, 0, 1769466, 0, 0, 1835002, 0, 0, 1900538, 0, 0, 1966074, 0, 0, 2031610, 0, 0, 2097146, 0, 0, 2359290, 0, 0, 2424826, 0, 0, 2490362, 0, 0, 2555898, 0, 0, -458757, 0, 0, -393221, 0, 0, -327685, 0, 0, -262149, 0, 0, -196613, 0, 0, -131077, 0, 0, -65541, 0, 0, -5, 0, 0, 65531, 0, 0, 131067, 0, 0, 196603, 0, 0, 262139, 131072, 0, 327675, 0, 0, 393211, 0, 0, 458747, 0, 0, 524283, 0, 0, 589819, 0, 0, 655355, 0, 0, 720891, 0, 0, 786427, 0, 0, 851963, 0, 0, 917499, 0, 0, 983035, 0, 0, 1048571, 0, 0, 1114107, 0, 0, 1179643, 0, 0, 1245179, 0, 0, 1310715, 0, 0, 1376251, 0, 0, 1441787, 0, 0, 1507323, 0, 0, 1572859, 0, 0, 1638395, 0, 0, 1703931, 0, 0, 1769467, 0, 0, 1835003, 0, 0, 1900539, 0, 0, 1966075, 65536, 0, 2031611, 0, 0, 2097147, 0, 0, 2359291, 65536, 0, 2424827, 0, 0, 2490363, 0, 0, 2555899, 0, 0, -458756, 0, 0, -393220, 0, 0, -458755, 0, 0, -393219, 0, 0, -458754, 0, 0, -393218, 0, 0, -458753, 0, 0, -393217, 0, 0, -524288, 0, 0, -458752, 0, 0, -524287, 0, 0, -458751, 0, 0, -524286, 0, 0, -458750, 0, 0, -524285, 0, 0, -458749, 0, 0, -524284, 0, 0, -458748, 0, 0, -524283, 0, 0, -458747, 0, 0, -524282, 0, 0, -458746, 131072, 0, -524281, 0, 0, -458745, 131072, 0, -524280, 0, 0, -458744, 0, 0, -524279, 0, 0, -458743, 0, 0, -524278, 0, 0, -458742, 0, 0, -524277, 0, 0, -458741, 0, 0, -524276, 0, 0, -458740, 0, 0, -524275, 0, 0, -458739, 0, 0, -524274, 0, 0, -458738, 131072, 0, -524273, 0, 0, -458737, 0, 0, -524272, 0, 0, -458736, 0, 0, -524271, 0, 0, -458735, 0, 0, -524270, 0, 0, -458734, 65536, 0, -524269, 0, 0, -458733, 0, 0, -524268, 0, 0, -458732, 0, 0, -524267, 0, 0, -458731, 0, 0, -524266, 0, 0, -458730, 0, 0, -524265, 0, 0, -458729, 0, 0, -524264, 0, 0, -458728, 65536, 0, -524263, 0, 0, -458727, 0, 0, -524262, 0, 0, -458726, 0, 0, -524261, 0, 0, -458725, 0, 0, -524260, 0, 0, -458724, 0, 0, -524259, 0, 0, -458723, 0, 0, -524258, 0, 0, -458722, 0, 0, -524257, 0, 0, -458721, 0, 0, -524256, 0, 0, -458720, 0, 0, -524255, 0, 0, -458719, 0, 0, -524254, 0, 0, -458718, 0, 0, -524253, 0, 0, -458717, 0, 0, -524252, 0, 0, -458716, 0, 0, -524251, 0, 0, -458715, 0, 0, -524250, 0, 0, -458714, 65536, 0, -524249, 0, 0, -458713, 65536, 0, -524248, 0, 0, -458712, 0, 0, -524247, 0, 0, -458711, 0, 0, -524246, 0, 0, -458710, 0, 0, -524245, 0, 0, -458709, 0, 0, -524244, 0, 0, -458708, 0, 0, -524243, 0, 0, -458707, 65536, 0, -524242, 0, 0, -458706, 0, 0, -524241, 0, 0, -458705, 0, 0, -524240, 0, 0, -458704, 0, 0, -524239, 0, 0, -458703, 0, 0, -524238, 0, 0, -458702, 0, 0, -524237, 0, 0, -458701, 0, 0, -524236, 0, 0, -458700, 0, 0, -524235, 0, 0, -458699, 65536, 0, -524234, 0, 0, -458698, 0, 0, -524233, 0, 0, -458697, 0, 0, -524232, 0, 0, -458696, 0, 0, -524231, 0, 0, -458695, 0, 0, -524230, 0, 0, -458694, 0, 0, -524229, 0, 0, -458693, 0, 0, -524228, 0, 0, -458692, 0, 0, 524297, 65536, 3, 589833, 0, 0, 655369, 0, 0, 720905, 0, 0, 524298, 65536, 3, 589834, 0, 0, 655370, 0, 0, 720906, 0, 0, 524299, 131072, 3, 589835, 0, 0, 655371, 0, 0, 720907, 0, 0, 524300, 0, 0, 589836, 0, 0, 655372, 0, 0, 720908, 0, 0, 524301, 0, 0, 589837, 0, 0, 655373, 0, 0, 720909, 0, 0, 524302, 65536, 0, 589838, 0, 0, 655374, 0, 0, 720910, 0, 0, 524303, 0, 0, 589839, 0, 0, 655375, 0, 0, 720911, 0, 0, 2621434, 0, 0, 2621435, 65536, 0, 2621436, 0, 0, 2621437, 0, 0, 2621438, 0, 0, 2621439, 0, 0, 2555904, 0, 0, 2555905, 0, 0, 2555906, 0, 0, 2555907, 0, 0, 2555908, 0, 0, 2555909, 0, 0, 2555910, 0, 0, 2555911, 0, 0, 2555912, 131072, 0, 2555913, 0, 0, 2555914, 131072, 0, 2555915, 0, 0, 2555916, 0, 0, 2555917, 0, 0, 2555918, 0, 0, 2555919, 0, 0, 2555920, 0, 0, 2555921, 0, 0, 2555922, 0, 0, 2555923, 65536, 0, 2555924, 0, 0, 2555925, 0, 0, 2555926, 0, 0, 2555927, 0, 0, 2555928, 0, 0, 2555929, 0, 0, 2555930, 0, 0, 2555931, 0, 0, 2555932, 0, 0, 2555933, 0, 0, 2555934, 131072, 0, 2555935, 0, 0, 2555936, 0, 0, 2555937, 0, 0, 2555938, 0, 0, 2555939, 0, 0, 2555940, 0, 0, 2555941, 0, 0, 2555942, 0, 0, 2555943, 65536, 0, 2555944, 0, 0, 2555945, 0, 0, 2555946, 0, 0, 2555947, 0, 0, 2555948, 0, 0, 2555949, 0, 0, 2555950, 0, 0, 2555951, 0, 0, 2555952, 0, 0, 2555953, 0, 0, 2555954, 0, 0, 2555955, 0, 0, 2555956, 0, 0, 2555957, 0, 0, 2555958, 0, 0, 2555959, 0, 0, 2555960, 0, 0, 2555961, 0, 0, 2555962, 0, 0, 2555963, 0, 0, 2555964, 0, 0, 2686970, 0, 0, 2752506, 0, 0, 2818042, 0, 0, 2883578, 0, 0, 2686971, 0, 0, 2752507, 65536, 0, 2818043, 0, 0, 2883579, 0, 0, 2686972, 0, 0, 2752508, 65536, 0, 2818044, 0, 0, 2883580, 0, 0, 2686973, 0, 0, 2752509, 0, 0, 2818045, 0, 0, 2883581, 0, 0, 2686974, 0, 0, 2752510, 131072, 0, 2818046, 0, 0, 2883582, 0, 0, 2686975, 0, 0, 2752511, 65536, 0, 2818047, 0, 0, 2883583, 0, 0, 2621440, 0, 0, 2686976, 131072, 0, 2752512, 0, 0, 2818048, 0, 0, 2621441, 0, 0, 2686977, 0, 0, 2752513, 0, 0, 2818049, 0, 0, 2621442, 0, 0, 2686978, 0, 0, 2752514, 0, 0, 2818050, 0, 0, 2621443, 0, 0, 2686979, 131072, 0, 2752515, 0, 0, 2818051, 0, 0, 2621444, 0, 0, 2686980, 0, 0, 2752516, 0, 0, 2818052, 131072, 0, 2621445, 0, 0, 2686981, 131072, 0, 2752517, 0, 0, 2818053, 0, 0, 2621446, 0, 0, 2686982, 0, 0, 2752518, 0, 0, 2818054, 0, 0, 2621447, 0, 0, 2686983, 0, 0, 2752519, 0, 0, 2818055, 0, 0, 2621448, 0, 0, 2686984, 0, 0, 2752520, 65536, 0, 2818056, 0, 0, 2621449, 0, 0, 2686985, 0, 0, 2752521, 65536, 0, 2818057, 0, 0, 2621450, 0, 0, 2686986, 0, 0, 2752522, 131072, 0, 2818058, 0, 0, 2621451, 0, 0, 2686987, 0, 0, 2752523, 0, 0, 2818059, 0, 0, 2621452, 0, 0, 2686988, 0, 0, 2752524, 131072, 0, 2818060, 65536, 0, 2621453, 0, 0, 2686989, 0, 0, 2752525, 0, 0, 2818061, 0, 0, 2621454, 0, 0, 2686990, 0, 0, 2752526, 0, 0, 2818062, 0, 0, 2621455, 0, 0, 2686991, 0, 0, 2752527, 0, 0, 2818063, 0, 0, 2621456, 131072, 0, 2686992, 0, 0, 2752528, 0, 0, 2818064, 0, 0, 2621457, 0, 0, 2686993, 0, 0, 2752529, 0, 0, 2818065, 0, 0, 2621458, 0, 0, 2686994, 131072, 0, 2752530, 0, 0, 2818066, 0, 0, 2621459, 0, 0, 2686995, 0, 0, 2752531, 0, 0, 2818067, 0, 0, 2621460, 0, 0, 2686996, 0, 0, 2752532, 0, 0, 2818068, 0, 0, 2621461, 0, 0, 2686997, 0, 0, 2752533, 0, 0, 2818069, 0, 0, 2621462, 0, 0, 2686998, 0, 0, 2752534, 131072, 0, 2818070, 0, 0, 2621463, 0, 0, 2686999, 0, 0, 2752535, 0, 0, 2818071, 0, 0, 2621464, 0, 0, 2687000, 0, 0, 2752536, 0, 0, 2818072, 0, 0, 2621465, 65536, 0, 2687001, 0, 0, 2752537, 0, 0, 2818073, 0, 0, 2621466, 65536, 0, 2687002, 0, 0, 2752538, 0, 0, 2818074, 0, 0, 2621467, 0, 0, 2687003, 0, 0, 2752539, 0, 0, 2818075, 0, 0, 2621468, 0, 0, 2687004, 0, 0, 2752540, 0, 0, 2818076, 0, 0, 2621469, 0, 0, 2687005, 0, 0, 2752541, 0, 0, 2818077, 0, 0, 2621470, 0, 0, 2687006, 0, 0, 2752542, 0, 0, 2818078, 0, 0, 2621471, 0, 0, 2687007, 0, 0, 2752543, 0, 0, 2818079, 65536, 0, 2621472, 0, 0, 2687008, 0, 0, 2752544, 0, 0, 2818080, 0, 0, 2621473, 0, 0, 2687009, 65536, 0, 2752545, 0, 0, 2818081, 0, 0, 2621474, 0, 0, 2687010, 0, 0, 2752546, 0, 0, 2818082, 0, 0, 2621475, 0, 0, 2687011, 0, 0, 2752547, 0, 0, 2818083, 65536, 0, 2621476, 0, 0, 2687012, 0, 0, 2752548, 0, 0, 2818084, 0, 0, 2621477, 0, 0, 2687013, 0, 0, 2752549, 0, 0, 2818085, 0, 0, 2621478, 0, 0, 2687014, 0, 0, 2752550, 0, 0, 2818086, 0, 0, 2621479, 0, 0, 2687015, 0, 0, 2752551, 0, 0, 2818087, 131072, 0, 2621480, 0, 0, 2687016, 0, 0, 2752552, 0, 0, 2818088, 0, 0, 2621481, 0, 0, 2687017, 0, 0, 2752553, 0, 0, 2818089, 0, 0, 2621482, 0, 0, 2687018, 0, 0, 2752554, 0, 0, 2818090, 0, 0, 2621483, 0, 0, 2687019, 0, 0, 2752555, 0, 0, 2818091, 0, 0, 2621484, 0, 0, 2687020, 0, 0, 2752556, 0, 0, 2818092, 0, 0, 2621485, 0, 0, 2687021, 0, 0, 2752557, 0, 0, 2818093, 131072, 0, 2621486, 0, 0, 2687022, 0, 0, 2752558, 0, 0, 2818094, 0, 0, 2621487, 0, 0, 2687023, 0, 0, 2752559, 0, 0, 2818095, 0, 0, 2621488, 0, 0, 2687024, 0, 0, 2752560, 131072, 0, 2818096, 0, 0, 2621489, 0, 0, 2687025, 0, 0, 2752561, 65536, 0, 2818097, 0, 0, 2621490, 0, 0, 2687026, 0, 0, 2752562, 0, 0, 2818098, 0, 0, 2621491, 0, 0, 2687027, 65536, 0, 2752563, 0, 0, 2818099, 65536, 0, 2621492, 65536, 0, 2687028, 0, 0, 2752564, 0, 0, 2818100, 0, 0, 2621493, 0, 0, 2687029, 0, 0, 2752565, 0, 0, 2818101, 0, 0, 2621494, 0, 0, 2687030, 0, 0, 2752566, 0, 0, 2818102, 0, 0, 2621495, 0, 0, 2687031, 0, 0, 2752567, 0, 0, 2818103, 0, 0, 2621496, 131072, 0, 2687032, 0, 0, 2752568, 65536, 0, 2818104, 0, 0, 2621497, 0, 0, 2687033, 0, 0, 2752569, 0, 0, 2818105, 0, 0, 2621498, 0, 0, 2687034, 0, 0, 2752570, 0, 0, 2818106, 0, 0, 2621499, 0, 0, 2687035, 0, 0, 2752571, 0, 0, 2818107, 0, 0, 2621500, 0, 0, 2687036, 0, 0, 2752572, 0, 0, 2818108, 131072, 0) layer_1/name = "Objects" -layer_1/enabled = true -layer_1/modulate = Color(1, 1, 1, 1) -layer_1/y_sort_enabled = false -layer_1/y_sort_origin = 0 -layer_1/z_index = 0 layer_1/tile_data = PackedInt32Array(1900563, 524288, 8, 1835027, 524288, 7) [node name="Camera" type="Camera2D" parent="."] diff --git a/project.godot b/project.godot index 57384d1..49115ef 100644 --- a/project.godot +++ b/project.godot @@ -12,13 +12,24 @@ config_version=5 config/name="BehaviourToolkit" run/main_scene="res://examples/behaviour_example/behaviour_example.tscn" -config/features=PackedStringArray("4.1", "Forward Plus") +config/features=PackedStringArray("4.2", "Forward Plus") config/icon="res://addons/behaviour_toolkit/icons/Logo.png" [editor_plugins] enabled=PackedStringArray("res://addons/behaviour_toolkit/plugin.cfg") +[file_customization] + +folder_colors={ +"res://addons/behaviour_toolkit/": "orange", +"res://addons/behaviour_toolkit/icons/": "purple", +"res://addons/behaviour_toolkit/ui/": "green", +"res://docs/": "blue", +"res://examples/": "pink", +"res://script_templates/": "green" +} + [filesystem] import/blender/enabled=false From c5652079a42720d9c3324749656a49372f6032b3 Mon Sep 17 00:00:00 2001 From: Pat <27511950+ThePat02@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:02:52 +0100 Subject: [PATCH 03/11] fix --- .../finite_state_machine/fsm_state_integration_return.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/behaviour_toolkit/finite_state_machine/fsm_state_integration_return.gd b/addons/behaviour_toolkit/finite_state_machine/fsm_state_integration_return.gd index 049855e..f16066e 100644 --- a/addons/behaviour_toolkit/finite_state_machine/fsm_state_integration_return.gd +++ b/addons/behaviour_toolkit/finite_state_machine/fsm_state_integration_return.gd @@ -24,7 +24,7 @@ func _on_exit(_actor: Node, _blackboard: Blackboard) -> void: pass -func _get_configuration_warnings() -> PackedStringArray: +func _get_configuration_warnings(): var warnings: Array = [] warnings.append_array(super._get_configuration_warnings()) From a14c613256539ef0b144de37f8b6cc5c024a2612 Mon Sep 17 00:00:00 2001 From: Pat <27511950+ThePat02@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:21:00 +0100 Subject: [PATCH 04/11] add: Basic warnings for the BT --- .../behaviour_tree/bt_composite.gd | 16 +++++++++++ .../behaviour_tree/bt_decorator.gd | 28 ++++++++++++++++--- .../behaviour_tree/bt_leaf.gd | 16 +++++++++++ .../behaviour_tree/bt_root.gd | 23 +++++++++++++++ 4 files changed, 79 insertions(+), 4 deletions(-) diff --git a/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd b/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd index 7d9cb40..8280209 100644 --- a/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd +++ b/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd @@ -1,6 +1,22 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTComposite.svg") class_name BTComposite extends BTBehaviour ## The leaves under the composite node. @onready var leaves: Array = get_children() + + +func _get_configuration_warnings() -> PackedStringArray: + var warnings: Array = [] + + var parent = get_parent() + var children = get_children() + + if not parent is BTComposite and not parent is BTRoot and not parent is BTDecorator: + warnings.append("BTLeaf node must be a child of BTComposite, BTDecorator or BTRoot node.") + + if children.size() == 0: + warnings.append("BTComposite node must have at least one child.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/bt_decorator.gd b/addons/behaviour_toolkit/behaviour_tree/bt_decorator.gd index e2a0d69..7e8f109 100644 --- a/addons/behaviour_toolkit/behaviour_tree/bt_decorator.gd +++ b/addons/behaviour_toolkit/behaviour_tree/bt_decorator.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTDecorator.svg") class_name BTDecorator extends BTBehaviour @@ -7,7 +8,26 @@ class_name BTDecorator extends BTBehaviour func _get_leaf() -> BTBehaviour: - if get_child_count() == 0: - return null - - return get_child(0) + if get_child_count() == 0: + return null + + return get_child(0) + + +func _get_configuration_warnings() -> PackedStringArray: + var warnings: Array = [] + + var parent = get_parent() + var children = get_children() + + if not parent is BTComposite and not parent is BTRoot: + warnings.append("Decorator node should be a child of a composite node or the root node.") + + if children.size() == 0: + warnings.append("Decorator node should have a child.") + elif children.size() > 1: + warnings.append("Decorator node should have only one child.") + elif not children[0] is BTBehaviour: + warnings.append("Decorator node should have a BTBehaviour node as a child.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/bt_leaf.gd b/addons/behaviour_toolkit/behaviour_tree/bt_leaf.gd index cc36a73..e2414e5 100644 --- a/addons/behaviour_toolkit/behaviour_tree/bt_leaf.gd +++ b/addons/behaviour_toolkit/behaviour_tree/bt_leaf.gd @@ -1,6 +1,22 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTLeaf.svg") class_name BTLeaf extends BTBehaviour func tick(_delta: float, _actor: Node, _blackboard: Blackboard) -> BTStatus: return BTStatus.SUCCESS + + +func _get_configuration_warnings() -> PackedStringArray: + var warnings: Array = [] + + var parent = get_parent() + var children = get_children() + + if not parent is BTBehaviour and not parent is BTRoot: + warnings.append("BTLeaf node must be a child of BTBehaviour or BTRoot node.") + + if children.size() > 0: + warnings.append("BTLeaf node must not have any children.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/bt_root.gd b/addons/behaviour_toolkit/behaviour_tree/bt_root.gd index 8f0bc75..8d13551 100644 --- a/addons/behaviour_toolkit/behaviour_tree/bt_root.gd +++ b/addons/behaviour_toolkit/behaviour_tree/bt_root.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTRoot.svg") class_name BTRoot extends BehaviourToolkit ## Node used as a base parent (root) of a Behaviour Tree @@ -32,6 +33,12 @@ var current_status: BTBehaviour.BTStatus func _ready() -> void: + # Don't run in editor + if Engine.is_editor_hint(): + set_physics_process(false) + set_process(false) + return + if blackboard == null: blackboard = _create_local_blackboard() @@ -68,3 +75,19 @@ func _create_local_blackboard() -> Blackboard: func _setup_processing() -> void: set_physics_process(process_type == ProcessType.PHYSICS) set_process(process_type == ProcessType.IDLE) + + +func _get_configuration_warnings() -> PackedStringArray: + var warnings: Array = [] + + var children = get_children() + + if children.size() == 0: + warnings.append("Behaviour Tree needs to have one Behaviour child.") + elif children.size() == 1: + if not children[0] is BTBehaviour: + warnings.append("The child of Behaviour Tree needs to be a Behaviour.") + elif children.size() > 1: + warnings.append("Behaviour Tree can have only one Behaviour child.") + + return warnings From 953d76b8bf69c782754fd53f95ca6bc2fb4a8f0c Mon Sep 17 00:00:00 2001 From: Pat <27511950+ThePat02@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:21:06 +0100 Subject: [PATCH 05/11] misc --- .../finite_state_machine/fsm_state_integrated_bt.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/behaviour_toolkit/finite_state_machine/fsm_state_integrated_bt.gd b/addons/behaviour_toolkit/finite_state_machine/fsm_state_integrated_bt.gd index cde55fc..c2add34 100644 --- a/addons/behaviour_toolkit/finite_state_machine/fsm_state_integrated_bt.gd +++ b/addons/behaviour_toolkit/finite_state_machine/fsm_state_integrated_bt.gd @@ -48,7 +48,7 @@ func _get_behaviour_tree() -> BTRoot: return null -func _get_configuration_warnings() -> PackedStringArray: +func _get_configuration_warnings(): var warnings: Array = [] warnings.append_array(super._get_configuration_warnings()) From 6b44dfa30e8d034c59fb808489ebfa033dac6f90 Mon Sep 17 00:00:00 2001 From: Pat <27511950+ThePat02@users.noreply.github.com> Date: Fri, 1 Dec 2023 12:00:54 +0100 Subject: [PATCH 06/11] add: Leaf warnings --- .../behaviour_tree/bt_leaf_integration.gd | 17 ++- .../behaviour_tree/leaves/leaf_call.gd | 70 ++++++--- .../behaviour_tree/leaves/leaf_condition.gd | 143 ++++++++++-------- .../behaviour_tree/leaves/leaf_event.gd | 17 ++- .../behaviour_tree/leaves/leaf_print.gd | 1 + .../behaviour_tree/leaves/leaf_signal.gd | 29 +++- .../behaviour_tree/leaves/leaf_tween.gd | 16 +- .../behaviour_tree/leaves/leaf_wait.gd | 1 + 8 files changed, 205 insertions(+), 89 deletions(-) diff --git a/addons/behaviour_toolkit/behaviour_tree/bt_leaf_integration.gd b/addons/behaviour_toolkit/behaviour_tree/bt_leaf_integration.gd index 5deaff3..4268b4c 100644 --- a/addons/behaviour_toolkit/behaviour_tree/bt_leaf_integration.gd +++ b/addons/behaviour_toolkit/behaviour_tree/bt_leaf_integration.gd @@ -1,5 +1,20 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTLeafIntegration.svg") class_name BTLeafIntegration extends BTLeaf -@export var state_machine: FiniteStateMachine +@export var state_machine: FiniteStateMachine: + set(value): + state_machine = value + update_configuration_warnings() + + +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + if state_machine == null: + warnings.append("No state machine set.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_call.gd b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_call.gd index c3951a4..f5fbb98 100644 --- a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_call.gd +++ b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_call.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTLeafCall.svg") class_name LeafCall extends BTLeaf ## Leaf that calls a method on a target node. The target can be the actor, the blackboard or a custom node. @@ -6,39 +7,62 @@ class_name LeafCall extends BTLeaf ## The target type of the call. Can be the actor, the blackboard or a custom node. enum CallTarget { - ACTOR, ## The actor node set on the BTRoot node. - BLACKBOARD, ## The blackboard node set on the BTRoot node. - CUSTOM ## A custom node set on the custom_target variable. + ACTOR, ## The actor node set on the BTRoot node. + BLACKBOARD, ## The blackboard node set on the BTRoot node. + CUSTOM ## A custom node set on the custom_target variable. } ## The method to call on the target node. -@export var method: StringName +@export var method: StringName: + set(value): + method = value + update_configuration_warnings() ## The arguments to pass to the method. @export var arguments: Array = [] @export_category("Target") ## The target type of the call. Can be the actor, the blackboard or a custom node. -@export var target_type: CallTarget = CallTarget.ACTOR +@export var target_type: CallTarget = CallTarget.ACTOR: + set(value): + target_type = value + update_configuration_warnings() ## The custom node to call the method on. Only used if target_type is set to CallTarget.CUSTOM. -@export var custom_target: Node +@export var custom_target: Node: + set(value): + custom_target = value + update_configuration_warnings() func tick(delta: float, actor: Node, blackboard: Blackboard): - var target - - match target_type: - CallTarget.ACTOR: - target = actor - CallTarget.BLACKBOARD: - target = blackboard - CallTarget.CUSTOM: - target = custom_target - - if target.has_method(method): - target.callv(method, arguments) - else: - print("Method " + method + " not found on target " + target.to_string()) - return BTStatus.FAILURE - - return BTStatus.SUCCESS + var target + + match target_type: + CallTarget.ACTOR: + target = actor + CallTarget.BLACKBOARD: + target = blackboard + CallTarget.CUSTOM: + target = custom_target + + if target.has_method(method): + target.callv(method, arguments) + else: + print("Method " + method + " not found on target " + target.to_string()) + return BTStatus.FAILURE + + return BTStatus.SUCCESS + + +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + if method == "": + warnings.append("Method is not set.") + + if target_type == CallTarget.CUSTOM and custom_target == null: + warnings.append("Target type is set to CUSTOM but no custom target is set.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_condition.gd b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_condition.gd index b768a1e..c03f513 100644 --- a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_condition.gd +++ b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_condition.gd @@ -6,38 +6,41 @@ class_name LeafCondition extends BTLeaf enum ConditionTarget { - ACTOR, - CUSTOM + ACTOR, + CUSTOM } enum ConditionValue { - STRING, - INT, - FLOAT, - BOOL + STRING, + INT, + FLOAT, + BOOL } enum ConditionType { - EQUAL, - NOT_EQUAL, - GREATER, - GREATER_EQUAL, - LESS, - LESS_EQUAL + EQUAL, + NOT_EQUAL, + GREATER, + GREATER_EQUAL, + LESS, + LESS_EQUAL } ## The property of the target node to query. -@export var condition_property: StringName +@export var condition_property: StringName: + set(value): + condition_property = value + update_configuration_warnings() ## The type of comparison to perform. @export var condition_type: ConditionType = ConditionType.EQUAL ## The type of the value to compare to. @export var value_type: ConditionValue = ConditionValue.STRING: - set(value): - value_type = value - notify_property_list_changed() + set(value): + value_type = value + notify_property_list_changed() ## The string value to compare to. @export var condition_value_string: String ## The int value to compare to. @@ -49,51 +52,71 @@ enum ConditionType { @export_category("Target") ## The target node to query. If set to ACTOR, the actor will be queried. -@export var target_type: ConditionTarget = ConditionTarget.ACTOR +@export var target_type: ConditionTarget = ConditionTarget.ACTOR: + set(value): + target_type = value + update_configuration_warnings() ## The custom node to query. Only used if target_type is set to CUSTOM. -@export var custom_target: Node +@export var custom_target: Node: + set(value): + custom_target = value + update_configuration_warnings() func tick(delta: float, actor: Node, _blackboard: Blackboard): - var target: Node - match target_type: - ConditionTarget.ACTOR: - target = actor - ConditionTarget.CUSTOM: - target = custom_target - - var value: Variant - match value_type: - ConditionValue.STRING: - value = condition_value_string - ConditionValue.INT: - value = condition_value_int - ConditionValue.FLOAT: - value = condition_value_float - ConditionValue.BOOL: - value = condition_value_bool - - var property_value = target.get(condition_property) - - if property_value == null: - return BTStatus.FAILURE - - var result: bool - match condition_type: - ConditionType.EQUAL: - result = property_value == value - ConditionType.NOT_EQUAL: - result = property_value != value - ConditionType.GREATER: - result = property_value > value - ConditionType.GREATER_EQUAL: - result = property_value >= value - ConditionType.LESS: - result = property_value < value - ConditionType.LESS_EQUAL: - result = property_value <= value - - if not result: - return BTStatus.FAILURE - - return BTStatus.SUCCESS + var target: Node + match target_type: + ConditionTarget.ACTOR: + target = actor + ConditionTarget.CUSTOM: + target = custom_target + + var value: Variant + match value_type: + ConditionValue.STRING: + value = condition_value_string + ConditionValue.INT: + value = condition_value_int + ConditionValue.FLOAT: + value = condition_value_float + ConditionValue.BOOL: + value = condition_value_bool + + var property_value = target.get(condition_property) + + if property_value == null: + return BTStatus.FAILURE + + var result: bool + match condition_type: + ConditionType.EQUAL: + result = property_value == value + ConditionType.NOT_EQUAL: + result = property_value != value + ConditionType.GREATER: + result = property_value > value + ConditionType.GREATER_EQUAL: + result = property_value >= value + ConditionType.LESS: + result = property_value < value + ConditionType.LESS_EQUAL: + result = property_value <= value + + if not result: + return BTStatus.FAILURE + + return BTStatus.SUCCESS + + +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + if condition_property == "": + warnings.append("Condition property is empty.") + + if target_type == ConditionTarget.CUSTOM and custom_target == null: + warnings.append("Custom target is not assigned.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_event.gd b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_event.gd index 055e9c2..9ab2c74 100644 --- a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_event.gd +++ b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_event.gd @@ -1,11 +1,26 @@ +@tool class_name LeafFSMEvent extends BTLeafIntegration ## This node fires an event on a state machine. -@export var event: String +@export var event: StringName: + set(value): + event = value + update_configuration_warnings() @export var return_status: BTStatus = BTStatus.SUCCESS func tick(_delta: float, _actor: Node, _blackboard: Blackboard) -> BTStatus: state_machine.fire_event(event) return return_status + + +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + if event == "": + warnings.append("Event is empty.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_print.gd b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_print.gd index 987d5d5..cd5bdcb 100644 --- a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_print.gd +++ b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_print.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTLeafPrint.svg") class_name LeafPrint extends BTLeaf diff --git a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_signal.gd b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_signal.gd index c8ed02c..969a4bc 100644 --- a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_signal.gd +++ b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_signal.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTLeafSignal.svg") class_name LeafSignal extends BTLeaf ## Leaf that emits a signal with optional array of arguments. @@ -22,17 +23,26 @@ signal leaf_emitted(arguments_array: Array) ## The signal name to call on the target node. -@export var signal_name: StringName +@export var signal_name: StringName: + set(value): + signal_name = value + update_configuration_warnings() ## Array of arguments emitted with the [code]leaf_emitted/code] signal. @export var arguments: Array = [] @export_category("Target") ## The target type to emit signal. Can be the actor, a custom node ## or [LeafSignal] own signal `leaf_emitted` (When target type is `Self`). -@export var target_type: EmitTarget = EmitTarget.SELF +@export var target_type: EmitTarget = EmitTarget.SELF: + set(value): + target_type = value + update_configuration_warnings() ## The custom node to call the method on. Only used if target_type ## is set toCallTarget.CUSTOM. -@export var custom_target: Node +@export var custom_target: Node: + set(value): + custom_target = value + update_configuration_warnings() @@ -57,3 +67,16 @@ func tick(_delta: float, _actor: Node, _blackboard: Blackboard) -> BTStatus: return BTStatus.SUCCESS + +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + if signal_name == "": + warnings.append("Signal is not set.") + + if target_type == EmitTarget.CUSTOM and custom_target == null: + warnings.append("Target type is set to Custom but no custom target is set.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_tween.gd b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_tween.gd index b908b1b..7322353 100644 --- a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_tween.gd +++ b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_tween.gd @@ -22,7 +22,10 @@ enum TweenValueType { @export var duration: float = 2.0 ## The property to tween. ## For example: "rotation:y" or "scale" -@export var tween_property: String +@export var tween_property: String: + set(value): + tween_property = value + update_configuration_warnings() ## The value type of the tween. @export var tween_value_type: TweenValueType: set = set_tween_value_type ## The integer value to tween to. @@ -105,3 +108,14 @@ func _init_tween(actor: Node): tween.tween_property(actor, tween_property, tween_value, duration).as_relative() else: tween.tween_property(actor, tween_property, tween_value, duration) + + +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + if tween_property == "": + warnings.append("Tween property is empty.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_wait.gd b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_wait.gd index fae3108..2c07b48 100644 --- a/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_wait.gd +++ b/addons/behaviour_toolkit/behaviour_tree/leaves/leaf_wait.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTLeafWait.svg") class_name LeafWait extends BTLeaf From 0ea5f12f6a7b49969e10559b00891527cb1bba4a Mon Sep 17 00:00:00 2001 From: Pat <27511950+ThePat02@users.noreply.github.com> Date: Sat, 9 Dec 2023 13:18:54 +0100 Subject: [PATCH 07/11] add: Warnings for Composites --- .../behaviour_tree/bt_composite.gd | 7 ++++-- .../composites/bt_integrated_fsm.gd | 24 ++++++++++++++++++- .../behaviour_tree/composites/bt_selector.gd | 1 + .../behaviour_tree/composites/bt_sequence.gd | 1 + 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd b/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd index 8280209..42d8d14 100644 --- a/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd +++ b/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd @@ -13,10 +13,13 @@ func _get_configuration_warnings() -> PackedStringArray: var parent = get_parent() var children = get_children() - if not parent is BTComposite and not parent is BTRoot and not parent is BTDecorator: - warnings.append("BTLeaf node must be a child of BTComposite, BTDecorator or BTRoot node.") + if not parent is BTComposite and not parent is BTRoot: + warnings.append("BTComposite node must be a child of BTComposite or BTRoot node.") if children.size() == 0: warnings.append("BTComposite node must have at least one child.") + + if children.size() == 1: + warnings.append("BTComposite node should have more than one child.") return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/composites/bt_integrated_fsm.gd b/addons/behaviour_toolkit/behaviour_tree/composites/bt_integrated_fsm.gd index 0ebe8b8..99a5004 100644 --- a/addons/behaviour_toolkit/behaviour_tree/composites/bt_integrated_fsm.gd +++ b/addons/behaviour_toolkit/behaviour_tree/composites/bt_integrated_fsm.gd @@ -1,9 +1,14 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTCompositeIntegration.svg") class_name BTIntegratedFSM extends BTComposite -@onready var state_machine: FiniteStateMachine = _get_machine() +var state_machine: FiniteStateMachine = null +func _ready(): + if not Engine.is_editor_hint(): + state_machine = _get_machine() + func tick(_delta: float, _actor: Node, _blackboard: Blackboard) -> BTStatus: if state_machine.active == false: @@ -20,3 +25,20 @@ func _get_machine() -> FiniteStateMachine: return null else: return get_child(0) + + +func _get_configuration_warnings(): + var warnings: Array = [] + var children = get_children() + + if children.size() == 0: + warnings.append("BTIntegratedFSM must have a child node. The first child will be used as the state machine.") + + if children.size() > 1: + warnings.append("BTIntegratedFSM can only have one child node. The first child will be used as the state machine.") + + if children.size() == 1: + if not children[0] is FiniteStateMachine: + warnings.append("BTIntegratedFSM's child node must be a FiniteStateMachine. The first child will be used as the state machine.") + + return warnings diff --git a/addons/behaviour_toolkit/behaviour_tree/composites/bt_selector.gd b/addons/behaviour_toolkit/behaviour_tree/composites/bt_selector.gd index ecc4876..9fdfaaa 100644 --- a/addons/behaviour_toolkit/behaviour_tree/composites/bt_selector.gd +++ b/addons/behaviour_toolkit/behaviour_tree/composites/bt_selector.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTCompositeSelector.svg") class_name BTSelector extends BTComposite ## Selects the first child that succeeds, or fails if none do. diff --git a/addons/behaviour_toolkit/behaviour_tree/composites/bt_sequence.gd b/addons/behaviour_toolkit/behaviour_tree/composites/bt_sequence.gd index 594bad2..9a0954c 100644 --- a/addons/behaviour_toolkit/behaviour_tree/composites/bt_sequence.gd +++ b/addons/behaviour_toolkit/behaviour_tree/composites/bt_sequence.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTCompositeSequence.svg") class_name BTSequence extends BTComposite ## A sequence node will return success if all of its children return success. From 0ff23b0d5885219b566b577395a2816b39c9da52 Mon Sep 17 00:00:00 2001 From: Pat <27511950+ThePat02@users.noreply.github.com> Date: Sat, 9 Dec 2023 13:21:00 +0100 Subject: [PATCH 08/11] misc --- addons/behaviour_toolkit/behaviour_tree/bt_composite.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd b/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd index 42d8d14..e598abf 100644 --- a/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd +++ b/addons/behaviour_toolkit/behaviour_tree/bt_composite.gd @@ -13,7 +13,7 @@ func _get_configuration_warnings() -> PackedStringArray: var parent = get_parent() var children = get_children() - if not parent is BTComposite and not parent is BTRoot: + if not parent is BTComposite and not parent is BTRoot and not parent is BTDecorator: warnings.append("BTComposite node must be a child of BTComposite or BTRoot node.") if children.size() == 0: From c3aade6c1365e08858b6e60b88b69d275819fb79 Mon Sep 17 00:00:00 2001 From: Pat <27511950+ThePat02@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:39:42 +0100 Subject: [PATCH 09/11] misc: Update Templates --- script_templates/BTComposite/new_composite.gd | 1 + script_templates/BTDecorator/new_decorator.gd | 1 + script_templates/BTLeaf/new_leaf.gd | 1 + script_templates/FSMState/new_state.gd | 1 + script_templates/FSMTransition/new_transition.gd | 1 + 5 files changed, 5 insertions(+) diff --git a/script_templates/BTComposite/new_composite.gd b/script_templates/BTComposite/new_composite.gd index 0765848..0326994 100644 --- a/script_templates/BTComposite/new_composite.gd +++ b/script_templates/BTComposite/new_composite.gd @@ -1,3 +1,4 @@ +@tool extends BTComposite diff --git a/script_templates/BTDecorator/new_decorator.gd b/script_templates/BTDecorator/new_decorator.gd index 91cc4e8..c067698 100644 --- a/script_templates/BTDecorator/new_decorator.gd +++ b/script_templates/BTDecorator/new_decorator.gd @@ -1,3 +1,4 @@ +@tool extends BTDecorator diff --git a/script_templates/BTLeaf/new_leaf.gd b/script_templates/BTLeaf/new_leaf.gd index fe8c488..681b58c 100644 --- a/script_templates/BTLeaf/new_leaf.gd +++ b/script_templates/BTLeaf/new_leaf.gd @@ -1,3 +1,4 @@ +@tool extends BTLeaf diff --git a/script_templates/FSMState/new_state.gd b/script_templates/FSMState/new_state.gd index 0d00ace..a2b2e71 100644 --- a/script_templates/FSMState/new_state.gd +++ b/script_templates/FSMState/new_state.gd @@ -1,3 +1,4 @@ +@tool extends FSMState diff --git a/script_templates/FSMTransition/new_transition.gd b/script_templates/FSMTransition/new_transition.gd index 2061de0..ef5dc06 100644 --- a/script_templates/FSMTransition/new_transition.gd +++ b/script_templates/FSMTransition/new_transition.gd @@ -1,3 +1,4 @@ +@tool extends FSMTransition # Executed when the transition is taken. From 5efb8db584e404c4d364f720a3c135d3cf5439b0 Mon Sep 17 00:00:00 2001 From: Pat Date: Wed, 13 Dec 2023 14:04:53 +0100 Subject: [PATCH 10/11] add: Tool keyword to all composites and decorators --- .../behaviour_tree/composites/bt_random_selector.gd | 1 + .../behaviour_tree/composites/bt_random_sequence.gd | 1 + .../behaviour_tree/composites/bt_simple_parallel.gd | 1 + .../behaviour_tree/decorators/decorator_always_fail.gd | 1 + .../behaviour_tree/decorators/decorator_always_succeed.gd | 1 + .../behaviour_tree/decorators/decorator_inverter.gd | 1 + .../behaviour_tree/decorators/decorator_limiter.gd | 1 + .../behaviour_tree/decorators/decorator_repeat.gd | 1 + 8 files changed, 8 insertions(+) diff --git a/addons/behaviour_toolkit/behaviour_tree/composites/bt_random_selector.gd b/addons/behaviour_toolkit/behaviour_tree/composites/bt_random_selector.gd index 3bb75ad..ebb596f 100644 --- a/addons/behaviour_toolkit/behaviour_tree/composites/bt_random_selector.gd +++ b/addons/behaviour_toolkit/behaviour_tree/composites/bt_random_selector.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTCompositeRandomSelector.svg") class_name BTRandomSelector extends BTComposite ## The selector composite but with a random order of the leaves. diff --git a/addons/behaviour_toolkit/behaviour_tree/composites/bt_random_sequence.gd b/addons/behaviour_toolkit/behaviour_tree/composites/bt_random_sequence.gd index 6532eca..f219032 100644 --- a/addons/behaviour_toolkit/behaviour_tree/composites/bt_random_sequence.gd +++ b/addons/behaviour_toolkit/behaviour_tree/composites/bt_random_sequence.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTCompositeRandomSequence.svg") class_name BTRandomSequence extends BTComposite ## The squence composite but with a random order of the leaves. diff --git a/addons/behaviour_toolkit/behaviour_tree/composites/bt_simple_parallel.gd b/addons/behaviour_toolkit/behaviour_tree/composites/bt_simple_parallel.gd index 95563d9..5e4b62b 100644 --- a/addons/behaviour_toolkit/behaviour_tree/composites/bt_simple_parallel.gd +++ b/addons/behaviour_toolkit/behaviour_tree/composites/bt_simple_parallel.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTSimpleParallel.svg") class_name BTSimpleParallel extends BTComposite ## Executes all children in parallel, and returns SUCCESS depending on the policy. It returns FAILURE if any child returns FAILURE. diff --git a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_always_fail.gd b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_always_fail.gd index 795131b..9ddaf1c 100644 --- a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_always_fail.gd +++ b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_always_fail.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTDecoratorFail.svg") class_name BTAlwaysFail extends BTDecorator ## The leaf will always fail after running. diff --git a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_always_succeed.gd b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_always_succeed.gd index 28ad106..5bbbf60 100644 --- a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_always_succeed.gd +++ b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_always_succeed.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTDecoratorSucceed.svg") class_name BTAlwaysSucceed extends BTDecorator ## The leaf will always succeed after running. diff --git a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_inverter.gd b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_inverter.gd index 0ba9264..5acc12f 100644 --- a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_inverter.gd +++ b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_inverter.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTDecoratorNot.svg") class_name BTInverter extends BTDecorator ## The result of the leaf is inverted. diff --git a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_limiter.gd b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_limiter.gd index 2cd16e1..a696c39 100644 --- a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_limiter.gd +++ b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_limiter.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTDecoratorLimiter.svg") class_name BTLimiter extends BTDecorator ## Limits the number of times a leaf can be run. (The leaf will fully run, before triggering the limit.) diff --git a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_repeat.gd b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_repeat.gd index c9d5976..c13a873 100644 --- a/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_repeat.gd +++ b/addons/behaviour_toolkit/behaviour_tree/decorators/decorator_repeat.gd @@ -1,3 +1,4 @@ +@tool @icon("res://addons/behaviour_toolkit/icons/BTDecoratorRepeat.svg") class_name BTRepeat extends BTDecorator ## Repeats the leaf a number of times. From e3dd6e4496e389b83464a61fbfcf235296d4db58 Mon Sep 17 00:00:00 2001 From: Pat Date: Wed, 13 Dec 2023 14:09:25 +0100 Subject: [PATCH 11/11] add: Custom config warnings to templates --- script_templates/BTComposite/new_composite.gd | 12 ++++++++++++ script_templates/BTDecorator/new_decorator.gd | 12 ++++++++++++ script_templates/BTLeaf/new_leaf.gd | 12 ++++++++++++ script_templates/FSMState/new_state.gd | 12 ++++++++++++ script_templates/FSMTransition/new_transition.gd | 12 ++++++++++++ 5 files changed, 60 insertions(+) diff --git a/script_templates/BTComposite/new_composite.gd b/script_templates/BTComposite/new_composite.gd index 0326994..7fbb7df 100644 --- a/script_templates/BTComposite/new_composite.gd +++ b/script_templates/BTComposite/new_composite.gd @@ -9,3 +9,15 @@ func tick(_delta: float, _actor: Node, _blackboard: Blackboard) -> BTStatus: # Return BTStatus depending on the result of the leaves # Return BTStatus.RUNNING, if there are still leaves to tick return BTStatus.SUCCESS + + +# Add custom configuration warnings +# Note: Can be deleted if you don't want to define your own warnings. +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + # Add your own warnings to the array here + + return warnings diff --git a/script_templates/BTDecorator/new_decorator.gd b/script_templates/BTDecorator/new_decorator.gd index c067698..6315d99 100644 --- a/script_templates/BTDecorator/new_decorator.gd +++ b/script_templates/BTDecorator/new_decorator.gd @@ -10,3 +10,15 @@ func tick(_delta: float, _actor: Node, _blackboard: Blackboard) -> BTStatus: # Augment the response of the leaf return response + + +# Add custom configuration warnings +# Note: Can be deleted if you don't want to define your own warnings. +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + # Add your own warnings to the array here + + return warnings diff --git a/script_templates/BTLeaf/new_leaf.gd b/script_templates/BTLeaf/new_leaf.gd index 681b58c..7d0d4be 100644 --- a/script_templates/BTLeaf/new_leaf.gd +++ b/script_templates/BTLeaf/new_leaf.gd @@ -7,3 +7,15 @@ func tick(_delta: float, _actor: Node, _blackboard: Blackboard) -> BTStatus: # Handle leaf logic # Return SUCCESS, FAILURE, or RUNNING return BTStatus.SUCCESS + + +# Add custom configuration warnings +# Note: Can be deleted if you don't want to define your own warnings. +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + # Add your own warnings to the array here + + return warnings diff --git a/script_templates/FSMState/new_state.gd b/script_templates/FSMState/new_state.gd index a2b2e71..4e52802 100644 --- a/script_templates/FSMState/new_state.gd +++ b/script_templates/FSMState/new_state.gd @@ -15,3 +15,15 @@ func _on_update(_delta: float, _actor: Node, _blackboard: Blackboard) -> void: # Executes before the state is exited. func _on_exit(_actor: Node, _blackboard: Blackboard) -> void: pass + + +# Add custom configuration warnings +# Note: Can be deleted if you don't want to define your own warnings. +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + # Add your own warnings to the array here + + return warnings diff --git a/script_templates/FSMTransition/new_transition.gd b/script_templates/FSMTransition/new_transition.gd index ef5dc06..de5fe45 100644 --- a/script_templates/FSMTransition/new_transition.gd +++ b/script_templates/FSMTransition/new_transition.gd @@ -9,3 +9,15 @@ func _on_transition(_delta: float, _actor: Node, _blackboard: Blackboard) -> voi # Evaluates true, if the transition conditions are met. func is_valid(_actor: Node, _blackboard: Blackboard) -> bool: return false + + +# Add custom configuration warnings +# Note: Can be deleted if you don't want to define your own warnings. +func _get_configuration_warnings(): + var warnings: Array = [] + + warnings.append_array(super._get_configuration_warnings()) + + # Add your own warnings to the array here + + return warnings