Example #1
0
        public override void ShowLexicon(PanelBuilder panel, [CanBeNull] MapElementInfo onMap, [CanBeNull] NVector pos)
        {
            base.ShowLexicon(panel);
            if (!string.IsNullOrEmpty(winter))
            {
                DataTerrain w = L.b.terrains[winter];
                panel.AddSubLabel(S.T("terrainPassableWinter"), w.Name(), w.Sprite());
            }

            panel.AddHeaderLabelT("move");
            foreach (Movement m in L.b.movements.Values())
            {
                int costO = MoveCost(m.id);
                int cost  = pos == null?costO:GameMgmt.Get().newMap.PathFinding(pos.level).CostNode(S.ActPlayer(), m.id, pos);

                var mess = S.T("terrainPassable", cost == 0?S.T("terrainPassableNot"):S.T("terrainPassableAP", cost), cost == costO ? "" : S.T("terrainPassableOrg", costO == 0?S.T("terrainPassableNot"):S.T("terrainPassableAP", costO)));
                panel.AddSubLabel(m.Name(), mess, m.Icon);
            }
            //if (movement.Count == 0) panel.AddImageLabel(S.T("terrainPassableNot"),"no");
            panel.AddModi(modi);

            ShowRes(panel, S.IsGame()?S.ActPlayer():null, pos);
        }
Example #2
0
 public TerrainSplitElement(DataTerrain data, NVector pos) : base(data.Name(), data.Sprite())
 {
     _data = data;
     _pos  = pos;
 }