http://www.gityx.com/g8hh/hanhuazhong/694.html
https://g1tyx.github.io/the-ignited-space/
INS = t.instance;
INS = t.instance,false
//资源不减反加
if(!INS.resources.addResource_o){
INS.resources.addResource_o = INS.resources.addResource;
INS.resources.subtractResource = INS.resources.addResource;
}
if(INS.resources.addResource_o){
INS.resources.addResource = function(e, t){
if(t<0){
t=0-t;
}
return INS.resources.addResource_o(e,t);
}
}
//资源自动根据容量递增
if(!INS.resources.setBalance_o){
INS.resources.setBalance_o = INS.resources.setBalance;
}
if(INS.resources.setBalance_o){
INS.resources.setBalance = function(e,t){
let cap = INS.resources.getResourceCap(e);
if(cap>0){
return INS.resources.setBalance_o(e,cap);
}
let nbalance = INS.resources.getBalance(e);
if(nbalance!=0 && t<nbalance){
t=nbalance;
}else if(nbalance<0){
t = 0-nbalance;
}
return INS.resources.setBalance_o(e,t);
}
}