Skip to content

Commit 18d10eb

Browse files
committed
Update struct test to compare to the new way of creating structs
1 parent 1185ee8 commit 18d10eb

File tree

1 file changed

+71
-19
lines changed

1 file changed

+71
-19
lines changed

__tests__/test-data/offline-sites/gmod-wiki/struct-custom-entity-fields.ts

Lines changed: 71 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,77 @@ This can also be set from map, see <page>Sandbox Specific Mapping</page></item>
4646
4747
</structure>`;
4848

49-
export const apiDefinition = `---@class Custom_Entity_Fields
50-
---@field GetEntityDriveMode function \`Serverside\`, Sandbox and Sandbox derived only. Called by the Drive property to override the default drive type, which is \`drive_sandbox\`.
51-
---@field OnEntityCopyTableFinish function Documented at ENTITY:OnEntityCopyTableFinish.
52-
---@field PostEntityCopy function Documented at ENTITY:PostEntityCopy.
53-
---@field PostEntityPaste function Documented at ENTITY:PostEntityPaste.
54-
---@field PreEntityCopy function Documented at ENTITY:PreEntityCopy.
55-
---@field OnDuplicated function Documented at ENTITY:OnDuplicated.
56-
---@field PhysgunDisabled boolean \`Shared\`, Sandbox or Sandbox derived only. If set to \`true\`, physgun will not be able to pick this entity up. This can also be set from map, see Sandbox Specific Mapping
57-
---@field PhysgunPickup function \`Shared\`, Sandbox or Sandbox derived only. Called from GM:PhysgunPickup, overrides \`PhysgunDisabled\`
58-
---@field m_tblToolsAllowed table \`Shared\`, Sandbox or Sandbox derived only. Controls which tools **and** properties can be used on this entity. Format is a list of strings where each string is the tool or property classname. This can also be set from map, see Sandbox Specific Mapping
59-
---@field GravGunPickupAllowed function Documented at ENTITY:GravGunPickupAllowed.
60-
---@field GravGunPunt function Documented at ENTITY:GravGunPunt.
61-
---@field CanProperty function Documented at ENTITY:CanProperty.
62-
---@field CanTool function Documented at ENTITY:CanTool.
63-
---@field CalcAbsolutePosition function Documented at ENTITY:CalcAbsolutePosition.
64-
---@field RenderOverride function Documented at ENTITY:RenderOverride.
65-
---@field m_RenderOrigin Vector (Clientside) Do not use.
66-
---@field m_RenderAngles Angle (Clientside) Do not use.
67-
local Custom_Entity_Fields = {}\n\n`;
49+
export const apiDefinition =
50+
`---@class Custom_Entity_Fields
51+
local Custom_Entity_Fields = {}
52+
53+
---\`Serverside\`, Sandbox and Sandbox derived only. Called by the Drive property to override the default drive type, which is \`drive_sandbox\`.
54+
---@type function
55+
Custom_Entity_Fields.GetEntityDriveMode = nil
56+
57+
---Documented at ENTITY:OnEntityCopyTableFinish.
58+
---@type function
59+
Custom_Entity_Fields.OnEntityCopyTableFinish = nil
60+
61+
---Documented at ENTITY:PostEntityCopy.
62+
---@type function
63+
Custom_Entity_Fields.PostEntityCopy = nil
64+
65+
---Documented at ENTITY:PostEntityPaste.
66+
---@type function
67+
Custom_Entity_Fields.PostEntityPaste = nil
68+
69+
---Documented at ENTITY:PreEntityCopy.
70+
---@type function
71+
Custom_Entity_Fields.PreEntityCopy = nil
72+
73+
---Documented at ENTITY:OnDuplicated.
74+
---@type function
75+
Custom_Entity_Fields.OnDuplicated = nil
76+
77+
---\`Shared\`, Sandbox or Sandbox derived only. If set to \`true\`, physgun will not be able to pick this entity up. This can also be set from map, see Sandbox Specific Mapping
78+
---@type boolean
79+
Custom_Entity_Fields.PhysgunDisabled = nil
80+
81+
---\`Shared\`, Sandbox or Sandbox derived only. Called from GM:PhysgunPickup, overrides \`PhysgunDisabled\`
82+
---@type function
83+
Custom_Entity_Fields.PhysgunPickup = nil
84+
85+
---\`Shared\`, Sandbox or Sandbox derived only. Controls which tools **and** properties can be used on this entity. Format is a list of strings where each string is the tool or property classname. This can also be set from map, see Sandbox Specific Mapping
86+
---@type table
87+
Custom_Entity_Fields.m_tblToolsAllowed = nil
88+
89+
---Documented at ENTITY:GravGunPickupAllowed.
90+
---@type function
91+
Custom_Entity_Fields.GravGunPickupAllowed = nil
92+
93+
---Documented at ENTITY:GravGunPunt.
94+
---@type function
95+
Custom_Entity_Fields.GravGunPunt = nil
96+
97+
---Documented at ENTITY:CanProperty.
98+
---@type function
99+
Custom_Entity_Fields.CanProperty = nil
100+
101+
---Documented at ENTITY:CanTool.
102+
---@type function
103+
Custom_Entity_Fields.CanTool = nil
104+
105+
---Documented at ENTITY:CalcAbsolutePosition.
106+
---@type function
107+
Custom_Entity_Fields.CalcAbsolutePosition = nil
108+
109+
---Documented at ENTITY:RenderOverride.
110+
---@type function
111+
Custom_Entity_Fields.RenderOverride = nil
112+
113+
---(Clientside) Do not use.
114+
---@type Vector
115+
Custom_Entity_Fields.m_RenderOrigin = nil
116+
117+
---(Clientside) Do not use.
118+
---@type Angle
119+
Custom_Entity_Fields.m_RenderAngles = nil\n\n`;
68120

69121
export const json = {
70122
name: 'Custom_Entity_Fields',

0 commit comments

Comments
 (0)