Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using ICities;
- namespace LevelingLimit
- {
- public class LevelingLimit : IUserMod
- {
- public string Name { get { return "LevelingLimit"; } }
- public string Description { get { return "Limit's leveling of buildings"; } }
- }
- public class LevelUpExtension : LevelUpExtensionBase
- {
- public override void OnCreated(ILevelUp levelUp) { }
- public override void OnReleased() { }
- public override ResidentialLevelUp OnCalculateResidentialLevelUp(ResidentialLevelUp levelUp, int averageEducation, int landValue, ushort buildingID, Service service, SubService subService, Level currentLevel)
- {
- if (levelUp.targetLevel > Level.Level3)
- levelUp.targetLevel = Level.Level3;
- return levelUp;
- }
- public override CommercialLevelUp OnCalculateCommercialLevelUp(CommercialLevelUp levelUp, int averageWealth, int landValue, ushort buildingID, Service service, SubService subService, Level currentLevel)
- {
- if (levelUp.targetLevel > Level.Level2)
- levelUp.targetLevel = Level.Level2;
- return levelUp;
- }
- public override IndustrialLevelUp OnCalculateIndustrialLevelUp(IndustrialLevelUp levelUp, int averageEducation, int serviceScore, ushort buildingID, Service service, SubService subService, Level currentLevel)
- {
- if (levelUp.targetLevel > Level.Level2)
- levelUp.targetLevel = Level.Level2;
- return levelUp;
- }
- public override OfficeLevelUp OnCalculateOfficeLevelUp(OfficeLevelUp levelUp, int averageEducation, int serviceScore, ushort buildingID, Service service, SubService subService, Level currentLevel)
- {
- if (levelUp.targetLevel > Level.Level2)
- levelUp.targetLevel = Level.Level2;
- return levelUp;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement