public static CellTYPE getInstance() { if (instance == null) { instance = new CellTYPE(); instance.read_config(); } return(instance); }
public static TES5.Group convert(string file) { TES3.ESM.open(file); TES5.Group cell_grup = new TES5.Group("CELL"); while (TES3.ESM.find("CELL")) { TES3.CELL cell3 = new TES3.CELL(); cell3.read(); if (!cell3.interior) { continue; } if (cell3.references.Count == 0) { continue; } Log.info(cell3.cell_name); TES5.CELL cell5 = new TES5.CELL(cell3.cell_name); cell5.editor_id = cell3.cell_name; cell5.full_name = cell3.cell_name; cell5.Interior = true; if (cell3.HasWater) { // Calculate cell bounds foreach (TES3.REFR mw_ref in cell3.references) { cell5.update_bounds(mw_ref.x, mw_ref.y); } // add water planes cell5.addWater(cell3.water_height); } cell5.add_ambient_light(LGTM.get(CellTYPE.getInstance().get_class(cell3.cell_name))); cell5.addToGroup(cell_grup); cell5.pack(); } TES3.ESM.close(); return(cell_grup); }