Skip to content
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

Add water source long actions #9793

Merged
merged 6 commits into from Nov 2, 2014

Conversation

Projects
None yet
6 participants
@i2amroy
Copy link
Member

commented Nov 2, 2014

Supplants #9760.

This adds two new long actions, one for filling containers from normal water sources and one from salt water sources. Water is added at a rate of 3 charges per turn and is cancelable just like any other long action.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Nov 2, 2014

Okay this looks like an excellent solution.

@Rivet-the-Zombie Rivet-the-Zombie self-assigned this Nov 2, 2014

@KA101

This comment has been minimized.

Copy link
Contributor

commented Nov 2, 2014

Yeah, this was the ideal solution.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Nov 2, 2014

Takes almost a half an hour to fill a 55 gallon drum.

@i2amroy

This comment has been minimized.

Copy link
Member Author

commented Nov 2, 2014

It's an easy switch if you want me to change the rate (like, 4 lines). I was just basing the rate on KA101's earlier comments about how approximately 750 mL was the most he could get into a container in 6 seconds.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Nov 2, 2014

You can go up to 10-12 and I won't complain too hard. I was operating on the presumption that we're still going through an opening that's about an inch and a half--when I've seen caps on drums, jerrycans, etc, they're not much larger than that.

If you can take the entire top off the unit (I know you can with a 30-gal plastic drum, at least the ones I see on my commute) I'd agree that it would fill MUCH faster. I'll waive the argument about "pick it back up out of the water". ;-)

@i2amroy

This comment has been minimized.

Copy link
Member Author

commented Nov 2, 2014

There, fills at a rate of 10 per turn now, so a 55 gallon drum only takes 2 minutes.

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented Nov 2, 2014

Does this really need two (nearly) identical functions? You can store any value (e.g. the liquid type) in player_activity::str_values or you can store a number indicating salt water / fresh water in player_activity::values.

@i2amroy

This comment has been minimized.

Copy link
Member Author

commented Nov 2, 2014

Ah, I was unaware of str_values, if we've got something like that I can easily roll these together than.

Rivet-the-Zombie added a commit that referenced this pull request Nov 2, 2014

Merge pull request #9793 from i2amroy/Water-sources
Add water source long actions

@Rivet-the-Zombie Rivet-the-Zombie merged commit f142459 into CleverRaven:master Nov 2, 2014

1 check passed

default
Details
@Robik81

This comment has been minimized.

Copy link
Contributor

commented Nov 2, 2014

Thanks for stepping up and making this i2amroy.

I would adapt it for unloading and moving liquids in AIM later, but I am not sure what properties I have to pass for all possible liquids.

@@ -1598,6 +1598,9 @@ void game::process_activity()
activity_on_finish();
}
} while( u.moves > 0 && u.activity.type != ACT_NULL );
// Cleanup
u.activity.values.clear();

This comment has been minimized.

Copy link
@kevingranade

kevingranade Nov 2, 2014

Member

What are you trying to do here? This broke other activities very badly.

This comment has been minimized.

Copy link
@i2amroy

i2amroy Nov 3, 2014

Author Member

Breaking everything apparently. : /

This was originally just a quick fix that I cooked up while rather tired. I noticed some of the other activities cleared the various activity values, and some didn't, which seemed horribly inconsistent. Being as tired as I was I probably assumed that this was a good place to ensure that activity values from one activity didn't interfere with others. Wipe these lines if they are causing problems, but I'm a little busy with something else now that the weekend is done so I can't PR it up right now.

@malhawee malhawee referenced this pull request Nov 3, 2014

Closed

Action abort phrase #9816

@i2amroy i2amroy deleted the i2amroy:Water-sources branch Nov 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.