Skip to content

Commit

Permalink
删除所有--- @xxx中的空格(包括框架)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Nov 1, 2023
1 parent 247594e commit 2cd02fa
Show file tree
Hide file tree
Showing 98 changed files with 286 additions and 286 deletions.
2 changes: 1 addition & 1 deletion Zenitha
Submodule Zenitha updated 33 files
+18 −18 background.lua
+14 −14 bgm.lua
+27 −27 color.lua
+2 −2 debug.lua
+9 −9 file.lua
+19 −19 font.lua
+131 −131 gcExtend.lua
+18 −18 http.lua
+1 −1 image.lua
+25 −25 init.lua
+9 −9 languages.lua
+2 −2 log.lua
+83 −83 mathExtend.lua
+5 −5 message.lua
+4 −4 profile.lua
+1 −1 require.lua
+47 −47 scene.lua
+37 −37 screen.lua
+22 −22 sfx.lua
+1 −1 sha2.lua
+84 −84 stringExtend.lua
+3 −3 sysFX.lua
+96 −96 tableExtend.lua
+13 −13 task.lua
+23 −23 tcp.lua
+3 −3 tcp_client.lua
+8 −8 tcp_server.lua
+29 −29 text.lua
+2 −2 vibrate.lua
+12 −12 voice.lua
+25 −25 wait.lua
+3 −3 wheelToArrow.lua
+193 −193 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
226 changes: 113 additions & 113 deletions assets/game/classes.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- @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
---@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
Expand All @@ -11,7 +11,7 @@
--- | 'PE' Mission failed
--- | 'UKE' Other reason

--- @alias Techmino.mode.event.basic
---@alias Techmino.mode.event.basic
--- | 'always'
--- | 'playerInit'
--- | 'gameStart'
Expand All @@ -21,7 +21,7 @@
--- | 'afterRelease'
--- | 'gameOver'

--- @alias Techmino.mode.event.mino
---@alias Techmino.mode.event.mino
--- | 'afterResetPos'
--- | 'afterSpawn'
--- | 'afterDrop'
Expand All @@ -40,7 +40,7 @@
--- | 'drawInField'
--- | 'drawOnPlayer'

--- @alias Techmino.mode.event.puyo
---@alias Techmino.mode.event.puyo
--- | 'afterSpawn'
--- | 'afterResetPos'
--- | 'afterDrop'
Expand All @@ -54,120 +54,120 @@
--- | 'drawInField'
--- | 'drawOnPlayer'

--- @alias Techmino.mode.event.gem
---@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
---@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
6 changes: 3 additions & 3 deletions assets/game/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaultMinoColor=setmetatable({
36,52,4,24,
},{__index=function() return math.random(64) end})
defaultPuyoColor=setmetatable({2,12,42,22,52},{__index=function() return math.random(64) end})
--- @type Techmino.Mech
---@type Techmino.Mech
mechLib=TABLE.newResourceTable(require'assets.game.mechanicLib',function(path) return FILE.load(path,'-lua') end)
regFuncLib(mechLib,"mechLib")
require'assets.game.rotsys_mino'
Expand Down Expand Up @@ -151,7 +151,7 @@ local function task_switchToResult()
end
end

--- @class Techmino.Game
---@class Techmino.Game
local GAME={
playing=false,

Expand All @@ -170,7 +170,7 @@ local GAME={

GAME.camera.moveSpeed=12

--- @return Techmino.Mode
---@return Techmino.Mode
function GAME.getMode(name)
if love.keyboard.isDown('f5') then
modeLib[name]=nil
Expand Down
8 changes: 4 additions & 4 deletions assets/game/mechanicLib/common/timer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local gc=love.graphics

local floatMixList={.3,.7,.9,.7,.6,.5,.42,.36,.3} -- Alpha curve of 'float' timer text, right-to-left

--- @alias mechLib.common.timer.style 'info'|'float'
---@alias mechLib.common.timer.style 'info'|'float'
local timer_drawFunc={
info=function(P,time,time0)
P:drawInfoPanel(-380,-60,160,120)
Expand All @@ -27,11 +27,11 @@ local timer_drawFunc={
end,
}

--- @type Techmino.Mech.basic
---@type Techmino.Mech.basic
local timer={}

--- @param time number milliseconds
--- @param prop {timeUp:function, draw?:mechLib.common.timer.style|function, cancel?:(fun():boolean), alwaysTiming:boolean}
---@param time number milliseconds
---@param prop {timeUp:function, draw?:mechLib.common.timer.style|function, cancel?:(fun():boolean), alwaysTiming:boolean}
function timer.new(P,time,prop)
if not P.modeData.timerList then
P.modeData.timerList={}
Expand Down
2 changes: 1 addition & 1 deletion assets/game/mechanicLib/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Those files will be loaded in another way, not require
local function require(path) return path:gsub('%.','/')..'.lua' end

--- @class Techmino.Mech
---@class Techmino.Mech
local mechLib={
common={
timer=require'assets.game.mechanicLib.common.timer',
Expand Down
2 changes: 1 addition & 1 deletion assets/game/mechanicLib/mino/acGenerator.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- @type Techmino.Mech.mino
---@type Techmino.Mech.mino
local ACGenerator={}

local pieceShapes do
Expand Down
2 changes: 1 addition & 1 deletion assets/game/mechanicLib/mino/backfire.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- @type Techmino.Mech.mino
---@type Techmino.Mech.mino
local backfire={}

function backfire.storePower_event_beforeCancel(P,atk)
Expand Down
Loading

0 comments on commit 2cd02fa

Please sign in to comment.