private void ShowIntern(PanelBuilder panel, MapElementInfo onMap, NVector pos) { base.ShowLexicon(panel); var b = L.b.modifiers[C.BuildRes].CalcText(buildTime, S.ActPlayer(), pos); L.b.res[C.BuildRes].AddSubLabel(panel, b.value, "round", b.display); int _view = onMap == null ? visibilityRange : onMap.data.visibilityRange; int _atk = onMap == null ? atk : onMap.data.atk; int _def = onMap == null ? def : onMap.data.def; var v = L.b.modifiers[C.ViewModi].CalcText(_view, S.ActPlayer(), pos); L.b.modifiers[C.ViewModi].AddSubLabel(panel, v.value, "field", v.display); ShowWorker(panel); if (_atk > 0 || _def > 0) { panel.AddHeaderLabelT("fight"); } panel.AddSubLabelT("atk", _atk, "atk"); panel.AddSubLabelT("def", _def, "def"); panel.AddResT("constructionCost", cost); req.BuildPanel(panel, S.T("constructionReq"), null, pos); panel.AddModi(modi); }
public override void ShowDetail(PanelBuilder panel) { panel.AddImageLabel(_info.name, _info.Sprite()); panel.AddHeaderLabel("Information"); //diff unit? if (!_info.Owner(S.ActPlayerID())) { panel.AddSubLabel("Owner", _info.Player().name, _info.Player().Coat().Icon); panel.AddSubLabel("HP", $"??/{_info.baseData.hp}", "hp"); panel.AddSubLabel("AP", $"??/{_info.baseData.ap}", "ap"); return; } panel.RichText(_info.data.info.LastInfo()); panel.AddSubLabel("HP", $"{_info.data.hp}/{_info.data.hpMax}", "hp"); panel.AddSubLabel("AP", $"{_info.data.ap}/{_info.data.apMax}", "ap"); Construction con = _info.GetComponent <Construction>(); if (con != null) { panel.AddResT("constructionOnGoing", _info.data.construction.ToDictionary(entry => entry.Key, entry => entry.Value)); panel.AddLabelT("constructionOnGoingDesc"); } panel.AddModi(_info.data.modi); }
public override void ShowDetail(PanelBuilder panel) { panel.AddHeaderLabelT("general"); panel.AddSubLabel("Name", _player.name, _player.Coat().Icon); panel.AddSubLabel(L.b.nations.Name(), _player.Nation().Name(), _player.Nation().Icon); panel.AddSubLabel("Points", _player.points.ToString()); panel.AddModi(S.Game().data.modi); }
public override void ShowLexicon(PanelBuilder panel) { base.ShowLexicon(panel); if (category == "construction") { panel.AddHeaderLabelT("construction"); panel.AddSubLabelT("hp", hp, "hp"); panel.AddSubLabelT("ap", ap, "ap"); panel.AddModi(modi); } if (category == "food") { panel.AddHeaderLabelT("food"); panel.AddSubLabelT("hp", hp, "hp"); panel.AddSubLabelT("ap", ap, "ap"); panel.AddModi(modi); } }
public override void ShowLexicon(PanelBuilder panel) { base.ShowLexicon(panel); panel.AddSubLabel("Daytime", daytime); panel.AddSubLabel("Season", season); panel.AddModi(modi); if (S.IsGame()) { panel.AddHeaderLabel("Actual"); panel.AddLabel(GameMgmt.Get().gameRound.GetRoundString()); } }
public override void ShowLexicon(PanelBuilder panel) { base.ShowLexicon(panel); L.b.res[C.BuildRes].AddSubLabel(panel, buildTime, "round"); L.b.modifiers[C.ViewModi].AddSubLabel(panel, visibilityRange, "field"); ShowWorker(panel); panel.AddResT("constructionCost", cost); req.BuildPanel(panel, S.T("constructionReq")); panel.AddModi(modi); ActionDisplaySettings sett = new ActionDisplaySettings(panel, null); sett.compact = true; action.BuildPanelT(sett); }
public override void ShowLexicon(PanelBuilder panel) { DataTerrain terr = L.b.terrains[Terrain]; base.ShowLexicon(panel); panel.AddHeaderLabelT("general"); panel.AddImageLabel($"Home terrain: {terr.Name()}", terr.Sprite()); panel.AddModi(Modi); if (elements.Count > 0) { panel.AddHeaderLabel(S.T(L.b.elements.Id(), elements.Count)); foreach (var element in elements) { L.b.elements[element].AddImageLabel(panel); } } }
public void ShowInfo(PanelBuilder panel) { if (!ActPlayerIsOwner()) { panel.AddImageLabel(name, GetIcon()); panel.AddLabel(GetTownLevelName()); panel.AddSubLabel("Owner", Player().name, Player().Coat().Icon); return; } panel.AddInputRandom("town name", name, val => name = val, () => LClass.s.NameGenerator(Player().Nation().TownNameGenerator)); panel.AddLabel(GetTownLevelName()); L.b.res[C.Inhabitant] .AddImageLabel(panel, $"{GetRes(C.Inhabitant)}/{MaxInhabitantsAndWorker().maxInhabitants}"); //panel.AddSubLabel(L.b.res["inhabitant"].name,$"{}/{}",L.b.res["inhabitant"].Icon); //ShowRes(panel); ShowCombineRes(panel); panel.AddModi(modi); }
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); }
public override void ShowLexicon(PanelBuilder panel) { base.ShowLexicon(panel); panel.AddModi(modi); }