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

fixes custom chemicals not working on the flamer nozzle #5687

Merged
merged 8 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions code/datums/ammo/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
/// that will be given to a projectile with the current ammo datum
var/list/list/traits_to_give

var/flamer_reagent_type = /datum/reagent/napalm/ut
var/flamer_reagent_id = "utnapthal"
Drulikar marked this conversation as resolved.
Show resolved Hide resolved

/// The flicker that plays when a bullet hits a target. Usually red. Can be nulled so it doesn't show up at all.
var/hit_effect_color = "#FF0000"
Expand Down Expand Up @@ -237,11 +237,12 @@

P.fire_at(new_target, original_P.firer, original_P.shot_from, P.ammo.max_range, P.ammo.shell_speed, original_P.original) //Fire!

/datum/ammo/proc/drop_flame(turf/T, datum/cause_data/cause_data) // ~Art updated fire 20JAN17
if(!istype(T))
/datum/ammo/proc/drop_flame(turf/turf, datum/cause_data/cause_data) // ~Art updated fire 20JAN17
if(!istype(turf))
return
if(locate(/obj/flamer_fire) in T)
if(locate(/obj/flamer_fire) in turf)
return

var/datum/reagent/R = new flamer_reagent_type()
new /obj/flamer_fire(T, cause_data, R)
var/datum/reagent/chemical = GLOB.chemical_reagents_list[flamer_reagent_id]

new /obj/flamer_fire(turf, cause_data, chemical)
4 changes: 2 additions & 2 deletions code/datums/ammo/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
drop_flame(get_turf(P), P.weapon_cause_data)

/datum/ammo/flamethrower/tank_flamer
flamer_reagent_type = /datum/reagent/napalm/blue
flamer_reagent_id = "napalmx"

/datum/ammo/flamethrower/sentry_flamer
flags_ammo_behavior = AMMO_IGNORE_ARMOR|AMMO_IGNORE_COVER|AMMO_FLAME
flamer_reagent_type = /datum/reagent/napalm/blue
flamer_reagent_id = "napalmx"

accuracy = HIT_ACCURACY_TIER_8
accurate_range = 6
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3199,7 +3199,7 @@ Defined in conflicts.dm of the #defines folder.

var/obj/projectile/P = new(src, create_cause_data(initial(name), user, src))
var/datum/ammo/flamethrower/ammo_datum = new projectile_type
ammo_datum.flamer_reagent_type = flamer_reagent.type
ammo_datum.flamer_reagent_id = flamer_reagent.id
P.generate_bullet(ammo_datum)
P.icon_state = "naptha_ball"
P.color = flamer_reagent.color
Expand Down
Loading