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

Coal item, and generator requires coal #466

Closed
wants to merge 6 commits into from

Conversation

WilcoDW
Copy link
Contributor

@WilcoDW WilcoDW commented Aug 21, 2016

Added a coal item with my original sprite that i created, the coal spawns in the world and is used to power the power generator.

also changed the way things spawn and included Ice in it from someone else's commit.

@guntherwullaert
Copy link
Contributor

Sorry due to me you have conflicts now in the world generator
but you can easily add to the xml file your requirement :)

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

Fixed the issues, added my coal to your new world generator system with XML

@AmusedNetwork
Copy link
Contributor

Shouldn't the chances add up to 100%? Or are the percentages of each item being spawned individual? (currently it adds up to 130%)

@guntherwullaert
Copy link
Contributor

guntherwullaert commented Aug 21, 2016

everything above 100 % is ignored. You should change raw iron to 50 % ! Did it work correctly how it is now, because it should not ?

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

Fixed,
<Ressource objectType="Raw Iron" maxStack="50" chance="0.7" /> <Ressource objectType="Ice" maxStack="10" chance="0.15" /> <Ressource objectType="Coal" maxStack="20" chance="0.15" />

we do need a better system for the future though

@guntherwullaert
Copy link
Contributor

guntherwullaert commented Aug 21, 2016

Perfect :D Should be ready to merge now. If only an moderator would be online now. Yeah that only is a system for the meantime...

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

I cant get my precious coal to spawn, also the menus dont work, is it me? and does someone have a sollution

NullReferenceException: Object reference not set to an instance of an object MenuController.Start () (at Assets/Scripts/UI/InGameUI/MenuController.cs:31)

Thats one thing, i made it debug log the number of spawnable resources and it said 3, so far so good, then i made it debug log the objectType everytime it looped in the foreach, it only debug logs Raw Iron and Ice

@guntherwullaert
Copy link
Contributor

guntherwullaert commented Aug 21, 2016

Thank you, you found a bug .... there was some testing code in there Line 58 should be:
int chance = i.stackSize;

it was:

int chance = ressources[0].stackSize;

please change this as well, the menus should work though

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

It works, thanks

@guntherwullaert
Copy link
Contributor

Do you still have problems with the menus ?

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

Yes but thats a bug i am going to file in the Issues page, you can take a look at it there

here: #503

@guntherwullaert
Copy link
Contributor

ok thanks for committing the bug for me :) the coal is a really nice idea but wasn't there another guy with power cells or something ? Found it : #370 someone will need to decide which to take

@Grenkin1988
Copy link
Contributor

#506 Made changes in order to enable power system to react on changes to powerValue

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

Somehow fixed the UI issue, idk how

@Tranberry
Copy link
Contributor

Are there natural occurrences of coal in space? Or at the least is it common in space?

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

I am not too sure, i would think carbon is availible which is kinda the same, and we can always change it so it requires oxygen or something.

@guntherwullaert
Copy link
Contributor

Best would be if there was a coal power generator and one on power cells. So that in the beginning you search for coal because that is the cheap way but coal is a limited resource and then you switch over to the power cell power generator so essentially we have two generators :)

@Tranberry
Copy link
Contributor

I would switch to gas, but I won't complain more than maybe mod it later.

@Xeni91
Copy link
Contributor

Xeni91 commented Aug 21, 2016

Well I decided to go with Power Cells, because we are in Space and are not human ... to go with gas or coal seems a bit boring

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

but why do we use iron and steel? if we are not human we might as well be using different metals or different materials all together

@Xeni91
Copy link
Contributor

Xeni91 commented Aug 21, 2016

was not my idea just saying ^^ and yes you are right

@Tranberry
Copy link
Contributor

@wilcomega I'm with you on that, but iron is 'common'.

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

True :) but coal is eesentially just carbon, isnt that common too? and we can and probably will change it in the future anyways to something more fitting but for now i think this is a good addition

@WardBenjamin
Copy link
Collaborator

Fyi, you can't find coal and oil in space since they're both made from biologicals and require huge amounts of compression and such, which will only happen in a gravity well.

Maybe swap out coal with something else? Some kind of nuclear fuel like uranium or something?

@guntherwullaert
Copy link
Contributor

@WardBenjamin can you take only that bug fix or should I make a new pull request ? Because that is kind off important

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

If you guys want to you can swap coal out for uranium or something similar. but i am waiting for this thing to get merged or closed

@guntherwullaert
Copy link
Contributor

yes me as well

@WardBenjamin
Copy link
Collaborator

@wilcomega @gunthergun I'm going to close this, but please do open a new PR with the bug fix!

@guntherwullaert
Copy link
Contributor

@WardBenjamin #495 fixes all of the bugs in the worldgenerator :)

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

@WardBenjamin The bugs are fixed, could you be so kind to re-open it?

@guntherwullaert
Copy link
Contributor

@wilcomega he closed this because he does not want coal if you want to have such a system you should make a new PR with uranium or something

@WardBenjamin
Copy link
Collaborator

@wilcomega @gunthergun I mean, I'm not opposed to having coal in the game, but it's not something that we should have generating in asteroids. As far as those go, basically only metals, carbon, and other elements/simple compounds (silicon would be a cool one to add, for computers and stuff) show up in asteroids, and things like ammonia and water (along with misc. rock) show up in comets.

@guntherwullaert
Copy link
Contributor

@WardBenjamin thanks for clearing that up

@WilcoDW
Copy link
Contributor Author

WilcoDW commented Aug 21, 2016

New one is #524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants