Awesome, KA.
Is there any chance I could get this code I altered put in as a pull request as well? I know this is off topic, but if you’re the magic man, the person who can get things done in the code, I figured this was a good time to ask.
I wanted to make it so that meth was more realistic. If this code works like I think it should, it ought to make meth injectable with a chance of causing infection as well. Please tell me if this is functional, and if so, would you kindly add it? I want to be part of the community.
[code]}
int iuse::meth(player *p, item *it, bool t) {
int duration = 5 * (10 );
if (p->has_amount(“apparatus”, 1) && p->use_charges_if_avail(“fire”, 1)) {
g->add_msg_if_player(p,(“You smoke your impure meth. The world speeds up, slightly, and you taste burning plastic.”));
duration *= (p->has_trait(“LIGHTWEIGHT”) ? 1.8 : 1.5);
} else {
if (p->has_amount(“syringe”, 1) && p->use_charges_if_avail(“fire”, 1)) {
g->add_msg_if_player(p,(“You inject meth you cooked in a jug. Your heart races.”));
duration *= (p->has_amount(“syringe”, 1) ? 3.8 : 3.5);
p->add_disease(“infection”, rng(10, 20));
} else {
g->add_msg_if_player(p,_(“You snort some of the worst shabu-shabu you’ve ever had. Your nostrils are bleeding.”));
}
if (!p->has_disease(“meth”)) {
duration += 450;
}
if (duration > 0) {
int hungerpen = (p->str_cur < 10 ? 20 : 30 - p->str_cur);
p->hunger -= hungerpen;
p->add_disease(“meth”, duration);
}
return it->type->charges_to_use();
}[/code]
People also inject cocaine. John Belushi died from such a thing.
}
int iuse::coke(player *p, item *it, bool t) {
g->add_msg_if_player(p,_("You snort a bump of coke."));
int duration = 21 - p->str_cur + rng(0,10);
if (p->has_trait("LIGHTWEIGHT")) {
duration += 20;
} else {
if (p->has_amount("syringe", 1) && p->use_charges_if_avail("fire", 1)) {
g->add_msg_if_player(p,_("You shoot up, injection site numb, heart beating like a race horse."));
duration *= (p->has_amount("syringe", 1) ? 3.8 : 3.5);
p->add_disease("infection", rng(10, 20));
}
p->hunger -= 8;
p->add_disease("high", duration);
return it->type->charges_to_use();
}