Describe a glyph representing a "splat".
| 287 | |
| 288 | |
| 289 | class SplatGlyph(Glyph): |
| 290 | """Describe a glyph representing a "splat".""" |
| 291 | |
| 292 | __mapper_args__ = {"polymorphic_identity": "splat"} |
| 293 | |
| 294 | def glyph_for_state(self, coord, state): |
| 295 | age = state["tick"] - coord.tick |
| 296 | if age > 5: |
| 297 | return self.alt_data |
| 298 | else: |
| 299 | return self.data |
| 300 | |
| 301 | |
| 302 | def init_glyph(session): |