Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pregmodfan
fc-pregmod
Commits
336f6306
Commit
336f6306
authored
5 years ago
by
svornost
Browse files
Options
Downloads
Patches
Plain Diff
Use array.find instead of a twinescript loop to simplify the incubator organ list.
parent
d8567d97
No related branches found
No related tags found
1 merge request
!5806
Remove dead stuff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pregmod/organFarm.tw
+16
-43
16 additions, 43 deletions
src/pregmod/organFarm.tw
with
16 additions
and
43 deletions
src/pregmod/organFarm.tw
+
16
−
43
View file @
336f6306
...
...
@@ -70,53 +70,26 @@ Organ Production
<</if>>
<<if $incubatorSlaves > 0>>
<<for _x = 0; _x < $incubatorOrgans.length; _x++>>
<<for _w = 0; _w < $incubatorSlaves; _w++>>
<<if $tanks[_w].ID == $incubatorOrgans[_x].ID>>
<br>
$tanks[_w].slaveName's $incubatorOrgans[_x].type,
<<if $incubatorOrgans[_x].weeksToCompletion <= 0>>
ready to be implanted as soon as $he exits the incubator.
<<else>>
<<if $organFarmUpgrade == 1>>
<<print $incubatorOrgans[_x].weeksToCompletion>>
<<elseif $organFarmUpgrade == 2>>
<<print Math.ceil($incubatorOrgans[_x].weeksToCompletion/2)>>
<<elseif $organFarmUpgrade == 3>>
<<print Math.ceil($incubatorOrgans[_x].weeksToCompletion/4)>>
<</if>> weeks from completion.
<</if>>
<<break>>
<</if>>
<</for>>
<</for>>
<br>
<</if>>
/* TODO: potentially allow organs to be implanted into children in the nursery
<<set _NL = $NurseryiIDs.length>>
<<if _NL > 0>>
<<for _x = 0; _x < $nurseryOrgans.length; _x++>>
<<for _w = 0; _w < _NL; _w++>>
<<if $cribs[_w].ID == $nurseryOrgans[_x].ID>>
<br>
$cribs[_w].slaveName's $nurseryOrgans[_x].type,
<<if $nurseryOrgans[_x].weeksToCompletion <= 0>>
ready to be implanted as soon as $he exits the nursery.
<<else>>
<<if $organFarmUpgrade == 1>>
<<print $nurseryOrgans[_x].weeksToCompletion>>
<<elseif $organFarmUpgrade == 2>>
<<print Math.ceil($nurseryOrgans[_x].weeksToCompletion/2)>>
<<elseif $organFarmUpgrade == 3>>
<<print Math.ceil($nurseryOrgans[_x].weeksToCompletion/4)>>
<</if>> weeks from completion.
<</if>>
<<break>>
<<set _tank = $tanks.find((t) => t.ID === $incubatorOrgans[_x].ID)>>
<<if def _tank>>
<br>
_tank.slaveName's $incubatorOrgans[_x].type,
<<if $incubatorOrgans[_x].weeksToCompletion <= 0>>
ready to be implanted as soon as $he exits the incubator.
<<else>>
<<if $organFarmUpgrade == 1>>
<<print $incubatorOrgans[_x].weeksToCompletion>>
<<elseif $organFarmUpgrade == 2>>
<<print Math.ceil($incubatorOrgans[_x].weeksToCompletion/2)>>
<<elseif $organFarmUpgrade == 3>>
<<print Math.ceil($incubatorOrgans[_x].weeksToCompletion/4)>>
<</if>> weeks from completion.
<</if>>
<</f
or
>>
<</
i
f>>
<</for>>
<br>
<</if>>
*/
/* TODO: potentially allow organs to be implanted into children in the nursery
*/
<<if $completedOrgans.length > 0>>
<br>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment