WIP minetest <-> laby import/export
- currently possible to export a laby into minetest - start of a lua content parser to import .we into lab
This commit is contained in:
32
java/org/artisanlogiciel/lua/LuaTuple.java
Normal file
32
java/org/artisanlogiciel/lua/LuaTuple.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package org.artisanlogiciel.lua;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LuaTuple
|
||||
extends LuaObject
|
||||
{
|
||||
List<LuaObject> items;
|
||||
|
||||
|
||||
public LuaTuple() {
|
||||
this.items = new ArrayList<>(2);
|
||||
}
|
||||
|
||||
public LuaObject addItem(LuaObject item)
|
||||
{
|
||||
items.add(item);
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append('[');
|
||||
buffer.append(items.get(0).toString());
|
||||
buffer.append("]");
|
||||
buffer.append('=');
|
||||
buffer.append(items.get(1).toString());
|
||||
return buffer.toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user