Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 10 additions & 3 deletions .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
"include": "require",
"shard_include": "require"
},
"workspace.library": [
"recoil-lua-library"
]
"workspace": {
"library": [
"recoil-lua-library"
],
"ignoreDir": [
".vscode",
"luaui/Tests",
"luaui/TestsExamples"
Comment thread
rhys-vdw marked this conversation as resolved.
]
}
}
2 changes: 1 addition & 1 deletion common/upgets/api_resource_spot_finder.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local upget = gadget or widget
local upget = gadget or widget ---@type Addon
local globalScope = gadget and GG or WG

-- gadget side must be layered after gadgets/map_metal_spot_placer.lua
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/AILoader.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Shard AI Loader",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/activity_broadcast.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Activity Broadcast",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/ai_namer.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@


local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "AI namer",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/ai_ruins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ if not (Spring.GetModOptions().ruins == "enabled" or (Spring.GetModOptions().rui
return
end

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "ruin spawn",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/ai_scav_blueprint_tester.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ local radius
local high_radius = 0
local line = 1

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Scav Blueprint Tester",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/ai_simpleai.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ for i = 1, #teams do
end
teams = nil

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "SimpleAI",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/api_damage_stats.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Stats",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/api_enemyunitdestroyed.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "EnemyUnitDestroyed",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/api_garbage_collector.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Garbage Collector",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/api_missions.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Mission API loader",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/api_missions_triggers.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Mission API triggers",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/api_pbr_enabler.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "PBR enabler",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/api_permissions.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Permissions",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/api_widget_events.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if gadgetHandler:IsSyncedCode() then return end

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Widget Events",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/camera_lockcamera.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "CameraBroadcast",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_alliance_break.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Unally on demand",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_area_mex.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Area Mex",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_dev_helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ for word in msg:gmatch("[%-_%w]+") do
end
]]--

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Dev Helper Cmds",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_factory_stop_production.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Factory Stop Production",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_get_player_data.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Get Player Data",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_give.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Give Command",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_idle_players.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ if Spring.Utilities.Gametype.IsSinglePlayer() then
return
end

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Take Manager",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_limiter.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "CMD limiter",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_luaui_reload.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "LuaUI Reload",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_manual_launch.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Manual launch command",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_mex_denier.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Deny Invalid Mex Orders",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_mouse_pos_broadcast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Cursor Broadcast",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_onoffdesc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then
return
end

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "On/Off descriptions",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_paused_is_paused.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ if not gadgetHandler:IsSyncedCode() then
return
end

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Paused is paused",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_place_target_on_ground.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = 'Place Target On Ground',
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_remove_stop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then
return
end

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Remove Stop",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_remove_wait.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then
return
end

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Remove Wait",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_selected_units.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Ally Selected Units",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_sendcommand.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Send Command",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cmd_undo.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Undo Self Destruction Havoc",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/cus_gl4.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "CUS GL4",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/dbg_buildicons_run.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Build Icons Slowy (/luarules buildiconslow or buildiconanim or buildiconanimslow)",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/dbg_cob_debug.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Cob Debug",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/dbg_gadget_profiler.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Gadget Profiler",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/dbg_synced_proxy.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Synced Proxy",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/dbg_test_env_helper.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Test Environment Helper",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/dbg_unit_callins.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "UnitCallinsGadget",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/dbg_unitposition_logger.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Unit Position Logger",
Expand Down
4 changes: 4 additions & 0 deletions luarules/gadgets/dev_replay_data.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "UnitDamagedReplay",
Expand Down Expand Up @@ -46,6 +48,8 @@ end

--[[
Use this widget to print UnitDamaged info to the infolog (or modify it for your purposes)
local widget = widget ---@type Widget

function widget:GetInfo()
return {
name = "UnitDamageReplayAnalysis",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/feature_dead_explosion.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Feature Death Explosion",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/feature_debris_physics.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if not gadgetHandler:IsSyncedCode() then return end

local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Debris physics",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/fx_atmosphere.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "GeoVent Sounds",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/fx_depthcharge_splash.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Depthcharge splash",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/fx_missile_smoke.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
-- but can run out of fuel when they dont traight fly to maxrange


local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Missile smoke",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/fx_missile_starburst_liftoff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
-- but can run out of fuel when they dont traight fly to maxrange


local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Starburst Missile Liftoff",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/fx_projectile_effects.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "Projectile Effects",
Expand Down
2 changes: 2 additions & 0 deletions luarules/gadgets/fx_reclaim_shards.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local gadget = gadget ---@type Gadget

function gadget:GetInfo()
return {
name = "fx_reclaim_shards",
Expand Down
Loading