-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathmisc_special.dm
405 lines (349 loc) · 12.9 KB
/
misc_special.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
/*
* Contents:
* Welding mask
* Cakehat
* Ushanka
* Pumpkin head
* Kitty ears
* Cardborg disguise
* Wig
* Bronze hat
*/
/*
* Welding mask
*/
/obj/item/clothing/head/welding
name = "welding helmet"
desc = "A head-mounted face cover designed to protect the wearer completely from space-arc eye."
icon_state = "welding"
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
item_state = "welding"
materials = list(/datum/material/iron=1750, /datum/material/glass=400)
flash_protect = 2
tint = 2
armor = list(MELEE = 10, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 60)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
actions_types = list(/datum/action/item_action/toggle)
visor_flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
resistance_flags = FIRE_PROOF
hattable = FALSE
/obj/item/clothing/head/welding/attack_self(mob/user)
weldingvisortoggle(user)
/*
* Cakehat
*/
/obj/item/clothing/head/hardhat/cakehat
name = "cakehat"
desc = "You put the cake on your head. Brilliant."
icon_state = "hardhat0_cakehat"
item_state = "hardhat0_cakehat"
hat_type = "cakehat"
hitsound = 'sound/weapons/tap.ogg'
flags_inv = HIDEEARS|HIDEHAIR
armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
light_range = 2 //luminosity when on
flags_cover = HEADCOVERSEYES
heat = 999
/obj/item/clothing/head/hardhat/cakehat/process()
var/turf/location = src.loc
if(ishuman(location))
var/mob/living/carbon/human/M = location
if(M.is_holding(src) || M.head == src)
location = M.loc
if(isturf(location))
location.hotspot_expose(700, 1)
/obj/item/clothing/head/hardhat/cakehat/turn_on()
..()
force = 5
throwforce = 5
damtype = BURN
hitsound = 'sound/weapons/sear.ogg'
START_PROCESSING(SSobj, src)
/obj/item/clothing/head/hardhat/cakehat/turn_off()
..()
force = 0
throwforce = 0
damtype = BRUTE
hitsound = 'sound/weapons/tap.ogg'
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/head/hardhat/cakehat/is_hot()
return on * heat
/*
* Ushanka
*/
/obj/item/clothing/head/ushanka
name = "ushanka"
desc = "Perfect for winter in Siberia, da?"
icon_state = "ushankadown"
item_state = "ushankadown"
flags_inv = HIDEEARS|HIDEHAIR
var/earflaps = 1
cold_protection = HEAD
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
dog_fashion = /datum/dog_fashion/head/ushanka
/obj/item/clothing/head/ushanka/attack_self(mob/user)
if(earflaps)
src.icon_state = "ushankaup"
src.item_state = "ushankaup"
earflaps = 0
to_chat(user, span_notice("You raise the ear flaps on the ushanka."))
else
src.icon_state = "ushankadown"
src.item_state = "ushankadown"
earflaps = 1
to_chat(user, span_notice("You lower the ear flaps on the ushanka."))
/*
* Pumpkin head
*/
/obj/item/clothing/head/hardhat/pumpkinhead
name = "carved pumpkin"
desc = "A jack o' lantern! Believed to ward off evil spirits."
icon_state = "hardhat0_pumpkin"
item_state = "hardhat0_pumpkin"
hat_type = "pumpkin"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
light_range = 2 //luminosity when on
flags_cover = HEADCOVERSEYES
hattable = FALSE
/*
* Kitty ears
*/
/obj/item/clothing/head/kitty
name = "kitty ears"
desc = "A pair of kitty ears. Meow!"
icon_state = "kitty"
color = "#999999"
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/kitty
/obj/item/clothing/head/kitty/equipped(mob/living/carbon/human/user, slot)
if(ishuman(user) && slot == ITEM_SLOT_HEAD)
update_appearance(UPDATE_ICON)
user.update_inv_head() //Color might have been changed by update_icon.
var/datum/language_holder/LH = user.get_language_holder()
if(!LH.has_language(/datum/language/felinid) || !LH.can_speak_language(/datum/language/felinid))
to_chat(user, "Your mind is filled with the knowledge of huntspeak... Well thats what felinids want you to believe anyway.")
LH.grant_language(/datum/language/felinid,TRUE,TRUE,LANGUAGE_CATEARS)
..()
/obj/item/clothing/head/kitty/dropped(mob/user)
..()
var/datum/language_holder/LH = user.get_language_holder()
if(LH.has_language(/datum/language/felinid) || LH.can_speak_language(/datum/language/felinid)) //sanity
to_chat(user, "You lose the keenness in your ears.")
LH.remove_language(/datum/language/felinid,TRUE,TRUE,LANGUAGE_CATEARS)
/obj/item/clothing/head/kitty/update_icon(updates=ALL)
. = ..()
if(!ishuman(loc))
return
var/mob/living/carbon/human/loc_human = loc
add_atom_colour(loc_human.hair_color, FIXED_COLOUR_PRIORITY)
/obj/item/clothing/head/kitty/genuine
desc = "A pair of kitty ears. A tag on the inside says \"Hand made from real cats.\""
/obj/item/clothing/head/hardhat/reindeer
name = "novelty reindeer hat"
desc = "Some fake antlers and a very fake red nose."
icon_state = "hardhat0_reindeer"
item_state = "hardhat0_reindeer"
hat_type = "reindeer"
flags_inv = 0
armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
light_range = 1 //luminosity when on
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/reindeer
/obj/item/clothing/head/cardborg
name = "cardborg helmet"
desc = "A helmet made out of a box."
icon_state = "cardborg_h"
item_state = "cardborg_h"
flags_cover = HEADCOVERSEYES
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
dog_fashion = /datum/dog_fashion/head/cardborg
/obj/item/clothing/head/cardborg/equipped(mob/living/user, slot)
..()
if(ishuman(user) && slot == ITEM_SLOT_HEAD)
var/mob/living/carbon/human/H = user
if(istype(H.wear_suit, /obj/item/clothing/suit/cardborg))
var/obj/item/clothing/suit/cardborg/CB = H.wear_suit
CB.disguise(user, src)
/obj/item/clothing/head/cardborg/dropped(mob/living/user)
..()
user.remove_alt_appearance("standard_borg_disguise")
/obj/item/clothing/head/wig
name = "wig"
desc = "A bunch of hair without a head attached."
icon_state = "pwig"
item_state = "pwig"
flags_inv = HIDEHAIR
var/hair_style = "Very Long Hair"
var/hair_color = "#000"
var/adjustablecolor = TRUE //can color be changed manually?
/obj/item/clothing/head/wig/Initialize(mapload)
. = ..()
update_appearance(UPDATE_ICON)
/obj/item/clothing/head/wig/update_icon_state()
. = ..()
icon_state = ""
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
if(S)
return
icon_state = "pwig"
/obj/item/clothing/head/wig/update_overlays()
. = ..()
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
if(!S)
return
var/mutable_appearance/M = mutable_appearance(S.icon,S.icon_state)
M.appearance_flags |= RESET_COLOR
M.color = hair_color
. += M
/obj/item/clothing/head/wig/worn_overlays(mutable_appearance/standing, isinhands = FALSE, icon_file)
. = ..()
if(isinhands)
return
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
if(!S)
return
var/mutable_appearance/M = mutable_appearance(S.icon, S.icon_state,layer = -HAIR_LAYER)
M.appearance_flags |= RESET_COLOR
M.color = hair_color
. += M
/obj/item/clothing/head/wig/attack_self(mob/user)
var/new_style = input(user, "Select a hair style", "Wig Styling") as null|anything in (GLOB.hair_styles_list - "Bald")
if(!user.canUseTopic(src, BE_CLOSE))
return
if(new_style && new_style != hair_style)
hair_style = new_style
user.visible_message(span_notice("[user] changes \the [src]'s hairstyle to [new_style]."), span_notice("You change \the [src]'s hairstyle to [new_style]."))
if(adjustablecolor)
hair_color = input(usr,"","Choose Color",hair_color) as color|null
update_appearance(UPDATE_ICON)
/obj/item/clothing/head/wig/random/Initialize(mapload)
hair_style = pick(GLOB.hair_styles_list - "Bald") //Don't want invisible wig
hair_color = "#[random_short_color()]"
. = ..()
/obj/item/clothing/head/wig/natural
name = "natural wig"
desc = "A bunch of hair without a head attached. This one changes color to match the hair of the wearer. Nothing natural about that."
hair_color = "#FFF"
adjustablecolor = FALSE
custom_price = 25
/obj/item/clothing/head/wig/natural/Initialize(mapload)
hair_style = pick(GLOB.hair_styles_list - "Bald")
. = ..()
/obj/item/clothing/head/wig/natural/equipped(mob/living/carbon/human/user, slot)
. = ..()
if(ishuman(user) && slot == ITEM_SLOT_HEAD)
hair_color = user.hair_color
update_appearance(UPDATE_ICON)
user.update_inv_head()
/obj/item/clothing/head/bronze
name = "bronze hat"
desc = "A crude helmet made out of bronze plates. It offers very little in the way of protection."
icon = 'icons/obj/clothing/clockwork_garb.dmi'
icon_state = "clockwork_helmet_old"
flags_inv = HIDEEARS|HIDEHAIR
armor = list(MELEE = 5, BULLET = 0, LASER = -5, ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 20, ACID = 20)
/obj/item/clothing/head/foilhat
name = "tinfoil hat"
desc = "Thought control rays, psychotronic scanning. Don't mind that, I'm protected cause I made this hat."
icon_state = "foilhat"
item_state = "foilhat"
armor = list(MELEE = 0, BULLET = 0, LASER = -5,ENERGY = 0, BOMB = 0, BIO = 0, RAD = -5, FIRE = 0, ACID = 0)
equip_delay_other = 140
hattable = FALSE
var/datum/brain_trauma/mild/phobia/conspiracies/paranoia
var/warped = FALSE
/obj/item/clothing/head/foilhat/Initialize(mapload)
. = ..()
if(warped)
warp_up()
return
AddComponent(
/datum/component/anti_magic, \
antimagic_flags = MAGIC_RESISTANCE_MIND, \
inventory_flags = ITEM_SLOT_HEAD, \
charges = 6, \
drain_antimagic = CALLBACK(src, PROC_REF(drain_antimagic)), \
expiration = CALLBACK(src, PROC_REF(warp_up)) \
)
/obj/item/clothing/head/foilhat/equipped(mob/living/carbon/human/user, slot)
. = ..()
if(slot != ITEM_SLOT_HEAD || warped)
return
if(paranoia)
QDEL_NULL(paranoia)
paranoia = new()
paranoia.clonable = FALSE
user.gain_trauma(paranoia, TRAUMA_RESILIENCE_MAGIC)
to_chat(user, span_warning("As you don the foiled hat, an entire world of conspiracy theories and seemingly insane ideas suddenly rush into your mind. What you once thought unbelievable suddenly seems.. undeniable. Everything is connected and nothing happens just by accident. You know too much and now they're out to get you. "))
/obj/item/clothing/head/foilhat/MouseDrop(atom/over_object)
//God Im sorry
if(!warped && iscarbon(usr))
var/mob/living/carbon/C = usr
if(src == C.head)
to_chat(C, span_userdanger("Why would you want to take this off? Do you want them to get into your mind?!"))
return
return ..()
/obj/item/clothing/head/foilhat/dropped(mob/user)
. = ..()
if(paranoia)
QDEL_NULL(paranoia)
/// When the foilhat is drained an anti-magic charge.
/obj/item/clothing/head/foilhat/proc/drain_antimagic(mob/user)
to_chat(user, span_warning("[src] crumples slightly. Something is trying to get inside your mind!"))
/obj/item/clothing/head/foilhat/proc/warp_up()
name = "scorched tinfoil hat"
desc = "A badly warped up hat. Quite unprobable this will still work against any of fictional and contemporary dangers it used to."
warped = TRUE
if(!isliving(loc) || !paranoia)
return
var/mob/living/target = loc
if(target.get_item_by_slot(ITEM_SLOT_HEAD) != src)
return
QDEL_NULL(paranoia)
if(!target.IsUnconscious())
to_chat(target, span_warning("Your zealous conspirationism rapidly dissipates as the donned hat warps up into a ruined mess. All those theories starting to sound like nothing but a ridicolous fanfare."))
/obj/item/clothing/head/foilhat/attack_hand(mob/user)
if(!warped && iscarbon(user))
var/mob/living/carbon/C = user
if(src == C.head)
to_chat(user, span_userdanger("Why would you want to take this off? Do you want them to get into your mind?!"))
return
return ..()
/obj/item/clothing/head/foilhat/microwave_act(obj/machinery/microwave/M)
. = ..()
if(!warped)
warp_up()
/obj/item/clothing/head/franks_hat
name = "Frank's Hat"
desc = "You feel ashamed about what you had to do to get this hat."
icon_state = "cowboy"
item_state = "cowboy"
/obj/item/clothing/head/peacekeeperberet
name = "Peacekeeper Beret"
desc = "A relic from the past. Its effectiveness as a stylish hat was never debated."
icon_state = "unberet"
item_state = "unberet"
/obj/item/clothing/head/halo
name = "Transdimensional halo"
desc = "An aetherial halo that magically hovers above the head."
icon_state = "halo"
item_state = "halo"
layer = EARS_LAYER
/obj/item/clothing/head/rainbow_flower
name = "Rainbow Flower"
desc = "A cute, multicoloured flower. Makes you feel all warm and fuzzy inside."
icon_state = "rflower"
item_state = "rflower"
w_class = WEIGHT_CLASS_TINY
/obj/item/clothing/head/Floralwizhat
name = "Druid hat"
desc = "A black wizard hat with an exotic looking purple flower on it."
icon_state = "flowerwizhat"
item_state = "flowerwizhat"
/obj/item/clothing/head/fedora/gtrim_fedora
name = "Gold trimmed Fedora"
desc = "A unique variation of the classic fedora. Now with 'waterproofing' for when business gets messy."
icon_state = "gtrim_fedora"
item_state = "gtrim_fedora"