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

Evolve lysosomes in auto-evo #5847

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Evolve lysosomes in auto-evo #5847

wants to merge 21 commits into from

Conversation

Patryk26g
Copy link
Contributor

Brief Description of What This PR Does

  • Evolve lysosomes in auto-evo
  • Add membrane and enzymes statitics to auto-evo tool
  • Adjust pilus score calculation in auto-evo for more costincency
  • Small auto-evo score refactor

I also tried to make lysosomes evolve their enzymes but didn't get any result probably because there almost weren't any preys with chitine or cellulose membranes

Related Issues

Closes #3358

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    break existing features:
    https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
    (this is important as to not waste the time of Thrive team
    members reviewing this PR)
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    styleguide.

Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.

@CountingBeeps
Copy link
Contributor

I would argue that this probably should effect the energy gained by predation, but the energy system really isn't setup that way, so that is probably better left to a rework of that system. Might be good to open an issue on it.

locale/en.po Outdated Show resolved Hide resolved
# Conflicts:
#	locale/af.po
#	locale/ar.po
#	locale/be.po
#	locale/bg.po
#	locale/bn.po
#	locale/ca.po
#	locale/cs.po
#	locale/da.po
#	locale/de.po
#	locale/el.po
#	locale/en.po
#	locale/eo.po
#	locale/es.po
#	locale/es_AR.po
#	locale/et.po
#	locale/fi.po
#	locale/fr.po
#	locale/frm.po
#	locale/he.po
#	locale/hr.po
#	locale/hu.po
#	locale/id.po
#	locale/it.po
#	locale/ka.po
#	locale/ko.po
#	locale/la.po
#	locale/lb_LU.po
#	locale/lt.po
#	locale/lv.po
#	locale/messages.pot
#	locale/mk.po
#	locale/nb_NO.po
#	locale/nl.po
#	locale/nl_BE.po
#	locale/pl.po
#	locale/pt_BR.po
#	locale/pt_PT.po
#	locale/ro.po
#	locale/ru.po
#	locale/si_LK.po
#	locale/sk.po
#	locale/sr_Cyrl.po
#	locale/sr_Latn.po
#	locale/sv.po
#	locale/th_TH.po
#	locale/tok.po
#	locale/tr.po
#	locale/tt.po
#	locale/uk.po
#	locale/vi.po
#	locale/zh_CN.po
#	locale/zh_TW.po
var predationToolsRawScores = (pilusScore, oxytoxyScore, slimeJetScore, mucocystsScore);

cachedPredationToolsRawScores.Add(microbeSpecies, predationToolsRawScores);
return predationToolsRawScores;
}

public (float EnzymesScore, bool IsMembranedigestable) GetEnzymesScores(MicrobeSpecies predator,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why this doesn't just return 0 when indigestible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The engulfment score is muliplied by enzymes score so its default value is 1, if that's what you mean

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I meant that as there's only use of the score inside a check with the bool, you might as well just return 0 if the bool would be false. In fact I've done that change and I'll push what I have in a minute or so for you to look at.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but maybe you're right and I should return only 0 if IsMembranedigestable is false , otherwise return the enzyme score

{
if (organelle.Definition.HasLysosomeComponent)
{
foreach (var enzyme in organelle.Definition.Enzymes.Where(enzyme => enzyme.Value > 0))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LINQ usage should be avoided as this allocates a bunch of temporary memory. I'm doing some style changes already for this PR, so I can change this as well. I'll just comment for letting you know to watch out for this in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I think I found a major problem here, using Name instead of InternalName means that the scores were never read from the score dictionary. I'll push what I have but I think I'll need your help to rebalance all the numbers to work.

hhyyrylainen and others added 5 commits January 31, 2025 14:01
and switch to a string builder as a lot of text is appended
handling to actually account how engulfing is not totally useless without any enzymes
# Conflicts:
#	locale/af.po
#	locale/ar.po
#	locale/be.po
#	locale/bg.po
#	locale/bn.po
#	locale/ca.po
#	locale/cs.po
#	locale/da.po
#	locale/de.po
#	locale/el.po
#	locale/en.po
#	locale/eo.po
#	locale/es.po
#	locale/es_AR.po
#	locale/et.po
#	locale/fi.po
#	locale/fr.po
#	locale/frm.po
#	locale/he.po
#	locale/hr.po
#	locale/hu.po
#	locale/id.po
#	locale/it.po
#	locale/ka.po
#	locale/ko.po
#	locale/la.po
#	locale/lb_LU.po
#	locale/lt.po
#	locale/lv.po
#	locale/messages.pot
#	locale/mk.po
#	locale/nb_NO.po
#	locale/nl.po
#	locale/nl_BE.po
#	locale/pl.po
#	locale/pt_BR.po
#	locale/pt_PT.po
#	locale/ro.po
#	locale/ru.po
#	locale/si_LK.po
#	locale/sk.po
#	locale/sr_Cyrl.po
#	locale/sr_Latn.po
#	locale/sv.po
#	locale/th_TH.po
#	locale/tok.po
#	locale/tr.po
#	locale/tt.po
#	locale/uk.po
#	locale/vi.po
#	locale/zh_CN.po
#	locale/zh_TW.po
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

Make auto-evo take lysosomes (new digestion) into account
3 participants