@pma-network/redm-server 0.0.12 → 0.0.13
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/PMA.js +5 -1
- package/decors/PMANetEvent.js +1 -1
- package/package.json +1 -1
package/PMA.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { GetResourceWrapper } from "@nativewrappers/common";
|
|
3
4
|
import { PMAPlayerWrapper } from "./class/PMAPlayer";
|
|
4
5
|
class PMA {
|
|
5
6
|
static {
|
|
@@ -20,7 +21,10 @@ class PMA {
|
|
|
20
21
|
const ply = PMAPlayerWrapper.from_raw(abstract_ply);
|
|
21
22
|
fn(ply, inventory, item);
|
|
22
23
|
}, "usable_item_wrapper");
|
|
23
|
-
|
|
24
|
+
const resource_wrapper = GetResourceWrapper();
|
|
25
|
+
resource_wrapper.add_to_resource_start("pma", () => {
|
|
26
|
+
exports["pma"].register_usable_item(item_name, usable_item_wrapper);
|
|
27
|
+
});
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
30
|
* Gets the player from the specified source
|
package/decors/PMANetEvent.js
CHANGED
|
@@ -33,7 +33,7 @@ function OnPMANetEvent(eventName) {
|
|
|
33
33
|
console.error(`Call to ${eventName} errored`);
|
|
34
34
|
console.error(`Caller: ${ply.Source}`);
|
|
35
35
|
console.error(`Data: ${JSON.stringify(args)}`);
|
|
36
|
-
|
|
36
|
+
globalThis.printError("net event", e);
|
|
37
37
|
console.error("------- END NET EVENT ERROR --------");
|
|
38
38
|
}
|
|
39
39
|
});
|