Skip to content

Commit

Permalink
Restyle new matchbomb iuse methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingranade committed Sep 7, 2013
1 parent aa45d25 commit 9bc757c
Showing 1 changed file with 23 additions and 28 deletions.
51 changes: 23 additions & 28 deletions iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3333,38 +3333,33 @@ void iuse::dynamite(game *g, player *p, item *it, bool t)

void iuse::dynamite_act(game *g, player *p, item *it, bool t)
{
point pos = g->find_item(it);
if (pos.x == -999 || pos.y == -999)
return;
if (t) // Simple timer effects
g->sound(pos.x, pos.y, 0, _("ssss..."));
else // When that timer runs down...
g->explosion(pos.x, pos.y, 60, 0, false);
point pos = g->find_item(it);
if (pos.x == -999 || pos.y == -999) { return; }
// Simple timer effects
if (t) { g->sound(pos.x, pos.y, 0, _("ssss..."));
// When that timer runs down...
} else { g->explosion(pos.x, pos.y, 60, 0, false); }
}

void iuse::matchbomb(game *g, player *p, item *it, bool t)
{
if (!p->use_charges_if_avail("fire", 1))
{
it->charges++;
g->add_msg_if_player(p,_("You need a lighter!"));
return;
}
g->add_msg_if_player(p,_("You light the match head bomb."));
it->make(g->itypes["matchbomb_act"]);
it->charges = 3;
it->active = true;
void iuse::matchbomb(game *g, player *p, item *it, bool t) {
if( !p->use_charges_if_avail("fire", 1) ) {
it->charges++;
g->add_msg_if_player(p,_("You need a lighter!"));
return;
}
g->add_msg_if_player(p,_("You light the match head bomb."));
it->make( g->itypes["matchbomb_act"] );
it->charges = 3;
it->active = true;
}

void iuse::matchbomb_act(game *g, player *p, item *it, bool t)
{
point pos = g->find_item(it);
if (pos.x == -999 || pos.y == -999)
return;
if (t) // Simple timer effects
g->sound(pos.x, pos.y, 0, _("ssss..."));
else // When that timer runs down...
g->explosion(pos.x, pos.y, 24, 0, false);
void iuse::matchbomb_act(game *g, player *p, item *it, bool t) {
point pos = g->find_item(it);
if (pos.x == -999 || pos.y == -999) { return; }
// Simple timer effects
if (t) { g->sound(pos.x, pos.y, 0, _("ssss..."));
// When that timer runs down...
} else { g->explosion(pos.x, pos.y, 24, 0, false); }
}

void iuse::firecracker_pack(game *g, player *p, item *it, bool t)
Expand Down

0 comments on commit 9bc757c

Please sign in to comment.