skyrim-multiplayer / skymp

Multiplayer Mod & TypeScript SDK for Skyrim Special Edition
Other
221 stars 75 forks source link

internal: support both server-side and client-side objects in wip_sp3.js #2206

Closed Pospelove closed 2 weeks ago

Pospelove commented 2 weeks ago

[!IMPORTANT] Adds assign function in wip_sp3.js to support server-side and client-side object properties, updating constructors and methods to use it.

  • Behavior:
    • Introduces assign function in wip_sp3.js to handle server-side and client-side object properties.
    • assign function checks for desc and type for server-side objects, and _skyrimPlatform_indexInPool for client-side objects.
    • Replaces direct property assignments with assign in createSkyrimPlatform() for constructors and methods.
  • Functions:
    • Modifies createSkyrimPlatform() to use assign for resWithClass in constructors and methods.
    • Updates from method to use assign for object conversion.
  • Misc:
    • Removes redundant property assignments in favor of assign function.

This description was created by Ellipsis for fe634c126a094e3c5f812d1d3e47a1aad697c2ee. It will automatically update as commits are pushed.