forked from Aurorastation/Aurora.3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpill.dm
394 lines (324 loc) · 14.6 KB
/
pill.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
////////////////////////////////////////////////////////////////////////////////
/// Pills.
////////////////////////////////////////////////////////////////////////////////
/obj/item/reagent_containers/pill
name = "pill"
desc = "a pill."
icon = 'icons/obj/chemical.dmi'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/stacks/lefthand_medical.dmi',
slot_r_hand_str = 'icons/mob/items/stacks/righthand_medical.dmi',
)
icon_state = null
item_state = "pill"
possible_transfer_amounts = null
w_class = WEIGHT_CLASS_TINY
slot_flags = SLOT_EARS
volume = 60
drop_sound = 'sound/items/drop/food.ogg'
pickup_sound = 'sound/items/pickup/food.ogg'
/obj/item/reagent_containers/pill/New()
..()
if(!icon_state)
icon_state = "pill[rand(1, 20)]"
/obj/item/reagent_containers/pill/attack(mob/M as mob, mob/user as mob, def_zone)
//TODO: replace with standard_feed_mob() call.
if(M == user)
if(!M.can_eat(src))
return
M.visible_message("<b>[M]</b> swallows a pill.", SPAN_NOTICE("You swallow \the [src]."), null, 2)
if(reagents.total_volume)
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
qdel(src)
return 1
else if(istype(M, /mob/living/carbon/human))
if(!M.can_force_feed(user, src))
return
user.visible_message(SPAN_WARNING("[user] attempts to force [M] to swallow \the [src]!"))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(!do_mob(user, M))
return
user.visible_message(SPAN_WARNING("[user] forces [M] to swallow \the [src]."))
var/contained = reagentlist()
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [name] by [key_name(user)] Reagents: [contained]</font>")
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Fed [name] to [key_name(M)] Reagents: [contained]</span>")
msg_admin_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
if(reagents.total_volume)
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
qdel(src)
return 1
return 0
/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user, proximity)
if(proximity && target.is_open_container() && target.reagents)
if(!target.reagents.total_volume)
to_chat(user, SPAN_NOTICE("You can't dissolve \the [src] in an empty [target]."))
return
to_chat(user, SPAN_NOTICE("You dissolve \the [src] in [target]."))
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Spiked \a [target] with a pill. Reagents: [reagentlist()]</span>")
msg_admin_attack("[user.name] ([user.ckey]) spiked \a [target] with a pill. Reagents: [reagentlist()] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(target))
reagents.trans_to(target, reagents.total_volume)
for(var/mob/O in viewers(2, user))
O.show_message(SPAN_WARNING("[user] puts something in \the [target]."), 1)
qdel(src)
return
. = ..()
/obj/item/reagent_containers/pill/attackby(obj/item/attacking_item, mob/user)
if(is_sharp(attacking_item) || istype(attacking_item, /obj/item/card/id))
var/obj/item/reagent_containers/powder/J = new /obj/item/reagent_containers/powder(loc)
user.visible_message(
SPAN_WARNING("\The [user] gently cuts up \the [src] with \a [attacking_item]!"),
SPAN_NOTICE("You gently cut up \the [src] with \the [attacking_item]."),
SPAN_WARNING("You hear quiet grinding.")
)
playsound(loc, 'sound/effects/chop.ogg', 50, 1)
if(reagents)
reagents.trans_to_obj(J, reagents.total_volume)
J.get_appearance()
qdel(src)
return ..()
////////////////////////////////////////////////////////////////////////////////
/// Pills. END
////////////////////////////////////////////////////////////////////////////////
//Pills
/obj/item/reagent_containers/pill/antitox
name = "10u Dylovene Pill"
desc = "Neutralizes many common toxins."
icon_state = "pill17"
reagents_to_add = list(/singleton/reagent/dylovene = 10)
/obj/item/reagent_containers/pill/tox
name = "Toxins Pill"
desc = "Highly toxic."
icon_state = "pill5"
reagents_to_add = list(/singleton/reagent/toxin = 50)
/obj/item/reagent_containers/pill/cyanide
icon_state = "pill5"
reagents_to_add = list(/singleton/reagent/toxin/cyanide = 50)
desc_antag = "A cyanide pill. Deadly if swallowed."
/obj/item/reagent_containers/pill/adminordrazine
name = "Adminordrazine Pill"
desc = "It's magic. We don't have to explain it."
icon_state = "pill16"
reagents_to_add = list(/singleton/reagent/adminordrazine = 50)
/obj/item/reagent_containers/pill/stox
name = "15u Soporific Pill"
desc = "Commonly used to treat insomnia."
icon_state = "pill8"
reagents_to_add = list(/singleton/reagent/soporific = 15)
/obj/item/reagent_containers/pill/kelotane
name = "10u Kelotane Pill"
desc = "Used to treat minor burns."
icon_state = "pill11"
reagents_to_add = list(/singleton/reagent/kelotane = 10)
/obj/item/reagent_containers/pill/perconol
name = "10u Perconol Pill"
desc = "A light painkiller available over-the-counter."
icon_state = "pill8"
reagents_to_add = list(/singleton/reagent/perconol = 10)
/obj/item/reagent_containers/pill/mortaphenyl
name = "10u Mortaphenyl Pill"
desc = "A mortaphenyl pill, it's a potent painkiller."
icon_state = "pill8"
reagents_to_add = list(/singleton/reagent/mortaphenyl = 10)
/obj/item/reagent_containers/pill/corophenidate
name = "2u Corophenidate Pill"
desc = "Improves the ability to concentrate."
icon_state = "pill22"
reagents_to_add = list(/singleton/reagent/mental/corophenidate = 2)
/obj/item/reagent_containers/pill/emoxanyl
name = "2u Emoxanyl Pill"
desc = "Used to treat anxiety disorders, depression and epilepsy."
icon_state = "pill22"
reagents_to_add = list(/singleton/reagent/mental/emoxanyl = 2)
/obj/item/reagent_containers/pill/minaphobin
name = "2u Minaphobin Pill"
desc = "Used to treat anxiety disorders and depression."
icon_state = "pill22"
reagents_to_add = list(/singleton/reagent/mental/minaphobin = 2)
/obj/item/reagent_containers/pill/nerospectan
name = "2u Nerospectan Pill"
desc = "Used to treat a large variety of disorders including tourettes, depression, anxiety and psychosis."
icon_state = "pill22"
reagents_to_add = list(/singleton/reagent/mental/nerospectan = 2)
/obj/item/reagent_containers/pill/neurapan
name = "2u Neurapan Pill"
desc = "Used to treat a large variety of disorders including tourettes, depression, anxiety and psychosis."
icon_state = "pill22"
reagents_to_add = list(/singleton/reagent/mental/neurapan = 2)
/obj/item/reagent_containers/pill/neurostabin
name = "2u Neurostabin Pill"
desc = "Used to treat psychosis and muscle weakness."
icon_state = "pill8"
reagents_to_add = list(/singleton/reagent/mental/neurostabin = 2)
/obj/item/reagent_containers/pill/orastabin
name = "2u Orastabin Pill"
desc = "Used to treat anxiety disorders and speech impediments."
icon_state = "pill22"
reagents_to_add = list(/singleton/reagent/mental/orastabin = 2)
/obj/item/reagent_containers/pill/parvosil
name = "2u Parvosil Pill"
desc = "Used to treat anxiety disorders such as phobias and social anxiety."
icon_state = "pill22"
reagents_to_add = list(/singleton/reagent/mental/parvosil = 2)
/obj/item/reagent_containers/pill/inaprovaline
name = "10u Inaprovaline Pill"
desc = "Used to stabilize heart activity."
icon_state = "pill20"
reagents_to_add = list(/singleton/reagent/inaprovaline = 10)
/obj/item/reagent_containers/pill/dexalin
name = "15u Dexalin Pill"
desc = "Used to treat oxygen deprivation."
icon_state = "pill16"
reagents_to_add = list(/singleton/reagent/dexalin = 15)
/obj/item/reagent_containers/pill/dexalin_plus
name = "15u Dexalin Plus Pill"
desc = "Used to treat extreme oxygen deprivation."
icon_state = "pill8"
reagents_to_add = list(/singleton/reagent/dexalin/plus = 15)
/obj/item/reagent_containers/pill/dermaline
name = "10u Dermaline Pill"
desc = "Used to treat severe burn wounds."
icon_state = "pill12"
reagents_to_add = list(/singleton/reagent/dermaline = 10)
/obj/item/reagent_containers/pill/dylovene
name = "15u Dylovene Pill"
desc = "A broad-spectrum anti-toxin."
icon_state = "pill13"
reagents_to_add = list(/singleton/reagent/dylovene = 15)
/obj/item/reagent_containers/pill/butazoline
name = "10u Butazoline Pill"
desc = "Used to treat major injuries and bleeding."
icon_state = "pill18"
reagents_to_add = list(/singleton/reagent/butazoline = 10)
/obj/item/reagent_containers/pill/bicaridine
name = "10u Bicaridine Pill"
desc = "Used to treat minor injuries and bleeding."
icon_state = "pill18"
reagents_to_add = list(/singleton/reagent/bicaridine = 10)
/obj/item/reagent_containers/pill/happy
name = "Happy Pill"
desc = "Happy happy joy joy!"
icon_state = "pill_happy"
reagents_to_add = list(/singleton/reagent/drugs/mms = 15, /singleton/reagent/sugar = 15)
/obj/item/reagent_containers/pill/zoom
name = "Zoom Pill"
desc = "Zoooom!"
icon_state = "pill18"
reagents_to_add = list(/singleton/reagent/drugs/impedrezene = 5, /singleton/reagent/synaptizine = 5, /singleton/reagent/hyperzine = 5)
/obj/item/reagent_containers/pill/joy
name = "Joy Pill"
desc = "Peace, at last."
icon_state = "pill8"
reagents_to_add = list(/singleton/reagent/drugs/joy = 5)
/obj/item/reagent_containers/pill/heroin
name = "heroin pill"
desc = "The pain will pass..."
icon_state = "pill7"
reagents_to_add = list(/singleton/reagent/drugs/heroin = 5)
/obj/item/reagent_containers/pill/cocaine
name = "cocaine tablet"
desc = "For those long nights out."
icon_state = "pill18"
reagents_to_add = list(/singleton/reagent/drugs/cocaine = 10)
/obj/item/reagent_containers/pill/contemplus
name = "\improper Contemplus tablet"
desc = "For that essay that is due tomorrow."
icon_state = "pill19"
reagents_to_add = list(/singleton/reagent/drugs/cocaine/contemplus = 10)
/obj/item/reagent_containers/pill/spotlight
name = "\improper Spotlight tablet"
desc = "For that acting audition today."
icon_state = "pill2"
reagents_to_add = list(/singleton/reagent/drugs/cocaine/spotlight = 10)
/obj/item/reagent_containers/pill/sparkle
name = "\improper Sparkle tablet"
desc = "For those long nights out at the club."
icon_state = "pill20"
reagents_to_add = list(/singleton/reagent/drugs/cocaine/sparkle = 10)
/obj/item/reagent_containers/pill/thetamycin
name = "15u Thetamycin Pill"
desc = "Used to treat infections and septicaemia."
icon_state = "pill19"
reagents_to_add = list(/singleton/reagent/thetamycin = 15)
/obj/item/reagent_containers/pill/bio_vitamin //Biogenerator version
name = "Vitamin Pill"
desc = "Contains a meal's worth of nutrients."
icon_state = "pill11"
reagents_to_add = list(/singleton/reagent/nutriment = 20)
/obj/item/reagent_containers/pill/bio_vitamin/Initialize()
. = ..()
var/juice = pick(/singleton/reagent/drink/banana, /singleton/reagent/drink/berryjuice, /singleton/reagent/drink/grapejuice, /singleton/reagent/drink/lemonjuice, /singleton/reagent/drink/limejuice, /singleton/reagent/drink/orangejuice, /singleton/reagent/drink/watermelonjuice)
reagents.add_reagent(juice, 1)
/obj/item/reagent_containers/pill/bio_vitamin/cheap //Vending machine version
name = "Vitamin Pill"
desc = "Has all the vitamins a person needs."
reagents_to_add = list(/singleton/reagent/nutriment = 2)
/obj/item/reagent_containers/pill/rmt
name = "15u Regenerative-Muscular Tissue Supplement Pill"
desc = "Commonly abbreviated to RMT, it contains chemicals rampantly used by those seeking to remedy the effects of prolonged zero-gravity adaptations."
icon_state = "pill19"
reagents_to_add = list(/singleton/reagent/rmt = 15)
/obj/item/reagent_containers/pill/cetahydramine
name = "5u Cetahydramine Pill"
desc = "Used to treat coughing, sneezing and itching."
icon_state = "pill19"
reagents_to_add = list(/singleton/reagent/cetahydramine = 5)
/obj/item/reagent_containers/pill/skrell_nootropic
name = "5u Co'qnixq Wuxi Pill"
desc = "Used to treat dementia."
icon_state = "pill8"
reagents_to_add = list(/singleton/reagent/drugs/skrell_nootropic = 5)
/obj/item/reagent_containers/pill/hyronalin
name = "7u Hyronalin"
desc = "Used to treat radiation poisoning."
icon_state = "pill1"
reagents_to_add = list(/singleton/reagent/hyronalin = 7)
/obj/item/reagent_containers/pill/antirad
name = "AntiRad"
desc = "Used to treat radiation poisoning."
icon_state = "yellow"
reagents_to_add = list(/singleton/reagent/hyronalin = 5, /singleton/reagent/dylovene = 10)
/obj/item/reagent_containers/pill/sugariron
name = "10u Sugar-Iron"
desc = "Used to help the body naturally replenish blood."
icon_state = "pill1"
reagents_to_add = list(/singleton/reagent/iron = 5, /singleton/reagent/sugar = 10)
/obj/item/reagent_containers/pill/antidexafen
name = "15u Antidexafen"
desc = "Common cold mediciation. Safe for babies!"
icon_state = "pill4"
reagents_to_add = list(/singleton/reagent/antidexafen = 10, /singleton/reagent/drink/lemonjuice = 5, /singleton/reagent/nutriment/mint = REM*0.2)
/obj/item/reagent_containers/pill/antiparasitic
name = "5u Helmizole"
desc = "An antiparasitic used to treat worms."
icon_state = "pill11"
reagents_to_add = list(/singleton/reagent/antiparasitic = 5)
/obj/item/reagent_containers/pill/asinodryl
name = "10u Asinodryl"
desc = "An antiemetic which prevents vomiting."
icon_state = "pill20"
reagents_to_add = list(/singleton/reagent/asinodryl = 10)
/obj/item/reagent_containers/pill/steramycin
name = "5u Steramycin"
desc = "A prophylactic antibiotic that kills infections before they start."
icon_state = "pill8"
reagents_to_add = list(/singleton/reagent/steramycin = 5)
/obj/item/reagent_containers/pill/cleaner_tablet
name = "dissolvable cleaner tablet"
desc = "An advanced formula dissolvable tablet laden with the cutting edge of Idris chemical science. Smells like dried bleach. It's probably just bleach."
icon_state = "cleanertablet"
reagents_to_add = list(/singleton/reagent/spacecleaner = 15)
/obj/item/reagent_containers/pill/ryetalyn
name = "10u Ryetalyn Pill"
desc = "A medicine used to treat genetic conditions, including benign and malignant tumours."
icon_state = "pill11"
reagents_to_add = list(/singleton/reagent/ryetalyn = 10)
/obj/item/reagent_containers/pill/caffeine
name = "5u Caffeine Pill"
desc = "A stimulant used to help with alertness and fatigue."
icon_state = "pill18"
reagents_to_add = list(/singleton/reagent/caffeine = 5)
/obj/item/reagent_containers/pill/nicotine
name = "5u Nicotine Pill"
desc = "A pull used to treat nicotine addiction."
icon_state = "pill18"
reagents_to_add = list(/singleton/reagent/mental/nicotine = 5)