Двери одержимого: команды составных блоков с приставкой функции (TEFeatureDoor:open) - сравнение по имени после двоеточия
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
fada747164
commit
68e7708446
@@ -2258,7 +2258,11 @@ namespace NecromancerTome
|
|||||||
BlockActivationCommand[] cmds = b.GetBlockActivationCommands(_world, bv, pos, _player);
|
BlockActivationCommand[] cmds = b.GetBlockActivationCommands(_world, bv, pos, _player);
|
||||||
for (int i = 0; cmds != null && i < cmds.Length; i++)
|
for (int i = 0; cmds != null && i < cmds.Length; i++)
|
||||||
{
|
{
|
||||||
if (!cmds[i].enabled || System.Array.IndexOf(UseCommands, cmds[i].text) < 0)
|
// У составных блоков команда с приставкой функции: «TEFeatureDoor:open» (тест 13.10) - сравниваем имя после
|
||||||
|
// двоеточия, выполняем полное (по приставке блок находит функцию).
|
||||||
|
string name = cmds[i].text ?? "";
|
||||||
|
name = name.Substring(name.LastIndexOf(':') + 1);
|
||||||
|
if (!cmds[i].enabled || System.Array.IndexOf(UseCommands, name) < 0)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user