public void mod_EncumbrancePartyPenalty(DescriptionBricksBox box, EncumbranceHelper.CarryingCapacity capacity) { if (!KingmakerPatchSettings.Cheats.AlwaysUnencumbered) { this.source_EncumbrancePartyPenalty(box, capacity); return; } box.Add(DescriptionTemplatesBase.Bricks.Separator3); box.Add(DescriptionTemplatesBase.Bricks.TitleH3).SetText(UIUtility.GetGlossaryEntryName("NoPenalty")); }
public void mod_CopyButton(DescriptionBricksBox box, TooltipData data, bool isTooltip) { if (!KingmakerPatchSettings.UI.AddSpellbookNameToCopyScrollAction) { this.source_CopyButton(box, data, isTooltip); return; } if (data.Item == null || data.Item.Blueprint.GetComponent <CopyItem>() == null) { return; } UnitEntityData unit = UIUtility.GetCurrentCharacter(); var component = data.Item.Blueprint.GetComponent <CopyItem>(); if (component == null || !component.CanCopy(data.Item, unit) || !Kingmaker.Game.Instance.Player.Inventory.Contains(data.Item.Blueprint) || isTooltip) { return; } DescriptionBrick descriptionBrick = box.Add(DescriptionTemplatesBase.Bricks.GreenButton); string actionName = component.GetActionName(unit); actionName = CopyScrollNew.mod_GetSpellbookActionName(actionName, data.Item, unit); descriptionBrick.SetText(actionName); descriptionBrick.SetButtonAction(() => Kingmaker.Game.Instance.UI.DescriptionController.CopyItem(data.Item, unit)); }