New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert AISupportPowerManager to module #15786

Merged
merged 1 commit into from Nov 25, 2018

Conversation

Projects
None yet
3 participants
@reaperrr
Copy link
Contributor

reaperrr commented Nov 4, 2018

Follow-up to #15750.

This already was a semi-module, so the changes are comparatively small (the diff of the module looks larger than it really is, because the Info part shifted the rest of the code downwards).

Yaml changes were done via update rule, but then redundancies removed (shipping mods used identical settings across all AIs).

@reaperrr reaperrr force-pushed the reaperrr:modAI-SPM branch from b14b5ec to 531ec63 Nov 4, 2018

@reaperrr reaperrr force-pushed the reaperrr:modAI-SPM branch from 531ec63 to 9e7ceef Nov 4, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Nov 4, 2018

Updated.

@reaperrr reaperrr force-pushed the reaperrr:modAI-SPM branch 3 times, most recently from 61c4ead to d0c58cd Nov 9, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Nov 11, 2018

Rebased.

@reaperrr reaperrr force-pushed the reaperrr:modAI-SPM branch 2 times, most recently from f1272bb to e909922 Nov 14, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Nov 14, 2018

Updated, renamed SupportPowerDecisions to just Decisions as suggested by @Phrohdoh.

@pchote

This comment has been minimized.

Copy link
Member

pchote commented Nov 18, 2018

Adding dependencies tag because of the issue I raised in #15750.

@reaperrr reaperrr referenced this pull request Nov 18, 2018

Merged

Fix bot module plumbing #15830

@pchote pchote added this to the Next Release milestone Nov 21, 2018

@pchote

This comment has been minimized.

Copy link
Member

pchote commented Nov 24, 2018

#15830 has been merged.

@reaperrr reaperrr force-pushed the reaperrr:modAI-SPM branch from e909922 to 6e1ddc8 Nov 24, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Nov 24, 2018

Rebased.

@pchote

This comment has been minimized.

Copy link
Member

pchote commented Nov 25, 2018

Not directly related to the changes in this PR, but the update rule crashes when I try to apply it:

ExtractHackyAIModules: Split HackyAI logic handling to BotModules
   Updating mod... COMPLETE
   Updating system maps... FAILED

   The automated changes for this rule were not applied because of an error.
   After the issue reported below is resolved you should run the updater
   with SOURCE set to ExtractHackyAIModules to retry these changes

   The map that caused the error was:
     /Users/paul/src/OpenRA/mods/ra/maps/fort-lonestar

   The exception reported was:
     System.NullReferenceException: Object reference not set to an instance of an object
       at OpenRA.Mods.Common.UpdateRules.UpdateExtensions.NodeValue[T] (OpenRA.MiniYamlNode node) [0x00001] in /Users/paul/src/OpenRA/OpenRA.Mods.Common//UpdateRules/UpdateUtils.cs:253 
       at OpenRA.Mods.Common.UpdateRules.Rules.ExtractHackyAIModules+<UpdateActorNode>c__Iterator1.MoveNext () [0x000a8] in /Users/paul/src/OpenRA/OpenRA.Mods.Common//UpdateRules/Rules/20180923/ExtractHackyAIModules.cs:70 
       at OpenRA.Mods.Common.UpdateRules.UpdateUtils+<ApplyTopLevelTransform>c__Iterator3.MoveNext () [0x00127] in /Users/paul/src/OpenRA/OpenRA.Mods.Common//UpdateRules/UpdateUtils.cs:220 
       at System.Collections.Generic.List`1[T].AddEnumerable (System.Collections.Generic.IEnumerable`1[T] enumerable) [0x00059] in <016f22b59bd64951b06e38b9f5a0506c>:0 
       at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x000f4] in <016f22b59bd64951b06e38b9f5a0506c>:0 
       at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <016f22b59bd64951b06e38b9f5a0506c>:0 
       at OpenRA.Mods.Common.UpdateRules.UpdateUtils.UpdateMap (OpenRA.ModData modData, OpenRA.FileSystem.IReadWritePackage mapPackage, OpenRA.Mods.Common.UpdateRules.UpdateRule rule, System.Collections.Generic.List`1[System.Tuple`3[OpenRA.FileSystem.IReadWritePackage,System.String,System.Collections.Generic.List`1[OpenRA.MiniYamlNode]]]& files, System.Collections.Generic.HashSet`1[T] externalFilenames) [0x000c7] in /Users/paul/src/OpenRA/OpenRA.Mods.Common//UpdateRules/UpdateUtils.cs:108 
       at OpenRA.Mods.Common.UtilityCommands.UpdateModCommand.ApplyRules (OpenRA.ModData modData, System.Collections.Generic.IEnumerable`1[T] rules, System.Boolean skipMaps) [0x00186] in /Users/paul/src/OpenRA/OpenRA.Mods.Common//UtilityCommands/UpdateModCommand.cs:206 

The rule will need some tweaks to fail cleanly, ideally in its own PR.

@pchote
Copy link
Member

pchote left a comment

LGTM, just two minor nits:

Show resolved Hide resolved OpenRA.Mods.Common/AI/HackyAI.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs Outdated

@reaperrr reaperrr force-pushed the reaperrr:modAI-SPM branch from 6e1ddc8 to 4bc89d7 Nov 25, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Nov 25, 2018

Updated.

@obrakmann obrakmann merged commit 451a383 into OpenRA:bleed Nov 25, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@obrakmann

This comment has been minimized.

Copy link
Contributor

obrakmann commented Nov 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment