Skip to content

Commit

Permalink
Handle Eld-beri lanterns and Colorful Torches v2.
Browse files Browse the repository at this point in the history
Demote more logging.
  • Loading branch information
ceejbot committed Jan 14, 2024
1 parent 2d480a3 commit 0d1dc22
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
18 changes: 18 additions & 0 deletions installer/core/SoulsyHUD_KID.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ Keyword = OCF_InvColorRed|Armor|0x809~EldenRingLantern.esp
Keyword = OCF_InvColorSun|Armor|0xD63~EldenRingLantern.esp
Keyword = OCF_InvColorWhite|Armor|0x805~EldenRingLantern.esp

; Eld-Beri belt-worn lanterns
Keyword = OCF_ToolLantern|Armor|Eld-Beri.esp
Keyword = OCF_InvColorFire|Armor|0x805~Eld-Beri.esp
Keyword = OCF_InvColorBlue|Armor|0x808~Eld-Beri.esp
Keyword = OCF_InvColorShadow|Armor|0x80F~Eld-Beri.esp
Keyword = OCF_InvColorGreen|Armor|0x81a~Eld-Beri.esp
Keyword = OCF_InvColorWhite|Armor|0x890~Eld-Beri.esp

; colored torches
Keyword = OCF_InvColorFire|Armor|0xd62~Colorful Torch V2.esp
Keyword = OCF_InvColorYellow|Armor|0xd63~Colorful Torch V2.esp
Keyword = OCF_InvColorGreen|Armor|0xd64~Colorful Torch V2.esp
Keyword = OCF_InvColorDruid|Armor|0xd65~Colorful Torch V2.esp
Keyword = OCF_InvColorLunar|Armor|0xd66~Colorful Torch V2.esp
Keyword = OCF_InvColorBlue|Armor|0xd67~Colorful Torch V2.esp
Keyword = OCF_InvColorPurple|Armor|0xd68~Colorful Torch V2.esp
Keyword = OCF_InvColorPink|Armor|0xd69~Colorful Torch V2.esp

; Effects granted by some minor powers and spells
; Bats vampire lord spell "Bats Effect" [MGEF:0200E654]
Keyword = Soulsy_Power_Bats|Magic Effect|DLC1BatsEffect
Expand Down
2 changes: 1 addition & 1 deletion src/controller/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl Controller {
// holds this would be a lot less work, but I am stupid.

let kind = item.kind().clone();
log::debug!(
log::trace!(
"inventory count update: name='{}'; count={new_count}",
item.name()
);
Expand Down
22 changes: 11 additions & 11 deletions src/game/equippable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace equippable

if (form->Is(RE::FormType::Shout))
{
rlog::debug("making HudItem for shout: '{}'"sv, safename);
rlog::trace("making HudItem for shout: '{}'"sv, safename);
auto* shout = form->As<RE::TESShout>();

if (!shout) return simple_from_formdata(ItemCategory::Shout, std::move(safename), formSpec);
Expand All @@ -108,7 +108,7 @@ namespace equippable
if (spell_type == RE::MagicSystem::SpellType::kLesserPower ||
spell_type == RE::MagicSystem::SpellType::kPower)
{
rlog::debug("making HudItem for power: '{}'"sv, safename);
rlog::trace("making HudItem for power: '{}'"sv, safename);
const auto* costliest = spell->GetCostliestEffectItem();
if (costliest)
{
Expand All @@ -125,7 +125,7 @@ namespace equippable
}

// Regular spells.
rlog::debug("making HudItem for spell: '{}'"sv, safename);
rlog::trace("making HudItem for spell: '{}'"sv, safename);
const auto* costliest = spell->GetCostliestEffectItem();
if (costliest)
{
Expand All @@ -145,7 +145,7 @@ namespace equippable

if (form->Is(RE::FormType::Ammo))
{
rlog::debug("making HudItem for ammo: '{}'"sv, safename);
rlog::trace("making HudItem for ammo: '{}'"sv, safename);
const auto* ammo = form->As<RE::TESAmmo>()->AsKeywordForm();
ammo->ForEachKeyword(KeywordAccumulator::collect);
auto& keywords = KeywordAccumulator::mKeywords;
Expand All @@ -160,7 +160,7 @@ namespace equippable
const auto* weapon = form->As<RE::TESObjectWEAP>();
if (weapon)
{
rlog::debug("making HudItem for weapon: '{}'"sv, safename);
rlog::trace("making HudItem for weapon: '{}'"sv, safename);
weapon->ForEachKeyword(KeywordAccumulator::collect);
auto& keywords = KeywordAccumulator::mKeywords;
if (weapon->IsBound()) { keywords->push_back(std::string("OCF_InvColorBound")); }
Expand All @@ -173,7 +173,7 @@ namespace equippable

if (form->IsArmor())
{
rlog::debug("making HudItem for armor: '{}'"sv, safename);
rlog::trace("making HudItem for armor: '{}'"sv, safename);
const auto* armor = form->As<RE::TESObjectARMO>();
armor->ForEachKeyword(KeywordAccumulator::collect);
auto& keywords = KeywordAccumulator::mKeywords;
Expand All @@ -190,7 +190,7 @@ namespace equippable
if (form->Is(RE::FormType::Light))
{
// This form type does not have keywords. This presents a problem. Cough.
rlog::debug("making HudItem for light: '{}';"sv, safename);
rlog::trace("making HudItem for light: '{}';"sv, safename);
const auto name = std::string(form->GetName()); // this use of GetName() is okay
if (name.find("Lantern") != std::string::npos) // yes, very limited in effectiveness; TODO
{
Expand All @@ -204,7 +204,7 @@ namespace equippable

if (form->Is(RE::FormType::Scroll))
{
rlog::debug("making HudItem for scroll: '{}'"sv, safename);
rlog::trace("making HudItem for scroll: '{}'"sv, safename);
auto* scroll = form->As<RE::ScrollItem>();
if (scroll->GetCostliestEffectItem() && scroll->GetCostliestEffectItem()->baseEffect)
{
Expand All @@ -226,7 +226,7 @@ namespace equippable

if (alchemy_potion->IsFood())
{
rlog::debug("making HudItem for food: '{}'"sv, safename);
rlog::trace("making HudItem for food: '{}'"sv, safename);
alchemy_potion->ForEachKeyword(KeywordAccumulator::collect);
auto& keywords = KeywordAccumulator::mKeywords;
rust::Box<HudItem> item =
Expand All @@ -235,7 +235,7 @@ namespace equippable
}
else
{
rlog::debug("making HudItem for potion: '{}'"sv, safename);
rlog::trace("making HudItem for potion: '{}'"sv, safename);
const auto* effect = alchemy_potion->GetCostliestEffectItem()->baseEffect;
auto actor_value = effect->data.primaryAV;
rust::Box<HudItem> item = potion_from_formdata(alchemy_potion->IsPoison(),
Expand All @@ -249,7 +249,7 @@ namespace equippable

if (form->Is(RE::FormType::Book))
{
rlog::debug("making HudItem for boook: '{}';"sv, safename);
rlog::trace("making HudItem for boook: '{}';"sv, safename);
rust::Box<HudItem> item = simple_from_formdata(ItemCategory::Book, std::move(safename), formSpec);
return item;
}
Expand Down

0 comments on commit 0d1dc22

Please sign in to comment.