HomeWildfire Games

Remove PETRA Module and Augmentation pattern from rP14441, refs #2322, and in…

Description

Remove PETRA Module and Augmentation pattern from rP14441, refs #2322, and in Petra since rP14865.

The objective of rP14441 to have only one global for multiple AIs is still achieved by not changing the resulting object structure.
The advantage of not using the pattern is to have less parental scopes, i.e. more localization and separation of concerns.
This resembles the successful simulation script component system.
The stated benefits of the Augmentation pattern were never used, because there are (luckily) no such private variables or globals passed as arguments.

Fixes an ESLint warning about using PETRA before it is defined, refs #5524, D1993.
Fixes the missing level of indentation if indentation should represent scoping proportionally.

Remove superfluous, thus misleading name PetraBot in PETRA.PetraBot assignment.

Differential Revision: https://code.wildfiregames.com/D2103
Patch By: Krinkle
Related comments by: Yves, wraitii, Philip, leper on #0ad-dev on December 2013, see #2322
Source was: http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html