The player now has some starting items to craft a first weapon, and it is craftable in the UI.

This commit is contained in:
Zed A. Shaw 2025-04-26 13:18:43 -04:00
parent c8a8d2b1af
commit bc557652ba
11 changed files with 199 additions and 155 deletions

View file

@ -35,7 +35,7 @@ namespace gui {
void CombatUI::init() {
$gui.world().set_the<Background>({$gui.$parser, ColorValue::DARK_MID});
auto& the_belt = $level.world->get<combat::RitualBelt>($level.player);
auto& the_belt = $level.world->get_the<ritual::Belt>();
for(int slot = 0; slot < 4; slot++) {
if(the_belt.has(slot)) {
@ -43,7 +43,7 @@ namespace gui {
std::wstring label = fmt::format(L"Attack {}", slot+1);
auto& ritual = the_belt.get(slot);
using enum combat::RitualElement;
using enum ritual::Element;
switch(ritual.element) {
case FIRE: