Skip to content

Commit

Permalink
删除所有---后的空格(包括框架)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Nov 1, 2023
1 parent 247594e commit 4546967
Show file tree
Hide file tree
Showing 98 changed files with 342 additions and 342 deletions.
2 changes: 1 addition & 1 deletion Zenitha
Submodule Zenitha updated 34 files
+28 −28 background.lua
+29 −29 bgm.lua
+34 −34 color.lua
+10 −10 debug.lua
+17 −17 file.lua
+29 −29 font.lua
+185 −185 gcExtend.lua
+27 −27 http.lua
+21 −21 image.lua
+55 −55 init.lua
+16 −16 languages.lua
+4 −4 log.lua
+11 −11 luasocket_doc.lua
+110 −110 mathExtend.lua
+11 −11 message.lua
+11 −11 profile.lua
+2 −2 require.lua
+59 −59 scene.lua
+40 −40 screen.lua
+41 −41 sfx.lua
+2 −2 sha2.lua
+124 −124 stringExtend.lua
+14 −14 sysFX.lua
+135 −135 tableExtend.lua
+24 −24 task.lua
+34 −34 tcp.lua
+3 −3 tcp_client.lua
+8 −8 tcp_server.lua
+48 −48 text.lua
+2 −2 vibrate.lua
+25 −25 voice.lua
+39 −39 wait.lua
+4 −4 wheelToArrow.lua
+225 −225 widget.lua
6 changes: 3 additions & 3 deletions assets/game/basePlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local ins,rem=table.insert,table.remove

local sign,expApproach=MATH.sign,MATH.expApproach

--- @class Techmino.Player
---@class Techmino.Player
local P={}

--------------------------------------------------------------
Expand Down Expand Up @@ -209,7 +209,7 @@ function P:delEvent(name,F)
local pos=TABLE.find(self.event[name],F)
if pos then self.event[name][pos]=_scrap end
end
--- @param reason Techmino.EndReason
---@param reason Techmino.EndReason
function P:finish(reason)
if self.finished then return end
self.timing=false
Expand Down Expand Up @@ -641,7 +641,7 @@ local soundTimeMeta={
__index=function(self,k) rawset(self,k,0) return -1e99 end,
__metatable=true,
}
--- @return Techmino.Player
---@return Techmino.Player
function P.new()
local self={}
self.isMain=false
Expand Down
336 changes: 168 additions & 168 deletions assets/game/classes.lua
Original file line number Diff line number Diff line change
@@ -1,173 +1,173 @@
--- @alias Techmino.Player.Type 'mino'|'puyo'|'gem'
--- @alias Techmino.Mode.Setting Techmino.Mode.Setting.Mino|Techmino.Mode.Setting.Puyo|Techmino.Mode.Setting.Gem
--- @alias Techmino.EndReason
--- | 'AC' Win
--- | 'WA' Block out
--- | 'CE' Lock out
--- | 'MLE' Top out
--- | 'TLE' Time out
--- | 'OLE' Finesse fault
--- | 'ILE' Ran out pieces
--- | 'PE' Mission failed
--- | 'UKE' Other reason

--- @alias Techmino.mode.event.basic
--- | 'always'
--- | 'playerInit'
--- | 'gameStart'
--- | 'beforePress'
--- | 'afterPress'
--- | 'beforeRelease'
--- | 'afterRelease'
--- | 'gameOver'

--- @alias Techmino.mode.event.mino
--- | 'afterResetPos'
--- | 'afterSpawn'
--- | 'afterDrop'
--- | 'afterLock'
--- | 'afterClear'
--- | 'beforeCancel'
--- | 'beforeSend'
--- | 'beforeDiscard'
--- | 'whenSuffocate'
--- | 'extraSolidCheck'
--- | 'changeSpawnPos'
---@alias Techmino.Player.Type 'mino'|'puyo'|'gem'
---@alias Techmino.Mode.Setting Techmino.Mode.Setting.Mino|Techmino.Mode.Setting.Puyo|Techmino.Mode.Setting.Gem
---@alias Techmino.EndReason
---|'AC' Win
---|'WA' Block out
---|'CE' Lock out
---|'MLE' Top out
---|'TLE' Time out
---|'OLE' Finesse fault
---|'ILE' Ran out pieces
---|'PE' Mission failed
---|'UKE' Other reason

---@alias Techmino.mode.event.basic
---|'always'
---|'playerInit'
---|'gameStart'
---|'beforePress'
---|'afterPress'
---|'beforeRelease'
---|'afterRelease'
---|'gameOver'

---@alias Techmino.mode.event.mino
---|'afterResetPos'
---|'afterSpawn'
---|'afterDrop'
---|'afterLock'
---|'afterClear'
---|'beforeCancel'
---|'beforeSend'
---|'beforeDiscard'
---|'whenSuffocate'
---|'extraSolidCheck'
---|'changeSpawnPos'
---
--- | 'drawBelowField'
--- | 'drawBelowBlock'
--- | 'drawBelowMarks'
--- | 'drawInField'
--- | 'drawOnPlayer'

--- @alias Techmino.mode.event.puyo
--- | 'afterSpawn'
--- | 'afterResetPos'
--- | 'afterDrop'
--- | 'afterLock'
--- | 'afterClear'
--- | 'whenSuffocate'
--- |
--- | 'drawBelowField'
--- | 'drawBelowBlock'
--- | 'drawBelowMarks'
--- | 'drawInField'
--- | 'drawOnPlayer'

--- @alias Techmino.mode.event.gem
--- | 'illegalMove'
--- | 'legalMove'
---|'drawBelowField'
---|'drawBelowBlock'
---|'drawBelowMarks'
---|'drawInField'
---|'drawOnPlayer'

---@alias Techmino.mode.event.puyo
---|'afterSpawn'
---|'afterResetPos'
---|'afterDrop'
---|'afterLock'
---|'afterClear'
---|'whenSuffocate'
---|
---|'drawBelowField'
---|'drawBelowBlock'
---|'drawBelowMarks'
---|'drawInField'
---|'drawOnPlayer'

---@alias Techmino.mode.event.gem
---|'illegalMove'
---|'legalMove'
---
--- | 'drawBelowField'
--- | 'drawInField'
--- | 'drawOnPlayer'

--- @alias Techmino.Mech.basic table<string, table|fun(P:Techmino.Player|any):any>
--- @alias Techmino.Mech.mino table<string, table|fun(P:Techmino.Player.mino|any):any,any>
--- @alias Techmino.Mech.puyo table<string, table|fun(P:Techmino.Player.puyo|any):any,any>
--- @alias Techmino.Mech.gem table<string, table|fun(P:Techmino.Player.gem|any):any,any>

--- @class Techmino.ParticleSystems
--- @field rectShade love.ParticleSystem
--- @field spinArrow table
--- @field star love.ParticleSystem
--- @field boardSmoke love.ParticleSystem
--- @field line love.ParticleSystem
--- @field hitSparkle love.ParticleSystem
--- @field cornerCheck love.ParticleSystem
--- @field tiltRect love.ParticleSystem
--- @field trail love.ParticleSystem
--- @field minoMapBack love.ParticleSystem

--- @alias Techmino.Mino.Shape table<number,table<number,boolean>>
--- @alias Techmino.Mino.Name 'Z'|'S'|'J'|'L'|'T'|'O'|'I'|'Z5'|'S5'|'P'|'Q'|'F'|'E'|'T5'|'U'|'V'|'W'|'X'|'J5'|'L5'|'R'|'Y'|'N'|'H'|'I5'|'I3'|'C'|'I2'|'O1'|string
--- @alias Techmino.Mino.ID 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|integer

--- @class Techmino.Mino
--- @field name Techmino.Mino.Name
--- @field id Techmino.Mino.ID
--- @field shape Techmino.Mino.Shape

--- @class Techmino.Cell
--- @field cid string cell's mem pointer string
--- @field id number ascending piece number
--- @field color number 0~63
--- @field conn table<string, true>
--- @field bias {expBack?:number, lineBack?:number, teleBack?:number, x:number, y:number}
--- @field visTimer? number
--- @field visStep? number
--- @field visMax? number

--- @class Techmino.RectField
--- @field _width number
--- @field _matrix (Techmino.Cell|false)[][]

