Changes between Version 9 and Version 10 of PetraBot
- Timestamp:
- Jan 12, 2016, 8:43:47 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PetraBot
v9 v10 53 53 = [=#queueManager !QueueManager] = 54 54 55 The queueManager has several individual queues under its control, which each have a priority (dynamically adjustable). Plans (queueplan -building.js, queueplan-research.js and queueplan-training.js, all deriving from queueplan--.js) are created when necessary by themodules and are added to a suitable queue. The plans persist and are never destroyed until they are executed.55 The queueManager has several individual queues under its control, which each have a priority (dynamically adjustable). Plans (queueplanBuilding.js, queueplanResearch.js and queueplanTraining.js, all deriving from queueplan.js) are created when necessary by the different modules and are added to a suitable queue. The plans persist and are never destroyed until they are executed. 56 56 57 57 The queueManager controls resource allocation so it is proportional to priority. It attempts to do this fairly while not locking other queues, e.g. if building an outpost (stone + wood) and there is not enough stone, the queue manager may make a lower priority house with the surplus wood. Note that this only happens between queues, the next item in a queue will block everything following it. For this reason it is generally best to have lots of separate queues. 58 58 59 Note: This is the only code that ever trains or builds things. If the word is used within other modules then it means adding to t oqueue system in order to be trained or built.59 Note: This is the only code that ever trains or builds things. If the word is used within other modules then it means adding to the queue system in order to be trained or built. 60 60 61 61 = [=#accessibility Accessibility]