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

Make editor able to place nucleus #678

Closed
hhyyrylainen opened this Issue Dec 26, 2018 · 7 comments

Comments

Projects
None yet
4 participants
@hhyyrylainen
Copy link
Contributor

hhyyrylainen commented Dec 26, 2018

Right now the nucleus action is the "new cell" action. That should be split so that it is possible to place one nucleus in a cell (if it doesn't have one).

And a new button is needed (and an icon) for the nucleus placing.

@Dak2896

This comment has been minimized.

Copy link
Contributor

Dak2896 commented Dec 26, 2018

I add in gui_editor possibility to add nucleus, it cost 90 but we can think about balancing later, of course there is no image and good description but at least it works.

@Untrustedlife

This comment has been minimized.

Copy link
Contributor

Untrustedlife commented Dec 26, 2018

I think it should cost 100, also it needs to lock the ability to place other organelles that arent prokaryotic in the editor, also it needs to actually make you look like a bacteria when you dont have it, also we are working on a hot-fix release not 0.4.1 right now.

@hhyyrylainen

This comment has been minimized.

Copy link
Contributor

hhyyrylainen commented Dec 26, 2018

Locking the things is a separate issue: #679

@TjWhale

This comment has been minimized.

Copy link
Contributor

TjWhale commented Dec 26, 2018

@Dak2896 thanks for getting into this issue! I agree with @Untrustedlife I think it should cost 100MP as it's a big moment in evolutionary history. It's cool you're already getting familiar with the code base.

@Dak2896

This comment has been minimized.

Copy link
Contributor

Dak2896 commented Dec 26, 2018

Ok now the only one problem is to figure out a way to lock possibility to put another nucleus, i try with some flag variable but of course if function is called again it's reset again, what about to class member variable?

But species dictionary is update every mutation right? so it should be possibile to read acutal organelles and so avoid duplication of nucleus

@Dak2896

This comment has been minimized.

Copy link
Contributor

Dak2896 commented Dec 26, 2018

It seems working now, it cost 100, i make nucleus big 9 instad of 10 because at begin cell now is 1 hex.
and you can create just one nucleus, i think next step is make first evolution little bit harder then others, now getting a nucleus is quite easy

hhyyrylainen added a commit that referenced this issue Jan 15, 2019

nucleus in editor, locked organelle, gui change #677 #678 #679 (#709)
* nucleus in editor, locked organelle, gui change

* fix function editor

* clang format fix

* fix space at line 196

* fix function onSelectNewOrganelle

from common.isEngine to common.isInEngine

* span space

* second span space

* space in microbe editor

* restore GUI function, update editor function

I restore GUI as was, the check is made inside the listener.

I just notice that the editor if statment wasn't correct,

* fix bracket sapce

* fix some spaces and usless  blank lines

* fixes if statment

remove jquery, use plain javascript

* fix space

* fix brackets

* removed jquery line

* fix clang format line 271

* update check for UpdateGuiButtons function

- button are disabled only if weren't already disabled
- same thing for enabling.

* fix format

* move comment

* Update microbe_editor.mjs

* update comment for select button

* update comment of updateSelectedOrganelle

Better explanation for updateSelectedOrganelle function, introducing the concept of button status made in updateGuiButtons

* delete usless check

delete usless and branch of if statment in updateSelectedOrganelle function

* restore comment

* update functions and gui text

- delete select removed class
- change toltip text according to one more scientifically corret

* restore completly old function

* nucleus button has disabled status

- I just forgot that this could be necessary, so nucleus is prevent to be insert more times by guy, and if bypassed by changing the source code there is still the check in as files

* Nucleus name in editor

- i revert htis changment before commit, my bad.

* Rotation for nucleus organelle.

- In renderHighlightedOrganelle method if organelle that is going to be placed is nucleus rotation parameter change to 180 degrees.

- in _addOrganelle method is rotating again in order to have the same rotation of render.

* Nucleus rotation parameters

- removed manual rotation in prodecural_microbe.as
- added one time rotation in nucleus_organelle.as

Now nucleus is in right position both for microbe  controleld by IA and player one, without any modification in editor

* clang format fix

* nucleus rotation for npc

I do not why it works, i also try put 180 degreesin that line and in inserLast organelle few lines later another 180 and i obtain same result

* editor name
@hhyyrylainen

This comment has been minimized.

Copy link
Contributor

hhyyrylainen commented Jan 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment