@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/src/natives.ts CHANGED
@@ -2,12 +2,12 @@
2
2
  * Config Core for Pawn plugins: the 28 cfg_* natives of the original
3
3
  * universal_config.amxx, as include/universal_config.inc declares them.
4
4
  */
5
- import { Player, plugin, print, server } from "@amxts/core";
5
+ import { Player, plugin, server } from "@amxts/core";
6
6
  import { console_print } from "@amxts/core/natives";
7
7
  import { setBaseDir } from "./index";
8
8
  import * as ini from "./ini";
9
9
 
10
- plugin({ name: "Config Core", version: "0.1.1", author: "kukson777", description: "INI configs for plugins: the cfg_* natives", include: "universal_config.inc" });
10
+ plugin({ name: "Config Core", version: "0.2.0", author: "kukson777", description: "INI configs for plugins: the cfg_* natives", include: "universal_config.inc" });
11
11
 
12
12
  /** A loaded config file. */
13
13
  export enum ConfigFile {
@@ -33,16 +33,16 @@ export enum ContentType {
33
33
  }
34
34
 
35
35
  server.addEventListener("init", () => {
36
- console.log("[ConfigCore] Plugin initialized (v0.1.1)");
36
+ console.log("[ConfigCore] Plugin initialized (v0.2.0)");
37
37
  });
38
38
 
39
39
  server.addCommand("dump_config", ({ player }) => dumpConfig(player), { access: "cvar", description: "Dumps all configurations" });
40
40
 
41
41
  /** Every loaded section and its entries: headings to the admin's console, entries to the server's, as the original does. */
42
42
  function dumpConfig(player: Player) {
43
- print(player, "Current Configuration Dump:", "console");
43
+ player.print("Current Configuration Dump:", "console");
44
44
  for (const section of ini.dump()) {
45
- print(player, section.heading, "console");
45
+ player.print(section.heading, "console");
46
46
  for (const line of section.lines) console_print(0, line);
47
47
  }
48
48
  }