summaryrefslogtreecommitdiff
path: root/skin_meta_api.lua
diff options
context:
space:
mode:
authorAlexander Weber <web.alexander@web.de>2017-06-19 16:36:53 +0200
committerAlexander Weber <web.alexander@web.de>2017-06-19 16:37:38 +0200
commit897ac2c97bc419c1abdcb30228e0df602cc0046d (patch)
tree0a2b4632462fb25b7db5345dd7fe967251c90764 /skin_meta_api.lua
parent57b815f91ffd9bdd165c741350c6099f6b08685b (diff)
API enhancements, player-attribute according naming convention
Diffstat (limited to 'skin_meta_api.lua')
-rw-r--r--skin_meta_api.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/skin_meta_api.lua b/skin_meta_api.lua
index f01671c..5219e1d 100644
--- a/skin_meta_api.lua
+++ b/skin_meta_api.lua
@@ -26,6 +26,10 @@ end
-- Skin methods
-- In this implementation it is just access to attrubutes wrapped
-- but this way allow to redefine the functionality for more complex skins provider
+function skin_class:get_key()
+ return self._key
+end
+
function skin_class:set_meta(key, value)
self[key] = value
end
@@ -35,10 +39,9 @@ function skin_class:get_meta(key)
end
function skin_class:get_meta_string(key)
- return tostring(self[key] or "")
+ return tostring(self:get_meta(key) or "")
end
-
function skin_class:set_texture(value)
self._texture = value
end