-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathmecha_ammo.dm
114 lines (100 loc) · 3.51 KB
/
mecha_ammo.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
/obj/item/mecha_ammo
name = "generic ammo box"
desc = "A box of ammo for an unknown weapon."
w_class = WEIGHT_CLASS_BULKY
icon = 'icons/mecha/mecha_ammo.dmi'
icon_state = "empty"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
/// Amount of rounds in this box
var/rounds = 0
/// How the bullets are described to the user "There are 5 missiles left"
var/round_term = "round"
/// For weapons where we re-load the weapon itself rather than adding to the ammo storage.
var/direct_load
/// Sound when reloaded
var/load_audio = "sound/weapons/gun_magazine_insert_empty_1.ogg"
/// Type of ammo. used to make sure the ammo type is compatable with the weapon itself
var/ammo_type
/obj/item/mecha_ammo/update_name(updates=ALL)
. = ..()
if(!rounds)
name = "empty ammo box"
desc = "An exosuit ammuniton box that has since been emptied. Please recycle."
icon_state = "empty"
/obj/item/mecha_ammo/attack_self(mob/user)
..()
if(rounds)
to_chat(user, span_warning("You cannot flatten the ammo box until it's empty!"))
return
to_chat(user, span_notice("You fold [src] flat."))
var/I = new /obj/item/stack/sheet/metal(user.loc)
qdel(src)
user.put_in_hands(I)
/obj/item/mecha_ammo/examine(mob/user)
. = ..()
if(rounds)
. += "There [rounds > 1?"are":"is"] [rounds] [round_term][rounds > 1?"s":""] left."
/obj/item/mecha_ammo/incendiary
name = "incendiary ammo"
desc = "A box of incendiary ammunition for use with exosuit weapons."
icon_state = "incendiary"
rounds = 24
ammo_type = "incendiary"
/obj/item/mecha_ammo/scattershot
name = "scattershot ammo"
desc = "A box of scaled-up buckshot, for use in exosuit shotguns."
icon_state = "scattershot"
rounds = 40
ammo_type = "scattershot"
/obj/item/mecha_ammo/lmg
name = "machine gun ammo"
desc = "A box of linked ammunition, designed for the Ultra AC 2 exosuit weapon."
icon_state = "lmg"
rounds = 300
ammo_type = "lmg"
/obj/item/mecha_ammo/bfg
name = "energy packs"
desc = "A box of energy packs, designed to power the BFG-90 Radioactive Cannon."
icon_state = "bfg"
rounds = 5
ammo_type = "bfg"
/obj/item/mecha_ammo/venom
name = "venom ammo"
desc = "A box of venom ammunition for use with the Syndicate LIGMA Snakebite Carbine. No, they don't fit in your C-20r, stop trying."
icon_state = "venom"
rounds = 24
ammo_type = "venom"
/obj/item/mecha_ammo/missiles_br
name = "breaching missiles"
desc = "A box of large missiles, ready for loading into a BRM-6 exosuit missile rack."
icon_state = "missile_br"
rounds = 6
round_term = "missile"
direct_load = TRUE
load_audio = "sound/weapons/bulletinsert.ogg"
ammo_type = "missiles_br"
/obj/item/mecha_ammo/missiles_he
name = "anti-armor missiles"
desc = "A box of large missiles, ready for loading into an SRM-8 exosuit missile rack."
icon_state = "missile_he"
rounds = 8
round_term = "missile"
direct_load = TRUE
load_audio = "sound/weapons/bulletinsert.ogg"
ammo_type = "missiles_he"
/obj/item/mecha_ammo/flashbang
name = "launchable flashbangs"
desc = "A box of smooth flashbangs, for use with a large exosuit launcher. Cannot be primed by hand."
icon_state = "flashbang"
rounds = 6
round_term = "grenade"
ammo_type = "flashbang"
/obj/item/mecha_ammo/clusterbang
name = "launchable flashbang clusters"
desc = "A box of clustered flashbangs, for use with a specialized exosuit cluster launcher. Cannot be primed by hand."
icon_state = "clusterbang"
rounds = 3
round_term = "cluster"
direct_load = TRUE
ammo_type = "clusterbang"