Skip to content

Organizing and Simplifying the MidLoop (at least for the res and labor caps section)#1579

Open
The1stBurb wants to merge 18 commits into
pmotschmann:masterfrom
The1stBurb:simpler-or-no
Open

Organizing and Simplifying the MidLoop (at least for the res and labor caps section)#1579
The1stBurb wants to merge 18 commits into
pmotschmann:masterfrom
The1stBurb:simpler-or-no

Conversation

@The1stBurb
Copy link
Copy Markdown

@The1stBurb The1stBurb commented Apr 27, 2026

  • Adding KnowVal functions to knowledge structures.
  • Sorting some of midloop for organization
  • simplifying variables (view commit #6e4771c)

BUG: fixed biolab's knowledge cap gain on the structure popup specifically when with genes high_pop and frost elemental. wasn't adjusted for high pop with highPopAdjust()

…ns to be in a knowVal function like univercity has anyways

changed a few vars to be shorter in the same code

BUG: fixed biolab's knowledge cap gain on the structure popup specifically when with high_pop and frost elemental. wasn't adjusted for high pop
also organized a lot of midloop

and i am going through the organized stuff and simplifying it - This includes removing repeated math calculations (like calculate the value for the cap icnrease and the breakdown seperatley) and shortened variables (like using space_home = actions.space.spc_home, then calling space_home.garage instead of actions.space.spc_home.garage multiple times)
@The1stBurb The1stBurb marked this pull request as draft April 28, 2026 03:57
@The1stBurb The1stBurb marked this pull request as ready for review April 28, 2026 03:58
@The1stBurb The1stBurb changed the title Added knowVal for Library, Wardenclyffe, and BioLab's to Simplify Code Organizing and Simplifying the MidLoop (at least for the res and labor caps section) Apr 28, 2026
mostly changing global.race.species to s_name (them same)
ok so i got distracted *ahem* discord people *ahem* and simplified the city and space initStruct blocks! (in warlord)
…ompost, soul_well, smokehouse), rock_quarry, lumber_yard, graveyard

Changed *Val() funcs to be *Cap() to reflect their nature
*Val() now means resource.*.amount - may be addition or just eq
*Cap() now means caps['*']
*Disp() now means any value / cap that has any special math to determine display value - You may encounter a *DispC  or *DispV, (cap or val) which means a buildling displays both the cap and value with special math, so it needs to handle both
adding a simple function that can do all the things for you! (in the middle of adding it)
so basically i made it so that it now uses caps:{resName(count}{return count * maths for res}} and can be smart and you only have to list each location
but it may only work for the city techs

um yea it is very smaller and works better
…ndGlob to just have vars for it

also pointing out we dont need to recalc if its from action.caps
BUG -> tooltip of apartment had a 2x Money Cap if extravagant governor. This was removed.
…ng them throught the BHStorage function

removing unnecesary planet action code that is run in midLoop (got to foundry)
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.

1 participant