Skip to content

Renamed main MicrobeSpecies organelles to ModifiableOrganelles#6623

Open
PsykeDoesStuff wants to merge 11 commits intoRevolutionary-Games:masterfrom
PsykeDoesStuff:renamed-main-microbe-organelles-to-modifiableorganelles
Open

Renamed main MicrobeSpecies organelles to ModifiableOrganelles#6623
PsykeDoesStuff wants to merge 11 commits intoRevolutionary-Games:masterfrom
PsykeDoesStuff:renamed-main-microbe-organelles-to-modifiableorganelles

Conversation

@PsykeDoesStuff
Copy link

@PsykeDoesStuff PsykeDoesStuff commented Jan 10, 2026

Preface
this is my first PR so apologies for any formatting errors!
ive gone through and double checked everywhere however so everything here should be fine.

Brief Description of What This PR Does

This PR renames the MicrobeSpecies Organelles to ModifiableOrganelles, MicrobeSpecies ModifiableOrganelles (the original) to ReadonlyOrganelles for clarity.
ive also gone through and changed some of the unnecessary usages of Organelles to the readonly varient as they dont modify any data, thus dont need to have setter rights.

Related Issues
Closes #6483

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.

@PsykeDoesStuff
Copy link
Author

edit: quickly fixed the ThriveTest.sln and jetbrains DevCentre requirements, sorry for not noticing sooner!

@hhyyrylainen
Copy link
Member

Does this fully change all? I ask because you haven't marked this as "closing" the issue, you just linked the issue. If you did fully solve the issue you should write closes #6483

@hhyyrylainen
Copy link
Member

Also is this meant to be a draft because as far as I can tell the code cannot compile currently?

Thrive.csproj Outdated
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Godot.NET.Sdk/4.5.0">
<Project Sdk="Godot.NET.Sdk/4.5.1">
Copy link
Member

Choose a reason for hiding this comment

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

We cannot update to Godot 4.5.1 as it has a critical bug that will only be fixed in Godot 4.6

@PsykeDoesStuff
Copy link
Author

PsykeDoesStuff commented Jan 12, 2026

Oh thats my mistake, but this does compile and works fine im not sure why its saying otherwise, and the godot versions my bad i didnt see it listed on the setup guide, ill go through and recheck everything just to make sure

@hhyyrylainen
Copy link
Member

Oh, it does compile but with warnings:

Thrive net10.0 succeeded with 3 warning(s) (8,6s) → .godot/mono/temp/bin/Debug/Thrive.dll
    /home/hhyyrylainen/Projects/Thrive/src/microbe_stage/MicrobeSpecies.cs(147,9): warning CA1033: Make 'MicrobeSpecies' sealed (a breaking change if this class has previously shipped), implement the method non-explicitly, or implement a new method that exposes the functionality of 'IReadOnlyCellDefinition.get_Organelles' and is visible to derived classes (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1033)
    /home/hhyyrylainen/Projects/Thrive/src/microbe_stage/MicrobeSpecies.cs(147,9): warning CA1033: Make 'MicrobeSpecies' sealed (a breaking change if this class has previously shipped), implement the method non-explicitly, or implement a new method that exposes the functionality of 'IReadOnlyCellDefinition.get_Organelles' and is visible to derived classes (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1033)
    /home/hhyyrylainen/Projects/Thrive/src/microbe_stage/MicrobeSpecies.cs(70,5): warning SA1005: Single line comment should begin with a space (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1005.md)
  ThriveTest net10.0 succeeded (0,4s) → test/code_tests/bin/Debug/net10.0/ThriveTest.dll

We don't allow any compiler warnings in Thrive so those will have to be fixed as well. (the CI system treats them as build errors)

@hhyyrylainen
Copy link
Member

I corrected the "closes" syntax as it still was not correct (it needs to be exact for Github to automatically detect it).

@hhyyrylainen
Copy link
Member

The null propagation stuff is likely not your fault. .NET 10 offers a new feature related to that so all of our old code is triggering the issue. For some reason when I run the check it doesn't detect all of the problems at once which is why I've been fixing those piecemeal.

@PsykeDoesStuff
Copy link
Author

The null propagation stuff is likely not your fault. .NET 10 offers a new feature related to that so all of our old code is triggering the issue. For some reason when I run the check it doesn't detect all of the problems at once which is why I've been fixing those piecemeal.

Oh i see, maybe its something to do with me compiling on linux? But im not too sure

@hhyyrylainen
Copy link
Member

How could that be? It's some kind of caching issue where the warnings are not reported until someone tries to change a file that would have the error.

I did already do a new commit to master fixing up the files the CI check failed on your branch so if you update the branch then it should stop failing for them.

@PsykeDoesStuff
Copy link
Author

PsykeDoesStuff commented Jan 12, 2026

I did already do a new commit to master fixing up the files the CI check failed on your branch so if you update the branch then it should stop failing for them.

Alright thats grand thank you!

How could that be? It's some kind of caching issue where the warnings are not reported until someone tries to change a file that would have the error.

Im not sure, im so used to weird platform specific bugs because of my previous work being with c and c++ that i assumdd it wpuld be the same with c#, my bad!

Ive just synced so hopwfully everything compiles properly now

@hhyyrylainen
Copy link
Member

Im not sure, im so used to weird platform specific bugs because of my previous work being with c and c++ that i assumdd it wpuld be the same with c#, my bad!

Oh yeah, C++ does do that. Luckily in my experience C# does not have that at all. It probably helps that we only use the dotnet compiler on each platform and not platform specific compilers.

And funnily enough the C++ native module for Thrive did have a mac specific system linker bug that hit us and caused quite many headaches. That's now worked around with some changed build systems, but yeah I do still recall all kinds of stuff that goes wrong in C++ between platforms. But luckily we've not had that at all in C#.

Ive just synced so hopwfully everything compiles properly now

Yep. It looks like the CI checsk now fail purely due to your changes on this branch (too long lines, some not cleaned up whitespace, and an unnecessary using). You probably also want to clean up all of the unrelated changes like Scripts/DehydratedInfo.cs and I think you also accidentally downgraded the RevolutionaryGamesCommon git submodule.

@PsykeDoesStuff
Copy link
Author

Oh really? Thats odd, ill have a look and fix it when im back at my pc

@PsykeDoesStuff
Copy link
Author

might be a silly question, but is there a way to get rider to detect the formatting issues so i dont have to commit to check them? in other news this should be the final commit

@hhyyrylainen
Copy link
Member

https://github.com/Revolutionary-Games/Thrive/blob/master/doc/setup_instructions.md#running-the-format-checks

@PsykeDoesStuff
Copy link
Author

alright so i've run the checks, turns out the only issues now are null propagation related

@hhyyrylainen
Copy link
Member

You mean locally or...? This latest commit here is failing due to a few missing blank lines: https://dev.revolutionarygamesstudio.com/ci/1/build/16369/jobs/2

@PsykeDoesStuff
Copy link
Author

yeah i meant locally haha, finally got there, even if it took a while and some defiantly amateur level mistakes on my end

@hhyyrylainen hhyyrylainen added this to the Release 1.0.1 milestone Jan 14, 2026
Copy link
Member

Choose a reason for hiding this comment

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

This I think is still a revert, if you press the "updated 1 files" on github and it opens a page that says

kuva

there isn't anything to compare, then that means that the submodule is going backwards in versions.

Copy link
Author

Choose a reason for hiding this comment

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

thats really odd, ill run sync again, hopefully should clear that up

<ProjectReference Include="RevolutionaryGamesCommon\SharedBase\SharedBase.csproj" />
<ProjectReference Include="third_party\Arch.Extended\Arch.System.SourceGenerator\Arch.System.SourceGenerator.csproj"
OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="third_party\Arch.Extended\Arch.System.SourceGenerator\Arch.System.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
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 for this change?

Copy link
Author

Choose a reason for hiding this comment

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

no, i dont believe i touched i just compiled it

Copy link
Member

Choose a reason for hiding this comment

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

Okay, then you should revert this file as well.

Copy link
Member

Choose a reason for hiding this comment

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

Old project backup files shouldn't be committed.

public OrganelleLayout<OrganelleTemplate> ModifiableOrganelles { get; private set; }

public OrganelleLayout<OrganelleTemplate> ModifiableOrganelles => Organelles;
public OrganelleLayout<OrganelleTemplate> ReadonlyOrganelles => ModifiableOrganelles;
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look right... because this returns instances that are modifiable. Thus this basically isn't a real readonly view of the data. See how I've done the MulticellularSpecies.GameplayCells which is a readonly adapter that only allows readonly instances to be read.

And I just realized an even bigger problem here: The return type here is OrganelleLayout meaning that there's nothing that prevents someone from calling ReadOnlyOrganelles.Add(...) and that's just wrong, because we wouldn't be getting any safety improvement which was my main point why opened #6483

So, sorry if things weren't clear upfront.

Copy link
Author

Choose a reason for hiding this comment

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

of course thats no worries! ill go through and correct it :)

@hhyyrylainen hhyyrylainen moved this from In progress to started but stuck (help wanted) in Thrive Planning Jan 26, 2026
@hhyyrylainen hhyyrylainen removed this from the Release 1.0.1 milestone Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: started but stuck (help wanted)

Development

Successfully merging this pull request may close these issues.

Rename the main MicrobeSpecies Organelles to ModifiableOrganelles

2 participants