Skip to content

Commit 7d2a669

Browse files
committed
使用StyLua修正了文件格式
1 parent c6f0d9e commit 7d2a669

172 files changed

Lines changed: 3935 additions & 4000 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

example.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77
-- Overlay.ShowMessage("Hello,world!",0.5)
88
-- self.script.t
99
--end
10-

exampleWorker.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@
77
--}
88
--
99
--rawset(_G,"atest",TO_DEF)
10-
11-
12-

library/Actor.lua

Lines changed: 127 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -132,130 +132,130 @@
132132
---Callback: void callback()
133133
---@field onTakeDamage ScriptEvent
134134
Actor = {
135-
---Undo Deactivate()
136-
Activate = function () end,
137-
---@param mesh Mesh
138-
---@param materials Material[]
139-
---Adds an additional accessory renderer on top of the actors regular skin.
140-
AddAccessory = function (mesh,materials) end,
141-
---Resets the skin of the actor to the game-managed team skin.
142-
ApplyTeamSkin = function () end,
143-
---Returns true if Actor takes damage when hit by the given weapon.
144-
---@param weapon Weapon Can this weapon damage the Actor?
145-
---@return bool
146-
CanBeDamagedBy = function (weapon) end,
147-
---@param seat Seat
148-
---@return bool
149-
CanEnterSeat = function (seat) end,
150-
---Cuts the parachute. This function ignores the canDeployParachute value.
151-
CutParachute = function () end,
152-
---@overload fun(source : Actor,info: DamageInfo)
153-
---@overload fun(source : Actor,balance:float,isSplash:bool,isPiercing:bool)
154-
---@overload fun(source : Actor,balance:float,isSplash:bool,isPiercing:bool,point:Vector3,direction:Vector3,force:Vector3)
155-
---@param health float MUST
156-
---@return bool
157-
Damege = function (source,health,balance,isSplash,isPiercing,point,direction,force) end,
158-
---Used to temporarily disable an actor from the game. Hides, Freezes and Disables Hitbox Colliders of this Actor. Also stops the Actor from respawning.
159-
Deactivate = function () end,
160-
---Deploys the parachute. This function ignores the canDeployParachute value.
161-
DeployParachute = function () end,
162-
---Enters the target seat if it’s not already occupied. If the target seat is already occupied, the actor will not enter the seat, and this function returns false. If the actor could successfully enter the seat, the function returns true.
163-
---@param seat Seat
164-
---@return bool
165-
EnterSeat = function (seat) end,
166-
---Force enters the target seat, kicking out any previous occupant. If another seat is available in the vehicle, the previous occupant will swap to that seat. If not, they will exit the vehicle.
167-
---@param seat Seat
168-
EnterSeatForced = function (seat) end,
169-
---Makes the actor enter the vehicle. If the actor is a squad leader, this automatically makes the squad claim the vehicle.
170-
---@param vehicle Vehicle
171-
---@return bool
172-
EnterVehicle = function (vehicle) end,
173-
---Equip a new weapon in the specified slot (0-4).
174-
---@param entry WeaponEntry
175-
---@param slotNumber int
176-
---@param forceSwitchTo int
177-
---@return Weapon
178-
EquipNewWeaponEntry = function (entry,slotNumber,forceSwitchTo) end,
179-
---@param target Actor
180-
---@param weapon Weapon
181-
---@return Difficulty
182-
EvaluateShotDifficulty = function (target, weapon) end,
183-
---Makes the actor get off the ladder. If the actor was close to the top or bottom, the actor will be positioned according on the ladder’s top or bottom exit points.
184-
ExitLadder = function () end,
185-
ExitVehicle = function () end,
186-
---Ragdolls the actor.
187-
FallOver = function () end,
188-
---Get the animated bone transform of the specified HumanoidBodyBone.
189-
---@param bone HumanBodyBones
190-
---@return Transform
191-
GetHumanoidTransformAnimated = function (bone) end,
192-
---Get the ragdoll bone transform of the specified HumanoidBodyBone.
193-
---@param bone HumanBodyBones
194-
---@return Transform
195-
GetHumanoidTransformRagdoll = function (bone) end,
196-
---Makes the actor start climbing the ladder. The actor is positioned at the closest point on the ladder.
197-
---@param ladder Ladder
198-
GetOnLadder = function (ladder) end,
199-
---Gets the current actor skin. Returns nil if actor is using the default team skin.
200-
---@return ActorSkin
201-
GetOverrideActorSkin = function () end,
202-
---@return SkinnedMeshRenderer
203-
GetSkinnedMeshRendererAnimated = function () end,
204-
---@return SkinnedMeshRenderer
205-
GetSkinnedMeshRendererRagdoll = function () end,
206-
---Reloads all carried weapons instantly.
207-
InstantlyReloadCarriedWeapons = function () end,
208-
---@return bool
209-
IsWeaponUnholstered = function () end,
210-
---@param killer Actor
211-
Kill = function (killer) end,
212-
---Kills the actor without reporting the kill. An actor killed this way will not contribute to the scoreboard or killfeed, and will not spawn a ragdoll.
213-
KillSilently = function () end,
214-
---Ragdolls the actor and applies a force.
215-
---@param force Vector3
216-
KnockOver = function (force) end,
217-
---Removes all accessory renderers.
218-
RemoveAccessories = function () end,
219-
---Remove the weapon in the specified slot (0-4).
220-
---@param slotNumber int
221-
RemoveWeapon = function (slotNumber) end,
222-
---@return bool
223-
ResupplyAmmo = function () end,
224-
---@return bool
225-
ResupplyHealth = function () end,
226-
---Set the bone local scale of the specified HumanoidBodyBone.
227-
---@param bone HumanBodyBones
228-
---@param scale Vector3 | float
229-
SetHumanoidBoneScale = function (bone,scale) end,
230-
---Set the ragdoll joint drive values.
231-
---@param spring float The spring force value (default 1000). A higher value yields a stronger force.
232-
---@param siffness float The drag force value (default 3). A higher value yields a slower and more stable movement.
233-
SetRagdollJointDrive = function(spring, siffness) end,
234-
---Reset the ragdoll joint drive to their default values.
235-
SetRagdollJointDriveDefault = function () end,
236-
---Sets the skin of this actor to an unmanaged skin. Unmanaged skins are not managed by the game, meaning that glow will not be automatically applied when the player enters night vision mode.
237-
---@param actorSkin ActorSkin
238-
---@param mesh? Mesh The mesh that should be applied to the actor. If nil, the mesh will not be replaced.
239-
---@param materials? Material[] The material array that should be applied to the renderer.
240-
---@param teamMaterialIndex? int The material index that should be replaced by the team material. Set this value to -1 if no team material should be applied. Please note that this uses C# array indexing, meaning the first material entry is at index 0, the second and index 1, etc
241-
SetSkin = function (actorSkin,mesh, materials, teamMaterialIndex) end,
242-
---Sets the world scale of the WeaponParent transform, which controls scale of all held weapons. If all parent bones and game objects are uniformly scaled on all axis, this will yield the correct world scale. If not, the world scale might be off.
243-
---@param scale float
244-
SetWeaponParentApproximateWorldScale = function (scale) end,
245-
---Set the local scale of the WeaponParent transform, which controls scale of all held weapons.
246-
---@param scale float
247-
SetWeaponParentScale = function (scale) end,
248-
---@param position float
249-
---@param rotation? Quaternion
250-
SpawnAt = function (position, rotation) end,
251-
---Swaps with the target seat. If the target seat is already occupied, the two occupants will be swapped. If the target seat is not in the same vehicle, the swap is canceled and this function returns false.
252-
---@param seat Seat
253-
SwapWithSeat = function (seat) end,
254-
---Switches to the target seat. If the target seat is already occupied or is not in the same vehicle, the switch is canceled and this function returns false.
255-
---@param seat Seat
256-
SwitchToSeat = function (seat) end,
257-
---Set the position and rotation of this actor. Only rotation on the Y axis is applied to the actor, any rotation on the X and Z axis is ignored.
258-
---@param position float
259-
---@param rotation Quaternion
260-
TeleportTo = function (position, rotation) end,
261-
}
135+
---Undo Deactivate()
136+
Activate = function() end,
137+
---@param mesh Mesh
138+
---@param materials Material[]
139+
---Adds an additional accessory renderer on top of the actors regular skin.
140+
AddAccessory = function(mesh, materials) end,
141+
---Resets the skin of the actor to the game-managed team skin.
142+
ApplyTeamSkin = function() end,
143+
---Returns true if Actor takes damage when hit by the given weapon.
144+
---@param weapon Weapon Can this weapon damage the Actor?
145+
---@return bool
146+
CanBeDamagedBy = function(weapon) end,
147+
---@param seat Seat
148+
---@return bool
149+
CanEnterSeat = function(seat) end,
150+
---Cuts the parachute. This function ignores the canDeployParachute value.
151+
CutParachute = function() end,
152+
---@overload fun(source : Actor,info: DamageInfo)
153+
---@overload fun(source : Actor,balance:float,isSplash:bool,isPiercing:bool)
154+
---@overload fun(source : Actor,balance:float,isSplash:bool,isPiercing:bool,point:Vector3,direction:Vector3,force:Vector3)
155+
---@param health float MUST
156+
---@return bool
157+
Damege = function(source, health, balance, isSplash, isPiercing, point, direction, force) end,
158+
---Used to temporarily disable an actor from the game. Hides, Freezes and Disables Hitbox Colliders of this Actor. Also stops the Actor from respawning.
159+
Deactivate = function() end,
160+
---Deploys the parachute. This function ignores the canDeployParachute value.
161+
DeployParachute = function() end,
162+
---Enters the target seat if it’s not already occupied. If the target seat is already occupied, the actor will not enter the seat, and this function returns false. If the actor could successfully enter the seat, the function returns true.
163+
---@param seat Seat
164+
---@return bool
165+
EnterSeat = function(seat) end,
166+
---Force enters the target seat, kicking out any previous occupant. If another seat is available in the vehicle, the previous occupant will swap to that seat. If not, they will exit the vehicle.
167+
---@param seat Seat
168+
EnterSeatForced = function(seat) end,
169+
---Makes the actor enter the vehicle. If the actor is a squad leader, this automatically makes the squad claim the vehicle.
170+
---@param vehicle Vehicle
171+
---@return bool
172+
EnterVehicle = function(vehicle) end,
173+
---Equip a new weapon in the specified slot (0-4).
174+
---@param entry WeaponEntry
175+
---@param slotNumber int
176+
---@param forceSwitchTo int
177+
---@return Weapon
178+
EquipNewWeaponEntry = function(entry, slotNumber, forceSwitchTo) end,
179+
---@param target Actor
180+
---@param weapon Weapon
181+
---@return Difficulty
182+
EvaluateShotDifficulty = function(target, weapon) end,
183+
---Makes the actor get off the ladder. If the actor was close to the top or bottom, the actor will be positioned according on the ladder’s top or bottom exit points.
184+
ExitLadder = function() end,
185+
ExitVehicle = function() end,
186+
---Ragdolls the actor.
187+
FallOver = function() end,
188+
---Get the animated bone transform of the specified HumanoidBodyBone.
189+
---@param bone HumanBodyBones
190+
---@return Transform
191+
GetHumanoidTransformAnimated = function(bone) end,
192+
---Get the ragdoll bone transform of the specified HumanoidBodyBone.
193+
---@param bone HumanBodyBones
194+
---@return Transform
195+
GetHumanoidTransformRagdoll = function(bone) end,
196+
---Makes the actor start climbing the ladder. The actor is positioned at the closest point on the ladder.
197+
---@param ladder Ladder
198+
GetOnLadder = function(ladder) end,
199+
---Gets the current actor skin. Returns nil if actor is using the default team skin.
200+
---@return ActorSkin
201+
GetOverrideActorSkin = function() end,
202+
---@return SkinnedMeshRenderer
203+
GetSkinnedMeshRendererAnimated = function() end,
204+
---@return SkinnedMeshRenderer
205+
GetSkinnedMeshRendererRagdoll = function() end,
206+
---Reloads all carried weapons instantly.
207+
InstantlyReloadCarriedWeapons = function() end,
208+
---@return bool
209+
IsWeaponUnholstered = function() end,
210+
---@param killer Actor
211+
Kill = function(killer) end,
212+
---Kills the actor without reporting the kill. An actor killed this way will not contribute to the scoreboard or killfeed, and will not spawn a ragdoll.
213+
KillSilently = function() end,
214+
---Ragdolls the actor and applies a force.
215+
---@param force Vector3
216+
KnockOver = function(force) end,
217+
---Removes all accessory renderers.
218+
RemoveAccessories = function() end,
219+
---Remove the weapon in the specified slot (0-4).
220+
---@param slotNumber int
221+
RemoveWeapon = function(slotNumber) end,
222+
---@return bool
223+
ResupplyAmmo = function() end,
224+
---@return bool
225+
ResupplyHealth = function() end,
226+
---Set the bone local scale of the specified HumanoidBodyBone.
227+
---@param bone HumanBodyBones
228+
---@param scale Vector3 | float
229+
SetHumanoidBoneScale = function(bone, scale) end,
230+
---Set the ragdoll joint drive values.
231+
---@param spring float The spring force value (default 1000). A higher value yields a stronger force.
232+
---@param siffness float The drag force value (default 3). A higher value yields a slower and more stable movement.
233+
SetRagdollJointDrive = function(spring, siffness) end,
234+
---Reset the ragdoll joint drive to their default values.
235+
SetRagdollJointDriveDefault = function() end,
236+
---Sets the skin of this actor to an unmanaged skin. Unmanaged skins are not managed by the game, meaning that glow will not be automatically applied when the player enters night vision mode.
237+
---@param actorSkin ActorSkin
238+
---@param mesh? Mesh The mesh that should be applied to the actor. If nil, the mesh will not be replaced.
239+
---@param materials? Material[] The material array that should be applied to the renderer.
240+
---@param teamMaterialIndex? int The material index that should be replaced by the team material. Set this value to -1 if no team material should be applied. Please note that this uses C# array indexing, meaning the first material entry is at index 0, the second and index 1, etc
241+
SetSkin = function(actorSkin, mesh, materials, teamMaterialIndex) end,
242+
---Sets the world scale of the WeaponParent transform, which controls scale of all held weapons. If all parent bones and game objects are uniformly scaled on all axis, this will yield the correct world scale. If not, the world scale might be off.
243+
---@param scale float
244+
SetWeaponParentApproximateWorldScale = function(scale) end,
245+
---Set the local scale of the WeaponParent transform, which controls scale of all held weapons.
246+
---@param scale float
247+
SetWeaponParentScale = function(scale) end,
248+
---@param position float
249+
---@param rotation? Quaternion
250+
SpawnAt = function(position, rotation) end,
251+
---Swaps with the target seat. If the target seat is already occupied, the two occupants will be swapped. If the target seat is not in the same vehicle, the swap is canceled and this function returns false.
252+
---@param seat Seat
253+
SwapWithSeat = function(seat) end,
254+
---Switches to the target seat. If the target seat is already occupied or is not in the same vehicle, the switch is canceled and this function returns false.
255+
---@param seat Seat
256+
SwitchToSeat = function(seat) end,
257+
---Set the position and rotation of this actor. Only rotation on the Y axis is applied to the actor, any rotation on the X and Z axis is ignored.
258+
---@param position float
259+
---@param rotation Quaternion
260+
TeleportTo = function(position, rotation) end,
261+
}

library/ActorSkin.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@
88
---@field characterSkin MeshSkin
99
---@field kickLegSkin MeshSkin
1010
---@field name string
11-
local ActorSkin = {
12-
13-
}
11+
local ActorSkin = {}

library/AiActorController.lua

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,26 @@
4646
---**Const**
4747
---@field transform Transform
4848
AiActorController = {
49-
---Stops the current AI path movement
50-
CancelPath = function () end,
51-
---Pathfinds to the closest destination point on the current navmesh.
52-
---@param destination Vector3
53-
Goto = function (destination) end,
54-
---Orders the AI to enter the specified vehicle. Also sets the AI’s target vehicle to the specified vehicle.
55-
---@param vehicle Vehicle
56-
GotoAndEnterVehicle = function (vehicle) end,
57-
---Go straight to the destination point, ignoring pathfinding.
58-
---@param destination Vector3
59-
GotoDirect = function (destination) end,
60-
---Returns true if the targetActor is inside this actor’s field of view.
61-
---@overload fun(position:Vector3):bool Returns true if the position is inside this actors field of view.
62-
---@param targetActor Actor
63-
---@return bool
64-
IsInFOV = function (targetActor,position) end,
65-
---Leaves the target vehicle.
66-
LeaveVehicle = function () end,
67-
---Disables the built in AI movement, allowing full movement control from scripts.
68-
OverrideDefaultMovement = function () end,
69-
---Re-enables the built in AI movement.
70-
ReleaseDefaultMovementOverride = function () end,
71-
}
49+
---Stops the current AI path movement
50+
CancelPath = function() end,
51+
---Pathfinds to the closest destination point on the current navmesh.
52+
---@param destination Vector3
53+
Goto = function(destination) end,
54+
---Orders the AI to enter the specified vehicle. Also sets the AI’s target vehicle to the specified vehicle.
55+
---@param vehicle Vehicle
56+
GotoAndEnterVehicle = function(vehicle) end,
57+
---Go straight to the destination point, ignoring pathfinding.
58+
---@param destination Vector3
59+
GotoDirect = function(destination) end,
60+
---Returns true if the targetActor is inside this actor’s field of view.
61+
---@overload fun(position:Vector3):bool Returns true if the position is inside this actors field of view.
62+
---@param targetActor Actor
63+
---@return bool
64+
IsInFOV = function(targetActor, position) end,
65+
---Leaves the target vehicle.
66+
LeaveVehicle = function() end,
67+
---Disables the built in AI movement, allowing full movement control from scripts.
68+
OverrideDefaultMovement = function() end,
69+
---Re-enables the built in AI movement.
70+
ReleaseDefaultMovementOverride = function() end,
71+
}

library/Airplane.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
---@field controlVsAngleOfAttack AnimationCurve
1616
---@field flightAltitudeMultiplier float
1717
---@field gearsRetracted bool
18-
---@field isAirborne bool
18+
---@field isAirborne bool
1919
---@field landingGearActivationObjects GameObject[]
2020
---@field liftGainTime float
2121
---@field liftVsAngleOfAttack AnimationCurve
@@ -26,6 +26,6 @@
2626
---@field thruster Transform
2727
---@field yawSensitivity float
2828
Airplane = {
29-
---@param info DamageInfo
30-
StartBurning = function (info) end,
31-
}
29+
---@param info DamageInfo
30+
StartBurning = function(info) end,
31+
}

0 commit comments

Comments
 (0)