Jonathan

Results 17 issues of Jonathan

Changed Downloadables to accept iterable on initialization. Fixed Downloadables.update to correctly add downloadables to stringtable. Added add_from_file/remove_from_file functions to Downloadables. Examples: ```python from stringtables.downloads import Downloadables downloadables = Downloadables(("downloadable_path_1.vtf", "downloadable_path_2.vtf"))...

enhancement

The function ConVar_Unregister unregisters all ConVar/ConCommand and should not be used. Output: ``` plugin_print Loaded plugins: --------------------- 0: "Source.Python, (C) 2012-2021, Source.Python Team." 1: "Metamod:Source 1.11.0-dev+1145" --------------------- meta version Metamod:Source...

There is already `OnConVarChanged`, but it is wasteful if you only want to know the changes of a specific ConVar. This was made to match SourceMod's AddChangeHook feature. https://wiki.alliedmods.net/ConVars_(SourceMod_Scripting)#Change_Callbacks Code:...

This draft is derived from #332 & https://github.com/Source-Python-Dev-Team/Source.Python/issues/332#issuecomment-674310749 & https://github.com/Source-Python-Dev-Team/Source.Python/commit/14a38d4c5f19cf5f31e4b7c6477a5f7ed8595c28 Currently, there are ongoing discussions on how to implement the feature. I've made a pull request as a draft for...

[`Guest groups in auth`](https://github.com/Source-Python-Dev-Team/Source.Python/blob/972547be070e74a3f785284cefef53d98fab83c8/addons/source-python/docs/source-python/source/general/config-auth.rst#assigning-permissions-to-guests) are very useful, however it is very difficult to strip certain permissions/parents from the guest group. The guest group is expected to set permissions over features...

enhancement

Code: ```python from memory import Pointer from memory import alloc def test_pointer(): ptr = alloc(4) Pointer(ptr) test_pointer() ``` Output: ``` free(): double free detected in tcache 2 ``` This also...

bug

What pointer_attribute expects is [CustomType](https://github.com/Source-Python-Dev-Team/Source.Python/blob/0171b36297c23d480c17631561c98c0ff2afca28/addons/source-python/packages/source-python/memory/manager.py#L48C10-L48C10) not [Array/BasePointer](https://github.com/Source-Python-Dev-Team/Source.Python/blob/0171b36297c23d480c17631561c98c0ff2afca28/addons/source-python/packages/source-python/memory/helpers.py#L202). https://github.com/Source-Python-Dev-Team/Source.Python/blob/0171b36297c23d480c17631561c98c0ff2afca28/addons/source-python/packages/source-python/memory/helpers.py#L235-L237 https://github.com/Source-Python-Dev-Team/Source.Python/blob/0171b36297c23d480c17631561c98c0ff2afca28/addons/source-python/packages/source-python/memory/manager.py#L496-L525 And even if the Array inherits CustomType, the pointers set in the Array will be immediately discarded if not managed independently...

bug

1. The values given to pointer_attribute are managed by CustomType's [_allocated_pointers](https://github.com/Source-Python-Dev-Team/Source.Python/blob/0171b36297c23d480c17631561c98c0ff2afca28/addons/source-python/packages/source-python/memory/manager.py#L90)/[_pointer_values](https://github.com/Source-Python-Dev-Team/Source.Python/blob/0171b36297c23d480c17631561c98c0ff2afca28/addons/source-python/packages/source-python/memory/manager.py#L94), but since CustomType may be generated from raw pointers, CustomType cannot have ownership of the value. This applies to...

Entity has a mechanism to speed up the retrieval of dynamic_attributes/server_classes, but TypeManager itself does not. With this improvement, instances created by TypeManager can speed up the retrieval of function/virtual_function....