@adatechnology/game-weapons 0.5.9 → 0.6.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/dist/index.d.ts CHANGED
@@ -156,6 +156,8 @@ interface Detonation {
156
156
  /** Seconds on the clock of the body. */
157
157
  readonly at: number;
158
158
  readonly energy: number;
159
+ /** Kilograms of TNT equivalent of the charge (`ExplosiveDef.tnt`), when it says. */
160
+ readonly tnt?: number;
159
161
  readonly lethalRadius: number;
160
162
  readonly injuryRadius: number;
161
163
  readonly noise: number;
@@ -294,6 +296,11 @@ interface ExplosiveDef {
294
296
  };
295
297
  /** Joules. */
296
298
  readonly energy: number;
299
+ /**
300
+ * Kilograms of TNT equivalent of the charge (the explosive's mass times its relative effectiveness; for a gas bottle or a tank, the equivalent of its burst). The blast wave that pushes a
301
+ * body is read from it (`knockOf` of `game-contracts`); without it the body takes the charge from `energy`.
302
+ */
303
+ readonly tnt?: number;
297
304
  /** What the blast tears down: 0 nothing, 1 light, 2 walls, 3 structures. */
298
305
  readonly destructionLevel: 0 | 1 | 2 | 3;
299
306
  /** Audible distance in metres. */
@@ -2161,6 +2161,7 @@ var GameWeapons = (() => {
2161
2161
  ];
2162
2162
 
2163
2163
  // ../game-contracts/dist/index.js
2164
+ var DEFAULT_BLAST_IMPULSE = { bodyArea: 0.7, lift: 0.15, minSpeed: 0.3, tntPerJoule: 0.24 / 2e5 };
2164
2165
  var DEFAULT_COST_ALLOCATION_BYTES = 1024 * 1024;
2165
2166
  var DEFAULT_IGNITION_RULES = {
2166
2167
  fillCurve: [
@@ -3849,6 +3850,7 @@ var GameWeapons = (() => {
3849
3850
  lethalRadius: 5,
3850
3851
  injuryRadius: 15,
3851
3852
  energy: 2e5,
3853
+ tnt: 0.24,
3852
3854
  destructionLevel: 2,
3853
3855
  noise: 500,
3854
3856
  fuse: 4,
@@ -3894,6 +3896,7 @@ var GameWeapons = (() => {
3894
3896
  lethalRadius: 3,
3895
3897
  injuryRadius: 10,
3896
3898
  energy: 43200,
3899
+ tnt: 0.15,
3897
3900
  destructionLevel: 2,
3898
3901
  noise: 450,
3899
3902
  fuse: 3,
@@ -3913,6 +3916,7 @@ var GameWeapons = (() => {
3913
3916
  lethalRadius: 5,
3914
3917
  injuryRadius: 14,
3915
3918
  energy: 2e5,
3919
+ tnt: 1.5,
3916
3920
  destructionLevel: 2,
3917
3921
  noise: 550,
3918
3922
  fire: {
@@ -3959,6 +3963,7 @@ var GameWeapons = (() => {
3959
3963
  lethalRadius: 4,
3960
3964
  injuryRadius: 12,
3961
3965
  energy: 102400,
3966
+ tnt: 0.25,
3962
3967
  destructionLevel: 3,
3963
3968
  noise: 600,
3964
3969
  fuseLength: 0.03,
@@ -3981,6 +3986,7 @@ var GameWeapons = (() => {
3981
3986
  lethalRadius: 6,
3982
3987
  injuryRadius: 18,
3983
3988
  energy: 345600,
3989
+ tnt: 0.76,
3984
3990
  destructionLevel: 3,
3985
3991
  noise: 700,
3986
3992
  triggers: [
@@ -4004,6 +4010,7 @@ var GameWeapons = (() => {
4004
4010
  length: 50
4005
4011
  },
4006
4012
  energy: 102400,
4013
+ tnt: 0.9,
4007
4014
  destructionLevel: 1,
4008
4015
  noise: 500,
4009
4016
  triggers: [
@@ -4027,6 +4034,7 @@ var GameWeapons = (() => {
4027
4034
  lethalRadius: 0,
4028
4035
  injuryRadius: 10,
4029
4036
  energy: 0,
4037
+ tnt: 0.01,
4030
4038
  destructionLevel: 0,
4031
4039
  noise: 400,
4032
4040
  fuseRange: [
@@ -4051,6 +4059,7 @@ var GameWeapons = (() => {
4051
4059
  lethalRadius: 4,
4052
4060
  injuryRadius: 12,
4053
4061
  energy: 102400,
4062
+ tnt: 0.045,
4054
4063
  destructionLevel: 2,
4055
4064
  noise: 450,
4056
4065
  triggers: [
@@ -4069,6 +4078,7 @@ var GameWeapons = (() => {
4069
4078
  lethalRadius: 5,
4070
4079
  injuryRadius: 15,
4071
4080
  energy: 2e5,
4081
+ tnt: 0.45,
4072
4082
  destructionLevel: 3,
4073
4083
  noise: 700,
4074
4084
  triggers: [
@@ -4087,6 +4097,7 @@ var GameWeapons = (() => {
4087
4097
  lethalRadius: 5,
4088
4098
  injuryRadius: 16,
4089
4099
  energy: 2e5,
4100
+ tnt: 0.7,
4090
4101
  destructionLevel: 3,
4091
4102
  noise: 750,
4092
4103
  triggers: [
@@ -4105,6 +4116,7 @@ var GameWeapons = (() => {
4105
4116
  lethalRadius: 5,
4106
4117
  injuryRadius: 16,
4107
4118
  energy: 2e5,
4119
+ tnt: 0.45,
4108
4120
  destructionLevel: 3,
4109
4121
  noise: 750,
4110
4122
  triggers: [
@@ -4123,6 +4135,7 @@ var GameWeapons = (() => {
4123
4135
  lethalRadius: 5,
4124
4136
  injuryRadius: 16,
4125
4137
  energy: 2e5,
4138
+ tnt: 0.7,
4126
4139
  destructionLevel: 3,
4127
4140
  noise: 750,
4128
4141
  triggers: [
@@ -4141,6 +4154,7 @@ var GameWeapons = (() => {
4141
4154
  lethalRadius: 4,
4142
4155
  injuryRadius: 12,
4143
4156
  energy: 102400,
4157
+ tnt: 1,
4144
4158
  destructionLevel: 2,
4145
4159
  noise: 550,
4146
4160
  fire: {
@@ -4174,6 +4188,7 @@ var GameWeapons = (() => {
4174
4188
  lethalRadius: 5,
4175
4189
  injuryRadius: 14,
4176
4190
  energy: 2e5,
4191
+ tnt: 0.5,
4177
4192
  destructionLevel: 2,
4178
4193
  noise: 550,
4179
4194
  fire: {
@@ -4211,6 +4226,7 @@ var GameWeapons = (() => {
4211
4226
  lethalRadius: 4,
4212
4227
  injuryRadius: 12,
4213
4228
  energy: 102400,
4229
+ tnt: 0.5,
4214
4230
  destructionLevel: 3,
4215
4231
  noise: 700,
4216
4232
  fire: {
@@ -4240,6 +4256,7 @@ var GameWeapons = (() => {
4240
4256
  lethalRadius: 12,
4241
4257
  injuryRadius: 30,
4242
4258
  energy: 2764800,
4259
+ tnt: 20,
4243
4260
  destructionLevel: 3,
4244
4261
  noise: 700,
4245
4262
  fire: {
@@ -4267,6 +4284,7 @@ var GameWeapons = (() => {
4267
4284
  lethalRadius: 4,
4268
4285
  injuryRadius: 12,
4269
4286
  energy: 102400,
4287
+ tnt: 0.045,
4270
4288
  destructionLevel: 2,
4271
4289
  noise: 450,
4272
4290
  triggers: [
@@ -13009,6 +13027,7 @@ var GameWeapons = (() => {
13009
13027
  direction: this.facing,
13010
13028
  at,
13011
13029
  energy: def.energy,
13030
+ ...def.tnt !== void 0 ? { tnt: def.tnt } : {},
13012
13031
  lethalRadius: def.lethalRadius,
13013
13032
  injuryRadius: def.injuryRadius,
13014
13033
  noise: def.noise,