[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