Skip to content

Commit

Permalink
Dynamic tooltips and energy balance bar (#917)
Browse files Browse the repository at this point in the history
* Wrote the framework code for getting organelle efficiency updates to

the GUI, also did a lot of script bindings refactoring

* Fixed JSVendor symlink target

* Changed script passed OrganelleTemplates to be always const

* Fixed the organelle efficiency calculation bindings

* Fixed in browser preview and updated engine version

the engine version has nothing major new stuff

* A few dynamic tooltips are now working, also refactored the process

system to make the code look like it follows the per second numbers
given in the process efficiency calculation

* Made rest of the editor tooltips dynamic, removed a few typos, fixes a

bunch of cases where icons were set with an ID instead of a class

* Added a basic energy balance bar, not entirely accurate

probably related to: flagella, base movement or osmoregulation cost

* Bumped version number and changed the atp balance bar colours

* Fixed the the difference between actual ATP usage and the ATP usage bar

it was due to the base movement cost being per hex

* Made the base movement code much simpler and easier to verify it only

takes ATP when moving and not being pushed by other cells etc.

fixes #769
  • Loading branch information
hhyyrylainen authored Dec 21, 2019
1 parent 02b55d0 commit ecfa56d
Show file tree
Hide file tree
Showing 35 changed files with 5,104 additions and 2,465 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ set(PROGRAM_VERSION_STABLE 0)
set(PROGRAM_VERSION_MAJOR 4)
set(PROGRAM_VERSION_MINOR 3)
set(PROGRAM_VERSION_PATCH 0)
set(PROGRAM_VERSION_SUFFIX "-alpha")
set(PROGRAM_VERSION_SUFFIX "")

set(PROGRAM_VERSION_STR ${PROGRAM_VERSION_STABLE}.${PROGRAM_VERSION_MAJOR}.${PROGRAM_VERSION_MINOR}.${PROGRAM_VERSION_PATCH}${PROGRAM_VERSION_SUFFIX})
set(PROGRAM_VERSION ${PROGRAM_VERSION_STABLE}.${PROGRAM_VERSION_MAJOR}${PROGRAM_VERSION_MINOR}${PROGRAM_VERSION_PATCH})
Expand Down
6 changes: 3 additions & 3 deletions SetupThrive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def projectFolder(baseDir)
leviathan = Leviathan.new(
# Use this if you always want the latest commit
# version: "develop",
version: '8968d19a7d9d0f0a4cf0229eb89474124cc5e87c',
version: 'e221683bc892a9e143765606d3ad41254d5b1622',
# Doesn't actually work, but leviathan doesn't install with sudo by
# default, or install at all for that matter
noInstallSudo: true
Expand Down Expand Up @@ -94,7 +94,7 @@ def projectFolder(baseDir)
convertPathToWindows(File.join(ProjectDir, 'assets', 'fonts'))
runSystemSafe 'cmd', '/c', 'mklink', '/J',
convertPathToWindows(File.join(ProjectDir, 'JSVendor')),
convertPathToWindows(File.join(ProjectDir, 'ThirdParty/Leviathan/bin/Data',
convertPathToWindows(File.join(ProjectDir, 'ThirdParty/Leviathan/Assets',
'JSVendor'))
else
unless File.exist? File.join(ProjectDir, 'Textures')
Expand All @@ -108,7 +108,7 @@ def projectFolder(baseDir)
end

unless File.exist? File.join(ProjectDir, 'JSVendor')
FileUtils.ln_sf File.join(ProjectDir, 'ThirdParty/Leviathan/bin/Data', 'JSVendor'),
FileUtils.ln_sf File.join(ProjectDir, 'ThirdParty/Leviathan/Assets', 'JSVendor'),
File.join(ProjectDir, 'JSVendor')
end
end
Expand Down
17 changes: 17 additions & 0 deletions scripts/gui/example_energy_balance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"consumption": {
"baseMovement": 1.0,
"osmoregulation": 3.0,
"oxytoxyProteins": 5.0
},
"production": {
"cytoplasm": 10.0,
"oxytoxyProteins": 5.0
},
"total": {
"balance": 7.0,
"balanceStationary": 6.0,
"consumption": 9.0,
"production": 15.0
}
}
Loading

0 comments on commit ecfa56d

Please sign in to comment.