Comments (2)
Proposed solution:
Strip out ghetto Essence Hole code (You're supposed to add an item that has the
same Essence value
Add new value, Essence_Max. When removing gear, Essence is restored to
pre-implantation value, while Essence_Max remains at the same value, and is
used for Resonance/Magic-based requirements. (Does Essence hole affect Social
Limit?)
New value, Essence_Hole = Essence - Essence_Max
When installing an augmentation:
if (Essence Cost <= Essence Hole)
{Essence = Essence - Essence Cost}
else
{Essence_Max = Essence_Max + (Essence Hole - Essence Cost) //Should yield a
negative number
Essence = Essence - Essence Cost}
There's probably going to be a reason this won't work, but napkin-code suggests
it should be fine.
Original comment by [email protected]
on 26 Feb 2015 at 11:05
- Changed state: Started
from chummer5a.
This way is probably a little easier and saves an entire variable!
//Declare essence hole
decimal Essence_Hole = 0;
//When removing cyberware
Essence_Hole += Cyberware_Essence;
//when adding cyberware
Essence_Hole -= Essence_Cost;
If (Essence_Hole < 0)
{
Essence += Essence_Hole; //Essence_Hole is negative, so this will subtract
Essence_Hole = 0;
}
Original comment by [email protected]
on 27 Feb 2015 at 12:28
from chummer5a.
Related Issues (20)
- Nightly-v5.225.438 - adding weapon "Ingram Smartgun X" chummer crashes with "Failed to create crash report because of an issue with the crash handler" HOT 2
- Incompetent quality should always set up skills to 'unaware'
- [bug] During character creation, spending points on increasing an attribute does not result in increased attribute HOT 8
- [BUG] Dice Pool of 0 for Exotic Ranged Weapon [SA Retarius Net Gun XL] on Sheet HOT 2
- Reordering nested equipment and mods
- Make it visible from the gear list which program or autosofts are running
- [Bug] Dice Roller doesen`t update "Result" after "Re-Roll Misses" HOT 1
- SURGE price
- [Bug] Advanced Lifestyle minimum for no cost ignored HOT 1
- [Feature request] Bioware: Damage Compensators select if damage is physical or stun and adjust Physical/Stun Damage Track automatically
- [Feature request] Print sheet: Option to print sheet without numbers
- [BUG] additional armor modifications on helmet aren't displayed correctly or shouldn’t be selectable, Chemical Protection is missing in general (or works different) HOT 2
- WeaponCategoryAP
- Ally spirit counts towards spirit limit
- Sticky Extended Area Tag
- Submersion Grade stuck at 2 HOT 1
- Additional metamagics optional rule HOT 2
- Request: Improvement to increase Maximum number of Bound Foci
- operation="greaterthanorequals" isn't working in Narcoject Dazzler HOT 2
- Remove Hard Coding for Focus Karma Costs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chummer5a.