Пример #1
0
        public static TES5.Group convert()
        {
            if (furn != null)
            {
                return(furn);
            }

            furn = new TES5.Group("FURN");

            TES5.ESM esm = TES5.ESM.read_from_file(Config.Paths.Templates.furniture);

            TES5.Group furn_g = esm.find_TOP_group_OR_FAIL("FURN");

            chair      = furn_g.find_record("mw_chair_marker");
            bed        = furn_g.find_record("mw_bed_marker");
            bench      = furn_g.find_record("mw_bench_marker");
            bed_double = furn_g.find_record("mw_doublebed_marker");

            if (chair == null || bed == null || bench == null || bed_double == null)
            {
                Log.error("FURN some Furniture marker were not assigned. Possibly bad furn.esp template");
            }

            chair.reset_formid("mw_chair_marker");
            bed.reset_formid("mw_bed_marker");
            bench.reset_formid("mw_bench_marker");
            bed_double.reset_formid("mw_doublebed_marker");

            furn.addRecord(chair);
            furn.addRecord(bed);
            furn.addRecord(bench);
            furn.addRecord(bed_double);

            return(furn);
        }
Пример #2
0
        private static void read_templates()
        {
            has_read = true;

            TES5.ESM   esm       = TES5.ESM.read_from_file(Config.Paths.light_templates);
            TES5.Group LGTM_GRUP = esm.find_TOP_group_OR_FAIL("LGTM", "No LGTM Group in Template File");


            default_ = LGTM_GRUP.find_record("mw_ltmp_default");
            daedric  = LGTM_GRUP.find_record("mw_ltmp_daedric");
            fort     = LGTM_GRUP.find_record("mw_ltmp_fort");
            dwemer   = LGTM_GRUP.find_record("mw_ltmp_dwemer");
            tomb     = velothi = LGTM_GRUP.find_record("mw_ltmp_tomb");
            hlaalu   = LGTM_GRUP.find_record("mw_ltmp_hlaalu");
            redoran  = LGTM_GRUP.find_record("mw_ltmp_redoran");
            telvanni = LGTM_GRUP.find_record("mw_ltmp_telvanni");
            cave     = mine = LGTM_GRUP.find_record("mw_ltmp_mine");
            imperial = LGTM_GRUP.find_record("mw_ltmp_imperial");

            if (default_ == null || hlaalu == null || fort == null || imperial == null || redoran == null || telvanni == null || dwemer == null || daedric == null || cave == null || tomb == null)
            {
                Log.error("TES5:LTMP Not all Lighting templates were assigned");
            }


            default_.reset_formid("mw_ltmp_default");
            daedric.reset_formid("mw_ltmp_daedric");
            fort.reset_formid("mw_ltmp_fort");
            dwemer.reset_formid("mw_ltmp_dwemer");
            tomb.reset_formid("mw_ltmp_tomb");
            hlaalu.reset_formid("mw_ltmp_hlaalu");
            redoran.reset_formid("mw_ltmp_redoran");
            telvanni.reset_formid("mw_ltmp_telvanni");
            cave.reset_formid("mw_ltmp_mine");
            imperial.reset_formid("mw_ltmp_imperial");
        }