예제 #1
0
 @Override
 int getContentLength(ModExporter out) {
   int len = name.getTotalLength(out) + 3;
   for (ScriptProperty p : properties) {
     len += p.getTotalLength(out);
   }
   return len;
 }
예제 #2
0
 @Override
 void export(ModExporter out) throws IOException {
   name.export(out);
   out.write(unknown, 1);
   out.write(properties.size(), 2);
   for (ScriptProperty p : properties) {
     p.export(out);
   }
 }
예제 #3
0
 @Override
 final void parseData(LImport in, Mod srcMod) throws BadRecord, DataFormatException, BadParameter {
   name.set(in.extractString(in.extractInt(2)));
   unknown = in.extractInt(1);
   int propertyCount = in.extractInt(2);
   if (logging()) {
     logMod(
         srcMod,
         "VMAD",
         "  Script "
             + name.toString()
             + " with "
             + propertyCount
             + " properties. Unknown: "
             + unknown);
   }
   for (int i = 0; i < propertyCount; i++) {
     properties.add(new ScriptProperty(in, srcMod));
   }
 }
예제 #4
0
 @Override
 public String print() {
   return name.toString();
 }
예제 #5
0
 /**
  * Gets the name of the script
  *
  * @return
  */
 public String getName() {
   return name.print();
 }