@adatechnology/game-weapons 0.12.2 → 0.13.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.
- package/README.md +7 -0
- package/dist/index.d.ts +27 -1
- package/dist/index.global.js +30 -4
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +30 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2728,7 +2728,8 @@ var archetypes_default = [
|
|
|
2728
2728
|
},
|
|
2729
2729
|
mass: 5.5,
|
|
2730
2730
|
tags: [
|
|
2731
|
-
"heavy"
|
|
2731
|
+
"heavy",
|
|
2732
|
+
"two_handed"
|
|
2732
2733
|
]
|
|
2733
2734
|
},
|
|
2734
2735
|
{
|
|
@@ -2812,7 +2813,10 @@ var archetypes_default = [
|
|
|
2812
2813
|
rpm: 45,
|
|
2813
2814
|
noise: 8
|
|
2814
2815
|
},
|
|
2815
|
-
mass: 1.6
|
|
2816
|
+
mass: 1.6,
|
|
2817
|
+
tags: [
|
|
2818
|
+
"two_handed"
|
|
2819
|
+
]
|
|
2816
2820
|
},
|
|
2817
2821
|
{
|
|
2818
2822
|
id: "knife",
|
|
@@ -14012,7 +14016,8 @@ var melee_weapons_default = [
|
|
|
14012
14016
|
},
|
|
14013
14017
|
mass: 2.8,
|
|
14014
14018
|
tags: [
|
|
14015
|
-
"heavy"
|
|
14019
|
+
"heavy",
|
|
14020
|
+
"two_handed"
|
|
14016
14021
|
]
|
|
14017
14022
|
},
|
|
14018
14023
|
{
|
|
@@ -14090,7 +14095,8 @@ var melee_weapons_default = [
|
|
|
14090
14095
|
},
|
|
14091
14096
|
mass: 6,
|
|
14092
14097
|
tags: [
|
|
14093
|
-
"heavy"
|
|
14098
|
+
"heavy",
|
|
14099
|
+
"two_handed"
|
|
14094
14100
|
]
|
|
14095
14101
|
},
|
|
14096
14102
|
{
|
|
@@ -14663,6 +14669,14 @@ var DEFAULT_RULES = {
|
|
|
14663
14669
|
// tucking a pistol in the belt and drawing it back is a short motion of one hand
|
|
14664
14670
|
stowSeconds: 0.45
|
|
14665
14671
|
},
|
|
14672
|
+
// as mãos de cada arma e onde ela vai quando as mãos são pedidas (decisão do dono, 2026-11-24): arma longa pede as duas mãos; a de cinto vai no coldre, a longa na bandoleira ou nas costas
|
|
14673
|
+
hands: {
|
|
14674
|
+
twoHanded: { categories: ["smg", "rifle", "carbine", "sniper", "dmr", "hunting", "machine_gun", "launcher", "shotgun", "bow", "crossbow", "extinguisher"], weapons: ["flamethrower"] },
|
|
14675
|
+
slots: { pistol: "hip", revolver: "hip", melee_blade: "hip", melee_blunt: "hip", tool: "hip", throwable: "hip", heat: "hip", smg: "back", rifle: "back", carbine: "back", sniper: "back", dmr: "back", hunting: "back", shotgun: "back", bow: "back", crossbow: "back", machine_gun: "back", launcher: "back" },
|
|
14676
|
+
// the long-handled tools and the long blade hang across the back; a chainsaw has no place on the body
|
|
14677
|
+
weaponSlots: { lighter: "hip", flamethrower: "back", axe: "back", sledgehammer: "back", pickaxe: "back", shovel: "back", katana: "back", chainsaw: null },
|
|
14678
|
+
bare: ["kick", "shove", "fists"]
|
|
14679
|
+
},
|
|
14666
14680
|
// Arsenal §08/§11: coronha retrátil saca mais rápido, mais recuo; os números são padrões aprovados pelo dono (2026-10-24)
|
|
14667
14681
|
stock: {
|
|
14668
14682
|
seconds: 0.6,
|
|
@@ -16506,6 +16520,17 @@ var isDualWieldable = (rule, weaponId, category) => {
|
|
|
16506
16520
|
return rule.weapons.includes(weaponId) || rule.categories.includes(category);
|
|
16507
16521
|
};
|
|
16508
16522
|
|
|
16523
|
+
// src/weapon-hands.ts
|
|
16524
|
+
var BARE = { hands: 0, slot: null };
|
|
16525
|
+
function weaponHandsOf(arsenal, weaponId) {
|
|
16526
|
+
const def = arsenal.weapons.get(weaponId);
|
|
16527
|
+
const rule = arsenal.rules.hands;
|
|
16528
|
+
if (!def || def.category === "hand" || rule.bare.includes(weaponId)) return BARE;
|
|
16529
|
+
const isTwoHanded = (rule.twoHanded.categories.includes(def.category) || rule.twoHanded.weapons.includes(weaponId) || (def.tags ?? []).includes("two_handed")) && !canDualWield(arsenal, weaponId);
|
|
16530
|
+
const slot = weaponId in rule.weaponSlots ? rule.weaponSlots[weaponId] : rule.slots[def.category];
|
|
16531
|
+
return { hands: isTwoHanded ? 2 : 1, slot: slot ?? null };
|
|
16532
|
+
}
|
|
16533
|
+
|
|
16509
16534
|
// src/generics.ts
|
|
16510
16535
|
var isGenericKind = (kind, category) => kind === "firearm" && category !== "bow" && category !== "crossbow" || kind === "flame";
|
|
16511
16536
|
function genericWeapons(arsenal) {
|
|
@@ -16612,6 +16637,7 @@ export {
|
|
|
16612
16637
|
sampleFuse,
|
|
16613
16638
|
sweepGround,
|
|
16614
16639
|
tripwireSegment,
|
|
16640
|
+
weaponHandsOf,
|
|
16615
16641
|
weaponMenu
|
|
16616
16642
|
};
|
|
16617
16643
|
//# sourceMappingURL=index.js.map
|