From e1c94a6ca55ae96022428e6bcb266930493db87e Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Wed, 26 Mar 2025 11:45:11 +1100 Subject: [PATCH 01/11] Add Gadget type --- types/gadget.lua | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 types/gadget.lua diff --git a/types/gadget.lua b/types/gadget.lua new file mode 100644 index 00000000000..e16c286871c --- /dev/null +++ b/types/gadget.lua @@ -0,0 +1,51 @@ +---@meta + +---@class Gadget : Callins, UnsyncedCallins, SyncedCallins +--- +---Gadgets can control game logic and receive synced and unsynced callins. +--- +---**Attention:** Callins from `SyncedCallins` will only work on the unsynced +---portion of the gadget. +--- +---**Attention:** To prevent complaints from Lua Language Server, e.g. +--- +---> ```md +---> Duplicate field `CommandNotify` (duplicate-set-field) +---> ``` +--- +---Add this line at the top of your gadget script: +--- +---```lua +---local gadget = gadget ---@type Gadget +---``` +--- +---@see Callins +---@see SyncedCallins +---@see UnsyncedCallins +---@see Spring.IsSyncedCode +--- +---@field GG table Shared table for gadgets. +---@field ghInfo FullGadgetInfo +local Gadget = {} + +---@class GadgetInfo +---@field name string? +---@field desc string? +---@field author string? +---@field date string? +---@field license string? +---@field layer number? +---@field enabled boolean? + +---@class FullGadgetInfo : GadgetInfo +---@field filename string +---@field basename string + + +---Get info about a gadget. +---@return GadgetInfo +function Gadget:GetInfo() end + +---@type Gadget +---@diagnostic disable-next-line: lowercase-global +gadget = nil From 0d496d521f99d2ae0987a429e447537f91bfa1f2 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Wed, 26 Mar 2025 11:45:34 +1100 Subject: [PATCH 02/11] Fix duplicate method definitions gadgets --- luarules/gadgets/AILoader.lua | 2 ++ luarules/gadgets/activity_broadcast.lua | 2 ++ luarules/gadgets/ai_namer.lua | 2 ++ luarules/gadgets/ai_ruins.lua | 2 ++ luarules/gadgets/ai_scav_blueprint_tester.lua | 2 ++ luarules/gadgets/ai_simpleai.lua | 2 ++ luarules/gadgets/api_damage_stats.lua | 2 ++ luarules/gadgets/api_enemyunitdestroyed.lua | 2 ++ luarules/gadgets/api_garbage_collector.lua | 2 ++ luarules/gadgets/api_missions.lua | 2 ++ luarules/gadgets/api_missions_triggers.lua | 2 ++ luarules/gadgets/api_pbr_enabler.lua | 2 ++ luarules/gadgets/api_permissions.lua | 2 ++ luarules/gadgets/api_widget_events.lua | 2 ++ luarules/gadgets/camera_lockcamera.lua | 2 ++ luarules/gadgets/cmd_alliance_break.lua | 2 ++ luarules/gadgets/cmd_area_mex.lua | 2 ++ luarules/gadgets/cmd_dev_helpers.lua | 2 ++ luarules/gadgets/cmd_factory_stop_production.lua | 2 ++ luarules/gadgets/cmd_get_player_data.lua | 2 ++ luarules/gadgets/cmd_give.lua | 2 ++ luarules/gadgets/cmd_idle_players.lua | 2 ++ luarules/gadgets/cmd_limiter.lua | 2 ++ luarules/gadgets/cmd_luaui_reload.lua | 2 ++ luarules/gadgets/cmd_manual_launch.lua | 2 ++ luarules/gadgets/cmd_mex_denier.lua | 2 ++ luarules/gadgets/cmd_mouse_pos_broadcast.lua | 2 ++ luarules/gadgets/cmd_onoffdesc.lua | 2 ++ luarules/gadgets/cmd_paused_is_paused.lua | 2 ++ luarules/gadgets/cmd_place_target_on_ground.lua | 2 ++ luarules/gadgets/cmd_remove_stop.lua | 2 ++ luarules/gadgets/cmd_remove_wait.lua | 2 ++ luarules/gadgets/cmd_selected_units.lua | 2 ++ luarules/gadgets/cmd_sendcommand.lua | 2 ++ luarules/gadgets/cmd_undo.lua | 2 ++ luarules/gadgets/cus_gl4.lua | 2 ++ luarules/gadgets/dbg_buildicons_run.lua | 2 ++ luarules/gadgets/dbg_cob_debug.lua | 2 ++ luarules/gadgets/dbg_gadget_profiler.lua | 2 ++ luarules/gadgets/dbg_synced_proxy.lua | 2 ++ luarules/gadgets/dbg_test_env_helper.lua | 2 ++ luarules/gadgets/dbg_unit_callins.lua | 2 ++ luarules/gadgets/dbg_unitposition_logger.lua | 2 ++ luarules/gadgets/dev_replay_data.lua | 2 ++ luarules/gadgets/feature_dead_explosion.lua | 2 ++ luarules/gadgets/feature_debris_physics.lua | 2 ++ luarules/gadgets/fx_atmosphere.lua | 2 ++ luarules/gadgets/fx_depthcharge_splash.lua | 2 ++ luarules/gadgets/fx_missile_smoke.lua | 2 ++ luarules/gadgets/fx_missile_starburst_liftoff.lua | 2 ++ luarules/gadgets/fx_projectile_effects.lua | 2 ++ luarules/gadgets/fx_reclaim_shards.lua | 2 ++ luarules/gadgets/fx_submissile_splash.lua | 2 ++ luarules/gadgets/fx_watersplash.lua | 2 ++ luarules/gadgets/gaia_critters.lua | 2 ++ luarules/gadgets/game_allyteam_ranking.lua | 2 ++ luarules/gadgets/game_apm_broadcast.lua | 2 ++ luarules/gadgets/game_assistdronespawn.lua | 2 ++ luarules/gadgets/game_autocolors.lua | 2 ++ luarules/gadgets/game_commander_builder.lua | 2 ++ luarules/gadgets/game_custom_map_tidal.lua | 2 ++ luarules/gadgets/game_disable_assist_ally.lua | 2 ++ luarules/gadgets/game_disable_unit_sharing.lua | 2 ++ luarules/gadgets/game_dynamic_maxunits.lua | 2 ++ luarules/gadgets/game_easter_eggs.lua | 2 ++ luarules/gadgets/game_end.lua | 2 ++ luarules/gadgets/game_energy_conversion.lua | 2 ++ luarules/gadgets/game_ffa_start_setup.lua | 2 ++ luarules/gadgets/game_fogofwar_remover.lua | 2 ++ luarules/gadgets/game_fps_broadcast.lua | 2 ++ luarules/gadgets/game_id.lua | 2 ++ luarules/gadgets/game_initial_spawn.lua | 2 ++ luarules/gadgets/game_logger.lua | 2 ++ luarules/gadgets/game_marketplace.lua | 2 ++ luarules/gadgets/game_message.lua | 2 ++ luarules/gadgets/game_no_rush_mode.lua | 2 ++ luarules/gadgets/game_no_share_to_enemy.lua | 2 ++ luarules/gadgets/game_prevent_excessive_share.lua | 2 ++ luarules/gadgets/game_replace_afk_players.lua | 2 ++ luarules/gadgets/game_selfd_resign.lua | 2 ++ luarules/gadgets/game_tax_resource_sharing.lua | 2 ++ luarules/gadgets/game_team_com_ends.lua | 2 ++ luarules/gadgets/game_team_death_effect.lua | 2 ++ luarules/gadgets/game_team_power_watcher.lua | 2 ++ luarules/gadgets/game_team_resources.lua | 2 ++ luarules/gadgets/game_unit_market.lua | 2 ++ luarules/gadgets/gfx_debrisexplosions.lua | 2 ++ luarules/gadgets/gfx_explosion_lights.lua | 2 ++ luarules/gadgets/gfx_raptor_scum_gl4.lua | 2 ++ luarules/gadgets/gfx_reclaim_fx.lua | 2 ++ luarules/gadgets/gfx_tree_feller.lua | 2 ++ luarules/gadgets/gfx_unit_glass.lua | 2 ++ luarules/gadgets/gfx_unit_script_decals.lua | 2 ++ luarules/gadgets/gfx_unit_script_lights.lua | 2 ++ luarules/gadgets/gfx_wade_fx.lua | 2 ++ luarules/gadgets/gpumem_broadcast.lua | 2 ++ luarules/gadgets/gui_awards.lua | 2 ++ luarules/gadgets/gui_display_dps.lua | 2 ++ luarules/gadgets/gui_soundeffects.lua | 2 ++ luarules/gadgets/lups_flame_jitter.lua | 2 ++ luarules/gadgets/lups_orb.lua | 2 ++ luarules/gadgets/lups_shield.lua | 2 ++ luarules/gadgets/lups_shockwaves.lua | 2 ++ luarules/gadgets/map_atmosphere_cegs.lua | 2 ++ luarules/gadgets/map_explosion_deformation_fix.lua | 2 ++ luarules/gadgets/map_geofix.lua | 2 ++ luarules/gadgets/map_lava.lua | 2 ++ luarules/gadgets/map_metal_spot_placer.lua | 2 ++ luarules/gadgets/map_nightmode.lua | 2 ++ luarules/gadgets/map_sun_handler.lua | 2 ++ luarules/gadgets/map_voidground.lua | 2 ++ luarules/gadgets/map_waterlevel.lua | 2 ++ luarules/gadgets/mo_battle_royale.lua | 2 ++ luarules/gadgets/mo_com_counter.lua | 2 ++ luarules/gadgets/mo_coop_II.lua | 2 ++ luarules/gadgets/mo_ffa.lua | 2 ++ luarules/gadgets/mo_preventcombomb.lua | 2 ++ luarules/gadgets/pve_areahealers.lua | 2 ++ luarules/gadgets/pve_attachments.lua | 2 ++ luarules/gadgets/pve_boss_drones.lua | 2 ++ luarules/gadgets/pve_boss_priority_targetting.lua | 2 ++ luarules/gadgets/pve_builder_controller.lua | 2 ++ luarules/gadgets/pve_nuke_controller.lua | 2 ++ luarules/gadgets/pve_supply_drops.lua | 2 ++ luarules/gadgets/raptor_spawner_defense.lua | 2 ++ luarules/gadgets/scav_cloud_spawner.lua | 2 ++ luarules/gadgets/scav_lootbox_collector.lua | 2 ++ luarules/gadgets/scav_spawner_defense.lua | 2 ++ luarules/gadgets/sfx_notifications.lua | 2 ++ luarules/gadgets/system_info.lua | 2 ++ luarules/gadgets/unit_aa_targeting_priority.lua | 2 ++ luarules/gadgets/unit_air_attacksafetydistance.lua | 2 ++ luarules/gadgets/unit_air_plants.lua | 2 ++ luarules/gadgets/unit_airbase.lua | 2 ++ luarules/gadgets/unit_airtransport_load_unload.lua | 2 ++ luarules/gadgets/unit_airunitsturnradius.lua | 2 ++ luarules/gadgets/unit_allow_builder_hold_fire.lua | 2 ++ luarules/gadgets/unit_area_timed_damage.lua | 2 ++ luarules/gadgets/unit_areaattack.lua | 2 ++ luarules/gadgets/unit_attached_con_turret.lua | 2 ++ luarules/gadgets/unit_attributes.lua | 2 ++ luarules/gadgets/unit_block_fake_geo.lua | 2 ++ luarules/gadgets/unit_builder_priority.lua | 2 ++ luarules/gadgets/unit_cancel_orders_on_share.lua | 2 ++ luarules/gadgets/unit_capture_decay.lua | 2 ++ luarules/gadgets/unit_capture_only_enemy.lua | 2 ++ luarules/gadgets/unit_carrier_spawner.lua | 2 ++ luarules/gadgets/unit_cheat_no_waste.lua | 2 ++ luarules/gadgets/unit_cloak.lua | 2 ++ luarules/gadgets/unit_collision_damage_behavior.lua | 2 ++ luarules/gadgets/unit_combomb_full_damage.lua | 2 ++ luarules/gadgets/unit_commando_watch.lua | 2 ++ luarules/gadgets/unit_continuous_aim.lua | 2 ++ luarules/gadgets/unit_crashing_aircraft.lua | 2 ++ luarules/gadgets/unit_cursors.lua | 2 ++ luarules/gadgets/unit_custom_weapons_behaviours.lua | 2 ++ luarules/gadgets/unit_custom_weapons_cluster.lua | 2 ++ luarules/gadgets/unit_custom_weapons_overpen.lua | 2 ++ luarules/gadgets/unit_custommaxranges.lua | 2 ++ luarules/gadgets/unit_dead.lua | 2 ++ luarules/gadgets/unit_death_animations.lua | 2 ++ luarules/gadgets/unit_dgun_behaviour.lua | 2 ++ luarules/gadgets/unit_dgun_cmdtype_fix.lua | 2 ++ luarules/gadgets/unit_direct_control.lua | 2 ++ luarules/gadgets/unit_disallow_underwater_load.lua | 2 ++ luarules/gadgets/unit_dragons_disguise.lua | 2 ++ luarules/gadgets/unit_dynamic_collision_volume.lua | 2 ++ luarules/gadgets/unit_evolution.lua | 2 ++ luarules/gadgets/unit_explosion_spawner.lua | 2 ++ luarules/gadgets/unit_factory_guard.lua | 2 ++ luarules/gadgets/unit_factory_quota.lua | 2 ++ luarules/gadgets/unit_factory_unblocking.lua | 2 ++ luarules/gadgets/unit_footprint_clearance.lua | 2 ++ luarules/gadgets/unit_geo_upgrade_reclaimer.lua | 2 ++ luarules/gadgets/unit_hats.lua | 2 ++ luarules/gadgets/unit_healthbars_widget_forwarding.lua | 2 ++ luarules/gadgets/unit_icongenerator.lua | 2 ++ luarules/gadgets/unit_infestor_spawn.lua | 2 ++ luarules/gadgets/unit_inherit_creation_xp.lua | 2 ++ luarules/gadgets/unit_instant_self_destruct.lua | 2 ++ luarules/gadgets/unit_interceptors.lua | 2 ++ luarules/gadgets/unit_intergrated_hats.lua | 2 ++ luarules/gadgets/unit_juno_damage.lua | 2 ++ luarules/gadgets/unit_juno_damage_mini.lua | 2 ++ luarules/gadgets/unit_juno_rework_damage.lua | 2 ++ luarules/gadgets/unit_kill_count.lua | 2 ++ luarules/gadgets/unit_liche_cruisecontrol.lua | 2 ++ luarules/gadgets/unit_lightning_splash_dmg.lua | 2 ++ luarules/gadgets/unit_mex_upgrade_reclaimer.lua | 2 ++ luarules/gadgets/unit_minesweeper_detection.lua | 2 ++ luarules/gadgets/unit_nanoradarpos.lua | 2 ++ luarules/gadgets/unit_no_land_damage.lua | 2 ++ luarules/gadgets/unit_nonblocking_mines.lua | 2 ++ luarules/gadgets/unit_objectify.lua | 2 ++ luarules/gadgets/unit_onlytargetcategory.lua | 2 ++ luarules/gadgets/unit_onlytargetempable.lua | 2 ++ luarules/gadgets/unit_paralyze_damage_limit.lua | 2 ++ luarules/gadgets/unit_paralyze_damage_multiplier.lua | 2 ++ luarules/gadgets/unit_paralyze_on_off.lua | 2 ++ luarules/gadgets/unit_preaim.lua | 2 ++ luarules/gadgets/unit_prevent_aircraft_hax.lua | 2 ++ luarules/gadgets/unit_prevent_cloaked_unit_reclaim.lua | 2 ++ luarules/gadgets/unit_prevent_lab_hax2.lua | 2 ++ luarules/gadgets/unit_prevent_load_hax.lua | 2 ++ luarules/gadgets/unit_prevent_nanoframe_blocking_hax.lua | 2 ++ luarules/gadgets/unit_prevent_range_hax.lua | 2 ++ luarules/gadgets/unit_prevent_share_load.lua | 2 ++ luarules/gadgets/unit_prevent_share_self_d.lua | 2 ++ luarules/gadgets/unit_prevent_strange_orders.lua | 2 ++ luarules/gadgets/unit_prevent_unload_hax.lua | 2 ++ luarules/gadgets/unit_projectile_overrange.lua | 2 ++ luarules/gadgets/unit_reclaim_fix.lua | 2 ++ luarules/gadgets/unit_respawning.lua | 2 ++ luarules/gadgets/unit_resurrected.lua | 2 ++ luarules/gadgets/unit_reverse_move.lua | 2 ++ luarules/gadgets/unit_scenario_loadout.lua | 2 ++ luarules/gadgets/unit_scenario_script.lua | 2 ++ luarules/gadgets/unit_shield_behaviour.lua | 2 ++ luarules/gadgets/unit_sinking_ship.lua | 2 ++ luarules/gadgets/unit_stack_hack_fix.lua | 2 ++ luarules/gadgets/unit_stealthy_passengers.lua | 2 ++ luarules/gadgets/unit_stockpile_limit.lua | 2 ++ luarules/gadgets/unit_stockpile_script.lua | 2 ++ luarules/gadgets/unit_stomp.lua | 2 ++ luarules/gadgets/unit_stun_control.lua | 2 ++ luarules/gadgets/unit_stun_script.lua | 2 ++ luarules/gadgets/unit_stun_storage.lua | 2 ++ luarules/gadgets/unit_sunfacing.lua | 2 ++ luarules/gadgets/unit_target_on_the_move.lua | 2 ++ luarules/gadgets/unit_timeslow.lua | 2 ++ luarules/gadgets/unit_tombstones.lua | 2 ++ luarules/gadgets/unit_transport_dies_load_dies.lua | 2 ++ luarules/gadgets/unit_transportable_nanos.lua | 2 ++ luarules/gadgets/unit_transportee_hider.lua | 2 ++ luarules/gadgets/unit_transports_air_speed.lua | 2 ++ luarules/gadgets/unit_turretspeed.lua | 2 ++ luarules/gadgets/unit_wanted_speed.lua | 2 ++ luarules/gadgets/unit_water_depth_damage.lua | 2 ++ luarules/gadgets/unit_weapon_smart_select_helper.lua | 2 ++ luarules/gadgets/unit_windmill_control.lua | 2 ++ luarules/gadgets/unit_workertime_boost.lua | 2 ++ luarules/gadgets/unit_xmas.lua | 2 ++ luarules/gadgets/unit_xp_range_bonus.lua | 2 ++ 243 files changed, 486 insertions(+) diff --git a/luarules/gadgets/AILoader.lua b/luarules/gadgets/AILoader.lua index 033e2b803bd..13de178bdfc 100644 --- a/luarules/gadgets/AILoader.lua +++ b/luarules/gadgets/AILoader.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Shard AI Loader", diff --git a/luarules/gadgets/activity_broadcast.lua b/luarules/gadgets/activity_broadcast.lua index 02fcf2a7d9e..cef0bd3d7cc 100644 --- a/luarules/gadgets/activity_broadcast.lua +++ b/luarules/gadgets/activity_broadcast.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Activity Broadcast", diff --git a/luarules/gadgets/ai_namer.lua b/luarules/gadgets/ai_namer.lua index 31775ad5506..8e51fe8b90e 100644 --- a/luarules/gadgets/ai_namer.lua +++ b/luarules/gadgets/ai_namer.lua @@ -1,5 +1,7 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "AI namer", diff --git a/luarules/gadgets/ai_ruins.lua b/luarules/gadgets/ai_ruins.lua index 5903323c5b3..290e56e17a0 100644 --- a/luarules/gadgets/ai_ruins.lua +++ b/luarules/gadgets/ai_ruins.lua @@ -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", diff --git a/luarules/gadgets/ai_scav_blueprint_tester.lua b/luarules/gadgets/ai_scav_blueprint_tester.lua index f500326cd20..f682b89eb9b 100644 --- a/luarules/gadgets/ai_scav_blueprint_tester.lua +++ b/luarules/gadgets/ai_scav_blueprint_tester.lua @@ -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", diff --git a/luarules/gadgets/ai_simpleai.lua b/luarules/gadgets/ai_simpleai.lua index c791e08fabf..19fe21c59fa 100644 --- a/luarules/gadgets/ai_simpleai.lua +++ b/luarules/gadgets/ai_simpleai.lua @@ -21,6 +21,8 @@ for i = 1, #teams do end teams = nil +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "SimpleAI", diff --git a/luarules/gadgets/api_damage_stats.lua b/luarules/gadgets/api_damage_stats.lua index 7193c593e5c..834a032afe2 100644 --- a/luarules/gadgets/api_damage_stats.lua +++ b/luarules/gadgets/api_damage_stats.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Stats", diff --git a/luarules/gadgets/api_enemyunitdestroyed.lua b/luarules/gadgets/api_enemyunitdestroyed.lua index 3836c170fde..83bfe48d99c 100644 --- a/luarules/gadgets/api_enemyunitdestroyed.lua +++ b/luarules/gadgets/api_enemyunitdestroyed.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "EnemyUnitDestroyed", diff --git a/luarules/gadgets/api_garbage_collector.lua b/luarules/gadgets/api_garbage_collector.lua index 41bda26c518..c5fc2fad560 100644 --- a/luarules/gadgets/api_garbage_collector.lua +++ b/luarules/gadgets/api_garbage_collector.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Garbage Collector", diff --git a/luarules/gadgets/api_missions.lua b/luarules/gadgets/api_missions.lua index 49630c8f444..0005f0f6479 100644 --- a/luarules/gadgets/api_missions.lua +++ b/luarules/gadgets/api_missions.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Mission API loader", diff --git a/luarules/gadgets/api_missions_triggers.lua b/luarules/gadgets/api_missions_triggers.lua index cd9a0963f1f..bf785289374 100644 --- a/luarules/gadgets/api_missions_triggers.lua +++ b/luarules/gadgets/api_missions_triggers.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Mission API triggers", diff --git a/luarules/gadgets/api_pbr_enabler.lua b/luarules/gadgets/api_pbr_enabler.lua index f34e22c2b61..225faf5b330 100644 --- a/luarules/gadgets/api_pbr_enabler.lua +++ b/luarules/gadgets/api_pbr_enabler.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "PBR enabler", diff --git a/luarules/gadgets/api_permissions.lua b/luarules/gadgets/api_permissions.lua index 5cca48656e0..773904b9585 100644 --- a/luarules/gadgets/api_permissions.lua +++ b/luarules/gadgets/api_permissions.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Permissions", diff --git a/luarules/gadgets/api_widget_events.lua b/luarules/gadgets/api_widget_events.lua index 57c77e829bb..50665509a17 100644 --- a/luarules/gadgets/api_widget_events.lua +++ b/luarules/gadgets/api_widget_events.lua @@ -1,5 +1,7 @@ if gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Widget Events", diff --git a/luarules/gadgets/camera_lockcamera.lua b/luarules/gadgets/camera_lockcamera.lua index ce286e00eda..5e7073803b3 100644 --- a/luarules/gadgets/camera_lockcamera.lua +++ b/luarules/gadgets/camera_lockcamera.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "CameraBroadcast", diff --git a/luarules/gadgets/cmd_alliance_break.lua b/luarules/gadgets/cmd_alliance_break.lua index a356bbe8fc4..26856701964 100644 --- a/luarules/gadgets/cmd_alliance_break.lua +++ b/luarules/gadgets/cmd_alliance_break.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unally on demand", diff --git a/luarules/gadgets/cmd_area_mex.lua b/luarules/gadgets/cmd_area_mex.lua index a026acb0c53..14258ce1e89 100644 --- a/luarules/gadgets/cmd_area_mex.lua +++ b/luarules/gadgets/cmd_area_mex.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Area Mex", diff --git a/luarules/gadgets/cmd_dev_helpers.lua b/luarules/gadgets/cmd_dev_helpers.lua index ad2df9b2d6b..b607e18d698 100644 --- a/luarules/gadgets/cmd_dev_helpers.lua +++ b/luarules/gadgets/cmd_dev_helpers.lua @@ -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", diff --git a/luarules/gadgets/cmd_factory_stop_production.lua b/luarules/gadgets/cmd_factory_stop_production.lua index 5d88dcec0e5..1dfc242a710 100644 --- a/luarules/gadgets/cmd_factory_stop_production.lua +++ b/luarules/gadgets/cmd_factory_stop_production.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Factory Stop Production", diff --git a/luarules/gadgets/cmd_get_player_data.lua b/luarules/gadgets/cmd_get_player_data.lua index 8cb1a2e4390..1a5cb694a82 100644 --- a/luarules/gadgets/cmd_get_player_data.lua +++ b/luarules/gadgets/cmd_get_player_data.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Get Player Data", diff --git a/luarules/gadgets/cmd_give.lua b/luarules/gadgets/cmd_give.lua index c4c722b889e..579b8ccc237 100644 --- a/luarules/gadgets/cmd_give.lua +++ b/luarules/gadgets/cmd_give.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Give Command", diff --git a/luarules/gadgets/cmd_idle_players.lua b/luarules/gadgets/cmd_idle_players.lua index 5e395a6d6be..feccb1a5752 100644 --- a/luarules/gadgets/cmd_idle_players.lua +++ b/luarules/gadgets/cmd_idle_players.lua @@ -3,6 +3,8 @@ if Spring.Utilities.Gametype.IsSinglePlayer() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Take Manager", diff --git a/luarules/gadgets/cmd_limiter.lua b/luarules/gadgets/cmd_limiter.lua index b13c1521071..cce7b4f6495 100644 --- a/luarules/gadgets/cmd_limiter.lua +++ b/luarules/gadgets/cmd_limiter.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "CMD limiter", diff --git a/luarules/gadgets/cmd_luaui_reload.lua b/luarules/gadgets/cmd_luaui_reload.lua index b0b284be480..6c7cd7e64cf 100644 --- a/luarules/gadgets/cmd_luaui_reload.lua +++ b/luarules/gadgets/cmd_luaui_reload.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "LuaUI Reload", diff --git a/luarules/gadgets/cmd_manual_launch.lua b/luarules/gadgets/cmd_manual_launch.lua index 79a4859a917..77e8e4478d9 100644 --- a/luarules/gadgets/cmd_manual_launch.lua +++ b/luarules/gadgets/cmd_manual_launch.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Manual launch command", diff --git a/luarules/gadgets/cmd_mex_denier.lua b/luarules/gadgets/cmd_mex_denier.lua index cffad69f36d..b5e0a82e83e 100644 --- a/luarules/gadgets/cmd_mex_denier.lua +++ b/luarules/gadgets/cmd_mex_denier.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Deny Invalid Mex Orders", diff --git a/luarules/gadgets/cmd_mouse_pos_broadcast.lua b/luarules/gadgets/cmd_mouse_pos_broadcast.lua index 41642953c67..3a435127ec0 100644 --- a/luarules/gadgets/cmd_mouse_pos_broadcast.lua +++ b/luarules/gadgets/cmd_mouse_pos_broadcast.lua @@ -7,6 +7,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Cursor Broadcast", diff --git a/luarules/gadgets/cmd_onoffdesc.lua b/luarules/gadgets/cmd_onoffdesc.lua index b3f88faf0f4..c9b9a2de28d 100644 --- a/luarules/gadgets/cmd_onoffdesc.lua +++ b/luarules/gadgets/cmd_onoffdesc.lua @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "On/Off descriptions", diff --git a/luarules/gadgets/cmd_paused_is_paused.lua b/luarules/gadgets/cmd_paused_is_paused.lua index 95e8f449678..a3d24b84dd5 100644 --- a/luarules/gadgets/cmd_paused_is_paused.lua +++ b/luarules/gadgets/cmd_paused_is_paused.lua @@ -6,6 +6,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Paused is paused", diff --git a/luarules/gadgets/cmd_place_target_on_ground.lua b/luarules/gadgets/cmd_place_target_on_ground.lua index f71485ed962..b3cbc21afab 100644 --- a/luarules/gadgets/cmd_place_target_on_ground.lua +++ b/luarules/gadgets/cmd_place_target_on_ground.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Place Target On Ground', diff --git a/luarules/gadgets/cmd_remove_stop.lua b/luarules/gadgets/cmd_remove_stop.lua index 7da790fdb45..c0cc41aeb4a 100644 --- a/luarules/gadgets/cmd_remove_stop.lua +++ b/luarules/gadgets/cmd_remove_stop.lua @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Remove Stop", diff --git a/luarules/gadgets/cmd_remove_wait.lua b/luarules/gadgets/cmd_remove_wait.lua index 7b70a886336..00f0bccedf3 100644 --- a/luarules/gadgets/cmd_remove_wait.lua +++ b/luarules/gadgets/cmd_remove_wait.lua @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Remove Wait", diff --git a/luarules/gadgets/cmd_selected_units.lua b/luarules/gadgets/cmd_selected_units.lua index 1cc534283e1..bf6d839a03e 100644 --- a/luarules/gadgets/cmd_selected_units.lua +++ b/luarules/gadgets/cmd_selected_units.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Ally Selected Units", diff --git a/luarules/gadgets/cmd_sendcommand.lua b/luarules/gadgets/cmd_sendcommand.lua index 6f0c198fa14..c407fa9370e 100644 --- a/luarules/gadgets/cmd_sendcommand.lua +++ b/luarules/gadgets/cmd_sendcommand.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Send Command", diff --git a/luarules/gadgets/cmd_undo.lua b/luarules/gadgets/cmd_undo.lua index de5fe4b5745..a9324b89ceb 100644 --- a/luarules/gadgets/cmd_undo.lua +++ b/luarules/gadgets/cmd_undo.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Undo Self Destruction Havoc", diff --git a/luarules/gadgets/cus_gl4.lua b/luarules/gadgets/cus_gl4.lua index 720ad1dd286..7f0cb3c7731 100644 --- a/luarules/gadgets/cus_gl4.lua +++ b/luarules/gadgets/cus_gl4.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "CUS GL4", diff --git a/luarules/gadgets/dbg_buildicons_run.lua b/luarules/gadgets/dbg_buildicons_run.lua index 2c204e776ce..c2f23cae145 100644 --- a/luarules/gadgets/dbg_buildicons_run.lua +++ b/luarules/gadgets/dbg_buildicons_run.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Build Icons Slowy (/luarules buildiconslow or buildiconanim or buildiconanimslow)", diff --git a/luarules/gadgets/dbg_cob_debug.lua b/luarules/gadgets/dbg_cob_debug.lua index 860c287f0b7..f3e9c24c941 100644 --- a/luarules/gadgets/dbg_cob_debug.lua +++ b/luarules/gadgets/dbg_cob_debug.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Cob Debug", diff --git a/luarules/gadgets/dbg_gadget_profiler.lua b/luarules/gadgets/dbg_gadget_profiler.lua index 84103c90ef0..def24796435 100644 --- a/luarules/gadgets/dbg_gadget_profiler.lua +++ b/luarules/gadgets/dbg_gadget_profiler.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Gadget Profiler", diff --git a/luarules/gadgets/dbg_synced_proxy.lua b/luarules/gadgets/dbg_synced_proxy.lua index 70c66a6f781..4a7bf21f2cf 100644 --- a/luarules/gadgets/dbg_synced_proxy.lua +++ b/luarules/gadgets/dbg_synced_proxy.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Synced Proxy", diff --git a/luarules/gadgets/dbg_test_env_helper.lua b/luarules/gadgets/dbg_test_env_helper.lua index 76894d2d033..1cf874817a9 100644 --- a/luarules/gadgets/dbg_test_env_helper.lua +++ b/luarules/gadgets/dbg_test_env_helper.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Test Environment Helper", diff --git a/luarules/gadgets/dbg_unit_callins.lua b/luarules/gadgets/dbg_unit_callins.lua index e4a33b9c9f5..b02a3af6f1e 100644 --- a/luarules/gadgets/dbg_unit_callins.lua +++ b/luarules/gadgets/dbg_unit_callins.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "UnitCallinsGadget", diff --git a/luarules/gadgets/dbg_unitposition_logger.lua b/luarules/gadgets/dbg_unitposition_logger.lua index 94f5a286d50..63b5b9dabe1 100644 --- a/luarules/gadgets/dbg_unitposition_logger.lua +++ b/luarules/gadgets/dbg_unitposition_logger.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Position Logger", diff --git a/luarules/gadgets/dev_replay_data.lua b/luarules/gadgets/dev_replay_data.lua index 61bbd5a8cf7..67561147fff 100644 --- a/luarules/gadgets/dev_replay_data.lua +++ b/luarules/gadgets/dev_replay_data.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "UnitDamagedReplay", diff --git a/luarules/gadgets/feature_dead_explosion.lua b/luarules/gadgets/feature_dead_explosion.lua index 3c22c8a7b7b..166e03e19ca 100644 --- a/luarules/gadgets/feature_dead_explosion.lua +++ b/luarules/gadgets/feature_dead_explosion.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Feature Death Explosion", diff --git a/luarules/gadgets/feature_debris_physics.lua b/luarules/gadgets/feature_debris_physics.lua index 91bf33aeffe..2945cb56839 100644 --- a/luarules/gadgets/feature_debris_physics.lua +++ b/luarules/gadgets/feature_debris_physics.lua @@ -1,5 +1,7 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Debris physics", diff --git a/luarules/gadgets/fx_atmosphere.lua b/luarules/gadgets/fx_atmosphere.lua index 38e8f7e16e0..e8626027aed 100644 --- a/luarules/gadgets/fx_atmosphere.lua +++ b/luarules/gadgets/fx_atmosphere.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "GeoVent Sounds", diff --git a/luarules/gadgets/fx_depthcharge_splash.lua b/luarules/gadgets/fx_depthcharge_splash.lua index cd3fb2ff41a..5ca63f7eac4 100644 --- a/luarules/gadgets/fx_depthcharge_splash.lua +++ b/luarules/gadgets/fx_depthcharge_splash.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Depthcharge splash", diff --git a/luarules/gadgets/fx_missile_smoke.lua b/luarules/gadgets/fx_missile_smoke.lua index fb09840e344..987e8ab1792 100644 --- a/luarules/gadgets/fx_missile_smoke.lua +++ b/luarules/gadgets/fx_missile_smoke.lua @@ -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", diff --git a/luarules/gadgets/fx_missile_starburst_liftoff.lua b/luarules/gadgets/fx_missile_starburst_liftoff.lua index ca1662fe52e..b0a8b7b1c2d 100644 --- a/luarules/gadgets/fx_missile_starburst_liftoff.lua +++ b/luarules/gadgets/fx_missile_starburst_liftoff.lua @@ -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", diff --git a/luarules/gadgets/fx_projectile_effects.lua b/luarules/gadgets/fx_projectile_effects.lua index faedcd3e44e..c6e186d6efc 100644 --- a/luarules/gadgets/fx_projectile_effects.lua +++ b/luarules/gadgets/fx_projectile_effects.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Projectile Effects", diff --git a/luarules/gadgets/fx_reclaim_shards.lua b/luarules/gadgets/fx_reclaim_shards.lua index 67899631a03..0634defa610 100644 --- a/luarules/gadgets/fx_reclaim_shards.lua +++ b/luarules/gadgets/fx_reclaim_shards.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "fx_reclaim_shards", diff --git a/luarules/gadgets/fx_submissile_splash.lua b/luarules/gadgets/fx_submissile_splash.lua index 291486e1011..88f15669d81 100644 --- a/luarules/gadgets/fx_submissile_splash.lua +++ b/luarules/gadgets/fx_submissile_splash.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "subMissile splash", diff --git a/luarules/gadgets/fx_watersplash.lua b/luarules/gadgets/fx_watersplash.lua index 08188cb49ed..a24a9359db8 100644 --- a/luarules/gadgets/fx_watersplash.lua +++ b/luarules/gadgets/fx_watersplash.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Watereffects", diff --git a/luarules/gadgets/gaia_critters.lua b/luarules/gadgets/gaia_critters.lua index 63142ad3765..6e98e5d5447 100644 --- a/luarules/gadgets/gaia_critters.lua +++ b/luarules/gadgets/gaia_critters.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "gaia critter units", diff --git a/luarules/gadgets/game_allyteam_ranking.lua b/luarules/gadgets/game_allyteam_ranking.lua index 4769e7ee3c5..93539154671 100644 --- a/luarules/gadgets/game_allyteam_ranking.lua +++ b/luarules/gadgets/game_allyteam_ranking.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "AllyTeam ranking", diff --git a/luarules/gadgets/game_apm_broadcast.lua b/luarules/gadgets/game_apm_broadcast.lua index ad740864235..4b9c0a00d66 100644 --- a/luarules/gadgets/game_apm_broadcast.lua +++ b/luarules/gadgets/game_apm_broadcast.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "APM Broadcast", diff --git a/luarules/gadgets/game_assistdronespawn.lua b/luarules/gadgets/game_assistdronespawn.lua index 8d472dceb17..711ba472c59 100644 --- a/luarules/gadgets/game_assistdronespawn.lua +++ b/luarules/gadgets/game_assistdronespawn.lua @@ -2,6 +2,8 @@ if not (Spring.GetModOptions().assistdronesenabled == "enabled" or (Spring.GetMo return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "assistdrone spawn", diff --git a/luarules/gadgets/game_autocolors.lua b/luarules/gadgets/game_autocolors.lua index 0ad7926d242..ef4cabbedd0 100644 --- a/luarules/gadgets/game_autocolors.lua +++ b/luarules/gadgets/game_autocolors.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "AutoColorPicker", diff --git a/luarules/gadgets/game_commander_builder.lua b/luarules/gadgets/game_commander_builder.lua index 0d39c0311e2..77bc7321c6f 100644 --- a/luarules/gadgets/game_commander_builder.lua +++ b/luarules/gadgets/game_commander_builder.lua @@ -12,6 +12,8 @@ if not spawnpadSpawnEnabled then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "commander builder spawn", diff --git a/luarules/gadgets/game_custom_map_tidal.lua b/luarules/gadgets/game_custom_map_tidal.lua index 3be2ff0bfa8..072978983f5 100644 --- a/luarules/gadgets/game_custom_map_tidal.lua +++ b/luarules/gadgets/game_custom_map_tidal.lua @@ -1,5 +1,7 @@ if not gadgetHandler:IsSyncedCode() then return false end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Custom Map Tidal", diff --git a/luarules/gadgets/game_disable_assist_ally.lua b/luarules/gadgets/game_disable_assist_ally.lua index ce3b8396d1a..e091212da9a 100644 --- a/luarules/gadgets/game_disable_assist_ally.lua +++ b/luarules/gadgets/game_disable_assist_ally.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Disable Assist Ally Construction', diff --git a/luarules/gadgets/game_disable_unit_sharing.lua b/luarules/gadgets/game_disable_unit_sharing.lua index 50881acfc76..7004992f5e4 100644 --- a/luarules/gadgets/game_disable_unit_sharing.lua +++ b/luarules/gadgets/game_disable_unit_sharing.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Disable Unit Sharing', diff --git a/luarules/gadgets/game_dynamic_maxunits.lua b/luarules/gadgets/game_dynamic_maxunits.lua index 37caf389536..55a2f24ff48 100644 --- a/luarules/gadgets/game_dynamic_maxunits.lua +++ b/luarules/gadgets/game_dynamic_maxunits.lua @@ -3,6 +3,8 @@ if not Spring.TransferUnitLimit then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Dynamic Maxunits", diff --git a/luarules/gadgets/game_easter_eggs.lua b/luarules/gadgets/game_easter_eggs.lua index 1181663349f..edf2fa1daed 100644 --- a/luarules/gadgets/game_easter_eggs.lua +++ b/luarules/gadgets/game_easter_eggs.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Easter Eggs Spawner", diff --git a/luarules/gadgets/game_end.lua b/luarules/gadgets/game_end.lua index d72c7e668f1..a213d2778e5 100644 --- a/luarules/gadgets/game_end.lua +++ b/luarules/gadgets/game_end.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Game End", diff --git a/luarules/gadgets/game_energy_conversion.lua b/luarules/gadgets/game_energy_conversion.lua index b7e4c9df6b9..6d0f8f293e1 100644 --- a/luarules/gadgets/game_energy_conversion.lua +++ b/luarules/gadgets/game_energy_conversion.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Energy Conversion', diff --git a/luarules/gadgets/game_ffa_start_setup.lua b/luarules/gadgets/game_ffa_start_setup.lua index 2780ede044c..af44f6b067a 100644 --- a/luarules/gadgets/game_ffa_start_setup.lua +++ b/luarules/gadgets/game_ffa_start_setup.lua @@ -11,6 +11,8 @@ if not Spring.Utilities.Gametype.IsFFA() or not gadgetHandler:IsSyncedCode() the return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'FFA start setup', diff --git a/luarules/gadgets/game_fogofwar_remover.lua b/luarules/gadgets/game_fogofwar_remover.lua index 98c5c4ac213..a3a1f28de0c 100644 --- a/luarules/gadgets/game_fogofwar_remover.lua +++ b/luarules/gadgets/game_fogofwar_remover.lua @@ -7,6 +7,8 @@ if Spring.GetModOptions().disable_fogofwar then gadgetEnabled = true end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "FogOfWarRemover", diff --git a/luarules/gadgets/game_fps_broadcast.lua b/luarules/gadgets/game_fps_broadcast.lua index a8763c88cb7..1c41223d768 100644 --- a/luarules/gadgets/game_fps_broadcast.lua +++ b/luarules/gadgets/game_fps_broadcast.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "FPS Broadcast", diff --git a/luarules/gadgets/game_id.lua b/luarules/gadgets/game_id.lua index 8f688e3b6f8..275f539aaf4 100644 --- a/luarules/gadgets/game_id.lua +++ b/luarules/gadgets/game_id.lua @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "GameID GameRulesParam", diff --git a/luarules/gadgets/game_initial_spawn.lua b/luarules/gadgets/game_initial_spawn.lua index 2b6bcbb7fae..cfd0eac75b0 100644 --- a/luarules/gadgets/game_initial_spawn.lua +++ b/luarules/gadgets/game_initial_spawn.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Initial Spawn', diff --git a/luarules/gadgets/game_logger.lua b/luarules/gadgets/game_logger.lua index 8cd0c761643..d934a772909 100644 --- a/luarules/gadgets/game_logger.lua +++ b/luarules/gadgets/game_logger.lua @@ -3,6 +3,8 @@ if Spring.Utilities.Gametype.IsSinglePlayer() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Logger", diff --git a/luarules/gadgets/game_marketplace.lua b/luarules/gadgets/game_marketplace.lua index e4c1c3a0f30..931362e8824 100644 --- a/luarules/gadgets/game_marketplace.lua +++ b/luarules/gadgets/game_marketplace.lua @@ -3,6 +3,8 @@ if Spring.GetModOptions().marketplace ~= "enabled" then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "marketplaces", diff --git a/luarules/gadgets/game_message.lua b/luarules/gadgets/game_message.lua index bc8862ee4ed..4c20325f25c 100644 --- a/luarules/gadgets/game_message.lua +++ b/luarules/gadgets/game_message.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Message", diff --git a/luarules/gadgets/game_no_rush_mode.lua b/luarules/gadgets/game_no_rush_mode.lua index c2cce4c6bf2..8dd7c2b3089 100644 --- a/luarules/gadgets/game_no_rush_mode.lua +++ b/luarules/gadgets/game_no_rush_mode.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "No Rush Mode", diff --git a/luarules/gadgets/game_no_share_to_enemy.lua b/luarules/gadgets/game_no_share_to_enemy.lua index 7ce4d86d604..d18cbcdd2a4 100644 --- a/luarules/gadgets/game_no_share_to_enemy.lua +++ b/luarules/gadgets/game_no_share_to_enemy.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "game_no_share_to_enemy", diff --git a/luarules/gadgets/game_prevent_excessive_share.lua b/luarules/gadgets/game_prevent_excessive_share.lua index afe69aa31fa..2b8a5885584 100644 --- a/luarules/gadgets/game_prevent_excessive_share.lua +++ b/luarules/gadgets/game_prevent_excessive_share.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Prevent Excessive Share', diff --git a/luarules/gadgets/game_replace_afk_players.lua b/luarules/gadgets/game_replace_afk_players.lua index 58cfc737969..36a6395691b 100644 --- a/luarules/gadgets/game_replace_afk_players.lua +++ b/luarules/gadgets/game_replace_afk_players.lua @@ -6,6 +6,8 @@ disabled because of these problems: * replacement player cant give units/resources ]] +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Substitution", diff --git a/luarules/gadgets/game_selfd_resign.lua b/luarules/gadgets/game_selfd_resign.lua index 29c57062184..8e82bb48b09 100644 --- a/luarules/gadgets/game_selfd_resign.lua +++ b/luarules/gadgets/game_selfd_resign.lua @@ -4,6 +4,8 @@ if Spring.Utilities.Gametype.IsSinglePlayer() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Self-Destruct Resign", diff --git a/luarules/gadgets/game_tax_resource_sharing.lua b/luarules/gadgets/game_tax_resource_sharing.lua index 8eb35a4d541..d5f41c4dde5 100644 --- a/luarules/gadgets/game_tax_resource_sharing.lua +++ b/luarules/gadgets/game_tax_resource_sharing.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Tax Resource Sharing', diff --git a/luarules/gadgets/game_team_com_ends.lua b/luarules/gadgets/game_team_com_ends.lua index c09b7ee8368..f58000acad9 100644 --- a/luarules/gadgets/game_team_com_ends.lua +++ b/luarules/gadgets/game_team_com_ends.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Team Com Ends", diff --git a/luarules/gadgets/game_team_death_effect.lua b/luarules/gadgets/game_team_death_effect.lua index 33174b96e69..344d72aff88 100644 --- a/luarules/gadgets/game_team_death_effect.lua +++ b/luarules/gadgets/game_team_death_effect.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Team Death Effect", diff --git a/luarules/gadgets/game_team_power_watcher.lua b/luarules/gadgets/game_team_power_watcher.lua index e8d6207655c..6619931a6de 100644 --- a/luarules/gadgets/game_team_power_watcher.lua +++ b/luarules/gadgets/game_team_power_watcher.lua @@ -1,5 +1,7 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Team Power Watcher", diff --git a/luarules/gadgets/game_team_resources.lua b/luarules/gadgets/game_team_resources.lua index b896f69bd3c..d3423aa24ed 100644 --- a/luarules/gadgets/game_team_resources.lua +++ b/luarules/gadgets/game_team_resources.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Team Resourcing', diff --git a/luarules/gadgets/game_unit_market.lua b/luarules/gadgets/game_unit_market.lua index 4d735ec4989..a8e3c384082 100644 --- a/luarules/gadgets/game_unit_market.lua +++ b/luarules/gadgets/game_unit_market.lua @@ -3,6 +3,8 @@ if not Spring.GetModOptions().unit_market then end -- This handles fair transfer of resource for unit if the modoption is enabled, otherwise it just self removes. +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Market - Backend", diff --git a/luarules/gadgets/gfx_debrisexplosions.lua b/luarules/gadgets/gfx_debrisexplosions.lua index a6eb41b5964..cc512f1d35d 100644 --- a/luarules/gadgets/gfx_debrisexplosions.lua +++ b/luarules/gadgets/gfx_debrisexplosions.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Debris Explosions", diff --git a/luarules/gadgets/gfx_explosion_lights.lua b/luarules/gadgets/gfx_explosion_lights.lua index 414e520230a..5807d5dad78 100644 --- a/luarules/gadgets/gfx_explosion_lights.lua +++ b/luarules/gadgets/gfx_explosion_lights.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Explosion_lights", diff --git a/luarules/gadgets/gfx_raptor_scum_gl4.lua b/luarules/gadgets/gfx_raptor_scum_gl4.lua index c56237e429c..fdc92f83125 100644 --- a/luarules/gadgets/gfx_raptor_scum_gl4.lua +++ b/luarules/gadgets/gfx_raptor_scum_gl4.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Raptor Scum GL4", diff --git a/luarules/gadgets/gfx_reclaim_fx.lua b/luarules/gadgets/gfx_reclaim_fx.lua index b679bcb52cb..e104c12ae1c 100644 --- a/luarules/gadgets/gfx_reclaim_fx.lua +++ b/luarules/gadgets/gfx_reclaim_fx.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Reclaim effect", diff --git a/luarules/gadgets/gfx_tree_feller.lua b/luarules/gadgets/gfx_tree_feller.lua index 75ec8af28fc..44be73f0495 100644 --- a/luarules/gadgets/gfx_tree_feller.lua +++ b/luarules/gadgets/gfx_tree_feller.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Tree feller", diff --git a/luarules/gadgets/gfx_unit_glass.lua b/luarules/gadgets/gfx_unit_glass.lua index 13d027ff75e..214c211c2ad 100644 --- a/luarules/gadgets/gfx_unit_glass.lua +++ b/luarules/gadgets/gfx_unit_glass.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit glass pieces", diff --git a/luarules/gadgets/gfx_unit_script_decals.lua b/luarules/gadgets/gfx_unit_script_decals.lua index c779638814c..5fee3e21806 100644 --- a/luarules/gadgets/gfx_unit_script_decals.lua +++ b/luarules/gadgets/gfx_unit_script_decals.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Script Decals", diff --git a/luarules/gadgets/gfx_unit_script_lights.lua b/luarules/gadgets/gfx_unit_script_lights.lua index 85a9f3ea8ad..efc9839c03f 100644 --- a/luarules/gadgets/gfx_unit_script_lights.lua +++ b/luarules/gadgets/gfx_unit_script_lights.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Script Lights", diff --git a/luarules/gadgets/gfx_wade_fx.lua b/luarules/gadgets/gfx_wade_fx.lua index 726b1d7dd3a..134cc026bd3 100644 --- a/luarules/gadgets/gfx_wade_fx.lua +++ b/luarules/gadgets/gfx_wade_fx.lua @@ -3,6 +3,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Wade Effects", diff --git a/luarules/gadgets/gpumem_broadcast.lua b/luarules/gadgets/gpumem_broadcast.lua index 7bc7f8725d6..c3aa4213d5c 100644 --- a/luarules/gadgets/gpumem_broadcast.lua +++ b/luarules/gadgets/gpumem_broadcast.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "GPU mem Broadcast", diff --git a/luarules/gadgets/gui_awards.lua b/luarules/gadgets/gui_awards.lua index 83abf9680e5..dfe226df8f9 100644 --- a/luarules/gadgets/gui_awards.lua +++ b/luarules/gadgets/gui_awards.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Awards", diff --git a/luarules/gadgets/gui_display_dps.lua b/luarules/gadgets/gui_display_dps.lua index 16f0a17fe4d..3e8ce4a15f7 100644 --- a/luarules/gadgets/gui_display_dps.lua +++ b/luarules/gadgets/gui_display_dps.lua @@ -11,6 +11,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Display DPS", diff --git a/luarules/gadgets/gui_soundeffects.lua b/luarules/gadgets/gui_soundeffects.lua index 2883ea75550..d419adfdafa 100644 --- a/luarules/gadgets/gui_soundeffects.lua +++ b/luarules/gadgets/gui_soundeffects.lua @@ -3,6 +3,8 @@ if gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "GUI Sound Effects player", diff --git a/luarules/gadgets/lups_flame_jitter.lua b/luarules/gadgets/lups_flame_jitter.lua index ad025b20121..74e932d30dc 100644 --- a/luarules/gadgets/lups_flame_jitter.lua +++ b/luarules/gadgets/lups_flame_jitter.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Lups Flamethrower Jitter", diff --git a/luarules/gadgets/lups_orb.lua b/luarules/gadgets/lups_orb.lua index 34a6ddcc576..941a91539a6 100644 --- a/luarules/gadgets/lups_orb.lua +++ b/luarules/gadgets/lups_orb.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Lups Orb", diff --git a/luarules/gadgets/lups_shield.lua b/luarules/gadgets/lups_shield.lua index 9f890d19229..e67f7f121b4 100644 --- a/luarules/gadgets/lups_shield.lua +++ b/luarules/gadgets/lups_shield.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Lups Shield", diff --git a/luarules/gadgets/lups_shockwaves.lua b/luarules/gadgets/lups_shockwaves.lua index c3f651f09f8..8fd2dfedbef 100644 --- a/luarules/gadgets/lups_shockwaves.lua +++ b/luarules/gadgets/lups_shockwaves.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Shockwaves", diff --git a/luarules/gadgets/map_atmosphere_cegs.lua b/luarules/gadgets/map_atmosphere_cegs.lua index 6965f744e80..e611c87cf5f 100644 --- a/luarules/gadgets/map_atmosphere_cegs.lua +++ b/luarules/gadgets/map_atmosphere_cegs.lua @@ -3,6 +3,8 @@ if not Spring.GetModOptions().map_atmosphere then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Map Atmosphere CEGs", diff --git a/luarules/gadgets/map_explosion_deformation_fix.lua b/luarules/gadgets/map_explosion_deformation_fix.lua index f988318a043..b3dc8cc33fc 100644 --- a/luarules/gadgets/map_explosion_deformation_fix.lua +++ b/luarules/gadgets/map_explosion_deformation_fix.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Explosion Deformation Fix", diff --git a/luarules/gadgets/map_geofix.lua b/luarules/gadgets/map_geofix.lua index 17a0d117e2e..685c0d4351a 100644 --- a/luarules/gadgets/map_geofix.lua +++ b/luarules/gadgets/map_geofix.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Geo fix", diff --git a/luarules/gadgets/map_lava.lua b/luarules/gadgets/map_lava.lua index e88c00f65f3..1bc663f8261 100644 --- a/luarules/gadgets/map_lava.lua +++ b/luarules/gadgets/map_lava.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Map Lava Gadget 2.5", diff --git a/luarules/gadgets/map_metal_spot_placer.lua b/luarules/gadgets/map_metal_spot_placer.lua index defa9ccad5d..0551269c078 100644 --- a/luarules/gadgets/map_metal_spot_placer.lua +++ b/luarules/gadgets/map_metal_spot_placer.lua @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Map Lua Metal Spot Placer", diff --git a/luarules/gadgets/map_nightmode.lua b/luarules/gadgets/map_nightmode.lua index ce709f4a2e0..2f7fec76f21 100644 --- a/luarules/gadgets/map_nightmode.lua +++ b/luarules/gadgets/map_nightmode.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Map NightMode", diff --git a/luarules/gadgets/map_sun_handler.lua b/luarules/gadgets/map_sun_handler.lua index 00268e2e472..bca01203233 100644 --- a/luarules/gadgets/map_sun_handler.lua +++ b/luarules/gadgets/map_sun_handler.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Sun Handler", diff --git a/luarules/gadgets/map_voidground.lua b/luarules/gadgets/map_voidground.lua index f98f701ce6c..44d4591a3e1 100644 --- a/luarules/gadgets/map_voidground.lua +++ b/luarules/gadgets/map_voidground.lua @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Map VoidWater", diff --git a/luarules/gadgets/map_waterlevel.lua b/luarules/gadgets/map_waterlevel.lua index c252ad8e45d..a86dd0dc388 100644 --- a/luarules/gadgets/map_waterlevel.lua +++ b/luarules/gadgets/map_waterlevel.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Map Waterlevel", diff --git a/luarules/gadgets/mo_battle_royale.lua b/luarules/gadgets/mo_battle_royale.lua index 33490010220..16b1af59580 100644 --- a/luarules/gadgets/mo_battle_royale.lua +++ b/luarules/gadgets/mo_battle_royale.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Battle Royale", diff --git a/luarules/gadgets/mo_com_counter.lua b/luarules/gadgets/mo_com_counter.lua index 8458d5da264..9e28450c962 100644 --- a/luarules/gadgets/mo_com_counter.lua +++ b/luarules/gadgets/mo_com_counter.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Com Counter", diff --git a/luarules/gadgets/mo_coop_II.lua b/luarules/gadgets/mo_coop_II.lua index df37d8d2173..4db5957442f 100644 --- a/luarules/gadgets/mo_coop_II.lua +++ b/luarules/gadgets/mo_coop_II.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Coop II', diff --git a/luarules/gadgets/mo_ffa.lua b/luarules/gadgets/mo_ffa.lua index c3367cf94f0..7a716419bc4 100644 --- a/luarules/gadgets/mo_ffa.lua +++ b/luarules/gadgets/mo_ffa.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "ffa", diff --git a/luarules/gadgets/mo_preventcombomb.lua b/luarules/gadgets/mo_preventcombomb.lua index 3d645008c8d..1ce5ffdfab1 100644 --- a/luarules/gadgets/mo_preventcombomb.lua +++ b/luarules/gadgets/mo_preventcombomb.lua @@ -1,5 +1,7 @@ local gadgetEnabled = true +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "preventcombomb", diff --git a/luarules/gadgets/pve_areahealers.lua b/luarules/gadgets/pve_areahealers.lua index 8bd4a8fb164..d9740c99e57 100644 --- a/luarules/gadgets/pve_areahealers.lua +++ b/luarules/gadgets/pve_areahealers.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Raptor Area Healers", diff --git a/luarules/gadgets/pve_attachments.lua b/luarules/gadgets/pve_attachments.lua index bec965c387e..05af427f792 100644 --- a/luarules/gadgets/pve_attachments.lua +++ b/luarules/gadgets/pve_attachments.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Attachments", diff --git a/luarules/gadgets/pve_boss_drones.lua b/luarules/gadgets/pve_boss_drones.lua index 30c90ca0e45..414849f3ff0 100644 --- a/luarules/gadgets/pve_boss_drones.lua +++ b/luarules/gadgets/pve_boss_drones.lua @@ -3,6 +3,8 @@ if not (Spring.Utilities.Gametype.IsRaptors() or Spring.Utilities.Gametype.IsSca return false end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "PvE Boss Drones", diff --git a/luarules/gadgets/pve_boss_priority_targetting.lua b/luarules/gadgets/pve_boss_priority_targetting.lua index 28d1d52ed64..07f63796e31 100644 --- a/luarules/gadgets/pve_boss_priority_targetting.lua +++ b/luarules/gadgets/pve_boss_priority_targetting.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Raptor Queen Anti-Dgun behavior", diff --git a/luarules/gadgets/pve_builder_controller.lua b/luarules/gadgets/pve_builder_controller.lua index 71363f54e28..54d92c9215a 100644 --- a/luarules/gadgets/pve_builder_controller.lua +++ b/luarules/gadgets/pve_builder_controller.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "PvE Builder Controller", diff --git a/luarules/gadgets/pve_nuke_controller.lua b/luarules/gadgets/pve_nuke_controller.lua index 3ce4a21fdd0..4231454ab60 100644 --- a/luarules/gadgets/pve_nuke_controller.lua +++ b/luarules/gadgets/pve_nuke_controller.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Raptor Defense Nuke Controller", diff --git a/luarules/gadgets/pve_supply_drops.lua b/luarules/gadgets/pve_supply_drops.lua index 42417147215..2109149e140 100644 --- a/luarules/gadgets/pve_supply_drops.lua +++ b/luarules/gadgets/pve_supply_drops.lua @@ -25,6 +25,8 @@ else end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "supply drops", diff --git a/luarules/gadgets/raptor_spawner_defense.lua b/luarules/gadgets/raptor_spawner_defense.lua index 4252d365495..0f7ba7ddda4 100644 --- a/luarules/gadgets/raptor_spawner_defense.lua +++ b/luarules/gadgets/raptor_spawner_defense.lua @@ -6,6 +6,8 @@ else return false end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Raptor Defense Spawner", diff --git a/luarules/gadgets/scav_cloud_spawner.lua b/luarules/gadgets/scav_cloud_spawner.lua index 2f30817ba8c..0cf0ed5f668 100644 --- a/luarules/gadgets/scav_cloud_spawner.lua +++ b/luarules/gadgets/scav_cloud_spawner.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Scav Cloud Spawner", diff --git a/luarules/gadgets/scav_lootbox_collector.lua b/luarules/gadgets/scav_lootbox_collector.lua index d04474f6c36..770b5d2dcf9 100644 --- a/luarules/gadgets/scav_lootbox_collector.lua +++ b/luarules/gadgets/scav_lootbox_collector.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Scav Lootbox Collector", diff --git a/luarules/gadgets/scav_spawner_defense.lua b/luarules/gadgets/scav_spawner_defense.lua index 08e15db6727..9b80d99d1b6 100644 --- a/luarules/gadgets/scav_spawner_defense.lua +++ b/luarules/gadgets/scav_spawner_defense.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Scav Defense Spawner", diff --git a/luarules/gadgets/sfx_notifications.lua b/luarules/gadgets/sfx_notifications.lua index 35b46ec3610..9df268a3261 100644 --- a/luarules/gadgets/sfx_notifications.lua +++ b/luarules/gadgets/sfx_notifications.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Notifications", diff --git a/luarules/gadgets/system_info.lua b/luarules/gadgets/system_info.lua index b0bafba020e..e0bca54a8ec 100644 --- a/luarules/gadgets/system_info.lua +++ b/luarules/gadgets/system_info.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "System info", diff --git a/luarules/gadgets/unit_aa_targeting_priority.lua b/luarules/gadgets/unit_aa_targeting_priority.lua index 40144faaa76..e41deb0815d 100644 --- a/luarules/gadgets/unit_aa_targeting_priority.lua +++ b/luarules/gadgets/unit_aa_targeting_priority.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'AA Targeting Priority', diff --git a/luarules/gadgets/unit_air_attacksafetydistance.lua b/luarules/gadgets/unit_air_attacksafetydistance.lua index 782fc7350f7..31c420cac27 100644 --- a/luarules/gadgets/unit_air_attacksafetydistance.lua +++ b/luarules/gadgets/unit_air_attacksafetydistance.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Air AttackSafetyDistance", diff --git a/luarules/gadgets/unit_air_plants.lua b/luarules/gadgets/unit_air_plants.lua index 41bc7db4d46..fd56cd330c4 100644 --- a/luarules/gadgets/unit_air_plants.lua +++ b/luarules/gadgets/unit_air_plants.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "AirPlantParents", diff --git a/luarules/gadgets/unit_airbase.lua b/luarules/gadgets/unit_airbase.lua index 0c5768a84d3..63c27800f6f 100644 --- a/luarules/gadgets/unit_airbase.lua +++ b/luarules/gadgets/unit_airbase.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Airbase Manager", diff --git a/luarules/gadgets/unit_airtransport_load_unload.lua b/luarules/gadgets/unit_airtransport_load_unload.lua index ccc8282a4ee..db7f58094e2 100644 --- a/luarules/gadgets/unit_airtransport_load_unload.lua +++ b/luarules/gadgets/unit_airtransport_load_unload.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Load/unload", diff --git a/luarules/gadgets/unit_airunitsturnradius.lua b/luarules/gadgets/unit_airunitsturnradius.lua index 8368f88d7b6..51ee973ee65 100644 --- a/luarules/gadgets/unit_airunitsturnradius.lua +++ b/luarules/gadgets/unit_airunitsturnradius.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "TurnRadius", diff --git a/luarules/gadgets/unit_allow_builder_hold_fire.lua b/luarules/gadgets/unit_allow_builder_hold_fire.lua index 4f54d0531e8..794f0c6d2f7 100644 --- a/luarules/gadgets/unit_allow_builder_hold_fire.lua +++ b/luarules/gadgets/unit_allow_builder_hold_fire.lua @@ -6,6 +6,8 @@ end ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Allow Builder Hold Fire", diff --git a/luarules/gadgets/unit_area_timed_damage.lua b/luarules/gadgets/unit_area_timed_damage.lua index a101a2bacbc..8b6cb960747 100644 --- a/luarules/gadgets/unit_area_timed_damage.lua +++ b/luarules/gadgets/unit_area_timed_damage.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Area Timed Damage Handler', diff --git a/luarules/gadgets/unit_areaattack.lua b/luarules/gadgets/unit_areaattack.lua index 5b58b352c4e..eef677435f0 100644 --- a/luarules/gadgets/unit_areaattack.lua +++ b/luarules/gadgets/unit_areaattack.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Area Attack", diff --git a/luarules/gadgets/unit_attached_con_turret.lua b/luarules/gadgets/unit_attached_con_turret.lua index 127526b5ed0..16826abd89a 100644 --- a/luarules/gadgets/unit_attached_con_turret.lua +++ b/luarules/gadgets/unit_attached_con_turret.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Attached Construction Turret', diff --git a/luarules/gadgets/unit_attributes.lua b/luarules/gadgets/unit_attributes.lua index bd0caacfb3c..9562862d75e 100644 --- a/luarules/gadgets/unit_attributes.lua +++ b/luarules/gadgets/unit_attributes.lua @@ -3,6 +3,8 @@ if not Spring.GetModOptions().emprework then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Attributes", diff --git a/luarules/gadgets/unit_block_fake_geo.lua b/luarules/gadgets/unit_block_fake_geo.lua index dd097d29442..ae622f46296 100644 --- a/luarules/gadgets/unit_block_fake_geo.lua +++ b/luarules/gadgets/unit_block_fake_geo.lua @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then return false end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Block ventless geo", diff --git a/luarules/gadgets/unit_builder_priority.lua b/luarules/gadgets/unit_builder_priority.lua index ee1506582b6..9ba906e163d 100644 --- a/luarules/gadgets/unit_builder_priority.lua +++ b/luarules/gadgets/unit_builder_priority.lua @@ -15,6 +15,8 @@ -- REASON: -- AllowUnitBuildStep is damn expensive and is a serious perf hit if it is used for all this. +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Builder Priority', -- this once was named: Passive Builders v3 diff --git a/luarules/gadgets/unit_cancel_orders_on_share.lua b/luarules/gadgets/unit_cancel_orders_on_share.lua index 2a116588a51..686227baf03 100644 --- a/luarules/gadgets/unit_cancel_orders_on_share.lua +++ b/luarules/gadgets/unit_cancel_orders_on_share.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Cancel orders on share", diff --git a/luarules/gadgets/unit_capture_decay.lua b/luarules/gadgets/unit_capture_decay.lua index fa45f5ff684..0c0e4064fa1 100644 --- a/luarules/gadgets/unit_capture_decay.lua +++ b/luarules/gadgets/unit_capture_decay.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Capture Decay", diff --git a/luarules/gadgets/unit_capture_only_enemy.lua b/luarules/gadgets/unit_capture_only_enemy.lua index d41ae38bed6..8b4e4fb355d 100644 --- a/luarules/gadgets/unit_capture_only_enemy.lua +++ b/luarules/gadgets/unit_capture_only_enemy.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Capture Only Enemy", diff --git a/luarules/gadgets/unit_carrier_spawner.lua b/luarules/gadgets/unit_carrier_spawner.lua index 6639bb0fb6e..3ac48c0f069 100644 --- a/luarules/gadgets/unit_carrier_spawner.lua +++ b/luarules/gadgets/unit_carrier_spawner.lua @@ -3,6 +3,8 @@ if not gadgetHandler:IsSyncedCode() then return false end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Carrier Spawner", diff --git a/luarules/gadgets/unit_cheat_no_waste.lua b/luarules/gadgets/unit_cheat_no_waste.lua index 62426a73dd4..901a490c23a 100644 --- a/luarules/gadgets/unit_cheat_no_waste.lua +++ b/luarules/gadgets/unit_cheat_no_waste.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Cheat No Waste", diff --git a/luarules/gadgets/unit_cloak.lua b/luarules/gadgets/unit_cloak.lua index 64c089d7ec2..fae8a0ff0a8 100644 --- a/luarules/gadgets/unit_cloak.lua +++ b/luarules/gadgets/unit_cloak.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Cloak", -- gadget copy from: Decloak when damaged diff --git a/luarules/gadgets/unit_collision_damage_behavior.lua b/luarules/gadgets/unit_collision_damage_behavior.lua index 43cc944cb5c..765557749d9 100644 --- a/luarules/gadgets/unit_collision_damage_behavior.lua +++ b/luarules/gadgets/unit_collision_damage_behavior.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Collision Damage Behavior", diff --git a/luarules/gadgets/unit_combomb_full_damage.lua b/luarules/gadgets/unit_combomb_full_damage.lua index 59deffc761c..ac56505e257 100644 --- a/luarules/gadgets/unit_combomb_full_damage.lua +++ b/luarules/gadgets/unit_combomb_full_damage.lua @@ -2,6 +2,8 @@ --this is much simper than checking if the com has just been unloaded from a trans or not, with essentially the same gameplay; coms don't levitate/bounce much --if the com is more than 10 off the ground, the comblast damage is reduced. consequence is that COM_BLAST should not be used for anything else +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "unit_combomb_full_damage", diff --git a/luarules/gadgets/unit_commando_watch.lua b/luarules/gadgets/unit_commando_watch.lua index e5193e43225..7976a8fe377 100644 --- a/luarules/gadgets/unit_commando_watch.lua +++ b/luarules/gadgets/unit_commando_watch.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Commando Watch", diff --git a/luarules/gadgets/unit_continuous_aim.lua b/luarules/gadgets/unit_continuous_aim.lua index 1a3c4557cb5..e7f5ee95d8e 100644 --- a/luarules/gadgets/unit_continuous_aim.lua +++ b/luarules/gadgets/unit_continuous_aim.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Continuous Aim", diff --git a/luarules/gadgets/unit_crashing_aircraft.lua b/luarules/gadgets/unit_crashing_aircraft.lua index 74f76738e28..e305ac1959f 100644 --- a/luarules/gadgets/unit_crashing_aircraft.lua +++ b/luarules/gadgets/unit_crashing_aircraft.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Crashing Aircraft", diff --git a/luarules/gadgets/unit_cursors.lua b/luarules/gadgets/unit_cursors.lua index 3237eab09c6..1bbce5a7693 100644 --- a/luarules/gadgets/unit_cursors.lua +++ b/luarules/gadgets/unit_cursors.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Cursors", diff --git a/luarules/gadgets/unit_custom_weapons_behaviours.lua b/luarules/gadgets/unit_custom_weapons_behaviours.lua index 33bb17eeb21..c97fe97b6fd 100644 --- a/luarules/gadgets/unit_custom_weapons_behaviours.lua +++ b/luarules/gadgets/unit_custom_weapons_behaviours.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Custom weapon behaviours", diff --git a/luarules/gadgets/unit_custom_weapons_cluster.lua b/luarules/gadgets/unit_custom_weapons_cluster.lua index e7e25cc9a6f..3cb7262ec83 100644 --- a/luarules/gadgets/unit_custom_weapons_cluster.lua +++ b/luarules/gadgets/unit_custom_weapons_cluster.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Cluster Munitions', diff --git a/luarules/gadgets/unit_custom_weapons_overpen.lua b/luarules/gadgets/unit_custom_weapons_overpen.lua index 0d3def2b595..b42d5e35e8e 100644 --- a/luarules/gadgets/unit_custom_weapons_overpen.lua +++ b/luarules/gadgets/unit_custom_weapons_overpen.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Penetrator Weapons', diff --git a/luarules/gadgets/unit_custommaxranges.lua b/luarules/gadgets/unit_custommaxranges.lua index f2cf3529fc3..2dcbe5e79b5 100644 --- a/luarules/gadgets/unit_custommaxranges.lua +++ b/luarules/gadgets/unit_custommaxranges.lua @@ -6,6 +6,8 @@ end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Controls Unit's maxrange", diff --git a/luarules/gadgets/unit_dead.lua b/luarules/gadgets/unit_dead.lua index a513a11faac..16a50275c28 100644 --- a/luarules/gadgets/unit_dead.lua +++ b/luarules/gadgets/unit_dead.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Dead Unit", diff --git a/luarules/gadgets/unit_death_animations.lua b/luarules/gadgets/unit_death_animations.lua index 72df5c21169..c62d80f7081 100644 --- a/luarules/gadgets/unit_death_animations.lua +++ b/luarules/gadgets/unit_death_animations.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Death Animations", diff --git a/luarules/gadgets/unit_dgun_behaviour.lua b/luarules/gadgets/unit_dgun_behaviour.lua index 55f37e303a1..e2ee4d477af 100644 --- a/luarules/gadgets/unit_dgun_behaviour.lua +++ b/luarules/gadgets/unit_dgun_behaviour.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "D-Gun Behaviour", diff --git a/luarules/gadgets/unit_dgun_cmdtype_fix.lua b/luarules/gadgets/unit_dgun_cmdtype_fix.lua index ed57b2e3fa0..f4a8460779b 100644 --- a/luarules/gadgets/unit_dgun_cmdtype_fix.lua +++ b/luarules/gadgets/unit_dgun_cmdtype_fix.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'DGun CmdType Fix', diff --git a/luarules/gadgets/unit_direct_control.lua b/luarules/gadgets/unit_direct_control.lua index 9ebe420c877..0ff2d361ad1 100644 --- a/luarules/gadgets/unit_direct_control.lua +++ b/luarules/gadgets/unit_direct_control.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "DirectControl", diff --git a/luarules/gadgets/unit_disallow_underwater_load.lua b/luarules/gadgets/unit_disallow_underwater_load.lua index b8309e73df6..d9c7466024f 100644 --- a/luarules/gadgets/unit_disallow_underwater_load.lua +++ b/luarules/gadgets/unit_disallow_underwater_load.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "UnderwaterPickup", diff --git a/luarules/gadgets/unit_dragons_disguise.lua b/luarules/gadgets/unit_dragons_disguise.lua index fa9bd62d55f..221ca4b9183 100644 --- a/luarules/gadgets/unit_dragons_disguise.lua +++ b/luarules/gadgets/unit_dragons_disguise.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Dragons Disguise", diff --git a/luarules/gadgets/unit_dynamic_collision_volume.lua b/luarules/gadgets/unit_dynamic_collision_volume.lua index d43ccc1f595..bb3f3262100 100644 --- a/luarules/gadgets/unit_dynamic_collision_volume.lua +++ b/luarules/gadgets/unit_dynamic_collision_volume.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Dynamic collision volume & Hitsphere Scaledown", diff --git a/luarules/gadgets/unit_evolution.lua b/luarules/gadgets/unit_evolution.lua index 1d9135827d8..8b4c3f818b4 100644 --- a/luarules/gadgets/unit_evolution.lua +++ b/luarules/gadgets/unit_evolution.lua @@ -1,5 +1,7 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Evolution", diff --git a/luarules/gadgets/unit_explosion_spawner.lua b/luarules/gadgets/unit_explosion_spawner.lua index 2a3241d03e6..1f37992e32b 100644 --- a/luarules/gadgets/unit_explosion_spawner.lua +++ b/luarules/gadgets/unit_explosion_spawner.lua @@ -3,6 +3,8 @@ if (not gadgetHandler:IsSyncedCode()) then return false end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Explosion Spawner", diff --git a/luarules/gadgets/unit_factory_guard.lua b/luarules/gadgets/unit_factory_guard.lua index c101f99a68e..60352480eb2 100644 --- a/luarules/gadgets/unit_factory_guard.lua +++ b/luarules/gadgets/unit_factory_guard.lua @@ -4,6 +4,8 @@ if not gadgetHandler:IsSyncedCode() then end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Factory Guard", diff --git a/luarules/gadgets/unit_factory_quota.lua b/luarules/gadgets/unit_factory_quota.lua index ff57688148b..d68d746ebff 100644 --- a/luarules/gadgets/unit_factory_quota.lua +++ b/luarules/gadgets/unit_factory_quota.lua @@ -2,6 +2,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Factory Quotas", diff --git a/luarules/gadgets/unit_factory_unblocking.lua b/luarules/gadgets/unit_factory_unblocking.lua index 5607fa346ca..196ac08d1d6 100644 --- a/luarules/gadgets/unit_factory_unblocking.lua +++ b/luarules/gadgets/unit_factory_unblocking.lua @@ -3,6 +3,8 @@ if not gadgetHandler:IsSyncedCode() then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Factory Unblocking", diff --git a/luarules/gadgets/unit_footprint_clearance.lua b/luarules/gadgets/unit_footprint_clearance.lua index eea1e715e3e..bef4e64aba3 100644 --- a/luarules/gadgets/unit_footprint_clearance.lua +++ b/luarules/gadgets/unit_footprint_clearance.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Footprint clearance', diff --git a/luarules/gadgets/unit_geo_upgrade_reclaimer.lua b/luarules/gadgets/unit_geo_upgrade_reclaimer.lua index df47a474256..52f74a135ad 100644 --- a/luarules/gadgets/unit_geo_upgrade_reclaimer.lua +++ b/luarules/gadgets/unit_geo_upgrade_reclaimer.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Geo Upgrade Reclaimer", diff --git a/luarules/gadgets/unit_hats.lua b/luarules/gadgets/unit_hats.lua index b4a3738c0cd..18b7c8e1ea2 100644 --- a/luarules/gadgets/unit_hats.lua +++ b/luarules/gadgets/unit_hats.lua @@ -3,6 +3,8 @@ if Spring.GetModOptions().teamcolors_anonymous_mode ~= "disabled" then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Hats", diff --git a/luarules/gadgets/unit_healthbars_widget_forwarding.lua b/luarules/gadgets/unit_healthbars_widget_forwarding.lua index 267dfb0afea..e3ddb5b832e 100644 --- a/luarules/gadgets/unit_healthbars_widget_forwarding.lua +++ b/luarules/gadgets/unit_healthbars_widget_forwarding.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Healthbars Widget Forwarding", diff --git a/luarules/gadgets/unit_icongenerator.lua b/luarules/gadgets/unit_icongenerator.lua index 8713392cb60..ab38fe5f94b 100644 --- a/luarules/gadgets/unit_icongenerator.lua +++ b/luarules/gadgets/unit_icongenerator.lua @@ -22,6 +22,8 @@ example usage (need cheats): --2. fix the culling of floating structures --3. make units get their default stance (e.g. armcom) +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "IconGenerator", diff --git a/luarules/gadgets/unit_infestor_spawn.lua b/luarules/gadgets/unit_infestor_spawn.lua index 73003435ae0..b88284d334f 100644 --- a/luarules/gadgets/unit_infestor_spawn.lua +++ b/luarules/gadgets/unit_infestor_spawn.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Infestor Replication", diff --git a/luarules/gadgets/unit_inherit_creation_xp.lua b/luarules/gadgets/unit_inherit_creation_xp.lua index c24bb6d9dc7..c61b36f1872 100644 --- a/luarules/gadgets/unit_inherit_creation_xp.lua +++ b/luarules/gadgets/unit_inherit_creation_xp.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Inherit Creation Units XP", diff --git a/luarules/gadgets/unit_instant_self_destruct.lua b/luarules/gadgets/unit_instant_self_destruct.lua index 317ff8df4dd..dfee4ed7870 100644 --- a/luarules/gadgets/unit_instant_self_destruct.lua +++ b/luarules/gadgets/unit_instant_self_destruct.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Instant Self Destruct", diff --git a/luarules/gadgets/unit_interceptors.lua b/luarules/gadgets/unit_interceptors.lua index 92bdb9e4cc6..5b5c8a56c55 100644 --- a/luarules/gadgets/unit_interceptors.lua +++ b/luarules/gadgets/unit_interceptors.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Don't target flyover nukes", diff --git a/luarules/gadgets/unit_intergrated_hats.lua b/luarules/gadgets/unit_intergrated_hats.lua index 95972aa69e5..766610d5da7 100644 --- a/luarules/gadgets/unit_intergrated_hats.lua +++ b/luarules/gadgets/unit_intergrated_hats.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Intergrated Hats", diff --git a/luarules/gadgets/unit_juno_damage.lua b/luarules/gadgets/unit_juno_damage.lua index 8b8429a5436..7a64e1e79f8 100644 --- a/luarules/gadgets/unit_juno_damage.lua +++ b/luarules/gadgets/unit_juno_damage.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Juno Damage', diff --git a/luarules/gadgets/unit_juno_damage_mini.lua b/luarules/gadgets/unit_juno_damage_mini.lua index eb56f5362b8..37626d1be39 100644 --- a/luarules/gadgets/unit_juno_damage_mini.lua +++ b/luarules/gadgets/unit_juno_damage_mini.lua @@ -2,6 +2,8 @@ if not WeaponDefNames.legcib_juno_pulse_mini then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Juno Damage Mini', diff --git a/luarules/gadgets/unit_juno_rework_damage.lua b/luarules/gadgets/unit_juno_rework_damage.lua index 01968aed02e..4b8846e9a99 100644 --- a/luarules/gadgets/unit_juno_rework_damage.lua +++ b/luarules/gadgets/unit_juno_rework_damage.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Juno Rework Damage', diff --git a/luarules/gadgets/unit_kill_count.lua b/luarules/gadgets/unit_kill_count.lua index 58997a6e2c3..2f5707619ed 100644 --- a/luarules/gadgets/unit_kill_count.lua +++ b/luarules/gadgets/unit_kill_count.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit kill count", diff --git a/luarules/gadgets/unit_liche_cruisecontrol.lua b/luarules/gadgets/unit_liche_cruisecontrol.lua index dbf986bf870..41ac5accf85 100644 --- a/luarules/gadgets/unit_liche_cruisecontrol.lua +++ b/luarules/gadgets/unit_liche_cruisecontrol.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Liche Cruise Control", diff --git a/luarules/gadgets/unit_lightning_splash_dmg.lua b/luarules/gadgets/unit_lightning_splash_dmg.lua index 9eac4a7761d..40de743d735 100644 --- a/luarules/gadgets/unit_lightning_splash_dmg.lua +++ b/luarules/gadgets/unit_lightning_splash_dmg.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Lightning Splash Damage', diff --git a/luarules/gadgets/unit_mex_upgrade_reclaimer.lua b/luarules/gadgets/unit_mex_upgrade_reclaimer.lua index 83cf274f803..5e9c340d373 100644 --- a/luarules/gadgets/unit_mex_upgrade_reclaimer.lua +++ b/luarules/gadgets/unit_mex_upgrade_reclaimer.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Mex Upgrade Reclaimer", diff --git a/luarules/gadgets/unit_minesweeper_detection.lua b/luarules/gadgets/unit_minesweeper_detection.lua index 05fa7d21afe..0512d39d06c 100644 --- a/luarules/gadgets/unit_minesweeper_detection.lua +++ b/luarules/gadgets/unit_minesweeper_detection.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Minesweeper Detection", diff --git a/luarules/gadgets/unit_nanoradarpos.lua b/luarules/gadgets/unit_nanoradarpos.lua index c83080807c1..4099369eb96 100644 --- a/luarules/gadgets/unit_nanoradarpos.lua +++ b/luarules/gadgets/unit_nanoradarpos.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Nano Radar Pos", diff --git a/luarules/gadgets/unit_no_land_damage.lua b/luarules/gadgets/unit_no_land_damage.lua index 5a0743e8910..cc8bfd88848 100644 --- a/luarules/gadgets/unit_no_land_damage.lua +++ b/luarules/gadgets/unit_no_land_damage.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "No Land Damage", diff --git a/luarules/gadgets/unit_nonblocking_mines.lua b/luarules/gadgets/unit_nonblocking_mines.lua index 74024c8b29d..f19d5031637 100644 --- a/luarules/gadgets/unit_nonblocking_mines.lua +++ b/luarules/gadgets/unit_nonblocking_mines.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Nonblocking mines', diff --git a/luarules/gadgets/unit_objectify.lua b/luarules/gadgets/unit_objectify.lua index ad164201722..278189027de 100644 --- a/luarules/gadgets/unit_objectify.lua +++ b/luarules/gadgets/unit_objectify.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Objectify", diff --git a/luarules/gadgets/unit_onlytargetcategory.lua b/luarules/gadgets/unit_onlytargetcategory.lua index b0be3f276d0..29264c59c51 100644 --- a/luarules/gadgets/unit_onlytargetcategory.lua +++ b/luarules/gadgets/unit_onlytargetcategory.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Only Target onlytargetcategory", diff --git a/luarules/gadgets/unit_onlytargetempable.lua b/luarules/gadgets/unit_onlytargetempable.lua index 63a1617d4cb..3af7d15e8f6 100644 --- a/luarules/gadgets/unit_onlytargetempable.lua +++ b/luarules/gadgets/unit_onlytargetempable.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Only Target Emp-able units", diff --git a/luarules/gadgets/unit_paralyze_damage_limit.lua b/luarules/gadgets/unit_paralyze_damage_limit.lua index 44e34781c4d..4b9d095443b 100644 --- a/luarules/gadgets/unit_paralyze_damage_limit.lua +++ b/luarules/gadgets/unit_paralyze_damage_limit.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Mobile Unit Paralyze Damage Handler', diff --git a/luarules/gadgets/unit_paralyze_damage_multiplier.lua b/luarules/gadgets/unit_paralyze_damage_multiplier.lua index ff5eae00b95..2480e5c9ef8 100644 --- a/luarules/gadgets/unit_paralyze_damage_multiplier.lua +++ b/luarules/gadgets/unit_paralyze_damage_multiplier.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Paralyze Damage Multiplier', diff --git a/luarules/gadgets/unit_paralyze_on_off.lua b/luarules/gadgets/unit_paralyze_on_off.lua index 9a3dea8e9e4..d0b90d7850a 100644 --- a/luarules/gadgets/unit_paralyze_on_off.lua +++ b/luarules/gadgets/unit_paralyze_on_off.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Paralyze On Off Behavior', diff --git a/luarules/gadgets/unit_preaim.lua b/luarules/gadgets/unit_preaim.lua index baf8f967df0..6e4e3f5a11e 100644 --- a/luarules/gadgets/unit_preaim.lua +++ b/luarules/gadgets/unit_preaim.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Pre-aim", diff --git a/luarules/gadgets/unit_prevent_aircraft_hax.lua b/luarules/gadgets/unit_prevent_aircraft_hax.lua index 1629df22cfb..70397daea14 100644 --- a/luarules/gadgets/unit_prevent_aircraft_hax.lua +++ b/luarules/gadgets/unit_prevent_aircraft_hax.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Prevent outside-of-map hax", diff --git a/luarules/gadgets/unit_prevent_cloaked_unit_reclaim.lua b/luarules/gadgets/unit_prevent_cloaked_unit_reclaim.lua index e0cfdc943a8..7234f86004c 100644 --- a/luarules/gadgets/unit_prevent_cloaked_unit_reclaim.lua +++ b/luarules/gadgets/unit_prevent_cloaked_unit_reclaim.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Prevent Cloaked Unit Reclaim", diff --git a/luarules/gadgets/unit_prevent_lab_hax2.lua b/luarules/gadgets/unit_prevent_lab_hax2.lua index 6792264d165..a63c538ed35 100644 --- a/luarules/gadgets/unit_prevent_lab_hax2.lua +++ b/luarules/gadgets/unit_prevent_lab_hax2.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Prevent Lab Hax2", diff --git a/luarules/gadgets/unit_prevent_load_hax.lua b/luarules/gadgets/unit_prevent_load_hax.lua index 8c3e6ab311e..2566dc3a1b9 100644 --- a/luarules/gadgets/unit_prevent_load_hax.lua +++ b/luarules/gadgets/unit_prevent_load_hax.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Prevent Load Hax", diff --git a/luarules/gadgets/unit_prevent_nanoframe_blocking_hax.lua b/luarules/gadgets/unit_prevent_nanoframe_blocking_hax.lua index e5fa8a55398..16a0159b8c2 100644 --- a/luarules/gadgets/unit_prevent_nanoframe_blocking_hax.lua +++ b/luarules/gadgets/unit_prevent_nanoframe_blocking_hax.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Prevent Nanoframe Blocking Hax", diff --git a/luarules/gadgets/unit_prevent_range_hax.lua b/luarules/gadgets/unit_prevent_range_hax.lua index 0637bffaa4a..3d13e095d03 100644 --- a/luarules/gadgets/unit_prevent_range_hax.lua +++ b/luarules/gadgets/unit_prevent_range_hax.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Prevent Range Hax", diff --git a/luarules/gadgets/unit_prevent_share_load.lua b/luarules/gadgets/unit_prevent_share_load.lua index 2abbe06c1dd..dbab2f0ecb1 100644 --- a/luarules/gadgets/unit_prevent_share_load.lua +++ b/luarules/gadgets/unit_prevent_share_load.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "No Share Load", diff --git a/luarules/gadgets/unit_prevent_share_self_d.lua b/luarules/gadgets/unit_prevent_share_self_d.lua index 44c35b1ff63..f5dec7122aa 100644 --- a/luarules/gadgets/unit_prevent_share_self_d.lua +++ b/luarules/gadgets/unit_prevent_share_self_d.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "No Share Self-D", diff --git a/luarules/gadgets/unit_prevent_strange_orders.lua b/luarules/gadgets/unit_prevent_strange_orders.lua index 255be1b0ddf..d0715c186cb 100644 --- a/luarules/gadgets/unit_prevent_strange_orders.lua +++ b/luarules/gadgets/unit_prevent_strange_orders.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Prevent Strange Orders", diff --git a/luarules/gadgets/unit_prevent_unload_hax.lua b/luarules/gadgets/unit_prevent_unload_hax.lua index f8ed1a84c61..537519511cf 100644 --- a/luarules/gadgets/unit_prevent_unload_hax.lua +++ b/luarules/gadgets/unit_prevent_unload_hax.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Prevent Unload Hax", diff --git a/luarules/gadgets/unit_projectile_overrange.lua b/luarules/gadgets/unit_projectile_overrange.lua index 93df8d9ce85..a72cdb8da3b 100644 --- a/luarules/gadgets/unit_projectile_overrange.lua +++ b/luarules/gadgets/unit_projectile_overrange.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Projectile Over-Range and Leashing", diff --git a/luarules/gadgets/unit_reclaim_fix.lua b/luarules/gadgets/unit_reclaim_fix.lua index f1532f3ab13..fe89a337553 100644 --- a/luarules/gadgets/unit_reclaim_fix.lua +++ b/luarules/gadgets/unit_reclaim_fix.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Reclaim Fix", diff --git a/luarules/gadgets/unit_respawning.lua b/luarules/gadgets/unit_respawning.lua index f2022d447d4..ddfe4404ba8 100644 --- a/luarules/gadgets/unit_respawning.lua +++ b/luarules/gadgets/unit_respawning.lua @@ -1,5 +1,7 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Respawning", diff --git a/luarules/gadgets/unit_resurrected.lua b/luarules/gadgets/unit_resurrected.lua index bff43fa4349..e110a7cdc37 100644 --- a/luarules/gadgets/unit_resurrected.lua +++ b/luarules/gadgets/unit_resurrected.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "resurrected param", diff --git a/luarules/gadgets/unit_reverse_move.lua b/luarules/gadgets/unit_reverse_move.lua index 9e497d7a8bd..40236cd0193 100644 --- a/luarules/gadgets/unit_reverse_move.lua +++ b/luarules/gadgets/unit_reverse_move.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "ReverseMovementHandler", diff --git a/luarules/gadgets/unit_scenario_loadout.lua b/luarules/gadgets/unit_scenario_loadout.lua index bdf93282019..2f9ea6263f2 100644 --- a/luarules/gadgets/unit_scenario_loadout.lua +++ b/luarules/gadgets/unit_scenario_loadout.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Scenario Loadout", diff --git a/luarules/gadgets/unit_scenario_script.lua b/luarules/gadgets/unit_scenario_script.lua index 9a11bbfa486..7652c81fd72 100644 --- a/luarules/gadgets/unit_scenario_script.lua +++ b/luarules/gadgets/unit_scenario_script.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Scenario Script", diff --git a/luarules/gadgets/unit_shield_behaviour.lua b/luarules/gadgets/unit_shield_behaviour.lua index 472072598c0..d8b9e82216a 100644 --- a/luarules/gadgets/unit_shield_behaviour.lua +++ b/luarules/gadgets/unit_shield_behaviour.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Shield Behaviour", diff --git a/luarules/gadgets/unit_sinking_ship.lua b/luarules/gadgets/unit_sinking_ship.lua index 06dd93de594..6acf9cf8261 100644 --- a/luarules/gadgets/unit_sinking_ship.lua +++ b/luarules/gadgets/unit_sinking_ship.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Sinking Ship", diff --git a/luarules/gadgets/unit_stack_hack_fix.lua b/luarules/gadgets/unit_stack_hack_fix.lua index 13abfdb892c..faf716fa4fa 100644 --- a/luarules/gadgets/unit_stack_hack_fix.lua +++ b/luarules/gadgets/unit_stack_hack_fix.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Anti Stacking Hax", diff --git a/luarules/gadgets/unit_stealthy_passengers.lua b/luarules/gadgets/unit_stealthy_passengers.lua index 30840f1b8cc..f96670d3fbc 100644 --- a/luarules/gadgets/unit_stealthy_passengers.lua +++ b/luarules/gadgets/unit_stealthy_passengers.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Stealthy Passengers", diff --git a/luarules/gadgets/unit_stockpile_limit.lua b/luarules/gadgets/unit_stockpile_limit.lua index ea804110b0c..86445a4d7fd 100644 --- a/luarules/gadgets/unit_stockpile_limit.lua +++ b/luarules/gadgets/unit_stockpile_limit.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = 'Stockpile control', diff --git a/luarules/gadgets/unit_stockpile_script.lua b/luarules/gadgets/unit_stockpile_script.lua index 215312168db..2f1b61a81c0 100644 --- a/luarules/gadgets/unit_stockpile_script.lua +++ b/luarules/gadgets/unit_stockpile_script.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Stockpile Script", diff --git a/luarules/gadgets/unit_stomp.lua b/luarules/gadgets/unit_stomp.lua index 05d579002f0..6d9e9bf2502 100644 --- a/luarules/gadgets/unit_stomp.lua +++ b/luarules/gadgets/unit_stomp.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Experimental Bots Steps Damages", diff --git a/luarules/gadgets/unit_stun_control.lua b/luarules/gadgets/unit_stun_control.lua index d4a1caf66c0..9ca435e9824 100644 --- a/luarules/gadgets/unit_stun_control.lua +++ b/luarules/gadgets/unit_stun_control.lua @@ -1,6 +1,8 @@ ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Stun Control", diff --git a/luarules/gadgets/unit_stun_script.lua b/luarules/gadgets/unit_stun_script.lua index ffa32e12da4..8e55ec33cb3 100644 --- a/luarules/gadgets/unit_stun_script.lua +++ b/luarules/gadgets/unit_stun_script.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Stun Script", diff --git a/luarules/gadgets/unit_stun_storage.lua b/luarules/gadgets/unit_stun_storage.lua index d23b67dc68c..f730de57967 100644 --- a/luarules/gadgets/unit_stun_storage.lua +++ b/luarules/gadgets/unit_stun_storage.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Stun Storage", diff --git a/luarules/gadgets/unit_sunfacing.lua b/luarules/gadgets/unit_sunfacing.lua index 180ab409827..1df63a418f6 100644 --- a/luarules/gadgets/unit_sunfacing.lua +++ b/luarules/gadgets/unit_sunfacing.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Sunfacer", diff --git a/luarules/gadgets/unit_target_on_the_move.lua b/luarules/gadgets/unit_target_on_the_move.lua index bce9fe4800f..3dcc106fd3c 100644 --- a/luarules/gadgets/unit_target_on_the_move.lua +++ b/luarules/gadgets/unit_target_on_the_move.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Target on the move", diff --git a/luarules/gadgets/unit_timeslow.lua b/luarules/gadgets/unit_timeslow.lua index 2e891122286..84e423fca3e 100644 --- a/luarules/gadgets/unit_timeslow.lua +++ b/luarules/gadgets/unit_timeslow.lua @@ -3,6 +3,8 @@ if not Spring.GetModOptions().emprework then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Slowing", diff --git a/luarules/gadgets/unit_tombstones.lua b/luarules/gadgets/unit_tombstones.lua index 2a101aa5999..40e98b00847 100644 --- a/luarules/gadgets/unit_tombstones.lua +++ b/luarules/gadgets/unit_tombstones.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Tombstones", diff --git a/luarules/gadgets/unit_transport_dies_load_dies.lua b/luarules/gadgets/unit_transport_dies_load_dies.lua index 7bc3aefac13..c1ebe53b0ce 100644 --- a/luarules/gadgets/unit_transport_dies_load_dies.lua +++ b/luarules/gadgets/unit_transport_dies_load_dies.lua @@ -15,6 +15,8 @@ --AddUnitDamage (ID, math.huge) makes a normal death explo but leaves wreck. Calling this for the transportee on the same frame as the trans dies results in a crash. +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "transport_dies_load_dies", diff --git a/luarules/gadgets/unit_transportable_nanos.lua b/luarules/gadgets/unit_transportable_nanos.lua index c3618217518..9bb825d7144 100644 --- a/luarules/gadgets/unit_transportable_nanos.lua +++ b/luarules/gadgets/unit_transportable_nanos.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit transportable nanos", diff --git a/luarules/gadgets/unit_transportee_hider.lua b/luarules/gadgets/unit_transportee_hider.lua index 4af66361160..d5b20ca2556 100644 --- a/luarules/gadgets/unit_transportee_hider.lua +++ b/luarules/gadgets/unit_transportee_hider.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Transportee Hider", diff --git a/luarules/gadgets/unit_transports_air_speed.lua b/luarules/gadgets/unit_transports_air_speed.lua index ec2ae699e74..e17da765c80 100644 --- a/luarules/gadgets/unit_transports_air_speed.lua +++ b/luarules/gadgets/unit_transports_air_speed.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Air Transports Speed", diff --git a/luarules/gadgets/unit_turretspeed.lua b/luarules/gadgets/unit_turretspeed.lua index 1cf3d5c5cf8..2d7815de503 100644 --- a/luarules/gadgets/unit_turretspeed.lua +++ b/luarules/gadgets/unit_turretspeed.lua @@ -1,4 +1,6 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "UnitDefs Turret TurnSpeeds", diff --git a/luarules/gadgets/unit_wanted_speed.lua b/luarules/gadgets/unit_wanted_speed.lua index 915903aea84..3c8f1bf5313 100644 --- a/luarules/gadgets/unit_wanted_speed.lua +++ b/luarules/gadgets/unit_wanted_speed.lua @@ -3,6 +3,8 @@ if not Spring.GetModOptions().emprework then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Wanted Speed", diff --git a/luarules/gadgets/unit_water_depth_damage.lua b/luarules/gadgets/unit_water_depth_damage.lua index 150ef57e38f..649ec8e9e78 100644 --- a/luarules/gadgets/unit_water_depth_damage.lua +++ b/luarules/gadgets/unit_water_depth_damage.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Water Crush and Collision Damage", diff --git a/luarules/gadgets/unit_weapon_smart_select_helper.lua b/luarules/gadgets/unit_weapon_smart_select_helper.lua index d5890f573b5..41a638da559 100644 --- a/luarules/gadgets/unit_weapon_smart_select_helper.lua +++ b/luarules/gadgets/unit_weapon_smart_select_helper.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Weapon Smart Select", diff --git a/luarules/gadgets/unit_windmill_control.lua b/luarules/gadgets/unit_windmill_control.lua index 83951f67543..b611c1be3ab 100644 --- a/luarules/gadgets/unit_windmill_control.lua +++ b/luarules/gadgets/unit_windmill_control.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Windmill Control", diff --git a/luarules/gadgets/unit_workertime_boost.lua b/luarules/gadgets/unit_workertime_boost.lua index 81b07e74abe..33dbd73e2a5 100644 --- a/luarules/gadgets/unit_workertime_boost.lua +++ b/luarules/gadgets/unit_workertime_boost.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Workertime Multiplier Boost", diff --git a/luarules/gadgets/unit_xmas.lua b/luarules/gadgets/unit_xmas.lua index 1d78b15577a..fbe480994e0 100644 --- a/luarules/gadgets/unit_xmas.lua +++ b/luarules/gadgets/unit_xmas.lua @@ -2,6 +2,8 @@ if not Spring.GetModOptions().xmas then return end +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Xmas effects", diff --git a/luarules/gadgets/unit_xp_range_bonus.lua b/luarules/gadgets/unit_xp_range_bonus.lua index 4d3181f19c3..bd38102d0bb 100644 --- a/luarules/gadgets/unit_xp_range_bonus.lua +++ b/luarules/gadgets/unit_xp_range_bonus.lua @@ -1,3 +1,5 @@ +local gadget = gadget ---@type Gadget + function gadget:GetInfo() return { name = "Unit Range XP Update", From d9c79c2be38c64f6d665a750081c959a3de22e17 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Wed, 26 Mar 2025 13:23:17 +1100 Subject: [PATCH 03/11] Fix gadget global GG table --- types/gadget.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/gadget.lua b/types/gadget.lua index e16c286871c..52bf7a8b8dd 100644 --- a/types/gadget.lua +++ b/types/gadget.lua @@ -24,7 +24,6 @@ ---@see UnsyncedCallins ---@see Spring.IsSyncedCode --- ----@field GG table Shared table for gadgets. ---@field ghInfo FullGadgetInfo local Gadget = {} @@ -49,3 +48,6 @@ function Gadget:GetInfo() end ---@type Gadget ---@diagnostic disable-next-line: lowercase-global gadget = nil + +---Shared table for gadgets. +GG = {} \ No newline at end of file From ddf487be034fdcdd8955e29012ea9c7d47fcd13d Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Wed, 26 Mar 2025 14:53:17 +1100 Subject: [PATCH 04/11] Add gadget type --- types/addon.lua | 17 +++++++++++++++++ types/gadget.lua | 18 ++---------------- types/widget.lua | 23 +++++++++++++++++++++++ 3 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 types/addon.lua create mode 100644 types/widget.lua diff --git a/types/addon.lua b/types/addon.lua new file mode 100644 index 00000000000..ec5ea5736f3 --- /dev/null +++ b/types/addon.lua @@ -0,0 +1,17 @@ +---@meta + +---@class Addon +local Addon = {} + +---Get info about an addon. +---@return AddonInfo +function Addon:GetInfo() end + +---@class AddonInfo +---@field name string? +---@field desc string? +---@field author string? +---@field date string? +---@field license string? +---@field layer number? +---@field enabled boolean? diff --git a/types/gadget.lua b/types/gadget.lua index 52bf7a8b8dd..aa8c6bea9e4 100644 --- a/types/gadget.lua +++ b/types/gadget.lua @@ -1,6 +1,6 @@ ---@meta ----@class Gadget : Callins, UnsyncedCallins, SyncedCallins +---@class Gadget : Addon, Callins, UnsyncedCallins, SyncedCallins --- ---Gadgets can control game logic and receive synced and unsynced callins. --- @@ -27,24 +27,10 @@ ---@field ghInfo FullGadgetInfo local Gadget = {} ----@class GadgetInfo ----@field name string? ----@field desc string? ----@field author string? ----@field date string? ----@field license string? ----@field layer number? ----@field enabled boolean? - ----@class FullGadgetInfo : GadgetInfo +---@class FullGadgetInfo : AddonInfo ---@field filename string ---@field basename string - ----Get info about a gadget. ----@return GadgetInfo -function Gadget:GetInfo() end - ---@type Gadget ---@diagnostic disable-next-line: lowercase-global gadget = nil diff --git a/types/widget.lua b/types/widget.lua new file mode 100644 index 00000000000..4354cf94537 --- /dev/null +++ b/types/widget.lua @@ -0,0 +1,23 @@ +---@meta + +---@class Widget : Addon, Callins, UnsyncedCallins +--- +---Widgets cannot control game logic and receive only unsynced callins. +--- +---**Attention:** To prevent complaints from Lua Language Server, e.g. +--- +---> ```md +---> Duplicate field `CommandNotify` (duplicate-set-field) +---> ``` +--- +---Add this line at the top of your widget script: +--- +---```lua +---local widget = widget ---@type Widget +---``` +---@see Callins +---@see UnsyncedCallins + +---@type Widget +---@diagnostic disable-next-line: lowercase-global +widget = nil \ No newline at end of file From bdafb96325167fde8b41067677aa788282b3d857 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Wed, 26 Mar 2025 14:53:23 +1100 Subject: [PATCH 05/11] Exclude tests from luarc.json --- .luarc.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.luarc.json b/.luarc.json index a123f6e074d..361d748a20a 100644 --- a/.luarc.json +++ b/.luarc.json @@ -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" + ] + } } From 265fe3d30ce9242755cecc78aeba3f60635aef82 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Wed, 26 Mar 2025 14:59:26 +1100 Subject: [PATCH 06/11] Fix duplicate method definitions widgets --- luarules/gadgets/dev_replay_data.lua | 2 ++ luaui/RmlWidgets/rml_context_manager.lua | 2 ++ luaui/Widgets/__defs_write.lua | 2 ++ luaui/Widgets/ai_scav_blueprint_generator.lua | 2 ++ luaui/Widgets/api_blueprint.lua | 2 ++ luaui/Widgets/api_chili_draw_gl4.lua | 2 ++ luaui/Widgets/api_ignore.lua | 2 ++ luaui/Widgets/api_object_spotlight.lua | 2 ++ luaui/Widgets/api_resource_spot_builder.lua | 2 ++ luaui/Widgets/api_screencopy_manager.lua | 2 ++ luaui/Widgets/api_unit_tracker_gl4.lua | 2 ++ luaui/Widgets/api_unit_tracker_tester_gl4.lua | 2 ++ luaui/Widgets/camera_flip.lua | 2 ++ luaui/Widgets/camera_fov_changer.lua | 2 ++ luaui/Widgets/camera_joystick.lua | 2 ++ luaui/Widgets/camera_lockcamera.lua | 2 ++ luaui/Widgets/camera_middle_mouse_alternate.lua | 2 ++ luaui/Widgets/camera_player_tv.lua | 2 ++ luaui/Widgets/camera_remember_mode.lua | 2 ++ luaui/Widgets/camera_shake.lua | 2 ++ luaui/Widgets/cmd_area_mex.lua | 2 ++ luaui/Widgets/cmd_area_unload.lua | 2 ++ luaui/Widgets/cmd_attack_no_ally.lua | 2 ++ luaui/Widgets/cmd_autoquit.lua | 2 ++ luaui/Widgets/cmd_bar_hotkeys.lua | 2 ++ luaui/Widgets/cmd_blueprint.lua | 2 ++ luaui/Widgets/cmd_bomber_attack_building_ground.lua | 2 ++ luaui/Widgets/cmd_buildsplit.lua | 2 ++ luaui/Widgets/cmd_chainactions.lua | 2 ++ luaui/Widgets/cmd_commandinsert.lua | 2 ++ luaui/Widgets/cmd_commandq_manager.lua | 2 ++ luaui/Widgets/cmd_comselect.lua | 2 ++ luaui/Widgets/cmd_context_build.lua | 2 ++ luaui/Widgets/cmd_customformations2.lua | 2 ++ luaui/Widgets/cmd_default_set_target.lua | 2 ++ luaui/Widgets/cmd_dgun_no_ally.lua | 2 ++ luaui/Widgets/cmd_dgun_no_ground enemies.lua | 2 ++ luaui/Widgets/cmd_extractor_snap.lua | 2 ++ luaui/Widgets/cmd_fac_holdposition.lua | 2 ++ luaui/Widgets/cmd_factory_guard_pref.lua | 2 ++ luaui/Widgets/cmd_factory_repeat.lua | 2 ++ luaui/Widgets/cmd_factoryqmanager.lua | 2 ++ luaui/Widgets/cmd_gamespeed.lua | 2 ++ luaui/Widgets/cmd_guard_damaged_constructors.lua | 2 ++ luaui/Widgets/cmd_guard_remove.lua | 2 ++ luaui/Widgets/cmd_holdfire_fix.lua | 2 ++ luaui/Widgets/cmd_limit_build_spacing.lua | 2 ++ luaui/Widgets/cmd_line-build_hotkey_ignore.lua | 2 ++ luaui/Widgets/cmd_nanoturrets_assist_priority.lua | 2 ++ luaui/Widgets/cmd_no_duplicate_orders.lua | 2 ++ luaui/Widgets/cmd_onoff.lua | 2 ++ luaui/Widgets/cmd_persistent_build_spacing.lua | 2 ++ luaui/Widgets/cmd_quick_build_extractor.lua | 2 ++ luaui/Widgets/cmd_resolution_switcher.lua | 2 ++ luaui/Widgets/cmd_share_unit.lua | 2 ++ luaui/Widgets/cmd_state_remove.lua | 2 ++ luaui/Widgets/cmd_state_reverse_toggle.lua | 2 ++ luaui/Widgets/cmd_stop_selfd.lua | 2 ++ luaui/Widgets/cmd_take_proxy.lua | 2 ++ luaui/Widgets/cmd_transport_preserve_commands.lua | 2 ++ luaui/Widgets/cmd_uikeys_loader.lua | 2 ++ luaui/Widgets/cmd_unit_mover.lua | 2 ++ luaui/Widgets/cmd_unitgroup_clear_selection_on_empty.lua | 2 ++ luaui/Widgets/dbg_ceg_auto_reloader.lua | 2 ++ luaui/Widgets/dbg_deferred_buffer_visualizer.lua | 2 ++ luaui/Widgets/dbg_deferred_test.lua | 2 ++ luaui/Widgets/dbg_engine_shader_reload.lua | 2 ++ luaui/Widgets/dbg_ffa_startpoints_picker.lua | 2 ++ luaui/Widgets/dbg_frame_grapher.lua | 2 ++ luaui/Widgets/dbg_jitter_timer.lua | 2 ++ luaui/Widgets/dbg_mouse_to_mex_portable.lua | 2 ++ luaui/Widgets/dbg_profiler_histograms.lua | 2 ++ luaui/Widgets/dbg_quadtree_atlas_tester.lua | 2 ++ luaui/Widgets/dbg_reloadcob.lua | 2 ++ luaui/Widgets/dbg_startbox_editor.lua | 2 ++ luaui/Widgets/dbg_test_runner.lua | 2 ++ luaui/Widgets/dbg_test_runner_watchdog.lua | 2 ++ luaui/Widgets/dbg_unit_callins.lua | 2 ++ luaui/Widgets/dbg_unit_csv_export.lua | 2 ++ luaui/Widgets/dbg_widget_auto_reloader.lua | 2 ++ luaui/Widgets/dbg_widget_profiler.lua | 2 ++ luaui/Widgets/death_messages.lua | 2 ++ luaui/Widgets/dev_autocheat.lua | 2 ++ luaui/Widgets/export_defs.lua | 2 ++ luaui/Widgets/flowui_atlas_gl4.lua | 2 ++ luaui/Widgets/flowui_gl4.lua | 2 ++ luaui/Widgets/gfx_DrawUnitShape_GL4.lua | 2 ++ luaui/Widgets/gfx_HighlightUnit_GL4.lua | 2 ++ luaui/Widgets/gfx_airjets_gl4.lua | 2 ++ luaui/Widgets/gfx_bloom_shader_deferred.lua | 2 ++ luaui/Widgets/gfx_cas.lua | 2 ++ luaui/Widgets/gfx_darken_map.lua | 2 ++ luaui/Widgets/gfx_decals_gl4.lua | 2 ++ luaui/Widgets/gfx_deferred_rendering_GL4.lua | 2 ++ luaui/Widgets/gfx_dof.lua | 2 ++ luaui/Widgets/gfx_glass.lua | 2 ++ luaui/Widgets/gfx_guishader.lua | 2 ++ luaui/Widgets/gfx_highlight_commander_wrecks.lua | 2 ++ luaui/Widgets/gfx_limit_idle_fps.lua | 2 ++ luaui/Widgets/gfx_los_colors.lua | 2 ++ luaui/Widgets/gfx_los_view.lua | 2 ++ luaui/Widgets/gfx_lupsgl4_orbs.lua | 2 ++ luaui/Widgets/gfx_map_lights.lua | 2 ++ luaui/Widgets/gfx_norush_timer_gl4.lua | 2 ++ luaui/Widgets/gfx_paralyze_effect.lua | 2 ++ luaui/Widgets/gfx_sepia_tone.lua | 2 ++ luaui/Widgets/gfx_showbuilderqueue.lua | 2 ++ luaui/Widgets/gfx_snow.lua | 2 ++ luaui/Widgets/gfx_ssao.lua | 2 ++ luaui/Widgets/gfx_unit_stencil_gl4.lua | 2 ++ luaui/Widgets/gfx_volumetric_clouds.lua | 2 ++ luaui/Widgets/gui_advplayerslist.lua | 2 ++ luaui/Widgets/gui_advplayerslist_gameinfo.lua | 2 ++ luaui/Widgets/gui_advplayerslist_mascot.lua | 2 ++ luaui/Widgets/gui_advplayerslist_music_new.lua | 2 ++ luaui/Widgets/gui_advplayerslist_unittotals.lua | 2 ++ luaui/Widgets/gui_allySelectedUnits.lua | 2 ++ luaui/Widgets/gui_ally_cursors.lua | 2 ++ luaui/Widgets/gui_anti_ranges.lua | 2 ++ luaui/Widgets/gui_attack_aoe.lua | 2 ++ luaui/Widgets/gui_attackrange_gl4.lua | 2 ++ luaui/Widgets/gui_awards.lua | 2 ++ luaui/Widgets/gui_blast_radius.lua | 2 ++ luaui/Widgets/gui_build_eta.lua | 2 ++ luaui/Widgets/gui_buildbar.lua | 2 ++ luaui/Widgets/gui_building_grid_gl4.lua | 2 ++ luaui/Widgets/gui_buildmenu.lua | 2 ++ luaui/Widgets/gui_buildspacing.lua | 2 ++ luaui/Widgets/gui_cache_icons.lua | 2 ++ luaui/Widgets/gui_camera_anchors.lua | 2 ++ luaui/Widgets/gui_center_n_select.lua | 2 ++ luaui/Widgets/gui_changelog_info.lua | 2 ++ luaui/Widgets/gui_chat.lua | 2 ++ luaui/Widgets/gui_clearmapmarks.lua | 2 ++ luaui/Widgets/gui_com_nametags.lua | 2 ++ luaui/Widgets/gui_commanderhurt.lua | 2 ++ luaui/Widgets/gui_commands_fx.lua | 2 ++ luaui/Widgets/gui_controller_test.lua | 2 ++ luaui/Widgets/gui_converter_usage.lua | 2 ++ luaui/Widgets/gui_cursor.lua | 2 ++ luaui/Widgets/gui_defenserange.lua | 2 ++ luaui/Widgets/gui_defenserange_gl4.lua | 2 ++ luaui/Widgets/gui_easyFacing.lua | 2 ++ luaui/Widgets/gui_ecostats.lua | 2 ++ luaui/Widgets/gui_emp_decloak_range.lua | 2 ++ luaui/Widgets/gui_enemy_spotter.lua | 2 ++ luaui/Widgets/gui_factionpicker.lua | 2 ++ luaui/Widgets/gui_flanking_icons.lua | 2 ++ luaui/Widgets/gui_flowui.lua | 2 ++ luaui/Widgets/gui_fonthandler.lua | 2 ++ luaui/Widgets/gui_game_type_info.lua | 2 ++ luaui/Widgets/gui_gameinfo.lua | 2 ++ luaui/Widgets/gui_geothermalspots.lua | 2 ++ luaui/Widgets/gui_given_units.lua | 2 ++ luaui/Widgets/gui_gridmenu.lua | 2 ++ luaui/Widgets/gui_ground_ao_plates_features_gl4.lua | 2 ++ luaui/Widgets/gui_ground_ao_plates_gl4.lua | 2 ++ luaui/Widgets/gui_healthbars_gl4.lua | 2 ++ luaui/Widgets/gui_idle_builders.lua | 2 ++ luaui/Widgets/gui_info.lua | 2 ++ luaui/Widgets/gui_infolos.lua | 2 ++ luaui/Widgets/gui_keybind_info.lua | 2 ++ luaui/Widgets/gui_language.lua | 2 ++ luaui/Widgets/gui_mapinfo.lua | 2 ++ luaui/Widgets/gui_mapmarks_fx.lua | 2 ++ luaui/Widgets/gui_messages.lua | 2 ++ luaui/Widgets/gui_metalspots.lua | 2 ++ luaui/Widgets/gui_minimap.lua | 2 ++ luaui/Widgets/gui_mouse_fx.lua | 2 ++ luaui/Widgets/gui_options.lua | 2 ++ luaui/Widgets/gui_ordermenu.lua | 2 ++ luaui/Widgets/gui_overview_cam_tab_hold.lua | 2 ++ luaui/Widgets/gui_overview_keep_camera_position.lua | 2 ++ luaui/Widgets/gui_pausescreen.lua | 2 ++ luaui/Widgets/gui_point_tracker.lua | 2 ++ luaui/Widgets/gui_pregame_build.lua | 2 ++ luaui/Widgets/gui_pregameui.lua | 2 ++ luaui/Widgets/gui_pregameui_draft.lua | 2 ++ luaui/Widgets/gui_prospector.lua | 2 ++ luaui/Widgets/gui_rank_icons_gl4.lua | 2 ++ luaui/Widgets/gui_raptorStatsPanel.lua | 2 ++ luaui/Widgets/gui_reclaim_field_highlight.lua | 2 ++ luaui/Widgets/gui_reclaiminfo.lua | 2 ++ luaui/Widgets/gui_rejoinprogress.lua | 2 ++ luaui/Widgets/gui_replaybuttons.lua | 2 ++ luaui/Widgets/gui_resurrection_halos_gl4.lua | 2 ++ luaui/Widgets/gui_savegame.lua | 2 ++ luaui/Widgets/gui_scavStatsPanel.lua | 2 ++ luaui/Widgets/gui_scavenger_info.lua | 2 ++ luaui/Widgets/gui_screen_mode_info.lua | 2 ++ luaui/Widgets/gui_scrolldown_toggleoverview.lua | 2 ++ luaui/Widgets/gui_selectedunits_gl4.lua | 2 ++ luaui/Widgets/gui_selectionbox.lua | 2 ++ luaui/Widgets/gui_selfd_icons.lua | 2 ++ luaui/Widgets/gui_sensor_ranges_jammer.lua | 2 ++ luaui/Widgets/gui_sensor_ranges_los.lua | 2 ++ luaui/Widgets/gui_sensor_ranges_radar.lua | 2 ++ luaui/Widgets/gui_sensor_ranges_radar_preview.lua | 2 ++ luaui/Widgets/gui_sensor_ranges_sonar.lua | 2 ++ luaui/Widgets/gui_show_orders.lua | 2 ++ luaui/Widgets/gui_spec_next_alive_player.lua | 2 ++ luaui/Widgets/gui_spectate_selected.lua | 2 ++ luaui/Widgets/gui_spectatingstats.lua | 2 ++ luaui/Widgets/gui_spectator_hud.lua | 2 ++ luaui/Widgets/gui_team_platter.lua | 2 ++ luaui/Widgets/gui_teamstats.lua | 2 ++ luaui/Widgets/gui_tooltip.lua | 2 ++ luaui/Widgets/gui_top_bar.lua | 2 ++ luaui/Widgets/gui_transport_weight_limit.lua | 2 ++ luaui/Widgets/gui_turret_trans_range.lua | 2 ++ luaui/Widgets/gui_unit_energy_icons.lua | 2 ++ luaui/Widgets/gui_unit_group_number.lua | 2 ++ luaui/Widgets/gui_unit_idlebuilder_icons.lua | 2 ++ luaui/Widgets/gui_unit_market.lua | 2 ++ luaui/Widgets/gui_unit_stats.lua | 2 ++ luaui/Widgets/gui_unit_wait_icons.lua | 2 ++ luaui/Widgets/gui_unitgroups.lua | 2 ++ luaui/Widgets/gui_vote_interface.lua | 2 ++ luaui/Widgets/log_unitdefids.lua | 2 ++ luaui/Widgets/logo_adjuster.lua | 2 ++ luaui/Widgets/map_auto_mapmark_eraser.lua | 2 ++ luaui/Widgets/map_draw_blocker.lua | 2 ++ luaui/Widgets/map_edge_extension2.lua | 2 ++ luaui/Widgets/map_grass_gl4.lua | 2 ++ luaui/Widgets/map_lighting_adjuster.lua | 2 ++ luaui/Widgets/map_start_position_suggestions.lua | 2 ++ luaui/Widgets/map_startbox.lua | 2 ++ luaui/Widgets/map_startpolygon_gl4.lua | 2 ++ luaui/Widgets/minimap_relative.lua | 2 ++ luaui/Widgets/shard_help_draw.lua | 2 ++ luaui/Widgets/snd_mapmark_ping.lua | 2 ++ luaui/Widgets/snd_notifications.lua | 2 ++ luaui/Widgets/snd_unit_finished.lua | 2 ++ luaui/Widgets/snd_volume_osd.lua | 2 ++ luaui/Widgets/stats_damage.lua | 2 ++ luaui/Widgets/test_DPAT.lua | 2 ++ luaui/Widgets/test_dpat_minimal_example.lua | 2 ++ luaui/Widgets/tweakdefs_unit_translations.lua | 2 ++ luaui/Widgets/unit_attackMoveNotification.lua | 2 ++ luaui/Widgets/unit_auto_cloak.lua | 2 ++ luaui/Widgets/unit_auto_group.lua | 2 ++ luaui/Widgets/unit_autofirstbuildfacing.lua | 2 ++ luaui/Widgets/unit_builder_priority.lua | 2 ++ luaui/Widgets/unit_cloak_firestate.lua | 2 ++ luaui/Widgets/unit_default_spy_move_cloaked.lua | 2 ++ luaui/Widgets/unit_dgun_stall_assist.lua | 2 ++ luaui/Widgets/unit_factory_quota.lua | 2 ++ luaui/Widgets/unit_ghostradar_gl4.lua | 2 ++ luaui/Widgets/unit_ghostsite_gl4.lua | 2 ++ luaui/Widgets/unit_hold_position.lua | 2 ++ luaui/Widgets/unit_idle_guard.lua | 2 ++ luaui/Widgets/unit_immobile_builder.lua | 2 ++ luaui/Widgets/unit_key_select.lua | 2 ++ luaui/Widgets/unit_load_own_moving.lua | 2 ++ luaui/Widgets/unit_loop_select.lua | 2 ++ luaui/Widgets/unit_only_fighters_patrol.lua | 2 ++ luaui/Widgets/unit_set_fighters_fly.lua | 2 ++ luaui/Widgets/unit_set_target_by_type.lua | 2 ++ luaui/Widgets/unit_share_tracker.lua | 2 ++ luaui/Widgets/unit_smart_area_reclaim.lua | 2 ++ luaui/Widgets/unit_smart_select.lua | 2 ++ luaui/Widgets/unit_specific_unit_loader.lua | 2 ++ luaui/Widgets/unit_specific_unit_reclaimer.lua | 2 ++ luaui/Widgets/unit_stateprefs.lua | 2 ++ luaui/Widgets/unit_transport_ai.lua | 2 ++ luaui/Widgets/unit_waypoint_dragger_2.lua | 2 ++ luaui/Widgets/widget_selector.lua | 2 ++ 267 files changed, 534 insertions(+) diff --git a/luarules/gadgets/dev_replay_data.lua b/luarules/gadgets/dev_replay_data.lua index 67561147fff..532c5f89293 100644 --- a/luarules/gadgets/dev_replay_data.lua +++ b/luarules/gadgets/dev_replay_data.lua @@ -48,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", diff --git a/luaui/RmlWidgets/rml_context_manager.lua b/luaui/RmlWidgets/rml_context_manager.lua index de8346176b3..a71737ae9ab 100644 --- a/luaui/RmlWidgets/rml_context_manager.lua +++ b/luaui/RmlWidgets/rml_context_manager.lua @@ -2,6 +2,8 @@ if not RmlUi then return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Rml context manager", diff --git a/luaui/Widgets/__defs_write.lua b/luaui/Widgets/__defs_write.lua index d585dc06b55..dba5b168cc3 100644 --- a/luaui/Widgets/__defs_write.lua +++ b/luaui/Widgets/__defs_write.lua @@ -10,6 +10,8 @@ if customparamDefsDetected then local excludeScavengers = true + local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Write customparam.__def to files", diff --git a/luaui/Widgets/ai_scav_blueprint_generator.lua b/luaui/Widgets/ai_scav_blueprint_generator.lua index 3a5f38aad0d..8ce4b86b1be 100644 --- a/luaui/Widgets/ai_scav_blueprint_generator.lua +++ b/luaui/Widgets/ai_scav_blueprint_generator.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Scavenger Blueprint Generator", diff --git a/luaui/Widgets/api_blueprint.lua b/luaui/Widgets/api_blueprint.lua index 40bf6cfdf01..3ad461ce896 100644 --- a/luaui/Widgets/api_blueprint.lua +++ b/luaui/Widgets/api_blueprint.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Blueprint API", diff --git a/luaui/Widgets/api_chili_draw_gl4.lua b/luaui/Widgets/api_chili_draw_gl4.lua index 26456391581..92cbf199aa7 100644 --- a/luaui/Widgets/api_chili_draw_gl4.lua +++ b/luaui/Widgets/api_chili_draw_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Chili Draw GL4 API", diff --git a/luaui/Widgets/api_ignore.lua b/luaui/Widgets/api_ignore.lua index 0fcb7832557..74c64bc64bb 100644 --- a/luaui/Widgets/api_ignore.lua +++ b/luaui/Widgets/api_ignore.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Ignore List API", --version 4.1 diff --git a/luaui/Widgets/api_object_spotlight.lua b/luaui/Widgets/api_object_spotlight.lua index 5544dc0da83..d1a8e3b96ae 100644 --- a/luaui/Widgets/api_object_spotlight.lua +++ b/luaui/Widgets/api_object_spotlight.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Object Spotlight API", diff --git a/luaui/Widgets/api_resource_spot_builder.lua b/luaui/Widgets/api_resource_spot_builder.lua index 451fc383669..48be4d9dd92 100644 --- a/luaui/Widgets/api_resource_spot_builder.lua +++ b/luaui/Widgets/api_resource_spot_builder.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "API Resource Spot Builder (mex/geo)", diff --git a/luaui/Widgets/api_screencopy_manager.lua b/luaui/Widgets/api_screencopy_manager.lua index ec58dc532e3..77bc33f8123 100644 --- a/luaui/Widgets/api_screencopy_manager.lua +++ b/luaui/Widgets/api_screencopy_manager.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "API Screencopy Manager", diff --git a/luaui/Widgets/api_unit_tracker_gl4.lua b/luaui/Widgets/api_unit_tracker_gl4.lua index 44dd08bf586..f23b94b35a0 100644 --- a/luaui/Widgets/api_unit_tracker_gl4.lua +++ b/luaui/Widgets/api_unit_tracker_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "API Unit Tracker DEVMODE GL4", diff --git a/luaui/Widgets/api_unit_tracker_tester_gl4.lua b/luaui/Widgets/api_unit_tracker_tester_gl4.lua index 74ae6464210..0cf12e23565 100644 --- a/luaui/Widgets/api_unit_tracker_tester_gl4.lua +++ b/luaui/Widgets/api_unit_tracker_tester_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "API Unit Tracker Tester GL4", diff --git a/luaui/Widgets/camera_flip.lua b/luaui/Widgets/camera_flip.lua index 883c3c49af0..6f1f19745ff 100644 --- a/luaui/Widgets/camera_flip.lua +++ b/luaui/Widgets/camera_flip.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "CameraFlip", diff --git a/luaui/Widgets/camera_fov_changer.lua b/luaui/Widgets/camera_fov_changer.lua index d1856c807b8..e5db39fd254 100644 --- a/luaui/Widgets/camera_fov_changer.lua +++ b/luaui/Widgets/camera_fov_changer.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "FOV changer", diff --git a/luaui/Widgets/camera_joystick.lua b/luaui/Widgets/camera_joystick.lua index b1118968081..ba8d14b5c81 100644 --- a/luaui/Widgets/camera_joystick.lua +++ b/luaui/Widgets/camera_joystick.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Camera Joystick", diff --git a/luaui/Widgets/camera_lockcamera.lua b/luaui/Widgets/camera_lockcamera.lua index b9c03f51f98..79dfa36bf42 100644 --- a/luaui/Widgets/camera_lockcamera.lua +++ b/luaui/Widgets/camera_lockcamera.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Lockcamera", diff --git a/luaui/Widgets/camera_middle_mouse_alternate.lua b/luaui/Widgets/camera_middle_mouse_alternate.lua index 8251f2a7472..d1964fd5278 100644 --- a/luaui/Widgets/camera_middle_mouse_alternate.lua +++ b/luaui/Widgets/camera_middle_mouse_alternate.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Middle Mouse SmoothScroll", diff --git a/luaui/Widgets/camera_player_tv.lua b/luaui/Widgets/camera_player_tv.lua index 2b56cb86402..386cc24a017 100644 --- a/luaui/Widgets/camera_player_tv.lua +++ b/luaui/Widgets/camera_player_tv.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Player-TV", diff --git a/luaui/Widgets/camera_remember_mode.lua b/luaui/Widgets/camera_remember_mode.lua index aa920adafa2..af9171ac49c 100644 --- a/luaui/Widgets/camera_remember_mode.lua +++ b/luaui/Widgets/camera_remember_mode.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Camera Remember", diff --git a/luaui/Widgets/camera_shake.lua b/luaui/Widgets/camera_shake.lua index 9c0dfcd95fa..c8adc85930b 100644 --- a/luaui/Widgets/camera_shake.lua +++ b/luaui/Widgets/camera_shake.lua @@ -11,6 +11,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "CameraShake", diff --git a/luaui/Widgets/cmd_area_mex.lua b/luaui/Widgets/cmd_area_mex.lua index 87fe07f71d4..e6ebb990aae 100644 --- a/luaui/Widgets/cmd_area_mex.lua +++ b/luaui/Widgets/cmd_area_mex.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Area Mex", diff --git a/luaui/Widgets/cmd_area_unload.lua b/luaui/Widgets/cmd_area_unload.lua index 01ee2f0eefe..ed1090530cf 100644 --- a/luaui/Widgets/cmd_area_unload.lua +++ b/luaui/Widgets/cmd_area_unload.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Area unload", diff --git a/luaui/Widgets/cmd_attack_no_ally.lua b/luaui/Widgets/cmd_attack_no_ally.lua index 010df87eec9..50678ddfd7d 100644 --- a/luaui/Widgets/cmd_attack_no_ally.lua +++ b/luaui/Widgets/cmd_attack_no_ally.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Attack no ally", diff --git a/luaui/Widgets/cmd_autoquit.lua b/luaui/Widgets/cmd_autoquit.lua index b5f0a2d754a..ebdd460219a 100644 --- a/luaui/Widgets/cmd_autoquit.lua +++ b/luaui/Widgets/cmd_autoquit.lua @@ -22,6 +22,8 @@ local GetMouseState = Spring.GetMouseState -- callins ---------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Autoquit", diff --git a/luaui/Widgets/cmd_bar_hotkeys.lua b/luaui/Widgets/cmd_bar_hotkeys.lua index dd2bc38bb7b..8e92363a4d1 100644 --- a/luaui/Widgets/cmd_bar_hotkeys.lua +++ b/luaui/Widgets/cmd_bar_hotkeys.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "BAR Hotkeys", diff --git a/luaui/Widgets/cmd_blueprint.lua b/luaui/Widgets/cmd_blueprint.lua index 7f4d4bace8d..677457c3bbf 100644 --- a/luaui/Widgets/cmd_blueprint.lua +++ b/luaui/Widgets/cmd_blueprint.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Blueprint", diff --git a/luaui/Widgets/cmd_bomber_attack_building_ground.lua b/luaui/Widgets/cmd_bomber_attack_building_ground.lua index 63fa882118c..afdb880cf66 100644 --- a/luaui/Widgets/cmd_bomber_attack_building_ground.lua +++ b/luaui/Widgets/cmd_bomber_attack_building_ground.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Bomber Attack Building Ground", diff --git a/luaui/Widgets/cmd_buildsplit.lua b/luaui/Widgets/cmd_buildsplit.lua index 4f18d196fac..c2f4269a983 100644 --- a/luaui/Widgets/cmd_buildsplit.lua +++ b/luaui/Widgets/cmd_buildsplit.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Build Split", diff --git a/luaui/Widgets/cmd_chainactions.lua b/luaui/Widgets/cmd_chainactions.lua index ee45e91d50c..fdc1069bbbb 100644 --- a/luaui/Widgets/cmd_chainactions.lua +++ b/luaui/Widgets/cmd_chainactions.lua @@ -18,6 +18,8 @@ -- -- bind u chain force select PrevSelection++_ClearSelection_SelectOne+ | group unset -- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Chain Actions", diff --git a/luaui/Widgets/cmd_commandinsert.lua b/luaui/Widgets/cmd_commandinsert.lua index 5a1082226b5..a993e1e3290 100644 --- a/luaui/Widgets/cmd_commandinsert.lua +++ b/luaui/Widgets/cmd_commandinsert.lua @@ -1,6 +1,8 @@ ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "CommandInsert", diff --git a/luaui/Widgets/cmd_commandq_manager.lua b/luaui/Widgets/cmd_commandq_manager.lua index c7dfdd02760..d2bc9f1d92f 100644 --- a/luaui/Widgets/cmd_commandq_manager.lua +++ b/luaui/Widgets/cmd_commandq_manager.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Command Queue Manager", diff --git a/luaui/Widgets/cmd_comselect.lua b/luaui/Widgets/cmd_comselect.lua index b229098068a..2af4b0729c8 100644 --- a/luaui/Widgets/cmd_comselect.lua +++ b/luaui/Widgets/cmd_comselect.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Commander Selector", diff --git a/luaui/Widgets/cmd_context_build.lua b/luaui/Widgets/cmd_context_build.lua index c7cf8afb081..2a9a19bc583 100644 --- a/luaui/Widgets/cmd_context_build.lua +++ b/luaui/Widgets/cmd_context_build.lua @@ -8,6 +8,8 @@ if success and mapinfo then voidWater = mapinfo.voidwater end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Context Build", diff --git a/luaui/Widgets/cmd_customformations2.lua b/luaui/Widgets/cmd_customformations2.lua index aa952d93359..351a677f8f1 100644 --- a/luaui/Widgets/cmd_customformations2.lua +++ b/luaui/Widgets/cmd_customformations2.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "CustomFormations2", diff --git a/luaui/Widgets/cmd_default_set_target.lua b/luaui/Widgets/cmd_default_set_target.lua index e7f11a89a93..1f4a297dcc5 100644 --- a/luaui/Widgets/cmd_default_set_target.lua +++ b/luaui/Widgets/cmd_default_set_target.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Set target default", diff --git a/luaui/Widgets/cmd_dgun_no_ally.lua b/luaui/Widgets/cmd_dgun_no_ally.lua index e5a5a5b96d4..14e204d6263 100644 --- a/luaui/Widgets/cmd_dgun_no_ally.lua +++ b/luaui/Widgets/cmd_dgun_no_ally.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "DGun no ally", diff --git a/luaui/Widgets/cmd_dgun_no_ground enemies.lua b/luaui/Widgets/cmd_dgun_no_ground enemies.lua index 2d51d213e16..8344d901d44 100644 --- a/luaui/Widgets/cmd_dgun_no_ground enemies.lua +++ b/luaui/Widgets/cmd_dgun_no_ground enemies.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "DGun no ground enemies", diff --git a/luaui/Widgets/cmd_extractor_snap.lua b/luaui/Widgets/cmd_extractor_snap.lua index ec19f1a755d..5183d8615b7 100644 --- a/luaui/Widgets/cmd_extractor_snap.lua +++ b/luaui/Widgets/cmd_extractor_snap.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Extractor Snap (mex/geo)", diff --git a/luaui/Widgets/cmd_fac_holdposition.lua b/luaui/Widgets/cmd_fac_holdposition.lua index 7e0208628bf..b9803a595a2 100644 --- a/luaui/Widgets/cmd_fac_holdposition.lua +++ b/luaui/Widgets/cmd_fac_holdposition.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Factory hold position", diff --git a/luaui/Widgets/cmd_factory_guard_pref.lua b/luaui/Widgets/cmd_factory_guard_pref.lua index 51972fad98b..7fa99c3132d 100644 --- a/luaui/Widgets/cmd_factory_guard_pref.lua +++ b/luaui/Widgets/cmd_factory_guard_pref.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Factory Guard Default On", diff --git a/luaui/Widgets/cmd_factory_repeat.lua b/luaui/Widgets/cmd_factory_repeat.lua index 307efed0844..72f2d7082ca 100644 --- a/luaui/Widgets/cmd_factory_repeat.lua +++ b/luaui/Widgets/cmd_factory_repeat.lua @@ -11,6 +11,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Factory Auto-Repeat", diff --git a/luaui/Widgets/cmd_factoryqmanager.lua b/luaui/Widgets/cmd_factoryqmanager.lua index 12da5d6388e..503f9f5a9b5 100644 --- a/luaui/Widgets/cmd_factoryqmanager.lua +++ b/luaui/Widgets/cmd_factoryqmanager.lua @@ -1,6 +1,8 @@ include("keysym.h.lua") local versionNumber = 1.4 +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "FactoryQ Manager", diff --git a/luaui/Widgets/cmd_gamespeed.lua b/luaui/Widgets/cmd_gamespeed.lua index 628cbc742e6..e4310b0cce4 100644 --- a/luaui/Widgets/cmd_gamespeed.lua +++ b/luaui/Widgets/cmd_gamespeed.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Game Speed", diff --git a/luaui/Widgets/cmd_guard_damaged_constructors.lua b/luaui/Widgets/cmd_guard_damaged_constructors.lua index 0c1ebd29f1d..81809fbdd37 100644 --- a/luaui/Widgets/cmd_guard_damaged_constructors.lua +++ b/luaui/Widgets/cmd_guard_damaged_constructors.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Guard damaged constructors", diff --git a/luaui/Widgets/cmd_guard_remove.lua b/luaui/Widgets/cmd_guard_remove.lua index 057a6218039..c0137095e67 100644 --- a/luaui/Widgets/cmd_guard_remove.lua +++ b/luaui/Widgets/cmd_guard_remove.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Guard Remove", diff --git a/luaui/Widgets/cmd_holdfire_fix.lua b/luaui/Widgets/cmd_holdfire_fix.lua index db7a15a2dc8..7e8cfa9dc8c 100644 --- a/luaui/Widgets/cmd_holdfire_fix.lua +++ b/luaui/Widgets/cmd_holdfire_fix.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Holdfire Fix", diff --git a/luaui/Widgets/cmd_limit_build_spacing.lua b/luaui/Widgets/cmd_limit_build_spacing.lua index 5a36d4cb861..9d5df003903 100644 --- a/luaui/Widgets/cmd_limit_build_spacing.lua +++ b/luaui/Widgets/cmd_limit_build_spacing.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Limit Build Spacing", diff --git a/luaui/Widgets/cmd_line-build_hotkey_ignore.lua b/luaui/Widgets/cmd_line-build_hotkey_ignore.lua index 9e484323082..9f00d0727c1 100644 --- a/luaui/Widgets/cmd_line-build_hotkey_ignore.lua +++ b/luaui/Widgets/cmd_line-build_hotkey_ignore.lua @@ -1,5 +1,7 @@ include("keysym.h.lua") +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Line-Build Hotkey Ignore", diff --git a/luaui/Widgets/cmd_nanoturrets_assist_priority.lua b/luaui/Widgets/cmd_nanoturrets_assist_priority.lua index a2f9ca05b64..45c4b86b2cc 100644 --- a/luaui/Widgets/cmd_nanoturrets_assist_priority.lua +++ b/luaui/Widgets/cmd_nanoturrets_assist_priority.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Priority Construction Turrets", diff --git a/luaui/Widgets/cmd_no_duplicate_orders.lua b/luaui/Widgets/cmd_no_duplicate_orders.lua index db38a14135a..160712bc315 100644 --- a/luaui/Widgets/cmd_no_duplicate_orders.lua +++ b/luaui/Widgets/cmd_no_duplicate_orders.lua @@ -11,6 +11,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "NoDuplicateOrders", diff --git a/luaui/Widgets/cmd_onoff.lua b/luaui/Widgets/cmd_onoff.lua index c417f275c42..0f4c0a30f0e 100644 --- a/luaui/Widgets/cmd_onoff.lua +++ b/luaui/Widgets/cmd_onoff.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Onoff for Hound and trajectory", diff --git a/luaui/Widgets/cmd_persistent_build_spacing.lua b/luaui/Widgets/cmd_persistent_build_spacing.lua index 557c82930c0..b8b95166538 100644 --- a/luaui/Widgets/cmd_persistent_build_spacing.lua +++ b/luaui/Widgets/cmd_persistent_build_spacing.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Persistent Build Spacing", diff --git a/luaui/Widgets/cmd_quick_build_extractor.lua b/luaui/Widgets/cmd_quick_build_extractor.lua index 68682d062bb..8eb03932452 100644 --- a/luaui/Widgets/cmd_quick_build_extractor.lua +++ b/luaui/Widgets/cmd_quick_build_extractor.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Quick Build (mex/geo)", diff --git a/luaui/Widgets/cmd_resolution_switcher.lua b/luaui/Widgets/cmd_resolution_switcher.lua index f5792281802..e6cba070ec6 100644 --- a/luaui/Widgets/cmd_resolution_switcher.lua +++ b/luaui/Widgets/cmd_resolution_switcher.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Screen Mode/Resolution Switcher", diff --git a/luaui/Widgets/cmd_share_unit.lua b/luaui/Widgets/cmd_share_unit.lua index 85175c22619..e4eb80cce0a 100644 --- a/luaui/Widgets/cmd_share_unit.lua +++ b/luaui/Widgets/cmd_share_unit.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Share Unit Command", diff --git a/luaui/Widgets/cmd_state_remove.lua b/luaui/Widgets/cmd_state_remove.lua index 68eb29cf02c..06477e90b97 100644 --- a/luaui/Widgets/cmd_state_remove.lua +++ b/luaui/Widgets/cmd_state_remove.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "State Remover", diff --git a/luaui/Widgets/cmd_state_reverse_toggle.lua b/luaui/Widgets/cmd_state_reverse_toggle.lua index 93c4e20c8a3..8626f4fc951 100644 --- a/luaui/Widgets/cmd_state_reverse_toggle.lua +++ b/luaui/Widgets/cmd_state_reverse_toggle.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "State Reverse Toggle", diff --git a/luaui/Widgets/cmd_stop_selfd.lua b/luaui/Widgets/cmd_stop_selfd.lua index 55d20585845..4c892ad615a 100644 --- a/luaui/Widgets/cmd_stop_selfd.lua +++ b/luaui/Widgets/cmd_stop_selfd.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Stop means Stop", diff --git a/luaui/Widgets/cmd_take_proxy.lua b/luaui/Widgets/cmd_take_proxy.lua index 594ac16dd82..95ad58a6c04 100644 --- a/luaui/Widgets/cmd_take_proxy.lua +++ b/luaui/Widgets/cmd_take_proxy.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Take Proxy", diff --git a/luaui/Widgets/cmd_transport_preserve_commands.lua b/luaui/Widgets/cmd_transport_preserve_commands.lua index 9066bb2b3db..bf34020333d 100644 --- a/luaui/Widgets/cmd_transport_preserve_commands.lua +++ b/luaui/Widgets/cmd_transport_preserve_commands.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Preserve Commands", diff --git a/luaui/Widgets/cmd_uikeys_loader.lua b/luaui/Widgets/cmd_uikeys_loader.lua index f0ca5b07631..5715d2ccd39 100644 --- a/luaui/Widgets/cmd_uikeys_loader.lua +++ b/luaui/Widgets/cmd_uikeys_loader.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Lua UiKeys loader", diff --git a/luaui/Widgets/cmd_unit_mover.lua b/luaui/Widgets/cmd_unit_mover.lua index 399dd388664..47e4362e5b7 100644 --- a/luaui/Widgets/cmd_unit_mover.lua +++ b/luaui/Widgets/cmd_unit_mover.lua @@ -11,6 +11,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Mover", diff --git a/luaui/Widgets/cmd_unitgroup_clear_selection_on_empty.lua b/luaui/Widgets/cmd_unitgroup_clear_selection_on_empty.lua index 07b483e6d1e..fbf8b2524fb 100644 --- a/luaui/Widgets/cmd_unitgroup_clear_selection_on_empty.lua +++ b/luaui/Widgets/cmd_unitgroup_clear_selection_on_empty.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Groups - Clear selection on empty", diff --git a/luaui/Widgets/dbg_ceg_auto_reloader.lua b/luaui/Widgets/dbg_ceg_auto_reloader.lua index 171f33fd87a..c45c21f3478 100644 --- a/luaui/Widgets/dbg_ceg_auto_reloader.lua +++ b/luaui/Widgets/dbg_ceg_auto_reloader.lua @@ -2,6 +2,8 @@ if not Spring.Utilities.IsDevMode() then -- and not Spring.Utilities.ShowDevUI() return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "CEG Auto Reloader", diff --git a/luaui/Widgets/dbg_deferred_buffer_visualizer.lua b/luaui/Widgets/dbg_deferred_buffer_visualizer.lua index 67a68eca0fd..09cae1b9422 100644 --- a/luaui/Widgets/dbg_deferred_buffer_visualizer.lua +++ b/luaui/Widgets/dbg_deferred_buffer_visualizer.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Deferred Buffer visualizer", diff --git a/luaui/Widgets/dbg_deferred_test.lua b/luaui/Widgets/dbg_deferred_test.lua index e05dd5fc095..4a40af1799b 100644 --- a/luaui/Widgets/dbg_deferred_test.lua +++ b/luaui/Widgets/dbg_deferred_test.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Deferred shading test", diff --git a/luaui/Widgets/dbg_engine_shader_reload.lua b/luaui/Widgets/dbg_engine_shader_reload.lua index e186aafdbc1..def406a27f4 100644 --- a/luaui/Widgets/dbg_engine_shader_reload.lua +++ b/luaui/Widgets/dbg_engine_shader_reload.lua @@ -2,6 +2,8 @@ if not Spring.Utilities.IsDevMode() then -- and not Spring.Utilities.ShowDevUI() return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Engine Shader Auto Reloader", diff --git a/luaui/Widgets/dbg_ffa_startpoints_picker.lua b/luaui/Widgets/dbg_ffa_startpoints_picker.lua index 0dc427d63e7..9e4dc380459 100644 --- a/luaui/Widgets/dbg_ffa_startpoints_picker.lua +++ b/luaui/Widgets/dbg_ffa_startpoints_picker.lua @@ -10,6 +10,8 @@ situation, including replays and singleplayer games where the player is alone but there are AIs. ]] +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "FFA start points picker", diff --git a/luaui/Widgets/dbg_frame_grapher.lua b/luaui/Widgets/dbg_frame_grapher.lua index 5f05485c608..c6c2b3b51df 100644 --- a/luaui/Widgets/dbg_frame_grapher.lua +++ b/luaui/Widgets/dbg_frame_grapher.lua @@ -5,6 +5,8 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Frame Grapher", diff --git a/luaui/Widgets/dbg_jitter_timer.lua b/luaui/Widgets/dbg_jitter_timer.lua index 8f7bece1ba9..167d75b4fe0 100644 --- a/luaui/Widgets/dbg_jitter_timer.lua +++ b/luaui/Widgets/dbg_jitter_timer.lua @@ -1,5 +1,7 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Jitter Timer", diff --git a/luaui/Widgets/dbg_mouse_to_mex_portable.lua b/luaui/Widgets/dbg_mouse_to_mex_portable.lua index b71512c44fa..62b57643e5c 100644 --- a/luaui/Widgets/dbg_mouse_to_mex_portable.lua +++ b/luaui/Widgets/dbg_mouse_to_mex_portable.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Mouse to Mexes", diff --git a/luaui/Widgets/dbg_profiler_histograms.lua b/luaui/Widgets/dbg_profiler_histograms.lua index a813a884f44..40768395c7e 100644 --- a/luaui/Widgets/dbg_profiler_histograms.lua +++ b/luaui/Widgets/dbg_profiler_histograms.lua @@ -3,6 +3,8 @@ -- reading on LuaVBO: https://github.com/beyond-all-reason/spring/blob/BAR/rts/Lua/LuaVBOImpl.cpp -- Quick video on what VAO/VBO are: https://www.youtube.com/watch?v=WMiggUPst-Q +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Profiler Histograms", diff --git a/luaui/Widgets/dbg_quadtree_atlas_tester.lua b/luaui/Widgets/dbg_quadtree_atlas_tester.lua index 20a46ff59f0..df3950e689c 100644 --- a/luaui/Widgets/dbg_quadtree_atlas_tester.lua +++ b/luaui/Widgets/dbg_quadtree_atlas_tester.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "AtlasOnDemand Tester", diff --git a/luaui/Widgets/dbg_reloadcob.lua b/luaui/Widgets/dbg_reloadcob.lua index 3d3797b1251..248f5fa714c 100644 --- a/luaui/Widgets/dbg_reloadcob.lua +++ b/luaui/Widgets/dbg_reloadcob.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "ReloadCob", diff --git a/luaui/Widgets/dbg_startbox_editor.lua b/luaui/Widgets/dbg_startbox_editor.lua index 2f445248977..8db328cce83 100644 --- a/luaui/Widgets/dbg_startbox_editor.lua +++ b/luaui/Widgets/dbg_startbox_editor.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Startbox Editor", diff --git a/luaui/Widgets/dbg_test_runner.lua b/luaui/Widgets/dbg_test_runner.lua index 5ac9ec8aa4e..2897f518d83 100644 --- a/luaui/Widgets/dbg_test_runner.lua +++ b/luaui/Widgets/dbg_test_runner.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Test Runner", diff --git a/luaui/Widgets/dbg_test_runner_watchdog.lua b/luaui/Widgets/dbg_test_runner_watchdog.lua index 00b676ede84..7aeeb3835a2 100644 --- a/luaui/Widgets/dbg_test_runner_watchdog.lua +++ b/luaui/Widgets/dbg_test_runner_watchdog.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Test Runner Watchdog", diff --git a/luaui/Widgets/dbg_unit_callins.lua b/luaui/Widgets/dbg_unit_callins.lua index 837541f501c..1fe70c37e02 100644 --- a/luaui/Widgets/dbg_unit_callins.lua +++ b/luaui/Widgets/dbg_unit_callins.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "UnitCallinsWidget", diff --git a/luaui/Widgets/dbg_unit_csv_export.lua b/luaui/Widgets/dbg_unit_csv_export.lua index e6a770ad9a6..f164751cbe9 100644 --- a/luaui/Widgets/dbg_unit_csv_export.lua +++ b/luaui/Widgets/dbg_unit_csv_export.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit CSV Export", diff --git a/luaui/Widgets/dbg_widget_auto_reloader.lua b/luaui/Widgets/dbg_widget_auto_reloader.lua index f4e729e7163..81f0a676f29 100644 --- a/luaui/Widgets/dbg_widget_auto_reloader.lua +++ b/luaui/Widgets/dbg_widget_auto_reloader.lua @@ -2,6 +2,8 @@ if not Spring.Utilities.IsDevMode() then -- and not Spring.Utilities.ShowDevUI() return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Widget Auto Reloader", diff --git a/luaui/Widgets/dbg_widget_profiler.lua b/luaui/Widgets/dbg_widget_profiler.lua index a7088c42eff..1222135cf34 100644 --- a/luaui/Widgets/dbg_widget_profiler.lua +++ b/luaui/Widgets/dbg_widget_profiler.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Widget Profiler", diff --git a/luaui/Widgets/death_messages.lua b/luaui/Widgets/death_messages.lua index bb40beefe9b..d57f48f67d5 100644 --- a/luaui/Widgets/death_messages.lua +++ b/luaui/Widgets/death_messages.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Death Messages", diff --git a/luaui/Widgets/dev_autocheat.lua b/luaui/Widgets/dev_autocheat.lua index e57bd1de87b..8529f608ed2 100644 --- a/luaui/Widgets/dev_autocheat.lua +++ b/luaui/Widgets/dev_autocheat.lua @@ -2,6 +2,8 @@ if not Spring.Utilities.IsDevMode() then return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Dev Auto cheat", diff --git a/luaui/Widgets/export_defs.lua b/luaui/Widgets/export_defs.lua index 3a20d33c2ff..45edc7d0595 100644 --- a/luaui/Widgets/export_defs.lua +++ b/luaui/Widgets/export_defs.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unitdefs JSON Export", diff --git a/luaui/Widgets/flowui_atlas_gl4.lua b/luaui/Widgets/flowui_atlas_gl4.lua index bdb98255c21..b2465651c0c 100644 --- a/luaui/Widgets/flowui_atlas_gl4.lua +++ b/luaui/Widgets/flowui_atlas_gl4.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = 'FlowUI GL4 Atlas', diff --git a/luaui/Widgets/flowui_gl4.lua b/luaui/Widgets/flowui_gl4.lua index 17b1c96d358..58792ff5a78 100644 --- a/luaui/Widgets/flowui_gl4.lua +++ b/luaui/Widgets/flowui_gl4.lua @@ -1,5 +1,7 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = 'FlowUI GL4 Tester', diff --git a/luaui/Widgets/gfx_DrawUnitShape_GL4.lua b/luaui/Widgets/gfx_DrawUnitShape_GL4.lua index a01b5f54ac2..919db5f3f9c 100644 --- a/luaui/Widgets/gfx_DrawUnitShape_GL4.lua +++ b/luaui/Widgets/gfx_DrawUnitShape_GL4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "DrawUnitShape GL4", diff --git a/luaui/Widgets/gfx_HighlightUnit_GL4.lua b/luaui/Widgets/gfx_HighlightUnit_GL4.lua index e2598a5c37d..228002c3d1a 100644 --- a/luaui/Widgets/gfx_HighlightUnit_GL4.lua +++ b/luaui/Widgets/gfx_HighlightUnit_GL4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "HighlightUnit API GL4", diff --git a/luaui/Widgets/gfx_airjets_gl4.lua b/luaui/Widgets/gfx_airjets_gl4.lua index 2725148a832..35ef66d4b47 100644 --- a/luaui/Widgets/gfx_airjets_gl4.lua +++ b/luaui/Widgets/gfx_airjets_gl4.lua @@ -3,6 +3,8 @@ --https://gist.github.com/lhog/77f3fb10fed0c4e054b6c67eb24efeed#file-test_unitshape_instancing-lua-L177-L178 --------------------------------------------OLD AIRJETS--------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Airjets GL4", diff --git a/luaui/Widgets/gfx_bloom_shader_deferred.lua b/luaui/Widgets/gfx_bloom_shader_deferred.lua index c04dd0c932e..46ebb68b807 100644 --- a/luaui/Widgets/gfx_bloom_shader_deferred.lua +++ b/luaui/Widgets/gfx_bloom_shader_deferred.lua @@ -7,6 +7,8 @@ if gpuMem and gpuMem > 0 and gpuMem < 1800 then isPotatoGpu = true end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Bloom Shader Deferred", --(v0.5) diff --git a/luaui/Widgets/gfx_cas.lua b/luaui/Widgets/gfx_cas.lua index c63247a7286..09367a591aa 100644 --- a/luaui/Widgets/gfx_cas.lua +++ b/luaui/Widgets/gfx_cas.lua @@ -2,6 +2,8 @@ if gl.CreateShader == nil then return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Contrast Adaptive Sharpen", diff --git a/luaui/Widgets/gfx_darken_map.lua b/luaui/Widgets/gfx_darken_map.lua index 503a0af99db..857a6eb3c7e 100644 --- a/luaui/Widgets/gfx_darken_map.lua +++ b/luaui/Widgets/gfx_darken_map.lua @@ -2,6 +2,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Darken map", diff --git a/luaui/Widgets/gfx_decals_gl4.lua b/luaui/Widgets/gfx_decals_gl4.lua index 7d08fc4ab14..5a4c48ff338 100644 --- a/luaui/Widgets/gfx_decals_gl4.lua +++ b/luaui/Widgets/gfx_decals_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Decals GL4", diff --git a/luaui/Widgets/gfx_deferred_rendering_GL4.lua b/luaui/Widgets/gfx_deferred_rendering_GL4.lua index efaabe16178..e3efe2f1376 100644 --- a/luaui/Widgets/gfx_deferred_rendering_GL4.lua +++ b/luaui/Widgets/gfx_deferred_rendering_GL4.lua @@ -1,5 +1,7 @@ -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Deferred rendering GL4", diff --git a/luaui/Widgets/gfx_dof.lua b/luaui/Widgets/gfx_dof.lua index 071e4c50259..4dfcfb0caa4 100644 --- a/luaui/Widgets/gfx_dof.lua +++ b/luaui/Widgets/gfx_dof.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Depth of Field", diff --git a/luaui/Widgets/gfx_glass.lua b/luaui/Widgets/gfx_glass.lua index b7a24ac0a76..7f739dfa9ab 100644 --- a/luaui/Widgets/gfx_glass.lua +++ b/luaui/Widgets/gfx_glass.lua @@ -2,6 +2,8 @@ if gl.CreateShader == nil or Spring.GetSpectatingState() then return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Stained Glass", diff --git a/luaui/Widgets/gfx_guishader.lua b/luaui/Widgets/gfx_guishader.lua index 10de2a9c0d1..79d9c05043c 100644 --- a/luaui/Widgets/gfx_guishader.lua +++ b/luaui/Widgets/gfx_guishader.lua @@ -3,6 +3,8 @@ if Platform ~= nil and Platform.gpuVendor == 'Intel' then return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "GUI Shader", diff --git a/luaui/Widgets/gfx_highlight_commander_wrecks.lua b/luaui/Widgets/gfx_highlight_commander_wrecks.lua index 16df75647e5..ab8caa5f831 100644 --- a/luaui/Widgets/gfx_highlight_commander_wrecks.lua +++ b/luaui/Widgets/gfx_highlight_commander_wrecks.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Highlight Commander Wrecks", diff --git a/luaui/Widgets/gfx_limit_idle_fps.lua b/luaui/Widgets/gfx_limit_idle_fps.lua index b545a6b63dc..9381f9cda1c 100644 --- a/luaui/Widgets/gfx_limit_idle_fps.lua +++ b/luaui/Widgets/gfx_limit_idle_fps.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Limit idle FPS", diff --git a/luaui/Widgets/gfx_los_colors.lua b/luaui/Widgets/gfx_los_colors.lua index e8ec1add9b6..3d44fff2377 100644 --- a/luaui/Widgets/gfx_los_colors.lua +++ b/luaui/Widgets/gfx_los_colors.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "LOS colors", diff --git a/luaui/Widgets/gfx_los_view.lua b/luaui/Widgets/gfx_los_view.lua index 27976b2c01d..8cf6735d0e4 100644 --- a/luaui/Widgets/gfx_los_view.lua +++ b/luaui/Widgets/gfx_los_view.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "LOS View", diff --git a/luaui/Widgets/gfx_lupsgl4_orbs.lua b/luaui/Widgets/gfx_lupsgl4_orbs.lua index 2fb3fa62a0c..6146f9284da 100644 --- a/luaui/Widgets/gfx_lupsgl4_orbs.lua +++ b/luaui/Widgets/gfx_lupsgl4_orbs.lua @@ -1,4 +1,6 @@ -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "LUPS Orb GL4", diff --git a/luaui/Widgets/gfx_map_lights.lua b/luaui/Widgets/gfx_map_lights.lua index 4387b60caaa..bf8eb6f5301 100644 --- a/luaui/Widgets/gfx_map_lights.lua +++ b/luaui/Widgets/gfx_map_lights.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "MapLights", diff --git a/luaui/Widgets/gfx_norush_timer_gl4.lua b/luaui/Widgets/gfx_norush_timer_gl4.lua index 267d8bdcbfa..d929f3fdffe 100644 --- a/luaui/Widgets/gfx_norush_timer_gl4.lua +++ b/luaui/Widgets/gfx_norush_timer_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Norush Timer GL4", diff --git a/luaui/Widgets/gfx_paralyze_effect.lua b/luaui/Widgets/gfx_paralyze_effect.lua index f131889032d..8833851404d 100644 --- a/luaui/Widgets/gfx_paralyze_effect.lua +++ b/luaui/Widgets/gfx_paralyze_effect.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Paralyze Effect", diff --git a/luaui/Widgets/gfx_sepia_tone.lua b/luaui/Widgets/gfx_sepia_tone.lua index f349ba4400a..892b3632462 100644 --- a/luaui/Widgets/gfx_sepia_tone.lua +++ b/luaui/Widgets/gfx_sepia_tone.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Sepia Tone", diff --git a/luaui/Widgets/gfx_showbuilderqueue.lua b/luaui/Widgets/gfx_showbuilderqueue.lua index 209e4abc3bd..b1d166256b7 100644 --- a/luaui/Widgets/gfx_showbuilderqueue.lua +++ b/luaui/Widgets/gfx_showbuilderqueue.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Show Builder Queue", diff --git a/luaui/Widgets/gfx_snow.lua b/luaui/Widgets/gfx_snow.lua index d8e44e73a1f..4178e818970 100644 --- a/luaui/Widgets/gfx_snow.lua +++ b/luaui/Widgets/gfx_snow.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Snow", diff --git a/luaui/Widgets/gfx_ssao.lua b/luaui/Widgets/gfx_ssao.lua index 452948a5f84..5e3b80cada8 100644 --- a/luaui/Widgets/gfx_ssao.lua +++ b/luaui/Widgets/gfx_ssao.lua @@ -10,6 +10,8 @@ end local widgetName = "SSAO" +local widget = widget ---@type Widget + function widget:GetInfo() return { name = widgetName, diff --git a/luaui/Widgets/gfx_unit_stencil_gl4.lua b/luaui/Widgets/gfx_unit_stencil_gl4.lua index 2aa0ad00a2d..6c470d200c4 100644 --- a/luaui/Widgets/gfx_unit_stencil_gl4.lua +++ b/luaui/Widgets/gfx_unit_stencil_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Stencil GL4", diff --git a/luaui/Widgets/gfx_volumetric_clouds.lua b/luaui/Widgets/gfx_volumetric_clouds.lua index 72ac1fd450f..e285a186a4f 100644 --- a/luaui/Widgets/gfx_volumetric_clouds.lua +++ b/luaui/Widgets/gfx_volumetric_clouds.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Volumetric Clouds", diff --git a/luaui/Widgets/gui_advplayerslist.lua b/luaui/Widgets/gui_advplayerslist.lua index 67a24b22326..cfe7b0b5644 100644 --- a/luaui/Widgets/gui_advplayerslist.lua +++ b/luaui/Widgets/gui_advplayerslist.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "AdvPlayersList", diff --git a/luaui/Widgets/gui_advplayerslist_gameinfo.lua b/luaui/Widgets/gui_advplayerslist_gameinfo.lua index 27bec28d7ca..5e00c856e12 100644 --- a/luaui/Widgets/gui_advplayerslist_gameinfo.lua +++ b/luaui/Widgets/gui_advplayerslist_gameinfo.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "AdvPlayersList Game Info", diff --git a/luaui/Widgets/gui_advplayerslist_mascot.lua b/luaui/Widgets/gui_advplayerslist_mascot.lua index 87e67a3ad6e..92820e4daec 100644 --- a/luaui/Widgets/gui_advplayerslist_mascot.lua +++ b/luaui/Widgets/gui_advplayerslist_mascot.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "AdvPlayersList Mascot", diff --git a/luaui/Widgets/gui_advplayerslist_music_new.lua b/luaui/Widgets/gui_advplayerslist_music_new.lua index 9d88b41a87a..cd4d08ea8f0 100644 --- a/luaui/Widgets/gui_advplayerslist_music_new.lua +++ b/luaui/Widgets/gui_advplayerslist_music_new.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "AdvPlayersList Music Player New", diff --git a/luaui/Widgets/gui_advplayerslist_unittotals.lua b/luaui/Widgets/gui_advplayerslist_unittotals.lua index b58c364f236..cdbc0708301 100644 --- a/luaui/Widgets/gui_advplayerslist_unittotals.lua +++ b/luaui/Widgets/gui_advplayerslist_unittotals.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "AdvPlayersList Unit Totals", diff --git a/luaui/Widgets/gui_allySelectedUnits.lua b/luaui/Widgets/gui_allySelectedUnits.lua index 76fad7419c8..9bafc58855e 100644 --- a/luaui/Widgets/gui_allySelectedUnits.lua +++ b/luaui/Widgets/gui_allySelectedUnits.lua @@ -1,5 +1,7 @@ include("keysym.h.lua") +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Ally Selected Units", -- GL4 diff --git a/luaui/Widgets/gui_ally_cursors.lua b/luaui/Widgets/gui_ally_cursors.lua index d8bd3e8db65..a020075dc5c 100644 --- a/luaui/Widgets/gui_ally_cursors.lua +++ b/luaui/Widgets/gui_ally_cursors.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "AllyCursors", diff --git a/luaui/Widgets/gui_anti_ranges.lua b/luaui/Widgets/gui_anti_ranges.lua index 6bd03e92058..e2033647b4e 100644 --- a/luaui/Widgets/gui_anti_ranges.lua +++ b/luaui/Widgets/gui_anti_ranges.lua @@ -1,4 +1,6 @@ -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Anti Ranges", diff --git a/luaui/Widgets/gui_attack_aoe.lua b/luaui/Widgets/gui_attack_aoe.lua index 8314e5aceca..149acb6f1f5 100644 --- a/luaui/Widgets/gui_attack_aoe.lua +++ b/luaui/Widgets/gui_attack_aoe.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Attack AoE", diff --git a/luaui/Widgets/gui_attackrange_gl4.lua b/luaui/Widgets/gui_attackrange_gl4.lua index de9c93cbeb6..e91d5f45aeb 100644 --- a/luaui/Widgets/gui_attackrange_gl4.lua +++ b/luaui/Widgets/gui_attackrange_gl4.lua @@ -2,6 +2,8 @@ include("keysym.h.lua") local versionNumber = "1.1" +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Attack Range GL4", diff --git a/luaui/Widgets/gui_awards.lua b/luaui/Widgets/gui_awards.lua index d2efac948da..151d214c51c 100644 --- a/luaui/Widgets/gui_awards.lua +++ b/luaui/Widgets/gui_awards.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Awards", diff --git a/luaui/Widgets/gui_blast_radius.lua b/luaui/Widgets/gui_blast_radius.lua index 5862351f88b..e0157c16424 100644 --- a/luaui/Widgets/gui_blast_radius.lua +++ b/luaui/Widgets/gui_blast_radius.lua @@ -1,5 +1,7 @@ include("keysym.h.lua") +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Blast Radius", diff --git a/luaui/Widgets/gui_build_eta.lua b/luaui/Widgets/gui_build_eta.lua index 2996684027f..4cc230417b2 100644 --- a/luaui/Widgets/gui_build_eta.lua +++ b/luaui/Widgets/gui_build_eta.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "BuildETA", diff --git a/luaui/Widgets/gui_buildbar.lua b/luaui/Widgets/gui_buildbar.lua index 8be2dcb0d86..b73c9dedd0d 100644 --- a/luaui/Widgets/gui_buildbar.lua +++ b/luaui/Widgets/gui_buildbar.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "BuildBar", diff --git a/luaui/Widgets/gui_building_grid_gl4.lua b/luaui/Widgets/gui_building_grid_gl4.lua index bd199d41b5c..f9b00a8107b 100644 --- a/luaui/Widgets/gui_building_grid_gl4.lua +++ b/luaui/Widgets/gui_building_grid_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Building Grid GL4", diff --git a/luaui/Widgets/gui_buildmenu.lua b/luaui/Widgets/gui_buildmenu.lua index bf8e8f59738..1ead9a38bb8 100644 --- a/luaui/Widgets/gui_buildmenu.lua +++ b/luaui/Widgets/gui_buildmenu.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Build menu", diff --git a/luaui/Widgets/gui_buildspacing.lua b/luaui/Widgets/gui_buildspacing.lua index ee9a4d4a2a5..f746a1a7ea0 100644 --- a/luaui/Widgets/gui_buildspacing.lua +++ b/luaui/Widgets/gui_buildspacing.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Mouse Buildspacing", diff --git a/luaui/Widgets/gui_cache_icons.lua b/luaui/Widgets/gui_cache_icons.lua index 59a7ade3384..0b05e079c67 100644 --- a/luaui/Widgets/gui_cache_icons.lua +++ b/luaui/Widgets/gui_cache_icons.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Cache Icons", diff --git a/luaui/Widgets/gui_camera_anchors.lua b/luaui/Widgets/gui_camera_anchors.lua index 26d00628264..ec19b09e6dd 100644 --- a/luaui/Widgets/gui_camera_anchors.lua +++ b/luaui/Widgets/gui_camera_anchors.lua @@ -4,6 +4,8 @@ -- quickly tap m followed by 1 to set anchor 1 -- quickly tap n followed by 1 to focus on anchor 1 -- etc etc +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Camera Anchors", diff --git a/luaui/Widgets/gui_center_n_select.lua b/luaui/Widgets/gui_center_n_select.lua index 7133d73b2bc..96d20d33b9d 100644 --- a/luaui/Widgets/gui_center_n_select.lua +++ b/luaui/Widgets/gui_center_n_select.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Select n Center!", diff --git a/luaui/Widgets/gui_changelog_info.lua b/luaui/Widgets/gui_changelog_info.lua index f113a174567..b1ca8598fbd 100644 --- a/luaui/Widgets/gui_changelog_info.lua +++ b/luaui/Widgets/gui_changelog_info.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Changelog Info", diff --git a/luaui/Widgets/gui_chat.lua b/luaui/Widgets/gui_chat.lua index c955864ce22..da2b070dec0 100644 --- a/luaui/Widgets/gui_chat.lua +++ b/luaui/Widgets/gui_chat.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Chat", diff --git a/luaui/Widgets/gui_clearmapmarks.lua b/luaui/Widgets/gui_clearmapmarks.lua index e33ae24dc3a..3e4eb93b4d5 100644 --- a/luaui/Widgets/gui_clearmapmarks.lua +++ b/luaui/Widgets/gui_clearmapmarks.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Clearmapmarks button", diff --git a/luaui/Widgets/gui_com_nametags.lua b/luaui/Widgets/gui_com_nametags.lua index ebb916102bd..0db226dd028 100644 --- a/luaui/Widgets/gui_com_nametags.lua +++ b/luaui/Widgets/gui_com_nametags.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Commander Name Tags", diff --git a/luaui/Widgets/gui_commanderhurt.lua b/luaui/Widgets/gui_commanderhurt.lua index b10fb406ba5..371bfffec66 100644 --- a/luaui/Widgets/gui_commanderhurt.lua +++ b/luaui/Widgets/gui_commanderhurt.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Commander Hurt Vignette", diff --git a/luaui/Widgets/gui_commands_fx.lua b/luaui/Widgets/gui_commands_fx.lua index 0c29fd2ebcb..8abc2fdaa88 100644 --- a/luaui/Widgets/gui_commands_fx.lua +++ b/luaui/Widgets/gui_commands_fx.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Commands FX", diff --git a/luaui/Widgets/gui_controller_test.lua b/luaui/Widgets/gui_controller_test.lua index 3554c453468..6da9272f6ed 100644 --- a/luaui/Widgets/gui_controller_test.lua +++ b/luaui/Widgets/gui_controller_test.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Controller Test", diff --git a/luaui/Widgets/gui_converter_usage.lua b/luaui/Widgets/gui_converter_usage.lua index be18f9bdbc9..de45c9e08e8 100644 --- a/luaui/Widgets/gui_converter_usage.lua +++ b/luaui/Widgets/gui_converter_usage.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Converter Usage", diff --git a/luaui/Widgets/gui_cursor.lua b/luaui/Widgets/gui_cursor.lua index dad351a6df2..860c29e47a8 100644 --- a/luaui/Widgets/gui_cursor.lua +++ b/luaui/Widgets/gui_cursor.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Cursor", diff --git a/luaui/Widgets/gui_defenserange.lua b/luaui/Widgets/gui_defenserange.lua index 405761caa29..89bd1c204bc 100644 --- a/luaui/Widgets/gui_defenserange.lua +++ b/luaui/Widgets/gui_defenserange.lua @@ -2,6 +2,8 @@ include("keysym.h.lua") local versionNumber = "6.32" +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Defense Range", diff --git a/luaui/Widgets/gui_defenserange_gl4.lua b/luaui/Widgets/gui_defenserange_gl4.lua index d612eb39579..3d1d66b1498 100644 --- a/luaui/Widgets/gui_defenserange_gl4.lua +++ b/luaui/Widgets/gui_defenserange_gl4.lua @@ -1,5 +1,7 @@ include("keysym.h.lua") +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Defense Range GL4", diff --git a/luaui/Widgets/gui_easyFacing.lua b/luaui/Widgets/gui_easyFacing.lua index e2a749aa9db..a57d3257dc1 100644 --- a/luaui/Widgets/gui_easyFacing.lua +++ b/luaui/Widgets/gui_easyFacing.lua @@ -1,6 +1,8 @@ include("keysym.h.lua") local versionNumber = "1.5" +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Easy Facing", diff --git a/luaui/Widgets/gui_ecostats.lua b/luaui/Widgets/gui_ecostats.lua index 0e34106cf7b..e6cd76a9018 100644 --- a/luaui/Widgets/gui_ecostats.lua +++ b/luaui/Widgets/gui_ecostats.lua @@ -3,6 +3,8 @@ -- return --end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Ecostats", diff --git a/luaui/Widgets/gui_emp_decloak_range.lua b/luaui/Widgets/gui_emp_decloak_range.lua index c871259ebad..f1b0c43af6c 100644 --- a/luaui/Widgets/gui_emp_decloak_range.lua +++ b/luaui/Widgets/gui_emp_decloak_range.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "EMP + decloak range", diff --git a/luaui/Widgets/gui_enemy_spotter.lua b/luaui/Widgets/gui_enemy_spotter.lua index 0e69adfe55f..1e6624b91ae 100644 --- a/luaui/Widgets/gui_enemy_spotter.lua +++ b/luaui/Widgets/gui_enemy_spotter.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "EnemySpotter", -- GL4 diff --git a/luaui/Widgets/gui_factionpicker.lua b/luaui/Widgets/gui_factionpicker.lua index d849cf81415..ca2cc57981d 100644 --- a/luaui/Widgets/gui_factionpicker.lua +++ b/luaui/Widgets/gui_factionpicker.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Factionpicker", diff --git a/luaui/Widgets/gui_flanking_icons.lua b/luaui/Widgets/gui_flanking_icons.lua index 79ba3f4eec1..a878e281d55 100644 --- a/luaui/Widgets/gui_flanking_icons.lua +++ b/luaui/Widgets/gui_flanking_icons.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Flanking Icons GL4", diff --git a/luaui/Widgets/gui_flowui.lua b/luaui/Widgets/gui_flowui.lua index 8a18015cda3..77106c3ffb7 100644 --- a/luaui/Widgets/gui_flowui.lua +++ b/luaui/Widgets/gui_flowui.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "FlowUI", diff --git a/luaui/Widgets/gui_fonthandler.lua b/luaui/Widgets/gui_fonthandler.lua index e6cbb9bf707..268b71649eb 100644 --- a/luaui/Widgets/gui_fonthandler.lua +++ b/luaui/Widgets/gui_fonthandler.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Font handler", diff --git a/luaui/Widgets/gui_game_type_info.lua b/luaui/Widgets/gui_game_type_info.lua index 74d7040ea44..aa8eab1a8be 100644 --- a/luaui/Widgets/gui_game_type_info.lua +++ b/luaui/Widgets/gui_game_type_info.lua @@ -12,6 +12,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "GameTypeInfo", diff --git a/luaui/Widgets/gui_gameinfo.lua b/luaui/Widgets/gui_gameinfo.lua index 16eb7dfd6e7..8b0319b4d45 100644 --- a/luaui/Widgets/gui_gameinfo.lua +++ b/luaui/Widgets/gui_gameinfo.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Game info", diff --git a/luaui/Widgets/gui_geothermalspots.lua b/luaui/Widgets/gui_geothermalspots.lua index 35891fcd73e..a42b737d22e 100644 --- a/luaui/Widgets/gui_geothermalspots.lua +++ b/luaui/Widgets/gui_geothermalspots.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Geothermalspots", diff --git a/luaui/Widgets/gui_given_units.lua b/luaui/Widgets/gui_given_units.lua index be7424ca7be..6f02d4e1f48 100644 --- a/luaui/Widgets/gui_given_units.lua +++ b/luaui/Widgets/gui_given_units.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Given Units", diff --git a/luaui/Widgets/gui_gridmenu.lua b/luaui/Widgets/gui_gridmenu.lua index 1351fa4672e..98ee5ddc1af 100644 --- a/luaui/Widgets/gui_gridmenu.lua +++ b/luaui/Widgets/gui_gridmenu.lua @@ -8,6 +8,8 @@ -- PERF: refreshCommands does not need to fetch activecmddescs every time, e.g. setCurrentCategory -- PERF: updateGrid should be replaced by a method that only updates prices on cells on places where setLabBuildMode is used followed by updateGrid +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Grid menu", diff --git a/luaui/Widgets/gui_ground_ao_plates_features_gl4.lua b/luaui/Widgets/gui_ground_ao_plates_features_gl4.lua index 06d57f1d612..0a0f99949ab 100644 --- a/luaui/Widgets/gui_ground_ao_plates_features_gl4.lua +++ b/luaui/Widgets/gui_ground_ao_plates_features_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Ground AO Plates Features GL4", diff --git a/luaui/Widgets/gui_ground_ao_plates_gl4.lua b/luaui/Widgets/gui_ground_ao_plates_gl4.lua index b0624a33e22..2d5a9cb7b41 100644 --- a/luaui/Widgets/gui_ground_ao_plates_gl4.lua +++ b/luaui/Widgets/gui_ground_ao_plates_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Ground AO Plates GL4", diff --git a/luaui/Widgets/gui_healthbars_gl4.lua b/luaui/Widgets/gui_healthbars_gl4.lua index 30165b72355..01a1c8ab3c2 100644 --- a/luaui/Widgets/gui_healthbars_gl4.lua +++ b/luaui/Widgets/gui_healthbars_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Health Bars GL4", diff --git a/luaui/Widgets/gui_idle_builders.lua b/luaui/Widgets/gui_idle_builders.lua index 4f99abbbfdf..b84a8cfc40a 100644 --- a/luaui/Widgets/gui_idle_builders.lua +++ b/luaui/Widgets/gui_idle_builders.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Idle Builders", diff --git a/luaui/Widgets/gui_info.lua b/luaui/Widgets/gui_info.lua index 2e60b5c9e74..9ca9f889373 100644 --- a/luaui/Widgets/gui_info.lua +++ b/luaui/Widgets/gui_info.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Info", diff --git a/luaui/Widgets/gui_infolos.lua b/luaui/Widgets/gui_infolos.lua index 6eaca390440..1c22459b3a6 100644 --- a/luaui/Widgets/gui_infolos.lua +++ b/luaui/Widgets/gui_infolos.lua @@ -1,5 +1,7 @@ -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Infolos API", diff --git a/luaui/Widgets/gui_keybind_info.lua b/luaui/Widgets/gui_keybind_info.lua index d93a5560fdf..3b4db37cfce 100644 --- a/luaui/Widgets/gui_keybind_info.lua +++ b/luaui/Widgets/gui_keybind_info.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Keybind/Mouse Info", diff --git a/luaui/Widgets/gui_language.lua b/luaui/Widgets/gui_language.lua index 1f7d14075a6..6490c77f06d 100644 --- a/luaui/Widgets/gui_language.lua +++ b/luaui/Widgets/gui_language.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Language", diff --git a/luaui/Widgets/gui_mapinfo.lua b/luaui/Widgets/gui_mapinfo.lua index 53d4bac30d8..9cd2911c8d2 100644 --- a/luaui/Widgets/gui_mapinfo.lua +++ b/luaui/Widgets/gui_mapinfo.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Map Info", diff --git a/luaui/Widgets/gui_mapmarks_fx.lua b/luaui/Widgets/gui_mapmarks_fx.lua index 03763a74512..2f5d8829298 100644 --- a/luaui/Widgets/gui_mapmarks_fx.lua +++ b/luaui/Widgets/gui_mapmarks_fx.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Mapmarks FX", diff --git a/luaui/Widgets/gui_messages.lua b/luaui/Widgets/gui_messages.lua index d5758e61485..e58b7a6b255 100644 --- a/luaui/Widgets/gui_messages.lua +++ b/luaui/Widgets/gui_messages.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Messages", diff --git a/luaui/Widgets/gui_metalspots.lua b/luaui/Widgets/gui_metalspots.lua index d5599ab3138..77ccef425b1 100644 --- a/luaui/Widgets/gui_metalspots.lua +++ b/luaui/Widgets/gui_metalspots.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Metalspots", diff --git a/luaui/Widgets/gui_minimap.lua b/luaui/Widgets/gui_minimap.lua index c2da19df286..c4631356aa6 100644 --- a/luaui/Widgets/gui_minimap.lua +++ b/luaui/Widgets/gui_minimap.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Minimap", diff --git a/luaui/Widgets/gui_mouse_fx.lua b/luaui/Widgets/gui_mouse_fx.lua index a9c2158fd33..25ccb2f6aa5 100644 --- a/luaui/Widgets/gui_mouse_fx.lua +++ b/luaui/Widgets/gui_mouse_fx.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Mouse FX", diff --git a/luaui/Widgets/gui_options.lua b/luaui/Widgets/gui_options.lua index 9054ade3ad5..6dfa7152ea7 100644 --- a/luaui/Widgets/gui_options.lua +++ b/luaui/Widgets/gui_options.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Options", diff --git a/luaui/Widgets/gui_ordermenu.lua b/luaui/Widgets/gui_ordermenu.lua index 2ce7e096889..69b9be25ff8 100644 --- a/luaui/Widgets/gui_ordermenu.lua +++ b/luaui/Widgets/gui_ordermenu.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Order menu", diff --git a/luaui/Widgets/gui_overview_cam_tab_hold.lua b/luaui/Widgets/gui_overview_cam_tab_hold.lua index a7ef2f647d6..dcfc5124ba8 100644 --- a/luaui/Widgets/gui_overview_cam_tab_hold.lua +++ b/luaui/Widgets/gui_overview_cam_tab_hold.lua @@ -3,6 +3,8 @@ -- Release 'tab' to go back to original view instead zooming into cursor -- Short 'tab' are ignored +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Overview Camera TAB hold & release", diff --git a/luaui/Widgets/gui_overview_keep_camera_position.lua b/luaui/Widgets/gui_overview_keep_camera_position.lua index 9535b562b2b..28a1584e106 100644 --- a/luaui/Widgets/gui_overview_keep_camera_position.lua +++ b/luaui/Widgets/gui_overview_keep_camera_position.lua @@ -2,6 +2,8 @@ -- When tabbing out of the overview, the camera DOES NOT "zoom-to-cursor" -- When scrolling out of the overiew, the camera DOES "zoom-to-cursor" +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Overview Camera Keep Position", diff --git a/luaui/Widgets/gui_pausescreen.lua b/luaui/Widgets/gui_pausescreen.lua index e06d8308e3b..3746de7ce7d 100644 --- a/luaui/Widgets/gui_pausescreen.lua +++ b/luaui/Widgets/gui_pausescreen.lua @@ -1,6 +1,8 @@ include("keysym.h.lua") local versionNumber = "1.34" +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Pause Screen", diff --git a/luaui/Widgets/gui_point_tracker.lua b/luaui/Widgets/gui_point_tracker.lua index ce835a0a8c0..7ec7b329fed 100644 --- a/luaui/Widgets/gui_point_tracker.lua +++ b/luaui/Widgets/gui_point_tracker.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Point Tracker", diff --git a/luaui/Widgets/gui_pregame_build.lua b/luaui/Widgets/gui_pregame_build.lua index 5b67fc8d621..61679d3c00c 100644 --- a/luaui/Widgets/gui_pregame_build.lua +++ b/luaui/Widgets/gui_pregame_build.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Pregame Queue", diff --git a/luaui/Widgets/gui_pregameui.lua b/luaui/Widgets/gui_pregameui.lua index ea3d9adbb48..19515ea1ba7 100644 --- a/luaui/Widgets/gui_pregameui.lua +++ b/luaui/Widgets/gui_pregameui.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Pregame UI", diff --git a/luaui/Widgets/gui_pregameui_draft.lua b/luaui/Widgets/gui_pregameui_draft.lua index 9cbf22e099a..ae4f7a53e4a 100644 --- a/luaui/Widgets/gui_pregameui_draft.lua +++ b/luaui/Widgets/gui_pregameui_draft.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Pregame UI - Draft Spawn Order", diff --git a/luaui/Widgets/gui_prospector.lua b/luaui/Widgets/gui_prospector.lua index 1846bcf4423..f082c7ec007 100644 --- a/luaui/Widgets/gui_prospector.lua +++ b/luaui/Widgets/gui_prospector.lua @@ -5,6 +5,8 @@ -- On metal maps, there is no spot value at all, so this is required to see how much mexes will produce ----------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Prospector", diff --git a/luaui/Widgets/gui_rank_icons_gl4.lua b/luaui/Widgets/gui_rank_icons_gl4.lua index 59c05ec3f4d..bef3aea8197 100644 --- a/luaui/Widgets/gui_rank_icons_gl4.lua +++ b/luaui/Widgets/gui_rank_icons_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Rank Icons GL4", diff --git a/luaui/Widgets/gui_raptorStatsPanel.lua b/luaui/Widgets/gui_raptorStatsPanel.lua index 65a314b9676..4d17322edf3 100644 --- a/luaui/Widgets/gui_raptorStatsPanel.lua +++ b/luaui/Widgets/gui_raptorStatsPanel.lua @@ -2,6 +2,8 @@ if not (Spring.Utilities.Gametype.IsRaptors() and not Spring.Utilities.Gametype. return false end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Raptor Stats Panel", diff --git a/luaui/Widgets/gui_reclaim_field_highlight.lua b/luaui/Widgets/gui_reclaim_field_highlight.lua index 69ec666c66f..6ad69b49e4c 100644 --- a/luaui/Widgets/gui_reclaim_field_highlight.lua +++ b/luaui/Widgets/gui_reclaim_field_highlight.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Reclaim Field Highlight", diff --git a/luaui/Widgets/gui_reclaiminfo.lua b/luaui/Widgets/gui_reclaiminfo.lua index 1b464214bf2..251b0371626 100644 --- a/luaui/Widgets/gui_reclaiminfo.lua +++ b/luaui/Widgets/gui_reclaiminfo.lua @@ -11,6 +11,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "ReclaimInfo", diff --git a/luaui/Widgets/gui_rejoinprogress.lua b/luaui/Widgets/gui_rejoinprogress.lua index 3ba9066e74b..e6ef06a360c 100644 --- a/luaui/Widgets/gui_rejoinprogress.lua +++ b/luaui/Widgets/gui_rejoinprogress.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Rejoin progress", diff --git a/luaui/Widgets/gui_replaybuttons.lua b/luaui/Widgets/gui_replaybuttons.lua index 28d7995969a..392b5754116 100644 --- a/luaui/Widgets/gui_replaybuttons.lua +++ b/luaui/Widgets/gui_replaybuttons.lua @@ -1,4 +1,6 @@ --http://springrts.com/phpbb/viewtopic.php?f=23&t=30560 +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Replay buttons", diff --git a/luaui/Widgets/gui_resurrection_halos_gl4.lua b/luaui/Widgets/gui_resurrection_halos_gl4.lua index a5f37497bc2..dccab64c42c 100644 --- a/luaui/Widgets/gui_resurrection_halos_gl4.lua +++ b/luaui/Widgets/gui_resurrection_halos_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Resurrection Halos GL4", diff --git a/luaui/Widgets/gui_savegame.lua b/luaui/Widgets/gui_savegame.lua index 962af808dd3..ad66009b911 100644 --- a/luaui/Widgets/gui_savegame.lua +++ b/luaui/Widgets/gui_savegame.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Save Game Menu", diff --git a/luaui/Widgets/gui_scavStatsPanel.lua b/luaui/Widgets/gui_scavStatsPanel.lua index 780a14afc00..9382cb06a01 100644 --- a/luaui/Widgets/gui_scavStatsPanel.lua +++ b/luaui/Widgets/gui_scavStatsPanel.lua @@ -2,6 +2,8 @@ if not (Spring.Utilities.Gametype.IsScavengers() and not Spring.Utilities.Gamety return false end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Scav Stats Panel", diff --git a/luaui/Widgets/gui_scavenger_info.lua b/luaui/Widgets/gui_scavenger_info.lua index 33bd9144b68..bf9c4de541a 100644 --- a/luaui/Widgets/gui_scavenger_info.lua +++ b/luaui/Widgets/gui_scavenger_info.lua @@ -4,6 +4,8 @@ if not scavengersAIEnabled then return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Scavenger Info", diff --git a/luaui/Widgets/gui_screen_mode_info.lua b/luaui/Widgets/gui_screen_mode_info.lua index 284a28eeb35..5dcde312c4d 100644 --- a/luaui/Widgets/gui_screen_mode_info.lua +++ b/luaui/Widgets/gui_screen_mode_info.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Screen Mode Info", diff --git a/luaui/Widgets/gui_scrolldown_toggleoverview.lua b/luaui/Widgets/gui_scrolldown_toggleoverview.lua index 727016c95eb..b07548c0fa3 100644 --- a/luaui/Widgets/gui_scrolldown_toggleoverview.lua +++ b/luaui/Widgets/gui_scrolldown_toggleoverview.lua @@ -2,6 +2,8 @@ -- brings to megamap (overview camera). -- Scrolling up restores previous camera +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Scrolldown Toggleoverview", diff --git a/luaui/Widgets/gui_selectedunits_gl4.lua b/luaui/Widgets/gui_selectedunits_gl4.lua index 02a20d91456..c77381faed3 100644 --- a/luaui/Widgets/gui_selectedunits_gl4.lua +++ b/luaui/Widgets/gui_selectedunits_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Selected Units GL4", diff --git a/luaui/Widgets/gui_selectionbox.lua b/luaui/Widgets/gui_selectionbox.lua index af4e8fc3ebb..0a6e11c2bee 100644 --- a/luaui/Widgets/gui_selectionbox.lua +++ b/luaui/Widgets/gui_selectionbox.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Selectionbox", diff --git a/luaui/Widgets/gui_selfd_icons.lua b/luaui/Widgets/gui_selfd_icons.lua index b0a9cdbc043..d65e7e6c566 100644 --- a/luaui/Widgets/gui_selfd_icons.lua +++ b/luaui/Widgets/gui_selfd_icons.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Self-Destruct Icons", diff --git a/luaui/Widgets/gui_sensor_ranges_jammer.lua b/luaui/Widgets/gui_sensor_ranges_jammer.lua index 3058255ec21..3ad169aface 100644 --- a/luaui/Widgets/gui_sensor_ranges_jammer.lua +++ b/luaui/Widgets/gui_sensor_ranges_jammer.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Sensor Ranges Jammer", diff --git a/luaui/Widgets/gui_sensor_ranges_los.lua b/luaui/Widgets/gui_sensor_ranges_los.lua index c016a705c30..dae38880499 100644 --- a/luaui/Widgets/gui_sensor_ranges_los.lua +++ b/luaui/Widgets/gui_sensor_ranges_los.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Sensor Ranges LOS", diff --git a/luaui/Widgets/gui_sensor_ranges_radar.lua b/luaui/Widgets/gui_sensor_ranges_radar.lua index 1f0e68774fd..f35e1e7196a 100644 --- a/luaui/Widgets/gui_sensor_ranges_radar.lua +++ b/luaui/Widgets/gui_sensor_ranges_radar.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Sensor Ranges Radar", diff --git a/luaui/Widgets/gui_sensor_ranges_radar_preview.lua b/luaui/Widgets/gui_sensor_ranges_radar_preview.lua index bee32edc987..1506d613dca 100644 --- a/luaui/Widgets/gui_sensor_ranges_radar_preview.lua +++ b/luaui/Widgets/gui_sensor_ranges_radar_preview.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Sensor Ranges Radar Preview", diff --git a/luaui/Widgets/gui_sensor_ranges_sonar.lua b/luaui/Widgets/gui_sensor_ranges_sonar.lua index be2070ce9a5..4b1d426135d 100644 --- a/luaui/Widgets/gui_sensor_ranges_sonar.lua +++ b/luaui/Widgets/gui_sensor_ranges_sonar.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Sensor Ranges Sonar", diff --git a/luaui/Widgets/gui_show_orders.lua b/luaui/Widgets/gui_show_orders.lua index bbde6f39734..7cfdae999f6 100644 --- a/luaui/Widgets/gui_show_orders.lua +++ b/luaui/Widgets/gui_show_orders.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Show Orders", diff --git a/luaui/Widgets/gui_spec_next_alive_player.lua b/luaui/Widgets/gui_spec_next_alive_player.lua index 2089907b6ab..fc517dc88bb 100644 --- a/luaui/Widgets/gui_spec_next_alive_player.lua +++ b/luaui/Widgets/gui_spec_next_alive_player.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = 'Spectate Next Alive Player', diff --git a/luaui/Widgets/gui_spectate_selected.lua b/luaui/Widgets/gui_spectate_selected.lua index 2f26330bff5..eb1419fd09c 100644 --- a/luaui/Widgets/gui_spectate_selected.lua +++ b/luaui/Widgets/gui_spectate_selected.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = 'Spectate Selected', diff --git a/luaui/Widgets/gui_spectatingstats.lua b/luaui/Widgets/gui_spectatingstats.lua index aca2059e3fb..34c7d354a8d 100644 --- a/luaui/Widgets/gui_spectatingstats.lua +++ b/luaui/Widgets/gui_spectatingstats.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Spectating Stats", diff --git a/luaui/Widgets/gui_spectator_hud.lua b/luaui/Widgets/gui_spectator_hud.lua index afd381f85a6..1cc71c9f1dd 100644 --- a/luaui/Widgets/gui_spectator_hud.lua +++ b/luaui/Widgets/gui_spectator_hud.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Spectator HUD", diff --git a/luaui/Widgets/gui_team_platter.lua b/luaui/Widgets/gui_team_platter.lua index a11799c44a8..8b9b28492e1 100644 --- a/luaui/Widgets/gui_team_platter.lua +++ b/luaui/Widgets/gui_team_platter.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "TeamPlatter", -- GL4 diff --git a/luaui/Widgets/gui_teamstats.lua b/luaui/Widgets/gui_teamstats.lua index a224038afb5..32ef2301899 100644 --- a/luaui/Widgets/gui_teamstats.lua +++ b/luaui/Widgets/gui_teamstats.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "TeamStats", diff --git a/luaui/Widgets/gui_tooltip.lua b/luaui/Widgets/gui_tooltip.lua index 4092902e05d..0cea16013f8 100644 --- a/luaui/Widgets/gui_tooltip.lua +++ b/luaui/Widgets/gui_tooltip.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Tooltip", diff --git a/luaui/Widgets/gui_top_bar.lua b/luaui/Widgets/gui_top_bar.lua index 71c44673e2e..879c60f6d96 100644 --- a/luaui/Widgets/gui_top_bar.lua +++ b/luaui/Widgets/gui_top_bar.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Top Bar", diff --git a/luaui/Widgets/gui_transport_weight_limit.lua b/luaui/Widgets/gui_transport_weight_limit.lua index 770e624cb47..53e621807f7 100644 --- a/luaui/Widgets/gui_transport_weight_limit.lua +++ b/luaui/Widgets/gui_transport_weight_limit.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "gui_transport_weight_limit", diff --git a/luaui/Widgets/gui_turret_trans_range.lua b/luaui/Widgets/gui_turret_trans_range.lua index bae7fbe0e19..5778ce8a556 100644 --- a/luaui/Widgets/gui_turret_trans_range.lua +++ b/luaui/Widgets/gui_turret_trans_range.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Nano range on transport", diff --git a/luaui/Widgets/gui_unit_energy_icons.lua b/luaui/Widgets/gui_unit_energy_icons.lua index ae5257893e5..c785d6cd8af 100644 --- a/luaui/Widgets/gui_unit_energy_icons.lua +++ b/luaui/Widgets/gui_unit_energy_icons.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Energy Icons", -- GL4 diff --git a/luaui/Widgets/gui_unit_group_number.lua b/luaui/Widgets/gui_unit_group_number.lua index 91f5547a5d1..e08132ada52 100644 --- a/luaui/Widgets/gui_unit_group_number.lua +++ b/luaui/Widgets/gui_unit_group_number.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Group Number", diff --git a/luaui/Widgets/gui_unit_idlebuilder_icons.lua b/luaui/Widgets/gui_unit_idlebuilder_icons.lua index bee68b71744..f80cca997f9 100644 --- a/luaui/Widgets/gui_unit_idlebuilder_icons.lua +++ b/luaui/Widgets/gui_unit_idlebuilder_icons.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Idle Builder Icons", diff --git a/luaui/Widgets/gui_unit_market.lua b/luaui/Widgets/gui_unit_market.lua index 484e40dc80d..8f21e5489a7 100644 --- a/luaui/Widgets/gui_unit_market.lua +++ b/luaui/Widgets/gui_unit_market.lua @@ -2,6 +2,8 @@ if not Spring.GetModOptions().unit_market then return end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Market", desc = "Allows players to trade units with each other. Allies only. Fair price!", diff --git a/luaui/Widgets/gui_unit_stats.lua b/luaui/Widgets/gui_unit_stats.lua index faa70adfee5..2556282f434 100644 --- a/luaui/Widgets/gui_unit_stats.lua +++ b/luaui/Widgets/gui_unit_stats.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Stats", diff --git a/luaui/Widgets/gui_unit_wait_icons.lua b/luaui/Widgets/gui_unit_wait_icons.lua index 453dba08a0d..2c4e12631a8 100644 --- a/luaui/Widgets/gui_unit_wait_icons.lua +++ b/luaui/Widgets/gui_unit_wait_icons.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Wait Icons", diff --git a/luaui/Widgets/gui_unitgroups.lua b/luaui/Widgets/gui_unitgroups.lua index 0f451c6fb3a..a3b00200ab5 100644 --- a/luaui/Widgets/gui_unitgroups.lua +++ b/luaui/Widgets/gui_unitgroups.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Groups", diff --git a/luaui/Widgets/gui_vote_interface.lua b/luaui/Widgets/gui_vote_interface.lua index 56ce19f22ec..80e91ba4e84 100644 --- a/luaui/Widgets/gui_vote_interface.lua +++ b/luaui/Widgets/gui_vote_interface.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Vote interface", diff --git a/luaui/Widgets/log_unitdefids.lua b/luaui/Widgets/log_unitdefids.lua index 32f5ffa5d9b..ce7ecbeeac9 100644 --- a/luaui/Widgets/log_unitdefids.lua +++ b/luaui/Widgets/log_unitdefids.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Log UnitDefIDs", diff --git a/luaui/Widgets/logo_adjuster.lua b/luaui/Widgets/logo_adjuster.lua index bedc1c4bafa..5f97de29a00 100644 --- a/luaui/Widgets/logo_adjuster.lua +++ b/luaui/Widgets/logo_adjuster.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Logo adjuster", diff --git a/luaui/Widgets/map_auto_mapmark_eraser.lua b/luaui/Widgets/map_auto_mapmark_eraser.lua index 35e049ea7d9..2eadd4886a5 100644 --- a/luaui/Widgets/map_auto_mapmark_eraser.lua +++ b/luaui/Widgets/map_auto_mapmark_eraser.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Auto mapmark eraser", diff --git a/luaui/Widgets/map_draw_blocker.lua b/luaui/Widgets/map_draw_blocker.lua index 90d473c8a5c..74fc756d299 100644 --- a/luaui/Widgets/map_draw_blocker.lua +++ b/luaui/Widgets/map_draw_blocker.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Map Draw Blocker", diff --git a/luaui/Widgets/map_edge_extension2.lua b/luaui/Widgets/map_edge_extension2.lua index 9312f52b14d..a542040347b 100644 --- a/luaui/Widgets/map_edge_extension2.lua +++ b/luaui/Widgets/map_edge_extension2.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Map Edge Extension", diff --git a/luaui/Widgets/map_grass_gl4.lua b/luaui/Widgets/map_grass_gl4.lua index 628319937a2..aa036020704 100644 --- a/luaui/Widgets/map_grass_gl4.lua +++ b/luaui/Widgets/map_grass_gl4.lua @@ -7,6 +7,8 @@ if gpuMem and gpuMem > 0 and gpuMem < 1800 then isPotatoGpu = true end +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Map Grass GL4", diff --git a/luaui/Widgets/map_lighting_adjuster.lua b/luaui/Widgets/map_lighting_adjuster.lua index fb69d487173..d00d8d2bf7f 100644 --- a/luaui/Widgets/map_lighting_adjuster.lua +++ b/luaui/Widgets/map_lighting_adjuster.lua @@ -140,6 +140,8 @@ local mapSun = { } +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Map Lighting Adjuster", diff --git a/luaui/Widgets/map_start_position_suggestions.lua b/luaui/Widgets/map_start_position_suggestions.lua index 7cd5b2fc503..8767a1ecd48 100644 --- a/luaui/Widgets/map_start_position_suggestions.lua +++ b/luaui/Widgets/map_start_position_suggestions.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Start Position Suggestions", diff --git a/luaui/Widgets/map_startbox.lua b/luaui/Widgets/map_startbox.lua index 231ad3c6add..00d34c4c5e2 100644 --- a/luaui/Widgets/map_startbox.lua +++ b/luaui/Widgets/map_startbox.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Start Boxes", diff --git a/luaui/Widgets/map_startpolygon_gl4.lua b/luaui/Widgets/map_startpolygon_gl4.lua index f8188dcf6d2..ac2b3da7ab2 100644 --- a/luaui/Widgets/map_startpolygon_gl4.lua +++ b/luaui/Widgets/map_startpolygon_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Start Polygons", diff --git a/luaui/Widgets/minimap_relative.lua b/luaui/Widgets/minimap_relative.lua index 698d62dc23d..1e43454468c 100644 --- a/luaui/Widgets/minimap_relative.lua +++ b/luaui/Widgets/minimap_relative.lua @@ -11,6 +11,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "RelativeMinimap", diff --git a/luaui/Widgets/shard_help_draw.lua b/luaui/Widgets/shard_help_draw.lua index 160853da525..2278e88d509 100644 --- a/luaui/Widgets/shard_help_draw.lua +++ b/luaui/Widgets/shard_help_draw.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Shard Help: Draw and timer", diff --git a/luaui/Widgets/snd_mapmark_ping.lua b/luaui/Widgets/snd_mapmark_ping.lua index 700f8239c59..e3705a5e9b8 100644 --- a/luaui/Widgets/snd_mapmark_ping.lua +++ b/luaui/Widgets/snd_mapmark_ping.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Mapmark Ping", diff --git a/luaui/Widgets/snd_notifications.lua b/luaui/Widgets/snd_notifications.lua index ce994825bd0..77eb72b8dc7 100644 --- a/luaui/Widgets/snd_notifications.lua +++ b/luaui/Widgets/snd_notifications.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Notifications", diff --git a/luaui/Widgets/snd_unit_finished.lua b/luaui/Widgets/snd_unit_finished.lua index cb7d7cd5c6f..f28404531ce 100644 --- a/luaui/Widgets/snd_unit_finished.lua +++ b/luaui/Widgets/snd_unit_finished.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Unit Finished Sounds", diff --git a/luaui/Widgets/snd_volume_osd.lua b/luaui/Widgets/snd_volume_osd.lua index cbabcebbc8c..08aab092c5c 100644 --- a/luaui/Widgets/snd_volume_osd.lua +++ b/luaui/Widgets/snd_volume_osd.lua @@ -7,6 +7,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Volume OSD", diff --git a/luaui/Widgets/stats_damage.lua b/luaui/Widgets/stats_damage.lua index 03f30312c2c..a21455e3036 100644 --- a/luaui/Widgets/stats_damage.lua +++ b/luaui/Widgets/stats_damage.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Statistics Collection", diff --git a/luaui/Widgets/test_DPAT.lua b/luaui/Widgets/test_DPAT.lua index 5f007839871..d59efda30c3 100644 --- a/luaui/Widgets/test_DPAT.lua +++ b/luaui/Widgets/test_DPAT.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "TEST DrawPrimitiveAtUnit GL4", diff --git a/luaui/Widgets/test_dpat_minimal_example.lua b/luaui/Widgets/test_dpat_minimal_example.lua index f17f6023231..635d997b7af 100644 --- a/luaui/Widgets/test_dpat_minimal_example.lua +++ b/luaui/Widgets/test_dpat_minimal_example.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "TEST DrawPrimitiveAtUnit GL4 Minimal Example", diff --git a/luaui/Widgets/tweakdefs_unit_translations.lua b/luaui/Widgets/tweakdefs_unit_translations.lua index b8722017fd9..6ef85b5351a 100644 --- a/luaui/Widgets/tweakdefs_unit_translations.lua +++ b/luaui/Widgets/tweakdefs_unit_translations.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Tweakdefs Custom Unit Names", diff --git a/luaui/Widgets/unit_attackMoveNotification.lua b/luaui/Widgets/unit_attackMoveNotification.lua index 3712481236a..7e214edcd01 100644 --- a/luaui/Widgets/unit_attackMoveNotification.lua +++ b/luaui/Widgets/unit_attackMoveNotification.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Attack and Move Notification", diff --git a/luaui/Widgets/unit_auto_cloak.lua b/luaui/Widgets/unit_auto_cloak.lua index 6320293ca66..3d5e6f3973e 100644 --- a/luaui/Widgets/unit_auto_cloak.lua +++ b/luaui/Widgets/unit_auto_cloak.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Auto Cloak Units", diff --git a/luaui/Widgets/unit_auto_group.lua b/luaui/Widgets/unit_auto_group.lua index 03fbe7362a5..f4fc1b77cff 100644 --- a/luaui/Widgets/unit_auto_group.lua +++ b/luaui/Widgets/unit_auto_group.lua @@ -1,5 +1,7 @@ local versionNum = '5.00' +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Auto Group", diff --git a/luaui/Widgets/unit_autofirstbuildfacing.lua b/luaui/Widgets/unit_autofirstbuildfacing.lua index 0c63bc67ad9..4283ec5739c 100644 --- a/luaui/Widgets/unit_autofirstbuildfacing.lua +++ b/luaui/Widgets/unit_autofirstbuildfacing.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Auto First Build Facing", diff --git a/luaui/Widgets/unit_builder_priority.lua b/luaui/Widgets/unit_builder_priority.lua index f1943a650ab..55fbbcc9219 100644 --- a/luaui/Widgets/unit_builder_priority.lua +++ b/luaui/Widgets/unit_builder_priority.lua @@ -1,4 +1,6 @@ -- depends on gadget: unit_builder_priority +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Builder Priority", diff --git a/luaui/Widgets/unit_cloak_firestate.lua b/luaui/Widgets/unit_cloak_firestate.lua index 5f08b669373..75868a63588 100644 --- a/luaui/Widgets/unit_cloak_firestate.lua +++ b/luaui/Widgets/unit_cloak_firestate.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Cloak Fire State", diff --git a/luaui/Widgets/unit_default_spy_move_cloaked.lua b/luaui/Widgets/unit_default_spy_move_cloaked.lua index 90edda3dc80..42f462ecbdb 100644 --- a/luaui/Widgets/unit_default_spy_move_cloaked.lua +++ b/luaui/Widgets/unit_default_spy_move_cloaked.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Spy move/reclaim defaults", diff --git a/luaui/Widgets/unit_dgun_stall_assist.lua b/luaui/Widgets/unit_dgun_stall_assist.lua index 23af99cce25..917e62509ce 100644 --- a/luaui/Widgets/unit_dgun_stall_assist.lua +++ b/luaui/Widgets/unit_dgun_stall_assist.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "DGun Stall Assist", diff --git a/luaui/Widgets/unit_factory_quota.lua b/luaui/Widgets/unit_factory_quota.lua index b89d8c33a72..d2e814e314d 100644 --- a/luaui/Widgets/unit_factory_quota.lua +++ b/luaui/Widgets/unit_factory_quota.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Factory Quotas", diff --git a/luaui/Widgets/unit_ghostradar_gl4.lua b/luaui/Widgets/unit_ghostradar_gl4.lua index de220ea49ac..7d6f4ecb4a8 100644 --- a/luaui/Widgets/unit_ghostradar_gl4.lua +++ b/luaui/Widgets/unit_ghostradar_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Ghost Radar GL4", diff --git a/luaui/Widgets/unit_ghostsite_gl4.lua b/luaui/Widgets/unit_ghostsite_gl4.lua index bb746527b14..07052e7462d 100644 --- a/luaui/Widgets/unit_ghostsite_gl4.lua +++ b/luaui/Widgets/unit_ghostsite_gl4.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Ghost Site GL4", diff --git a/luaui/Widgets/unit_hold_position.lua b/luaui/Widgets/unit_hold_position.lua index b8eba4e7d49..310ae6f34a8 100644 --- a/luaui/Widgets/unit_hold_position.lua +++ b/luaui/Widgets/unit_hold_position.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Everything hold position", diff --git a/luaui/Widgets/unit_idle_guard.lua b/luaui/Widgets/unit_idle_guard.lua index 678c3baed8c..be999b61ee5 100644 --- a/luaui/Widgets/unit_idle_guard.lua +++ b/luaui/Widgets/unit_idle_guard.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Idle Constructor Guard After Build", diff --git a/luaui/Widgets/unit_immobile_builder.lua b/luaui/Widgets/unit_immobile_builder.lua index f04034c72b3..5e2473af543 100644 --- a/luaui/Widgets/unit_immobile_builder.lua +++ b/luaui/Widgets/unit_immobile_builder.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "ImmobileBuilder", diff --git a/luaui/Widgets/unit_key_select.lua b/luaui/Widgets/unit_key_select.lua index 216af374872..feadc3e7370 100644 --- a/luaui/Widgets/unit_key_select.lua +++ b/luaui/Widgets/unit_key_select.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "KeySelect", diff --git a/luaui/Widgets/unit_load_own_moving.lua b/luaui/Widgets/unit_load_own_moving.lua index 30085c4485b..8f458be6661 100644 --- a/luaui/Widgets/unit_load_own_moving.lua +++ b/luaui/Widgets/unit_load_own_moving.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Load Own Moving", diff --git a/luaui/Widgets/unit_loop_select.lua b/luaui/Widgets/unit_loop_select.lua index e526b798085..f0502e4042b 100644 --- a/luaui/Widgets/unit_loop_select.lua +++ b/luaui/Widgets/unit_loop_select.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Loop Select", diff --git a/luaui/Widgets/unit_only_fighters_patrol.lua b/luaui/Widgets/unit_only_fighters_patrol.lua index 066a8fa6fed..9345877d7fa 100644 --- a/luaui/Widgets/unit_only_fighters_patrol.lua +++ b/luaui/Widgets/unit_only_fighters_patrol.lua @@ -13,6 +13,8 @@ -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "OnlyFightersPatrol", diff --git a/luaui/Widgets/unit_set_fighters_fly.lua b/luaui/Widgets/unit_set_fighters_fly.lua index 4150654e5d4..97f814fafd9 100644 --- a/luaui/Widgets/unit_set_fighters_fly.lua +++ b/luaui/Widgets/unit_set_fighters_fly.lua @@ -1,5 +1,7 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Set fighters on Fly mode", diff --git a/luaui/Widgets/unit_set_target_by_type.lua b/luaui/Widgets/unit_set_target_by_type.lua index 05f3eda2f39..3ebb864b2f9 100644 --- a/luaui/Widgets/unit_set_target_by_type.lua +++ b/luaui/Widgets/unit_set_target_by_type.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Set Target by Unit Type", diff --git a/luaui/Widgets/unit_share_tracker.lua b/luaui/Widgets/unit_share_tracker.lua index 034be662cd1..55dd941fe89 100644 --- a/luaui/Widgets/unit_share_tracker.lua +++ b/luaui/Widgets/unit_share_tracker.lua @@ -1,5 +1,7 @@ local versionNumber = "v1.1" +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Share Tracker", diff --git a/luaui/Widgets/unit_smart_area_reclaim.lua b/luaui/Widgets/unit_smart_area_reclaim.lua index 36550111187..022b40beacf 100644 --- a/luaui/Widgets/unit_smart_area_reclaim.lua +++ b/luaui/Widgets/unit_smart_area_reclaim.lua @@ -11,6 +11,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Smart Area Reclaim", diff --git a/luaui/Widgets/unit_smart_select.lua b/luaui/Widgets/unit_smart_select.lua index b682118d573..ed43f351832 100644 --- a/luaui/Widgets/unit_smart_select.lua +++ b/luaui/Widgets/unit_smart_select.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "SmartSelect", diff --git a/luaui/Widgets/unit_specific_unit_loader.lua b/luaui/Widgets/unit_specific_unit_loader.lua index 44ab12b58b2..4bbf0759524 100644 --- a/luaui/Widgets/unit_specific_unit_loader.lua +++ b/luaui/Widgets/unit_specific_unit_loader.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Specific Unit Loader", diff --git a/luaui/Widgets/unit_specific_unit_reclaimer.lua b/luaui/Widgets/unit_specific_unit_reclaimer.lua index d49afc07a97..4b2243f7f38 100644 --- a/luaui/Widgets/unit_specific_unit_reclaimer.lua +++ b/luaui/Widgets/unit_specific_unit_reclaimer.lua @@ -1,4 +1,6 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Specific Unit Reclaimer", diff --git a/luaui/Widgets/unit_stateprefs.lua b/luaui/Widgets/unit_stateprefs.lua index b1456ee94f9..f38e0cdeb16 100644 --- a/luaui/Widgets/unit_stateprefs.lua +++ b/luaui/Widgets/unit_stateprefs.lua @@ -1,6 +1,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "State Prefs V2", diff --git a/luaui/Widgets/unit_transport_ai.lua b/luaui/Widgets/unit_transport_ai.lua index ebc7d4842d8..40c0d7d8ae3 100644 --- a/luaui/Widgets/unit_transport_ai.lua +++ b/luaui/Widgets/unit_transport_ai.lua @@ -1,5 +1,7 @@ include("keysym.h.lua") +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Transport AI", diff --git a/luaui/Widgets/unit_waypoint_dragger_2.lua b/luaui/Widgets/unit_waypoint_dragger_2.lua index 6be1c63f2fd..9d86ea73fd8 100644 --- a/luaui/Widgets/unit_waypoint_dragger_2.lua +++ b/luaui/Widgets/unit_waypoint_dragger_2.lua @@ -1,3 +1,5 @@ +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Waypoint Dragger", diff --git a/luaui/Widgets/widget_selector.lua b/luaui/Widgets/widget_selector.lua index 6d8474c9b25..094b91ca139 100644 --- a/luaui/Widgets/widget_selector.lua +++ b/luaui/Widgets/widget_selector.lua @@ -16,6 +16,8 @@ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- +local widget = widget ---@type Widget + function widget:GetInfo() return { name = "Widget Selector", From 4806871596a33a18a6db12b920b4ac06cf0dc9a0 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Wed, 26 Mar 2025 23:56:57 +1100 Subject: [PATCH 07/11] Fix widget --- types/widget.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/widget.lua b/types/widget.lua index 4354cf94537..4ebd0ef7372 100644 --- a/types/widget.lua +++ b/types/widget.lua @@ -1,6 +1,6 @@ ---@meta ----@class Widget : Addon, Callins, UnsyncedCallins +---@class Widget : Addon, RulesUnsyncedCallins --- ---Widgets cannot control game logic and receive only unsynced callins. --- From 87770656b23af00b8288426eaf99eedee63fe4fa Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Wed, 26 Mar 2025 23:57:02 +1100 Subject: [PATCH 08/11] Fix gadget --- types/gadget.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/gadget.lua b/types/gadget.lua index aa8c6bea9e4..a4ed7a5b3d6 100644 --- a/types/gadget.lua +++ b/types/gadget.lua @@ -1,6 +1,6 @@ ---@meta ----@class Gadget : Addon, Callins, UnsyncedCallins, SyncedCallins +---@class Gadget : Addon, RulesSyncedCallins --- ---Gadgets can control game logic and receive synced and unsynced callins. --- From fd5e681b7916c1672059c5b3742e478352b95c19 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Thu, 27 Mar 2025 00:19:50 +1100 Subject: [PATCH 09/11] Add WG for widgets --- types/widget.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/widget.lua b/types/widget.lua index 4ebd0ef7372..6cedec061e0 100644 --- a/types/widget.lua +++ b/types/widget.lua @@ -20,4 +20,7 @@ ---@type Widget ---@diagnostic disable-next-line: lowercase-global -widget = nil \ No newline at end of file +widget = nil + +---Shared table for widets. +WG = {} \ No newline at end of file From 12f5508f0e187b31ccedde29239fea09c821a451 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Thu, 27 Mar 2025 00:38:05 +1100 Subject: [PATCH 10/11] Cast type of "upget" --- common/upgets/api_resource_spot_finder.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/upgets/api_resource_spot_finder.lua b/common/upgets/api_resource_spot_finder.lua index 83b0bb3678d..a0fe0b9cdfb 100644 --- a/common/upgets/api_resource_spot_finder.lua +++ b/common/upgets/api_resource_spot_finder.lua @@ -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 From bc0706a891e7e4b4d44957c6d48b98f4b94c0585 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Thu, 27 Mar 2025 00:39:03 +1100 Subject: [PATCH 11/11] Prefer PascalCase filenames --- types/{addon.lua => Addon.lua} | 0 types/{gadget.lua => Gadget.lua} | 0 types/{widget.lua => Widget.lua} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename types/{addon.lua => Addon.lua} (100%) rename types/{gadget.lua => Gadget.lua} (100%) rename types/{widget.lua => Widget.lua} (100%) diff --git a/types/addon.lua b/types/Addon.lua similarity index 100% rename from types/addon.lua rename to types/Addon.lua diff --git a/types/gadget.lua b/types/Gadget.lua similarity index 100% rename from types/gadget.lua rename to types/Gadget.lua diff --git a/types/widget.lua b/types/Widget.lua similarity index 100% rename from types/widget.lua rename to types/Widget.lua