Commit Graph

  • cbabefc2d0 (f66183740) Add texts for rescue objective. Joonas Rikkonen 2019-05-16 05:38:35 +03:00
  • 674f5a656f (65debb5e8) Remove HasAccessToPath method. Add CanAccessThroughDoor method and use it in GetNodePenalty method. Shouldn't anymore find paths to places where doesn't have access to. TODO: CheckDoorsInPath should ideally use the same code for checking the doors, but since it works ok, I didn't touch it (much). Merely reduced the interact distance. Joonas Rikkonen 2019-05-16 05:38:17 +03:00
  • 4695e6f92b (89fea1963) Refactoring and fixing: - Remove relatively expensive HasAccessToPath calls. - Fix finding diving gear subobjective of goto main objective not checking if we need the gear. - Move the abandon checks from CanBeCompleted property under Act method and use the inherited property. Fixes incorrect results when the goto objective is not the active objective. - Improve the support for concurrent sub objectives. Joonas Rikkonen 2019-05-16 05:38:02 +03:00
  • 96eb27140e (ab2157c70) Remove KeepDivingGear property, because it can cause issues when the objective tree is deep. Checking the property is possible via recursion, but it seems that the checks can miss a frame. Instead, let's just make it simple and remove the diving suit only when idling. Joonas Rikkonen 2019-05-16 05:37:46 +03:00
  • c060c90cba (e3f599b5d) Go to objective checks the path access only once per second. Add notes. Joonas Rikkonen 2019-05-16 05:37:29 +03:00
  • 6f9690eeaf (326dbd217) Don't take the diving suit off while trying to get a diving suit as a part of the goto objective. Fixes bots occasionally standing next to the diving suit cabinet apparently holding the suit in hands but not putting it on or moving anywhere. Joonas Rikkonen 2019-05-16 05:37:14 +03:00
  • 01743eb7e1 (6fe53068b) Add a wait timer at the beginning and a temporal spread on creating the autonomous objectives. Should improve performance, because the find target loops are thus spread a bit. Joonas Rikkonen 2019-05-16 05:36:58 +03:00
  • 0ca644a559 (4aad704b7) Simplify. Joonas Rikkonen 2019-05-16 05:36:42 +03:00
  • 28eef39b64 (97c11681e) Abandon the operate item objective if the controller is not found. Joonas Rikkonen 2019-05-16 05:36:23 +03:00
  • 8280ed9c1a (3b137aa1a) Merge remote-tracking branch 'origin/dev' into human-ai Joonas Rikkonen 2019-05-16 05:36:05 +03:00
  • 5ba3c802ea (d4abdd937) Fix security officers fleeing from the enemy and others ignoring them until attacked :D Joonas Rikkonen 2019-05-16 05:35:47 +03:00
  • 14e894cbc8 (82dc10a74) Some margin. Joonas Rikkonen 2019-05-16 05:35:30 +03:00
  • 9fba7b1d7a (1136677c2) Fix Extinguish fire objective. Implement ConcurrentObjectives property (should use this for Combat). Joonas Rikkonen 2019-05-16 05:35:12 +03:00
  • e1584be2f7 (bfd095a0a) Fix a bunch of bugs related to the recent refactoring. Joonas Rikkonen 2019-05-16 05:34:56 +03:00
  • 6bb7f5f0f1 (5dc7f59e5) Remove an unnecessary check. The priority system should take care of this. Joonas Rikkonen 2019-05-16 05:34:37 +03:00
  • 70ffc27667 (e80994d9b) Refactor get item. Joonas Rikkonen 2019-05-16 05:34:19 +03:00
  • f667ed8e12 (3f4e69c0d) Only unequip items when idling. Fixes bots not being able to repair, because the tools were unequipped (if they were weapons). Joonas Rikkonen 2019-05-16 05:34:03 +03:00
  • 155cb83f91 (f0f961ac3) Fix some priority related issues. Joonas Rikkonen 2019-05-16 05:33:46 +03:00
  • 3b72edfe94 (227a6e696) Improve readability. Joonas Rikkonen 2019-05-16 05:33:29 +03:00
  • e367f900b8 (2a4bd39c2) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:33:13 +03:00
  • a3db11876b (d34fb2097) Major refactoring: - Replace custom logic regarding subobjectives with generic logic. - Ensure that all the objectives follow the same logic, reduce duplicate code where possible. Joonas Rikkonen 2019-05-16 05:32:56 +03:00
  • 05270aa165 (d9e651e1c) Add a generic method for handling subobjectives, when we don't use a collection but individual references instead. Joonas Rikkonen 2019-05-16 05:32:37 +03:00
  • 0714599f05 (10a11fd09) Rename a variable. Joonas Rikkonen 2019-05-16 05:32:20 +03:00
  • 2b029fc61a (0c17563ce) Temporarily disable the initiative. Joonas Rikkonen 2019-05-16 05:32:04 +03:00
  • 5f610caadd (f0837188e) Bots now target only reported targets when the objective is not an order. Joonas Rikkonen 2019-05-16 05:31:48 +03:00
  • 4f825ce309 (dabdac1a8) Fix bots waiting where they should not wait. Joonas Rikkonen 2019-05-16 05:31:31 +03:00
  • 27506eb10f (2aa8e6b24) Reduce the get item range. Joonas Rikkonen 2019-05-16 05:31:15 +03:00
  • ddd61a9243 (6d28a11e5) Ignore platforms in pathfinder raycasts. Should fix #1450. Joonas Rikkonen 2019-05-16 05:30:58 +03:00
  • 7614642d93 (e7b2add9d) Merge branch 'human-ai' of https://github.com/Regalis11/Barotrauma-development into human-ai Joonas Rikkonen 2019-05-16 05:30:39 +03:00
  • 54a0164f89 (98501b696) Reduce the max accepted distance for repair tool ai operate. Joonas Rikkonen 2019-05-16 05:30:23 +03:00
  • 348f21598e (439481a07) Set the random factor for initiative each time the objective changes and once per 5 secs when the idle is active. Change the formula. Fix the waiting after character has been unselected. Joonas Rikkonen 2019-05-16 05:30:06 +03:00
  • ca3b5ae04b (0976ef4d1) Fix repair hint text being displayed even when the item condition is not below the threshold. Move the GetHUDText method from shared to client project. Joonas Rikkonen 2019-05-16 05:29:50 +03:00
  • 32fe6e24de (991f75225) Change the welding progress bar size. Joonas Rikkonen 2019-05-16 05:29:33 +03:00
  • 49ad45f34d (0f4d3b087) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:29:17 +03:00
  • 9334b71939 (d732f31b3) Enable initiative and courage. Implement initiative. Joonas Rikkonen 2019-05-16 05:28:59 +03:00
  • eadd063950 (d82a5d3f3) Use the wait delay for all objectives that are not orders (instead of just idle). Joonas Rikkonen 2019-05-16 05:28:41 +03:00
  • 874bc07cfd (a4af8c68b) Don't try to open doors that are stuck. Joonas Rikkonen 2019-05-16 05:28:24 +03:00
  • b628abbf7d (ec7e0c3d1) Take stuck and open doors into account when evaluating path access. Joonas Rikkonen 2019-05-16 05:28:07 +03:00
  • 3bce90251a (133a5b1da) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:27:51 +03:00
  • ab49749f8b (877db615c) Set find safety priority to 100 when the current hull is null. Joonas Rikkonen 2019-05-16 05:27:33 +03:00
  • 8621d9927e (a21f15055) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:27:17 +03:00
  • 78b1d8ef8d (d0dd81be0) Rename a method. Joonas Rikkonen 2019-05-16 05:26:58 +03:00
  • 0325ddf9c6 (8ac0eb1bc) Add the remaining texts. Joonas Rikkonen 2019-05-16 05:26:42 +03:00
  • a447a47661 (06129f656) Add some missing texts. Incomplete. Joonas Rikkonen 2019-05-16 05:26:25 +03:00
  • 268389a128 (c5e44ed94) Take access into account before accepting a path. Fixes bots trying to reach places where they have no access to (#1351). Joonas Rikkonen 2019-05-16 05:26:09 +03:00
  • 812598774e (24bcea40e) Fix the ai checks about door buttons. Don't aim at targets that cannot be seen. Joonas Rikkonen 2019-05-16 05:25:52 +03:00
  • bd4b3bd7f9 (479cebd45) Fix not being able to open partially broken doors with integrated buttons. Joonas Rikkonen 2019-05-16 05:25:35 +03:00
  • f46990d539 (d74fee449) Revert "Fix bots not knowing how to use the integrated controllers, effectively failing to use the doors with integrated buttons." Joonas Rikkonen 2019-05-16 05:25:20 +03:00
  • e4f41789b0 (143d158cb) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:25:02 +03:00
  • 9fab69663b (f4fb7a3ad) Rename "automatic orders" to "autonomous objectives". Joonas Rikkonen 2019-05-16 05:24:45 +03:00
  • e284e1039a (ee2d498e3) Fix bots ignoring doors when shooting. Joonas Rikkonen 2019-05-16 05:24:28 +03:00
  • 4c53a56b20 (e25e32b17) Fix bots not knowing how to use the integrated controllers, effectively failing to use the doors with integrated buttons. Joonas Rikkonen 2019-05-16 05:24:11 +03:00
  • 77f1d0ea8e (a843b19d4) Optimize distance checks. Joonas Rikkonen 2019-05-16 05:23:55 +03:00
  • 52d25694ed (050157f65) Fix bots not being able to use buttons or ladders because the were aiming. Don't aim when farther than 500 pixels away from the target. Joonas Rikkonen 2019-05-16 05:23:39 +03:00
  • 053ef60fc4 (deee8cd6d) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:23:20 +03:00
  • abd19f614f (913d93c32) Setup new skills: initiative and courage. Not yet implemented. Joonas Rikkonen 2019-05-16 05:23:03 +03:00
  • 8f8ff7f1a9 (7e5ee2800) Add the job requirement for fight intruders order. Joonas Rikkonen 2019-05-16 05:22:47 +03:00
  • cf55de90ba (0ccb08c95) Remove item collision category, since we only want to check the walls and the characters here. Joonas Rikkonen 2019-05-16 05:22:30 +03:00
  • ad604a44c4 (0bc1c5f88) Fix bots trying to rescue enemies in single player game. Joonas Rikkonen 2019-05-16 05:22:12 +03:00
  • 99307f764a (a47ab977d) Allow shooting through platforms. Joonas Rikkonen 2019-05-16 05:21:56 +03:00
  • 9ec9adb2a7 (cec5cdbcd) Reset steering when an objective is activated. Joonas Rikkonen 2019-05-16 05:21:39 +03:00
  • f95a59cc50 (cc14ef57a) Remove the Doing text, because it's not used and because there can be multiple. Remove order names, because they should be defined in EnglishVanilla.xml. Add todo notes about the texts. Joonas Rikkonen 2019-05-16 05:21:20 +03:00
  • 1e200722ae (81244db07) Implement AIObjectiveFightIntruders. Joonas Rikkonen 2019-05-16 05:21:03 +03:00
  • 88de435487 (cf495e03c) Check the visibility to the target when engaging (the distance is not enough, if there's something blocking the line of sight). Joonas Rikkonen 2019-05-16 05:20:45 +03:00
  • 3d7a113d75 (048b753e6) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:20:29 +03:00
  • 7b6c2f1fa8 (663910402) Unequip weapons when not in combat mode and all items when idling. Joonas Rikkonen 2019-05-16 05:20:11 +03:00
  • 3b313976c5 (5394332a8) Add a note. Joonas Rikkonen 2019-05-16 05:19:52 +03:00
  • bcd18aab4e (8025561da) Implement offensive combat. Joonas Rikkonen 2019-05-16 05:19:31 +03:00
  • 363eb0540a (a8f2f39bd) The ai now sorts the weapons by the combat priority value, which can be set in xml. Ranged weapons are favored. The required items are also taken into account. Joonas Rikkonen 2019-05-16 05:19:14 +03:00
  • 9facded24c (2561cb6ea) Tune the priority modifiers. Joonas Rikkonen 2019-05-16 05:18:55 +03:00
  • 65e284bf7c (0fde6c604) Ignore dangerous targets. Joonas Rikkonen 2019-05-16 05:18:37 +03:00
  • fea0c31e85 (27b4fa143) Tune the priority modifiers. Joonas Rikkonen 2019-05-16 05:18:18 +03:00
  • f61bff8970 (a1fe45652) Add some margin. Joonas Rikkonen 2019-05-16 05:18:01 +03:00
  • cbfef49e9d (d9fd52f40) Change the priority calculations for charge batteries and pump water loops. Tweak the operate item priority calculation. Joonas Rikkonen 2019-05-16 05:17:42 +03:00
  • c9bfc21880 (49f837fbb) Fix: operate battery or pump should not be looping objectives. Joonas Rikkonen 2019-05-16 05:17:24 +03:00
  • c8160f6e0b (a599eccb0) Expose the ai recharge target ratio and add a property for easy accessing to the recharge ratio. Joonas Rikkonen 2019-05-16 05:17:06 +03:00
  • 6c777aa91e (d7e59613a) Ignore broken items. Joonas Rikkonen 2019-05-16 05:16:47 +03:00
  • 6bdd0ab8c0 (83ad1f3d2) Fix a null reference exception. Joonas Rikkonen 2019-05-16 05:16:31 +03:00
  • 5b3696f7e4 (d16942d30) Simplify. Joonas Rikkonen 2019-05-16 05:16:13 +03:00
  • bbce41fab0 (bd2976a16) Add some automatic orders. Joonas Rikkonen 2019-05-16 05:15:52 +03:00
  • 82d74f7481 (a1ebc2642) Use lazy loading to ensure that the list is assigned when it's needed. Fixes null reference exceptions when pumping water or charging batteries. Joonas Rikkonen 2019-05-16 05:15:34 +03:00
  • 108e42edb0 (b5250291f) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:15:16 +03:00
  • b02565796a (98f1dbf5e) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:14:58 +03:00
  • 7f72f72ca7 (9c0250ef1) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:14:40 +03:00
  • 2ae54a01a5 (ac7ab10b0) Pass AIObjectiveManager reference in the constructors instead of methods so that we can always access it. Joonas Rikkonen 2019-05-16 05:14:20 +03:00
  • bec7aadfa9 (af16ecdfa) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:14:00 +03:00
  • 8be0b0676e (83868bb0e) Refactor AIObjectiveExtinguishFires to use the AIObjectiveLoop class. Significant refactoring of the other looping objectives. Reduce the duplicate code. Joonas Rikkonen 2019-05-16 05:13:40 +03:00
  • 7fb7c13198 (fbfb76aeb) Implement automatic extinguishing. TODO: should use the AIObjectiveLoop class. Joonas Rikkonen 2019-05-16 05:13:21 +03:00
  • ab2ca90d08 (900eddc26) Take the priority modifier in account when calculating the priority, not the max value. Joonas Rikkonen 2019-05-16 05:13:03 +03:00
  • 3c8707fc16 (d9d8b0f27) Always display waypoint ids in debug draw. Adjust the positions and the colors. Joonas Rikkonen 2019-05-16 05:12:44 +03:00
  • e06a473b41 (a63bd205d) Adjust automatic order priority modifiers. Joonas Rikkonen 2019-05-16 05:12:24 +03:00
  • 019712ef66 (829458a66) Don't apply priority modifier on the priority value, because it's already applied to the max value. The priority value should be normalized, because we are using the lerp. Joonas Rikkonen 2019-05-16 05:12:07 +03:00
  • dbccd76613 (c6ca0ef58) Recreate objectives when the bot is dismissed. Joonas Rikkonen 2019-05-16 05:11:49 +03:00
  • de8a23f687 (1137f730e) Instead of forcing the looping objectives to use the average, let them decide the method of evaluating the targets. Use the highest priority for now. Joonas Rikkonen 2019-05-16 05:11:32 +03:00
  • 759e4aee0d (96ccafd88) Fix the goto objective not always completing because of too high NearEnough value. Joonas Rikkonen 2019-05-16 05:11:17 +03:00
  • 9a1e7f8212 (1c6954251) Add IsLoop property. Fixes operate item orders being removed when they are done. Instead of calling loopable objectives done, let's just use the priority system. Joonas Rikkonen 2019-05-16 05:11:01 +03:00
  • 781fd44a8c (4efa46ffe) Limit the base priority due to devotion to 10. Joonas Rikkonen 2019-05-16 05:10:42 +03:00
  • cdeb6d40b3 (f3bfe1ac4) Fix damage priority calculation. Joonas Rikkonen 2019-05-16 05:10:25 +03:00
  • 9cc9137fff (b8fa3b004) Merge branch 'dev' into human-ai Joonas Rikkonen 2019-05-16 05:10:07 +03:00
  • 7ebb0be29b (db42ef494) Don't allow combat priority go over 100. Joonas Rikkonen 2019-05-16 05:09:51 +03:00