Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- © 2011 CloudSixteen.com do not share, re-distribute or modify
- without permission of its author (kurozael@gmail.com).
- --]]
- --[[
- @codebase Server
- @details Provides an interface to the hints system.
- @field stored A table containting a list of stored hints.
- --]]
- Clockwork.hint = Clockwork:NewLibrary("Hint");
- Clockwork.hint.stored = {};
- --[[
- @codebase Server
- @details Add a new hint to the list.
- @param String A unique identifier.
- @param String The body of the hint.
- @param Function A callback with the player as an argument, return false to hide.
- --]]
- function Clockwork.hint:Add(name, text, Callback)
- self.stored[name] = {
- Callback = Callback,
- text = text
- };
- end;
- --[[
- @codebase Server
- @details Remove an existing hint from the list.
- @param String A unique identifier.
- --]]
- function Clockwork.hint:Remove(name)
- self.stored[name] = nil;
- end;
- --[[
- @codebase Server
- @details Find a hint by its identifier.
- @param String A unique identifier.
- @returns Table The hint table matching the identifier.
- --]]
- function Clockwork.hint:Find(name)
- return self.stored[name];
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement