@armoury/fivem-framework-common 1.0.68 → 1.0.69
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.
|
@@ -16,13 +16,24 @@ function Interaction(data) {
|
|
|
16
16
|
function Interactions(target, _prototype, providers) {
|
|
17
17
|
const mappings = decorator_utils_1.DecoratorUtils.map(target, _prototype, providers ?? []);
|
|
18
18
|
const isServer = Cfx.Client.IsDuplicityVersion();
|
|
19
|
+
console.log('[interactions] mappings, with length', mappings?.length, 'is', JSON.stringify(mappings));
|
|
19
20
|
if (isServer) {
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
23
|
+
console.log('[interactions] this is not a server');
|
|
22
24
|
for (const mapping of mappings) {
|
|
23
25
|
if (!mapping.key.startsWith('arm_interaction_')) {
|
|
26
|
+
console.log('[interactions]', mapping.key, 'starts with arm_interaction');
|
|
24
27
|
continue;
|
|
25
28
|
}
|
|
29
|
+
console.log('calling armoury sendUIMessage with', JSON.stringify({
|
|
30
|
+
type: 'game:interactable:prompt:register',
|
|
31
|
+
interactableType: mapping.value?.interactableType,
|
|
32
|
+
nonce: mapping.value?.nonce,
|
|
33
|
+
label: `${Cfx.Client.GetCurrentResourceName()}.${mapping.value?.label}`,
|
|
34
|
+
icon: mapping.value?.icon,
|
|
35
|
+
resource: Cfx.Client.GetCurrentResourceName(),
|
|
36
|
+
}));
|
|
26
37
|
Cfx.exports['armoury'].sendUIMessage({
|
|
27
38
|
type: 'game:interactable:prompt:register',
|
|
28
39
|
interactableType: mapping.value?.interactableType,
|
|
@@ -12,13 +12,24 @@ export function Interaction(data) {
|
|
|
12
12
|
export function Interactions(target, _prototype, providers) {
|
|
13
13
|
const mappings = DecoratorUtils.map(target, _prototype, providers ?? []);
|
|
14
14
|
const isServer = Cfx.Client.IsDuplicityVersion();
|
|
15
|
+
console.log('[interactions] mappings, with length', mappings?.length, 'is', JSON.stringify(mappings));
|
|
15
16
|
if (isServer) {
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
19
|
+
console.log('[interactions] this is not a server');
|
|
18
20
|
for (const mapping of mappings) {
|
|
19
21
|
if (!mapping.key.startsWith('arm_interaction_')) {
|
|
22
|
+
console.log('[interactions]', mapping.key, 'starts with arm_interaction');
|
|
20
23
|
continue;
|
|
21
24
|
}
|
|
25
|
+
console.log('calling armoury sendUIMessage with', JSON.stringify({
|
|
26
|
+
type: 'game:interactable:prompt:register',
|
|
27
|
+
interactableType: mapping.value?.interactableType,
|
|
28
|
+
nonce: mapping.value?.nonce,
|
|
29
|
+
label: `${Cfx.Client.GetCurrentResourceName()}.${mapping.value?.label}`,
|
|
30
|
+
icon: mapping.value?.icon,
|
|
31
|
+
resource: Cfx.Client.GetCurrentResourceName(),
|
|
32
|
+
}));
|
|
22
33
|
Cfx.exports['armoury'].sendUIMessage({
|
|
23
34
|
type: 'game:interactable:prompt:register',
|
|
24
35
|
interactableType: mapping.value?.interactableType,
|