--- @class Techmino.Mode
--- @field initialize function Called when initializing the mode
--- @field settings {mino:Techmino.Mode.Setting.Mino?, puyo:Techmino.Mode.Setting.Puyo?, gem:Techmino.Mode.Setting.Gem?}
--- @field layout 'default' Layout mode
--- @field checkFinish function Return if the game should end when a player finishes
--- @field result function Called when the game ends
--- @field resultPage fun(time:number) Drawing the result page
--- @field name string Mode name, for debug use

--- @class Techmino.Mode.Setting.Mino
--- @field event table<Techmino.mode.event.basic|Techmino.mode.event.mino,string|table|function|table<number,string|table|function>>

--- @class Techmino.Mode.Setting.Puyo
--- @field event table<Techmino.mode.event.basic|Techmino.mode.event.puyo,string|table|function|table<number,string|table|function>>

--- @class Techmino.Mode.Setting.Gem
--- @field event table<Techmino.mode.event.basic|Techmino.mode.event.gem,string|table|function|table<number,string|table|function>>

--- @class Techmino.mino.clearRule
--- @field getDelay fun(P:Techmino.Player.mino, lines:number[]): number?
--- @field isFill fun(P:Techmino.Player.mino, y:number): boolean
--- @field getFill fun(P:Techmino.Player.mino): number[]?
--- @field clear fun(P:Techmino.Player.mino, lines:number[])

--- @class Techmino.Game
--- @field playing boolean
--- @field playerList table<number, Techmino.Player>|false
--- @field playerMap table<number, Techmino.Player>|false
--- @field camera Zenitha.Camera
--- @field hitWaves table
--- @field seed number|false
--- @field mode Techmino.Mode|false
--- @field mainID number|false
--- @field mainPlayer Techmino.Player|false

--- @class Techmino.Player
--- @field gameMode Techmino.Player.Type
--- @field id number limited to 1~1000
--- @field group number
--- @field isMain boolean
--- @field sound boolean
--- @field settings Techmino.Mode.Setting
--- @field buffedKey table
--- @field modeData table
--- @field soundTimeHistory table
--- @field RND love.RandomGenerator
--- @field pos {x:number, y:number, k:number, a:number, dx:number, dy:number, dk:number, da:number, vx:number, vy:number, vk:number, va:number}
--- @field finished Techmino.EndReason|boolean
--- @field realTime number
--- @field time number
--- @field gameTime number
--- @field timing boolean
--- @field texts Zenitha.Text
--- @field particles Techmino.ParticleSystems
---|'drawBelowField'
---|'drawInField'
---|'drawOnPlayer'

---@alias Techmino.Mech.basic table<string, table|fun(P:Techmino.Player|any):any>
---@alias Techmino.Mech.mino table<string, table|fun(P:Techmino.Player.mino|any):any,any>
---@alias Techmino.Mech.puyo table<string, table|fun(P:Techmino.Player.puyo|any):any,any>
---@alias Techmino.Mech.gem table<string, table|fun(P:Techmino.Player.gem|any):any,any>

---@class Techmino.ParticleSystems
---@field rectShade love.ParticleSystem
---@field spinArrow table
---@field star love.ParticleSystem
---@field boardSmoke love.ParticleSystem
---@field line love.ParticleSystem
---@field hitSparkle love.ParticleSystem
---@field cornerCheck love.ParticleSystem
---@field tiltRect love.ParticleSystem
---@field trail love.ParticleSystem
---@field minoMapBack love.ParticleSystem

---@alias Techmino.Mino.Shape table<number,table<number,boolean>>
---@alias Techmino.Mino.Name 'Z'|'S'|'J'|'L'|'T'|'O'|'I'|'Z5'|'S5'|'P'|'Q'|'F'|'E'|'T5'|'U'|'V'|'W'|'X'|'J5'|'L5'|'R'|'Y'|'N'|'H'|'I5'|'I3'|'C'|'I2'|'O1'|string
---@alias Techmino.Mino.ID 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|integer

---@class Techmino.Mino
---@field name Techmino.Mino.Name
---@field id Techmino.Mino.ID
---@field shape Techmino.Mino.Shape

---@class Techmino.Cell
---@field cid string cell's mem pointer string
---@field id number ascending piece number
---@field color number 0~63
---@field conn table<string, true>
---@field bias {expBack?:number, lineBack?:number, teleBack?:number, x:number, y:number}
---@field visTimer? number
---@field visStep? number
---@field visMax? number

