bi
76c2e2cd21
[Commands List GUI] fix wrong commands' offset
2018-07-16 16:25:36 +03:00
Aussiemon
6a389d3a6f
#21 Sanitize clipboard paste
2018-06-27 18:00:49 -06:00
FireSiku
9f05b8a326
Rehooking will only happen when allow_rehooking is set to true
2018-06-27 16:46:19 -04:00
FireSiku
4cbdba8951
Code refactor based on UnShame's advice
...
local functions will now use `mod` instead of `self` to be more clear about intent.
_registry now holds hook_data and nothing else, as a registry should. This will make it easier to implement the hook debugging utilities planned later on.
_registry.hooks and _registry.origs have been renamed to _hooks and _origs.
mod:enable_all_hooks and mod:disable_all_hooks are now both calling the internal toggle_all_hooks_for_mod function to be consistent with the rest of the API.
2018-06-27 16:11:51 -04:00
FireSiku
28bc668747
Hooks: Allow updating hook handler without affecting order.
...
It will throw an error if you're trying to update a hook using a different hook_type api to prevent any weirdness by jumping from one chain to the other.
Also created a specialized function for hook_data initialization.
2018-06-27 16:11:51 -04:00
bi
49e4d427d4
Settings: little style changes
2018-06-23 15:51:23 +03:00
bi
603f78b0c5
Misc: little style changes
2018-06-21 10:20:27 +03:00
bi
13727c1adc
VMF Mod Data: got rid of 'is_togglable' and 'is_mutator' methods
2018-06-21 09:40:02 +03:00
bi
a172f72c0a
VMF Mod Data: updated external change protection
2018-06-20 00:26:33 +03:00
bi
b5a9699bd8
VMF Mod Data: changed several comments
2018-06-19 17:38:17 +03:00
bi
391c1ca65f
VMF Mod Data: refactoring, adding modification protection
2018-06-19 17:05:38 +03:00
bi
cb0e0b5585
Chat Actions: little style change
2018-06-19 17:02:30 +03:00
bi
15f7194629
Fixed error fest in mutators test file
2018-06-19 16:28:22 +03:00
bi
e0e519fbad
Updated hooks definitions
2018-06-18 19:50:58 +03:00
bi
5b153657e7
VMF Options: fixed duplicated option's name in tooltip
2018-06-18 18:41:29 +03:00
bi
d825003301
Logging: fixed duplicating mod output in log
2018-06-18 18:36:01 +03:00
bi
1b5111d067
Safe Calls: moved to a separate file
2018-06-11 19:52:40 +03:00
bi
4824e6a5c8
Misc: little style changes
2018-06-11 19:51:49 +03:00
bi
4a6fb28b86
Renamed 'core_functions' to 'misc'
2018-06-11 19:36:30 +03:00
bi
315e45165d
Logging: moved to a separate file
2018-06-11 18:58:40 +03:00
bi
e1f515e4ef
Mutators: updated testing script
2018-06-11 15:20:18 +03:00
bi
a271e08f16
Mutators GUI: fixed dissapearing mutators while trying to scroll
2018-06-11 15:14:37 +03:00
Azumgi
4b890a616a
Merge pull request #14 from FireSiku/new_hooks
...
Delay disabling delayed hooks and fix a crash
2018-06-11 10:30:55 +03:00
FireSiku
8a13ec1bf9
Hooks's active status is based on mod's enabled status now.
...
Also, allow hook_enable and hook_disable to be delayed as well.
2018-06-11 03:15:44 -04:00
FireSiku
bee94c1665
Throw error if mod is trying to hook something that isnt a function
2018-06-10 20:35:49 -04:00
FireSiku
6b06745986
Only disable delaying when the state is set to Ingame.
2018-06-10 18:27:57 -04:00
Azumgi
32ce5e6fc9
Merge pull request #13 from FireSiku/events
...
Move event-checking logic inside run_event
2018-06-10 01:45:32 +03:00
Azumgi
4e9fc3a9c2
Merge pull request #9 from FireSiku/new_hooks
...
New Hook System
2018-06-10 01:45:12 +03:00
FireSiku
5f5ef1d317
Move event-checking logic inside run_event
2018-06-09 14:32:48 -04:00
bi
c4d5890f7e
Events: reverted back 'update' behaviour for disabled mods
2018-06-09 20:56:38 +03:00
FireSiku
2f5bfd989a
Spelling checks and logging updates
2018-06-09 13:53:34 -04:00
FireSiku
dd31894cd2
Safe hooks are now truly safe: Handler functions are xpcall'd
2018-06-08 19:13:00 -04:00
bi
7b4bba89c0
Commands: refactoring
2018-06-08 14:37:20 +03:00
bi
fcb0b570d8
Commands: fixed crash if description wasn't specified
2018-06-08 14:28:05 +03:00
bi
977ec7558f
Commands: restricted command name to have only [a-z, A-Z, 0-9, _] chars
2018-06-08 13:29:49 +03:00
bi
f6c62a949a
Mutators: little style changes
2018-06-08 12:03:23 +03:00
bi
a79d879de0
VMF Loader: little style changes
2018-06-08 11:20:47 +03:00
bi
b34a00d57f
VMF Mod Manager: disabled compatibility with the old 'new_mod' structure
2018-06-08 11:17:12 +03:00
bi
1ee5beaa76
VMF Mod Manager: little style changes
2018-06-08 11:15:49 +03:00
FireSiku
0380e9f4a8
Adding small hook creation info log.
2018-06-08 03:01:28 -04:00
FireSiku
4af4cd5f75
Fix a few edge cases and correctly error if the function doesn't exist.
2018-06-08 01:56:26 -04:00
FireSiku
722bc35f60
Rename newhooks.
2018-06-07 23:12:33 -04:00
FireSiku
55ebff741b
Removed old hooks.lua
2018-06-07 23:10:42 -04:00
FireSiku
007fabfae4
Some final changes that were discussed on discord.:rawhook has been renamed :hook_origin, making it a much better name.:after has been renamed :hook_safe.:before has been removed.
2018-06-07 23:02:39 -04:00
FireSiku
5287ce2569
Throw an error if it cannot find an object after everything is loaded.
...
The delayed hooking implementation didn't have a flag to say when to stop trying to delay hooks that do not exist.
2018-06-07 23:00:36 -04:00
FireSiku
fa393c4f78
Prevent creating multiple hooks on the same function using different API
2018-06-07 22:58:18 -04:00
FireSiku
099b9db187
Fix issue where hooks arent delayed properly.
...
Under certain conditions, get_object_from_string could return that a hook needs to be delayed, but also return nil instead of the string.
2018-06-07 22:37:47 -04:00
FireSiku
f195b10e7d
Make sure to restore original functions when reloading vmf.
2018-06-07 22:37:47 -04:00
FireSiku
f6baeb4ccd
Send function name instead of hook_type to generic functions.
...
This makes it much easier to give the function name in the error/warning messages and we can easily get the hook type based on function name.
Also, swap around enable_hook and similar function to hook_enable format to keep backward-compatibility with existing mods.
2018-06-07 19:33:17 -04:00
FireSiku
9d554418f4
Added generic_hook_toggle
...
Instead of having a single enable/disable_hook call that requires modders to know hook type IDs, make separate APIs for all types.
This also makes it much easier in the future to improve the system or handle new use case scenarios easily.
2018-06-07 19:32:05 -04:00