Aeredor: Difference between revisions

From Against the Storm Official Wiki
(saving my unit testing code for the debug consoles)
m (76561198012490491 moved page Aeredor to Aeredor: Automatically moved page while merging the account "Aeredor" to "Aeredor")
 

Latest revision as of 16:18, 13 December 2023


-- Unit testing



-- Module:Recipe_link frame = mw.getCurrentFrame() frame.args = { building="Cookhouse", iconsize="med" } txt = p.renderLink(frame) mw.log(txt)


-- Module:BuildingData mw.log( "data = " ) mw.logObject( p.getData("Alchemist's Hut") ) mw.log( "---Good states---") mw.log( "Alchemist's Hut ? " .. p.getPagename("Alchemist's Hut") ) mw.log( "Alchemist_Hut_icon.png ? " .. p.getIconFilename("Alchemist's Hut") ) mw.log( "Specializations Alchemy and Brewing ? " ) mw.logObject( p.getSpecialization("Alchemist's Hut") ) mw.log( "Costs 5 Planks & 2 Bricks ? " ) mw.logObject( p.getCosts("Alchemist's Hut") ) mw.log( "2 ? " .. p.getWorkers("Alchemist's Hut") ) mw.log( "Clearance Water ? " .. p.getRainType("Alchemist's Hut") ) mw.log( "Can produce: Crystalized Dew (★★), Cosmetics (★★), Wine (★★). Can use: Clearance Water. Can't be moved. Size: 3x2. ? \n" .. p.getDescription("Alchemist's Hut") ) mw.log( "----------------------\n---Error states---" ) mw.log( "getData(Alchy) should return nil ?" ) mw.logObject( p.getData("Alchy") ) mw.log( "getPagename(Alchy) should be nil ?" ) mw.logObject( p.getPagename("Alchy") ) mw.log( "getIconFilename(Alchy) should be nil ?" ) mw.logObject( p.getIconFilename("Alchy") ) mw.log( "getSpecialization(Alchy) should be nil ?" ) mw.logObject( p.getSpecialization("Alchy") ) mw.log( "getCosts(Alchy) should return nil ?" ) mw.logObject( p.getCosts("Alchy") ) mw.log( "getWorkers(Alchy) should be nil ?" ) mw.logObject( p.getWorkers("Alchy") ) mw.log( "getRainType(Alchy) should return nil ?" ) mw.logObject( p.getRainType("Alchy") ) mw.log( "getDescription(Alchy) should be nil ?" ) mw.logObject( p.getDescription("Alchy") )


-- Module:ResourceData mw.log( "data = " ) mw.logObject( p.getData("Berries") ) mw.log( "---Good states---" ) mw.log( "Berries ? " .. p.getPagename("Berries") ) mw.log( "Icon_Resource_Berries.png ? " .. p.getIconFilename("Berries") ) mw.log( "Food / Raw Food ? " .. string.format("%s / %s",p.getCategories("Berries")) ) mw.log( "true ? " .. tostring( p.isEatable("Berries") ) ) mw.log( "false or nil ? " .. tostring( p.isBurnable("Berries") ) ) mw.log( "false or nil ? " .. tostring( p.isEatable("Coal") ) ) mw.log( "true ? " .. tostring( p.isBurnable("Coal") ) ) mw.log( "60 / 18 ? " .. string.format("%s / %s",p.getBurnTimeAndSacrificeRate("Coal") ) ) mw.log( "nil ? " .. tostring(p.getBurnTimeAndSacrificeRate("Berries")) ) mw.log( "0.24 / 0.40 ? " .. string.format("%s / %s",p.getSellAndBuyValues("Berries")) ) mw.log( "Common food source. Obtained by: Plantation, Hallowed Herb Garden, Herbalists' Camp, Small Herbalists' Camp. ? \n" .. p.getDescription("Berries") ) mw.log( "----------------------\n---Error states---" ) mw.log( "getData(Bears) should return nil ?" ) mw.logObject( p.getData("Bears") ) mw.log( "getPagename(Bears) should return nil ?" ) mw.logObject( p.getPagename("Bears") ) mw.log( "getIconFilename(Bears) should return nil ?" ) mw.logObject( p.getIconFilename("Bears") ) mw.log( "getCategories(Bears) should return nil ?" ) mw.logObject( p.getCategories("Bears") ) mw.log( "isEatable(Bears) should return nil ?" ) mw.logObject( p.isEatable("Bears") ) mw.log( "isBurnable(Bears) should return nil ?" ) mw.logObject( p.isBurnable("Bears") ) mw.log( "getBurnTimeAndSacrificeRate(Bears) should return nil ?" ) mw.logObject( p.getBurnTimeAndSacrificeRate("Bears") ) mw.log( "getSellAndBuyValues(Bears) should return nil ?" ) mw.logObject( p.getSellAndBuyValues("Bears") ) mw.log( "getDescription(Bears) should return nil ?" ) mw.logObject( p.getDescription("Bears") )