XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

fix: cap helminth resources at 100% (#757)

1c654650
Sainan <sainan@calamity.inc>
提交于

代码差异

1 个文件 +1 -0
Modified src/controllers/api/infestedFoundryController.ts +1 -0
@@ -176,6 +176,7 @@ export const infestedFoundryController: RequestHandler = async (req, res) => {
176 176
177 177 totalPercentagePointsGained += snack.gain * 100 * apetiteFactor; // 30% would be gain=0.3, so percentage points is equal to gain * 100.
178 178 resource.Count += Math.trunc(snack.gain * 1000 * apetiteFactor); // 30% would be gain=0.3 or Count=300, so Count=gain*1000.
179 if (resource.Count > 1000) resource.Count = 1000;
179 180 }
180 181
181 182 const recipeChanges = addInfestedFoundryXP(inventory.InfestedFoundry, 666 * totalPercentagePointsGained);