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

CORPORATION: add issueNewSharesCooldown and makesMaterial #774

Merged
merged 5 commits into from
Sep 12, 2023
Merged

CORPORATION: add issueNewSharesCooldown and makesMaterial #774

merged 5 commits into from
Sep 12, 2023

Conversation

Caldwell-74
Copy link
Contributor

adds issueNewSharesCooldown to getCorporation and makesMaterials to getDivision

makesMaterials should be added to getIndustryData but makesProducts is on getDivision already so it wouldnt makes sense to split it
moving both would be an API break i didnt want to make for such a detail but i would put it on the list for the next bigger Update

closes #506

@d0sboots
Copy link
Collaborator

d0sboots commented Sep 2, 2023

What about adding both makesMaterials and makes Products to getIndustryData now? Then they're both in the right place, and together, and the only downside is a little duplication.

@myCatsName
Copy link
Contributor

“Duplication may be the root of all evil in software.” - Robert C. Martin , Clean Code

@Snarling
Copy link
Collaborator

Snarling commented Sep 3, 2023

Yeah I agree with @d0sboots here, they make more sense on getIndustryData since they are applicable to all divisions within an industry. getDivision should just have the info that is specific to that one division within the industry.

I think for now duplicating it is fine, but we should remove the old out of place entry on getDivision in the future, I guess at the next API break.

@Caldwell-74
Copy link
Contributor Author

with them on getIndustryData i dont see a reason to add makesMaterials to getDivision at all

@d0sboots
Copy link
Collaborator

d0sboots commented Sep 6, 2023

with them on getIndustryData i dont see a reason to add makesMaterials to getDivision at all

Yeah, that was the idea.

@d0sboots
Copy link
Collaborator

d0sboots commented Sep 6, 2023

“Duplication may be the root of all evil in software.” - Robert C. Martin , Clean Code

It's much better in this case than making a permanently suboptimal API choice because of a prior bad API choice, or forcing a breaking API change during a minor version bump.

Evolving the BB API has different challenges than other things because it's a push model, not a pull model. (Technically, I suppose we could keep every version available in Steam, but I'm not sure how many it allows, and it's really not designed for that.)

Caldwell-74 and others added 5 commits September 7, 2023 10:21
moved makes Product/Materials to getIndustryData
removed makesMaterials from getDivision to reduce code dupe
run doc
It was unused, and was also initialized incorrectly, referencing `this.producedMaterials` prior to object initialization when it's an empty array
@Snarling
Copy link
Collaborator

Just pushed a quick commit to remove the duplicate makesMaterials from Division, which was not used anywhere.

@Snarling Snarling merged commit bba2ccd into bitburner-official:dev Sep 12, 2023
5 checks passed
@Caldwell-74 Caldwell-74 deleted the CORPORATION-add-issueNewSharesCooldown-to-getCorporation branch September 12, 2023 10:39
G4mingJon4s pushed a commit to G4mingJon4s/bitburner-src that referenced this pull request Mar 23, 2024
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.

getCorporation() lacks issueNewSharesCooldown property
4 participants