Skip to content

Instantly share code, notes, and snippets.

@handsomematt
Created June 28, 2013 17:14
Show Gist options
  • Save handsomematt/5886353 to your computer and use it in GitHub Desktop.
Save handsomematt/5886353 to your computer and use it in GitHub Desktop.
Example usage of classes.
local Tradable = Class(function(self, inst)
self.inst = inst
self.goldvalue = 0
end)
function Tradable:CollectUseActions(doer, target, actions)
if target.components.trader and target.components.trader.enabled then
table.insert(actions, ACTIONS.GIVE)
end
end
return Tradable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment