Разработка: necroslot - ячейка пояса в руке (проверка без мыши)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5565bba13f
commit
6cf305b4c4
@@ -14,6 +14,7 @@ namespace NecromancerTome
|
||||
/// necroaim - позиция игрока и блок под прицелом
|
||||
/// necroplace блок x y z [поворот 0-3] - поставить блок (как игрок: OnBlockAdded, TE)
|
||||
/// necrohold предмет [число] - положить в текущую ячейку пояса и взять в руку
|
||||
/// necroslot [N] - какая ячейка пояса в руке и что в ячейках; N - взять в руку ячейку N (23.10: проверка Archer's Eye без мыши)
|
||||
/// necrobox x y z list|clear|add предмет число - содержимое хранилища (ящик, сумка урны)
|
||||
/// necrourn x y z info|skull 0|1|from|to|out bx by bz|clear|sample предмет число|group все|нет - урна
|
||||
/// necroclick 0|1 - отпущенная ЛКМ/ПКМ ножом для нитей по блоку под прицелом
|
||||
@@ -44,6 +45,21 @@ namespace NecromancerTome
|
||||
case "necroaim": Aim(w, pl); break;
|
||||
case "necroplace": PlaceBlock(w, _params); break;
|
||||
case "necrohold": Hold(pl, _params); break;
|
||||
case "necroslot":
|
||||
{
|
||||
if (_params.Count > 0)
|
||||
{
|
||||
pl.inventory.SetHoldingItemIdx(int.Parse(_params[0]));
|
||||
}
|
||||
string belt = "";
|
||||
for (int i = 0; i < pl.inventory.SlotCount; i++)
|
||||
{
|
||||
ItemStack st = pl.inventory.GetItem(i);
|
||||
belt += " " + i + ":" + (st == null || st.IsEmpty() ? "-" : st.itemValue.ItemClass.GetItemName());
|
||||
}
|
||||
Out("necroslot: в руке " + pl.inventory.holdingItemIdx + ";" + belt);
|
||||
break;
|
||||
}
|
||||
case "necrobox": Box(w, _params); break;
|
||||
case "necrourn": Urn(w, _params); break;
|
||||
case "necrodamage":
|
||||
@@ -512,6 +528,15 @@ namespace NecromancerTome
|
||||
public override void Execute(List<string> _params, CommandSenderInfo _senderInfo) => NecroDev.Run("necrohold", _params);
|
||||
}
|
||||
|
||||
[Preserve]
|
||||
public class ConsoleCmdNecroSlot : ConsoleCmdAbstract
|
||||
{
|
||||
public override string[] getCommands() => new[] { "necroslot" };
|
||||
public override string getDescription() => "NecromancerTome (разработка): ячейка пояса в руке: [N]";
|
||||
public override bool AllowedInMainMenu => false;
|
||||
public override void Execute(List<string> _params, CommandSenderInfo _senderInfo) => NecroDev.Run("necroslot", _params);
|
||||
}
|
||||
|
||||
[Preserve]
|
||||
public class ConsoleCmdNecroBox : ConsoleCmdAbstract
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user