rock-mod 0.23.0 → 0.23.1

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.
@@ -55,23 +55,13 @@ export class CCMPGraphicsManager {
55
55
  const a = (_k = (_j = options === null || options === void 0 ? void 0 : options.color) === null || _j === void 0 ? void 0 : _j.a) !== null && _k !== void 0 ? _k : 255;
56
56
  const outline = (_l = options === null || options === void 0 ? void 0 : options.outline) !== null && _l !== void 0 ? _l : true;
57
57
  const centre = (_m = options === null || options === void 0 ? void 0 : options.centre) !== null && _m !== void 0 ? _m : false;
58
- const hud = ccmp.natives.hud;
59
- hud.setTextFont(font);
60
- // Натив `SET_TEXT_SCALE(scale, size)` — первый параметр обычно игнорируется,
61
- // эффективный размер задаётся вторым. RageMP передаёт оба из массива
62
- // `[scaleX, scaleY]` — повторяем тот же контракт.
63
- hud.setTextScale(scaleX, scaleY);
64
- hud.setTextColour(r, g, b, a);
65
- if (outline) {
66
- hud.setTextOutline();
67
- }
68
- if (centre) {
69
- hud.setTextCentre(true);
70
- }
71
- hud.beginTextCommandDisplayText("STRING");
72
- hud.addTextComponentSubstringPlayerName(text);
73
- // p2 — `unk_const_0` (введён в b2699); 0 — стандартное значение.
74
- hud.endTextCommandDisplayText(position.x, position.y, 0);
58
+ ccmp.graphics.drawText(text, position.x, position.y, {
59
+ font,
60
+ scale: [scaleX, scaleY],
61
+ color: [r, g, b, a],
62
+ outline,
63
+ centre,
64
+ });
75
65
  }
76
66
  world3dToScreen2d(position) {
77
67
  const result = ccmp.natives.graphics.getScreenCoordFromWorldCoord(position.x, position.y, position.z);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rock-mod",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -87,7 +87,7 @@
87
87
  "@swc/helpers": "^0.5.15"
88
88
  },
89
89
  "devDependencies": {
90
- "@classic-mp/types": "^1.7.0",
90
+ "@classic-mp/types": "^1.7.1",
91
91
  "@rollup/plugin-commonjs": "^25.0.7",
92
92
  "@rollup/plugin-node-resolve": "^15.2.3",
93
93
  "@rollup/plugin-terser": "^0.4.4",