@amxts/config-core 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/PAWN.md CHANGED
@@ -1,13 +1,13 @@
1
- # Config Core for Pawn plugins
2
-
3
- [English](PAWN.md) | [Русский](PAWN.ru.md)
4
-
5
- Config Core gives Pawn plugins the 28 natives of `universal_config.inc` — `cfg_load_file`, `cfg_get_value`, `cfg_set_int` and the rest — with their signatures, so compiled `.amxx` plugins (Menu Core's Pawn users among them) work against it unchanged.
6
-
7
- Pawn plugins write `#include <universal_config>`; the package ships `include/universal_config.inc`. Only one plugin on a server can give these natives: if another Pawn plugin in `plugins.ini` registers `cfg_*` natives too, comment it out.
8
-
9
- ## How the natives behave
10
-
11
- - No length limits: a key or a value is as long as it is written, a section keeps every entry, blocks nest as deep as they are written, any number of files loads.
12
- - A number reads the way `parseFloat` reads it (`1e5` is 100000) and is written as the number it is (`2.5`, not `2.500000`).
13
- - `CFG_CONTENT_SIMPLE` and `CFG_CONTENT_STRINGS` are one content: a block of either holds a line of values, and `cfg_set_value` writes into it.
1
+ # Config Core for Pawn plugins
2
+
3
+ [English](PAWN.md) | [Русский](PAWN.ru.md)
4
+
5
+ Config Core gives Pawn plugins the 28 natives of `universal_config.inc` — `cfg_load_file`, `cfg_get_value`, `cfg_set_int` and the rest — with their signatures, so compiled `.amxx` plugins (Menu Core's Pawn users among them) work against it unchanged.
6
+
7
+ Pawn plugins write `#include <universal_config>`; the package ships `include/universal_config.inc`. Only one plugin on a server can give these natives: if another Pawn plugin in `plugins.ini` registers `cfg_*` natives too, comment it out.
8
+
9
+ ## How the natives behave
10
+
11
+ - No length limits: a key or a value is as long as it is written, a section keeps every entry, blocks nest as deep as they are written, any number of files loads.
12
+ - A number reads the way `parseFloat` reads it (`1e5` is 100000) and is written as the number it is (`2.5`, not `2.500000`).
13
+ - `CFG_CONTENT_SIMPLE` and `CFG_CONTENT_STRINGS` are one content: a block of either holds a line of values, and `cfg_set_value` writes into it.
package/PAWN.ru.md CHANGED
@@ -1,13 +1,13 @@
1
- # Config Core для Pawn-плагинов
2
-
3
- [English](PAWN.md) | [Русский](PAWN.ru.md)
4
-
5
- Config Core отдаёт Pawn-плагинам 28 нативов из `universal_config.inc` — `cfg_load_file`, `cfg_get_value`, `cfg_set_int` и остальные — с их сигнатурами, так что собранные `.amxx`-плагины (в том числе Pawn-плагины, работающие с Menu Core) работают без изменений.
6
-
7
- Pawn-плагины пишут `#include <universal_config>`; в пакете лежит `include/universal_config.inc`. Отдавать эти нативы на сервере может только один плагин: если в `plugins.ini` есть другой Pawn-плагин с нативами `cfg_*`, закомментируйте его.
8
-
9
- ## Как работают нативы
10
-
11
- - Нет ограничений длины: ключ и значение любой длины, секция хранит все записи, блоки вложены на любую глубину, загружается сколько угодно файлов.
12
- - Число читается так, как его читает `parseFloat` (`1e5` — это 100000), и записывается как есть (`2.5`, а не `2.500000`).
13
- - `CFG_CONTENT_SIMPLE` и `CFG_CONTENT_STRINGS` — одно и то же содержимое: блок любого из них хранит строку значений, и `cfg_set_value` пишет в него.
1
+ # Config Core для Pawn-плагинов
2
+
3
+ [English](PAWN.md) | [Русский](PAWN.ru.md)
4
+
5
+ Config Core отдаёт Pawn-плагинам 28 нативов из `universal_config.inc` — `cfg_load_file`, `cfg_get_value`, `cfg_set_int` и остальные — с их сигнатурами, так что собранные `.amxx`-плагины (в том числе Pawn-плагины, работающие с Menu Core) работают без изменений.
6
+
7
+ Pawn-плагины пишут `#include <universal_config>`; в пакете лежит `include/universal_config.inc`. Отдавать эти нативы на сервере может только один плагин: если в `plugins.ini` есть другой Pawn-плагин с нативами `cfg_*`, закомментируйте его.
8
+
9
+ ## Как работают нативы
10
+
11
+ - Нет ограничений длины: ключ и значение любой длины, секция хранит все записи, блоки вложены на любую глубину, загружается сколько угодно файлов.
12
+ - Число читается так, как его читает `parseFloat` (`1e5` — это 100000), и записывается как есть (`2.5`, а не `2.500000`).
13
+ - `CFG_CONTENT_SIMPLE` и `CFG_CONTENT_STRINGS` — одно и то же содержимое: блок любого из них хранит строку значений, и `cfg_set_value` пишет в него.