-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement relic recharge #2284
Implement relic recharge #2284
Conversation
Started testing and everything works as expected so far. Does retain the "unloads a none if assigned an ammo type and unloaded after recharging from empty" behavior if you attempt that:
However, this is status quo behavior, artifact recharging will already do that if abused in this manner, so fixing it's most likely outside scope. |
|
||
bool check_recharge_reqs( const item &itm, const relic_recharge &rech, const Character &carrier ) | ||
{ | ||
switch( rech.req ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This switch looks like it really wants to be something like rech.req_impl.check_reqs( itm, carrier )
.
Untestable, but only modders can be affected. |
Bit belatedly, I did some basic testing in the process of implementing chaosvolt/cdda-arcana-mod#307, compiles and recharging seems to work as intended. Tested both time-based and trap-removal types. Will be able to also test solar when I get the opportunity to prepare an update for Cata++ as well. |
I tested it manually by enabling |
Summary
SUMMARY: Features "Relics can recharge now"
Purpose of change
Working towards #1816 (implements step 3)
Describe the solution
Depends on #2283 and #2254Rebased on latestupload
, does not depend on them anymore.This PR implements relic recharge that mirrors existing artifact recharge code, except it works for NPCs and also has a variety of knobs accessible from JSON.
Tweaked behavior of "close to skin" to be more transparent.
Describe alternatives you've considered
I'm not sure how reliable it is. Also, no
ARTC_PORTAL
, which is a thing CV wants.Testing
TODO:
ACR_SKIN
write tests?Feeling lazy, added test relics but no testsadd more features?Let's wait for actors framework on this