Skip to content

Commit

Permalink
fixes custom chemicals not working on the flamer nozzle (#5687)
Browse files Browse the repository at this point in the history
# About the pull request

custom chems now work on the flamer nozzle

# Explain why it's good for the game

bug fix
may impact balance minorly due to costing less when making a flamer chem
cause of the lack of flowing property required when using the nozzle

# Testing Photographs and Procedure


https://github.com/cmss13-devs/cmss13/assets/140007537/33dc6ad4-145d-477d-a357-a7c1809eefe0



# Changelog
:cl:
fix: custom flamer chemicals now work on the flamer nozzle
/:cl:

---------

Co-authored-by: Drathek <[email protected]>
  • Loading branch information
iloveloopers and Drulikar authored Mar 1, 2024
1 parent a5172aa commit ceb17fd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
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"

/// 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 @@ -3226,7 +3226,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

0 comments on commit ceb17fd

Please sign in to comment.