Supports named arguments in AddComponent and AddElement (#49098)

AddComponent/AddElement now support named arguments. This requires passing around an argument list instead of using actual proc args which a bit gross but we can blame byond for forcing this.

InheritComponent uses mirrored init arguments instead of an argument list which means no more accessing it via index to get to the same arguments as in init.

As a small bonus I restructured dcs defines to be a bit more manageable. Mainly just splits them into separate files and gives them their own folder.
This commit is contained in:
Emmett Gaines
2020-02-16 23:57:53 -05:00
committed by GitHub
parent 7b8fbcbd0c
commit 9e34b3d6a1
33 changed files with 619 additions and 577 deletions
@@ -69,10 +69,10 @@
lst.Insert(1, result)
if(result in componentsubtypes)
datumname = "component"
target.AddComponent(arglist(lst))
target._AddComponent(lst)
else
datumname = "element"
target.AddElement(arglist(lst))
target._AddElement(lst)
log_admin("[key_name(usr)] has added [result] [datumname] to [key_name(src)].")
message_admins("<span class='notice'>[key_name_admin(usr)] has added [result] [datumname] to [key_name_admin(src)].</span>")
if(href_list[VV_HK_CALLPROC])