5 hours ago · 13 min read2667 words · Tech · hide · 0 comments

Hello, loves! We’re on the hook for extending illumination, and we need some way to remove the Path of Skulls. When Dot has ‘a brilliant torch’, we want to illuminate whole rooms as she enters them. And after we build the Necrotic Path of Skulls, we should find a sensible way to remove it. I think we’ll need an actual idea for that bit. If memory serves — Objection! Assumes facts not in evidence! — we already have the full-room illumination code somewhere. Let’s look. class RoomView: def illuminate(self): dot = self.dungeon.player_cell self.illuminate_around(dot, 4) def illuminate_around(self, center, distance): for cell, sprite in self.cell_sprites.items(): if cell.manhattan_distance(center) < distance: self.dungeon_view.light_up(cell) sprite.visible = True def illuminate_room(self): for cell, sprite in self.cell_sprites.items(): self.dungeon_view.light_up(cell) sprite.visible = True illuminate_room is only called by a test. Good that it’s tested, since it clearly couldn’t possibly…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.