require "entity" require "dialogable" -- A dialogable placed in the world. Signs, npcs and artifacts will each be a -- small Entity subclass that includes Dialogable and names its own book; Sign is -- the first. It just picks art + a story — the talking lives in the mixin. Sign = class("Sign", Entity) Sign:include(Dialogable) function Sign:initialize(x, y) self.book = startSignBook Entity.initialize(self, { x = x, y = y, color = "red", -- representative only; sprites are per-channel collision = "unmoveable", sprites = { red = loadSprite("art/npc/start_sign_r.png"), green = loadSprite("art/npc/start_sign_g.png"), blue = loadSprite("art/npc/start_sign_b.png"), }, }) end