@amxts/core 0.1.0 → 0.2.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 +18 -23
- package/README.ru.md +19 -22
- package/as/amxts.d.ts +63 -3
- package/as/constants.ts +684 -116
- package/as/entities.ts +1905 -1364
- package/as/events.ts +1694 -905
- package/as/facade.ts +1240 -220
- package/as/fetch.ts +1519 -0
- package/as/flags.ts +159 -145
- package/as/hlds.ts +1071 -0
- package/as/hooks.ts +5226 -5379
- package/as/kit.ts +15 -5
- package/as/lib/check.ts +1 -1
- package/as/natives.ts +2658 -2499
- package/as/remote.ts +39 -15
- package/as/tsconfig.json +6 -2
- package/as/vector.ts +12 -9
- package/includes/order.txt +22 -29
- package/includes/sources.json +0 -8
- package/node_modules/assemblyscript/std/assembly/index.d.ts +20 -11
- package/package.json +29 -7
- package/runtime/deps/assemblyscript/dist/asc.js +86 -16
- package/runtime/deps/assemblyscript/dist/assemblyscript.js +29 -29
- package/runtime/licenses/MPL-2.0.txt +373 -0
- package/runtime/licenses/README.md +5 -1
- package/runtime/licenses/curl-COPYING +22 -0
- package/runtime/licenses/libssh2-COPYING +43 -0
- package/runtime/licenses/mbedTLS-LICENSE +553 -0
- package/runtime/natives.txt +108 -105
- package/runtime/patches/assemblyscript-0.28.20-amxts.patch +752 -296
- package/runtime/patches/wamr-2.4.5-amxts.patch +148 -0
- package/scripts/apply-docs.ts +2 -2
- package/scripts/auto-imports.ts +2 -2
- package/scripts/build-identity.ts +115 -0
- package/scripts/build-wasm.ts +101 -50
- package/scripts/check.ts +17 -3
- package/scripts/client-messages.ts +246 -0
- package/scripts/compile-pool.ts +128 -0
- package/scripts/compile-worker.ts +23 -0
- package/scripts/compile.ts +156 -59
- package/scripts/docker-server.ts +13 -3
- package/scripts/docs/as/amxts.ts +86 -0
- package/scripts/docs/as/facade.ts +688 -188
- package/scripts/docs/as/fetch.ts +805 -0
- package/scripts/docs/entities.ts +43 -144
- package/scripts/docs/events.ts +15 -26
- package/scripts/docs/game.ts +68 -22
- package/scripts/docs/messages.ts +330 -16
- package/scripts/editor-api.ts +101 -0
- package/scripts/hlds-events.ts +370 -0
- package/scripts/includes.ts +12 -10
- package/scripts/player-fields.ts +16 -15
- package/scripts/prebuilt.ts +65 -23
- package/scripts/prepare.ts +39 -28
- package/scripts/project.ts +120 -20
- package/scripts/reapi-events.ts +98 -0
- package/scripts/shared-modules.ts +85 -23
- package/scripts/source-map.ts +242 -0
- package/scripts/system.ts +1 -1
- package/scripts/typed-commands.ts +263 -0
- package/scripts/typed-configs.ts +23 -12
- package/scripts/ui.ts +3 -1
- package/scripts/upgrade-menus.ts +274 -0
- package/scripts/upgrade-names.ts +384 -0
- package/scripts/upgrade.ts +830 -0
- package/src/cli-api.mjs +37 -4
- package/src/system.mjs +74 -3
- package/src/testing/compile.ts +8 -5
- package/src/testing/natives.ts +199 -5
- package/src/testing/network.ts +531 -0
- package/src/testing/server.ts +565 -47
- package/src/testing/tables.ts +25 -0
- package/as/modules/http.ts +0 -184
- package/scripts/docs/as/modules/http.ts +0 -66
package/scripts/docs/entities.ts
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
// unit or range and typical values; no engine names outside the Pawn line. Angles are degrees, speeds units per second, a "game time"
|
|
17
17
|
// is get_gametime() seconds. Where the game itself keeps a field up to date,
|
|
18
18
|
// the entry says so - writing it is then undone on the next frame. Keyed by
|
|
19
|
-
// the reapi name:
|
|
20
|
-
// the reapi names tell them apart.
|
|
19
|
+
// the reapi name: m_flTimeWeaponIdle and m_Weapon_flTimeWeaponIdle are a
|
|
20
|
+
// player's and a weapon's, and the reapi names tell them apart.
|
|
21
21
|
//
|
|
22
22
|
// Sources: HLSDK progdefs.h (entvars_t), ReHLDS sv_user.cpp and sv_phys.cpp
|
|
23
23
|
// (what the engine does with them), ReGameDLL player.h, weapons.h, cbase.h
|
|
@@ -226,8 +226,8 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
226
226
|
ru: `Группы тела модели: какие подмодели рисуются, одним числом.`,
|
|
227
227
|
},
|
|
228
228
|
var_effects: {
|
|
229
|
-
en: `The entity's visual effects, for example: \`"
|
|
230
|
-
ru: `Визуальные эффекты сущности, например: \`"
|
|
229
|
+
en: `The entity's visual effects, for example: \`"noDraw"\` hides it, \`"dimLight"\` and \`"brightLight"\` light up around it, \`"muzzleFlash"\` flashes once.`,
|
|
230
|
+
ru: `Визуальные эффекты сущности, например: \`"noDraw"\` прячет её, \`"dimLight"\` и \`"brightLight"\` освещают вокруг, \`"muzzleFlash"\` — одна вспышка.`,
|
|
231
231
|
},
|
|
232
232
|
var_gravity: {
|
|
233
233
|
en: `The entity's gravity multiplier: \`1\` is normal, \`0.5\` is half. \`0\` also counts as normal.`,
|
|
@@ -330,8 +330,8 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
330
330
|
ru: `Положение глаз игрока относительно \`origin\`: \`(0, 0, 17)\` стоя, \`(0, 0, 12)\` присев.`,
|
|
331
331
|
},
|
|
332
332
|
var_button: {
|
|
333
|
-
en: `The buttons the player holds this frame, e.g. \`"
|
|
334
|
-
ru: `Кнопки, которые игрок держит в этом кадре, например \`"
|
|
333
|
+
en: `The buttons the player holds this frame, e.g. \`"attack"\`, \`"jump"\`, \`"duck"\`, \`"use"\`.`,
|
|
334
|
+
ru: `Кнопки, которые игрок держит в этом кадре, например \`"attack"\`, \`"jump"\`, \`"duck"\`, \`"use"\`.`,
|
|
335
335
|
},
|
|
336
336
|
var_impulse: {
|
|
337
337
|
en: `The player's impulse command: \`100\` is the flashlight, \`201\` the spray. The game clears it once it has handled it.`,
|
|
@@ -366,8 +366,8 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
366
366
|
ru: `Флаги появления сущности — биты, которые маппер отметил на карте; значение каждого зависит от classname.`,
|
|
367
367
|
},
|
|
368
368
|
var_flags: {
|
|
369
|
-
en: `The entity's state flags, for example \`"
|
|
370
|
-
ru: `Флаги состояния сущности, например \`"
|
|
369
|
+
en: `The entity's state flags, for example \`"onGround"\`, \`"ducking"\`, \`"inWater"\`, \`"frozen"\`, \`"fakeClient"\` for a bot, \`"killMe"\` to be removed.`,
|
|
370
|
+
ru: `Флаги состояния сущности, например \`"onGround"\`, \`"ducking"\`, \`"inWater"\`, \`"frozen"\`, \`"fakeClient"\` у бота, \`"killMe"\` — на удаление.`,
|
|
371
371
|
},
|
|
372
372
|
var_colormap: {
|
|
373
373
|
en: `The player's Half-Life colours, top in the low byte and bottom in the high one; for a player the engine sets it to his index.`,
|
|
@@ -385,7 +385,6 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
385
385
|
en: `The player's remaining jump out of water, in milliseconds.`,
|
|
386
386
|
ru: `Остаток прыжка игрока из воды, в миллисекундах.`,
|
|
387
387
|
},
|
|
388
|
-
var_armortype: unused(`The Half-Life armour type.`, `Тип брони Half-Life.`),
|
|
389
388
|
var_armorvalue: {
|
|
390
389
|
en: `The entity's armour points, \`0\` to \`100\` in a normal game. The kind of armour is in \`kevlar\`.`,
|
|
391
390
|
ru: `Очки брони сущности, от \`0\` до \`100\` в обычной игре. Вид брони — в \`kevlar\`.`,
|
|
@@ -643,30 +642,6 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
643
642
|
},
|
|
644
643
|
|
|
645
644
|
// CBaseMonster: a player is a monster to the game, so these are his too.
|
|
646
|
-
m_Activity: {
|
|
647
|
-
en: `
|
|
648
|
-
The model's current activity (idle, run, walk, ...); the game sets it with the player's animation.
|
|
649
|
-
|
|
650
|
-
Pawn: \`ACT_*\`
|
|
651
|
-
`,
|
|
652
|
-
ru: `
|
|
653
|
-
Текущее действие модели (стоит, бежит, идёт, ...); игра ставит его вместе с анимацией игрока.
|
|
654
|
-
|
|
655
|
-
Pawn: \`ACT_*\`
|
|
656
|
-
`,
|
|
657
|
-
},
|
|
658
|
-
m_IdealActivity: {
|
|
659
|
-
en: `
|
|
660
|
-
The model's next activity, the one it should switch to.
|
|
661
|
-
|
|
662
|
-
Pawn: \`ACT_*\`
|
|
663
|
-
`,
|
|
664
|
-
ru: `
|
|
665
|
-
Следующее действие модели — на которое она должна переключиться.
|
|
666
|
-
|
|
667
|
-
Pawn: \`ACT_*\`
|
|
668
|
-
`,
|
|
669
|
-
},
|
|
670
645
|
m_LastHitGroup: {
|
|
671
646
|
en: `
|
|
672
647
|
The body part the last bullet hit, one of: \`"generic"\` - no particular part; \`"head"\`, \`"chest"\`, \`"stomach"\`, \`"leftArm"\`, \`"rightArm"\`, \`"leftLeg"\`, \`"rightLeg"\`; \`"shield"\`.
|
|
@@ -680,33 +655,13 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
680
655
|
`,
|
|
681
656
|
},
|
|
682
657
|
m_bitsDamageType: {
|
|
683
|
-
en: `The kinds of damage the player took since the HUD was last told, e.g. \`"
|
|
684
|
-
ru: `Виды урона, полученного игроком с последнего обновления HUD, например \`"
|
|
685
|
-
},
|
|
686
|
-
m_MonsterState: {
|
|
687
|
-
en: `A monster's (a hostage's) AI state, one of: \`"none"\`, \`"idle"\`, \`"combat"\`, \`"alert"\`, \`"hunt"\`, \`"prone"\`, \`"script"\`, \`"playDead"\`, \`"dead"\`.`,
|
|
688
|
-
ru: `Состояние ИИ монстра (заложника), одно из: \`"none"\`, \`"idle"\`, \`"combat"\`, \`"alert"\`, \`"hunt"\`, \`"prone"\`, \`"script"\`, \`"playDead"\`, \`"dead"\`.`,
|
|
689
|
-
},
|
|
690
|
-
m_IdealMonsterState: {
|
|
691
|
-
en: `The AI state a monster (a hostage) should move to - the names \`monsterState\` has.`,
|
|
692
|
-
ru: `Состояние ИИ, в которое монстр (заложник) должен перейти, — те же имена, что у \`monsterState\`.`,
|
|
693
|
-
},
|
|
694
|
-
m_afConditions: {
|
|
695
|
-
en: `A monster's AI conditions this think, as bits: sees an enemy, is hurt, hears a sound.`,
|
|
696
|
-
ru: `Условия ИИ монстра в этом think, битами: видит врага, ранен, слышит звук.`,
|
|
697
|
-
},
|
|
698
|
-
m_afMemory: {
|
|
699
|
-
en: `A monster's AI memory, as bits kept between thinks.`,
|
|
700
|
-
ru: `Память ИИ монстра — биты, которые хранятся между think.`,
|
|
658
|
+
en: `The kinds of damage the player took since the HUD was last told, e.g. \`"fall"\`, \`"bullet"\`, \`"burn"\`; the game clears all but the lasting ones after the damage indicator is sent.`,
|
|
659
|
+
ru: `Виды урона, полученного игроком с последнего обновления HUD, например \`"fall"\`, \`"bullet"\`, \`"burn"\`; отправив индикатор урона, игра оставляет только длительные.`,
|
|
701
660
|
},
|
|
702
661
|
m_flNextAttack: {
|
|
703
662
|
en: `The player's delay before any weapon can be used, in seconds; it counts down to \`0\` by itself. The game sets it while he switches weapons or reloads.`,
|
|
704
663
|
ru: `Задержка игрока до использования любого оружия, в секундах; сама отсчитывается до \`0\`. Игра ставит её при смене оружия и перезарядке.`,
|
|
705
664
|
},
|
|
706
|
-
m_hTargetEnt: {
|
|
707
|
-
en: `A monster's target: the entity it moves to or follows, like the player a hostage follows.`,
|
|
708
|
-
ru: `Цель монстра: сущность, к которой он идёт или за которой следует, — например, игрок, за которым идёт заложник.`,
|
|
709
|
-
},
|
|
710
665
|
m_flFieldOfView: {
|
|
711
666
|
en: `A monster's field of view, as the cosine of half the cone: \`0.5\` sees 120 degrees wide.`,
|
|
712
667
|
ru: `Поле зрения монстра как косинус половины конуса: \`0.5\` — обзор 120 градусов.`,
|
|
@@ -723,14 +678,6 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
723
678
|
Pawn: \`BLOOD_COLOR_*\`, \`DONT_BLEED\`
|
|
724
679
|
`,
|
|
725
680
|
},
|
|
726
|
-
m_HackedGunPos: {
|
|
727
|
-
en: `The position of a monster's gun relative to its \`origin\`, where its shots come from.`,
|
|
728
|
-
ru: `Положение оружия монстра относительно \`origin\` — откуда он стреляет.`,
|
|
729
|
-
},
|
|
730
|
-
m_vecEnemyLKP: {
|
|
731
|
-
en: `The position where a monster last saw its enemy.`,
|
|
732
|
-
ru: `Место, где монстр последний раз видел врага.`,
|
|
733
|
-
},
|
|
734
681
|
|
|
735
682
|
// CBasePlayer.
|
|
736
683
|
random_seed: {
|
|
@@ -804,12 +751,12 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
804
751
|
},
|
|
805
752
|
m_iKevlar: {
|
|
806
753
|
en: `
|
|
807
|
-
The player's armour kind, one of: \`"none"\`; \`"vest"\`; \`"vestHelmet"\` - a vest and a helmet.
|
|
754
|
+
The player's armour kind, one of: \`"none"\`; \`"vest"\`; \`"vestHelmet"\` - a vest and a helmet. Setting it shows the helmet on his HUD, or takes it off.
|
|
808
755
|
|
|
809
756
|
Pawn: \`ARMOR_*\`
|
|
810
757
|
`,
|
|
811
758
|
ru: `
|
|
812
|
-
Вид брони игрока, одно из: \`"none"\` — нет; \`"vest"\` — жилет; \`"vestHelmet"\` — жилет и шлем.
|
|
759
|
+
Вид брони игрока, одно из: \`"none"\` — нет; \`"vest"\` — жилет; \`"vestHelmet"\` — жилет и шлем. Запись показывает шлем на его HUD или убирает его.
|
|
813
760
|
|
|
814
761
|
Pawn: \`ARMOR_*\`
|
|
815
762
|
`,
|
|
@@ -819,8 +766,8 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
819
766
|
ru: `\`true\`, если игрок пережил прошлый раунд и сохраняет снаряжение; при \`false\` он появится со стандартным.`,
|
|
820
767
|
},
|
|
821
768
|
m_iAccount: {
|
|
822
|
-
en: `The player's money: \`800\` at the start.
|
|
823
|
-
ru: `Деньги игрока: \`800\` в начале. Запись
|
|
769
|
+
en: `The player's money: \`800\` at the start. Setting it shows the new amount on his HUD at once, flashing: \`player.money += 500\`.`,
|
|
770
|
+
ru: `Деньги игрока: \`800\` в начале. Запись сразу показывает новую сумму на его HUD, с миганием: \`player.money += 500\`.`,
|
|
824
771
|
},
|
|
825
772
|
m_bHasPrimary: {
|
|
826
773
|
en: `\`true\` if the player carries a primary weapon (a rifle, a shotgun, a submachine gun).`,
|
|
@@ -907,12 +854,12 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
907
854
|
`,
|
|
908
855
|
},
|
|
909
856
|
m_bHasNightVision: {
|
|
910
|
-
en: `\`true\` if the player owns night vision goggles.`,
|
|
911
|
-
ru: `\`true\`, если у игрока есть прибор ночного
|
|
857
|
+
en: `\`true\` if the player owns night vision goggles. Setting it gives or takes them, and his buy menu knows.`,
|
|
858
|
+
ru: `\`true\`, если у игрока есть прибор ночного видения. Запись выдаёт или забирает его, и меню покупки это знает.`,
|
|
912
859
|
},
|
|
913
860
|
m_bNightVisionOn: {
|
|
914
|
-
en: `\`true\` while the player's night vision is switched on.`,
|
|
915
|
-
ru: `\`true\`, пока прибор ночного видения игрока
|
|
861
|
+
en: `\`true\` while the player's night vision is switched on. Setting it switches his screen to night vision or back.`,
|
|
862
|
+
ru: `\`true\`, пока прибор ночного видения игрока включён. Запись включает или выключает ночное видение на его экране.`,
|
|
916
863
|
},
|
|
917
864
|
m_flIdleCheckTime: {
|
|
918
865
|
en: `The game time of the player's next idle check; checks are 5 seconds apart.`,
|
|
@@ -935,8 +882,8 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
935
882
|
ru: `\`true\`, пока игрок несёт бомбу.`,
|
|
936
883
|
},
|
|
937
884
|
m_bHasDefuser: {
|
|
938
|
-
en: `\`true\` if the player has a defuse kit.`,
|
|
939
|
-
ru: `\`true\`, если у игрока есть набор
|
|
885
|
+
en: `\`true\` if the player has a defuse kit. Setting it gives or takes the kit as the game does: on his model, its icon on his HUD and in his buy menu.`,
|
|
886
|
+
ru: `\`true\`, если у игрока есть набор сапёра. Запись выдаёт или забирает набор, как это делает игра: на модели, значком на HUD и в меню покупки.`,
|
|
940
887
|
},
|
|
941
888
|
m_bKilledByBomb: {
|
|
942
889
|
en: `\`true\` if the bomb's explosion killed the player.`,
|
|
@@ -994,10 +941,6 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
994
941
|
en: `The status bar text the game last sent the player - the line that names whom he aims at, as a format his client fills in.`,
|
|
995
942
|
ru: `Текст строки состояния, который игра последним отправила игроку, — строка о том, в кого он целится, в виде формата, который заполняет его клиент.`,
|
|
996
943
|
},
|
|
997
|
-
m_szTeamName: {
|
|
998
|
-
en: `A team name the game keeps for Half-Life's team play; Counter-Strike leaves it empty. The player's team is \`player.team\`.`,
|
|
999
|
-
ru: `Имя команды, которое игра держит для командной игры Half-Life; Counter-Strike оставляет его пустым. Команда игрока — \`player.team\`.`,
|
|
1000
|
-
},
|
|
1001
944
|
m_szAnimExtention: {
|
|
1002
945
|
en: `The animation set the player's model holds his weapon with, e.g. \`"knife"\`, \`"rifle"\`, \`"c4"\`.`,
|
|
1003
946
|
ru: `Набор анимаций, с которым модель игрока держит оружие, например \`"knife"\`, \`"rifle"\`, \`"c4"\`.`,
|
|
@@ -1115,20 +1058,20 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
1115
1058
|
ru: `Игровое время, когда батарея фонарика игрока в следующий раз разрядится (включён) или зарядится (выключен) на единицу.`,
|
|
1116
1059
|
},
|
|
1117
1060
|
m_iFlashBattery: {
|
|
1118
|
-
en: `The charge of the player's flashlight, \`0\` to \`100
|
|
1119
|
-
ru: `Заряд фонарика игрока, от \`0\` до \`100
|
|
1061
|
+
en: `The charge of the player's flashlight, \`0\` to \`100\`. Setting it shows the new charge on his HUD.`,
|
|
1062
|
+
ru: `Заряд фонарика игрока, от \`0\` до \`100\`. Запись сразу показывает новый заряд на его HUD.`,
|
|
1120
1063
|
},
|
|
1121
1064
|
m_afButtonLast: {
|
|
1122
|
-
en: `The buttons the player held the frame before: \`["
|
|
1123
|
-
ru: `Кнопки, которые игрок держал в прошлом кадре: \`["
|
|
1065
|
+
en: `The buttons the player held the frame before: \`["jump"]\`.`,
|
|
1066
|
+
ru: `Кнопки, которые игрок держал в прошлом кадре: \`["jump"]\`.`,
|
|
1124
1067
|
},
|
|
1125
1068
|
m_afButtonPressed: {
|
|
1126
|
-
en: `The buttons the player pressed this frame: \`["
|
|
1127
|
-
ru: `Кнопки, которые игрок нажал в этом кадре: \`["
|
|
1069
|
+
en: `The buttons the player pressed this frame: \`["jump"]\`.`,
|
|
1070
|
+
ru: `Кнопки, которые игрок нажал в этом кадре: \`["jump"]\`.`,
|
|
1128
1071
|
},
|
|
1129
1072
|
m_afButtonReleased: {
|
|
1130
|
-
en: `The buttons the player let go this frame: \`["
|
|
1131
|
-
ru: `Кнопки, которые игрок отпустил в этом кадре: \`["
|
|
1073
|
+
en: `The buttons the player let go this frame: \`["jump"]\`.`,
|
|
1074
|
+
ru: `Кнопки, которые игрок отпустил в этом кадре: \`["jump"]\`.`,
|
|
1132
1075
|
},
|
|
1133
1076
|
m_pentSndLast: {
|
|
1134
1077
|
en: `The sound area (\`env_sound\`) whose room effect is on the player.`,
|
|
@@ -1145,12 +1088,12 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
1145
1088
|
m_fNewAmmo: unused(`The player's “new ammo to send” flag from Half-Life.`, `Флаг игрока «есть новые патроны для отправки» из Half-Life.`),
|
|
1146
1089
|
m_afPhysicsFlags: {
|
|
1147
1090
|
en: `
|
|
1148
|
-
The player's physics state, a list of any of: \`"
|
|
1091
|
+
The player's physics state, a list of any of: \`"onLadder"\`, \`"onTrain"\`, \`"onBarnacle"\`, \`"ducking"\` - crouching down right now, \`"using"\` - holding an object's use key, \`"observer"\` - a spectator locked in place.
|
|
1149
1092
|
|
|
1150
1093
|
Pawn: \`PFLAG_*\`
|
|
1151
1094
|
`,
|
|
1152
1095
|
ru: `
|
|
1153
|
-
Физическое состояние игрока, список, любые из: \`"
|
|
1096
|
+
Физическое состояние игрока, список, любые из: \`"onLadder"\` — на лестнице, \`"onTrain"\` — на поезде, \`"onBarnacle"\` — схвачен барнаклом, \`"ducking"\` — приседает прямо сейчас, \`"using"\` — держит клавишу использования на объекте, \`"observer"\` — закреплённый наблюдатель.
|
|
1154
1097
|
|
|
1155
1098
|
Pawn: \`PFLAG_*\`
|
|
1156
1099
|
`,
|
|
@@ -1160,8 +1103,8 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
1160
1103
|
ru: `Игровое время, когда команда kill снова сработает для игрока, — через секунду после прошлой.`,
|
|
1161
1104
|
},
|
|
1162
1105
|
m_flTimeWeaponIdle: {
|
|
1163
|
-
en: `The player's idle timer from Half-Life; CS keeps it on the weapon (a Weapon's \`
|
|
1164
|
-
ru: `Таймер покоя игрока из Half-Life; CS держит его у оружия (\`
|
|
1106
|
+
en: `The player's idle timer from Half-Life; CS keeps it on the weapon (a Weapon's \`nextIdle\`) and does not use this one.`,
|
|
1107
|
+
ru: `Таймер покоя игрока из Half-Life; CS держит его у оружия (\`nextIdle\` у Weapon), а этот не использует.`,
|
|
1165
1108
|
},
|
|
1166
1109
|
m_flWallJumpTime: unused(`The player's wall-jump timer from Half-Life.`, `Таймер прыжка от стены у игрока из Half-Life.`),
|
|
1167
1110
|
m_flSuitUpdate: {
|
|
@@ -1270,8 +1213,8 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
1270
1213
|
ru: `Броня, последней отправленная в HUD игрока; \`-1\` — игра отправит её заново.`,
|
|
1271
1214
|
},
|
|
1272
1215
|
m_iHideHUD: {
|
|
1273
|
-
en: `The parts of the player's HUD that are hidden: \`["
|
|
1274
|
-
ru: `Скрытые части HUD игрока: \`["
|
|
1216
|
+
en: `The parts of the player's HUD that are hidden: \`["money", "timer"]\`; the game sends the change itself.`,
|
|
1217
|
+
ru: `Скрытые части HUD игрока: \`["money", "timer"]\`; изменение игра отправляет сама.`,
|
|
1275
1218
|
},
|
|
1276
1219
|
m_iClientHideHUD: {
|
|
1277
1220
|
en: `The hidden HUD parts last sent to the player; when they differ from \`hideHud\`, the game sends \`hideHud\`.`,
|
|
@@ -1553,10 +1496,6 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
1553
1496
|
en: `The weapon's current inaccuracy: it grows as it fires and settles back; each weapon has its own range (\`0.2\` for a fresh AK-47).`,
|
|
1554
1497
|
ru: `Текущий разброс оружия: растёт при стрельбе и возвращается; у каждого оружия свои пределы (\`0.2\` у свежего AK-47).`,
|
|
1555
1498
|
},
|
|
1556
|
-
m_Weapon_flLastFire: {
|
|
1557
|
-
en: `The game time of a pistol's last shot, for its accuracy.`,
|
|
1558
|
-
ru: `Игровое время последнего выстрела пистолета — для его точности.`,
|
|
1559
|
-
},
|
|
1560
1499
|
m_Weapon_iShotsFired: {
|
|
1561
1500
|
en: `The shots in the weapon's current burst; the recoil grows with it, and it drops back once the player stops firing.`,
|
|
1562
1501
|
ru: `Выстрелы в текущей очереди оружия; с ними растёт отдача, и счёт сбрасывается, когда игрок перестаёт стрелять.`,
|
|
@@ -1583,12 +1522,12 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
1583
1522
|
},
|
|
1584
1523
|
m_Weapon_iWeaponState: {
|
|
1585
1524
|
en: `
|
|
1586
|
-
The weapon's modes, a list of any of: \`"
|
|
1525
|
+
The weapon's modes, a list of any of: \`"uspSilenced"\` - the USP's silencer is on, \`"glock18Burst"\` - the Glock fires bursts, \`"m4a1Silenced"\` - the M4A1's silencer is on, \`"eliteLeft"\` - the Elites fire the left gun next, \`"famasBurst"\` - the FAMAS fires bursts, \`"shieldDrawn"\` - the shield is up.
|
|
1587
1526
|
|
|
1588
1527
|
Pawn: \`WPNSTATE_*\`
|
|
1589
1528
|
`,
|
|
1590
1529
|
ru: `
|
|
1591
|
-
Режимы оружия, список, любые из: \`"
|
|
1530
|
+
Режимы оружия, список, любые из: \`"uspSilenced"\` — глушитель на USP, \`"glock18Burst"\` — Glock стреляет очередями, \`"m4a1Silenced"\` — глушитель на M4A1, \`"eliteLeft"\` — Elites следующим стреляют из левого, \`"famasBurst"\` — FAMAS стреляет очередями, \`"shieldDrawn"\` — щит поднят.
|
|
1592
1531
|
|
|
1593
1532
|
Pawn: \`WPNSTATE_*\`
|
|
1594
1533
|
`,
|
|
@@ -1601,14 +1540,6 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
1601
1540
|
en: `The game time when \`shotsFired\` next goes down by one after the player stops firing.`,
|
|
1602
1541
|
ru: `Игровое время, когда \`shotsFired\` уменьшится на единицу после того, как игрок перестал стрелять.`,
|
|
1603
1542
|
},
|
|
1604
|
-
m_Weapon_usFireGlock18: {
|
|
1605
|
-
en: `The Glock's firing event (precached).`,
|
|
1606
|
-
ru: `Событие выстрела Glock (подгруженное).`,
|
|
1607
|
-
},
|
|
1608
|
-
m_Weapon_usFireFamas: {
|
|
1609
|
-
en: `The FAMAS's firing event (precached).`,
|
|
1610
|
-
ru: `Событие выстрела FAMAS (подгруженное).`,
|
|
1611
|
-
},
|
|
1612
1543
|
m_Weapon_flPrevPrimaryAttack: {
|
|
1613
1544
|
en: `The delay between the weapon's last two shots, in seconds; the game uses it to keep the fire rate even.`,
|
|
1614
1545
|
ru: `Задержка между двумя последними выстрелами оружия, в секундах; по ней игра выравнивает темп стрельбы.`,
|
|
@@ -1630,14 +1561,6 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
1630
1561
|
en: `The game's name in the server browser, e.g. \`"Counter-Strike"\`.`,
|
|
1631
1562
|
ru: `Название игры в браузере серверов, например \`"Counter-Strike"\`.`,
|
|
1632
1563
|
},
|
|
1633
|
-
m_msgPlayerVoiceMask: {
|
|
1634
|
-
en: `The number of the user message that tells a player whose voice he hears.`,
|
|
1635
|
-
ru: `Номер пользовательского сообщения, которое говорит игроку, чей голос он слышит.`,
|
|
1636
|
-
},
|
|
1637
|
-
m_msgRequestState: {
|
|
1638
|
-
en: `The number of the user message that asks a player's game for its voice settings.`,
|
|
1639
|
-
ru: `Номер пользовательского сообщения, которое спрашивает у игры игрока её голосовые настройки.`,
|
|
1640
|
-
},
|
|
1641
1564
|
m_nMaxPlayers: {
|
|
1642
1565
|
en: `The number of player slots, as the game's voice code counts them.`,
|
|
1643
1566
|
ru: `Число мест для игроков, как их считает голосовой код игры.`,
|
|
@@ -1926,26 +1849,6 @@ export const ENTITY_FIELDS: Record<string, Text> = {
|
|
|
1926
1849
|
en: `\`true\` once the game has begun: both sides have had players. Until then a round ends with “Game Commencing”.`,
|
|
1927
1850
|
ru: `\`true\`, когда игра началась: на обеих сторонах были игроки. До этого раунд кончается надписью «Game Commencing».`,
|
|
1928
1851
|
},
|
|
1929
|
-
m_bInCareerGame: {
|
|
1930
|
-
en: `\`true\` in a Condition Zero career game.`,
|
|
1931
|
-
ru: `\`true\` в карьере Condition Zero.`,
|
|
1932
|
-
},
|
|
1933
|
-
m_fCareerRoundMenuTime: {
|
|
1934
|
-
en: `The game time the Condition Zero career's menu after a round shows.`,
|
|
1935
|
-
ru: `Игровое время, когда в карьере Condition Zero появится меню после раунда.`,
|
|
1936
|
-
},
|
|
1937
|
-
m_iCareerMatchWins: {
|
|
1938
|
-
en: `The number of rounds to win a Condition Zero career match.`,
|
|
1939
|
-
ru: `Число раундов для победы в матче карьеры Condition Zero.`,
|
|
1940
|
-
},
|
|
1941
|
-
m_iRoundWinDifference: {
|
|
1942
|
-
en: `The lead in rounds a Condition Zero career match needs to be won.`,
|
|
1943
|
-
ru: `Перевес в раундах, нужный для победы в матче карьеры Condition Zero.`,
|
|
1944
|
-
},
|
|
1945
|
-
m_fCareerMatchMenuTime: {
|
|
1946
|
-
en: `The game time the Condition Zero career's menu after a match shows.`,
|
|
1947
|
-
ru: `Игровое время, когда в карьере Condition Zero появится меню после матча.`,
|
|
1948
|
-
},
|
|
1949
1852
|
m_bSkipSpawn: {
|
|
1950
1853
|
en: `\`true\` when the next round starts without respawning the players.`,
|
|
1951
1854
|
ru: `\`true\`, если следующий раунд начнётся, не возрождая игроков.`,
|
|
@@ -2033,8 +1936,8 @@ export const ENTITY_TYPES: Record<string, Text> = {
|
|
|
2033
1936
|
ru: `Стадия входа игрока в игру — \`player.joiningState\`.`,
|
|
2034
1937
|
},
|
|
2035
1938
|
GameMenu: {
|
|
2036
|
-
en: `An old-style menu of the game - \`player.
|
|
2037
|
-
ru: `Старое меню игры — \`player.
|
|
1939
|
+
en: `An old-style menu of the game - \`player.openMenu\`.`,
|
|
1940
|
+
ru: `Старое меню игры — \`player.openMenu\`.`,
|
|
2038
1941
|
},
|
|
2039
1942
|
ThrowDirection: {
|
|
2040
1943
|
en: `The way a dead player's body is thrown - \`player.throwDirection\`.`,
|
|
@@ -2044,10 +1947,6 @@ export const ENTITY_TYPES: Record<string, Text> = {
|
|
|
2044
1947
|
en: `The colour of an entity's blood - \`player.bloodColor\`.`,
|
|
2045
1948
|
ru: `Цвет крови сущности — \`player.bloodColor\`.`,
|
|
2046
1949
|
},
|
|
2047
|
-
MonsterState: {
|
|
2048
|
-
en: `A monster's (a hostage's) AI state - \`monsterState\`, \`idealMonsterState\`.`,
|
|
2049
|
-
ru: `Состояние ИИ монстра (заложника) — \`monsterState\`, \`idealMonsterState\`.`,
|
|
2050
|
-
},
|
|
2051
1950
|
PlayerModel: {
|
|
2052
1951
|
en: `A player's model - \`player.modelName\`.`,
|
|
2053
1952
|
ru: `Модель игрока — \`player.modelName\`.`,
|
|
@@ -2118,7 +2017,7 @@ Pawn: \`ExecuteHamB(Ham_Activate, ...)\`, \`ExecuteHam\``,
|
|
|
2118
2017
|
Pawn: \`ExecuteHamB(Ham_Activate, ...)\`, \`ExecuteHam\``,
|
|
2119
2018
|
},
|
|
2120
2019
|
|
|
2121
|
-
'Entity.
|
|
2020
|
+
'Entity.heal': {
|
|
2122
2021
|
en: `Heals the entity as the game does, up to its maximum: \`true\` when it took any.
|
|
2123
2022
|
|
|
2124
2023
|
Pawn: \`ExecuteHamB(Ham_TakeHealth, ...)\`, \`ExecuteHam\``,
|
|
@@ -2166,7 +2065,7 @@ Pawn: \`ExecuteHamB(Ham_CS_Restart, ...)\`, \`ExecuteHam\``,
|
|
|
2166
2065
|
|
|
2167
2066
|
Pawn: \`ExecuteHamB(Ham_CS_Restart, ...)\`, \`ExecuteHam\``,
|
|
2168
2067
|
},
|
|
2169
|
-
'Player.
|
|
2068
|
+
'Player.addFrags': {
|
|
2170
2069
|
en: `Adds points to the player's score, as a kill does; \`allowNegative\` lets the score go below \`0\`.
|
|
2171
2070
|
|
|
2172
2071
|
Pawn: \`ExecuteHamB(Ham_AddPoints, ...)\`, \`ExecuteHam\``,
|
|
@@ -2174,7 +2073,7 @@ Pawn: \`ExecuteHamB(Ham_AddPoints, ...)\`, \`ExecuteHam\``,
|
|
|
2174
2073
|
|
|
2175
2074
|
Pawn: \`ExecuteHamB(Ham_AddPoints, ...)\`, \`ExecuteHam\``,
|
|
2176
2075
|
},
|
|
2177
|
-
'Player.
|
|
2076
|
+
'Player.addTeamScore': {
|
|
2178
2077
|
en: `Adds points to the scores of the player's team, as the game does for an objective.
|
|
2179
2078
|
|
|
2180
2079
|
Pawn: \`ExecuteHamB(Ham_AddPointsToTeam, ...)\`, \`ExecuteHam\``,
|
|
@@ -2182,7 +2081,7 @@ Pawn: \`ExecuteHamB(Ham_AddPointsToTeam, ...)\`, \`ExecuteHam\``,
|
|
|
2182
2081
|
|
|
2183
2082
|
Pawn: \`ExecuteHamB(Ham_AddPointsToTeam, ...)\`, \`ExecuteHam\``,
|
|
2184
2083
|
},
|
|
2185
|
-
'Player.
|
|
2084
|
+
'Player.addItem': {
|
|
2186
2085
|
en: `Puts a weapon entity into the player's inventory; \`true\` when it went in. To give a weapon by name, \`player.give\`.
|
|
2187
2086
|
|
|
2188
2087
|
Pawn: \`ExecuteHamB(Ham_AddPlayerItem, ...)\`, \`ExecuteHam\``,
|
|
@@ -2190,7 +2089,7 @@ Pawn: \`ExecuteHamB(Ham_AddPlayerItem, ...)\`, \`ExecuteHam\``,
|
|
|
2190
2089
|
|
|
2191
2090
|
Pawn: \`ExecuteHamB(Ham_AddPlayerItem, ...)\`, \`ExecuteHam\``,
|
|
2192
2091
|
},
|
|
2193
|
-
'Player.
|
|
2092
|
+
'Player.removeItem': {
|
|
2194
2093
|
en: `Takes a weapon entity out of the player's inventory, leaving the entity; \`true\` when it was there.
|
|
2195
2094
|
|
|
2196
2095
|
Pawn: \`ExecuteHamB(Ham_RemovePlayerItem, ...)\`, \`ExecuteHam\``,
|
package/scripts/docs/events.ts
CHANGED
|
@@ -80,8 +80,8 @@ export const EVENTS: Record<string, EventDoc> = {
|
|
|
80
80
|
},
|
|
81
81
|
client_connect: {
|
|
82
82
|
summary: {
|
|
83
|
-
en: `A player started connecting. The player is not in the game yet: show him anything after \`"
|
|
84
|
-
ru: `Игрок начал подключаться. В игре его ещё нет: показывать ему что-то можно после \`"
|
|
83
|
+
en: `A player started connecting. The player is not in the game yet: show him anything after \`"putInServer"\`.`,
|
|
84
|
+
ru: `Игрок начал подключаться. В игре его ещё нет: показывать ему что-то можно после \`"putInServer"\`.`,
|
|
85
85
|
},
|
|
86
86
|
fields: { player },
|
|
87
87
|
},
|
|
@@ -102,13 +102,13 @@ export const EVENTS: Record<string, EventDoc> = {
|
|
|
102
102
|
},
|
|
103
103
|
client_authorized: {
|
|
104
104
|
summary: {
|
|
105
|
-
en: `A player's SteamID is known. May come before or after \`"
|
|
106
|
-
ru: `Стал известен SteamID игрока. Может прийти до или после \`"
|
|
105
|
+
en: `A player's SteamID is known. May come before or after \`"putInServer"\`.`,
|
|
106
|
+
ru: `Стал известен SteamID игрока. Может прийти до или после \`"putInServer"\`.`,
|
|
107
107
|
},
|
|
108
108
|
notes: [{ en: `A bot's SteamID is \`"BOT"\`.`, ru: `SteamID бота — \`"BOT"\`.` }],
|
|
109
109
|
fields: {
|
|
110
110
|
player,
|
|
111
|
-
|
|
111
|
+
steamId: { en: `The player's SteamID, e.g. \`"STEAM_0:1:12345"\`. A bot has \`"BOT"\`, HLTV has \`"HLTV"\`; on a LAN server it is \`"STEAM_ID_LAN"\`. With Reunion a game without Steam gets one made from its key: \`"STEAM_..."\` or \`"VALVE_..."\`, as the server's Reunion settings say.`, ru: `SteamID игрока, например \`"STEAM_0:1:12345"\`. У бота — \`"BOT"\`, у HLTV — \`"HLTV"\`; на LAN-сервере — \`"STEAM_ID_LAN"\`. С Reunion игра без Steam получает SteamID, сделанный из её ключа: \`"STEAM_..."\` или \`"VALVE_..."\`, как скажут настройки Reunion на сервере.` },
|
|
112
112
|
},
|
|
113
113
|
},
|
|
114
114
|
client_putinserver: {
|
|
@@ -117,7 +117,7 @@ export const EVENTS: Record<string, EventDoc> = {
|
|
|
117
117
|
ru: `Игрок зашёл и уже в игре: момент поприветствовать его.`,
|
|
118
118
|
},
|
|
119
119
|
fields: { player },
|
|
120
|
-
example: `server.addEventListener("
|
|
120
|
+
example: `server.addEventListener("putInServer", (event) => {\n\tprint(event.player, "Welcome!");\n});`,
|
|
121
121
|
},
|
|
122
122
|
client_disconnected: {
|
|
123
123
|
summary: {
|
|
@@ -141,13 +141,6 @@ export const EVENTS: Record<string, EventDoc> = {
|
|
|
141
141
|
},
|
|
142
142
|
example: `server.addEventListener("disconnected", (event) => {\n\tconsole.log(\`\${event.player.name} left: \${event.reason}\`);\n});`,
|
|
143
143
|
},
|
|
144
|
-
client_disconnect: {
|
|
145
|
-
summary: {
|
|
146
|
-
en: `Old form of \`"disconnected"\` that misses some cases: use \`"disconnected"\`.`,
|
|
147
|
-
ru: `Старая форма \`"disconnected"\`, которая пропускает часть случаев: используйте \`"disconnected"\`.`,
|
|
148
|
-
},
|
|
149
|
-
fields: { player },
|
|
150
|
-
},
|
|
151
144
|
client_remove: {
|
|
152
145
|
summary: {
|
|
153
146
|
en: `A player's slot is being freed, after \`"disconnected"\`.`,
|
|
@@ -196,22 +189,18 @@ export const EVENTS: Record<string, EventDoc> = {
|
|
|
196
189
|
ru: `Кадр сервера, сотни раз в секунду. Обработчик должен быть очень лёгким, иначе используйте \`setInterval\`.`,
|
|
197
190
|
},
|
|
198
191
|
},
|
|
199
|
-
|
|
192
|
+
pfn_think: {
|
|
200
193
|
summary: {
|
|
201
|
-
en: `
|
|
202
|
-
ru:
|
|
194
|
+
en: `An entity thinks: its scheduled update has come. Any entity's; one class's is \`game.addEventListener("think", listener, { classname })\`.`,
|
|
195
|
+
ru: `Сущность «думает»: пришло её запланированное обновление. Любой сущности; одного класса — \`game.addEventListener("think", listener, { classname })\`.`,
|
|
203
196
|
},
|
|
204
|
-
fields: {
|
|
205
|
-
toucher: { en: `The entity that moved into the other.`, ru: `Сущность, которая налетела на другую.` },
|
|
206
|
-
touched: { en: `The entity that was touched.`, ru: `Сущность, которой коснулись.` },
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
pfn_think: {
|
|
210
|
-
summary: { en: `An entity thinks: its scheduled update has come.`, ru: `Сущность «думает»: пришло её запланированное обновление.` },
|
|
211
197
|
fields: { entity: { en: `The entity that thinks.`, ru: `Сущность, которая «думает».` } },
|
|
212
198
|
},
|
|
213
199
|
pfn_spawn: {
|
|
214
|
-
summary: {
|
|
200
|
+
summary: {
|
|
201
|
+
en: `An entity is being spawned on the map, the map's own too as it loads. A player's spawn is \`game.addEventListener("spawn", listener)\`.`,
|
|
202
|
+
ru: `На карте появляется сущность, в том числе сущности самой карты, пока она загружается. Появление игрока — \`game.addEventListener("spawn", listener)\`.`,
|
|
203
|
+
},
|
|
215
204
|
fields: { entity: { en: `The entity being spawned.`, ru: `Сущность, которая появляется.` } },
|
|
216
205
|
},
|
|
217
206
|
pfn_playbackevent: {
|
|
@@ -222,7 +211,7 @@ export const EVENTS: Record<string, EventDoc> = {
|
|
|
222
211
|
fields: {
|
|
223
212
|
flags: { en: `The event's flags, how the engine sends it.`, ru: `Флаги события — как движок его отправляет.` },
|
|
224
213
|
entity: { en: `The entity the event plays on, usually the player who fired.`, ru: `Сущность, на которой играет событие, — обычно игрок, который выстрелил.` },
|
|
225
|
-
|
|
214
|
+
eventIndex: { en: `The event's index in the precached events.`, ru: `Номер события среди загруженных заранее событий.` },
|
|
226
215
|
delay: { en: `The seconds before the event plays.`, ru: `Секунды до того, как событие проиграется.` },
|
|
227
216
|
origin: { en: `The point the event plays from.`, ru: `Точка, откуда проигрывается событие.` },
|
|
228
217
|
angles: { en: `The angles the event plays with.`, ru: `Углы, с которыми проигрывается событие.` },
|
|
@@ -236,7 +225,7 @@ export const EVENTS: Record<string, EventDoc> = {
|
|
|
236
225
|
},
|
|
237
226
|
};
|
|
238
227
|
|
|
239
|
-
/** `"
|
|
228
|
+
/** `"playerChange"`: an event of the core's, not a forward - its class and fields are the facade's. */
|
|
240
229
|
export const PLAYER_CHANGE: EventDoc = {
|
|
241
230
|
summary: {
|
|
242
231
|
en: `A field plugins added to \`Player\` changed on a player; \`{ field: "spawnProtected" }\` hears one field.`,
|