@adatechnology/game-weapons 0.12.1 → 0.13.0
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 +35 -2
- package/dist/index.global.js +123 -7
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +82 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2728,7 +2728,28 @@ var archetypes_default = [
|
|
|
2728
2728
|
},
|
|
2729
2729
|
mass: 5.5,
|
|
2730
2730
|
tags: [
|
|
2731
|
-
"heavy"
|
|
2731
|
+
"heavy",
|
|
2732
|
+
"two_handed"
|
|
2733
|
+
]
|
|
2734
|
+
},
|
|
2735
|
+
{
|
|
2736
|
+
id: "shovel",
|
|
2737
|
+
name: "Shovel",
|
|
2738
|
+
category: "melee_blunt",
|
|
2739
|
+
action: {
|
|
2740
|
+
kind: "melee",
|
|
2741
|
+
damage: "blunt",
|
|
2742
|
+
energy: 160,
|
|
2743
|
+
radius: 0.12,
|
|
2744
|
+
reach: 1.25,
|
|
2745
|
+
rpm: 35,
|
|
2746
|
+
noise: 5
|
|
2747
|
+
},
|
|
2748
|
+
mass: 2,
|
|
2749
|
+
tags: [
|
|
2750
|
+
"heavy",
|
|
2751
|
+
"two_handed",
|
|
2752
|
+
"digs"
|
|
2732
2753
|
]
|
|
2733
2754
|
},
|
|
2734
2755
|
{
|
|
@@ -2792,7 +2813,10 @@ var archetypes_default = [
|
|
|
2792
2813
|
rpm: 45,
|
|
2793
2814
|
noise: 8
|
|
2794
2815
|
},
|
|
2795
|
-
mass: 1.6
|
|
2816
|
+
mass: 1.6,
|
|
2817
|
+
tags: [
|
|
2818
|
+
"two_handed"
|
|
2819
|
+
]
|
|
2796
2820
|
},
|
|
2797
2821
|
{
|
|
2798
2822
|
id: "knife",
|
|
@@ -3803,6 +3827,13 @@ var explosives_default = [
|
|
|
3803
3827
|
injuryRadius: 15,
|
|
3804
3828
|
energy: 2e5,
|
|
3805
3829
|
tnt: 0.24,
|
|
3830
|
+
casing: {
|
|
3831
|
+
mass: 0.19,
|
|
3832
|
+
material: "steel",
|
|
3833
|
+
fragments: 1e3,
|
|
3834
|
+
chargeMass: 0.18,
|
|
3835
|
+
gurneyVelocity: 2700
|
|
3836
|
+
},
|
|
3806
3837
|
destructionLevel: 2,
|
|
3807
3838
|
noise: 500,
|
|
3808
3839
|
fuse: 4,
|
|
@@ -3849,6 +3880,14 @@ var explosives_default = [
|
|
|
3849
3880
|
injuryRadius: 10,
|
|
3850
3881
|
energy: 43200,
|
|
3851
3882
|
tnt: 0.15,
|
|
3883
|
+
casing: {
|
|
3884
|
+
mass: 0.35,
|
|
3885
|
+
material: "steel",
|
|
3886
|
+
fragments: 60,
|
|
3887
|
+
chargeMass: 0.15,
|
|
3888
|
+
gurneyVelocity: 2e3,
|
|
3889
|
+
geometry: "cylinder"
|
|
3890
|
+
},
|
|
3852
3891
|
destructionLevel: 2,
|
|
3853
3892
|
noise: 450,
|
|
3854
3893
|
fuse: 3,
|
|
@@ -4012,6 +4051,13 @@ var explosives_default = [
|
|
|
4012
4051
|
injuryRadius: 12,
|
|
4013
4052
|
energy: 102400,
|
|
4014
4053
|
tnt: 0.045,
|
|
4054
|
+
casing: {
|
|
4055
|
+
mass: 0.09,
|
|
4056
|
+
material: "steel",
|
|
4057
|
+
fragments: 250,
|
|
4058
|
+
chargeMass: 0.032,
|
|
4059
|
+
gurneyVelocity: 2700
|
|
4060
|
+
},
|
|
4015
4061
|
destructionLevel: 2,
|
|
4016
4062
|
noise: 450,
|
|
4017
4063
|
armRange: [
|
|
@@ -4242,6 +4288,13 @@ var explosives_default = [
|
|
|
4242
4288
|
injuryRadius: 12,
|
|
4243
4289
|
energy: 102400,
|
|
4244
4290
|
tnt: 0.045,
|
|
4291
|
+
casing: {
|
|
4292
|
+
mass: 0.1,
|
|
4293
|
+
material: "steel",
|
|
4294
|
+
fragments: 300,
|
|
4295
|
+
chargeMass: 0.037,
|
|
4296
|
+
gurneyVelocity: 2650
|
|
4297
|
+
},
|
|
4245
4298
|
destructionLevel: 2,
|
|
4246
4299
|
noise: 450,
|
|
4247
4300
|
armRange: [
|
|
@@ -13963,7 +14016,8 @@ var melee_weapons_default = [
|
|
|
13963
14016
|
},
|
|
13964
14017
|
mass: 2.8,
|
|
13965
14018
|
tags: [
|
|
13966
|
-
"heavy"
|
|
14019
|
+
"heavy",
|
|
14020
|
+
"two_handed"
|
|
13967
14021
|
]
|
|
13968
14022
|
},
|
|
13969
14023
|
{
|
|
@@ -14041,7 +14095,8 @@ var melee_weapons_default = [
|
|
|
14041
14095
|
},
|
|
14042
14096
|
mass: 6,
|
|
14043
14097
|
tags: [
|
|
14044
|
-
"heavy"
|
|
14098
|
+
"heavy",
|
|
14099
|
+
"two_handed"
|
|
14045
14100
|
]
|
|
14046
14101
|
},
|
|
14047
14102
|
{
|
|
@@ -14296,6 +14351,7 @@ var locales = {
|
|
|
14296
14351
|
crossbow: "Crossbow",
|
|
14297
14352
|
hammer: "Hammer",
|
|
14298
14353
|
sledgehammer: "Sledgehammer",
|
|
14354
|
+
shovel: "Shovel",
|
|
14299
14355
|
baseball_bat: "Baseball bat",
|
|
14300
14356
|
crowbar: "Crowbar",
|
|
14301
14357
|
machete: "Machete",
|
|
@@ -14397,6 +14453,7 @@ var locales = {
|
|
|
14397
14453
|
crossbow: "besta",
|
|
14398
14454
|
hammer: "martelo",
|
|
14399
14455
|
sledgehammer: "marreta",
|
|
14456
|
+
shovel: "p\xE1",
|
|
14400
14457
|
baseball_bat: "taco de beisebol",
|
|
14401
14458
|
crowbar: "p\xE9 de cabra",
|
|
14402
14459
|
machete: "fac\xE3o",
|
|
@@ -14612,6 +14669,14 @@ var DEFAULT_RULES = {
|
|
|
14612
14669
|
// tucking a pistol in the belt and drawing it back is a short motion of one hand
|
|
14613
14670
|
stowSeconds: 0.45
|
|
14614
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
|
+
},
|
|
14615
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)
|
|
14616
14681
|
stock: {
|
|
14617
14682
|
seconds: 0.6,
|
|
@@ -14793,6 +14858,7 @@ var ExplosiveBody = class {
|
|
|
14793
14858
|
at,
|
|
14794
14859
|
energy: def.energy,
|
|
14795
14860
|
...def.tnt !== void 0 ? { tnt: def.tnt } : {},
|
|
14861
|
+
...def.casing ? { casing: def.casing } : {},
|
|
14796
14862
|
lethalRadius: def.lethalRadius,
|
|
14797
14863
|
injuryRadius: def.injuryRadius,
|
|
14798
14864
|
noise: def.noise,
|
|
@@ -16454,6 +16520,17 @@ var isDualWieldable = (rule, weaponId, category) => {
|
|
|
16454
16520
|
return rule.weapons.includes(weaponId) || rule.categories.includes(category);
|
|
16455
16521
|
};
|
|
16456
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
|
+
|
|
16457
16534
|
// src/generics.ts
|
|
16458
16535
|
var isGenericKind = (kind, category) => kind === "firearm" && category !== "bow" && category !== "crossbow" || kind === "flame";
|
|
16459
16536
|
function genericWeapons(arsenal) {
|
|
@@ -16560,6 +16637,7 @@ export {
|
|
|
16560
16637
|
sampleFuse,
|
|
16561
16638
|
sweepGround,
|
|
16562
16639
|
tripwireSegment,
|
|
16640
|
+
weaponHandsOf,
|
|
16563
16641
|
weaponMenu
|
|
16564
16642
|
};
|
|
16565
16643
|
//# sourceMappingURL=index.js.map
|