Files

36 lines
1023 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# LeoEnv.js — handler() (satır 98)
[← LeoEnv.js](index.md) · [← Master](../../wiki.md)
Parça 2/2 · [önceki](handler.md)
```javascript
var bosSlot = -1;
for (var i = 0; i < 36; i++)
{
if (i === secili) continue;
var s = inv.getStack(i);
if (!s || s.isEmpty()) { bosSlot = i; break; }
}
if (bosSlot === -1)
{
var g = uiContext.get("panel");
g.removeAll();
envanterCiz(uiContext, states, oyuncu);
// envanter dolu mesajı
var panel2 = uiContext.get("panel");
panel2.text("Envanter dolu!", 160, 178, 0xffff4444, 0.5, 0.0);
return;
}
// kopyala — aynı item aynı count ile
var kopyaItem = mappet.createItemNBT(item.serialize());
inv.setStack(bosSlot, kopyaItem);
states.setString("secili_slot", "-1");
envanterCiz(uiContext, states, oyuncu);
}
}
```