summaryrefslogtreecommitdiff
path: root/src/map/script.h
AgeCommit message (Collapse)AuthorFilesLines
2016-07-10HULD: Improved .po file parser to properly read concatenated stringsHaru1-0/+1
- For compliance with gettext's .po file specifications Signed-off-by: Haru <haru@dotalux.com>
2016-07-04Add one check for possible script issue.Andrei Karas1-1/+1
2016-06-25Added mesf() command (combination of mes() and sprintf())Haru1-0/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Added _$() macro to the script engine to mark a translatable string as ↵Haru1-0/+2
format string - Strings passed to sprintf should use the _$() macro instead of _(), to generate the .pot translation template with a directive to correctly handle the % sign. - Strings passed through _() are instead explicitly marked as regular (non format) strings if they contain '%'. Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Moved translations template generator to a pluginHaru1-7/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Split translation handling out of parse_simpleexpr_string()Haru1-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Split parse_simpleexpr() in specialized sub-functions (HPM compatibility)Haru1-4/+8
- parse_simpleexpr_paren() - parse_simpleexpr_number() - parse_simplexpr_string() - parse_simpleexpr_name() Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Correctly escaped special characters in the generated_translations.potHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Changed script->translation_buf to a VECTORHaru1-3/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Replaced script_code::script_buf with a VECTORHaru1-11/+14
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Replaced script->buf with a VECTORHaru1-4/+9
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Replaced struct script_string_buf definition with a VECTORHaru1-4/+4
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBMapHaru1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed unnecessary typedefs from sql.hHaru1-2/+2
- Sql -> struct Sql - SqlStmt -> struct SqlStmt - SqlDataType -> enum SqlDataType This is expected to improve compile time, by removing #include cycles (and forward declaring instead) Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added const qualifier to the value argument of script->setd_subHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added separate char* and const char* data types to struct script_dataHaru1-11/+16
Used, respectively, by C_STR and C_CONSTSTR Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Changed script->get_val to return a const pointerHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-03-11Hardcore Parameters from constant database to avoid synchronize issues with ↵hemagx1-0/+1
source now defining new parameters in the constants.conf database is deprecated and should be defined in source instead
2016-01-29Merge pull request #1108 from 4144/pcreconfigureHaru1-2/+0
Enable pcre by default in configure and show error if pcre missing.
2016-01-25Added source support for special comments in the constdbHaru1-0/+1
- To be used by the constdb2doc plugin Signed-off-by: Haru <haru@dotalux.com>
2016-01-21Remove unused PCRE_SUPPORT define.Andrei Karas1-2/+0
2016-01-13Added support to mark constants in db/constants.conf as deprecatedHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PC to struct map_session_data as per style guidelineshemagx1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2015-12-25Implemented NoViewIDDastgir1-1/+2
(http://herc.ws/board/topic/10020-official-mapflag-to-disable-viewid/) Closes #926 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-20Add script->id2sd function to throw error properly if player not foundAnnieRuru1-0/+3
- included script->charid2sd and script->nick2sd
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_scriptHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Changed struct script_queue_iterator::item into a VECTOR and Renamed to ↵Haru1-3/+3
::entries Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Changed struct script_queue::item into a VECTOR and Renamed to ::entriesHaru1-5/+4
Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Renamed hQueue/hQueueIterator/hQueueOpt to latest standardsHaru1-23/+30
Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Changed script->hq and script->hqi into VECTOR typeHaru1-3/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-10-01Split function set_reg and get_val into functions based on variable types.Andrei Karas1-0/+16
2015-08-15HPM compatibility improvementsHaru1-3/+3
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-08-10Add script interface function run_pet. It do same thing as run.Andrei Karas1-0/+1
2015-08-10Add script interface function run_npc. It do same thing as run.Andrei Karas1-1/+2
2015-08-10Move unequip item script function call into function ↵Andrei Karas1-0/+1
script_run_item_unequip_script.
2015-08-10Move equip item script function call into function script_run_item_equip_script.Andrei Karas1-0/+2
2015-08-10Move use item script function call into function script_run_use_script.Andrei Karas1-0/+1
2015-06-19Removed ".." from include directivesHaru1-7/+7
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-03-15Follow up 330e31cc71ece055908acb1eb967b4009ebc9c46shennetsind1-0/+1
Fixed an issue caused by unescaped characters being written and read out of the .pot unproperly. This commit also causes map server to print the file it wrote to when terminating Signed-off-by: shennetsind <ind@henn.et>
2015-02-23Hercules Ultimate Localization Designshennetsind1-0/+52
Servers can now run on any number of languages, without editing npc files. Designed by Haruna and Ind http://hercules.ws/board/topic/8687-hercules-ultimate-localization-design/ Signed-off-by: shennetsind <ind@henn.et>
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru1-0/+2
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
2014-12-16Add function what call OnUntouch event.Andrei Karas1-0/+1
2014-11-16Whitespace cleanup (no code changes)Haru1-9/+9
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-11-14Add ability to add deprecated command from scripts and plugins.Andrei Karas1-1/+1
2014-10-28Removed some temporary case-check error messages.Haru1-2/+1
- Control flow statements (break, case, continue, default, do, for, if, switch, whilei, else) and sub-function declarations (function) will no longer show a custom error message when they are incorrectly capitalized. - Note: This does not mean that they are no longer case-sensitive. This only means that no special message will be shown in case such an error is detected. The script engine will throw a normal error, as it would with any other kind of typo, rather than treating this as a special case. Enough time was given to update third party scripts, and it is now time to clean up our parsing code and get rid of these special warnings. - Variables, labels and commands will still show a warning for the time being, since the side-effects of silently ignoring it could be quite dangerous. An alternative approach to the case-check will be presented in future. For now, those who want to disable it (and save a bit on execution time and memory use), can simply comment out the #define ENABLE_CASE_CHECK line in script.h, as usual. Signed-off-by: Haru <haru@dotalux.com>
2014-10-28Removed some temporary case-check error messages.Haru1-1/+0
- Top level commands (function, warp, shop, cashshop, script, trader, duplicate, monster, boss_monster, mapflag) will no longer show a custom error message when they are incorrectly capitalized. - Note: This does not mean that the commands are no longer case-sensitive. This only means that no special message will be shown in case such an error is detected. The script engine will throw a normal error, as it would with any other kind of typo, rather than treating this as a special case. Enough time was given to update third party scripts, and it is now time to clean up our parsing code and get rid of these special warnings. Signed-off-by: Haru <haru@dotalux.com>
2014-10-27Added source support to mark script commands as deprecatedHaru1-0/+4
- Commands marked as deprecated will trigger a warning when the script is loaded. (there are currently no commands marked as such, but some will come soon) Signed-off-by: Haru <haru@dotalux.com>
2014-10-18Renamed DeprecationWarning to DeprecationCaseWarning, since that's what it ↵Haru1-3/+3
is about. Signed-off-by: Haru <haru@dotalux.com>