Facepunch / garrysmod-requests

Feature requests for Garry's Mod
86 stars 24 forks source link

broaden gamemodes/*/entities whitelist #2250

Closed EntranceJew closed 11 months ago

EntranceJew commented 11 months ago

Details

I'm not certain for the reasoning behind it, or what sort of legacy may exist, but I would really appreciate it if the whitelist for gamemodes wasn't so restrictive about the entities folder: https://github.com/Facepunch/gmad/blob/master/include/AddonWhiteList.h#L47-L49

It would be nice if TTT2 could move these gamemode-specific files into the gamemodes/terrortown/entities/ folder so that all the semantic entities/data files existed within reach of each-other, and all the library gamemode code could stay in lua/ as-is.

Right now, you can't even make arbitrary folders inside gamemodes/*/entities/ with those names and load files from them manually. I don't know what the reasoning for this may be, as seemingly a user could put any arbitrary lua in an ENT/SWEP/effect similarly. I would like to be able to do so.

For reference, here's a comparison of the strings listed if they were in order with each-other: image *.lmp is missing from the gamemodes side, otherwise, nothing else of note

TimGoll commented 11 months ago

Right now you can put them in there, at least items work. However GMod then moans about missing type and base keys. This is why we moved the TTT2 items to the lua folder. Original TTT addons still use the gamemodes/entities/items folder.

robotboy655 commented 11 months ago

The gamemodes/<gamemode>/entities/ folder is specifically for entities/effects/weapons for that gamemode. Any other custom data you can store in gamemodes/<gamemode>/gamemode/*.lua.