fork download
  1. ObjectTypeDefs = {
  2. mailbox={
  3. time=40,
  4. yield={{name="Base.Plank"}, {name="Base.Newspaper"}, {name="Base.ScrapMetal"}},
  5. tools={{"Base.AxeStone", "Base.Axe"}},
  6. cheat=false,
  7. displayName="Mailbox"
  8. },
  9. laundry={
  10. time=300,
  11. yield={{name="Radio.ElectricWire"}, {name="Base.ScrapMetal"}},
  12. exp={electrical=3},
  13. tools={"Base.Screwdriver", "Base.KitchenKnife"},
  14. cheat=false,
  15. displayName="Laundry machine"
  16. }
  17. }
  18. print("Initializing object definitions: ");
  19. -- Here, callbacks for definitions are assigned
  20. for i,v in ipairs(ObjectTypeDefs) do
  21. print("Defining checkItems callback for "..i..".");
  22. v.tools.checkItems = "SOMETHING";
  23. end
Success #stdin #stdout 0s 2788KB
stdin
Standard input is empty
stdout
Initializing object definitions: