DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ListItemRelatedActions()

bool ScriptConsoleItemsTab::ListItemRelatedActions ( )
inlineprivate

См. определение в файле ScriptConsoleItemsTab.c строка 1577

1578 {
1579 string message = "";
1580
1581 array<ActionBase_Basic> interactActions = new array<ActionBase_Basic>();
1582 m_PreviewEntity.GetActions(InteractActionInput, interactActions);
1583 if (interactActions)
1584 {
1585 message += "\n== Interact (F)\n\n";
1586 foreach (ActionBase_Basic iaction : interactActions)
1587 {
1588 if (iaction.Type() == ActionWorldCraft)
1589 continue;
1590
1591 ActionBase ia = ActionBase.Cast(iaction);
1592 message += string.Format("%1 <%2>\n", Widget.TranslateString(ia.GetText()), ia.ClassName());
1593 }
1594 }
1595
1596 array<ActionBase_Basic> continuousInteractActions = new array<ActionBase_Basic>();
1597 m_PreviewEntity.GetActions(ContinuousInteractActionInput, continuousInteractActions);
1598 if (continuousInteractActions)
1599 {
1600 message += "\n== Continuous Interact (F hold)\n\n";
1601 foreach (ActionBase_Basic ciaction : continuousInteractActions)
1602 {
1603 if (ciaction.Type() == ActionWorldCraft)
1604 continue;
1605
1606 ActionBase cia = ActionBase.Cast(ciaction);
1607 message += string.Format("%1 <%2>\n", Widget.TranslateString(cia.GetText()), cia.ClassName());
1608 }
1609 }
1610
1611 array<ActionBase_Basic> singleActions = new array<ActionBase_Basic>();
1612 m_PreviewEntity.GetActions(DefaultActionInput, singleActions);
1613 if (singleActions)
1614 {
1615 message += "\n== Single (LMB)\n\n";
1616 foreach (ActionBase_Basic saction : singleActions)
1617 {
1618 if (saction.Type() == ActionWorldCraft)
1619 continue;
1620
1621 ActionBase sa = ActionBase.Cast(saction);
1622 message += string.Format("%1 <%2>\n", Widget.TranslateString(sa.GetText()), sa.ClassName());
1623 }
1624 }
1625
1626 array<ActionBase_Basic> continuousActions = new array<ActionBase_Basic>();
1627 m_PreviewEntity.GetActions(ContinuousDefaultActionInput, continuousActions);
1628 if (continuousActions)
1629 {
1630 ActionBase_Basic craftingAction;
1631 message += "\n== Continuous (LMB hold)\n\n";
1632 foreach (ActionBase_Basic caction : continuousActions)
1633 {
1634 if (caction.Type() != ActionWorldCraft)
1635 {
1636 ActionBase ca = ActionBase.Cast(caction);
1637 message += string.Format("%1 <%2>\n", Widget.TranslateString(ca.GetText()), ca.ClassName());
1638 }
1639 else
1640 {
1641 craftingAction = caction;
1642 }
1643 }
1644 message += "\n== Crafting recipes \n\n";
1645 if (craftingAction)
1646 {
1647 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
1648 array<RecipeBase> recipes = pluginRecipesManager.GetRecipesForItem(m_PreviewEntity.GetType());
1649 foreach (RecipeBase recipe : recipes)
1650 {
1651 if (recipe.IsItemInRecipe("Inventory_Base"))
1652 continue;
1653
1654 message += string.Format("%1 <%2>\n", Widget.TranslateString(recipe.GetName()), recipe.Type());
1655 }
1656 }
1657 }
1658
1659 ScriptConsoleUniversalInfoDialog infoDialog = ScriptConsoleUniversalInfoDialog.Cast(g_Game.GetUIManager().EnterScriptedMenu(MENU_SCRIPTCONSOLE_UNIVERSAL_INFO_DIALOG, m_ScriptConsole));
1660 infoDialog.SetLabel(string.Format("%1 related actions", m_PreviewEntity.GetType()));
1661 infoDialog.SetContent(message);
1662
1663 return true;
1664 }
void ActionBase()
Определения ActionBase.c:82
void ContinuousDefaultActionInput(PlayerBase player)
Определения ActionInput.c:630
DayZGame g_Game
Определения DayZGame.c:4074
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:326
void RecipeBase()
Определения RecipeBase.c:67
static EntityAI m_PreviewEntity
Определения ScriptConsoleItemsTab.c:15
ScriptConsole m_ScriptConsole
Определения ScriptConsoleTabBase.c:9
const int MENU_SCRIPTCONSOLE_UNIVERSAL_INFO_DIALOG
Определения 3_Game/DayZ/constants.c:219
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
WorkspaceWidget Widget
Defined in code.

Перекрестные ссылки ActionBase(), ContinuousDefaultActionInput(), string::Format(), g_Game, GetPlugin(), m_PreviewEntity, ScriptConsoleTabBase::m_ScriptConsole и MENU_SCRIPTCONSOLE_UNIVERSAL_INFO_DIALOG.

Используется в OnClick().