Adds molotov creation recipe via tablecrafting, requring a drink bottle and a rag

Nerfs the rag, allows it to be made with the biogenerator, adds a few to the chef/bartender's closets, and to the maint loot spawner
Adds the ability to empty out a fire extinguisher... for sabotage
This commit is contained in:
Ergovisavi
2015-07-19 04:12:30 -07:00
parent f08d4f4085
commit bf83ef4c53
8 changed files with 133 additions and 23 deletions
+2 -2
View File
@@ -212,9 +212,9 @@
sleep(1)
//done throwing, either because it hit something or it finished moving
src.throwing = 0
if(isobj(src))
if(isobj(src) && throwing)
src.throw_impact(get_turf(src),thrower)
src.throwing = 0
return 1
@@ -101,6 +101,7 @@
/obj/item/weapon/paper/crumpled = 1,
/obj/item/weapon/pen = 1,
/obj/item/weapon/reagent_containers/spray/pestspray = 1,
/obj/item/weapon/reagent_containers/glass/rag = 3,
/obj/item/weapon/stock_parts/cell = 3,
/obj/item/weapon/storage/belt/utility = 2,
/obj/item/weapon/storage/box = 2,
@@ -158,4 +158,13 @@
sleep(2)
else
return ..()
return ..()
/obj/item/weapon/extinguisher/AltClick(mob/user)
EmptyExtinguisher(user)
/obj/item/weapon/extinguisher/proc/EmptyExtinguisher(var/mob/user)
if(loc == user)
reagents.clear_reagents()
user << "<span class='info'>You quietly empty out the [src].</span>"
return
@@ -21,6 +21,8 @@
new /obj/item/clothing/head/soft/black(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/weapon/reagent_containers/glass/rag(src)
new /obj/item/weapon/reagent_containers/glass/rag(src)
/obj/structure/closet/chefcloset
name = "\proper chef's closet"
@@ -45,6 +47,7 @@
new /obj/item/clothing/suit/toggle/chef(src)
new /obj/item/clothing/under/rank/chef(src)
new /obj/item/clothing/head/chefhat(src)
new /obj/item/weapon/reagent_containers/glass/rag(src)
/obj/structure/closet/jcloset
name = "custodial closet"
+9
View File
@@ -30,6 +30,15 @@
time = 80
category = CAT_WEAPON
/datum/table_recipe/molotov
name = "Molotov"
result = /obj/item/weapon/reagent_containers/food/drinks/bottle/molotov
reqs = list(/obj/item/weapon/reagent_containers/glass/rag = 1,
/obj/item/weapon/reagent_containers/food/drinks/bottle = 1)
parts = list(/obj/item/weapon/reagent_containers/food/drinks/bottle = 1)
time = 80
category = CAT_WEAPON
/datum/table_recipe/stunprod
name = "Stunprod"
result = /obj/item/weapon/melee/baton/cattleprod
@@ -17,17 +17,23 @@
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5)
volume = 5
spillable = 0
/obj/item/weapon/reagent_containers/glass/rag/attack()
return
/obj/item/weapon/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob,proximity)
if(!proximity)
return
if(ismob(A) && A.reagents && reagents.total_volume)
if(user.a_intent == "harm")
src.reagents.reaction(A, TOUCH)
src.reagents.clear_reagents()
else
reagents.trans_to(A, reagents.total_volume)
user.visible_message("<span class='danger'>[user] has smothered \the [A] with \the [src]!</span>", "<span class='danger'>You smother \the [A] with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
if(do_mob(user, A))
if(user.a_intent == "harm")
src.reagents.reaction(A, TOUCH)
src.reagents.clear_reagents()
else
reagents.trans_to(A, reagents.total_volume)
user.visible_message("<span class='danger'>[user] has smothered \the [A] with \the [src]!</span>", "<span class='danger'>You smother \the [A] with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
return
else if(istype(A) && src in user)
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
if(do_after(user,30, target = A))
@@ -11,14 +11,22 @@
var/const/duration = 13 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets)
var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash(mob/living/target as mob, mob/living/user as mob)
/obj/item/weapon/reagent_containers/food/drinks/bottle/throw_impact(atom/target,mob/thrower)
..(target,thrower)
SplashReagents(target)
smash(target,thrower,1)
return
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash(mob/living/target as mob, mob/living/user as mob, var/ranged = 0)
//Creates a shattering noise and replaces the bottle with a broken_bottle
user.drop_item()
var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(user.loc)
user.put_in_active_hand(B)
if(prob(33))
new/obj/item/weapon/shard(target.loc) // Create a glass shard at the target's location!
var/new_location = get_turf(loc)
var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(new_location)
if(ranged)
B.loc = new_location
else
user.drop_item()
user.put_in_active_hand(B)
B.icon_state = src.icon_state
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
@@ -26,8 +34,15 @@
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
B.icon = I
playsound(src, "shatter", 70, 1)
user.put_in_active_hand(B)
if(isGlass)
if(prob(33))
new/obj/item/weapon/shard(new_location)
playsound(src, "shatter", 70, 1)
else
B.name = "broken carton"
B.force = 0
B.throwforce = 0
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
src.transfer_fingerprints_to(B)
qdel(src)
@@ -100,19 +115,23 @@
add_logs(user, target, "attacked", src)
//The reagents in the bottle splash all over the target, thanks for the idea Nodrak
if(src.reagents)
for(var/mob/O in viewers(user, null))
O.show_message(text("<span class='danger'>The contents of \the [src] splashes all over [target]!</span>"), 1)
src.reagents.reaction(target, TOUCH)
SplashReagents(target)
//Finally, smash the bottle. This kills (del) the bottle.
src.smash(target, user)
return
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/SplashReagents(var/mob/M)
if(src.reagents.total_volume)
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>The contents of \the [src] splashes all over [M]!</span>"), 1)
reagents.reaction(M, TOUCH)
reagents.clear_reagents()
return
//Keeping this here for now, I'll ask if I should keep it here.
/obj/item/weapon/broken_bottle
name = "Broken Bottle"
desc = "A bottle with a sharp broken bottom."
icon = 'icons/obj/drinks.dmi'
@@ -243,3 +262,62 @@
item_state = "carton"
isGlass = 0
list_reagents = list("limejuice" = 100)
////////////////////////// MOLOTOV ///////////////////////
/obj/item/weapon/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/weapon/reagent_containers/food/drinks/bottle/molotov/CheckParts()
var/obj/item/weapon/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 = 0
return
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/target,mob/thrower)
var/firestarter = 0
for(var/datum/reagent/R in reagents.reagent_list)
for(var/A in accelerants)
if(istype(R,A))
firestarter = 1
break
SplashReagents(target)
if(firestarter && active)
target.fire_act()
new /obj/effect/hotspot(get_turf(target))
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov/attackby(obj/item/I, mob/user, params)
if(is_hot(I))
active = 1
user << "<span class='info'>You light the [src] on fire.</span>"
overlays += fire_overlay
if(!isGlass)
spawn(50)
var/counter
var/target = src.loc
for(counter = 0, counter<2, counter++)
if(istype(target, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = target
target = S.loc
if(istype(target, /atom))
var/atom/A = target
SplashReagents(A)
A.fire_act()
qdel(src)
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov/attack_self(mob/user)
if(active && isGlass)
user << "<span class='info'>You snuff out the flame on [src].</span>"
overlays -= fire_overlay
active = 0
+5 -1
View File
@@ -153,11 +153,12 @@
dat += "Weed Killer: <A href='?src=\ref[src];create=wk;amount=1'>Make</A><A href='?src=\ref[src];create=wk;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "Pest Killer: <A href='?src=\ref[src];create=pk;amount=1'>Make</A><A href='?src=\ref[src];create=pk;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "</div>"
dat += "<h3>Leather:</h3>"
dat += "<h3>Leather and Cloth:</h3>"
dat += "<div class='statusDisplay'>"
dat += "Wallet: <A href='?src=\ref[src];create=wallet;amount=1'>Make</A> ([100/efficiency])<BR>"
dat += "Book bag: <A href='?src=\ref[src];create=bkbag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Plant bag: <A href='?src=\ref[src];create=ptbag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Rag: <A href='?src=\ref[src];create=rag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Mining satchel: <A href='?src=\ref[src];create=mnbag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Chemistry bag: <A href='?src=\ref[src];create=chbag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Botanical gloves: <A href='?src=\ref[src];create=gloves;amount=1'>Make</A> ([250/efficiency])<BR>"
@@ -275,6 +276,9 @@
if("chbag")
if (check_cost(200/efficiency)) return 0
else new/obj/item/weapon/storage/bag/chemistry(src.loc)
if("rag")
if (check_cost(200/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/glass/rag(src.loc)
if("gloves")
if (check_cost(250/efficiency)) return 0
else new/obj/item/clothing/gloves/botanic_leather(src.loc)