You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write a script that modifies a mission. I don't know how the original mission is created.
But I suspect some custom "scripts" are used to create the mission in addition to the ME.
In the original mission the "actions" section looks like this.
When I open this original mission in ME, it presents the "correct" order i.e. 1 mist, 2 main, 3 init.
But after I load and save this mission using pydcs, ME shows 1 init, 2 mist, 3 main. Note that it matches the order of appearance in the original file instead of their indices.
I solved this issue by changing the loop in TriggerRule.create_from_dict : from for a in actions: to for a in range(1, len(actions)+1): in my local copy of pydcs.
Judging from how it is saved in TriggerRule.dict, I suspect similar change is also necessary for the "rules" loop as well.
I can create a PR, if my approach above is a correct one.
The text was updated successfully, but these errors were encountered:
I am trying to write a script that modifies a mission. I don't know how the original mission is created.
But I suspect some custom "scripts" are used to create the mission in addition to the ME.
In the original mission the "actions" section looks like this.
When I open this original mission in ME, it presents the "correct" order i.e. 1 mist, 2 main, 3 init.
But after I load and save this mission using pydcs, ME shows 1 init, 2 mist, 3 main. Note that it matches the order of appearance in the original file instead of their indices.
from the file saved with pydcs:
I solved this issue by changing the loop in
TriggerRule.create_from_dict
: fromfor a in actions:
tofor a in range(1, len(actions)+1):
in my local copy of pydcs.Judging from how it is saved in
TriggerRule.dict
, I suspect similar change is also necessary for the "rules" loop as well.I can create a PR, if my approach above is a correct one.
The text was updated successfully, but these errors were encountered: