本文整理汇总了C#中System.App.GetStratModifier方法的典型用法代码示例。如果您正苦于以下问题:C# App.GetStratModifier方法的具体用法?C# App.GetStratModifier怎么用?C# App.GetStratModifier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.App
的用法示例。
在下文中一共展示了App.GetStratModifier方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PreBuildLists
//private static readonly string UIStationInvoicesList = "stationinvoicelist";
private static Budget PreBuildLists(App app, PlayerInfo playerInfo, string panelName)
{
bool stratModifier = app.GetStratModifier<bool>(Kerberos.Sots.Data.StratModifiers.EnableTrade, app.LocalPlayer.ID);
Budget budget = Budget.GenerateBudget(app.Game, playerInfo, null, BudgetProjection.Pessimistic);
double num3 = (double)((1f - playerInfo.RateGovernmentResearch) * 100f);
double num4 = (double)(playerInfo.RateGovernmentSecurity * 100f);
double num5 = (double)(playerInfo.RateSecurityOperations * 100f);
double num6 = (double)(playerInfo.RateSecurityIntelligence * 100f);
double num7 = (double)(playerInfo.RateSecurityCounterIntelligence * 100f);
double num8 = (double)(playerInfo.RateGovernmentStimulus * 100f);
double num9 = (double)(playerInfo.RateStimulusMining * 100f);
double num10 = (double)(playerInfo.RateStimulusColonization * 100f);
double num11 = (double)(playerInfo.RateStimulusTrade * 100f);
double num12 = (double)(playerInfo.RateGovernmentSavings * 100f);
float arg_29B_0 = playerInfo.RateGovernmentResearch;
double num13 = (double)(playerInfo.RateResearchCurrentProject * 100f);
double num14 = (double)(playerInfo.RateResearchSpecialProject * 100f);
double num15 = (double)(playerInfo.RateResearchSalvageResearch * 100f);
string text = budget.TotalRevenue.ToString("N0");
string text2 = budget.ProjectedGovernmentSpending.ToString("N0");
string text3 = budget.ResearchSpending.ProjectedTotal.ToString("N0");
string text4 = budget.SecuritySpending.ProjectedTotal.ToString("N0");
double num16 = budget.SecuritySpending.ProjectedOperations;
string text5 = num16.ToString("N0");
num16 = budget.SecuritySpending.ProjectedIntelligence;
string text6 = num16.ToString("N0");
num16 = budget.SecuritySpending.ProjectedCounterIntelligence;
string text7 = num16.ToString("N0");
string text8 = budget.StimulusSpending.ProjectedTotal.ToString("N0");
num16 = budget.StimulusSpending.ProjectedMining;
string text9 = num16.ToString("N0");
num16 = budget.StimulusSpending.ProjectedColonization;
string text10 = num16.ToString("N0");
num16 = budget.StimulusSpending.ProjectedTrade;
string text11 = num16.ToString("N0");
string text12 = budget.NetSavingsIncome.ToString("N0");
string text13 = budget.CurrentSavings.ToString("N0");
string text14 = budget.SavingsInterest.ToString("N0");
string text15 = budget.ProjectedSavings.ToString("N0");
num16 = budget.ResearchSpending.ProjectedCurrentProject;
string text16 = num16.ToString("N0");
num16 = budget.ResearchSpending.ProjectedSpecialProject;
string text17 = num16.ToString("N0");
num16 = budget.ResearchSpending.ProjectedSalvageResearch;
string text18 = num16.ToString("N0");
string text19 = (budget.ColonySupportExpenses + budget.CurrentShipUpkeepExpenses + budget.CurrentStationUpkeepExpenses + budget.CorruptionExpenses + budget.DebtInterest).ToString("N0");
string text20 = (budget.TotalExpenses + budget.PendingBuildStationsCost + budget.PendingStationsModulesCost + budget.PendingBuildShipsCost).ToString("N0");
string text21 = budget.ColonySupportExpenses.ToString("N0");
string text22 = budget.CurrentShipUpkeepExpenses.ToString("N0");
string text23 = budget.CurrentStationUpkeepExpenses.ToString("N0");
string text24 = budget.CorruptionExpenses.ToString("N0");
string text25 = budget.DebtInterest.ToString("N0");
string text26 = budget.TaxRevenue.ToString("N0");
string text27 = text2;
string text28 = text20;
string text29 = text3;
string text30 = text13;
string text31 = text15;
string text40 = budget.PendingBuildShipsCost.ToString("N0");
string text41 = (budget.PendingBuildStationsCost + budget.PendingStationsModulesCost).ToString("N0");
string text42 = (budget.TotalExpenses + budget.TotalBuildShipCosts + budget.TotalBuildStationsCost + budget.TotalStationsModulesCost).ToString("N0");
string text43 = "Turn " + app.GameDatabase.GetTurnCount().ToString("N0");
app.UI.SetEnabled(EmpireSummaryStateBehaviour.UITradeSlider, stratModifier);
app.UI.SetEnabled(EmpireSummaryStateBehaviour.UIMiningSlider, app.GameDatabase.PlayerHasTech(app.LocalPlayer.ID, "IND_Mega-Strip_Mining"));
if (app.LocalPlayer.Faction.Name == "loa" && app.GameDatabase.GetPlayerInfo(app.LocalPlayer.ID).Savings < 0.0)
{
app.UI.SetEnabled(EmpireSummaryStateBehaviour.UIGovernmentResearchSlider, false);
}
else
{
app.UI.SetEnabled(EmpireSummaryStateBehaviour.UIGovernmentResearchSlider, true);
}
if (panelName != EmpireSummaryStateBehaviour.UIGovernmentResearchSlider)
{
app.UI.SetSliderValue(EmpireSummaryStateBehaviour.UIGovernmentResearchSlider, (int)num3);
}
if (panelName != EmpireSummaryStateBehaviour.UISecuritySlider)
{
app.UI.SetSliderValue(EmpireSummaryStateBehaviour.UISecuritySlider, (int)num4);
}
if (budget.ProjectedGovernmentSpending > 0.0)
{
app.UI.ClearSliderNotches(EmpireSummaryStateBehaviour.UISecuritySlider);
app.UI.AddSliderNotch(EmpireSummaryStateBehaviour.UISecuritySlider, budget.RequiredSecurity);
if (app.GameDatabase.GetSliderNotchSettingInfo(app.LocalPlayer.ID, UISlidertype.SecuritySlider) != null)
{
app.UI.SetSliderValue(EmpireSummaryStateBehaviour.UISecuritySlider, budget.RequiredSecurity);
EmpireSummaryState.DistributeGovernmentSpending(app.Game, EmpireSummaryState.GovernmentSpendings.Security, (float)Math.Min((double)((float)budget.RequiredSecurity / 100f), 1.0), playerInfo);
}
}
if (panelName != EmpireSummaryStateBehaviour.UIOperationsSlider)
{
app.UI.SetSliderValue(EmpireSummaryStateBehaviour.UIOperationsSlider, (int)num5);
}
if (panelName != EmpireSummaryStateBehaviour.UIIntelSlider)
{
//.........这里部分代码省略.........