MCPcopy Create free account
hub / github.com/Frontrooms/3.0-GC / toMap

Method toMap

src/main/java/emu/grasscutter/scripts/ScriptUtils.java:12–23  ·  view source on GitHub ↗
(LuaTable table)

Source from the content-addressed store, hash-verified

10public class ScriptUtils {
11
12 public static HashMap<Object, Object> toMap(LuaTable table) {
13 HashMap<Object, Object> map = new HashMap<>();
14 LuaValue[] rootKeys = table.keys();
15 for (LuaValue k : rootKeys) {
16 if (table.get(k).istable()) {
17 map.put(k, toMap(table.get(k).checktable()));
18 } else {
19 map.put(k, table.get(k));
20 }
21 }
22 return map;
23 }
24
25 public static void print(LuaTable table) {
26 Grasscutter.getLogger().info(toMap(table).toString());

Callers 12

printMethod · 0.95
serializeMethod · 0.95
onProtoBuildMethod · 0.80
createMethod · 0.80
parseFromMethod · 0.80
upgradeAvatarMethod · 0.80
executeMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
PacketTowerAllDataRspMethod · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected