From 63371f4ae772a48ed827ccaf9b22959d8135c447 Mon Sep 17 00:00:00 2001 From: Pollux <39353174+Pollux12@users.noreply.github.com> Date: Sun, 26 Jul 2026 23:59:03 +0100 Subject: [PATCH] Allow partial Derma skin definitions --- __tests__/custom-annotations.spec.ts | 7 +++++++ custom/derma.DefineSkin.lua | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/__tests__/custom-annotations.spec.ts b/__tests__/custom-annotations.spec.ts index cc5e0c4..b4769c8 100644 --- a/__tests__/custom-annotations.spec.ts +++ b/__tests__/custom-annotations.spec.ts @@ -141,6 +141,13 @@ describe('custom and plugin annotation smoke checks', () => { expect(tableCopyBlock).toContain('function table.Copy(originalTable, lookupTable) end'); }); + test('derma.DefineSkin accepts partial skin tables', () => { + const defineSkin = readCustom('derma.DefineSkin.lua'); + + expect(defineSkin).toContain('---@param skin table Table containing skin data. Missing values inherit from the Default skin.'); + expect(defineSkin).not.toContain('---@param skin SKIN'); + }); + test('source-backed VGUI lookup and creation overrides expose nil failure paths', () => { const vguiLua = readOutput('vgui.lua'); const createBlock = vguiLua.match( diff --git a/custom/derma.DefineSkin.lua b/custom/derma.DefineSkin.lua index 3fd35b3..7f22abb 100644 --- a/custom/derma.DefineSkin.lua +++ b/custom/derma.DefineSkin.lua @@ -5,5 +5,5 @@ ---@[call_arg("gmod.derma_skin", "define")] ---@param name string Name of the skin. ---@param description string Description of the skin. ----@param skin SKIN Table containing skin data. +---@param skin table Table containing skin data. Missing values inherit from the Default skin. function derma.DefineSkin(name, description, skin) end