ObjectTypeDefs = {
mailbox={
time=40,
yield={{name="Base.Plank"}, {name="Base.Newspaper"}, {name="Base.ScrapMetal"}},
tools={{"Base.AxeStone", "Base.Axe"}},
cheat=false,
displayName="Mailbox"
},
laundry={
time=300,
yield={{name="Radio.ElectricWire"}, {name="Base.ScrapMetal"}},
exp={electrical=3},
tools={"Base.Screwdriver", "Base.KitchenKnife"},
cheat=false,
displayName="Laundry machine"
}
}
print("Initializing object definitions: ");
-- Here, callbacks for definitions are assigned
for i,v in ipairs(ObjectTypeDefs) do
print("Defining checkItems callback for "..i..".");
v.tools.checkItems = "SOMETHING";
end
T2JqZWN0VHlwZURlZnMgPSB7CiAgbWFpbGJveD17CiAgICB0aW1lPTQwLAogICAgeWllbGQ9e3tuYW1lPSJCYXNlLlBsYW5rIn0sIHtuYW1lPSJCYXNlLk5ld3NwYXBlciJ9LCB7bmFtZT0iQmFzZS5TY3JhcE1ldGFsIn19LAogICAgdG9vbHM9e3siQmFzZS5BeGVTdG9uZSIsICJCYXNlLkF4ZSJ9fSwKICAgIGNoZWF0PWZhbHNlLAogICAgZGlzcGxheU5hbWU9Ik1haWxib3giCiAgfSwKICBsYXVuZHJ5PXsKICAgIHRpbWU9MzAwLAogICAgeWllbGQ9e3tuYW1lPSJSYWRpby5FbGVjdHJpY1dpcmUifSwge25hbWU9IkJhc2UuU2NyYXBNZXRhbCJ9fSwKICAgIGV4cD17ZWxlY3RyaWNhbD0zfSwKICAgIHRvb2xzPXsiQmFzZS5TY3Jld2RyaXZlciIsICJCYXNlLktpdGNoZW5LbmlmZSJ9LAogICAgY2hlYXQ9ZmFsc2UsCiAgICBkaXNwbGF5TmFtZT0iTGF1bmRyeSBtYWNoaW5lIgogIH0KfQogIHByaW50KCJJbml0aWFsaXppbmcgb2JqZWN0IGRlZmluaXRpb25zOiAiKTsKICAtLSBIZXJlLCBjYWxsYmFja3MgZm9yIGRlZmluaXRpb25zIGFyZSBhc3NpZ25lZAogIGZvciBpLHYgaW4gaXBhaXJzKE9iamVjdFR5cGVEZWZzKSBkbwogICAgcHJpbnQoIkRlZmluaW5nIGNoZWNrSXRlbXMgY2FsbGJhY2sgZm9yICIuLmkuLiIuIik7CiAgICB2LnRvb2xzLmNoZWNrSXRlbXMgPSAiU09NRVRISU5HIjsKICBlbmQ=