Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ############
- SCRIPT
- ############
- minetest.register_craft({
- output = 'funnystone:funnystone',
- recipe = {
- {'group:wood', '', ''},
- {'', '', ''},
- {'', '', ''},
- }
- })
- minetest.register_craft({
- output = 'funnystone:funnystone',
- recipe = {
- {'group:cobble', 'funnystone:funnyblock', ''},
- {'', '', ''},
- {'', '', ''},
- }
- })
- --uh, I think we dont want the wood craft anymore...
- minetest.register_craft({
- output = 'funnystone:funnystone 0',
- recipe = {
- {'group:wood', '', ''},
- {'', '', ''},
- {'', '', ''},
- }
- })
- print(dump(minetest.get_craft_recipe('funnystone:funnystone')))
- print(dump(minetest.get_craft_recipe('funnystone:funnystuff'))) -- non-existing stone
- ############
- OUTPUT: OLD
- ############
- {
- type = "normal",
- width = 3,
- items = {
- "group:wood"
- }
- }
- {
- width = 0
- }
- ############
- OUTPUT: NEW
- ############
- {
- type = "normal",
- width = 3,
- output = "funnystone:funnystone",
- items = {
- "group:cobble",
- "funnystone:funnyblock"
- }
- }
- 09:04:45: ERROR[main]: ========== ERROR FROM LUA ===========
- 09:04:45: ERROR[main]: Failed to load and run script from
- 09:04:45: ERROR[main]: bin/../games/minimal/mods/test/init.lua:
- 09:04:45: ERROR[main]: caught (...)
- 09:04:45: ERROR[main]: stack traceback:
- 09:04:45: ERROR[main]: [C]: in function 'get_craft_recipe'
- 09:04:45: ERROR[main]: bin/../games/minimal/mods/test/init.lua:32: in main chunk
- 09:04:45: ERROR[main]: ======= END OF ERROR FROM LUA ========
- 09:04:45: ERROR[main]: Server: Failed to load and run bin/../games/minimal/mods/test/init.lua
- 09:04:45: ERROR[main]: ModError: ModError: Failed to load and run bin/../games/minimal/mods/test/init.lu
- #########
- RESULTS
- #########
- First output: OLD worse than NEW. OLD fails to recognize that the wood craft has been disabled.
- Second output: NEW worse than OLD. NEW crashes instead of outputting.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement