objects/obj_banner.lua

changeset 0
cc66ad6b0d75
equal deleted inserted replaced
-1:000000000000 0:cc66ad6b0d75
1
2 classes.obj_banner = {
3 _properties = { name = "banner", longname = "a banner with writing", desc = "You see a brightly coloured banner hung across the wall, with writing on it. Maybe you should READ it?" }
4 }
5
6
7 function classes.obj_banner:_create(e)
8 local obj = classes.default._create(self, e);
9 obj._properties.text = e.ext.text;
10 return obj;
11 end
12
13 function classes.obj_banner:read(e)
14 if not self._properties.text then e.person:_tell("It's blank after all!"); return; end
15 e.person:_action("reads the writing on the banner");
16 e.person:_tell("The banner says '"..self._properties.text.."'");
17 end

mercurial