---@class Techmino.RectField
---@field _width number
---@field _matrix (Techmino.Cell|false)[][]

---@class Techmino.Mode
---@field initialize function Called when initializing the mode
---@field settings {mino:Techmino.Mode.Setting.Mino?, puyo:Techmino.Mode.Setting.Puyo?, gem:Techmino.Mode.Setting.Gem?}
---@field layout 'default' Layout mode
---@field checkFinish function Return if the game should end when a player finishes
---@field result function Called when the game ends
---@field resultPage fun(time:number) Drawing the result page
---@field name string Mode name, for debug use

---@class Techmino.Mode.Setting.Mino
---@field event table<Techmino.mode.event.basic|Techmino.mode.event.mino,string|table|function|table<number,string|table|function>>

---@class Techmino.Mode.Setting.Puyo
---@field event table<Techmino.mode.event.basic|Techmino.mode.event.puyo,string|table|function|table<number,string|table|function>>

---@class Techmino.Mode.Setting.Gem
---@field event table<Techmino.mode.event.basic|Techmino.mode.event.gem,string|table|function|table<number,string|table|function>>

---@class Techmino.mino.clearRule
---@field getDelay fun(P:Techmino.Player.mino, lines:number[]): number?
---@field isFill fun(P:Techmino.Player.mino, y:number): boolean
---@field getFill fun(P:Techmino.Player.mino): number[]?
---@field clear fun(P:Techmino.Player.mino, lines:number[])

---@class Techmino.Game
---@field playing boolean
---@field playerList table<number, Techmino.Player>|false
---@field playerMap table<number, Techmino.Player>|false
---@field camera Zenitha.Camera
---@field hitWaves table
---@field seed number|false
---@field mode Techmino.Mode|false
---@field mainID number|false
---@field mainPlayer Techmino.Player|false

---@class Techmino.Player
---@field gameMode Techmino.Player.Type
---@field id number limited to 1~1000
---@field group number
---@field isMain boolean
---@field sound boolean
---@field settings Techmino.Mode.Setting
---@field buffedKey table
---@field modeData table
---@field soundTimeHistory table
---@field RND love.RandomGenerator
---@field pos {x:number, y:number, k:number, a:number, dx:number, dy:number, dk:number, da:number, vx:number, vy:number, vk:number, va:number}
---@field finished Techmino.EndReason|boolean
---@field realTime number
---@field time number
---@field gameTime number
---@field timing boolean
---@field texts Zenitha.Text
---@field particles Techmino.ParticleSystems
---
--- @field updateFrame function
--- @field scriptCmd function
--- @field decodeScript function
--- @field checkScriptSyntax function
---@field updateFrame function
---@field scriptCmd function
---@field decodeScript function
---@field checkScriptSyntax function
---
--- @field hand table|false Piece object
--- @field handX number
--- @field handY number
--- @field event table
--- @field soundEvent table
--- @field _actions table<string, {press:fun(P:Techmino.Player), release:fun(P:Techmino.Player)}>
---@field hand table|false Piece object
---@field handX number
---@field handY number
---@field event table
---@field soundEvent table
---@field _actions table<string, {press:fun(P:Techmino.Player), release:fun(P:Techmino.Player)}>
---
--- @field receive function
--- @field render function
---@field receive function
---@field render function
6 changes: 3 additions & 3 deletions assets/game/gemPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ local ins,rem=table.insert,table.remove

local inst=SFX.playSample

--- @class Techmino.Player.gem: Techmino.Player
--- @field field any[][]
---@class Techmino.Player.gem: Techmino.Player
---@field field any[][]
local GP=setmetatable({},{__index=require'assets.game.basePlayer',__metatable=true})

--[[ Gem tags:
Expand Down Expand Up @@ -863,7 +863,7 @@ function GP:checkScriptSyntax(cmd,arg,errMsg)
end
--------------------------------------------------------------
-- Builder
--- @class Techmino.Mode.Setting.Gem
---@class Techmino.Mode.Setting.Gem
local baseEnv={
-- Size
fieldSize=8,
Expand Down
Loading

0 comments on commit 4546967

Please sign in to comment.