tgstation / tgstation

The /tg/station branch of SS13.
https://www.tgstation13.org/
GNU Affero General Public License v3.0
1.67k stars 4.9k forks source link

flamethrowers heat up the gasses they expel, even if they've been made using a condenser #61043

Open ATH1909 opened 3 years ago

ATH1909 commented 3 years ago
        if(igniter)
            igniter.ignite_turf(src,T)
        else
            default_ignite(T)
/obj/item/assembly/igniter/proc/ignite_turf(obj/item/flamethrower/F,turf/open/location,release_amount = 0.05)
    F.default_ignite(location,release_amount)
/obj/item/flamethrower/proc/default_ignite(turf/target, release_amount = 0.05)
    //TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
    //Transfer 5% of current tank air contents to turf
    var/datum/gas_mixture/tank_mix = ptank.return_air()
    var/datum/gas_mixture/air_transfer = tank_mix.remove_ratio(release_amount)

    if(air_transfer.gases[/datum/gas/plasma])
        air_transfer.gases[/datum/gas/plasma][MOLES] *= 5 //Suffering
    target.assume_air(air_transfer)
    //Burn it based on transfered gas
    target.hotspot_expose((tank_mix.temperature*2) + 380,500)
    //location.hotspot_expose(1000,500,1)

"target.hotspot_expose((tank_mix.temperature*2) + 380,500)"

ignite_turf() isn't overridden by anything, so all igniters (including condensers) expose tiles that they expel air onto to a hotspot of the same temperature, regardless of the heat of the igniter.

/obj/item/assembly/igniter/proc/flamethrower_process(turf/open/location)
    location.hotspot_expose(heat,2)

the only thing that the kind of igniter you use affects in your flamethrower is the temperature that a lit flamethrower's flame passively exposes the air around it to.

Ghilker commented 3 years ago

hhhhhhh this is not an easy fix, this will need a refactor of how the flamethrower is built (also other part of it need to be done). This is because the condenser is a subtype of the igniter so this allows you to build a flamethrower with the condenser but the item will ignore the fact that those two are different. To fix this you'd need to differentiate the two types of flamethrowers and to set the condenser to its own path. Maybe i'll get to it but not now

ATH1909 commented 3 years ago

hhhhhhh this is not an easy fix, this will need a refactor of how the flamethrower is built (also other part of it need to be done). This is because the condenser is a subtype of the igniter so this allows you to build a flamethrower with the condenser but the item will ignore the fact that those two are different. To fix this you'd need to differentiate the two types of flamethrowers and to set the condenser to its own path. Maybe i'll get to it but not now

no?

all you would need to do would be to make hotspot_expose((tank_mix.temperature*2) + 380,500) not add a hardcoded value. just add an extra parameter to default_ignite(), incorporate that parameter in that hotspot_expose() equation, and make ignite_turf() call default_ignite() with the igniter's heat value as the third parameter.

LemonInTheDark commented 3 years ago

To be more exact you would want the igniter to decide how hot to make it in a reasonably expandable way. Should all be handled by the igniter, tho honestly this should maybe have been dealt with back when condensers were added.

projectkepler-ru commented 1 month ago

Can confirm this happens, was able to test it as far back as may 2024 with 3 kelvin plasma