Kill some bugs

这个提交包含在:
2020-07-13 13:55:02 +08:00
父节点 485d20a5a0
当前提交 10e07971c9
共有 2 个文件被更改,包括 9 次插入 和 9 次删除

查看文件

@ -2,7 +2,7 @@
const fs=require("fs"); const fs=require("fs");
const Core = require("./Core"); const Core = require("./Core");
const 通货膨胀系数 = 0.9; const 通货膨胀系数 = 1;
// 收入乘以这个数 // 收入乘以这个数
// 支出除以这个数 // 支出除以这个数
@ -17,23 +17,23 @@ exports.add={
} }
}, },
GiveUserMoney:function(UserID,Moeny,GoTo){ GiveUserMoney:function(UserID,Money1,GoTo){
Moeny = Math.round(Money*通货膨胀系数); var Money = Math.round(Money1*通货膨胀系数);
if(GoTo == undefined){ if(GoTo == undefined){
GoTo = "无备注" GoTo = "无备注"
} }
var data = Core.frame.ReadSystemConfig("固定资产"); var data = Core.frame.ReadSystemConfig("固定资产");
if(data[UserID]==undefined||null||NaN){ if(data[UserID]==undefined||null||NaN){
data[UserID] = Moeny; data[UserID] = Money;
}else{ }else{
data[UserID] = new Number(this.GetUserMoney(UserID) + new Number(Moeny) ); data[UserID] = new Number(this.GetUserMoney(UserID) + new Number(Money) );
} }
Core.frame.WriteSystemConfig("固定资产",data); Core.frame.WriteSystemConfig("固定资产",data);
return; return;
}, },
CostUserMoney:function(UserID,Moeny,GoTo){ CostUserMoney:function(UserID,Money1,GoTo){
Money = Math.round(-(1/通货膨胀系数) * Moeny/通货膨胀系数); var Money = Math.round(-(1/通货膨胀系数) * Money1/通货膨胀系数);
exports.add.Interfaces.GiveUserMoney(UserID, Moeny, GoTo); exports.add.Interfaces.GiveUserMoney(UserID, Money, GoTo);
return; return;
}, },
GetUserTo:function(UserID){ GetUserTo:function(UserID){

查看文件

@ -1 +1 @@
{"固定资产":{},"利息":{},"领工资":{},"签到":{},"RedPacketPool":0,"SandBox":{},"目标":{},"AITalk":{"Core":true},"板砖":{},"公会系统":{"927980270":"共学社"},"AIEnable":{"588932037":true,"776148636":true,"966138955":true}} {"固定资产":{"927980270":0},"利息":{},"领工资":{},"签到":{},"RedPacketPool":0,"SandBox":{},"目标":{},"AITalk":{"Core":true},"板砖":{},"公会系统":{"927980270":"共学社"},"AIEnable":{"588932037":true,"776148636":true,"966138955":true}}