paulofmandown / rotLove

Roguelike Toolkit in Love. A Love2D/lua port of rot.js
http://paulofmandown.github.io/rotLove/
Other
258 stars 25 forks source link

ROT.DijkstraMap issues #43

Closed Rakaneth closed 7 years ago

Rakaneth commented 7 years ago

There is a call to write(s) in ROT.DijkstraMap:writeMapToConsole; this function is not defined anywhere.

airstruck commented 7 years ago

There are also references to that write function in Corridor, Room, and BrogueRoom; they fall back to io.write.

DijkstraMap and Rogue attempt to call it directly and don't fall back to io.write.

This is probably supposed to be the write function from newFuncs.lua; I made it local to that file a while back, thinking it was just global to get a "hoisting" effect and not realizing it was used in other files.

Solution could be defining something like ROT.log and using that instead. Not entirely sure, ideally it would play nice with (future) terminal display. Maybe something like ROT.setLogFile makes ROT.log dump stuff to a file, or use stdout if no file is set.

paulofmandown commented 7 years ago

I like those ideas. For now, though, I'm going to remove write to get rid of the error

Addressed in 3f240b21920a2f230a0936c11116cd64462f7538