整理代码

This commit is contained in:
MrZ626
2021-04-28 09:36:22 +08:00
parent 385d376037
commit 28576c2c9a
28 changed files with 92 additions and 105 deletions

View File

@@ -197,7 +197,7 @@ local function noDevkeyPressed(key)
if key=="f1"then
PROFILE.switch()
elseif key=="f2"then
LOG.print(string.format("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s",SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num))
LOG.print(("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num))
elseif key=="f3"then
for _=1,8 do
local P=PLY_ALIVE[rnd(#PLY_ALIVE)]

View File

@@ -3,7 +3,7 @@ local gc=love.graphics
local int,abs=math.floor,math.abs
local max,min=math.max,math.min
local sub,format=string.sub,string.format
local sub=string.sub
local ins=table.insert
local COLOR=COLOR
local setFont,mStr=setFont,mStr
@@ -182,7 +182,7 @@ function button:draw()
end
end
function button:getInfo()
return format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font)
return("x=%d,y=%d,w=%d,h=%d,font=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font)
end
function button:press()
self.code()
@@ -276,7 +276,7 @@ function key:draw()
end
end
function key:getInfo()
return format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font)
return("x=%d,y=%d,w=%d,h=%d,font=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font)
end
function key:press()
self.code()
@@ -364,7 +364,7 @@ function switch:draw()
mDraw_Y(self.obj,x-12-ATV-self.obj:getWidth(),y+25)
end
function switch:getInfo()
return format("x=%d,y=%d,font=%d",self.x,self.y,self.font)
return("x=%d,y=%d,font=%d"):format(self.x,self.y,self.font)
end
function switch:press()
self.code()
@@ -488,7 +488,7 @@ function slider:draw()
end
end
function slider:getInfo()
return format("x=%d,y=%d,w=%d",self.x,self.y,self.w)
return("x=%d,y=%d,w=%d"):format(self.x,self.y,self.w)
end
function slider:drag(x)
if not x then return end
@@ -648,7 +648,7 @@ function selector:draw()
mStr(self.selText,x+w*.5,y+43-21)
end
function selector:getInfo()
return format("x=%d,y=%d,w=%d",self.x+self.w*.5,self.y+30,self.w)
return("x=%d,y=%d,w=%d"):format(self.x+self.w*.5,self.y+30,self.w)
end
function selector:press(x)
if x then
@@ -779,7 +779,7 @@ function inputBox:draw()
end
end
function inputBox:getInfo()
return format("x=%d,y=%d,w=%d,h=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h)
return("x=%d,y=%d,w=%d,h=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h)
end
function inputBox:press()
if MOBILE then
@@ -946,7 +946,7 @@ function textBox:draw()
end
end
function textBox:getInfo()
return format("x=%d,y=%d,w=%d,h=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h)
return("x=%d,y=%d,w=%d,h=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h)
end
function WIDGET.newTextBox(D)--name,x,y,w,h[,font=30][,lineH][,fix],hide
local _={

View File

@@ -241,14 +241,13 @@ function DATA.copyQuestArgs()
return str
end
do--function DATA.pasteQuestArgs(str)
local sub=string.sub
function DATA.pasteQuestArgs(str)
if #str<4 then return end
local ENV=CUSTOMENV
ENV.holdCount= byte(str,1)-48
ENV.ospin= byte(str,2)~=90
ENV.missionKill= byte(str,3)~=90
ENV.sequence= sub(str,4)
ENV.holdCount= str:byte(1)-48
ENV.ospin= str:byte(2)~=90
ENV.missionKill= str:byte(3)~=90
ENV.sequence= str:sub(4)
return true
end
end

View File

@@ -1,4 +1,3 @@
local format=string.format
return{
color=COLOR.lH,
env={
@@ -11,8 +10,8 @@ return{
load=function()
PLY.newPlayer(1)
end,
score=function(P)return{P.modeData.event,P.stat.finesseRate*25/P.stat.piece}end,
scoreDisp=function(D)return D[1].."Stage "..format("%.2f",D[2]).."%"end,
score=function(P)return{P.modeData.event,P.stat.finesseRate*20/P.stat.piece}end,
scoreDisp=function(D)return("%d Stage %.2f%"):format(D[1],D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]>b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -1,5 +1,4 @@
local gc=love.graphics
local format=string.format
return{
color=COLOR.lBlue,
@@ -40,7 +39,7 @@ return{
mesDisp=function(P)
setFont(75)
local r=P.modeData.target*.1
mStr(r<11 and 18 or r<22 and r+8 or format("%02x",r*10-220),69,210)
mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),69,210)
mText(drawableText.speedLV,69,290)
setFont(45)
mStr(P.stat.row,69,320)

View File

@@ -1,4 +1,3 @@
local format=string.format
return{
color=COLOR.white,
env={
@@ -11,8 +10,8 @@ return{
end,
mesDisp=function(P)
setFont(45)
mStr(format("%.1f",P.stat.atk),69,190)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,310)
mStr(("%.1f"):format(P.stat.atk),69,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310)
mText(drawableText.atk,69,243)
mText(drawableText.eff,69,363)
end,

View File

@@ -1,4 +1,3 @@
local format=string.format
local function check_rise(P)
local L=P.garbageBeneath
if #P.clearedRow==0 then
@@ -47,7 +46,7 @@ return{
setFont(45)
mStr(P.stat.dig,69,190)
mStr(P.stat.atk,69,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,420)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,420)
mText(drawableText.line,69,243)
mText(drawableText.atk,69,363)
mText(drawableText.eff,69,475)

View File

@@ -1,5 +1,3 @@
local format=string.format
return{
color=COLOR.lYellow,
env={
@@ -16,8 +14,8 @@ return{
end,
mesDisp=function(P)
setFont(45)
mStr(format("%.1f",P.stat.atk),69,190)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,310)
mStr(("%.1f"):format(P.stat.atk),69,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310)
mText(drawableText.atk,69,243)
mText(drawableText.eff,69,363)
end,

View File

@@ -1,4 +1,3 @@
local format=string.format
local function tech_check_hard(P)
local C=P.lastPiece
if C.row>0 then
@@ -28,8 +27,8 @@ return{
end,
mesDisp=function(P)
setFont(45)
mStr(format("%.1f",P.stat.atk),69,190)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,310)
mStr(("%.1f"):format(P.stat.atk),69,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310)
mText(drawableText.atk,69,243)
mText(drawableText.eff,69,363)
end,

View File

@@ -1,5 +1,3 @@
local format=string.format
return{
color=COLOR.magenta,
env={
@@ -14,8 +12,8 @@ return{
end,
mesDisp=function(P)
setFont(45)
mStr(format("%.1f",P.stat.atk),69,190)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,310)
mStr(("%.1f"):format(P.stat.atk),69,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310)
mText(drawableText.atk,69,243)
mText(drawableText.eff,69,363)
end,

View File

@@ -1,4 +1,3 @@
local format=string.format
local function tech_check_hard(P)
local C=P.lastPiece
if C.row>0 then
@@ -25,8 +24,8 @@ return{
end,
mesDisp=function(P)
setFont(45)
mStr(format("%.1f",P.stat.atk),69,190)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,310)
mStr(("%.1f"):format(P.stat.atk),69,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310)
mText(drawableText.atk,69,243)
mText(drawableText.eff,69,363)
end,

View File

@@ -1,5 +1,3 @@
local format=string.format
return{
color=COLOR.red,
env={
@@ -14,8 +12,8 @@ return{
end,
mesDisp=function(P)
setFont(45)
mStr(format("%.1f",P.stat.atk),69,190)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,310)
mStr(("%.1f"):format(P.stat.atk),69,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310)
mText(drawableText.atk,69,243)
mText(drawableText.eff,69,363)
end,

View File

@@ -1,4 +1,3 @@
local format=string.format
local function tech_check_hard(P)
local C=P.lastPiece
if C.row>0 then
@@ -25,8 +24,8 @@ return{
end,
mesDisp=function(P)
setFont(45)
mStr(format("%.1f",P.stat.atk),69,190)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,310)
mStr(("%.1f"):format(P.stat.atk),69,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310)
mText(drawableText.atk,69,243)
mText(drawableText.eff,69,363)
end,

View File

@@ -1,5 +1,3 @@
local format=string.format
return{
color=COLOR.green,
env={
@@ -14,8 +12,8 @@ return{
end,
mesDisp=function(P)
setFont(45)
mStr(format("%.1f",P.stat.atk),69,190)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,310)
mStr(("%.1f"):format(P.stat.atk),69,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310)
mText(drawableText.atk,69,243)
mText(drawableText.eff,69,363)
end,

View File

@@ -1,4 +1,3 @@
local format=string.format
local function tech_check_hard(P)
local C=P.lastPiece
if C.row>0 then
@@ -25,8 +24,8 @@ return{
end,
mesDisp=function(P)
setFont(45)
mStr(format("%.1f",P.stat.atk),69,190)
mStr(format("%.2f",P.stat.atk/P.stat.row),69,310)
mStr(("%.1f"):format(P.stat.atk),69,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),69,310)
mText(drawableText.atk,69,243)
mText(drawableText.eff,69,363)
end,

View File

@@ -1,7 +1,6 @@
local gc=love.graphics
local int,rnd=math.floor,math.random
local format=string.format
local mStr=mStr
local scene={}
@@ -266,7 +265,7 @@ local backColor={
function scene.draw()
setFont(40)
gc.setColor(1,1,1)
gc.print(format("%.3f",time),1026,80)
gc.print(("%.3f"):format(time),1026,80)
gc.setColor(1,.8,.8)
gc.print(move,1026,130)
gc.setColor(.8,.8,1)

View File

@@ -3,7 +3,6 @@ local setColor,rectangle=gc.setColor,gc.rectangle
local int,abs=math.floor,math.abs
local rnd,min=math.random,math.min
local format=string.format
local ins=table.insert
local setFont=setFont
local mStr=mStr
@@ -121,7 +120,7 @@ local function freshMaxTile()
maxTile=maxTile+1
if maxTile==12 then skipper.cd=0 end
SFX.play("reach")
ins(progress,format("%s - %.3fs",tileName[maxTile],TIME()-startTime))
ins(progress,("%s - %.3fs"):format(tileName[maxTile],TIME()-startTime))
end
local function squash(L)
local p1,p2=1
@@ -349,7 +348,7 @@ end
function scene.draw()
setFont(35)
setColor(1,1,1)
gc.print(format("%.3f",time),1000,10)
gc.print(("%.3f"):format(time),1000,10)
gc.print(move,1000,45)
--Progress time list

View File

@@ -1,6 +1,5 @@
local gc=love.graphics
local rnd=math.random
local format=string.format
local mStr=mStr
local levels={
@@ -89,11 +88,11 @@ end
function scene.draw()
setFont(40)
gc.setColor(1,1,1)
gc.print(format("%.3f",time),1026,80)
gc.print(("%.3f"):format(time),1026,80)
gc.print(mistake,1026,150)
if state>0 then
gc.print(format("%.3f/s",(progress-1)/time),1026,220)
gc.print(("%.3f/s"):format((progress-1)/time),1026,220)
end
if state==2 then

View File

@@ -1,8 +1,6 @@
local gc=love.graphics
local kb=love.keyboard
local find,sub,byte=string.find,string.sub,string.byte
local scene={}
local reg--register
@@ -18,7 +16,7 @@ end
scene.mouseDown=NULL
function scene.keyDown(k)
if byte(k)>=48 and byte(k)<=57 then
if k:byte()>=48 and k:byte()<=57 then
if sym=="="then
val=k
sym=false
@@ -34,7 +32,7 @@ function scene.keyDown(k)
elseif k:sub(1,2)=="kp"then
scene.keyDown(k:sub(3))
elseif k=="."then
if not(find(val,".",nil,true)or find(val,"e"))then
if not(val:find(".",nil,true)or val:find"e")then
if sym and not reg then
reg=val
val="0."
@@ -42,7 +40,7 @@ function scene.keyDown(k)
val=val.."."
end
elseif k=="e"then
if not find(val,"e")then
if not val:find"e"then
val=val.."e"
end
elseif k=="backspace"then
@@ -51,7 +49,7 @@ function scene.keyDown(k)
elseif sym then
sym=false
else
val=sub(val,1,-2)
val=val:sub(1,-2)
end
if val==""then val="0"end
elseif k=="+"or k=="="and kb.isDown("lshift","rshift")then sym="+" reg=false
@@ -59,9 +57,9 @@ function scene.keyDown(k)
elseif k=="-"then sym="-" reg=false
elseif k=="/"then sym="/" reg=false
elseif k=="return"then
if byte(val,-1)==101 then val=sub(val,1,-2)end
if val:byte(-1)==101 then val=val:sub(1,-2)end
if sym and reg then
if byte(reg,-1)==101 then reg=sub(reg,1,-2)end
if reg:byte(-1)==101 then reg=reg:sub(1,-2)end
val=
sym=="+"and (tonumber(reg)or 0)+tonumber(val)or
sym=="-"and (tonumber(reg)or 0)-tonumber(val)or

View File

@@ -1,7 +1,6 @@
local gc=love.graphics
local int,rnd=math.floor,math.random
local format=string.format
local ins,rem=table.insert,table.remove
local targets={
@@ -132,7 +131,7 @@ local function touch(n)
keyTime[21]=nil
score=score+1
if not arcade and targets[score]then
ins(progress,format("%s - %.3fs",score,TIME()-startTime))
ins(progress,("%s - %.3fs"):format(score,TIME()-startTime))
if score==2600 then
for i=1,#pos do
pos[i]=626
@@ -211,14 +210,14 @@ function scene.draw()
if arcade then
--Draw rolling speed
mStr(format("%.2f/s",rollSpeed/2),155,490)
mStr(("%.2f/s"):format(rollSpeed/2),155,490)
else
--Draw speed
setFont(45)
gc.setColor(1,.6,.6)
mStr(format("%.2f",maxSpeed/60),155,460)
mStr(("%.2f"):format(maxSpeed/60),155,460)
gc.setColor(1,1,1)
mStr(format("%.2f",speed/60),155,520)
mStr(("%.2f"):format(speed/60),155,520)
--Progress time list
setFont(30)
@@ -230,7 +229,7 @@ function scene.draw()
--Draw time
gc.setColor(1,1,1)
setFont(45)
gc.print(format("%.3f",time),1030,70)
gc.print(("%.3f"):format(time),1030,70)
end
--Draw tiles

View File

@@ -2,7 +2,6 @@ local gc=love.graphics
local ms=love.mouse
local int,rnd=math.floor,math.random
local format=string.format
local rem=table.remove
local setFont=setFont
local mStr=mStr
@@ -122,7 +121,7 @@ end
function scene.draw()
setFont(40)
gc.setColor(1,1,1)
gc.print(format("%.3f",time),1026,80)
gc.print(("%.3f"):format(time),1026,80)
gc.print(mistake,1026,150)
setFont(70)

View File

@@ -1,6 +1,5 @@
local gc=love.graphics
local max=math.max
local format=string.format
local ins=table.insert
local mStr=mStr
@@ -45,16 +44,16 @@ end
function scene.draw()
setFont(70)gc.setColor(1,.6,.6)
mStr(format("%.2f",maxSpeed),640,20)
mStr(("%.2f"):format(maxSpeed),640,20)
setFont(100)gc.setColor(1,1,1)
mStr(format("%.2f",speed),640,150)
mStr(("%.2f"):format(speed),640,150)
setFont(35)
gc.setColor(.6,.6,.9)
mStr(format("%.2f",maxSpeed/60),640,95)
mStr(("%.2f"):format(maxSpeed/60),640,95)
gc.setColor(.8,.8,.8)
mStr(format("%.2f",speed/60),640,255)
mStr(("%.2f"):format(speed/60),640,255)
setFont(60)gc.setColor(.7,.7,.7)
mStr("/min",640,310)

View File

@@ -3,7 +3,6 @@ local msIsDown,kbIsDown,tcTouches=love.mouse.isDown,love.keyboard.isDown,love.to
local setColor,rectangle=gc.setColor,gc.rectangle
local int,rnd=math.floor,math.random
local format=string.format
local ins,rem=table.insert,table.remove
local mStr=mStr
@@ -98,7 +97,7 @@ local function merge()
if chosen==maxTile then
maxTile=chosen+1
if maxTile>=6 then
ins(progress,format("%s - %.3fs",maxTile,TIME()-startTime))
ins(progress,("%s - %.3fs"):format(maxTile,TIME()-startTime))
end
maxNew=
maxTile<=4 and 2 or
@@ -224,7 +223,7 @@ end
function scene.draw()
setFont(40)
setColor(1,1,1)
gc.print(format("%.3f",time),1026,50)
gc.print(("%.3f"):format(time),1026,50)
gc.print(score,1026,100)
--Progress time list

View File

@@ -230,8 +230,13 @@ function scene.keyDown(key)
LOG.print(text.exportSuccess,COLOR.G)
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
local str=sys.getClipboardText()
local p=string.find(str,":")--ptr*
if p then str=sub(str,p+1)end
local p=str:find":"--ptr*
if p then
if not str:sub(1,p-1):find"Field"then
LOG.print(text.pasteWrongPlace)
end
str=str:sub(p+1)
end
if DATA.pasteBoard(str,page)then
LOG.print(text.importSuccess,COLOR.G)
else

View File

@@ -78,7 +78,12 @@ function scene.keyDown(key)
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
local str=sys.getClipboardText()
local p=str:find":"--ptr*
if p then str=sub(str,p+1)end
if p then
if not str:sub(1,p-1):find"Target"then
LOG.print(text.pasteWrongPlace)
end
str=str:sub(p+1)
end
if DATA.pasteMission(str)then
LOG.print(text.importSuccess,COLOR.G)
cur=#MISSION

View File

@@ -92,8 +92,13 @@ function scene.keyDown(key)
end
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
local str=sys.getClipboardText()
local p=string.find(str,":")--ptr*
if p then str=sub(str,p+1)end
local p=str:find":"--ptr*
if p then
if not str:sub(1,p-1):find"SEQ"then
LOG.print(text.pasteWrongPlace)
end
str=str:sub(p+1)
end
if DATA.pasteSequence(str)then
LOG.print(text.importSuccess,COLOR.G)
cur=#BAG

View File

@@ -1,6 +1,5 @@
local gc=love.graphics
local sin,log=math.sin,math.log10
local format=string.format
local GAME,SCR=GAME,SCR
local setFont,mStr=setFont,mStr
@@ -39,16 +38,16 @@ function scene.sceneInit(org)
local frameLostRate=(S.frame/S.time/60-1)*100
form={
{COLOR.Z,STRING.time(S.time),COLOR[frameLostRate>10 and"R"or frameLostRate>3 and"Y"or"H"],format(" (%.2f%%)",frameLostRate)},
format("%d/%d/%d",S.key,S.rotate,S.hold),
format("%d %.2fPPS",S.piece,S.piece/S.time),
format("%d(%d) %.2fLPM",S.row,S.dig,S.row/S.time*60),
format("%d(%d) %.2fAPM",S.atk,S.digatk,S.atk/S.time*60),
format("%d(%d-%d)",S.pend,S.recv,S.recv-S.pend),
format("%d/%d/%d/%d",S.clears[1],S.clears[2],S.clears[3],S.clears[4]),
format("(%d)/%d/%d/%d",S.spins[1],S.spins[2],S.spins[3],S.spins[4]),
format("%d/%d ; %d/%d",S.b2b,S.b3b,S.pc,S.hpc),
format("%d/%dx/%.2f%%",S.extraPiece,S.maxFinesseCombo,S.finesseRate*20/S.piece),
{COLOR.Z,STRING.time(S.time),COLOR[frameLostRate>10 and"R"or frameLostRate>3 and"Y"or"H"],(" (%.2f%%)"):format(frameLostRate)},
("%d/%d/%d"):format(S.key,S.rotate,S.hold),
("%d %.2fPPS"):format(S.piece,S.piece/S.time),
("%d(%d) %.2fLPM"):format(S.row,S.dig,S.row/S.time*60),
("%d(%d) %.2fAPM"):format(S.atk,S.digatk,S.atk/S.time*60),
("%d(%d-%d)"):format(S.pend,S.recv,S.recv-S.pend),
("%d/%d/%d/%d"):format(S.clears[1],S.clears[2],S.clears[3],S.clears[4]),
("(%d)/%d/%d/%d"):format(S.spins[1],S.spins[2],S.spins[3],S.spins[4]),
("%d/%d ; %d/%d"):format(S.b2b,S.b3b,S.pc,S.hpc),
("%d/%dx/%.2f%%"):format(S.extraPiece,S.maxFinesseCombo,S.finesseRate*20/S.piece),
}
--From right-down, 60 degree each
radar={
@@ -67,7 +66,7 @@ function scene.sceneInit(org)
end
for i=1,6 do
radar[i]=format("%.2f",radar[i])..text.radarData[i]
radar[i]=("%.2f%s"):format(radar[i],text.radarData[i])
end
local f=1
for i=1,6 do
@@ -184,7 +183,7 @@ function scene.draw()
setFont(25)
if GAME.pauseCount>0 then
gc.setColor(1,.4,.4,T)
gc.print(text.pauseCount..":["..GAME.pauseCount.."] "..format("%.2f",GAME.pauseTime).."s",40,180)
gc.print(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),40,180)
end
gc.setColor(1,1,1,T)

View File

@@ -1,7 +1,6 @@
local gc=love.graphics
local abs,int,sin=math.abs,math.floor,math.sin
local format=string.format
local mStr=mStr
local scene={}
@@ -34,10 +33,10 @@ function scene.sceneInit()
S.piece.." "..S.row.." "..int(S.atk),
S.recv.." "..S.off.." "..S.pend,
S.dig.." "..int(S.digatk),
format("%.2f %.2f",S.atk/S.row,S.digatk/S.dig),
("%.2f %.2f"):format(S.atk/S.row,S.digatk/S.dig),
S.b2b.." "..S.b3b,
S.pc.." "..S.hpc,
format("%d/%.2f%%",S.extraPiece,S.finesseRate*20/S.piece),
("%d/%.2f%%"):format(S.extraPiece,S.finesseRate*20/S.piece),
}
for i=1,11 do
item[i]=text.stat[i].."\t"..item[i]