-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathpouch.dm
1493 lines (1282 loc) · 53 KB
/
pouch.dm
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
/obj/item/storage/pouch
name = "abstract pouch"
desc = "The physical manifestation of a concept of a pouch. Woah."
icon = 'icons/obj/items/clothing/pouches.dmi'
icon_state = "small_drop"
w_class = SIZE_LARGE //does not fit in backpack
max_w_class = SIZE_SMALL
flags_equip_slot = SLOT_STORE
storage_slots = 1
storage_flags = STORAGE_FLAGS_POUCH
cant_hold = list(/obj/item/weapon/throwing_knife)
///If it closes a flap over its contents, and therefore update_icon should lift that flap when opened. If it doesn't have _half and _full iconstates, this doesn't matter either way.
var/flap = TRUE
/obj/item/storage/pouch/update_icon()
overlays.Cut()
if(!length(contents))
return TRUE //For the pistol pouch to know it's empty.
if(content_watchers && flap) //If it has a flap and someone's looking inside it, don't close the flap.
return
if(isnull(storage_slots))//uses weight instead of slots
var/fullness = 0
for(var/obj/item/C as anything in contents)
fullness += C.w_class
if(fullness <= max_storage_space * 0.5)
overlays += "+[icon_state]_half"
else
overlays += "+[icon_state]_full"
return
else if(length(contents) <= storage_slots * 0.5)
overlays += "+[icon_state]_half"
else
overlays += "+[icon_state]_full"
/obj/item/storage/pouch/get_examine_text(mob/user)
. = ..()
. += "Can be worn by attaching it to a pocket."
/obj/item/storage/pouch/equipped(mob/user, slot)
if(slot == WEAR_L_STORE || slot == WEAR_R_STORE)
mouse_opacity = MOUSE_OPACITY_OPAQUE //so it's easier to click when properly equipped.
..()
/obj/item/storage/pouch/dropped(mob/user)
mouse_opacity = initial(mouse_opacity)
..()
/obj/item/storage/pouch/general
name = "light general pouch"
desc = "A general-purpose pouch used to carry a small item, or two tiny ones."
icon_state = "small_drop"
storage_flags = STORAGE_FLAGS_DEFAULT
max_w_class = SIZE_MEDIUM
cant_hold = list( //Prevent inventory bloat
/obj/item/storage/firstaid,
/obj/item/storage/bible,
/obj/item/storage/box,
)
storage_slots = null
max_storage_space = 2
/obj/item/storage/pouch/general/medium
name = "medium general pouch"
desc = "A general-purpose pouch used to carry a variety of differently sized items."
icon_state = "medium_drop"
storage_slots = null
max_storage_space = 4
/obj/item/storage/pouch/general/large
name = "large general pouch"
desc = "A general-purpose pouch used to carry more differently sized items."
icon_state = "large_drop"
storage_slots = null
max_storage_space = 6
/obj/item/storage/pouch/flamertank
name = "fuel tank strap pouch"
desc = "Two ring straps to loop around M240-pattern napalm tanks. Handle with care."
storage_slots = 2
icon_state = "fueltank_pouch"
storage_flags = STORAGE_FLAGS_POUCH
can_hold = list(
/obj/item/ammo_magazine/flamer_tank,
/obj/item/tool/extinguisher,
)
bypass_w_limit = list(
/obj/item/ammo_magazine/flamer_tank,
/obj/item/tool/extinguisher,
)
/obj/item/storage/pouch/flamertank/weak
/obj/item/storage/pouch/flamertank/weak/fill_preset_inventory()
for(var/i in 1 to storage_slots)
new /obj/item/ammo_magazine/flamer_tank/weak(src)
/obj/item/storage/pouch/general/large/m39ap
storage_slots = 1
/obj/item/storage/pouch/general/large/m39ap/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/smg/m39/ap(src)
/obj/item/storage/pouch/bayonet
name = "bayonet sheath"
desc = "Knife to meet you!"
can_hold = list(
/obj/item/weapon/throwing_knife,
/obj/item/attachable/bayonet,
)
cant_hold = list()
icon_state = "bayonet"
storage_slots = 5
storage_flags = STORAGE_FLAGS_POUCH|STORAGE_USING_DRAWING_METHOD|STORAGE_ALLOW_QUICKDRAW
var/default_knife_type = /obj/item/weapon/throwing_knife
COOLDOWN_DECLARE(draw_cooldown)
/obj/item/storage/pouch/bayonet/Initialize()
. = ..()
for(var/total_storage_slots in 1 to storage_slots)
new default_knife_type(src)
/obj/item/storage/pouch/bayonet/upp
default_knife_type = /obj/item/attachable/bayonet/upp
/obj/item/storage/pouch/bayonet/_item_insertion(obj/item/W, prevent_warning = 0)
..()
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)
/obj/item/storage/pouch/bayonet/_item_removal(obj/item/W, atom/new_location)
..()
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)
/obj/item/storage/pouch/bayonet/attack_hand(mob/user, mods)
if(COOLDOWN_FINISHED(src, draw_cooldown))
..()
COOLDOWN_START(src, draw_cooldown, BAYONET_DRAW_DELAY)
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)
else
to_chat(user, SPAN_WARNING("You need to wait before drawing another knife!"))
return 0
/obj/item/storage/pouch/survival
name = "survival pouch"
desc = "A pouch given to colonists in the event of an emergency."
icon_state = "tools"
storage_slots = 7
max_w_class = SIZE_MEDIUM
can_hold = list(
/obj/item/device/flashlight,
/obj/item/tool/crowbar,
/obj/item/storage/pill_bottle/packet,
/obj/item/stack/medical/bruise_pack,
/obj/item/device/radio,
/obj/item/attachable/bayonet,
/obj/item/stack/medical/splint,
)
/obj/item/storage/pouch/survival/full/fill_preset_inventory()
new /obj/item/device/flashlight(src)
new /obj/item/tool/crowbar/red(src)
new /obj/item/storage/pill_bottle/packet/tricordrazine(src)
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/device/radio(src)
new /obj/item/attachable/bayonet(src)
new /obj/item/stack/medical/splint(src)
/obj/item/storage/pouch/survival/synth
name = "synth survival pouch"
desc = "An emergency pouch given to synthetics in the event of an emergency."
icon_state = "tools"
storage_slots = 6
max_w_class = SIZE_MEDIUM
can_hold = list(
/obj/item/device/flashlight,
/obj/item/tool/crowbar,
/obj/item/tool/weldingtool,
/obj/item/stack/cable_coil,
/obj/item/stack/sheet/metal,
/obj/item/device/radio,
/obj/item/attachable/bayonet,
)
/obj/item/storage/pouch/survival/synth/full/fill_preset_inventory()
new /obj/item/tool/crowbar/red(src)
new /obj/item/tool/weldingtool(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/stack/sheet/metal/large_stack(src)
new /obj/item/device/radio(src)
new /obj/item/attachable/bayonet(src)
/obj/item/storage/pouch/firstaid
name = "first-aid pouch"
desc = "A first aid pouch capable of storing a variety of basic medical supplies. It can hold ointments, bandages, injectors, and pill packets."
icon_state = "firstaid"
storage_slots = 4
can_hold = list(
/obj/item/stack/medical/ointment,
/obj/item/reagent_container/hypospray/autoinjector,
/obj/item/storage/pill_bottle/packet,
/obj/item/stack/medical/bruise_pack,
/obj/item/stack/medical/splint,
)
/obj/item/storage/pouch/firstaid/full
desc = "Contains a painkiller autoinjector, first-aid autoinjector, some ointment, and some bandages."
/obj/item/storage/pouch/firstaid/full/fill_preset_inventory()
new /obj/item/reagent_container/hypospray/autoinjector/bicaridine(src)
new /obj/item/reagent_container/hypospray/autoinjector/kelotane(src)
new /obj/item/reagent_container/hypospray/autoinjector/tramadol(src)
new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
/obj/item/storage/pouch/firstaid/full/alternate/fill_preset_inventory()
new /obj/item/reagent_container/hypospray/autoinjector/tricord(src)
new /obj/item/stack/medical/splint(src)
new /obj/item/stack/medical/ointment(src)
new /obj/item/stack/medical/bruise_pack(src)
/obj/item/storage/pouch/firstaid/full/pills/fill_preset_inventory()
new /obj/item/storage/pill_bottle/packet/bicaridine(src)
new /obj/item/storage/pill_bottle/packet/kelotane(src)
new /obj/item/storage/pill_bottle/packet/tramadol(src)
new /obj/item/storage/pill_bottle/packet/tramadol(src)
/obj/item/storage/pouch/firstaid/ert
desc = "It can contain autoinjectors, ointments, and bandages. This one has some extra stuff."
icon_state = "firstaid"
storage_slots = 5
/obj/item/storage/pouch/firstaid/ert/fill_preset_inventory()
new /obj/item/reagent_container/hypospray/autoinjector/bicaridine/skillless(src)
new /obj/item/reagent_container/hypospray/autoinjector/kelotane/skillless(src)
new /obj/item/reagent_container/hypospray/autoinjector/tramadol/skillless(src)
new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
new /obj/item/stack/medical/bruise_pack(src)
///Pistol pouch.
/obj/item/storage/pouch/pistol
name = "sidearm pouch"
desc = "You could carry a pistol in this; more importantly, you could draw it quickly. Useful for emergencies."
icon_state = "pistol"
use_sound = null
max_w_class = SIZE_MEDIUM
can_hold = list(/obj/item/weapon/gun/pistol, /obj/item/weapon/gun/revolver,/obj/item/weapon/gun/flare)
storage_flags = STORAGE_FLAGS_POUCH|STORAGE_USING_DRAWING_METHOD|STORAGE_ALLOW_QUICKDRAW
flap = FALSE
///Display code pulled from belt.dm gun belt. Can shave quite a lot off because this pouch can only hold one item at a time.
var/obj/item/weapon/gun/current_gun //The gun it holds, used for referencing later so we can update the icon.
var/image/gun_underlay //The underlay we will use.
var/sheatheSound = 'sound/weapons/gun_pistol_sheathe.ogg'
var/drawSound = 'sound/weapons/gun_pistol_draw.ogg'
var/icon_x = 0
var/icon_y = -3
/obj/item/storage/pouch/pistol/Destroy()
gun_underlay = null
current_gun = null
. = ..()
/obj/item/storage/pouch/pistol/on_stored_atom_del(atom/movable/AM)
if(AM == current_gun)
current_gun = null
update_gun_icon()
/obj/item/storage/pouch/pistol/can_be_inserted(obj/item/W, mob/user, stop_messages = FALSE) //A little more detailed than just 'the pouch is full'.
. = ..()
if(!.)
return
if(current_gun && isgun(W))
if(!stop_messages)
to_chat(usr, SPAN_WARNING("[src] already holds a gun."))
return FALSE
/obj/item/storage/pouch/pistol/_item_insertion(obj/item/I, prevent_warning = 0, mob/user)
if(isgun(I))
current_gun = I
update_gun_icon()
..()
/obj/item/storage/pouch/pistol/_item_removal(obj/item/I, atom/new_location)
if(I == current_gun)
current_gun = null
update_gun_icon()
..()
/obj/item/storage/pouch/pistol/proc/update_gun_icon()
if(current_gun)
playsound(src, drawSound, 15, TRUE)
gun_underlay = image('icons/obj/items/clothing/belts.dmi', current_gun.base_gun_icon)
gun_underlay.pixel_x = icon_x
gun_underlay.pixel_y = icon_y
gun_underlay.color = current_gun.color
underlays += gun_underlay
else
playsound(src, sheatheSound, 15, TRUE)
underlays -= gun_underlay
gun_underlay = null
/obj/item/storage/pouch/pistol/alt
icon_state = "pistol_alt"
///CO pouch. This pouch can hold only 1 of each type of item: 1 sidearm, 1 pair of binoculars, 1 CO tablet
/obj/item/storage/pouch/pistol/command
name = "command pouch"
desc = "A specialized, sturdy pouch issued to Commanding Officers. Can hold their sidearm, the command tablet and a set of binoculars."
storage_slots = 3
icon_state = "command_pouch"
can_hold = list(
/obj/item/weapon/gun/revolver,
/obj/item/weapon/gun/pistol,
/obj/item/device/binoculars,
/obj/item/device/cotablet,
)
var/obj/item/device/binoculars/binos
var/obj/item/device/cotablet/tablet
icon_x = -6
icon_y = 0
/obj/item/storage/pouch/pistol/command/Destroy()
binos = null
tablet = null
. = ..()
/obj/item/storage/pouch/pistol/command/on_stored_atom_del(atom/movable/AM)
..()
if(AM == binos)
binos = null
else if(AM == tablet)
tablet = null
/obj/item/storage/pouch/pistol/command/can_be_inserted(obj/item/I, mob/user, stop_messages = FALSE)
. = ..()
if(!.)
return
if(binos && istype(I, /obj/item/device/binoculars))
if(!stop_messages)
to_chat(usr, SPAN_WARNING("[src] already holds a pair of binoculars."))
return FALSE
else if(tablet && istype(I, /obj/item/device/cotablet))
if(!stop_messages)
to_chat(usr, SPAN_WARNING("[src] already holds a tablet."))
return FALSE
/obj/item/storage/pouch/pistol/command/_item_insertion(obj/item/I, prevent_warning = 0, mob/user)
if(istype(I, /obj/item/device/binoculars))
binos = I
else if(istype(I, /obj/item/device/cotablet))
tablet = I
..()
/obj/item/storage/pouch/pistol/command/_item_removal(obj/item/I, atom/new_location)
if(I == binos)
binos = null
else if(I == tablet)
tablet = null
..()
/obj/item/storage/pouch/pistol/command/update_icon()
overlays.Cut()
if(!length(contents))
return
if(content_watchers) //Opened flaps.
if(binos)
overlays += "+command_pouch_binos"
if(tablet)
overlays += "+command_pouch_tablet"
else
if(binos)
overlays += "+command_pouch_binos_flap"
if(tablet)
overlays += "+command_pouch_tablet_flap"
/obj/item/storage/pouch/pistol/command/attack_hand(mob/user, mods) //Mostly copied from gunbelt.
if(current_gun && ishuman(user) && loc == user)
if(mods && mods["alt"] && length(contents) > 1) //Withdraw the most recently inserted nongun item if possible.
var/obj/item/I = contents[length(contents)]
if(isgun(I))
I = contents[length(contents) - 1]
I.attack_hand(user)
else
current_gun.attack_hand(user)
return
..()
//// MAGAZINE POUCHES /////
/obj/item/storage/pouch/magazine
name = "magazine pouch"
desc = "It can carry magazines."
icon_state = "medium_ammo_mag"
max_w_class = SIZE_MEDIUM
storage_slots = 3
bypass_w_limit = list(
/obj/item/ammo_magazine/rifle,
/obj/item/ammo_magazine/smg/m39,
)
can_hold = list(
/obj/item/ammo_magazine/rifle,
/obj/item/ammo_magazine/smg,
/obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/revolver,
/obj/item/ammo_magazine/sniper,
/obj/item/ammo_magazine/m60,
/obj/item/ammo_magazine/handful,
)
/obj/item/storage/pouch/magazine/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/ammo_magazine/shotgun))
var/obj/item/ammo_magazine/shotgun/M = W
if(istype(src, /obj/item/storage/pouch/magazine/pistol))
return..()
else
dump_ammo_to(M,user, M.transfer_handful_amount)
else
return ..()
/obj/item/storage/pouch/magazine/large
name = "large magazine pouch"
desc = "It can carry many magazines."
icon_state = "large_ammo_mag"
storage_slots = 4
/obj/item/storage/pouch/magazine/pistol
name = "pistol magazine pouch"
desc = "It can carry pistol magazines and revolver speedloaders."
max_w_class = SIZE_SMALL
icon_state = "pistol_mag"
storage_slots = 4
can_hold = list(
/obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/pistol/heavy,
/obj/item/ammo_magazine/revolver,
)
/obj/item/storage/pouch/magazine/pistol/large
name = "large pistol magazine pouch"
desc = "It can carry many pistol magazines or revolver speedloaders."
storage_slots = 6
icon_state = "large_pistol_mag"
/obj/item/storage/pouch/magazine/pistol/large/mateba/fill_preset_inventory()
for(var/i in 1 to storage_slots)
new /obj/item/ammo_magazine/revolver/mateba(src)
/obj/item/storage/pouch/magazine/pistol/large/mateba/impact/fill_preset_inventory()
for(var/i in 1 to storage_slots)
new /obj/item/ammo_magazine/revolver/mateba/highimpact(src)
/obj/item/storage/pouch/magazine/pistol/large/vp78/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/pistol/vp78(src)
/obj/item/storage/pouch/magazine/pulse_rifle/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle(src)
/obj/item/storage/pouch/magazine/pistol/pmc_mateba/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/revolver/mateba/highimpact/ap(src)
/obj/item/storage/pouch/magazine/pistol/pmc_vp70/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/pistol/vp70(src)
/obj/item/storage/pouch/magazine/pistol/pmc_vp78/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/pistol/vp78(src)
/obj/item/storage/pouch/magazine/upp/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle/type71(src)
/obj/item/storage/pouch/magazine/large/upp/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle/type71(src)
/obj/item/storage/pouch/magazine/large/pmc_m39/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/smg/m39/ap(src)
/obj/item/storage/pouch/magazine/large/nsg_ap/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle/nsg23/ap(src)
/obj/item/storage/pouch/magazine/large/nsg_ext/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle/nsg23(src)
/obj/item/storage/pouch/magazine/large/nsg_heap/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle/nsg23/heap(src)
/obj/item/storage/pouch/magazine/large/pmc_p90/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/smg/fp9000(src)
/obj/item/storage/pouch/magazine/large/pmc_lmg/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/hpr_box(src)
/obj/item/storage/pouch/magazine/large/pmc_sniper/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/sniper/elite(src)
/obj/item/storage/pouch/magazine/large/pmc_rifle/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle/ap(src)
/obj/item/storage/pouch/magazine/large/pmc_sg/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/smartgun(src)
/obj/item/storage/pouch/magazine/large/wo_sg/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/smartgun/dirty(src)
/obj/item/storage/pouch/magazine/large/m16/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle/m16(src)
/obj/item/storage/pouch/magazine/large/m16/ap/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle/m16/ap(src)
/obj/item/storage/pouch/magazine/large/rifle_heap/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/rifle/heap(src)
/obj/item/storage/pouch/magazine/large/smg_heap/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/smg/m39/heap(src)
/obj/item/storage/pouch/magazine/large/m60/fill_preset_inventory()
for(var/i in 1 to storage_slots)
new /obj/item/ammo_magazine/m60(src)
/obj/item/storage/pouch/shotgun
name = "shotgun shell pouch"
desc = "It can contain handfuls of shells, or bullets if you choose to for some reason."
icon_state = "medium_shotshells"
max_w_class = SIZE_SMALL
storage_slots = 5
bypass_w_limit = list()
can_hold = list(
/obj/item/ammo_magazine/handful,
)
flap = FALSE
/obj/item/storage/pouch/shotgun/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/ammo_magazine/shotgun))
var/obj/item/ammo_magazine/shotgun/M = W
dump_ammo_to(M, user, M.transfer_handful_amount)
else
return ..()
/obj/item/storage/pouch/shotgun/heavybuck/fill_preset_inventory()
for(var/i in 1 to storage_slots)
new /obj/item/ammo_magazine/handful/shotgun/heavy/buckshot(src)
/obj/item/storage/pouch/shotgun/heavyslug/fill_preset_inventory()
for(var/i in 1 to storage_slots)
new /obj/item/ammo_magazine/handful/shotgun/heavy/slug(src)
/obj/item/storage/pouch/shotgun/heavyflechette/fill_preset_inventory()
for(var/i in 1 to storage_slots)
new /obj/item/ammo_magazine/handful/shotgun/heavy/flechette(src)
/obj/item/storage/pouch/shotgun/large
name = "large shotgun shell pouch"
desc = "It can contain more handfuls of shells, or bullets if you choose to for some reason."
icon_state = "large_shotshells"
storage_slots = 7
/obj/item/storage/pouch/shotgun/large/beanbag/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/handful/shotgun/beanbag(src)
/obj/item/storage/pouch/shotgun/large/beanbag/riot/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/handful/shotgun/beanbag/riot(src)
/obj/item/storage/pouch/shotgun/large/slug/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/handful/shotgun/slug(src)
/obj/item/storage/pouch/shotgun/large/buckshot/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/ammo_magazine/handful/shotgun/buckshot(src)
/obj/item/storage/pouch/explosive
name = "explosive pouch"
desc = "It can carry grenades, plastic explosives, mine boxes, and other explosives."
icon_state = "large_explosive"
storage_slots = 6
max_w_class = SIZE_MEDIUM
can_hold = list(
/obj/item/explosive/plastic,
/obj/item/explosive/mine,
/obj/item/explosive/grenade,
)
/obj/item/storage/pouch/explosive/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/storage/box/nade_box))
var/obj/item/storage/box/nade_box/M = W
dump_into(M,user)
else
return ..()
/obj/item/storage/pouch/explosive/full/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/explosive/grenade/high_explosive(src)
/obj/item/storage/pouch/explosive/upp/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/explosive/grenade/high_explosive/upp(src)
/obj/item/storage/pouch/explosive/C4/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/explosive/plastic(src)
/obj/item/storage/pouch/explosive/emp_dutch/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/explosive/grenade/empgrenade/dutch(src)
/obj/item/storage/pouch/medical
name = "medical pouch"
desc = "It can carry small medical supplies."
icon_state = "medical"
storage_slots = 4
can_hold = list(
/obj/item/device/healthanalyzer,
/obj/item/reagent_container/dropper,
/obj/item/reagent_container/pill,
/obj/item/reagent_container/glass/bottle,
/obj/item/reagent_container/syringe,
/obj/item/storage/pill_bottle,
/obj/item/stack/medical,
/obj/item/device/flashlight/pen,
/obj/item/reagent_container/hypospray,
/obj/item/tool/extinguisher/mini,
/obj/item/storage/syringe_case,
/obj/item/tool/surgery/surgical_line,
/obj/item/tool/surgery/synthgraft,
)
/obj/item/storage/pouch/medical/full/fill_preset_inventory()
new /obj/item/device/healthanalyzer(src)
new /obj/item/stack/medical/splint(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
/obj/item/storage/pouch/medical/full/pills/fill_preset_inventory()
new /obj/item/storage/pill_bottle/tramadol(src)
new /obj/item/storage/pill_bottle/bicaridine(src)
new /obj/item/storage/pill_bottle/kelotane(src)
new /obj/item/storage/pill_bottle/dexalin(src)
/obj/item/storage/pouch/medical/socmed
name = "tactical medical pouch"
desc = "A heavy pouch containing everything one needs to get themselves back on their feet. Quite the selection."
icon_state = "socmed"
storage_slots = 13
can_hold = list(
/obj/item/stack/medical,
/obj/item/storage/pill_bottle,
/obj/item/device/healthanalyzer,
/obj/item/reagent_container/hypospray,
/obj/item/tool/extinguisher/mini,
/obj/item/tool/surgery/surgical_line,
/obj/item/tool/surgery/synthgraft,
)
/obj/item/storage/pouch/medical/socmed/full/fill_preset_inventory()
new /obj/item/device/healthanalyzer(src)
new /obj/item/stack/medical/splint/nano(src)
new /obj/item/stack/medical/advanced/bruise_pack/upgraded(src)
new /obj/item/stack/medical/advanced/ointment/upgraded(src)
new /obj/item/reagent_container/hypospray/autoinjector/bicaridine(src)
new /obj/item/reagent_container/hypospray/autoinjector/kelotane(src)
new /obj/item/reagent_container/hypospray/autoinjector/oxycodone(src)
new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
new /obj/item/tool/extinguisher/mini(src)
new /obj/item/reagent_container/hypospray/autoinjector/stimulant/brain_stimulant(src)
new /obj/item/reagent_container/hypospray/autoinjector/stimulant/redemption_stimulant(src)
new /obj/item/reagent_container/hypospray/autoinjector/stimulant/speed_stimulant(src)
/obj/item/storage/pouch/medical/socmed/not_op/fill_preset_inventory()
new /obj/item/device/healthanalyzer(src)
new /obj/item/stack/medical/splint(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/reagent_container/hypospray/autoinjector/bicaridine(src)
new /obj/item/reagent_container/hypospray/autoinjector/kelotane(src)
new /obj/item/reagent_container/hypospray/autoinjector/oxycodone(src)
new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
new /obj/item/tool/extinguisher/mini(src)
/obj/item/storage/pouch/medical/socmed/dutch
name = "\improper Dutch's Medical Pouch"
desc = "A pouch bought from a black market trader by Dutch quite a few years ago. Rumoured to be stolen from secret USCM assets. Its contents have been slowly used up and replaced over the years."
/obj/item/storage/pouch/medical/socmed/dutch/fill_preset_inventory()
new /obj/item/device/healthanalyzer(src)
new /obj/item/stack/medical/splint(src)
new /obj/item/stack/medical/splint(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/storage/pill_bottle/bicaridine(src)
new /obj/item/storage/pill_bottle/kelotane(src)
new /obj/item/reagent_container/hypospray/autoinjector/oxycodone(src)
new /obj/item/reagent_container/hypospray/autoinjector/oxycodone(src)
new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
new /obj/item/tool/extinguisher/mini(src)
/obj/item/storage/pouch/medical/socmed/dutch/unmarked
name = "tactical medical pouch"
desc = "A heavy pouch containing everything one needs to get themselves back on their feet. Quite the selection. Somehow, the whole pouch manages to look classified, you feel like you're going to get court-marshalled for even looking at it."
/obj/item/storage/pouch/first_responder
name = "first responder pouch"
desc = "A pouch designed for carrying supplies to assist medical personnel and quickly respond to injuries on the battlefield without immediately treating them. Can hold supplies such as roller beds, stasis bags, and health analysers."
icon_state = "frt_med"
storage_slots = 4
can_hold = list(
/obj/item/device/healthanalyzer,
/obj/item/reagent_container/pill,
/obj/item/reagent_container/syringe,
/obj/item/storage/pill_bottle,
/obj/item/stack/medical,
/obj/item/reagent_container/hypospray,
/obj/item/tool/extinguisher/mini,
/obj/item/roller,
/obj/item/bodybag,
)
/obj/item/storage/pouch/first_responder/full/fill_preset_inventory()
new /obj/item/device/healthanalyzer(src)
new /obj/item/roller(src)
new /obj/item/tool/extinguisher/mini(src)
new /obj/item/bodybag/cryobag(src)
/obj/item/storage/pouch/vials
name = "vial pouch"
desc = "A pouch for carrying glass vials."
icon_state = "vial"
storage_slots = 6
can_hold = list(/obj/item/reagent_container/glass/beaker/vial)
/obj/item/storage/pouch/vials/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/storage/fancy/vials))
var/obj/item/storage/fancy/vials/M = W
dump_into(M,user)
else
return ..()
/obj/item/storage/pouch/vials/full/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/reagent_container/glass/beaker/vial(src)
/obj/item/storage/pouch/chem
name = "chemist pouch"
desc = "A pouch for carrying glass beakers."
icon_state = "chemist"
storage_slots = 2
can_hold = list(
/obj/item/reagent_container/glass/beaker,
/obj/item/reagent_container/glass/bottle,
)
/obj/item/storage/pouch/chem/fill_preset_inventory()
new /obj/item/reagent_container/glass/beaker/large(src)
new /obj/item/reagent_container/glass/beaker(src)
/obj/item/storage/pouch/autoinjector
name = "auto-injector pouch"
desc = "A pouch specifically for auto-injectors."
icon_state = "injectors"
storage_slots = 7
can_hold = list(/obj/item/reagent_container/hypospray/autoinjector)
/obj/item/storage/pouch/autoinjector/full/fill_preset_inventory()
new /obj/item/reagent_container/hypospray/autoinjector/bicaridine(src)
new /obj/item/reagent_container/hypospray/autoinjector/bicaridine(src)
new /obj/item/reagent_container/hypospray/autoinjector/kelotane(src)
new /obj/item/reagent_container/hypospray/autoinjector/kelotane(src)
new /obj/item/reagent_container/hypospray/autoinjector/tramadol(src)
new /obj/item/reagent_container/hypospray/autoinjector/tramadol(src)
new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
/obj/item/storage/pouch/syringe
name = "syringe pouch"
desc = "It can carry syringes."
icon_state = "syringe"
storage_slots = 6
can_hold = list(/obj/item/reagent_container/syringe)
/obj/item/storage/pouch/syringe/full/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/reagent_container/syringe(src)
/obj/item/storage/pouch/engikit
name = "engineer kit pouch"
storage_flags = STORAGE_FLAGS_POUCH
icon_state = "construction"
desc = "It's specifically made to hold engineering items. Requires engineering skills to use effectively."
storage_slots = 6
can_hold_skill = list(
/obj/item/circuitboard = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/device/flashlight = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/clothing/glasses/welding = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/device/analyzer = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/device/demo_scanner = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/device/reagent_scanner = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/device/t_scanner = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/stack/cable_coil = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/cell = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/device/assembly = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/stock_parts = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
/obj/item/explosive/plastic = list(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED),
)
can_hold_skill_only = TRUE
/obj/item/storage/pouch/engikit/full/fill_preset_inventory()
new /obj/item/explosive/plastic(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/cell/high(src)
new /obj/item/cell/high(src)
new /obj/item/circuitboard/apc(src)
new /obj/item/circuitboard/apc(src)
/obj/item/storage/pouch/medkit
name = "medical kit pouch"
storage_flags = STORAGE_FLAGS_POUCH
icon_state = "medkit"
desc = "It's specifically made to hold medical items. Requires medical skills to use effectively."
storage_slots = 7
can_hold_skill = list(
/obj/item/device/healthanalyzer = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/reagent_container/dropper = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/reagent_container/pill = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/reagent_container/glass/bottle = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/reagent_container/syringe = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/storage/pill_bottle = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/stack/medical = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/reagent_container/hypospray = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/storage/syringe_case = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/storage/surgical_case = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/tool/surgery/surgical_line = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/tool/surgery/synthgraft = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/roller = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/bodybag = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/reagent_container/blood = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
/obj/item/tool/surgery/FixOVein = list(SKILL_MEDICAL, SKILL_MEDICAL_MEDIC),
)
can_hold_skill_only = TRUE
/obj/item/storage/pouch/medkit/full/fill_preset_inventory()
new /obj/item/device/healthanalyzer(src)
new /obj/item/reagent_container/hypospray/autoinjector/skillless(src)
new /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol(src)
new /obj/item/reagent_container/hypospray/autoinjector/inaprovaline(src)
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/ointment(src)
new /obj/item/stack/medical/splint(src)
/obj/item/storage/pouch/medkit/full_advanced/fill_preset_inventory()
new /obj/item/reagent_container/hypospray/autoinjector/tricord(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/splint(src)
/obj/item/storage/pouch/medkit/full/toxin/fill_preset_inventory()
new /obj/item/device/healthanalyzer(src)
new /obj/item/storage/pill_bottle/antitox(src)
new /obj/item/storage/pill_bottle/antitox(src)
new /obj/item/roller(src)
new /obj/item/stack/medical/splint(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/ointment(src)
/obj/item/storage/pouch/medkit/full/army/fill_preset_inventory()
new /obj/item/device/healthanalyzer(src)
new /obj/item/roller(src)
new /obj/item/tool/surgery/synthgraft(src)
new /obj/item/tool/surgery/surgical_line(src)
new /obj/item/bodybag/cryobag(src)
new /obj/item/storage/pill_bottle/imialk(src)
new /obj/item/reagent_container/blood/OMinus(src)
/obj/item/storage/pouch/pressurized_reagent_canister
name = "Pressurized Reagent Canister Pouch"
max_w_class = SIZE_SMALL
storage_flags = STORAGE_FLAGS_POUCH|STORAGE_USING_DRAWING_METHOD
icon_state = "pressurized_reagent_canister"
desc = "A pressurized reagent canister pouch. It is used to refill custom injectors, and can also store one. May be refilled with a reagent tank or a Chemical Dispenser."
can_hold = list(/obj/item/reagent_container/hypospray/autoinjector/empty)
var/obj/item/reagent_container/glass/pressurized_canister/inner
matter = list("plastic" = 2000, "glass" = 2000)
flags_item = NOBLUDGEON
/obj/item/storage/pouch/pressurized_reagent_canister/Initialize()
. = ..()
inner = new /obj/item/reagent_container/glass/pressurized_canister()
//Only add an autoinjector if the canister is empty
//Important for the snowflake /obj/item/storage/pouch/pressurized_reagent_canister/oxycodone
if(length(contents) == 0)
new /obj/item/reagent_container/hypospray/autoinjector/empty/medic(src)
update_icon()
/obj/item/storage/pouch/pressurized_reagent_canister/proc/fill_with(ragent)
inner.reagents.add_reagent(ragent, inner.volume)
if(length(contents) > 0)
var/obj/item/reagent_container/hypospray/autoinjector/empty/A = contents[1]
A.reagents.add_reagent(ragent, A.volume)
A.update_uses_left()
A.update_icon()
update_icon()
/obj/item/storage/pouch/pressurized_reagent_canister/bicaridine/Initialize()
. = ..()
fill_with("bicaridine")
/obj/item/storage/pouch/pressurized_reagent_canister/kelotane/Initialize()
. = ..()
fill_with("kelotane")
/obj/item/storage/pouch/pressurized_reagent_canister/oxycodone/Initialize()
new /obj/item/reagent_container/hypospray/autoinjector/empty/skillless/small/(src)
. = ..()
fill_with("oxycodone")
/obj/item/storage/pouch/pressurized_reagent_canister/revival_tricord/Initialize()
. = ..()
//we don't call fill_with because of the complex mix of chemicals we have
inner.reagents.add_reagent("adrenaline", inner.volume/3)
inner.reagents.add_reagent("inaprovaline", inner.volume/3)
inner.reagents.add_reagent("tricordrazine", inner.volume/3)
if(length(contents) > 0)
var/obj/item/reagent_container/hypospray/autoinjector/empty/medic/A = contents[1]
A.reagents.add_reagent("adrenaline", A.volume/3)
A.reagents.add_reagent("inaprovaline", A.volume/3)
A.reagents.add_reagent("tricordrazine", A.volume/3)
A.update_uses_left()
A.update_icon()
update_icon()
/obj/item/storage/pouch/pressurized_reagent_canister/revival_peri/Initialize()
. = ..()
//we don't call fill_with because of the complex mix of chemicals we have
inner.reagents.add_reagent("adrenaline", inner.volume/3)
inner.reagents.add_reagent("inaprovaline", inner.volume/3)
inner.reagents.add_reagent("peridaxon", inner.volume/3)
if(length(contents) > 0)
var/obj/item/reagent_container/hypospray/autoinjector/empty/medic/A = contents[1]
A.reagents.add_reagent("adrenaline", A.volume/3)
A.reagents.add_reagent("inaprovaline", A.volume/3)
A.reagents.add_reagent("peridaxon", A.volume/3)
A.update_uses_left()
A.update_icon()
update_icon()
/obj/item/storage/pouch/pressurized_reagent_canister/tricordrazine/Initialize()
. = ..()
fill_with("tricordrazine")
/obj/item/storage/pouch/pressurized_reagent_canister/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/reagent_container/glass/pressurized_canister))
if(inner)
to_chat(user, SPAN_WARNING("There already is a container inside [src]!"))
else
user.drop_inv_item_to_loc(W, src)
inner = W
contents -= W
to_chat(user, SPAN_NOTICE("You insert [W] into [src]!"))
update_icon()
return
if(istype(W, /obj/item/reagent_container/hypospray/autoinjector/empty))
var/obj/item/reagent_container/hypospray/autoinjector/A = W