Beispiel #1
0
        public void writeJson(StreamWriter outputStream, string tab, bool isFirst)
        {
            string entryStarter  = isFirst ? "" : ",";
            string subEntriesTab = $"{tab}\t";

            outputStream.Write($",\n{tab}\"mPosition\": {{");
            Utils.writeJson(outputStream, "objcell_id", objcell_id, subEntriesTab, true, true);
            frame.writeJson(outputStream, subEntriesTab, false);
            outputStream.Write($"\n{tab}}}");
        }
Beispiel #2
0
        public void writeJson(StreamWriter outputStream, string tab, bool isFirst)
        {
            string entryStarter     = isFirst ? "" : ",";
            string subEntriesTab    = $"{tab}\t";
            string subSubEntriesTab = $"{tab}\t\t";

            outputStream.Write("{0}\n{1}{{", entryStarter, tab);
            Utils.writeJson(outputStream, "key", key, subEntriesTab, true, true);
            outputStream.Write($",\n{subEntriesTab}\"value\": {{");
            Utils.writeJson(outputStream, "objcell_id", objcell_id, subSubEntriesTab, true, true);
            frame.writeJson(outputStream, subSubEntriesTab, false);
            outputStream.Write($"\n{subEntriesTab}}}");
            outputStream.Write("\n{0}}}", tab);
        }
Beispiel #3
0
        public void writeJson(StreamWriter outputStream, string tab, bool isFirst)
        {
            string entryStarter  = isFirst ? "" : ",";
            string entriesTab    = $"{tab}\t";
            string subEntriesTab = $"{tab}\t\t";

            cWeenie wcidWeenie = Program.cache9Converter.getWeenie(type);
            string  wcidName   = "";

            if (wcidWeenie != null)
            {
                wcidName = wcidWeenie.weenieName;
            }
            wcidName = Utils.removeWcidNameRedundancy(WeenieClassNames.getWeenieClassName(type), wcidName);

            outputStream.Write("{0}\n{1}{{", entryStarter, entriesTab);
            Utils.writeJson(outputStream, "type", type, subEntriesTab, true, true, 16);
            if ((int)whereCreate < 0x40)
            {
                Utils.writeJson(outputStream, "_comment", wcidName, "    ", false, false, 0);
            }
            else
            {
                Utils.writeJson(outputStream, "_comment", ((eTreasureGeneratorType)type).ToString(), "    ", false, false, 0);
            }
            //Utils.writeJson(outputStream, "_comment", "Unknown treasure table value. Not working in phatAC", "    ", false, false, 0);
            Utils.writeJson(outputStream, "probability", probability, subEntriesTab, false, true, 9);
            Utils.writeJson(outputStream, "delay", delay, subEntriesTab, false, true, 15);
            Utils.writeJson(outputStream, "initCreate", initCreate, subEntriesTab, false, true, 10);
            Utils.writeJson(outputStream, "maxNum", maxNum, subEntriesTab, false, true, 14);
            Utils.writeJson(outputStream, "whenCreate", (int)whenCreate, subEntriesTab, false, true, 10);
            Utils.writeJson(outputStream, "_comment2", whenCreate.ToString(), "    ", false, false, 0);
            Utils.writeJson(outputStream, "whereCreate", (int)whereCreate, subEntriesTab, false, true, 9);
            Utils.writeJson(outputStream, "_comment3", whereCreate.ToString(), "    ", false, false, 0);
            Utils.writeJson(outputStream, "stackSize", stackSize, subEntriesTab, false, true, 11);
            Utils.writeJson(outputStream, "ptid", ptid, subEntriesTab, false, true, 16);
            Utils.writeJson(outputStream, "shade", shade, subEntriesTab, false, true, 15);
            Utils.writeJson(outputStream, "slot", slot, subEntriesTab, false, true, 16);
            Utils.writeJson(outputStream, "objcell_id", objcell_id, subEntriesTab, false, true, 10);
            frame.writeJson(outputStream, subEntriesTab, false);
            outputStream.Write("\n{0}}}", entriesTab);
        }