Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metatables for Lua #27

Merged
merged 2 commits into from
Aug 7, 2013
Merged

Metatables for Lua #27

merged 2 commits into from
Aug 7, 2013

Conversation

dalkon
Copy link
Contributor

@dalkon dalkon commented Aug 6, 2013

Added so it's possible to use metatables for objects instead of using
numeric values to get data.
Added "onModalWindow" creatureevent to handle the "ModalWindow"
metatable.
Added a "Position" metatable to it's possible to add or subtract
positions.

dalkon added 2 commits August 6, 2013 23:02
Added so it's possible to use metatables for objects instead of using
numeric values to get data.
Added "onModalWindow" creatureevent to handle the "ModalWindow"
metatable.
Added a "Position" metatable to it's possible to add or subtract
positions.
@comedinha
Copy link
Contributor

Perfect mean 👍
the new modal on craturescripts :O

@BenDol
Copy link

BenDol commented Aug 7, 2013

👍

@marksamman
Copy link
Member

Using index 0 in lua_touserdata and other functions that fetch data from the Lua stack is never acceptable (see: http://www.lua.org/manual/5.1/manual.html#3.2), although both Lua and LuaJIT return the last popped value we shouldn't rely on undefined behavior which is said to be unacceptable. I'm merging this pull request because it builds and hopefully doesn't break anything, but will follow up with Lua stack fix commits.

marksamman added a commit that referenced this pull request Aug 7, 2013
@marksamman marksamman merged commit 476baf4 into otland:master Aug 7, 2013
@AndreFaramir AndreFaramir mentioned this pull request Dec 4, 2014
@Donkey-Robot Donkey-Robot mentioned this pull request Jan 5, 2016
@fironfox fironfox mentioned this pull request Apr 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants