dirk-cfx-react 1.0.52 → 1.0.53
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/dist/index.cjs +22 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/index.cjs +22 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +8 -1
- package/dist/utils/index.d.ts +8 -1
- package/dist/utils/index.js +19 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -306,6 +306,24 @@ var locale = localeStore.getState().locale;
|
|
|
306
306
|
registerInitialFetch("GET_LOCALES", void 0).then((data) => {
|
|
307
307
|
localeStore.setState({ locales: data });
|
|
308
308
|
});
|
|
309
|
+
|
|
310
|
+
// src/utils/map.ts
|
|
311
|
+
var mapCenter = [-119.43, 58.84];
|
|
312
|
+
var latPr100 = 1.421;
|
|
313
|
+
function gameToMap(x, y) {
|
|
314
|
+
return [
|
|
315
|
+
mapCenter[0] + latPr100 / 100 * y,
|
|
316
|
+
// lng
|
|
317
|
+
mapCenter[1] + latPr100 / 100 * x
|
|
318
|
+
// lat
|
|
319
|
+
];
|
|
320
|
+
}
|
|
321
|
+
function mapToGame(lat, lng) {
|
|
322
|
+
return [
|
|
323
|
+
(lng - mapCenter[1]) * 100 / latPr100,
|
|
324
|
+
(lat - mapCenter[0]) * 100 / latPr100
|
|
325
|
+
];
|
|
326
|
+
}
|
|
309
327
|
var useProfanityStore = zustand.create(() => [
|
|
310
328
|
"ars3",
|
|
311
329
|
"a55",
|
|
@@ -2412,13 +2430,17 @@ exports.copyToClipboard = copyToClipboard;
|
|
|
2412
2430
|
exports.createFormStore = createFormStore;
|
|
2413
2431
|
exports.createSkill = createSkill;
|
|
2414
2432
|
exports.fetchNui = fetchNui;
|
|
2433
|
+
exports.gameToMap = gameToMap;
|
|
2415
2434
|
exports.getImageShape = getImageShape;
|
|
2416
2435
|
exports.initialFetches = initialFetches;
|
|
2417
2436
|
exports.internalEvent = internalEvent;
|
|
2418
2437
|
exports.isEnvBrowser = isEnvBrowser;
|
|
2419
2438
|
exports.isProfanity = isProfanity;
|
|
2439
|
+
exports.latPr100 = latPr100;
|
|
2420
2440
|
exports.locale = locale;
|
|
2421
2441
|
exports.localeStore = localeStore;
|
|
2442
|
+
exports.mapCenter = mapCenter;
|
|
2443
|
+
exports.mapToGame = mapToGame;
|
|
2422
2444
|
exports.noop = noop;
|
|
2423
2445
|
exports.numberToRoman = numberToRoman;
|
|
2424
2446
|
exports.openLink = openLink;
|