Skip to content
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

Provide event hooks for end-of-month processing #539

Open
pledbrook opened this issue Jun 2, 2019 · 0 comments
Open

Provide event hooks for end-of-month processing #539

pledbrook opened this issue Jun 2, 2019 · 0 comments
Labels
needs-docs Needs documentation

Comments

@pledbrook
Copy link
Contributor

This would allow mods to control supply income and perform any other work that they want.

pledbrook added a commit to long-war-2/X2WOTCCommunityHighlander that referenced this issue Jun 3, 2019
pledbrook added a commit to long-war-2/X2WOTCCommunityHighlander that referenced this issue Jun 3, 2019
This commit adds several events that allow listeners to interact with and
customise the game's end-of-month processing. For example, it allows things
like overriding the amount of monthly supplies that are awarded.

 * 'PreEndOfMonth'

   Fired from `XComGameState_HeadquartersResistance`, this event notifies
   listeners that end-of-month processing is about to begin. It provides
   a NewGameState that allows them to make game state changes.

   ```
   {
      ID: PreEndOfMonth,
      Data: self (XCGS_HeadquartersResistance),
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'NegativeMonthlyIncome'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to override whether negative supply income is displayed as
   a negative number or as 0. It also allows them to do their own processing
   and game state changes that should only happen if supply income is
   negative.

   ```
   {
      ID: NegativeMonthlyIncome,
      Data: [inout bool DisplayNegativeIncome, in int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideSupplyDrop'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to override the amount of supplies awarded at the end of the
   month.

   ```
   {
      ID: OverrideSupplyDrop,
      Data: [inout bool SkipRegionSupplyRewards, inout int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideSupplyLossStrings'

   Fired from `UIResistanceReport`, this event allows listeners to override
   the text that displays the lost supplies for the month.

   ```
   {
      ID: OverrideSupplyLossStrings,
      Data: [inout string SupplyLossReason, inout string SupplyLossAmount],
      Source: self (UIResistanceReport)
   }
   ```

 * 'MonthlyReportClosed'

   Fired from `UIResistanceReport`, this event notifies listeners that the
   resistance report has been closed, so they can do some final processing
   once all the other end-of-month stuff is done. It also provides a
   NewGameState if the listeners want to make game state changes.

   ```
   {
      ID: MonthlyReportClosed,
      Data: none,
      Source: self (UIResistanceReport)
   }
   ```
pledbrook added a commit to long-war-2/X2WOTCCommunityHighlander that referenced this issue Jun 4, 2019
This commit adds several events that allow listeners to interact with and
customise the game's end-of-month processing. For example, it allows things
like overriding the amount of monthly supplies that are awarded.

 * 'PreEndOfMonth'

   Fired from `XComGameState_HeadquartersResistance`, this event notifies
   listeners that end-of-month processing is about to begin. It provides
   a NewGameState that allows them to make game state changes.

   ```
   {
      ID: PreEndOfMonth,
      Data: self (XCGS_HeadquartersResistance),
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'NegativeMonthlyIncome'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to override whether negative supply income is displayed as
   a negative number or as 0. It also allows them to do their own processing
   and game state changes that should only happen if supply income is
   negative.

   ```
   {
      ID: NegativeMonthlyIncome,
      Data: [inout bool DisplayNegativeIncome, in int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideSupplyDrop'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to override the amount of supplies awarded at the end of the
   month.

   ```
   {
      ID: OverrideSupplyDrop,
      Data: [inout bool SkipRegionSupplyRewards, inout int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideSupplyLossStrings'

   Fired from `UIResistanceReport`, this event allows listeners to override
   the text that displays the lost supplies for the month.

   ```
   {
      ID: OverrideSupplyLossStrings,
      Data: [inout string SupplyLossReason, inout string SupplyLossAmount],
      Source: self (UIResistanceReport)
   }
   ```

 * 'PostEndOfMonth'

   Fired from `UIResistanceReport`, this event notifies listeners that the
   resistance report has been closed, so they can do some final processing
   once all the other end-of-month stuff is done. It also provides a
   NewGameState if the listeners want to make game state changes.

   ```
   {
      ID: PostEndOfMonth,
      Data: none,
      Source: self (UIResistanceReport)
   }
   ```
Musashi1584 added a commit that referenced this issue Jun 27, 2019
This reverts commit 1b01ad5, reversing
changes made to 35eefef.
pledbrook added a commit to long-war-2/X2WOTCCommunityHighlander that referenced this issue Jul 3, 2019
This commit adds several events that allow listeners to interact with and
customise the game's end-of-month processing. For example, it allows things
like overriding the amount of monthly supplies that are awarded.

 * 'PreEndOfMonth'

   Fired from `XComGameState_HeadquartersResistance`, this event notifies
   listeners that end-of-month processing is about to begin. It provides
   a NewGameState that allows them to make game state changes.

   ```
   {
      ID: PreEndOfMonth,
      Data: self (XCGS_HeadquartersResistance),
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'ProcessNegativeIncome'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to do their own processing and game state changes that
   when XCOM's income at the end of the month is negative.

   ```
   {
      ID: ProcessNegativeIncome,
      Data: [in int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideDisplayNegativeIncome'

   Fired from `UIResistanceReport`, this event allows listeners to override
   how negative supply income is displayed. By default, negative income is
   displayed as 0 (zero), but if this event returns `true`, then the income
   is displayed as the full negative value.

   ```
   {
      ID: OverrideDisplayNegativeIncome,
      Data: [out bool DisplayNegativeIncome],
      Source: self (UIResistanceReport)
   }
   ```

 * 'OverrideSupplyDrop'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to override the amount of supplies awarded at the end of the
   month.

   ```
   {
      ID: OverrideSupplyDrop,
      Data: [inout bool SkipRegionSupplyRewards, inout int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideSupplyLossStrings'

   Fired from `UIResistanceReport`, this event allows listeners to override
   the text that displays the lost supplies for the month.

   ```
   {
      ID: OverrideSupplyLossStrings,
      Data: [inout string SupplyLossReason, inout string SupplyLossAmount],
      Source: self (UIResistanceReport)
   }
   ```

 * 'PostEndOfMonth'

   Fired from `UIResistanceReport`, this event notifies listeners that the
   resistance report has been closed, so they can do some final processing
   once all the other end-of-month stuff is done. It also provides a
   NewGameState if the listeners want to make game state changes.

   ```
   {
      ID: PostEndOfMonth,
      Data: none,
      Source: self (UIResistanceReport)
   }
   ```
pledbrook added a commit to long-war-2/X2WOTCCommunityHighlander that referenced this issue Jul 3, 2019
This commit adds several events that allow listeners to interact with and
customise the game's end-of-month processing. For example, it allows things
like overriding the amount of monthly supplies that are awarded.

 * 'PreEndOfMonth'

   Fired from `XComGameState_HeadquartersResistance`, this event notifies
   listeners that end-of-month processing is about to begin. It provides
   a NewGameState that allows them to make game state changes.

   ```
   {
      ID: PreEndOfMonth,
      Data: self (XCGS_HeadquartersResistance),
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'ProcessNegativeIncome'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to do their own processing and game state changes that
   when XCOM's income at the end of the month is negative.

   ```
   {
      ID: ProcessNegativeIncome,
      Data: [in int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideDisplayNegativeIncome'

   Fired from `UIResistanceReport`, this event allows listeners to override
   how negative supply income is displayed. By default, negative income is
   displayed as 0 (zero), but if this event returns `true`, then the income
   is displayed as the full negative value.

   ```
   {
      ID: OverrideDisplayNegativeIncome,
      Data: [out bool DisplayNegativeIncome],
      Source: self (UIResistanceReport)
   }
   ```

 * 'OverrideSupplyDrop'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to override the amount of supplies awarded at the end of the
   month.

   ```
   {
      ID: OverrideSupplyDrop,
      Data: [inout bool SkipRegionSupplyRewards, inout int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideSupplyLossStrings'

   Fired from `UIResistanceReport`, this event allows listeners to override
   the text that displays the lost supplies for the month.

   ```
   {
      ID: OverrideSupplyLossStrings,
      Data: [inout string SupplyLossReason, inout string SupplyLossAmount],
      Source: self (UIResistanceReport)
   }
   ```

 * 'PostEndOfMonth'

   Fired from `UIResistanceReport`, this event notifies listeners that the
   resistance report has been closed, so they can do some final processing
   once all the other end-of-month stuff is done. It also provides a
   NewGameState if the listeners want to make game state changes.

   ```
   {
      ID: PostEndOfMonth,
      Data: none,
      Source: self (UIResistanceReport)
   }
   ```
pledbrook added a commit to long-war-2/X2WOTCCommunityHighlander that referenced this issue Oct 8, 2019
This commit adds several events that allow listeners to interact with and
customise the game's end-of-month processing. For example, it allows things
like overriding the amount of monthly supplies that are awarded.

 * 'PreEndOfMonth'

   Fired from `XComGameState_HeadquartersResistance`, this event notifies
   listeners that end-of-month processing is about to begin. It provides
   a NewGameState that allows them to make game state changes.

   ```
   {
      ID: PreEndOfMonth,
      Data: self (XCGS_HeadquartersResistance),
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'ProcessNegativeIncome'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to do their own processing and game state changes that
   when XCOM's income at the end of the month is negative.

   ```
   {
      ID: ProcessNegativeIncome,
      Data: [in int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideDisplayNegativeIncome'

   Fired from `UIResistanceReport`, this event allows listeners to override
   how negative supply income is displayed. By default, negative income is
   displayed as 0 (zero), but if this event returns `true`, then the income
   is displayed as the full negative value.

   ```
   {
      ID: OverrideDisplayNegativeIncome,
      Data: [out bool DisplayNegativeIncome],
      Source: self (UIResistanceReport)
   }
   ```

 * 'OverrideSupplyDrop'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to override the amount of supplies awarded at the end of the
   month.

   ```
   {
      ID: OverrideSupplyDrop,
      Data: [inout bool SkipRegionSupplyRewards, inout int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideSupplyLossStrings'

   Fired from `UIResistanceReport`, this event allows listeners to override
   the text that displays the lost supplies for the month.

   ```
   {
      ID: OverrideSupplyLossStrings,
      Data: [inout string SupplyLossReason, inout string SupplyLossAmount],
      Source: self (UIResistanceReport)
   }
   ```

 * 'PostEndOfMonth'

   Fired from `UIResistanceReport`, this event notifies listeners that the
   resistance report has been closed, so they can do some final processing
   once all the other end-of-month stuff is done. It also provides a
   NewGameState if the listeners want to make game state changes.

   ```
   {
      ID: PostEndOfMonth,
      Data: none,
      Source: self (UIResistanceReport)
   }
   ```
pledbrook added a commit to long-war-2/X2WOTCCommunityHighlander that referenced this issue Oct 26, 2019
This commit adds several events that allow listeners to interact with and
customise the game's end-of-month processing. For example, it allows things
like overriding the amount of monthly supplies that are awarded.

 * 'PreEndOfMonth'

   Fired from `XComGameState_HeadquartersResistance`, this event notifies
   listeners that end-of-month processing is about to begin. It provides
   a NewGameState that allows them to make game state changes.

   ```
   {
      ID: PreEndOfMonth,
      Data: self (XCGS_HeadquartersResistance),
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'ProcessNegativeIncome'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to do their own processing and game state changes that
   when XCOM's income at the end of the month is negative.

   ```
   {
      ID: ProcessNegativeIncome,
      Data: [in int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideDisplayNegativeIncome'

   Fired from `UIResistanceReport`, this event allows listeners to override
   how negative supply income is displayed. By default, negative income is
   displayed as 0 (zero), but if this event returns `true`, then the income
   is displayed as the full negative value.

   ```
   {
      ID: OverrideDisplayNegativeIncome,
      Data: [out bool DisplayNegativeIncome],
      Source: self (UIResistanceReport)
   }
   ```

 * 'OverrideSupplyDrop'

   Fired from `XComGameState_HeadquartersResistance`, this event allows
   listeners to override the amount of supplies awarded at the end of the
   month.

   ```
   {
      ID: OverrideSupplyDrop,
      Data: [inout bool SkipRegionSupplyRewards, inout int SupplyAmount],
      Source: self (XCGS_HeadquartersResistance)
   }
   ```

 * 'OverrideSupplyLossStrings'

   Fired from `UIResistanceReport`, this event allows listeners to override
   the text that displays the lost supplies for the month.

   ```
   {
      ID: OverrideSupplyLossStrings,
      Data: [inout string SupplyLossReason, inout string SupplyLossAmount],
      Source: self (UIResistanceReport)
   }
   ```

 * 'PostEndOfMonth'

   Fired from `UIResistanceReport`, this event notifies listeners that the
   resistance report has been closed, so they can do some final processing
   once all the other end-of-month stuff is done. It also provides a
   NewGameState if the listeners want to make game state changes.

   ```
   {
      ID: PostEndOfMonth,
      Data: none,
      Source: self (UIResistanceReport)
   }
   ```
pledbrook added a commit that referenced this issue Oct 28, 2019
@robojumper robojumper added the needs-docs Needs documentation label Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-docs Needs documentation
Projects
None yet
Development

No branches or pull requests

2 participants