Difference between revisions of "Program Code"
From Supremacy Wiki
(added: VisualC#-Image) |
(GetProductionOutput) |
||
Line 5: | Line 5: | ||
<img>http://supremacy.square7.ch/wiki-files/images/Supremacy-MicrosoftVisualC2010Express.jpg</img> | <img>http://supremacy.square7.ch/wiki-files/images/Supremacy-MicrosoftVisualC2010Express.jpg</img> | ||
+ | |||
+ | |||
+ | == some code == | ||
+ | |||
+ | |||
+ | {|class="wikitable sortable" | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |where | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Folder | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |File | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Function | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |empty | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Description | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Custom1 | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Custom2 | ||
+ | |||
+ | |- | ||
+ | |style=text-align:left|S-Core | ||
+ | |style=text-align:center|Universe | ||
+ | |style=text-align:center|Colony.cs | ||
+ | |style=text-align:center|GetProductionOutput(ProductionCategory category) | ||
+ | |style=text-align:center| | ||
+ | |style=text-align:left| | ||
+ | see last line, too ! | ||
+ | *Food: minimum 10 | ||
+ | *Research: | ||
+ | float moraleMod = _morale.CurrentValue / (0.5f * MoraleHelper.MaxValue); | ||
+ | baseOutput = (int)(moraleMod * baseOutput); | ||
+ | *Industry: '''minimum 10 !''' | ||
+ | float moraleMod = _morale.CurrentValue / (0.5f * MoraleHelper.MaxValue); | ||
+ | baseOutput = (int)(moraleMod * baseOutput); | ||
+ | *last line: return ((int)(baseOutput + (baseOutput * modifier.Efficiency)) + modifier.Bonus); | ||
+ | |style=text-align:left| | ||
+ | |style=text-align:left| | ||
+ | |} |
Revision as of 14:31, 1 January 2014
Source is at https://bitbucket.org/mstrobel/supremacy/
Program Code Language: C#
some code
where | Folder | File | Function | empty | Description | Custom1 | Custom2 |
---|---|---|---|---|---|---|---|
S-Core | Universe | Colony.cs | GetProductionOutput(ProductionCategory category) |
see last line, too !
float moraleMod = _morale.CurrentValue / (0.5f * MoraleHelper.MaxValue); baseOutput = (int)(moraleMod * baseOutput);
float moraleMod = _morale.CurrentValue / (0.5f * MoraleHelper.MaxValue); baseOutput = (int)(moraleMod * baseOutput);
|