[quote=âpisskop, post:107, topic:12858â]Anyone know why my custom lighter can start overworld fires but wont spark a cigar?
{
âidâ: âref_lighter_stringâ,
âtypeâ: âTOOL_ARMORâ,
ânameâ: âwearable lighterâ,
âcopy-fromâ: âlighterâ,
âdescriptionâ: âA lighter with a bit of string and taping to allow it to be worn about the neck like a lanyard. A bit fumbly to get a hold of, but perfectly servicable.â,
âweightâ: 25,
âvolumeâ: 0,
âpriceâ: 3000,
âmaterialâ: âaluminumâ,
âsymbolâ: â,â,
âcolorâ: âlight_grayâ,
âcoverageâ: 1,
âencumbranceâ: 0,
âstorageâ: 0,
âwarmthâ: 0,
âmaterial_thicknessâ: 1,
âammoâ: âgasolineâ,
âmax_chargesâ: 50,
ârand_chargesâ: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 5, 7, 11, 13, 17, 21, 27 ],
âcharges_per_useâ: 1,
âuse_actionâ: [
{
âtypeâ: âfirestarterâ,
âmovesâ: 60,
âmoves_slowâ: 600
}
]
},[/quote]
int iuse::smoking(player *p, item *it, bool, const tripoint&)
{
bool hasFire = (p->has_charges("fire", 1));
// make sure we're not already smoking something
if( !check_litcig( *p ) ) {
return 0;
}
if (!hasFire) {
p->add_msg_if_player(m_info, _("You don't have anything to light it with!"));
return 0;
}
ref_lighter_on = refillable lighter (lit) also does not provide fire for cigarettes.
You can check this in LUA console by this command:
game.add_msg(tostring(player:has_charges(âfireâ,1)))
Probably same issue as described in https://github.com/CleverRaven/Cataclysm-DDA/issues/21005