/
armor.dm
310 lines (274 loc) · 11.8 KB
/
armor.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
/obj/item/clothing/suit/armor
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
body_parts_covered = UPPER_TORSO|LOWER_TORSO
flags = THICKMATERIAL
cold_protection = UPPER_TORSO|LOWER_TORSO
min_cold_protection_temperature = ARMOR_MIN_COLD_PROTECTION_TEMPERATURE
heat_protection = UPPER_TORSO|LOWER_TORSO
max_heat_protection_temperature = ARMOR_MAX_HEAT_PROTECTION_TEMPERATURE
siemens_coefficient = 0.4
/obj/item/clothing/suit/armor/vest
name = "armor"
desc = "An armored vest that protects against some damage."
icon_state = "armor"
item_state = "armor"
blood_overlay_type = "armor"
flags = THICKMATERIAL
armor = list(melee = 50, bullet = 45, laser = 40, energy = 25, bomb = 35, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/vest/security
name = "security armor"
desc = "An armored vest that protects against some damage. This one has NanoTrasen corporate badge."
icon_state = "armorsec"
item_state = "armor"
/obj/item/clothing/suit/storage/flak
name = "security armor"
desc = "An armored vest that protects against some damage. This one has four pockets for storage."
icon_state = "armorsec"
item_state = "armor"
blood_overlay_type = "armor"
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
body_parts_covered = UPPER_TORSO|LOWER_TORSO
flags = THICKMATERIAL
cold_protection = UPPER_TORSO|LOWER_TORSO
min_cold_protection_temperature = ARMOR_MIN_COLD_PROTECTION_TEMPERATURE
heat_protection = UPPER_TORSO|LOWER_TORSO
max_heat_protection_temperature = ARMOR_MAX_HEAT_PROTECTION_TEMPERATURE
siemens_coefficient = 0.4
armor = list(melee = 50, bullet = 45, laser = 40, energy = 25, bomb = 35, bio = 0, rad = 0)
/obj/item/clothing/suit/storage/flak/atom_init()
. = ..()
pockets = new/obj/item/weapon/storage/internal(src)
pockets.set_slots(slots = 4, slot_size = ITEM_SIZE_SMALL)
/obj/item/clothing/suit/storage/flak/marinad
name = "marine armor"
desc = "This thing will protect you from any angry flora or fauna."
icon_state = "marinad"
item_state = "marinad_armor"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
slowdown = 1
armor = list(melee = 60, bullet = 65, laser = 55, energy = 60, bomb = 40, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/vest/warden
name = "Warden's jacket"
desc = "An armoured jacket with gold rank pips and livery."
icon_state = "warden_jacket"
item_state = "armor"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
/obj/item/clothing/suit/storage/flak/warden
name = "Warden's jacket"
desc = "An armoured jacket with gold rank pips and livery."
icon_state = "warden_jacket"
item_state = "armor"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
/obj/item/clothing/suit/armor/vest/leather
name = "security overcoat"
desc = "Lightly armored leather overcoat meant as casual wear for high-ranking officers. Bears the crest of Nanotrasen Security."
icon_state = "leather_overcoat-sec"
item_state = "hostrench"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS
cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
/obj/item/clothing/suit/armor/hos
name = "armored coat"
desc = "A greatcoat enhanced with a special alloy for some protection and style."
icon_state = "hos"
item_state = "hos"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS
armor = list(melee = 80, bullet = 60, laser = 55, energy = 35, bomb = 50, bio = 0, rad = 0)
flags_inv = HIDEJUMPSUIT
siemens_coefficient = 0.6
/obj/item/clothing/suit/armor/riot
name = "riot suit"
desc = "A suit of armor with heavy padding to protect against melee attacks. Looks like it might impair movement."
icon_state = "riot"
item_state = "swat_suit"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
slowdown = 1
armor = list(melee = 70, bullet = 10, laser = 5, energy = 10, bomb = 0, bio = 0, rad = 0)
flags_inv = HIDEJUMPSUIT
/obj/item/clothing/suit/armor/bulletproof
name = "bulletproof Vest"
desc = "A vest that excels in protecting the wearer against high-velocity solid projectiles."
icon_state = "bulletproof"
item_state = "armor"
blood_overlay_type = "armor"
armor = list(melee = 10, bullet = 80, laser = 25, energy = 20, bomb = 35, bio = 0, rad = 0)
/obj/item/clothing/suit/storage/flak/bulletproof
name = "bulletproof Vest"
desc = "A vest that excels in protecting the wearer against high-velocity solid projectiles."
icon_state = "bulletproof"
item_state = "armor"
blood_overlay_type = "armor"
armor = list(melee = 10, bullet = 80, laser = 25, energy = 20, bomb = 35, bio = 0, rad = 0)
/obj/item/clothing/suit/storage/flak/bulletproof/atom_init()
. = ..()
pockets = new/obj/item/weapon/storage/internal(src)
pockets.set_slots(slots = 5, slot_size = ITEM_SIZE_SMALL)
/obj/item/clothing/suit/armor/laserproof
name = "ablative armor vest"
desc = "A vest that excels in protecting the wearer against energy projectiles."
icon_state = "armor_reflec"
item_state = "armor_reflec"
blood_overlay_type = "armor"
armor = list(melee = 10, bullet = 10, laser = 65, energy = 75, bomb = 0, bio = 0, rad = 0)
siemens_coefficient = 0
var/hit_reflect_chance = 40
/obj/item/clothing/suit/armor/laserproof/IsReflect(def_zone)
if(!(def_zone in list(BP_CHEST , BP_GROIN))) //If not shot where ablative is covering you, you don't get the reflection bonus!
return 0
if (prob(hit_reflect_chance))
return 1
/obj/item/clothing/suit/armor/swat
name = "swat suit"
desc = "A heavily armored suit that protects against moderate damage. Used in special operations."
icon_state = "deathsquad"
item_state = "swat_suit"
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
flags = THICKMATERIAL
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
slowdown = 1
armor = list(melee = 80, bullet = 70, laser = 70,energy = 70, bomb = 70, bio = 0, rad = 0)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
flags_pressure = STOPS_LOWPRESSUREDMAGE
/obj/item/clothing/suit/armor/swat/officer
name = "officer jacket"
desc = "An armored jacket used in special operations."
icon_state = "detective_brown"
item_state = "det_suit"
blood_overlay_type = "coat"
flags_inv = 0
body_parts_covered = UPPER_TORSO|ARMS
/obj/item/clothing/suit/armor/det_suit
name = "armor"
desc = "An armored vest with a detective's badge on it."
icon_state = "detective-armor"
item_state = "armor"
blood_overlay_type = "armor"
flags = ONESIZEFITSALL
body_parts_covered = UPPER_TORSO|LOWER_TORSO
armor = list(melee = 50, bullet = 55, laser = 25, energy = 20, bomb = 35, bio = 0, rad = 0)
//Reactive armor
//When the wearer gets hit, this armor will teleport the user a short distance away (to safety or to more danger, no one knows. That's the fun of it!)
/obj/item/clothing/suit/armor/reactive
name = "reactive teleport armor"
desc = "Someone seperated our Research Director from his own head!"
var/active = 0.0
icon_state = "reactiveoff"
item_state = "reactiveoff"
blood_overlay_type = "armor"
slowdown = 1
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/reactive/Get_shield_chance()
if(active)
return 35
return 0
/obj/item/clothing/suit/armor/reactive/attack_self(mob/user)
src.active = !( src.active )
if (src.active)
to_chat(user, "\blue The reactive armor is now active.")
src.icon_state = "reactive"
src.item_state = "reactive"
else
to_chat(user, "\blue The reactive armor is now inactive.")
src.icon_state = "reactiveoff"
src.item_state = "reactiveoff"
src.add_fingerprint(user)
return
/obj/item/clothing/suit/armor/reactive/emp_act(severity)
active = 0
src.icon_state = "reactiveoff"
src.item_state = "reactiveoff"
..()
//All of the armor below is mostly unused
/obj/item/clothing/suit/armor/centcomm
name = "Cent. Com. armor"
desc = "A suit that protects against some damage."
icon_state = "centcom"
item_state = "centcom"
w_class = ITEM_SIZE_LARGE//bulky item
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0
/obj/item/clothing/suit/armor/heavy
name = "heavy armor"
desc = "A heavily armored suit that protects against moderate damage."
icon_state = "heavy"
item_state = "swat_suit"
w_class = ITEM_SIZE_LARGE//bulky item
gas_transfer_coefficient = 0.90
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
slowdown = 3
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
siemens_coefficient = 0
/obj/item/clothing/suit/armor/tdome
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/armor/tdome/red
name = "thunderdome suit (red)"
desc = "Reddish armor."
icon_state = "tdred"
item_state = "tdred"
siemens_coefficient = 1
/obj/item/clothing/suit/armor/tdome/green
name = "thunderdome suit (green)"
desc = "Pukish armor."
icon_state = "tdgreen"
item_state = "tdgreen"
siemens_coefficient = 1
/obj/item/clothing/suit/armor/tactical
name = "tactical armor"
desc = "A suit of armor most often used by Special Weapons and Tactics squads. Includes padded vest with pockets along with shoulder and kneeguards."
icon_state = "swatarmor"
item_state = "armor"
var/obj/item/weapon/gun/holstered = null
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
slowdown = 1
armor = list(melee = 60, bullet = 65, laser = 50, energy = 60, bomb = 40, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/tactical/verb/holster()
set name = "Holster"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(!holstered)
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
to_chat(usr, "\blue You need your gun equiped to holster it.")
return
var/obj/item/weapon/gun/W = usr.get_active_hand()
if (!W.isHandgun())
to_chat(usr, "\red This gun won't fit in \the belt!")
return
holstered = usr.get_active_hand()
usr.drop_item()
holstered.loc = src
usr.visible_message("\blue \The [usr] holsters \the [holstered].", "You holster \the [holstered].")
else
if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj))
to_chat(usr, "\red You need an empty hand to draw the gun!")
else
if(usr.a_intent == "hurt")
usr.visible_message("\red \The [usr] draws \the [holstered], ready to shoot!", \
"\red You draw \the [holstered], ready to shoot!")
else
usr.visible_message("\blue \The [usr] draws \the [holstered], pointing it at the ground.", \
"\blue You draw \the [holstered], pointing it at the ground.")
usr.put_in_hands(holstered)
holstered = null
/obj/item/clothing/suit/armor/syndiassault
name = "assault armor"
icon_state = "assaultarmor"
item_state = "assaultarmor"
flags = THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
slowdown = 0.5
armor = list(melee = 50, bullet = 60, laser = 40, energy = 70, bomb = 50, bio = 0, rad = 50)
siemens_coefficient = 0.2
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE