-
Notifications
You must be signed in to change notification settings - Fork 0
Explorer Interaction
Nicola edited this page Dec 7, 2025
·
12 revisions
The interaction between the planet and Explorers is regulated by the common protocol. The Explorers' messages are handled by the planet as follows:
Note: The related code can be found inside the explorer module.
-
SupportedResourceRequest: sends the list of supported resources to generate, which is of typeHashSet<BasicResourceType>. The list contains only one resource, since our Planet is of type C -
SupportedCombinationRequest: sends the list of supported resources to combine, which is of typeHashSet<ComplexResourceType> -
AvailableEnergyCellRequest: sends 1 if theEnergyCellof the planet is full, 0 otherwise. Cannot be more than 1 since our Planet is of type C -
GenerateResourceRequest: sends the requested resource if the Planet AI decides to fulfil the request and theEnergyCellis full, otherwise sends None -
ComplexResourceRequest: sends the requested complex resource if the Planet AI decides to fulfil the request and theEnergyCellis full, otherwise sends back an error with a String and the two basic resources sent by the explorer.
The behavior of GenerateResourceRequest and CombineResourceRequest depends on the configuration of the Planet AI, for more informations refer to Ai Overview