ThreeKingdomsSlingshot/Assets/Scripts/OutGame/Data/OutGameTables.Costume.cs

76 lines
4.8 KiB
C#
Raw Normal View History

성장 · 임무 · 출정 · 외형 · 정보 일괄 — 임무(미션) 메뉴 · 영웅 각성 · 진화(진영 비서) · 스킬 강화(영웅 조각 + 만능 조각) · 각성 칸 = 승급 장비 등급 · 장비 등급 7(불멸 red · 신화 rainbow) · 병종 장비 210 · 장별 드랍 · 영웅 Lv100 · 출정 = 로비 편성(학습 판 = 연의 전기만) · 보스 말풍선만 · 1장 레벨디자인 · 외형(코스튬) 꾸미기 레이어 · 영웅 정보(능력치 · 열전) - 임무: 일일 · 주간 · 업적 · 카운터 36 · 우편 · 로비 버튼(MissionTests) - 각성 · 진화: 표 11장 · 진화 = ★ 최대 레벨 + 진영 비서 + 골드 · 비서 교환 · 각성 굴림 · 잠금 · 칸 = 승급 장비 등급(AwakenTests) - 스킬 강화: skill_upgrade · skill_config(최고 Lv10 · 상한 = 영웅 레벨 10 단위) · 만능 조각 확인 팝업 - 장비: gear_grades · gear_kinds · gear_drop_chapters · gear_drop_stages · 승급 7단계 · 무지개 7색 순환(UiRainbow) · TKS/Import Gear(GearTests) - 출정: 학습 판 = 연의 전기 서장만(WantsTutorialPlan) · boss_intro_config talk_main · 1장 표 · 1-4 가시덤불 정정(MainStageTests · TutorialTests [Ignore]) - 외형: 부위 4(외형 = 추후) · 꾸미기 9 · 기준점 · 알파 경계 · 전투 · UI 레이어 · 미리보기 · 상세(CostumeTests) - 정보: 능력치(기본 + 성장 = 합계 · HeroRules 그대로) · 전투 능력치 7 · 성장 내역 · 내역 창 · 열전(HeroInfoTests) - 같은 작업 트리의 다른 세션 미커밋 변경(스킬 이펙트 · 전투 해석기 · 보급전 표 · 스킬 표 등)은 넣지 않음 PD 2026-11-20 「지금까지 본 PC에서 구현된 모든 성장 관련 기능을 다른 세션에서 확인할 수 있도록 푸시까지 진행해」 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 03:15:36 +00:00
using System.Collections.Generic;
using UnityEngine;
namespace TKS.OutGame
{
/// <summary>외형(코스튬) 표 4장 해석·검증(2026-11-20 개발요청_코스튬 §1) — 알파 경계(frames)는 임포트(DataImporter.ImportCostume)가 그림에서 채운다.</summary>
public static partial class OutGameTables
{
static readonly string[] CostumeOpenStates = { "Open", "Later" };
static CostumeDb ParseCostume(Dictionary<string, List<Dictionary<string, string>>> rows, OutGameData d, List<string> e)
{
var t = ScriptableObject.CreateInstance<CostumeDb>();
const string fs = "costume_slots.csv";
if (Cols(rows[fs], fs, e, "s_slot", "n_order", "s_name_ko", "n_layer", "s_anchor", "e_state"))
{
var seen = new HashSet<string>();
foreach (var r in rows[fs])
{
string st = Get(r, "e_state");
if (System.Array.IndexOf(CostumeOpenStates, st) < 0) e.Add(fs + ": " + Get(r, "s_slot") + " e_state 「" + st + "」 = Open · Later 가 아님");
var s = new CostumeDb.Slot { slot = Get(r, "s_slot"), order = Int(r, "n_order", fs, e), nameKo = Get(r, "s_name_ko"), anchor = Get(r, "s_anchor"), open = st == "Open" };
if (s.open) s.layer = Int(r, "n_layer", fs, e);
if (!Unique(seen, s.slot, fs, r, e)) continue;
if (s.open && (s.layer <= 0 || s.anchor.Length == 0)) e.Add(fs + ": " + s.slot + " 열린 부위인데 n_layer · s_anchor 없음");
t.slots.Add(s);
}
t.slots.Sort((a, b) => a.order.CompareTo(b.order));
}
const string fi = "costume_items.csv";
if (Cols(rows[fi], fi, e, "s_id", "s_slot", "s_name_ko", "e_rarity", "s_source", "s_source_ko", "s_art"))
{
var seen = new HashSet<string>();
foreach (var r in rows[fi])
{
var it = new CostumeDb.Item { id = Get(r, "s_id"), slot = Get(r, "s_slot"), nameKo = Get(r, "s_name_ko"), rarity = Get(r, "e_rarity"), source = Get(r, "s_source"), sourceKo = Get(r, "s_source_ko"), art = Get(r, "s_art") };
if (!Unique(seen, it.id, fi, r, e)) continue;
var sl = t.SlotOf(it.slot);
if (sl == null) e.Add(fi + ": " + it.id + " s_slot 「" + it.slot + "」 = costume_slots 에 없음");
else if (!sl.open) e.Add(fi + ": " + it.id + " 부위 「" + it.slot + "」 = 잠긴 부위(추후)");
if (Resources.Load<Texture2D>(it.art) == null) e.Add(fi + ": " + it.id + " 그림 Resources/" + it.art + " 없음");
t.items.Add(it);
}
}
const string fc = "costume_config.csv";
if (Cols(rows[fc], fc, e, "s_key", "s_value"))
foreach (var r in rows[fc]) t.config.Add(new CostumeDb.KV { key = Get(r, "s_key"), value = Get(r, "s_value") });
foreach (var k in new[] { "own_scope", "wear_scope", "preview", "rarity_color", "anchor_fallback" })
if (t.Cfg(k).Length == 0) e.Add(fc + ": 「" + k + "」 줄 없음");
CfgIs(t.Cfg("own_scope"), fc + " own_scope", e, "account");
CfgIs(t.Cfg("wear_scope"), fc + " wear_scope", e, "per_hero");
CfgIs(t.Cfg("preview"), fc + " preview", e, "free");
CfgIs(t.Cfg("anchor_fallback"), fc + " anchor_fallback", e, "auto_bbox");
foreach (var it in t.items)
if (d.Gear != null && d.Gear.GradeOf(t.RarityGrade(it.rarity)) == null) e.Add(fc + ": rarity_color 에 " + it.id + " 등급 「" + it.rarity + "」 없음(gear_grades 키)");
const string fa = "costume_anchors.csv";
if (Cols(rows[fa], fa, e, "s_unit_id", "s_anchor", "f_x", "f_y", "f_scale", "f_rot"))
foreach (var r in rows[fa])
{
var a = new CostumeDb.Anchor { unit = Get(r, "s_unit_id"), anchor = Get(r, "s_anchor"), x = Float(r, "f_x", fa, e), y = Float(r, "f_y", fa, e), scale = Float(r, "f_scale", fa, e), rot = Float(r, "f_rot", fa, e) };
if (d.Heroes != null && d.Heroes.Get(a.unit) == null) e.Add(fa + ": 유닛 「" + a.unit + "」 = heroes 에 없음");
bool known = false;
foreach (var s in t.slots)
if (s.anchor == a.anchor) known = true;
if (!known) e.Add(fa + ": 기준점 「" + a.anchor + "」 = costume_slots s_anchor 에 없음");
if (a.x < 0f || a.x > 1f || a.y < 0f || a.y > 1f || a.scale <= 0f) e.Add(fa + ": " + a.unit + " " + a.anchor + " 값 범위(0~1 · scale > 0) 밖");
t.anchors.Add(a);
}
return t;
}
}
}