public void SetCodeType(Codetype _codetype, MapEditor _mapEditor, bool IsTriggerCode = false) { mapEditor = _mapEditor; codetype = _codetype; this.IsTriggerCode = IsTriggerCode; ListCreate(); }
public string GetCodeName(Codetype codetype, int index) { int label; switch (codetype) { case Codetype.Unit: if (index >= 228) { string[] addstring = { "없음", "유닛과 건물", "유닛", "건물", "생산건물" }; return(addstring[index - 228]); } string d = UNIx.STRING[index].String; string org = UseMapEditor.Global.WindowTool.GetStat_txt(index); if (UNIx.STRING[index].IsLoaded) { return(d + "\n" + org); } return(org); case Codetype.Upgrade: label = (int)UseMapEditor.Global.WindowTool.scdata.datFile.Values(DatFile.DatFiles.upgrades, "Label", index).Data - 1; return(UseMapEditor.Global.WindowTool.GetStat_txt(label)); case Codetype.Tech: label = (int)UseMapEditor.Global.WindowTool.scdata.datFile.Values(DatFile.DatFiles.techdata, "Label", index).Data - 1; return(UseMapEditor.Global.WindowTool.GetStat_txt(label)); case Codetype.Sprite: label = (ushort)UseMapEditor.Global.WindowTool.scdata.datFile.Values(DatFile.DatFiles.sprites, "Image File", index).Data; return(UseMapEditor.Global.WindowTool.imagename[label]); } return("???"); }