Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Molotov Crafting Fix + Mapped in Molotov #3899

Merged
merged 11 commits into from
Dec 12, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -3533,7 +3533,7 @@
/obj/structure/flippedtable{
dir = 4
},
/obj/item/reagent_containers/food/drinks/bottle/molotov,
/obj/item/reagent_containers/food/drinks/molotov/full,
/obj/item/lighter/greyscale{
pixel_x = -8;
pixel_y = -7
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/crafting/recipes/weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/datum/crafting_recipe/molotov
name = "Molotov"
result = /obj/item/reagent_containers/food/drinks/bottle/molotov
result = /obj/item/reagent_containers/food/drinks/molotov
reqs = list(/obj/item/reagent_containers/glass/rag = 1,
/obj/item/reagent_containers/food/drinks/bottle = 1)
parts = list(/obj/item/reagent_containers/food/drinks/bottle = 1)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@
/obj/item/screwdriver,
/obj/item/lighter,
/obj/item/multitool,
/obj/item/reagent_containers/food/drinks/bottle/molotov,
/obj/item/reagent_containers/food/drinks/molotov,
/obj/item/grenade/c4,
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb,
/obj/item/reagent_containers/food/snacks/grown/firelemon
Expand Down
28 changes: 22 additions & 6 deletions code/modules/food_and_drinks/drinks/drinks/bottle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -453,14 +453,27 @@
isGlass = TRUE

////////////////////////// MOLOTOV ///////////////////////
/obj/item/reagent_containers/food/drinks/bottle/molotov
/obj/item/reagent_containers/food/drinks/molotov
name = "molotov cocktail"
desc = "A throwing weapon used to ignite things, typically filled with an accelerant. Recommended highly by desperate militias and revolutionaries. Light and toss."
icon_state = "vodkabottle"
fill_icon_thresholds = list(0, 10, 20, 30, 40, 50, 60, 70, 80, 90)
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'
pickup_sound = 'sound/items/handling/bottle_pickup.ogg'
drop_sound = 'sound/items/handling/bottle_drop.ogg'
var/const/duration = 13 //Directly relates to the 'knockdown' duration. Lowered by armor (i.e. helmets)
isGlass = TRUE
foodtype = ALCOHOL
list_reagents = list()
var/active = 0

/obj/item/reagent_containers/food/drinks/bottle/molotov/CheckParts(list/parts_list)
/obj/item/reagent_containers/food/drinks/molotov/CheckParts(list/parts_list)
..()
var/obj/item/reagent_containers/food/drinks/bottle/B = locate() in contents
if(B)
Expand All @@ -471,7 +484,7 @@
isGlass = FALSE
return

/obj/item/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
/obj/item/reagent_containers/food/drinks/molotov/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/firestarter = FALSE
for(var/datum/reagent/reagent as anything in reagents.reagent_list)
if(reagent.accelerant_quality)
Expand All @@ -488,7 +501,7 @@
new /obj/effect/hotspot(otherT)
..()

/obj/item/reagent_containers/food/drinks/bottle/molotov/attackby(obj/item/I, mob/user, params)
/obj/item/reagent_containers/food/drinks/molotov/attackby(obj/item/I, mob/user, params)
if(I.get_temperature() && !active)
active = TRUE
log_bomber(user, "has primed a", src, "for detonation")
Expand All @@ -498,7 +511,7 @@
if(!isGlass)
addtimer(CALLBACK(src, PROC_REF(explode)), 5 SECONDS)

/obj/item/reagent_containers/food/drinks/bottle/molotov/proc/explode()
/obj/item/reagent_containers/food/drinks/molotov/proc/explode()
if(!active)
return
if(get_turf(src))
Expand All @@ -510,7 +523,7 @@
target.fire_act()
qdel(src)

/obj/item/reagent_containers/food/drinks/bottle/molotov/attack_self(mob/user)
/obj/item/reagent_containers/food/drinks/molotov/attack_self(mob/user)
if(active)
if(!isGlass)
to_chat(user, "<span class='danger'>The flame's spread too far on it!</span>")
Expand All @@ -519,6 +532,9 @@
cut_overlay(custom_fire_overlay ? custom_fire_overlay : GLOB.fire_overlay)
active = 0

/obj/item/reagent_containers/food/drinks/molotov/full
list_reagents = list(/datum/reagent/consumable/ethanol/vodka = 100)

/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."
Expand Down
Loading