Age | Commit message (Collapse) | Author | Files | Lines |
|
mana.map_get_pvp() now returns one of the constants in libmana-constants.lua
Reviewed-by: Bertram.
|
|
We have to be careful with introducing globals now that there is only a
single Lua state, so we shouldn't use globals unnecessarily. Any variable
should be declared 'local' unless there is a reason to make it global.
For additional safety we can also think about disallowing the use of globals
entirely. This also helps to catch typos in scripts.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: bjorn.
|
|
This includes the quest reply, post reply, death notification and
remove notification.
Also, Script::Ref was changed from a typedef to a small class,
automating initialization and making the check for validness clearer.
Reviewed-by: Erik Schilling
|
|
No more Lua state for each status effect, monster, item effect or map. All
scripts are loaded into the same state. This should be more efficient overall
and make it easier to implement dynamic reloading of the scripts in the
future.
Now, this introduces the problem of name collisions between different Lua
scripts. For now this is solved by using more specific function names, like
'tick_plague' and 'tick_jump' rather than just 'tick'. The plan is however
to get rid of these globals, and register these callbacks from the script,
so that they can be local functions without the danger of colliding with
other scripts.
Reviewed-by: Erik Schilling
Reviewed-by: Yohann Ferreira
|
|
Reviewed-by: o11c, bjorn, Bertram.
|
|
Reviewed-by: Bertram.
|
|
Reviewed-by: o11c.
|
|
You can now call mana.log(loglevel, message) to log messages with scripts.
For loglevel you can use the new constants defined in
libmana-constants.lua
Resolves: Mana-Mantis #359
|
|
|
|
Reviewed-by: Thorbjorn.
|
|
An misleading error was raised when the function dealt
with its last remaining job as it didn't return after removing it.
Reviewed-by: Ablu.
|
|
Reviewed-by: Ablu, Freeyorp.
|
|
Reviewed-by: Freeyorp.
|
|
Trivial.
|
|
The function is named mana.chr_get_gender. It returns 0 for male
and 1 for female. libmana-constants.lua defines the variables
GENDER_MALE and GENDER_FEMALE with these values. Also made the
banker NPC refer to the gender of the player character.
Reviewed-by: Jaxad0127
|
|
The dummy data is currently mostly empty data though, so still nothing
to see as far as the example content is concerned.
Reviewed-by: Bertram
|
|
|
|
|
|
|