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

Lava vents spawn chunks of sulfur #13934

Merged
merged 5 commits into from Nov 14, 2015

Conversation

Projects
None yet
4 participants
@jokermatt999
Copy link
Contributor

commented Nov 7, 2015

Fumaroles/lava vents now occasionally spawn large chunks of sulfur nearby, which can be broken down into sulfur.

@@ -13947,6 +13947,9 @@ void mx_fumarole(map &m, const tripoint &)
std::vector<point> fumarole = line_to(x1, y1, x2, y2, 0);
for (auto &i : fumarole) {
m.ter_set(i.x, i.y, t_lava);
if (one_in(10)){
m.spawn_item(i.x-1, i.y-1, "chunk_sulfur");

This comment has been minimized.

Copy link
@Coolthulhu

Coolthulhu Nov 7, 2015

Contributor

Code quality: spacing (if( x ) { etc., not if (x){)

This could use a random position roll instead of always putting it in the same relative spot.

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented Nov 8, 2015

Out of curiosity, why the extra item? The recipe is relatively easy, auto-learned and only requires a rock. It's no obstruction at all. Can one even use the resulting sulfur without a fabrication skill of at least 1? (That would be the only situation where it actually matters.)

Or is this a realism thing? (I've never been near lava.)

@jokermatt999

This comment has been minimized.

Copy link
Contributor Author

commented Nov 8, 2015

Partly realism, partly a hacky-fix for sulfur spawning in canvas bags.

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2015

partly a hacky-fix for sulfur spawning in canvas bags.

That would make a nice bug.

However, for future reference: one could use map::spawn_item, it even allows to specific the charges (random in this example):

m.spawn_item( some_point_or_x_and_y, "sulfur", 1, rng( 1, 100 ) );
@jokermatt999

This comment has been minimized.

Copy link
Contributor Author

commented Nov 9, 2015

Good to know, thank you!

"name_plural" : "chunks of sulfur",
"symbol" : "*",
"color" : "yellow",
"description" : "A large chunk of pure sulfur. Break it up to use it.",

This comment has been minimized.

Copy link
@Coolthulhu

Coolthulhu Nov 9, 2015

Contributor

Should have 2 spaces (rather than one) after sentence end.

Doubling spacing
Also remove unnecessarily duplicated comment.

@kevingranade kevingranade merged commit 6799074 into CleverRaven:master Nov 14, 2015

1 check passed

default
Details
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.