python-sc2
python-sc2 copied to clipboard
Make error message clearer when issueing _do_actions
In https://github.com/BurnySc2/python-sc2/blob/40dc00a01544d1405ad15b25ae6250a2e9382ec9/sc2/action.py#L49 currently only the target is listed, but could also print the ability and units (or unit types) that the command was issued to. This should make it easier to debug the error message, as it only comes up after on_step has been run. The error message only points to the marked line of code, instead of the line where the command was issued to the unit.
Additionally add sanity checks for argument types in https://github.com/BurnySc2/python-sc2/blob/40dc00a01544d1405ad15b25ae6250a2e9382ec9/sc2/unit.py#L1472-L1489