/// <summary> /// データを遅延読み込み中かどうかを判定する /// </summary> /// <returns>データを遅延読み込み中ならばtrueを返す</returns> private static bool IsLoadingData() { return(Leaders.IsLoading() || Ministers.IsLoading() || Teams.IsLoading() || Provinces.IsLoading() || Techs.IsLoading() || Units.IsLoading() || Maps.IsLoading()); }
//finds the next available slot in the discard pile and puts the tech that was passed through the paramterer into that slot public void DiscardTech(Techs discardedTech) { for (int i = 0; i < DiscardPile.Length; i++) { if (DiscardPile[i] == null) { DiscardPile[i] = discardedTech; return; } } }
private static void Postfix(Techs __instance) { Debug.Log("ExtendedBridges_Techs_Initialize..."); __instance.Get("ImprovedLiquidPiping").AddUnlockedItemIDs(ExtendedLiquidConduitBridgeConfig.ID); __instance.Get("ImprovedGasPiping").AddUnlockedItemIDs(ExtendedGasConduitBridgeConfig.ID); __instance.Get("AdvancedPowerRegulation").AddUnlockedItemIDs(ExtendedWireBridgeConfig.ID); __instance.Get("PrettyGoodConductors").AddUnlockedItemIDs(ExtendedWireRefinedBridgeConfig.ID); __instance.Get("LogicCircuits").AddUnlockedItemIDs(ExtendedLogicWireBridgeConfig.ID); __instance.Get("ParallelAutomation").AddUnlockedItemIDs(ExtendedLogicRibbonBridgeConfig.ID); __instance.Get("SolidTransport").AddUnlockedItemIDs(ExtendedSolidConduitBridgeConfig.ID); Debug.Log("ExtendedBridges_Techs_Initialize complete"); }
void InitializeDatabaseInterfaces() { DamageTypes.SetupDatabaseInterface(out m_dbiDamageTypes); WeaponTypes.SetupDatabaseInterface(out m_dbiWeaponTypes); UserClasses.SetupDatabaseInterface(out m_dbiUserClasses); Abilities.SetupDatabaseInterface(out m_dbiAbilities); Objects.SetupDatabaseInterface(out m_dbiObjects); Squads.SetupDatabaseInterface(out m_dbiSquads); Techs.SetupDatabaseInterface(out m_dbiTechs); Powers.SetupDatabaseInterface(out m_dbiPowers); Civs.SetupDatabaseInterface(out m_dbiCivs); Leaders.SetupDatabaseInterface(out m_dbiLeaders); }
private TechTree() { db = Db.Get(); Techs = db.Techs; TechTreeTitles = db.TechTreeTitles; titleAssociations.Add("_InteriorDecor", "_ColonyDevelopment"); titleAssociations.Add("_GasPiping", "_Gases"); titleAssociations.Add("_LiquidPiping", "_Liquids"); titleAssociations.Add("_MedicineI", "_Medicine"); titleAssociations.Add("_Jobs", "_Solids"); titleAssociations.Add("_PowerRegulation", "_Power"); titleAssociations.Add("_FarmingTech", "_Food"); }
/// <summary> /// 編集済みかどうかを取得する /// </summary> /// <returns>編集済みならばtrueを返す</returns> public static bool IsDirty() { return(Misc.IsDirty() || Config.IsDirty() || Leaders.IsDirty() || Ministers.IsDirty() || Teams.IsDirty() || Provinces.IsDirty() || Techs.IsDirty() || Units.IsDirty() || CorpsNames.IsDirty() || UnitNames.IsDirty() || RandomLeaders.IsDirty() || Scenarios.IsDirty()); }
/// <summary> /// データを保存する /// </summary> public static void Save() { Log.Info("Save"); // 文字列の一時キーを保存形式に変更する Techs.RenameKeys(); // 編集したデータを保存する SaveFiles(); // データ保存後の更新処理呼び出し OnFileSaved(); SaveCanceled = false; }
/// <summary> /// データを保存する /// </summary> private static void SaveFiles() { if (!Misc.Save()) { return; } if (!Config.Save()) { return; } if (!Leaders.Save()) { return; } if (!Ministers.Save()) { return; } if (!Teams.Save()) { return; } if (!Provinces.Save()) { return; } if (!Techs.Save()) { return; } if (!Units.Save()) { return; } if (!CorpsNames.Save()) { return; } if (!UnitNames.Save()) { return; } if (!RandomLeaders.Save()) { return; } Scenarios.Save(); }
public static IRepository <T> GetRepository <T>(Techs tech) { IRepository <T> repository; switch (tech) { case Techs.MongoDB: repository = new MongoDBRepository <T>(); break; default: throw new ArgumentException(); } return(repository); }
// #NOTE place new DatabaseObjectKind code here void InitializeDatabaseInterfaces() { DamageTypes.SetupDatabaseInterface(); ImpactEffects.SetupDatabaseInterface(); WeaponTypes.SetupDatabaseInterface(); UserClasses.SetupDatabaseInterface(); Abilities.SetupDatabaseInterface(); Objects.SetupDatabaseInterface(); Squads.SetupDatabaseInterface(); Tactics.SetupDatabaseInterface(); Techs.SetupDatabaseInterface(); TerrainTileTypes.SetupDatabaseInterface(); Powers.SetupDatabaseInterface(); Civs.SetupDatabaseInterface(); Leaders.SetupDatabaseInterface(); }
public static void ClearDictionaries() { States.Clear(); Continents.Clear(); PopTypes.Clear(); Goods.Clear(); CountryTags.Clear(); Religions.Clear(); Cultures.Clear(); CultureGroups.Clear(); Ideologies.Clear(); Buildings.Clear(); PolicyGroups.Clear(); SubPolicies.Clear(); Schools.Clear(); Techs.Clear(); Inventions.Clear(); Units.Clear(); Governments.Clear(); Crimes.Clear(); EventModifiers.Clear(); NationalValues.Clear(); Terrain.Clear(); States = null; Continents = null; PopTypes = null; Goods = null; CountryTags = null; Religions = null; Cultures = null; CultureGroups = null; Ideologies = null; Buildings = null; PolicyGroups = null; SubPolicies = null; Schools = null; Techs = null; Inventions = null; Units = null; Governments = null; Crimes = null; EventModifiers = null; NationalValues = null; Terrain = null; }
public void TechPlayed(Techs lastTechPlayed) { //spend energy //playerUnit.SpendEnergy(lastTechPlayed.EnergyCost); //update energy HUD playerHUD.SetEnergy(playerUnit.currentEnergy); if (lastTechPlayed.doesDamage) { enemyUnit.TakeDamage(lastTechPlayed.damageAmount); enemyHUD.SetHP(enemyUnit.currentHP); } if (lastTechPlayed.restoresHP) { playerUnit.Heal(lastTechPlayed.healingAmount); playerHUD.SetHP(playerUnit.currentHP); } }
/// <summary> /// フォーム読み込み時の処理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnFormLoad(object sender, EventArgs e) { // 国家データを初期化する Countries.Init(); // 研究特性を初期化する Techs.InitSpecialities(); // ゲーム設定ファイルを読み込む Misc.Load(); // 文字列定義ファイルを読み込む Config.Load(); // 技術リストビューの高さを設定するためにダミーのイメージリストを作成する techListView.SmallImageList = new ImageList { ImageSize = new Size(1, DeviceCaps.GetScaledHeight(18)) }; // 研究機関リストビューの高さを設定するためにダミーのイメージリストを作成する teamListView.SmallImageList = new ImageList { ImageSize = new Size(1, DeviceCaps.GetScaledHeight(18)) }; // 研究特性オーバーレイアイコンを初期化する _techOverlayIcon = new Bitmap(Game.GetReadFileName(Game.TechIconOverlayPathName)); _techOverlayIcon.MakeTransparent(Color.Lime); // オプション項目を初期化する InitOptionItems(); // 技術定義ファイルを読み込む Techs.Load(); // 研究機関ファイルを読み込む Teams.Load(); // 国家リストボックスを初期化する InitCountryListBox(); // データ読み込み後の処理 OnFileLoaded(); }
public void UseTech1() { if (!battleSystem.instance.playerUnit.SpendEnergy(HandTechs[1].EnergyCost)) { Debug.Log("tech 1 used"); TechLastUsed = HandTechs[1]; DiscardTech(HandTechs[1]); HandGO[1].GetComponent <Image>().sprite = null; battleSystem.instance.TechPlayed(HandTechs[1]); HandTechs[1] = null; currentHandSize--; SortHandTechs(); updateHandCounter(); } else { Debug.Log("out of energy"); } }
public string GetName(DatabaseObjectKind kind, int id) { Contract.Requires <ArgumentOutOfRangeException>(kind != DatabaseObjectKind.None); // #NOTE place new DatabaseObjectKind code here switch (kind) { case DatabaseObjectKind.Ability: return(Abilities.TryGetNameWithUndefined(id)); case DatabaseObjectKind.Civ: return(Civs.TryGetNameWithUndefined(id)); case DatabaseObjectKind.DamageType: return(DamageTypes.TryGetNameWithUndefined(id)); case DatabaseObjectKind.ImpactEffect: return(ImpactEffects.TryGetNameWithUndefined(id)); case DatabaseObjectKind.Leader: return(Leaders.TryGetNameWithUndefined(id)); case DatabaseObjectKind.Object: return(Objects.TryGetNameWithUndefined(id)); case DatabaseObjectKind.ObjectType: return(ObjectTypes.TryGetNameWithUndefined(id)); case DatabaseObjectKind.Power: return(Powers.TryGetNameWithUndefined(id)); case DatabaseObjectKind.Squad: return(Squads.TryGetNameWithUndefined(id)); case DatabaseObjectKind.Tactic: return(Tactics.TryGetNameWithUndefined(id)); case DatabaseObjectKind.Tech: return(Techs.TryGetNameWithUndefined(id)); case DatabaseObjectKind.TerrainTileType: return(TerrainTileTypes.TryGetNameWithUndefined(id)); // TODO: Should just use the Objects DBI AFAICT case DatabaseObjectKind.Unit: return(TryGetNameUnit(id)); case DatabaseObjectKind.UserClass: return(UserClasses.TryGetNameWithUndefined(id)); case DatabaseObjectKind.WeaponType: return(WeaponTypes.TryGetNameWithUndefined(id)); default: throw new KSoft.Debug.UnreachableException(kind.ToString()); } }
public override void Initialize() { base.Initialize(); Urges = new Urges(); AssignableSlots = new AssignableSlots(); StateMachineCategories = new StateMachineCategories(); Personalities = new Personalities(); Faces = new Faces(); Shirts = new Shirts(); Expressions = new Expressions(Root); Thoughts = new Thoughts(Root); Deaths = new Deaths(Root); StatusItemCategories = new StatusItemCategories(Root); Techs = new Techs(Root); Techs.Load(researchTreeFile); TechTreeTitles = new TechTreeTitles(Root); TechTreeTitles.Load(researchTreeFile); TechItems = new TechItems(Root); Accessories = new Accessories(Root); AccessorySlots = new AccessorySlots(Root, null, null, null); ScheduleBlockTypes = new ScheduleBlockTypes(Root); ScheduleGroups = new ScheduleGroups(Root); RoomTypeCategories = new RoomTypeCategories(Root); RoomTypes = new RoomTypes(Root); ArtifactDropRates = new ArtifactDropRates(Root); SpaceDestinationTypes = new SpaceDestinationTypes(Root); Diseases = new Diseases(Root); Sicknesses = new Database.Sicknesses(Root); SkillPerks = new SkillPerks(Root); SkillGroups = new SkillGroups(Root); Skills = new Skills(Root); ColonyAchievements = new ColonyAchievements(Root); MiscStatusItems = new MiscStatusItems(Root); CreatureStatusItems = new CreatureStatusItems(Root); BuildingStatusItems = new BuildingStatusItems(Root); ChoreTypes = new ChoreTypes(Root); Effect effect = new Effect("CenterOfAttention", DUPLICANTS.MODIFIERS.CENTEROFATTENTION.NAME, DUPLICANTS.MODIFIERS.CENTEROFATTENTION.TOOLTIP, 0f, true, true, false, null, 0f, null); effect.Add(new AttributeModifier("StressDelta", -0.008333334f, DUPLICANTS.MODIFIERS.CENTEROFATTENTION.NAME, false, false, true)); effects.Add(effect); CollectResources(Root, ResourceTable); }
/// <summary> /// ファイルの再読み込みを要求する /// </summary> public static void RequestReload() { Misc.RequestReload(); Config.RequestReload(); Leaders.RequestReload(); Ministers.RequestReload(); Teams.RequestReload(); Techs.RequestReload(); Units.RequestReload(); Provinces.RequestReload(); CorpsNames.RequestReload(); UnitNames.RequestReload(); RandomLeaders.RequestReload(); Scenarios.RequestReload(); Maps.RequestReload(); SaveCanceled = false; Log.Verbose("Request to reload"); }
/// <summary> /// データを再読み込みする /// </summary> public static void Reload() { Log.Info("Reload"); // データを再読み込みする Misc.Reload(); Config.Reload(); Leaders.Reload(); Ministers.Reload(); Teams.Reload(); Provinces.Reload(); Techs.Reload(); Units.Reload(); CorpsNames.Reload(); UnitNames.Reload(); RandomLeaders.Reload(); Scenarios.Reload(); // データ読み込み後の更新処理呼び出し OnFileLoaded(); SaveCanceled = false; }
public void RemoveTech(Techs tech, int removedCount = 1) { }
public void AddTech(Techs tech, int addedCount = 1) { }
public void Stop(Techs techType) { }
public void Execute(Techs techType) { }
protected Tech(Techs type, int durationTime, int playerCount) { Type = type; DurationTime = durationTime; }
internal static void Create(Techs techs) { Instance = Instance ?? new TechTree(); Logger.Info("Created new TechTree"); }
private void SelectTech(Techs tech) { //todo: create techs }