MCPcopy Create free account
hub / github.com/FloatTech/ZeroBot-Plugin-Playground / settleOfData

Method settleOfData

plugin/cybercat/keepcat.go:322–340  ·  view source on GitHub ↗

整体数据结算

()

Source from the content-addressed store, hash-verified

320
321// 整体数据结算
322func (inf *catInfo) settleOfData() catInfo {
323 if inf.Satiety > 100 {
324 inf.Satiety = 100
325 } else if inf.Satiety < 0 {
326 inf.Satiety = 0
327 }
328 if inf.Mood > 100 {
329 inf.Mood = 100
330 } else if inf.Mood < 0 {
331 inf.Mood = 0
332 }
333 if inf.Weight < 0 {
334 inf.Weight = -5
335 }
336 if inf.Food < 0 {
337 inf.Food = 0
338 }
339 return *inf
340}
341
342// 打工结算
343func (inf *catInfo) settleOfWork(gid string) (int, bool) {

Callers 1

initFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected