Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upActive mutation expansion/bugfix #8962
Conversation
KA101
added some commits
Sep 13, 2014
kevingranade
added
the
(S2 - Confirmed)
label
Sep 13, 2014
KA101
changed the title
Active muttation expansion/bugfix
Active mutation expansion/bugfix
Sep 13, 2014
KA101
reviewed
Sep 13, 2014
| if (valid.size() == 0) { | ||
| add_msg(m_bad, _("You focus, but are too hemmed in to birth a new slimespring!")); | ||
| return; | ||
| } |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Sep 13, 2014
|
|
||
| // TODO: Active mutations need processed here. | ||
| // Appears to need a fundamental overhaul of their handling, | ||
| // which I'm not gonna start at 3 AM. -KA101. |
This comment has been minimized.
This comment has been minimized.
KA101
Sep 13, 2014
Author
Contributor
Specifically, that for loop at 5556 that processes bionic charge, doesn't wanna be adapted for mutations. Without an analogue, mutations only ever drain charge on activation. Issue with adapting appears to be variable/vector syntax.
This comment has been minimized.
This comment has been minimized.
kevingranade
Sep 14, 2014
Member
I think you're looking for something like:
for( auto mut : my_mutations ) {
if( !traits[mut].powered ) {
continue;
}
u.fatigue += traits[mut].cost;
add_msg( "%s is active, and costing %d fatigue.", mut.c_str(), traits[mut].cost );
}
Obviously not exactly that, I'm not totally sure how the values hook up.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
yaay! |
kevingranade
self-assigned this
Sep 13, 2014
kevingranade
reviewed
Sep 13, 2014
| "category" : ["MUTCAT_FELINE"], | ||
| "active" : true, | ||
| "cost" : 0, | ||
| "time" : 100 |
This comment has been minimized.
This comment has been minimized.
kevingranade
Sep 13, 2014
Member
This seems like a pretty long time for retracting claws, it's nearly instantaneous with housecats.
This comment has been minimized.
This comment has been minimized.
KA101
Sep 13, 2014
Author
Contributor
Ah. That's supposed to be the amount of time they stay extended. Kinda like the furnace and battery-drain CBMs, they're supposed to time out (or, back in) after a while.
This comment has been minimized.
This comment has been minimized.
Barhandar
Sep 14, 2014
Contributor
From my experience with both CBMs, the time after them is activation time, they stay active forever (and being energy-sources, even if you zero out on power) after you spend so-and-so turns to activate them.
This comment has been minimized.
This comment has been minimized.
Rivet-the-Zombie
Sep 14, 2014
Member
It's time-per-cost. The 'time' slot is how many turns before you have to pay the cost again or else it deactivates. If it has no cost, it never deactivates until you tell it to do so. But that's just CBMs.
This comment has been minimized.
This comment has been minimized.
KA101
Sep 14, 2014
Author
Contributor
And for the record, if it has 0 time, it never activates at all. But changing the on/off status for a given mutation is instant/takes no time, and I'm content with that.
kevingranade
removed their assignment
Sep 15, 2014
KA101
added some commits
Sep 21, 2014
This comment has been minimized.
This comment has been minimized.
|
Time-based actives are charging properly on my end (and at least one more mutation is active and functioning properly). May as well get this in seeing as there's a bugfix included. |
KA101
added
the
ready
label
Sep 21, 2014
Rivet-the-Zombie
self-assigned this
Sep 21, 2014
This comment has been minimized.
This comment has been minimized.
|
Everything looks to be working perfectly. |
KA101 commentedSep 13, 2014
This makes a few more mutations Active: the Retractable Claws, Insect Wings, and combat tails. Also fixes #8959.