private LogWarning ( UnityEngine context, object message ) : void | ||
context | UnityEngine | |
message | object | |
return | void |
public SettlementBuilding mod_UpgradeBuilding(SettlementBuilding building) { if (!KingmakerPatchSettings.CurrencyFallback.Enabled) { return(this.source_UpgradeBuilding(building)); } if (!building.IsFinished || !this.alias_m_Buildings.HasFact(building) || !building.Blueprint.UpgradesTo) { return(null); } if (!KingdomCurrencyFallback.CanSpend(this.GetActualCost(building.Blueprint.UpgradesTo))) { UberDebug.LogWarning("Cannot upgrade " + building.Blueprint + ": not enough BP"); return(null); } KingdomCurrencyFallback.SpendPoints(this.GetActualCost(building.Blueprint)); SettlementBuilding result = this.alias_m_Buildings.Upgrade(building); this.Update(); EventBus.RaiseEvent((ISettlementBuildUpdate h) => h.OnBuildUpdate(building)); return(result); }
public void Commit() { if (this.AutoCommit) { UberDebug.LogWarning("Trying to commit LevelUp with AutoCommit", Array.Empty <object>()); return; } this.Preview.Unit.Dispose(); var UnitPartImportableCompanionType = Type.GetType("Kingmaker.Dungeon.Units.UnitPartImportableCompanion, Assembly-CSharp"); var unitPartImportableCompanion = GetUnitPart(UnitPartImportableCompanionType, this.Unit); if (unitPartImportableCompanion != null) { var levels = (List <LevelPlanData>)AccessTools.Field(UnitPartImportableCompanionType, "Levels").GetValue(unitPartImportableCompanion); levels.Add(this.GetPlan()); } this.ApplyLevelup(this.Unit); this.Unit.Unit.View.UpdateClassEquipment(); LevelUpPreviewThread.Stop(); if (this.State.IsFirstLevel) { this.SetupNewCharacher(); } if (this.m_PlanChanged && !this.State.IsFirstLevel) { this.Unit.Progression.DropLevelPlans(); } if (this.m_OnSuccess != null) { this.m_OnSuccess(); } }
public void log(string channel, string msg) { if (!enable) { return; } if (blackList.Contains(channel)) { return; } if (channel == "Debug") { UberDebug.Log((string.IsNullOrEmpty(name) ? null : (name + ":")) + msg); } else if (channel == "Warning") { UberDebug.LogWarning((string.IsNullOrEmpty(name) ? null : (name + ":")) + msg); } else if (channel == "Error") { UberDebug.LogError((string.IsNullOrEmpty(name) ? null : (name + ":")) + msg); } else { UberDebug.LogChannel(channel, (string.IsNullOrEmpty(name) ? null : (name + ":")) + msg); } }
public override void merge(CardDefine newVersion) { if (newVersion.type != type) { UberDebug.LogWarning(newVersion + "的类型与" + this + "不同,可能是一次非法的数据合并!"); } cost = newVersion.getProp <int>(nameof(cost)); }
public override void merge(CardDefine newVersion) { if (newVersion.type != type) { UberDebug.LogWarning(newVersion + "的类型与" + this + "不同,可能是一次非法的数据合并!"); } cost = newVersion.getProp <int>(nameof(cost)); attack = newVersion.getProp <int>(nameof(attack)); life = newVersion.getProp <int>(nameof(life)); spellDamage = newVersion.getProp <int>(nameof(spellDamage)); isToken = newVersion.getProp <bool>(nameof(isToken)); tags = newVersion.getProp <string[]>(nameof(tags)); keywords = newVersion.getProp <string[]>(nameof(keywords)); }
public override void merge(CardDefine newVersion) { if (newVersion.type != type) { UberDebug.LogWarning(newVersion + "的类型与" + this + "不同,可能是一次非法的数据合并!"); } if (newVersion is GeneratedCardDefine generated) { if (generated.hasProp(nameof(cost))) { cost = generated.getProp <int>(nameof(cost)); } } }
static bool Prefix(SettlementState __instance, SettlementBuilding building, ref SettlementBuilding __result, BuildingsCollection ___m_Buildings) { try { if (!Main.enabled) { return(true); } if (!Main.settings.currencyFallback) { return(true); } if (!building.IsFinished || !___m_Buildings.HasFact(building) || !building.Blueprint.UpgradesTo) { return(false); } if (!KingdomCurrencyFallback.CanSpend(__instance.GetActualCost(building.Blueprint.UpgradesTo))) { UberDebug.LogWarning("Cannot upgrade " + building.Blueprint + ": not enough BP"); return(false); } KingdomCurrencyFallback.SpendPoints(__instance.GetActualCost(building.Blueprint)); SettlementBuilding result = ___m_Buildings.Upgrade(building); __instance.Update(); EventBus.RaiseEvent((ISettlementBuildUpdate h) => h.OnBuildUpdate(building)); __result = result; return(false); } catch (Exception ex) { Main.Error(ex); return(true); } }
public void DoTest() { // UnityEngine.Debug.Log("Starting"); Debug.LogWarning("Log Warning with GameObject", gameObject); Debug.LogError("Log Error with GameObject", gameObject); Debug.Log("Log Message with GameObject", gameObject); Debug.LogFormat("Log Format param {0}", "Test"); Debug.LogFormat(gameObject, "Log Format with GameObject and param {0}", "Test"); UberDebug.Log("ULog"); UberDebug.Log("ULog with param {0}", "Test"); UberDebug.Log(gameObject, "ULog with GameObject"); UberDebug.Log(gameObject, "ULog with GameObject and param {0}", "Test"); UberDebug.LogChannel("Test", "ULogChannel"); UberDebug.LogChannel("Test", "ULogChannel with param {0}", "Test"); UberDebug.LogChannel(gameObject, "Test", "ULogChannel with GameObject"); UberDebug.LogChannel(gameObject, "Test", "ULogChannel with GameObject and param {0}", "Test"); UberDebug.LogWarning("ULogWarning"); UberDebug.LogWarning("ULogWarning with param {0}", "Test"); UberDebug.LogWarning(gameObject, "ULogWarning with GameObject"); UberDebug.LogWarning(gameObject, "ULogWarning with GameObject and param {0}", "Test"); UberDebug.LogWarningChannel("Test", "ULogWarningChannel"); UberDebug.LogWarningChannel("Test", "ULogWarningChannel with param {0}", "Test"); UberDebug.LogWarningChannel(gameObject, "Test", "ULogWarningChannel with GameObject"); UberDebug.LogWarningChannel(gameObject, "Test", "ULogWarningChannel with GameObject and param {0}", "Test"); UberDebug.LogError("ULogError"); UberDebug.LogError("ULogError with param {0}", "Test"); UberDebug.LogError(gameObject, "ULogError with GameObject"); UberDebug.LogError(gameObject, "ULogError with GameObject and param {0}", "Test"); UberDebug.LogErrorChannel("Test", "ULogErrorChannel"); UberDebug.LogErrorChannel("Test", "ULogErrorChannel with param {0}", "Test"); UberDebug.LogErrorChannel(gameObject, "Test", "ULogErrorChannel with GameObject"); UberDebug.LogErrorChannel(gameObject, "Test", "ULogErrorChannel with GameObject and param {0}", "Test"); }
public override void merge(CardDefine newVersion) { if (newVersion.type != type) { UberDebug.LogWarning(newVersion + "的类型与" + this + "不同,可能是一次非法的数据合并!"); } if (newVersion is GeneratedCardDefine generated) { if (generated.hasProp(nameof(cost))) { cost = newVersion.getProp <int>(nameof(cost)); } if (generated.hasProp(nameof(attack))) { attack = newVersion.getProp <int>(nameof(attack)); } if (generated.hasProp(nameof(life))) { life = newVersion.getProp <int>(nameof(life)); } if (generated.hasProp(nameof(spellDamage))) { spellDamage = newVersion.getProp <int>(nameof(spellDamage)); } if (generated.hasProp(nameof(isToken))) { isToken = newVersion.getProp <bool>(nameof(isToken)); } if (generated.hasProp(nameof(tags))) { tags = newVersion.getProp <string[]>(nameof(tags)); } if (generated.hasProp(nameof(keywords))) { keywords = newVersion.getProp <string[]>(nameof(keywords)); } } }
public void log(string channel, string msg) { if (!enable) { return; } if (channel == "Debug") { UberDebug.Log(msg); } else if (channel == "Warning") { UberDebug.LogWarning(msg); } else if (channel == "Error") { UberDebug.LogError(msg); } else { UberDebug.LogChannel(channel, msg); } }
public override void merge(CardDefine newVersion) { if (newVersion.type != type) { UberDebug.LogWarning(newVersion + "的类型与" + this + "不同,可能是一次非法的数据合并!"); } if (newVersion is MasterCardDefine master) { life = master.life; skillID = master.skillID; } else if (newVersion is GeneratedCardDefine generated) { if (generated.hasProp(nameof(life))) { life = generated.getProp <int>(nameof(life)); } if (generated.hasProp(nameof(skillID))) { skillID = generated.getProp <int>(nameof(skillID)); } } }
public static void logWarning(object message, params object[] par) { UberDebug.LogWarning(preprocessMessage(message), par); }
public static void logWarning(UnityEngine.Object context, object message, params object[] par) { UberDebug.LogWarning(context, preprocessMessage(message), par); }