Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Instance 'Context' with subclassing #39

Open
ColonelThirtyTwo opened this issue Jan 17, 2014 · 1 comment
Open

Replace Instance 'Context' with subclassing #39

ColonelThirtyTwo opened this issue Jan 17, 2014 · 1 comment

Comments

@ColonelThirtyTwo
Copy link
Contributor

See also: GmodStarfall/Starfall#139

The instance 'context' is a table of options for an instance, for example the ops limit. This was a carry-over design choice from E2 and does not work well with many options.

A more flexible approach would be to change settings by subclassing the instance and overriding the desired methods or values. This would also help libraries using SF to keep track of related data on an instance (ex. the processor 'entity')

@ColonelThirtyTwo
Copy link
Contributor Author

Here's a simple OOP library that can be adapted for gmod: https://gist.github.com/ColonelThirtyTwo/7401493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant