dash module
This commit is contained in:
parent
e5a30e29bf
commit
44c2fa88e5
|
@ -18,6 +18,7 @@ install:
|
|||
$(INSTALL) snapshot.lua $(STEADPATH)/snapshot.lua
|
||||
$(INSTALL) object.lua $(STEADPATH)/object.lua
|
||||
$(INSTALL) para.lua $(STEADPATH)/para.lua
|
||||
$(INSTALL) dash.lua $(STEADPATH)/dash.lua
|
||||
|
||||
uninstall:
|
||||
$(RM) $(STEADPATH)/stead.lua
|
||||
|
|
|
@ -15,3 +15,4 @@ install:
|
|||
copy snapshot.lua ..\bin\stead
|
||||
copy object.lua ..\bin\stead
|
||||
copy para.lua ..\bin\stead
|
||||
copy dash.lua ..\bin\stead
|
||||
|
|
10
stead/dash.lua
Normal file
10
stead/dash.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
stead.fmt = stead.hook(stead.fmt, function(f, ...)
|
||||
local r = f(unpack(arg))
|
||||
if game.codepage ~= 'UTF-8' then
|
||||
error("You can not use dash module with non UTF-8 encoding.");
|
||||
end
|
||||
if type(r) == 'string' then
|
||||
r = r:gsub('%-%-', '—');
|
||||
end
|
||||
return r;
|
||||
end)
|
|
@ -1624,6 +1624,7 @@ end
|
|||
|
||||
|
||||
game = game {
|
||||
codepage = "UTF-8",
|
||||
nam = "INSTEAD -- Simple Text Adventure interpreter v"..stead.version.." '2009-2010 by Peter Kosyh",
|
||||
dsc = [[
|
||||
Commands:^
|
||||
|
|
Loading…
Reference in a new issue