mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Fix duplicate class and annotation placement lint errors
Classes contributed to by more than one file now carry the `partial` attribute. trains.lua declared its command as `ExpCommand_Artillery`, which was a copy paste. `Color.0` and `MapPosition.0` became `.struct` in fmtk 2.1.6. emmylua rejects `@type` on a function statement or a `do` block, so those are moved onto the local or replaced by `@param` and `@return`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -39,7 +39,7 @@ local function get_player_name(event)
|
||||
end
|
||||
|
||||
--- Convert a colour value into hex
|
||||
--- @param color Color.0
|
||||
--- @param color Color.struct
|
||||
--- @return string
|
||||
local function to_hex(color)
|
||||
local hex_digits = "0123456789ABCDEF"
|
||||
@@ -53,7 +53,7 @@ local function to_hex(color)
|
||||
end
|
||||
|
||||
--- Emit the requires json to file for the given event arguments
|
||||
--- @param opts { title: string?, color: (Color.0 | string)?, description: string?, tick: number?, fields: { name: string, value: string, inline: boolean? }[] }
|
||||
--- @param opts { title: string?, color: (Color.struct | string)?, description: string?, tick: number?, fields: { name: string, value: string, inline: boolean? }[] }
|
||||
local function emit_event(opts)
|
||||
local admins_online = 0
|
||||
local players_online = 0
|
||||
|
||||
@@ -7,7 +7,7 @@ local config = require("modules.exp_legacy.config.spawn_area")
|
||||
--- Apply an offset to a LuaPosition
|
||||
--- @param position MapPosition
|
||||
--- @param offset MapPosition
|
||||
--- @return MapPosition.0
|
||||
--- @return MapPosition.struct
|
||||
local function apply_offset(position, offset)
|
||||
return {
|
||||
x = (position.x or position[1]) + (offset.x or offset[1]),
|
||||
|
||||
Reference in New Issue
Block a user