#2842 closed enhancement (invalid)
[PATCH] Allow ReRegistering a Global even when not hotloading.
Reported by: | Radagast | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
Currently only hotloading allows to reregister a global. It would be nice to allow to reregister globals too to increase moddability (without that the whole file has to be copied which is difficult to maintain).
Attachments (1)
Change History (6)
by , 10 years ago
Attachment: | allow_reregistering_of_globals.diff added |
---|
comment:1 by , 10 years ago
Keywords: | review patch added |
---|
comment:2 by , 10 years ago
Hello Rada, your patch doesn't compile, you have forgotten to add the function definition to the header file.
About the requested functionality, I don't think it's a good idea: as explained in the RegisterGlobal function, resetting globals is unsafe. When a mod has to modify a global, it's probably better to change the scope of the variable in the public mod (as in #2671). Some globals shouldn't be moddable.
Unless you can think of situations where what this ticket proposes is wanted, I think the request here is invalid. Tell us :)
comment:3 by , 10 years ago
Your words make sense. I did quickly throw this patch together when I encountered a global-related error when modding the GUI. The error in the meantime could be resolved. Not only is this proposal untested, it's also absolutely invalid. Thanks for caring.
comment:4 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:5 by , 10 years ago
Keywords: | review removed |
---|---|
Milestone: | Alpha 18 |
a proposal