This repository has been archived by the owner on Sep 12, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
_neck.dm
270 lines (223 loc) · 8.79 KB
/
_neck.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
/obj/item/clothing/neck
name = "necklace"
icon = 'icons/obj/clothing/neck.dmi'
body_parts_covered = NECK
slot_flags = ITEM_SLOT_NECK
strip_delay = 40
equip_delay_other = 40
cuttable = TRUE
clothamnt = 2
/obj/item/clothing/neck/worn_overlays(isinhands = FALSE)
. = list()
if(!isinhands)
if(body_parts_covered & HEAD)
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedmask")
if(HAS_BLOOD_DNA(src))
. += mutable_appearance('icons/effects/blood.dmi', "maskblood")
/obj/item/clothing/neck/tie
name = "tie"
desc = "A neosilk clip-on tie."
icon = 'icons/obj/clothing/neck.dmi'
icon_state = "bluetie"
item_state = "" //no inhands
w_class = WEIGHT_CLASS_SMALL
custom_price = 60
/obj/item/clothing/neck/tie/blue
name = "blue tie"
icon_state = "bluetie"
/obj/item/clothing/neck/tie/red
name = "red tie"
icon_state = "redtie"
/obj/item/clothing/neck/tie/black
name = "black tie"
icon_state = "blacktie"
/obj/item/clothing/neck/tie/horrible
name = "horrible tie"
desc = "A neosilk clip-on tie. This one is disgusting."
icon_state = "horribletie"
/obj/item/clothing/neck/tie/detective
name = "loose tie"
desc = "A loosely tied necktie, a perfect accessory for the over-worked detective."
icon_state = "detective"
/obj/item/clothing/neck/stethoscope
name = "stethoscope"
desc = "An outdated medical apparatus for listening to the sounds of the human body. It also makes you look like you know what you're doing."
icon_state = "stethoscope"
cuttable = FALSE
/obj/item/clothing/neck/stethoscope/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] puts \the [src] to [user.p_their()] chest! It looks like [user.p_they()] wont hear much!</span>")
return OXYLOSS
/obj/item/clothing/neck/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
if(ishuman(M) && isliving(user))
if(user.a_intent == INTENT_HELP)
var/body_part = parse_zone(user.zone_selected)
var/heart_strength = "<span class='danger'>no</span>"
var/lung_strength = "<span class='danger'>no</span>"
var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART)
var/obj/item/organ/lungs/lungs = M.getorganslot(ORGAN_SLOT_LUNGS)
if(!(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_FAKEDEATH))))
if(heart && istype(heart))
heart_strength = "<span class='danger'>an unstable</span>"
if(heart.beating)
heart_strength = "a healthy"
if(lungs && istype(lungs))
lung_strength = "<span class='danger'>strained</span>"
if(!(M.failed_last_breath || M.losebreath))
lung_strength = "healthy"
var/diagnosis = (body_part == BODY_ZONE_CHEST ? "You hear [heart_strength] pulse and [lung_strength] respiration." : "You faintly hear [heart_strength] pulse.")
user.visible_message("<span class='notice'>[user] places [src] against [M]'s [body_part] and listens attentively.</span>", "<span class='notice'>You place [src] against [M]'s [body_part]. [diagnosis]</span>")
return
return ..(M,user)
///////////
//SCARVES//
///////////
/obj/item/clothing/neck/scarf //Default white color, same functionality as beanies.
name = "white scarf"
icon_state = "scarf"
desc = "A stylish scarf. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their necks."
dog_fashion = /datum/dog_fashion/head
custom_price = 60
/obj/item/clothing/neck/scarf/black
name = "black scarf"
icon_state = "scarf"
color = "#4A4A4B" //Grey but it looks black
/obj/item/clothing/neck/scarf/pink
name = "pink scarf"
icon_state = "scarf"
color = "#F699CD" //Pink
/obj/item/clothing/neck/scarf/red
name = "red scarf"
icon_state = "scarf"
color = "#D91414" //Red
/obj/item/clothing/neck/scarf/green
name = "green scarf"
icon_state = "scarf"
color = "#5C9E54" //Green
/obj/item/clothing/neck/scarf/darkblue
name = "dark blue scarf"
icon_state = "scarf"
color = "#1E85BC" //Blue
/obj/item/clothing/neck/scarf/purple
name = "purple scarf"
icon_state = "scarf"
color = "#9557C5" //Purple
/obj/item/clothing/neck/scarf/yellow
name = "yellow scarf"
icon_state = "scarf"
color = "#E0C14F" //Yellow
/obj/item/clothing/neck/scarf/orange
name = "orange scarf"
icon_state = "scarf"
color = "#C67A4B" //Orange
/obj/item/clothing/neck/scarf/cyan
name = "cyan scarf"
icon_state = "scarf"
color = "#54A3CE" //Cyan
//Striped scarves get their own icons
/obj/item/clothing/neck/scarf/zebra
name = "zebra scarf"
icon_state = "zebrascarf"
/obj/item/clothing/neck/scarf/christmas
name = "christmas scarf"
icon_state = "christmasscarf"
//The three following scarves don't have the scarf subtype
//This is because Ian can equip anything from that subtype
//However, these 3 don't have corgi versions of their sprites
/obj/item/clothing/neck/stripedredscarf
name = "striped red scarf"
icon_state = "stripedredscarf"
custom_price = 10
/obj/item/clothing/neck/stripedgreenscarf
name = "striped green scarf"
icon_state = "stripedgreenscarf"
custom_price = 10
/obj/item/clothing/neck/stripedbluescarf
name = "striped blue scarf"
icon_state = "stripedbluescarf"
custom_price = 10
/obj/item/clothing/neck/petcollar
name = "pet collar"
desc = "It's for pets. But some people wear it anyways for reasons unknown."
icon_state = "petcollar"
var/tagname = null
/obj/item/clothing/neck/petcollar/attack_self(mob/user)
tagname = stripped_input(user, "Would you like to change the name on the tag?", "Name your new pet", "Spot", MAX_NAME_LEN)
name = "[initial(name)] - [tagname]"
//////////////
//DOPE BLING//
//////////////
/obj/item/clothing/neck/necklace/dope
name = "gold necklace"
desc = "Damn, it feels good to be a gangster."
icon = 'icons/obj/clothing/neck.dmi'
icon_state = "bling"
cuttable = FALSE
/obj/item/clothing/neck/necklace/dope/merchant
desc = "Don't ask how it works, the proof is in the holochips!"
/// scales the amount received in case an admin wants to emulate taxes/fees.
var/profit_scaling = 1
/// toggles between sell (TRUE) and get price post-fees (FALSE)
var/selling = FALSE
/obj/item/clothing/neck/necklace/dope/merchant/attack_self(mob/user)
. = ..()
selling = !selling
to_chat(user, "<span class='notice'>[src] has been set to [selling ? "'Sell'" : "'Get Price'"] mode.</span>")
/obj/item/clothing/neck/necklace/dope/merchant/afterattack(obj/item/I, mob/user, proximity)
. = ..()
if(!proximity)
return
var/datum/export_report/ex = export_item_and_contents(I, allowed_categories = (ALL), dry_run=TRUE)
var/price = 0
for(var/x in ex.total_amount)
price += ex.total_value[x]
if(price)
var/true_price = round(price*profit_scaling)
to_chat(user, "<span class='notice'>[selling ? "Sold" : "Getting the price of"] [I], value: <b>[true_price]</b> credits[I.contents.len ? " (exportable contents included)" : ""].[profit_scaling < 1 && selling ? "<b>[round(price-true_price)]</b> credit\s taken as processing fee\s." : ""]</span>")
if(selling)
new /obj/item/holochip(get_turf(user),true_price)
for(var/i in ex.exported_atoms_ref)
var/atom/movable/AM = i
if(QDELETED(AM))
continue
qdel(AM)
else
to_chat(user, "<span class='warning'>There is no export value for [I] or any items within it.</span>")
/obj/item/clothing/neck/neckerchief
icon = 'icons/obj/clothing/masks.dmi' //In order to reuse the bandana sprite
w_class = WEIGHT_CLASS_TINY
var/sourceBandanaType
/obj/item/clothing/neck/neckerchief/worn_overlays(isinhands)
. = ..()
if(!isinhands)
var/mutable_appearance/realOverlay = mutable_appearance('icons/mob/clothing/mask.dmi', icon_state)
realOverlay.pixel_y = -3
. += realOverlay
/obj/item/clothing/neck/neckerchief/AltClick(mob/user)
. = ..()
if(iscarbon(user))
var/mob/living/carbon/C = user
if(C.get_item_by_slot(ITEM_SLOT_NECK) == src)
to_chat(user, "<span class='warning'>You can't untie [src] while wearing it!</span>")
return
if(user.is_holding(src))
var/obj/item/clothing/mask/bandana/newBand = new sourceBandanaType(user)
var/currentHandIndex = user.get_held_index_of_item(src)
var/oldName = src.name
qdel(src)
user.put_in_hand(newBand, currentHandIndex)
user.visible_message("<span class='notice'>You untie [oldName] back into a [newBand.name].</span>", "<span class='notice'>[user] unties [oldName] back into a [newBand.name].</span>")
else
to_chat(user, "<span class='warning'>You must be holding [src] in order to untie it!</span>")
/obj/item/clothing/neck/beads
name = "plastic bead necklace"
desc = "A cheap, plastic bead necklace. Show team spirit! Collect them! Throw them away! The posibilites are endless!"
icon = 'icons/obj/clothing/neck.dmi'
icon_state = "beads"
color = "#ffffff"
custom_price = 10
custom_materials = (list(/datum/material/plastic = 500))
cuttable = FALSE
/obj/item/clothing/neck/beads/Initialize()
. = ..()
color = color = pick("#ff0077","#d400ff","#2600ff","#00ccff","#00ff2a","#e5ff00","#ffae00","#ff0000", "#ffffff")