forked from cataclysmbn/Cataclysm-BN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlua_annotations.lua
More file actions
3160 lines (3009 loc) · 142 KB
/
lua_annotations.lua
File metadata and controls
3160 lines (3009 loc) · 142 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---@meta
-- Generated by generate_types.lua - DO NOT EDIT MANUALLY
---@class game
---@field active_mods string[]
---@field mod_runtime table<string, any>
---@field mod_storage table<string, any>
---@field on_every_x_hooks table
---@field iuse_functions table
---@field hooks hooks
---@field current_mod string
---@field current_mod_path string
---@field cata_internal table
game = {}
---@class OnCharacterResetStatsParams
---@field character Character
on_character_reset_stats = {}
---@class OnMapgenPostprocessParams
---@field map Map
---@field omt Tripoint
---@field when TimePoint
on_mapgen_postprocess = {}
---@class OnMonDeathParams
---@field mon Monster
---@field killer Character?
on_mon_death = {}
--================---- Classes ----================
---@class ActivityTypeId
---@field NULL_ID fun(): ActivityTypeId
---@field implements_int_id fun(): boolean
---@field is_null fun(self: ActivityTypeId): boolean
---@field is_valid fun(self: ActivityTypeId): boolean
---@field obj fun(self: ActivityTypeId): ActivityTypeRaw
---@field str fun(self: ActivityTypeId): string
---@field serialize fun(self: ActivityTypeId, arg2: any)
---@field deserialize fun(self: ActivityTypeId, arg2: any)
---@field __tostring fun(self: ActivityTypeId): string
ActivityTypeId = {}
---@return ActivityTypeId
---@overload fun(self: ActivityTypeId): ActivityTypeId
---@overload fun(arg1: string): ActivityTypeId
function ActivityTypeId.new() end
---@class AmmunitionEffectId
---@field NULL_ID fun(): AmmunitionEffectId
---@field implements_int_id fun(): boolean
---@field int_id fun(self: AmmunitionEffectId): AmmunitionEffectIntId
---@field is_null fun(self: AmmunitionEffectId): boolean
---@field is_valid fun(self: AmmunitionEffectId): boolean
---@field obj fun(self: AmmunitionEffectId): AmmunitionEffectRaw
---@field str fun(self: AmmunitionEffectId): string
---@field serialize fun(self: AmmunitionEffectId, arg2: any)
---@field deserialize fun(self: AmmunitionEffectId, arg2: any)
---@field __tostring fun(self: AmmunitionEffectId): string
AmmunitionEffectId = {}
---@return AmmunitionEffectId
---@overload fun(self: AmmunitionEffectId): AmmunitionEffectId
---@overload fun(arg1: AmmunitionEffectIntId): AmmunitionEffectId
---@overload fun(arg1: string): AmmunitionEffectId
function AmmunitionEffectId.new() end
---@class AmmunitionEffectIntId
---@field is_valid fun(self: AmmunitionEffectIntId): boolean
---@field obj fun(self: AmmunitionEffectIntId): AmmunitionEffectRaw
---@field str_id fun(self: AmmunitionEffectIntId): AmmunitionEffectId
---@field __tostring fun(self: AmmunitionEffectIntId): string
AmmunitionEffectIntId = {}
---@return AmmunitionEffectIntId
---@overload fun(self: AmmunitionEffectIntId): AmmunitionEffectIntId
---@overload fun(arg1: AmmunitionEffectId): AmmunitionEffectIntId
function AmmunitionEffectIntId.new() end
---@class AmmunitionTypeId
---@field NULL_ID fun(): AmmunitionTypeId
---@field implements_int_id fun(): boolean
---@field is_null fun(self: AmmunitionTypeId): boolean
---@field is_valid fun(self: AmmunitionTypeId): boolean
---@field obj fun(self: AmmunitionTypeId): AmmunitionTypeRaw
---@field str fun(self: AmmunitionTypeId): string
---@field serialize fun(self: AmmunitionTypeId, arg2: any)
---@field deserialize fun(self: AmmunitionTypeId, arg2: any)
---@field __tostring fun(self: AmmunitionTypeId): string
AmmunitionTypeId = {}
---@return AmmunitionTypeId
---@overload fun(self: AmmunitionTypeId): AmmunitionTypeId
---@overload fun(arg1: string): AmmunitionTypeId
function AmmunitionTypeId.new() end
---@class Angle
---@field from_arcmin fun(arg1: number): Angle
---@field from_degrees fun(arg1: number): Angle
---@field from_radians fun(arg1: number): Angle
---@field to_arcmin fun(self: Angle): number
---@field to_degrees fun(self: Angle): number
---@field to_radians fun(self: Angle): number
---@field __eq fun(self: Angle, arg2: Angle): boolean
---@field __le fun(self: Angle, arg2: Angle): boolean
---@field __lt fun(self: Angle, arg2: Angle): boolean
Angle = {}
---@return Angle
function Angle.new() end
---@class ArmorPortionData
---@field coverage integer
---@field encumber integer
---@field max_encumber integer
---@field get_covered_parts fun(self: ArmorPortionData): BodyPartTypeIntId[]
ArmorPortionData = {}
---@return ArmorPortionData
function ArmorPortionData.new() end
---@class Avatar : Player, Character, Creature
---@field get_active_missions fun(self: Avatar): Mission[]
---@field get_completed_missions fun(self: Avatar): Mission[]
---@field get_failed_missions fun(self: Avatar): Mission[]
Avatar = {}
---@return Avatar
function Avatar.new() end
---@class BionicDataId
---@field NULL_ID fun(): BionicDataId
---@field implements_int_id fun(): boolean
---@field is_null fun(self: BionicDataId): boolean
---@field is_valid fun(self: BionicDataId): boolean
---@field obj fun(self: BionicDataId): BionicDataRaw
---@field str fun(self: BionicDataId): string
---@field serialize fun(self: BionicDataId, arg2: any)
---@field deserialize fun(self: BionicDataId, arg2: any)
---@field __tostring fun(self: BionicDataId): string
BionicDataId = {}
---@return BionicDataId
---@overload fun(self: BionicDataId): BionicDataId
---@overload fun(arg1: string): BionicDataId
function BionicDataId.new() end
---@class BodyPartTypeId
---@field NULL_ID fun(): BodyPartTypeId
---@field implements_int_id fun(): boolean
---@field int_id fun(self: BodyPartTypeId): BodyPartTypeIntId
---@field is_null fun(self: BodyPartTypeId): boolean
---@field is_valid fun(self: BodyPartTypeId): boolean
---@field obj fun(self: BodyPartTypeId): BodyPartTypeRaw
---@field str fun(self: BodyPartTypeId): string
---@field serialize fun(self: BodyPartTypeId, arg2: any)
---@field deserialize fun(self: BodyPartTypeId, arg2: any)
---@field __tostring fun(self: BodyPartTypeId): string
BodyPartTypeId = {}
---@return BodyPartTypeId
---@overload fun(self: BodyPartTypeId): BodyPartTypeId
---@overload fun(arg1: BodyPartTypeIntId): BodyPartTypeId
---@overload fun(arg1: string): BodyPartTypeId
function BodyPartTypeId.new() end
---@class BodyPartTypeIntId
---@field is_valid fun(self: BodyPartTypeIntId): boolean
---@field obj fun(self: BodyPartTypeIntId): BodyPartTypeRaw
---@field str_id fun(self: BodyPartTypeIntId): BodyPartTypeId
---@field __tostring fun(self: BodyPartTypeIntId): string
BodyPartTypeIntId = {}
---@return BodyPartTypeIntId
---@overload fun(self: BodyPartTypeIntId): BodyPartTypeIntId
---@overload fun(arg1: BodyPartTypeId): BodyPartTypeIntId
function BodyPartTypeIntId.new() end
---@class BookRecipe
---@field hidden boolean
---@field name any
---@field recipe RecipeRaw
---@field skill_level integer
BookRecipe = {}
---@return BookRecipe
function BookRecipe.new() end
---@class Character : Creature
---@field cash integer
---@field focus_pool integer
---@field follower_ids CharacterId[]
---@field male boolean
---@field mutation_category_level table<MutationCategoryTraitId, integer>
---@field name string
---@field activate_mutation fun(self: Character, arg2: MutationBranchId)
---@field add_addiction fun(self: Character, arg2: AddictionType, arg3: integer)
---@field add_bionic fun(self: Character, arg2: BionicDataId)
---@field add_item fun(self: Character, arg2: Detached<Item>) @Adds a detached item to the player inventory
---@field add_item_with_id fun(self: Character, arg2: ItypeId, arg3: integer): Item @DEPRECATED: use create_item instead
---@field add_morale fun(self: Character, arg2: MoraleTypeDataId, arg3: integer, arg4: integer, arg5: TimeDuration, arg6: TimeDuration, arg7: boolean, arg8: ItypeRaw)
---@field addiction_level fun(self: Character, arg2: AddictionType): integer
---@field age fun(self: Character): integer
---@field all_items fun(self: Character, arg2: boolean): Item[] @Gets all items
---@field all_items_with_flag fun(self: Character, arg2: JsonFlagId, arg3: boolean): Item[] @Gets all items with the given flag
---@field assign_activity fun(self: Character, arg2: ActivityTypeId, arg3: integer, arg4: integer, arg5: integer, arg6: string)
---@field base_age fun(self: Character): integer
---@field base_height fun(self: Character): integer
---@field bionic_armor_bonus fun(self: Character, arg2: BodyPartTypeIntId, arg3: DamageType): number
---@field bionics_weight fun(self: Character): Mass
---@field blood_loss fun(self: Character, arg2: BodyPartTypeIntId): integer
---@field blossoms fun(self: Character)
---@field bodypart_exposure fun(self: Character): table<BodyPartTypeIntId, number>
---@field bodyweight fun(self: Character): Mass
---@field can_hear fun(self: Character, arg2: Tripoint, arg3: integer): boolean
---@field can_mount fun(self: Character, arg2: Monster): boolean
---@field can_pick_volume fun(self: Character, arg2: Volume): boolean
---@field can_pick_weight fun(self: Character, arg2: Mass, arg3: boolean): boolean
---@field can_run fun(self: Character): boolean
---@field can_takeoff fun(self: Character, arg2: Item): boolean @Checks if a given `Item` can be taken off.
---@field can_unwield fun(self: Character, arg2: Item): boolean
---@field can_wear fun(self: Character, arg2: Item, arg3: boolean): boolean @Checks if creature can wear a given item. If boolean parameter is true, ignores already worn items
---@field can_wield fun(self: Character, arg2: Item): boolean
---@field cancel_activity fun(self: Character)
---@field check_mount_is_spooked fun(self: Character): boolean
---@field check_mount_will_move fun(self: Character, arg2: Tripoint): boolean
---@field clear_bionics fun(self: Character)
---@field clear_morale fun(self: Character)
---@field clear_mutations fun(self: Character)
---@field clear_skills fun(self: Character)
---@field cough fun(self: Character, arg2: boolean, arg3: integer)
---@field create_item fun(self: Character, arg2: ItypeId, arg3: integer): Item @Creates and an item with the given id and amount to the player inventory
---@field crossed_threshold fun(self: Character): boolean
---@field deactivate_mutation fun(self: Character, arg2: MutationBranchId)
---@field dismount fun(self: Character)
---@field drop_inv fun(self: Character, arg2: integer)
---@field expose_to_disease fun(self: Character, arg2: DiseaseTypeId)
---@field fall_asleep fun(self: Character) | fun(self: Character, arg2: TimeDuration)
---@field forced_dismount fun(self: Character)
---@field getID fun(self: Character): CharacterId
---@field get_all_skills fun(self: Character): SkillLevelMap
---@field get_armor_acid fun(self: Character, arg2: BodyPartTypeIntId): integer
---@field get_base_traits fun(self: Character): MutationBranchId[]
---@field get_bionics fun(self: Character): BionicDataId[]
---@field get_dependant_worn_items fun(self: Character, arg2: Item): Item[]
---@field get_dex fun(self: Character): integer
---@field get_dex_base fun(self: Character): integer
---@field get_dex_bonus fun(self: Character): integer
---@field get_faction_id fun(self: Character): FactionId
---@field get_fatigue fun(self: Character): integer
---@field get_free_bionics_slots fun(self: Character, arg2: BodyPartTypeIntId): integer
---@field get_healthy fun(self: Character): number
---@field get_healthy_mod fun(self: Character): number
---@field get_highest_category fun(self: Character): MutationCategoryTraitId
---@field get_hostile_creatures fun(self: Character, arg2: integer): Creature[]
---@field get_int fun(self: Character): integer
---@field get_int_base fun(self: Character): integer
---@field get_int_bonus fun(self: Character): integer
---@field get_item_with_id fun(self: Character, arg2: ItypeId, arg3: boolean): Item @Gets the first occurrence of an item with the given id
---@field get_kcal_percent fun(self: Character): number
---@field get_lowest_hp fun(self: Character): integer
---@field get_max_power_level fun(self: Character): Energy
---@field get_melee_stamina_cost fun(self: Character, arg2: Item): integer
---@field get_morale fun(self: Character, arg2: MoraleTypeDataId): integer
---@field get_morale_level fun(self: Character): integer
---@field get_movement_mode fun(self: Character): CharacterMoveMode
---@field get_mutations fun(self: Character, arg2: boolean): MutationBranchId[]
---@field get_painkiller fun(self: Character): integer
---@field get_part_encumbrance fun(self: Character, arg2: BodyPartTypeId): integer
---@field get_part_temp_btu fun(self: Character, arg2: BodyPartTypeIntId): integer @Gets the current temperature of a specific body part (in Body Temperature Units).
---@field get_per fun(self: Character): integer
---@field get_per_base fun(self: Character): integer
---@field get_per_bonus fun(self: Character): integer
---@field get_power_level fun(self: Character): Energy
---@field get_rad fun(self: Character): integer
---@field get_shout_volume fun(self: Character): integer
---@field get_skill_level fun(self: Character, arg2: SkillId): integer
---@field get_skill_level_object fun(self: Character, arg2: SkillId): SkillLevel
---@field get_sleep_deprivation fun(self: Character): integer
---@field get_stamina fun(self: Character): integer
---@field get_stamina_max fun(self: Character): integer
---@field get_stim fun(self: Character): integer
---@field get_stored_kcal fun(self: Character): integer
---@field get_str fun(self: Character): integer
---@field get_str_base fun(self: Character): integer
---@field get_str_bonus fun(self: Character): integer
---@field get_temp_btu fun(self: Character): table<BodyPartTypeIntId, integer> @Gets all bodyparts and their associated temperatures (in Body Temperature Units).
---@field get_thirst fun(self: Character): integer
---@field get_time_died fun(self: Character): TimePoint
---@field get_total_bionics_slots fun(self: Character, arg2: BodyPartTypeIntId): integer
---@field get_used_bionics_slots fun(self: Character, arg2: BodyPartTypeIntId): integer
---@field get_visible_creatures fun(self: Character, arg2: integer): Creature[]
---@field get_working_arm_count fun(self: Character): integer
---@field get_working_leg_count fun(self: Character): integer
---@field get_worn_items fun(self: Character): Item[]
---@field global_sm_location fun(self: Character): Tripoint
---@field global_square_location fun(self: Character): Tripoint
---@field has_active_bionic fun(self: Character, arg2: BionicDataId): boolean
---@field has_active_mutation fun(self: Character, arg2: MutationBranchId): boolean
---@field has_activity fun(self: Character, arg2: ActivityTypeId): boolean
---@field has_addiction fun(self: Character, arg2: AddictionType): boolean
---@field has_alarm_clock fun(self: Character): boolean
---@field has_any_bionic fun(self: Character): boolean
---@field has_base_trait fun(self: Character, arg2: MutationBranchId): boolean
---@field has_bionic fun(self: Character, arg2: BionicDataId): boolean
---@field has_bionics fun(self: Character): boolean
---@field has_child_flag fun(self: Character, arg2: MutationBranchId): boolean
---@field has_item_with_flag fun(self: Character, arg2: JsonFlagId, arg3: boolean): boolean @Checks for an item with the given flag
---@field has_item_with_id fun(self: Character, arg2: ItypeId, arg3: boolean): boolean @Checks for an item with the given id
---@field has_mabuff fun(self: Character, arg2: MartialArtsBuffId): boolean
---@field has_max_power fun(self: Character): boolean
---@field has_morale fun(self: Character, arg2: MoraleTypeDataId): boolean
---@field has_morale_to_craft fun(self: Character): boolean
---@field has_morale_to_read fun(self: Character): boolean
---@field has_opposite_trait fun(self: Character, arg2: MutationBranchId): boolean
---@field has_power fun(self: Character): boolean
---@field has_trait_flag fun(self: Character, arg2: JsonTraitFlagId): boolean
---@field has_two_arms fun(self: Character): boolean
---@field has_watch fun(self: Character): boolean
---@field heal fun(self: Character, arg2: BodyPartTypeIntId, arg3: integer)
---@field healall fun(self: Character, arg2: integer)
---@field healing_rate fun(self: Character, arg2: number): number
---@field healing_rate_medicine fun(self: Character, arg2: number, arg3: BodyPartTypeIntId): number
---@field hearing_ability fun(self: Character): number
---@field height fun(self: Character): integer
---@field hitall fun(self: Character, arg2: integer, arg3: integer, arg4: Creature): integer
---@field hurtall fun(self: Character, arg2: integer, arg3: Creature, arg4: boolean)
---@field in_climate_control fun(self: Character): boolean
---@field inv_remove_item fun(self: Character, arg2: Item): Detached<Item> @DEPRECATED: use remove_item instead
---@field irradiate fun(self: Character, arg2: number, arg3: boolean): boolean
---@field is_armed fun(self: Character): boolean
---@field is_blind fun(self: Character): boolean
---@field is_deaf fun(self: Character): boolean
---@field is_hauling fun(self: Character): boolean
---@field is_invisible fun(self: Character): boolean
---@field is_limb_broken fun(self: Character, arg2: BodyPartTypeIntId): boolean
---@field is_limb_disabled fun(self: Character, arg2: BodyPartTypeIntId): boolean
---@field is_max_power fun(self: Character): boolean
---@field is_mounted fun(self: Character): boolean
---@field is_quiet fun(self: Character): boolean
---@field is_rad_immune fun(self: Character): boolean
---@field is_stealthy fun(self: Character): boolean
---@field is_throw_immune fun(self: Character): boolean
---@field is_weak_to_water fun(self: Character): boolean
---@field is_wearing fun(self: Character, arg2: Item): boolean
---@field is_wearing_active_optcloak fun(self: Character): boolean
---@field is_wearing_active_power_armor fun(self: Character): boolean
---@field is_wearing_helmet fun(self: Character): boolean
---@field is_wearing_on_bp fun(self: Character, arg2: ItypeId, arg3: BodyPartTypeIntId): boolean
---@field is_wearing_power_armor fun(self: Character, arg2: boolean): boolean
---@field is_wielding fun(self: Character, arg2: Item): boolean
---@field is_worn fun(self: Character, arg2: Item): boolean
---@field item_worn_with_flag fun(self: Character, arg2: JsonFlagId, arg3: BodyPartTypeIntId): Item
---@field item_worn_with_id fun(self: Character, arg2: ItypeId, arg3: BodyPartTypeIntId): Item
---@field items_with fun(self: Character, arg2: bool): Item[] @Filters items
---@field knows_recipe fun(self: Character, arg2: RecipeId): boolean
---@field learn_recipe fun(self: Character, arg2: RecipeId)
---@field mabuff_armor_bonus fun(self: Character, arg2: DamageType): integer
---@field mabuff_arpen_bonus fun(self: Character, arg2: DamageType): integer
---@field mabuff_attack_cost_mult fun(self: Character): number
---@field mabuff_attack_cost_penalty fun(self: Character): integer
---@field mabuff_block_bonus fun(self: Character): integer
---@field mabuff_damage_bonus fun(self: Character, arg2: DamageType): integer
---@field mabuff_damage_mult fun(self: Character, arg2: DamageType): number
---@field mabuff_dodge_bonus fun(self: Character): number
---@field mabuff_speed_bonus fun(self: Character): integer
---@field mabuff_tohit_bonus fun(self: Character): number
---@field max_stored_kcal fun(self: Character): integer
---@field metabolic_rate fun(self: Character): number
---@field mod_base_age fun(self: Character, arg2: integer)
---@field mod_base_height fun(self: Character, arg2: integer)
---@field mod_dex_bonus fun(self: Character, arg2: integer)
---@field mod_fatigue fun(self: Character, arg2: integer)
---@field mod_healthy fun(self: Character, arg2: number)
---@field mod_healthy_mod fun(self: Character, arg2: number, arg3: number)
---@field mod_int_bonus fun(self: Character, arg2: integer)
---@field mod_max_power_level fun(self: Character, arg2: Energy)
---@field mod_painkiller fun(self: Character, arg2: integer)
---@field mod_per_bonus fun(self: Character, arg2: integer)
---@field mod_power_level fun(self: Character, arg2: Energy)
---@field mod_rad fun(self: Character, arg2: integer)
---@field mod_skill_level fun(self: Character, arg2: SkillId, arg3: integer)
---@field mod_sleep_deprivation fun(self: Character, arg2: integer)
---@field mod_speed_bonus fun(self: Character, arg2: integer)
---@field mod_stamina fun(self: Character, arg2: integer)
---@field mod_stim fun(self: Character, arg2: integer)
---@field mod_stored_kcal fun(self: Character, arg2: integer)
---@field mod_str_bonus fun(self: Character, arg2: integer)
---@field mod_thirst fun(self: Character, arg2: integer)
---@field mount_creature fun(self: Character, arg2: Monster)
---@field mutate fun(self: Character)
---@field mutate_category fun(self: Character, arg2: MutationCategoryTraitId)
---@field mutate_towards fun(self: Character, arg2: MutationBranchId): boolean
---@field mutate_towards fun(self: Character, arg2: MutationBranchId[], arg3: integer): boolean
---@field mutate_towards fun(self: Character, arg2: MutationBranchId[], arg3: integer): boolean | fun(self: Character, arg2: MutationBranchId): boolean
---@field mutation_armor fun(self: Character, arg2: BodyPartTypeIntId, arg3: DamageType): number
---@field mutation_effect fun(self: Character, arg2: MutationBranchId)
---@field mutation_loss_effect fun(self: Character, arg2: MutationBranchId)
---@field mutation_ok fun(self: Character, arg2: MutationBranchId, arg3: boolean, arg4: boolean): boolean
---@field mutation_value fun(self: Character, arg2: string): number
---@field practice fun(self: Character, arg2: SkillId, arg3: integer, arg4: integer, arg5: boolean)
---@field read_speed fun(self: Character, arg2: boolean): integer
---@field rem_addiction fun(self: Character, arg2: AddictionType)
---@field rem_morale fun(self: Character, arg2: MoraleTypeDataId)
---@field remove_bionic fun(self: Character, arg2: BionicDataId)
---@field remove_child_flag fun(self: Character, arg2: MutationBranchId)
---@field remove_item fun(self: Character, arg2: Item): Detached<Item> @Removes given `Item` from character's inventory. The `Item` must be in the inventory, neither wielded nor worn.
---@field remove_mutation fun(self: Character, arg2: MutationBranchId, arg3: boolean)
---@field remove_worn fun(self: Character, arg2: Item): Detached<Item> @Attempts to remove the worn `Item` from character.
---@field reset fun(self: Character)
---@field reset_encumbrance fun(self: Character)
---@field rest_quality fun(self: Character): number
---@field restore_scent fun(self: Character)
---@field rooted fun(self: Character)
---@field rust_rate fun(self: Character): integer
---@field setID fun(self: Character, arg2: CharacterId, arg3: boolean)
---@field set_base_age fun(self: Character, arg2: integer)
---@field set_base_height fun(self: Character, arg2: integer)
---@field set_dex_bonus fun(self: Character, arg2: integer)
---@field set_faction_id fun(self: Character, arg2: FactionId)
---@field set_fatigue fun(self: Character, arg2: integer)
---@field set_healthy fun(self: Character, arg2: number)
---@field set_healthy_mod fun(self: Character, arg2: number)
---@field set_int_bonus fun(self: Character, arg2: integer)
---@field set_max_power_level fun(self: Character, arg2: Energy)
---@field set_movement_mode fun(self: Character, arg2: CharacterMoveMode)
---@field set_mutation fun(self: Character, arg2: MutationBranchId)
---@field set_painkiller fun(self: Character, arg2: integer)
---@field set_part_temp_btu fun(self: Character, arg2: BodyPartTypeIntId, arg3: integer) @Sets a specific body part to a given temperature (in Body Temperature Units).
---@field set_per_bonus fun(self: Character, arg2: integer)
---@field set_power_level fun(self: Character, arg2: Energy)
---@field set_rad fun(self: Character, arg2: integer)
---@field set_skill_level fun(self: Character, arg2: SkillId, arg3: integer)
---@field set_sleep_deprivation fun(self: Character, arg2: integer)
---@field set_speed_bonus fun(self: Character, arg2: integer)
---@field set_stamina fun(self: Character, arg2: integer)
---@field set_stim fun(self: Character, arg2: integer)
---@field set_stored_kcal fun(self: Character, arg2: integer)
---@field set_str_bonus fun(self: Character, arg2: integer)
---@field set_temp_btu fun(self: Character, arg2: integer) @Sets ALL body parts on a creature to the given temperature (in Body Temperature Units).
---@field set_thirst fun(self: Character, arg2: integer)
---@field shout fun(self: Character, arg2: string, arg3: boolean)
---@field sight_impaired fun(self: Character): boolean
---@field spores fun(self: Character)
---@field suffer fun(self: Character)
---@field takeoff fun(self: Character, arg2: Item): boolean @Attempts to take off the worn `Item` from character.
---@field uncanny_dodge fun(self: Character): boolean
---@field unset_mutation fun(self: Character, arg2: MutationBranchId)
---@field unwield fun(self: Character): boolean
---@field use_charges fun(self: Character, arg2: ItypeId, arg3: integer, arg4: bool): Detached<Item>[]
---@field use_charges_if_avail fun(self: Character, arg2: ItypeId, arg3: integer): boolean
---@field volume_capacity fun(self: Character): Volume
---@field volume_carried fun(self: Character): Volume
---@field vomit fun(self: Character)
---@field wake_up fun(self: Character)
---@field wear fun(self: Character, arg2: Item, arg3: boolean): boolean @Attempts to wear an item in the creature inventory. If boolean parameter is false, item is worn instantly
---@field wear_detached fun(self: Character, arg2: Detached<Item>, arg3: boolean): boolean @Attempts to wear an item not in the creature inventory. If boolean parameter is false, item is worn instantly
---@field wearing_something_on fun(self: Character, arg2: BodyPartTypeIntId): boolean
---@field weight_carried fun(self: Character): Mass
---@field wield fun(self: Character, arg2: Item): boolean
---@field worn_with_flag fun(self: Character, arg2: JsonFlagId, arg3: BodyPartTypeIntId): boolean
---@field worn_with_id fun(self: Character, arg2: ItypeId, arg3: BodyPartTypeIntId): boolean
Character = {}
---@return Character
function Character.new() end
---@class CharacterId
---@field get_value fun(self: CharacterId): integer
---@field is_valid fun(self: CharacterId): boolean
CharacterId = {}
---@return CharacterId
---@overload fun(arg1: integer): CharacterId
function CharacterId.new() end
---@class Creature
---@field add_effect fun(self: Creature, arg2: EffectTypeId, arg3: TimeDuration, arg4: BodyPartTypeId, arg5: integer) @Effect type, duration, bodypart and intensity
---@field apply_damage fun(self: Creature, arg2: Creature, arg3: BodyPartTypeIntId, arg4: integer, arg5: boolean)
---@field as_avatar fun(self: Creature): Avatar
---@field as_character fun(self: Creature): Character
---@field as_monster fun(self: Creature): Monster
---@field as_npc fun(self: Creature): Npc
---@field attitude_to fun(self: Creature, arg2: Creature): Attitude
---@field clear_effects fun(self: Creature)
---@field deal_damage fun(self: Creature, arg2: Creature, arg3: BodyPartTypeIntId, arg4: DamageInstance): DealtDamageInstance
---@field digging fun(self: Creature): boolean
---@field disp_name fun(self: Creature, possessive: boolean, capitalize_first: boolean): string @
---@field dodge_roll fun(self: Creature): number
---@field get_armor_bash fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_armor_bash_base fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_armor_bash_bonus fun(self: Creature): integer
---@field get_armor_bullet fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_armor_bullet_base fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_armor_bullet_bonus fun(self: Creature): integer
---@field get_armor_cut fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_armor_cut_base fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_armor_cut_bonus fun(self: Creature): integer
---@field get_armor_type fun(self: Creature, arg2: DamageType, arg3: BodyPartTypeIntId): integer
---@field get_block_bonus fun(self: Creature): integer
---@field get_dodge fun(self: Creature): number
---@field get_dodge_base fun(self: Creature): number
---@field get_dodge_bonus fun(self: Creature): number
---@field get_effect fun(self: Creature, arg2: EffectTypeId, arg3: BodyPartTypeId): Effect
---@field get_effect_dur fun(self: Creature, arg2: EffectTypeId, arg3: BodyPartTypeId): TimeDuration
---@field get_effect_int fun(self: Creature, arg2: EffectTypeId, arg3: BodyPartTypeId): integer
---@field get_env_resist fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_grammatical_genders fun(self: Creature): string[]
---@field get_hit fun(self: Creature): number
---@field get_hit_base fun(self: Creature): number
---@field get_hit_bonus fun(self: Creature): number
---@field get_hp fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_hp_max fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_melee fun(self: Creature): number
---@field get_moves fun(self: Creature): integer
---@field get_name fun(self: Creature): string
---@field get_num_blocks fun(self: Creature): integer
---@field get_num_dodges fun(self: Creature): integer
---@field get_pain fun(self: Creature): integer
---@field get_part_healed_total fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_part_hp_cur fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_part_hp_max fun(self: Creature, arg2: BodyPartTypeIntId): integer
---@field get_perceived_pain fun(self: Creature): integer
---@field get_pos_ms fun(self: Creature): Tripoint
---@field get_size fun(self: Creature): MonsterSize
---@field get_speed fun(self: Creature): integer
---@field get_speed_base fun(self: Creature): integer
---@field get_speed_bonus fun(self: Creature): integer
---@field get_speed_mult fun(self: Creature): number
---@field get_value fun(self: Creature, arg2: string): string
---@field get_weight fun(self: Creature): Mass
---@field get_weight_capacity fun(self: Creature): integer
---@field has_effect fun(self: Creature, arg2: EffectTypeId, arg3: BodyPartTypeId): boolean
---@field has_effect_with_flag fun(self: Creature, arg2: JsonFlagId, arg3: BodyPartTypeId): boolean
---@field has_flag fun(self: Creature, arg2: MonsterFlag): boolean
---@field has_grab_break_tec fun(self: Creature): boolean
---@field has_trait fun(self: Creature, arg2: MutationBranchId): boolean
---@field has_weapon fun(self: Creature): boolean
---@field hp_percentage fun(self: Creature): integer
---@field in_species fun(self: Creature, arg2: SpeciesTypeId): boolean
---@field is_avatar fun(self: Creature): boolean
---@field is_dead fun(self: Creature): boolean
---@field is_elec_immune fun(self: Creature): boolean
---@field is_hallucination fun(self: Creature): boolean
---@field is_immune_damage fun(self: Creature, arg2: DamageType): boolean
---@field is_immune_effect fun(self: Creature, arg2: EffectTypeId): boolean
---@field is_monster fun(self: Creature): boolean
---@field is_npc fun(self: Creature): boolean
---@field is_on_ground fun(self: Creature): boolean
---@field is_underwater fun(self: Creature): boolean
---@field is_warm fun(self: Creature): boolean
---@field knock_back_to fun(self: Creature, arg2: Tripoint)
---@field mod_all_parts_hp_cur fun(self: Creature, arg2: integer)
---@field mod_moves fun(self: Creature, arg2: integer)
---@field mod_pain fun(self: Creature, arg2: integer)
---@field mod_pain_noresist fun(self: Creature, arg2: integer)
---@field mod_part_hp_cur fun(self: Creature, arg2: BodyPartTypeIntId, arg3: integer)
---@field mod_part_hp_max fun(self: Creature, arg2: BodyPartTypeIntId, arg3: integer)
---@field power_rating fun(self: Creature): number
---@field ranged_target_size fun(self: Creature): number
---@field remove_effect fun(self: Creature, arg2: EffectTypeId, arg3: BodyPartTypeId): boolean
---@field remove_value fun(self: Creature, arg2: string)
---@field sees fun(self: Creature, arg2: Creature): boolean
---@field set_all_parts_hp_cur fun(self: Creature, arg2: integer)
---@field set_all_parts_hp_to_max fun(self: Creature)
---@field set_moves fun(self: Creature, arg2: integer)
---@field set_pain fun(self: Creature, arg2: integer)
---@field set_part_hp_cur fun(self: Creature, arg2: BodyPartTypeIntId, arg3: integer)
---@field set_part_hp_max fun(self: Creature, arg2: BodyPartTypeIntId, arg3: integer)
---@field set_pos_ms fun(self: Creature, arg2: Tripoint)
---@field set_underwater fun(self: Creature, arg2: boolean)
---@field set_value fun(self: Creature, arg2: string, arg3: string)
---@field sight_range fun(self: Creature, arg2: integer): integer
---@field size_melee_penalty fun(self: Creature): integer
---@field skin_name fun(self: Creature): string
---@field speed_rating fun(self: Creature): number
---@field stability_roll fun(self: Creature): number
Creature = {}
---@return Creature
function Creature.new() end
--- Represents a bunch of damage amounts
--- Constructors are:
--- new(damageType, amount, armorPen, remainingArmorMultiplier, damageMultiplier)
---@class DamageInstance
---@field damage_units DamageUnit[]
---@field add fun(self: DamageInstance, arg2: DamageUnit)
---@field add_damage fun(self: DamageInstance, arg2: DamageType, arg3: number, arg4: number, arg5: number, arg6: number)
---@field clear fun(self: DamageInstance)
---@field empty fun(self: DamageInstance): boolean
---@field mult_damage fun(self: DamageInstance, arg2: number, arg3: boolean)
---@field total_damage fun(self: DamageInstance): number
---@field type_damage fun(self: DamageInstance, arg2: DamageType): number
---@field __eq fun(self: DamageInstance, arg2: DamageInstance): boolean
DamageInstance = {}
---@return DamageInstance
---@overload fun(arg1: DamageType, arg2: number, arg3: number, arg4: number, arg5: number): DamageInstance
function DamageInstance.new() end
--- Represents a damage amount
--- Constructors are:
--- new()
--- new(damageType, amount, armorPen, remainingArmorMultiplier, damageMultiplier)
---@class DamageUnit
---@field amount number
---@field damage_multiplier number
---@field res_mult number
---@field res_pen number
---@field type DamageType
---@field __eq fun(self: DamageUnit, arg2: DamageUnit): boolean
DamageUnit = {}
---@return DamageUnit
---@overload fun(arg1: DamageType, arg2: number, arg3: number, arg4: number, arg5: number): DamageUnit
function DamageUnit.new() end
--- Represents the final dealt damage
---@class DealtDamageInstance
---@field bp_hit BodyPartTypeId
---@field dealt_dams integer[]
---@field total_damage fun(self: DealtDamageInstance): integer
---@field type_damage fun(self: DealtDamageInstance, arg2: DamageType): integer
DealtDamageInstance = {}
---@return DealtDamageInstance
function DealtDamageInstance.new() end
---@class DiseaseTypeId
---@field NULL_ID fun(): DiseaseTypeId
---@field implements_int_id fun(): boolean
---@field is_null fun(self: DiseaseTypeId): boolean
---@field is_valid fun(self: DiseaseTypeId): boolean
---@field obj fun(self: DiseaseTypeId): DiseaseTypeRaw
---@field str fun(self: DiseaseTypeId): string
---@field serialize fun(self: DiseaseTypeId, arg2: any)
---@field deserialize fun(self: DiseaseTypeId, arg2: any)
---@field __tostring fun(self: DiseaseTypeId): string
DiseaseTypeId = {}
---@return DiseaseTypeId
---@overload fun(self: DiseaseTypeId): DiseaseTypeId
---@overload fun(arg1: string): DiseaseTypeId
function DiseaseTypeId.new() end
---@class DistributionGrid
---@field get_resource fun(self: DistributionGrid, arg2: boolean): integer @Boolean argument controls recursive behavior
---@field mod_resource fun(self: DistributionGrid, arg2: integer, arg3: boolean): integer @Boolean argument controls recursive behavior
DistributionGrid = {}
---@return DistributionGrid
function DistributionGrid.new() end
---@class DistributionGridTracker
---@field get_grid_at_abs_ms fun(self: DistributionGridTracker, arg2: Tripoint): DistributionGrid
DistributionGridTracker = {}
---@return DistributionGridTracker
function DistributionGridTracker.new() end
---@class Effect
---@field activated fun(self: Effect, arg2: TimePoint, arg3: string, arg4: integer, arg5: boolean, arg6: number): boolean
---@field decay fun(self: Effect, arg2: TimePoint, arg3: boolean): boolean
---@field disp_desc fun(self: Effect, arg2: boolean): string
---@field disp_name fun(self: Effect): string
---@field disp_short_desc fun(self: Effect, arg2: boolean): string
---@field get_addict_mod fun(self: Effect, arg2: string, arg3: integer): number
---@field get_amount fun(self: Effect, arg2: string, arg3: boolean): integer
---@field get_avg_mod fun(self: Effect, arg2: string, arg3: boolean): integer
---@field get_blocks_effects fun(self: Effect): EffectTypeId[]
---@field get_bp fun(self: Effect): BodyPartTypeId
---@field get_dur_add_perc fun(self: Effect): integer
---@field get_duration fun(self: Effect): TimeDuration
---@field get_harmful_cough fun(self: Effect): boolean
---@field get_id fun(self: Effect): EffectTypeId
---@field get_int_add_val fun(self: Effect): integer
---@field get_int_dur_factor fun(self: Effect): TimeDuration
---@field get_intensity fun(self: Effect): integer
---@field get_max_duration fun(self: Effect): TimeDuration
---@field get_max_intensity fun(self: Effect): integer
---@field get_max_val fun(self: Effect, arg2: string, arg3: boolean): integer
---@field get_min_val fun(self: Effect, arg2: string, arg3: boolean): integer
---@field get_mod fun(self: Effect, arg2: string, arg3: boolean): integer
---@field get_percentage fun(self: Effect, arg2: string, arg3: integer, arg4: boolean): number
---@field get_removes_effects fun(self: Effect): EffectTypeId[]
---@field get_resist_effects fun(self: Effect): EffectTypeId[]
---@field get_resist_traits fun(self: Effect): MutationBranchId[]
---@field get_sizing fun(self: Effect, arg2: string): boolean
---@field get_start_time fun(self: Effect): TimePoint
---@field get_type fun(self: Effect): EffectTypeRaw
---@field has_flag fun(self: Effect, arg2: JsonFlagId): boolean
---@field is_permanent fun(self: Effect): boolean
---@field mod_duration fun(self: Effect, arg2: TimeDuration, arg3: boolean)
---@field mod_intensity fun(self: Effect, arg2: integer, arg3: boolean): integer
---@field mult_duration fun(self: Effect, arg2: number, arg3: boolean)
---@field set_duration fun(self: Effect, arg2: TimeDuration, arg3: boolean)
---@field set_intensity fun(self: Effect, arg2: integer, arg3: boolean): integer
---@field set_permanent fun(self: Effect)
---@field use_part_descs fun(self: Effect): boolean
---@field serialize fun(self: Effect, arg2: any)
---@field deserialize fun(self: Effect, arg2: any)
Effect = {}
---@return Effect
function Effect.new() end
---@class EffectTypeId
---@field NULL_ID fun(): EffectTypeId
---@field implements_int_id fun(): boolean
---@field is_null fun(self: EffectTypeId): boolean
---@field is_valid fun(self: EffectTypeId): boolean
---@field obj fun(self: EffectTypeId): EffectTypeRaw
---@field str fun(self: EffectTypeId): string
---@field serialize fun(self: EffectTypeId, arg2: any)
---@field deserialize fun(self: EffectTypeId, arg2: any)
---@field __tostring fun(self: EffectTypeId): string
EffectTypeId = {}
---@return EffectTypeId
---@overload fun(self: EffectTypeId): EffectTypeId
---@overload fun(arg1: string): EffectTypeId
function EffectTypeId.new() end
---@class Energy
---@field from_joule fun(arg1: integer): Energy
---@field from_kilojoule fun(arg1: integer): Energy
---@field to_joule fun(self: Energy): integer
---@field to_kilojoule fun(self: Energy): integer
---@field __eq fun(self: Energy, arg2: Energy): boolean
---@field __le fun(self: Energy, arg2: Energy): boolean
---@field __lt fun(self: Energy, arg2: Energy): boolean
Energy = {}
---@return Energy
function Energy.new() end
---@class FactionId
---@field NULL_ID fun(): FactionId
---@field implements_int_id fun(): boolean
---@field is_null fun(self: FactionId): boolean
---@field is_valid fun(self: FactionId): boolean
---@field obj fun(self: FactionId): FactionRaw
---@field str fun(self: FactionId): string
---@field serialize fun(self: FactionId, arg2: any)
---@field deserialize fun(self: FactionId, arg2: any)
---@field __tostring fun(self: FactionId): string
FactionId = {}
---@return FactionId
---@overload fun(self: FactionId): FactionId
---@overload fun(arg1: string): FactionId
function FactionId.new() end
---@class FactionRaw
---@field str_id fun(self: FactionRaw): FactionId
FactionRaw = {}
---@return FactionRaw
function FactionRaw.new() end
---@class FaultId
---@field NULL_ID fun(): FaultId
---@field implements_int_id fun(): boolean
---@field is_null fun(self: FaultId): boolean
---@field is_valid fun(self: FaultId): boolean
---@field obj fun(self: FaultId): FaultRaw
---@field str fun(self: FaultId): string
---@field serialize fun(self: FaultId, arg2: any)
---@field deserialize fun(self: FaultId, arg2: any)
---@field __tostring fun(self: FaultId): string
FaultId = {}
---@return FaultId
---@overload fun(self: FaultId): FaultId
---@overload fun(arg1: string): FaultId
function FaultId.new() end
---@class FieldEmitId
---@field NULL_ID fun(): FieldEmitId
---@field implements_int_id fun(): boolean
---@field is_null fun(self: FieldEmitId): boolean
---@field is_valid fun(self: FieldEmitId): boolean
---@field obj fun(self: FieldEmitId): FieldEmitRaw
---@field str fun(self: FieldEmitId): string
---@field serialize fun(self: FieldEmitId, arg2: any)
---@field deserialize fun(self: FieldEmitId, arg2: any)
---@field __tostring fun(self: FieldEmitId): string
FieldEmitId = {}
---@return FieldEmitId
---@overload fun(self: FieldEmitId): FieldEmitId
---@overload fun(arg1: string): FieldEmitId
function FieldEmitId.new() end
---@class FieldTypeId
---@field NULL_ID fun(): FieldTypeId
---@field implements_int_id fun(): boolean
---@field int_id fun(self: FieldTypeId): FieldTypeIntId
---@field is_null fun(self: FieldTypeId): boolean
---@field is_valid fun(self: FieldTypeId): boolean
---@field obj fun(self: FieldTypeId): FieldTypeRaw
---@field str fun(self: FieldTypeId): string
---@field serialize fun(self: FieldTypeId, arg2: any)
---@field deserialize fun(self: FieldTypeId, arg2: any)
---@field __tostring fun(self: FieldTypeId): string
FieldTypeId = {}
---@return FieldTypeId
---@overload fun(self: FieldTypeId): FieldTypeId
---@overload fun(arg1: FieldTypeIntId): FieldTypeId
---@overload fun(arg1: string): FieldTypeId
function FieldTypeId.new() end
---@class FieldTypeIntId
---@field is_valid fun(self: FieldTypeIntId): boolean
---@field obj fun(self: FieldTypeIntId): FieldTypeRaw
---@field str_id fun(self: FieldTypeIntId): FieldTypeId
---@field __tostring fun(self: FieldTypeIntId): string
FieldTypeIntId = {}
---@return FieldTypeIntId
---@overload fun(self: FieldTypeIntId): FieldTypeIntId
---@overload fun(arg1: FieldTypeId): FieldTypeIntId
function FieldTypeIntId.new() end
---@class FurnId
---@field NULL_ID fun(): FurnId
---@field implements_int_id fun(): boolean
---@field int_id fun(self: FurnId): FurnIntId
---@field is_null fun(self: FurnId): boolean
---@field is_valid fun(self: FurnId): boolean
---@field obj fun(self: FurnId): FurnRaw
---@field str fun(self: FurnId): string
---@field serialize fun(self: FurnId, arg2: any)
---@field deserialize fun(self: FurnId, arg2: any)
---@field __tostring fun(self: FurnId): string
FurnId = {}
---@return FurnId
---@overload fun(self: FurnId): FurnId
---@overload fun(arg1: FurnIntId): FurnId
---@overload fun(arg1: string): FurnId
function FurnId.new() end
---@class FurnIntId
---@field is_valid fun(self: FurnIntId): boolean
---@field obj fun(self: FurnIntId): FurnRaw
---@field str_id fun(self: FurnIntId): FurnId
---@field __tostring fun(self: FurnIntId): string
FurnIntId = {}
---@return FurnIntId
---@overload fun(self: FurnIntId): FurnIntId
---@overload fun(arg1: FurnId): FurnIntId
function FurnIntId.new() end
---@class FurnRaw
---@field close FurnId
---@field open FurnId
---@field transforms_into FurnId
---@field get_coverage fun(self: FurnRaw): integer
---@field get_flags fun(self: FurnRaw): string[]
---@field get_light_emitted fun(self: FurnRaw): integer
---@field get_max_volume fun(self: FurnRaw): Volume
---@field get_movecost fun(self: FurnRaw): integer
---@field has_flag fun(self: FurnRaw, arg2: string): boolean
---@field int_id fun(self: FurnRaw): FurnIntId
---@field name fun(self: FurnRaw): string
---@field set_coverage fun(self: FurnRaw, arg2: integer)
---@field set_flag fun(self: FurnRaw, arg2: string)
---@field set_light_emitted fun(self: FurnRaw, arg2: integer)
---@field set_max_volume fun(self: FurnRaw, arg2: Volume)
---@field set_movecost fun(self: FurnRaw, arg2: integer)
---@field str_id fun(self: FurnRaw): FurnId
FurnRaw = {}
---@return FurnRaw
function FurnRaw.new() end
---@class IslotAmmo : RangedData
---@field ammo_effects AmmunitionEffectId[]
---@field ammo_id AmmunitionTypeId @Ammo type, basically the "form" of the ammo that fits into the gun/tool
---@field casing_id ItypeId @Type id of casings, if any
---@field cookoff boolean @Should this ammo explode in fire?
---@field def_charges integer @Default charges
---@field dont_recover_one_in integer @Chance to fail to recover the ammo used.
---@field drop ItypeId
---@field drop_active boolean
---@field drop_count integer
---@field force_stat_display boolean
---@field loudness integer @Base loudness of ammo (possibly modified by gun/gunmods)
---@field recoil integer @Recoil (per shot), roughly equivalent to kinetic energy (in Joules)
---@field special_cookoff boolean @Should this ammo apply a special explosion effect when in fire?
IslotAmmo = {}
---@return IslotAmmo
function IslotAmmo.new() end
---@class IslotArmor
---@field env_resist integer @Resistance to environmental effects
---@field env_resist_w_filter integer @Environmental protection of a gas mask with installed filter
---@field layer_data ArmorPortionData[] @Layer, encumbrance and coverage information
---@field resistance Resistances @Damage negated by this armor. Usually calculated from materials+thickness
---@field sided boolean @Whether this item can be worn on either side of the body
---@field storage Volume @How much storage this items provides when worn
---@field thickness integer @Multiplier on resistances provided by armor's materials. Damaged armors have lower effective thickness, low capped at 1. Note: 1 thickness means item retains full resistance when damaged.
---@field valid_mods string[] @Whitelisted clothing mods. Restricted clothing mods must be listed here by id to be compatible.
---@field warmth integer @How much warmth this item provides
---@field weight_capacity_bonus Mass @Bonus to weight capacity
---@field weight_capacity_modifier number @Factor modifying weight capacity
IslotArmor = {}
---@return IslotArmor
function IslotArmor.new() end
---@class IslotArtifact
---@field charge_req ArtifactChargeReq
---@field charge_type ArtifactCharge
---@field dream_freq_met integer
---@field dream_freq_unmet integer
---@field dream_msg_met string[]
---@field dream_msg_unmet string[]
---@field effects_activated ArtifactEffectPassive[]
---@field effects_carried ArtifactEffectActive[]
---@field effects_wielded ArtifactEffectActive[]
---@field effects_worn ArtifactEffectActive[]
IslotArtifact = {}
---@return IslotArtifact
function IslotArtifact.new() end
---@class IslotBattery
---@field max_capacity Energy @Maximum energy the battery can store
IslotBattery = {}
---@return IslotBattery
function IslotBattery.new() end
---@class IslotBionic
---@field bionic_id BionicDataId @Id of the bionic
---@field difficulty integer @Arbitrary difficulty scale
---@field installation_data ItypeId @Item with installation data that can be used to provide almost guaranteed successful install of corresponding bionic
---@field is_upgrade boolean @Whether this CBM is an upgrade of another
IslotBionic = {}
---@return IslotBionic
function IslotBionic.new() end
---@class IslotBook
---@field chapters integer @Fun books have chapters; after all are read, the book is less fun.
---@field fun integer @How fun reading this is, can be negative
---@field intelligence integer @Intelligence required to read it
---@field martial_art MartialArtsId @Which martial art it teaches. Can be MartialArtsId.NULL_ID
---@field recipes BookRecipe[] @Recipes contained in this book
---@field skill SkillId @Which skill it upgrades, if any. Can be SkillId.NULL_ID
---@field skill_max integer @The skill level the book provides
---@field skill_min integer @The skill level required to understand it
---@field time integer @How long in minutes it takes to read. "To read" means getting 1 skill point, not all of them.
IslotBook = {}
---@return IslotBook
function IslotBook.new() end
---@class IslotBrewable
---@field results ItypeId[] @What are the results of fermenting this item
---@field time TimeDuration @How long for this brew to ferment
IslotBrewable = {}
---@return IslotBrewable
function IslotBrewable.new() end
---@class IslotComestible
---@field addict_type AddictionType @effects of addiction
---@field addict_value integer @addiction potential
---@field comest_type string @comestible subtype - eg. FOOD, DRINK, MED
---@field contamination table<DiseaseTypeId, integer> @List of diseases carried by this comestible and their associated probability
---@field cooks_like ItypeId @Reference to other item that replaces this one as a component in recipe results
---@field def_charges integer @Defaults # of charges (drugs, loaf of bread? etc)
---@field fatigue_mod integer @fatigue altering effect
---@field freeze_point integer @freezing point in degrees Fahrenheit, below this temperature item can freeze
---@field healthy integer
---@field latent_heat number
---@field monotony_penalty integer @A penalty applied to fun for every time this food has been eaten in the last 48 hours
---@field parasites integer @chance (odds) of becoming parasitised when eating (zero if never occurs)
---@field petfood string[] @pet food category
---@field quench integer @effect on character thirst (may be negative)
---@field radiation integer @Amount of radiation you get from this comestible
---@field rot_spawn MonsterGroupId @The monster group that is drawn from when the item rots away
---@field rot_spawn_chance integer @Chance the above monster group spawns
---@field smoking_result ItypeId @Reference to item that will be received after smoking current item
---@field specific_heat_liquid number @specific heats in J/(g K) and latent heat in J/g
---@field specific_heat_solid number
---@field spoils TimeDuration @Time until becomes rotten at standard temperature, or zero if never spoils
---@field stimulant_type integer @stimulant effect
---@field tool ItypeId @tool needed to consume (e.g. lighter for cigarettes)
---@field get_default_nutr fun(self: IslotComestible): integer
---@field get_default_nutrition fun(self: IslotComestible): table<VitaminId, integer> @Nutrition values to use for this type when they aren't calculated from components
---@field has_calories fun(self: IslotComestible): boolean
IslotComestible = {}
---@return IslotComestible
function IslotComestible.new() end
---@class IslotContainer
---@field contains Volume @Inner volume of the container
---@field preserves boolean @Contents do not spoil
---@field seals boolean @Can be resealed
---@field unseals_into ItypeId @If this is set to anything but "null", changing this container's contents in any way will turn this item into that type
---@field watertight boolean @Can hold liquids
IslotContainer = {}
---@return IslotContainer
function IslotContainer.new() end
---@class IslotEngine
---@field displacement integer @For combustion engines, the displacement
IslotEngine = {}
---@return IslotEngine
function IslotEngine.new() end
---@class IslotFuel
---@field energy number @Energy of the fuel (kilojoules per charge)
---@field explosion_data any
---@field has_explosion_data boolean
---@field pump_terrain TerIntId
IslotFuel = {}
---@return IslotFuel
function IslotFuel.new() end
---@class IslotGun : RangedData
---@field ammo AmmunitionTypeId[] @What type of ammo this gun uses
---@field ammo_effects AmmunitionEffectId[] @Effects that are applied to the ammo when fired
---@field ammo_to_fire integer @How much ammo is consumed per shot
---@field barrel_volume Volume @Volume of material removed by sawing down the barrel, if left unspecified barrel can't be sawed down
---@field blackpowder_tolerance integer @One in X chance for gun to require major cleanup after firing blackpowder shot
---@field built_in_mods ItypeId[] @Built in mods. string is id of mod. These mods will get the IRREMOVABLE flag set
---@field burst integer @Burst size for AUTO mode (legacy field for items not migrated to specify modes )
---@field clip integer @For guns with an integral magazine what is the capacity?
---@field default_mods ItypeId[] @Default mods, string is id of mod. These mods are removable but are default on the weapon
---@field durability integer @Gun durability, affects gun being damaged during shooting