Conversation
|
|
||
| if fort_distance > Constants.MAX_DISTANCE_FORT_IS_REACHABLE: | ||
| MoveToFort(self.bot).work() | ||
| MoveToFort(self.bot, self.config).work() |
There was a problem hiding this comment.
If MoveToFort takes configuration, this will cause problems since it won't be getting the correct config values. self.config is specific to the task. This is why tasks shouldn't be calling other tasks.
@douglascamata Any ideas on a fix?
There was a problem hiding this comment.
the config here needs to have the same structure of the config hash in JSON and SoftBan.config clearly won't have this structure.
There was a problem hiding this comment.
Agreed, I'm not sure how we fix this though. HandleSoftBan doesn't (and shouldn't) know what the config is for MoveToFort. Is there any way we can refactor HandleSoftBan to not require anything about MoveToFort? Or do we just say screw it create the config that MoveToFort wants (ignoring however the user might have configured that task) and use it?
There was a problem hiding this comment.
HandleSoftBan will decide how it wants to move to the fort.
There was a problem hiding this comment.
See Issue: #1522
I just replaced (self.bot, self.config) with (self, self.bot).
|
This has been fixed via another PR. |
Short Description:
Fix TypeError
Fixes: