Example #1
0
        protected GameEngineMegaloVariant(GameEngineVariant variantManager,
                                          LocaleStringTableInfo stringTableInfo,
                                          LocaleStringTableInfo nameStringInfo, LocaleStringTableInfo descriptionStringInfo,
                                          LocaleStringTableInfo categoryStringInfo)
        {
            var build_handle = variantManager.GameBuild;

            EngineDefinition = Megalo.Model.MegaloScriptModel.Create(variantManager, this);

            PlayerTraits           = new List <MegaloVariantPlayerTraitsBase>(MegaloDatabase.Limits.PlayerTraits.MaxCount);
            UserDefinedOptions     = new List <MegaloVariantUserDefinedOption>(MegaloDatabase.Limits.UserDefinedOptions.MaxCount);
            StringTable            = new LocaleStringTable(stringTableInfo, build_handle);
            BaseNameStringIndex    = TypeExtensions.kNone;
            NameString             = new LocaleStringTable(nameStringInfo, build_handle);
            DescriptionString      = new LocaleStringTable(descriptionStringInfo, build_handle);
            CategoryString         = new LocaleStringTable(categoryStringInfo, build_handle);
            EngineIconIndex        = EngineCategory = TypeExtensions.kNone;
            MapPermissions         = new MegaloVariantMapPermissions();
            PlayerRatingParameters = new MegaloVariantPlayerRatingParameters();

            DisabledEngineOptions = new Collections.BitSet(MegaloDatabase.Limits.GameEngineOptions.MaxCount, fixedLength: true);
            HiddenEngineOptions   = new Collections.BitSet(MegaloDatabase.Limits.GameEngineOptions.MaxCount, fixedLength: true);
            DisabledUserOptions   = new Collections.BitSet(MegaloDatabase.Limits.UserDefinedOptions.MaxCount, fixedLength: true);
            HiddenUserOptions     = new Collections.BitSet(MegaloDatabase.Limits.UserDefinedOptions.MaxCount, fixedLength: true);
        }
        protected GameEngineBaseVariant(GameEngineVariant variantManager)
        {
            BuildHandle = variantManager.GameBuild;
            Header      = ContentHeader.Create(BuildHandle);

            OptionsSocial = new GameOptionsSocial();
        }
Example #3
0
        protected GameEngineSandboxVariant(GameEngineVariant variantManager)
        {
            MegaloVariant = GameEngineMegaloVariant.Create(variantManager);

            EditorTraits = MegaloVariant.BaseVariant.NewPlayerTraits();

            RevertToDefault();
        }
Example #4
0
        internal static GameEngineCampaignVariant Create(GameEngineVariant variantManager)
        {
            Contract.Requires(variantManager != null);

            var game_build = variantManager.GameBuild;

            if (game_build.IsWithinSameBranch(Engine.EngineRegistry.EngineBranchHaloReach))
            {
                return(new GameEngineCampaignVariant(variantManager));
            }

            if (game_build.IsWithinSameBranch(Engine.EngineRegistry.EngineBranchHalo4))
            {
                return(new GameEngineCampaignVariant(variantManager));
            }

            throw new KSoft.Debug.UnreachableException(game_build.ToDisplayString());
        }
Example #5
0
 protected GameEngineCampaignVariant(GameEngineVariant variantManager)
 {
     BaseVariant = GameEngineBaseVariant.Create(variantManager);
 }