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
/
bottle.dm
606 lines (515 loc) · 23.2 KB
/
bottle.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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
///////////////////////////////////////////////Alchohol bottles! -Agouri //////////////////////////
//Functionally identical to regular drinks. The only difference is that the default bottle size is 100. - Darem
//Bottles now knockdown and break when smashed on people's heads. - Giacom
/obj/item/reagent_containers/food/drinks/bottle
name = "glass bottle"
desc = "This blank bottle is unyieldingly anonymous, offering no clues to its contents."
icon_state = "glassbottle"
fill_icon_thresholds = list(0, 10, 20, 30, 40, 50, 60, 70, 80, 90)
custom_price = 65
amount_per_transfer_from_this = 10
volume = 100
force = 15 //Smashing bottles over someone's head hurts.
throwforce = 15
item_state = "broken_beer" //Generic held-item sprite until unique ones are made.
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
var/const/duration = 13 //Directly relates to the 'knockdown' duration. Lowered by armor (i.e. helmets)
isGlass = TRUE
foodtype = ALCOHOL
age_restricted = TRUE // wrryy can't set an init value to see if foodtype contains ALCOHOL so here we go
/obj/item/reagent_containers/food/drinks/bottle/update_overlays()
. = ..()
. += "[initial(icon_state)]shine"
/obj/item/reagent_containers/food/drinks/bottle/small
name = "small glass bottle"
desc = "This blank bottle is unyieldingly anonymous, offering no clues to its contents."
icon_state = "glassbottlesmall"
volume = 50
custom_price = 55
/obj/item/reagent_containers/food/drinks/bottle/smash(mob/living/target, mob/thrower, ranged = FALSE)
//Creates a shattering noise and replaces the bottle with a broken_bottle
if(bartender_check(target) && ranged)
return
var/obj/item/broken_bottle/B = new (loc)
if(!ranged && thrower)
thrower.put_in_hands(B)
B.icon_state = icon_state
var/icon/I = new('whitesands/icons/obj/drinks.dmi', src.icon_state)
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
B.icon = I
if(isGlass)
if(prob(33))
var/obj/item/shard/S = new(drop_location())
target.Bumped(S)
playsound(src, "shatter", 70, TRUE)
else
B.force = 0
B.throwforce = 0
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
B.name = "broken [name]"
transfer_fingerprints_to(B)
qdel(src)
target.Bumped(B)
/obj/item/reagent_containers/food/drinks/bottle/attack(mob/living/target, mob/living/user)
if(!target)
return
if(user.a_intent != INTENT_HARM || !isGlass)
return ..()
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "<span class='warning'>You don't want to harm [target]!</span>")
return
var/obj/item/bodypart/affecting = user.zone_selected //Find what the player is aiming at
var/armor_block = 0 //Get the target's armor values for normal attack damage.
var/armor_duration = 0 //The more force the bottle has, the longer the duration.
//Calculating duration and calculating damage.
if(ishuman(target))
var/mob/living/carbon/human/H = target
var/headarmor = 0 // Target's head armor
armor_block = H.run_armor_check(affecting, "melee","","",armour_penetration) // For normal attack damage
//If they have a hat/helmet and the user is targeting their head.
if(istype(H.head, /obj/item/clothing/head) && affecting == BODY_ZONE_HEAD)
headarmor = H.head.armor.melee
else
headarmor = 0
//Calculate the knockdown duration for the target.
armor_duration = (duration - headarmor) + force
else
//Only humans can have armor, right?
armor_block = target.run_armor_check(affecting, "melee")
if(affecting == BODY_ZONE_HEAD)
armor_duration = duration + force
//Apply the damage!
armor_block = min(90,armor_block)
target.apply_damage(force, BRUTE, affecting, armor_block)
// You are going to knock someone down for longer if they are not wearing a helmet.
var/head_attack_message = ""
if(affecting == BODY_ZONE_HEAD && istype(target, /mob/living/carbon/))
head_attack_message = " on the head"
if(armor_duration)
target.apply_effect(min(armor_duration, 200) , EFFECT_KNOCKDOWN)
//Display an attack message.
if(target != user)
target.visible_message("<span class='danger'>[user] hits [target][head_attack_message] with a bottle of [src.name]!</span>", \
"<span class='userdanger'>[user] hits you [head_attack_message] with a bottle of [src.name]!</span>")
else
target.visible_message("<span class='danger'>[target] hits [target.p_them()]self with a bottle of [src.name][head_attack_message]!</span>", \
"<span class='userdanger'>You hit yourself with a bottle of [src.name][head_attack_message]!</span>")
//Attack logs
log_combat(user, target, "attacked", src)
//The reagents in the bottle splash all over the target, thanks for the idea Nodrak
SplashReagents(target)
//Finally, smash the bottle. This kills (del) the bottle.
smash(target, user)
return
//Keeping this here for now, I'll ask if I should keep it here.
/obj/item/broken_bottle
name = "broken bottle"
desc = "A bottle with a sharp broken bottom."
icon = 'whitesands/icons/obj/drinks.dmi'
icon_state = "broken_bottle"
force = 9
throwforce = 5
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_TINY
item_state = "beer"
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("stabbed", "slashed", "attacked")
sharpness = SHARP_EDGED
var/static/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken")
/obj/item/broken_bottle/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 200, 55)
/obj/item/reagent_containers/food/drinks/bottle/gin
name = "Griffeater gin"
desc = "A bottle of high quality gin, produced in the New London Space Station."
icon_state = "ginbottle"
list_reagents = list(/datum/reagent/consumable/ethanol/gin = 100)
/obj/item/reagent_containers/food/drinks/bottle/whiskey
name = "Uncle Git's special reserve"
desc = "A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES."
icon_state = "whiskeybottle"
list_reagents = list(/datum/reagent/consumable/ethanol/whiskey = 100)
/obj/item/reagent_containers/food/drinks/bottle/kong
name = "Kong"
desc = "Makes You Go Ape!®"
list_reagents = list(/datum/reagent/consumable/ethanol/whiskey/kong = 100)
/obj/item/reagent_containers/food/drinks/bottle/candycornliquor
name = "candy corn liquor"
desc = "Like they drank in 2D speakeasies."
list_reagents = list(/datum/reagent/consumable/ethanol/whiskey/candycorn = 100)
/obj/item/reagent_containers/food/drinks/bottle/vodka
name = "Tunguska triple distilled"
desc = "Aah, vodka. Prime choice of drink AND fuel by Russians worldwide."
icon_state = "vodkabottle"
list_reagents = list(/datum/reagent/consumable/ethanol/vodka = 100)
/obj/item/reagent_containers/food/drinks/bottle/vodka/badminka
name = "Badminka vodka"
desc = "The label's written in Cyrillic. All you can make out is the name and a word that looks vaguely like 'Vodka'."
icon_state = "badminka"
list_reagents = list(/datum/reagent/consumable/ethanol/vodka = 100)
/obj/item/reagent_containers/food/drinks/bottle/tequila
name = "Caccavo guaranteed quality tequila"
desc = "Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!"
icon_state = "tequilabottle"
list_reagents = list(/datum/reagent/consumable/ethanol/tequila = 100)
/obj/item/reagent_containers/food/drinks/bottle/bottleofnothing
name = "bottle of nothing"
desc = "A bottle filled with nothing."
icon_state = "bottleofnothing"
list_reagents = list(/datum/reagent/consumable/nothing = 100)
foodtype = NONE
age_restricted = FALSE
/obj/item/reagent_containers/food/drinks/bottle/patron
name = "Wrapp Artiste Patron"
desc = "Silver laced tequila, served in space night clubs across the galaxy."
icon_state = "patronbottle"
list_reagents = list(/datum/reagent/consumable/ethanol/patron = 100)
/obj/item/reagent_containers/food/drinks/bottle/rum
name = "Captain Pete's Cuban spiced rum"
desc = "This isn't just rum, oh no. It's practically GRIFF in a bottle."
icon_state = "rumbottle"
list_reagents = list(/datum/reagent/consumable/ethanol/rum = 100)
/obj/item/reagent_containers/food/drinks/bottle/holywater
name = "flask of holy water"
desc = "A flask of the chaplain's holy water."
icon_state = "holyflask"
list_reagents = list(/datum/reagent/water/holywater = 100)
foodtype = NONE
/obj/item/reagent_containers/food/drinks/bottle/holywater/hell
desc = "A flask of holy water...it's been sitting in the Necropolis a while though."
list_reagents = list(/datum/reagent/hellwater = 100)
/obj/item/reagent_containers/food/drinks/bottle/vermouth
name = "Goldeneye vermouth"
desc = "Sweet, sweet dryness~"
icon_state = "vermouthbottle"
list_reagents = list(/datum/reagent/consumable/ethanol/vermouth = 100)
/obj/item/reagent_containers/food/drinks/bottle/kahlua
name = "Robert Robust's coffee liqueur"
desc = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK."
icon_state = "kahluabottle"
list_reagents = list(/datum/reagent/consumable/ethanol/kahlua = 100)
foodtype = VEGETABLES
/obj/item/reagent_containers/food/drinks/bottle/goldschlager
name = "College Girl goldschlager"
desc = "Because they are the only ones who will drink 100 proof cinnamon schnapps."
icon_state = "goldschlagerbottle"
list_reagents = list(/datum/reagent/consumable/ethanol/goldschlager = 100)
/obj/item/reagent_containers/food/drinks/bottle/cognac
name = "Chateau de Baton premium cognac"
desc = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. You might as well not scream 'SHITCURITY' this time."
icon_state = "cognacbottle"
list_reagents = list(/datum/reagent/consumable/ethanol/cognac = 100)
/obj/item/reagent_containers/food/drinks/bottle/wine
name = "Doublebeard's bearded special wine"
desc = "A faint aura of unease and asspainery surrounds the bottle."
icon_state = "winebottle"
list_reagents = list(/datum/reagent/consumable/ethanol/wine = 100)
foodtype = FRUIT | ALCOHOL
/obj/item/reagent_containers/food/drinks/bottle/absinthe
name = "extra-strong absinthe"
desc = "An strong alcoholic drink brewed and distributed by"
icon_state = "absinthebottle"
list_reagents = list(/datum/reagent/consumable/ethanol/absinthe = 100)
/obj/item/reagent_containers/food/drinks/bottle/absinthe/Initialize()
. = ..()
redact()
/obj/item/reagent_containers/food/drinks/bottle/absinthe/proc/redact()
// There was a large fight in the coderbus about a player reference
// in absinthe. Ergo, this is why the name generation is now so
// complicated. Judge us kindly.
var/shortname = pickweight(
list("T&T" = 1, "A&A" = 1, "Generic" = 1))
var/fullname
switch(shortname)
if("T&T")
fullname = "Teal and Tealer"
if("A&A")
fullname = "Ash and Asher"
if("Generic")
fullname = "Nanotrasen Cheap Imitations"
var/removals = list("\[REDACTED\]", "\[EXPLETIVE DELETED\]",
"\[EXPUNGED\]", "\[INFORMATION ABOVE YOUR SECURITY CLEARANCE\]",
"\[MOVE ALONG CITIZEN\]", "\[NOTHING TO SEE HERE\]")
var/chance = 50
if(prob(chance))
shortname = pick_n_take(removals)
var/list/final_fullname = list()
for(var/word in splittext(fullname, " "))
if(prob(chance))
word = pick_n_take(removals)
final_fullname += word
fullname = jointext(final_fullname, " ")
// Actually finally setting the new name and desc
name = "[shortname] [name]"
desc = "[desc] [fullname] Inc."
/obj/item/reagent_containers/food/drinks/bottle/absinthe/premium
name = "Gwyn's premium absinthe"
desc = "A potent alcoholic beverage, almost makes you forget the ash in your lungs."
icon_state = "absinthepremium"
/obj/item/reagent_containers/food/drinks/bottle/absinthe/premium/redact()
return
/obj/item/reagent_containers/food/drinks/bottle/lizardwine
name = "bottle of lizard wine"
desc = "An alcoholic beverage from Space China, made by infusing lizard tails in ethanol. Inexplicably popular among command staff."
icon_state = "lizardwine"
list_reagents = list(/datum/reagent/consumable/ethanol/lizardwine = 100)
foodtype = FRUIT | ALCOHOL
/obj/item/reagent_containers/food/drinks/bottle/hcider
name = "Jian Hard Cider"
desc = "Apple juice for adults."
icon_state = "hcider"
volume = 50
list_reagents = list(/datum/reagent/consumable/ethanol/hcider = 50)
/obj/item/reagent_containers/food/drinks/bottle/grappa
name = "Phillipes well-aged Grappa"
desc = "Bottle of Grappa."
icon_state = "grappabottle"
list_reagents = list(/datum/reagent/consumable/ethanol/grappa = 100)
/obj/item/reagent_containers/food/drinks/bottle/sake
name = "Ryo's traditional sake"
desc = "Sweet as can be, and burns like fire going down."
icon_state = "sakebottle"
list_reagents = list(/datum/reagent/consumable/ethanol/sake = 100)
/obj/item/reagent_containers/food/drinks/bottle/sake/Initialize()
. = ..()
if(prob(10))
name = "Fluffy Tail Sake"
desc += " On the bottle is a picture of a kitsune with nine touchable tails."
icon_state = "sakebottle_k"
else if(prob(10))
name = "Inubashiri's Home Brew"
desc += " Awoo."
icon_state = "sakebottle_i"
/obj/item/reagent_containers/food/drinks/bottle/fernet
name = "Fernet Bronca"
desc = "A bottle of pure Fernet Bronca, produced in Cordoba Space Station"
icon_state = "fernetbottle"
list_reagents = list(/datum/reagent/consumable/ethanol/fernet = 100)
//////////////////////////JUICES AND STUFF ///////////////////////
/obj/item/reagent_containers/food/drinks/bottle/orangejuice
name = "orange juice"
desc = "Full of vitamins and deliciousness!"
custom_price = 100
icon_state = "orangejuice"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = FALSE
list_reagents = list(/datum/reagent/consumable/orangejuice = 100)
foodtype = FRUIT | BREAKFAST
age_restricted = FALSE
/obj/item/reagent_containers/food/drinks/bottle/cream
name = "milk cream"
desc = "It's cream. Made from milk. What else did you think you'd find in there?"
custom_price = 100
icon_state = "cream"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = FALSE
list_reagents = list(/datum/reagent/consumable/cream = 100)
foodtype = DAIRY
age_restricted = FALSE
/obj/item/reagent_containers/food/drinks/bottle/tomatojuice
name = "tomato juice"
desc = "Well, at least it LOOKS like tomato juice. You can't tell with all that redness."
custom_price = 100
icon_state = "tomatojuice"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = FALSE
list_reagents = list(/datum/reagent/consumable/tomatojuice = 100)
foodtype = VEGETABLES
age_restricted = FALSE
/obj/item/reagent_containers/food/drinks/bottle/limejuice
name = "lime juice"
desc = "Sweet-sour goodness."
custom_price = 100
icon_state = "limejuice"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = FALSE
list_reagents = list(/datum/reagent/consumable/limejuice = 100)
foodtype = FRUIT
age_restricted = FALSE
/obj/item/reagent_containers/food/drinks/bottle/pineapplejuice
name = "pineapple juice"
desc = "Extremely tart, yellow juice."
custom_price = 100
icon_state = "pineapplejuice"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = FALSE
list_reagents = list(/datum/reagent/consumable/pineapplejuice = 100)
foodtype = FRUIT | PINEAPPLE
age_restricted = FALSE
/obj/item/reagent_containers/food/drinks/bottle/menthol
name = "menthol"
desc = "Tastes naturally minty, and imparts a very mild numbing sensation."
custom_price = 100
icon_state = "mentholbox"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = FALSE
list_reagents = list(/datum/reagent/consumable/menthol = 100)
/obj/item/reagent_containers/food/drinks/bottle/grenadine
name = "Jester Grenadine"
desc = "Contains 0% real cherries!"
custom_price = 100
icon_state = "grenadine"
isGlass = TRUE
list_reagents = list(/datum/reagent/consumable/grenadine = 100)
foodtype = FRUIT
age_restricted = FALSE
/obj/item/reagent_containers/food/drinks/bottle/applejack
name = "Buckin' Bronco's Applejack"
desc = "Kicks like a horse, tastes like an apple!"
custom_price = 100
icon_state = "applejack_bottle"
isGlass = TRUE
list_reagents = list(/datum/reagent/consumable/ethanol/applejack = 100)
foodtype = FRUIT
/obj/item/reagent_containers/food/drinks/bottle/champagne
name = "Eau d' Dandy Brut Champagne"
desc = "Finely sourced from only the most pretentious French vineyards."
custom_premium_price = 250
icon_state = "champagne_bottle"
isGlass = TRUE
list_reagents = list(/datum/reagent/consumable/ethanol/champagne = 100)
/obj/item/reagent_containers/food/drinks/bottle/blazaam
name = "Ginbad's Blazaam"
desc = "You feel like you should give the bottle a good rub before opening."
icon_state = "blazaambottle"
list_reagents = list(/datum/reagent/consumable/ethanol/blazaam = 100)
/obj/item/reagent_containers/food/drinks/bottle/trappist
name = "Mont de Requin Trappistes Bleu"
desc = "Brewed in space-Belgium. Fancy!"
custom_premium_price = 170
icon_state = "trappistbottle"
volume = 50
list_reagents = list(/datum/reagent/consumable/ethanol/trappist = 50)
/obj/item/reagent_containers/food/drinks/bottle/hooch
name = "hooch bottle"
desc = "A bottle of rotgut. Its owner has applied some street wisdom to cleverly disguise it as a brown paper bag."
icon_state = "hoochbottle"
list_reagents = list(/datum/reagent/consumable/ethanol/hooch = 100)
/obj/item/reagent_containers/food/drinks/bottle/moonshine
name = "moonshine jug"
desc = "It is said that the ancient Applalacians used these stoneware jugs to capture lightning in a bottle."
icon_state = "moonshinebottle"
list_reagents = list(/datum/reagent/consumable/ethanol/moonshine = 100)
////////////////////////// MOLOTOV ///////////////////////
/obj/item/reagent_containers/food/drinks/bottle/molotov
name = "molotov cocktail"
desc = "A throwing weapon used to ignite things, typically filled with an accelerant. Recommended highly by rioters and revolutionaries. Light and toss."
icon_state = "vodkabottle"
list_reagents = list()
var/list/accelerants = list( /datum/reagent/consumable/ethanol, /datum/reagent/fuel, /datum/reagent/clf3, /datum/reagent/phlogiston,
/datum/reagent/napalm, /datum/reagent/hellwater, /datum/reagent/toxin/plasma, /datum/reagent/toxin/spore_burning)
var/active = 0
/obj/item/reagent_containers/food/drinks/bottle/molotov/CheckParts(list/parts_list)
..()
var/obj/item/reagent_containers/food/drinks/bottle/B = locate() in contents
if(B)
icon_state = B.icon_state
B.reagents.copy_to(src,100)
if(!B.isGlass)
desc += " You're not sure if making this out of a carton was the brightest idea."
isGlass = FALSE
return
/obj/item/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/firestarter = 0
for(var/datum/reagent/R in reagents.reagent_list)
for(var/A in accelerants)
if(istype(R,A))
firestarter = 1
break
if(firestarter && active)
hit_atom.fire_act()
new /obj/effect/hotspot(get_turf(hit_atom))
..()
/obj/item/reagent_containers/food/drinks/bottle/molotov/attackby(obj/item/I, mob/user, params)
if(I.get_temperature() && !active)
active = TRUE
log_bomber(user, "has primed a", src, "for detonation")
to_chat(user, "<span class='info'>You light [src] on fire.</span>")
add_overlay(custom_fire_overlay ? custom_fire_overlay : GLOB.fire_overlay)
if(!isGlass)
addtimer(CALLBACK(src, .proc/explode), 5 SECONDS)
/obj/item/reagent_containers/food/drinks/bottle/molotov/proc/explode()
if(!active)
return
if(get_turf(src))
var/atom/target = loc
for(var/i in 1 to 2)
if(istype(target, /obj/item/storage))
target = target.loc
SplashReagents(target)
target.fire_act()
qdel(src)
/obj/item/reagent_containers/food/drinks/bottle/molotov/attack_self(mob/user)
if(active)
if(!isGlass)
to_chat(user, "<span class='danger'>The flame's spread too far on it!</span>")
return
to_chat(user, "<span class='info'>You snuff out the flame on [src].</span>")
cut_overlay(custom_fire_overlay ? custom_fire_overlay : GLOB.fire_overlay)
active = 0
/obj/item/reagent_containers/food/drinks/bottle/pruno
name = "pruno mix"
desc = "A trash bag filled with fruit, sugar, yeast, and water, pulped together into a pungent slurry to be fermented in an enclosed space, traditionally the toilet. Security would love to confiscate this, one of the many things wrong with them."
icon = 'icons/obj/janitor.dmi'
icon_state = "trashbag"
list_reagents = list(/datum/reagent/consumable/prunomix = 50)
var/fermentation_time = 30 SECONDS /// time it takes to ferment
var/fermentation_time_remaining /// for partial fermentation
var/fermentation_timer /// store the timer id of fermentation
/obj/item/reagent_containers/food/drinks/bottle/pruno/Initialize()
. = ..()
RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/check_fermentation)
/obj/item/reagent_containers/food/drinks/bottle/pruno/Destroy()
UnregisterSignal(src, COMSIG_MOVABLE_MOVED)
return ..()
// Checks to see if the pruno can ferment, i.e. is it inside a structure (e.g. toilet), or a machine (e.g. washer)?
// TODO: make it so the washer spills reagents if a reagent container is in there, for now, you can wash pruno
/obj/item/reagent_containers/food/drinks/bottle/pruno/proc/check_fermentation()
if (!(istype(loc, /obj/machinery) || istype(loc, /obj/structure)))
if(fermentation_timer)
fermentation_time_remaining = timeleft(fermentation_timer)
deltimer(fermentation_timer)
fermentation_timer = null
return
if(fermentation_timer)
return
if(!fermentation_time_remaining)
fermentation_time_remaining = fermentation_time
fermentation_timer = addtimer(CALLBACK(src, .proc/do_fermentation), fermentation_time_remaining, TIMER_UNIQUE|TIMER_STOPPABLE)
fermentation_time_remaining = null
// actually ferment
/obj/item/reagent_containers/food/drinks/bottle/pruno/proc/do_fermentation()
fermentation_time_remaining = null
fermentation_timer = null
if(prob(10))
reagents.add_reagent(/datum/reagent/toxin/bad_food, 15) // closest thing we have to botulism
reagents.add_reagent(/datum/reagent/consumable/ethanol/pruno, 35)
else
reagents.add_reagent(/datum/reagent/consumable/ethanol/pruno, 50)
name = "bag of pruno"
desc = "Fermented prison wine made from fruit, sugar, and despair. You probably shouldn't drink this around Security."
icon_state = "trashbag1" // pruno releases air as it ferments, we don't want to simulate this in atmos, but we can make it look like it did
for (var/mob/living/M in view(2, get_turf(src))) // letting people and/or narcs know when the pruno is done
to_chat(M, "<span class='info'>A pungent smell emanates from [src], like fruit puking out its guts.</span>")
playsound(get_turf(src), 'sound/effects/bubbles2.ogg', 25, TRUE)
/obj/item/reagent_containers/food/drinks/colocup/lean
name = "lean"
desc = "A cup of that purple drank, the stuff that makes you go WHEEZY BABY."
icon_state = "lean"
list_reagents = list(/datum/reagent/consumable/lean = 50)
random_sprite = FALSE