Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////
- // //
- // OVERRIDE FUNCTION EXAMPLE //
- // //
- /////////////////////////////////
- using System;
- namespace RenegadeCore
- {
- public partial class StartingStats
- {
- public static readonly List<StatInfo> SpeciesStats;
- static StartingStats()
- {
- SpeciesStats = new List<StatInfo>()
- {
- new StatInfo("HP")
- new StatInfo("AKT")
- };
- }
- }
- }
- namespace AwesomeMod
- {
- public partial class StartingStats
- {
- [OverrideFunction]
- static StartingStats()
- {
- //Some moron mispelled ATK in this and only this function. Fixing it for truth and justice.
- SpeciesStats = new List<StatInfo>()
- {
- new StatInfo("HP")
- new StatInfo("ATK")
- };
- }
- }
- }
- //results in:
- using System;
- namespace RenegadeCore
- {
- public partial class StartingStats
- {
- public static readonly List<StatInfo> SpeciesStats;
- static StartingStats()
- {
- //>>>>Overwritten by AwesomeMod<<<<//
- //Some moron mispelled ATK in this and only this function. Fixing it for truth and justice.
- SpeciesStats = new List<StatInfo>()
- {
- new StatInfo("HP")
- new StatInfo("ATK")
- };
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment