Skip to content

Commit

Permalink
Flamethrowers count as firestarters for lighting up bombs (CleverRave…
Browse files Browse the repository at this point in the history
…n#77227)

* Added `firestarter` `use_action` to `flamethrower_base`

* Guns may use charges too
  • Loading branch information
Night-Pryanik authored Oct 22, 2024
1 parent d961ddc commit aeaca88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion data/json/items/classes/gun.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"reload": 4,
"flags": [ "NEVER_JAMS", "FIRESTARTER" ],
"ammo_to_fire": 100,
"faults": [ ]
"faults": [ ],
"use_action": { "type": "firestarter" }
},
{
"abstract": "launcher_base",
Expand Down
2 changes: 1 addition & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12462,7 +12462,7 @@ bool item::use_charges( const itype_id &what, int &qty, std::list<item> &used,
return VisitResponse::NEXT;
}

if( e->is_tool() ) {
if( e->is_tool() || e->is_gun() ) {
if( e->typeId() == what || ( in_tools && e->ammo_current() == what ) ) {
int n;
if( carrier ) {
Expand Down

0 comments on commit aeaca88

Please sign in to comment.