Comments (5)
I pushed it in 134a8c7 - should be usable if you depend on this commit directly. I'll do some cleanup, better diagnostics and release a new version tomorrow.
from cvars.
Yeah, #[cvars(skip)]
shouldn't be too hard. Probably a bad idea to check for a different crate's attributes though - too surprising behavior.
from cvars.
Got a (very obvious in hindsight) idea: A #[cvars(readonly)]
-attribute, for fields that can only be inspected. Could be used for both scripting and making a field read-only when using the release-profile. Should a new issue be created for such a feature?
from cvars.
Can you tell me a bit about what you want the attribute for?
I think long-term i'll add C# style property getters and setters. What you want could probably be supported by those but i wonder why you even want a configuration variable that can't be configured.
from cvars.
Only took over a year but the latest published version now supports skipping fields.
I don't think more attributes like readonly
are worth the complexity. I'd rather add a way to hook into the way consoles execute commands so gamedevs can do whatever they want there and for example only allow players to set cvars with certain prefixes.
from cvars.
Related Issues (20)
- Show the cvar's doc comment in console HOT 1
- Compile times HOT 2
- Accept 0 or 1 as bool HOT 1
- Integer ID's? HOT 2
- Console features
- Present doc comments to the user HOT 1
- Optimization: avoid `collect()` HOT 1
- Evaluate https://crates.io/crates/bevy_reflect
- Add support for `pub(crate)`
- Evaluate https://github.com/erayerdin/cheats
- Use cargo-semver-checks
- A way to get the number of cvars HOT 1
- Option to check whether cvars are sorted
- Remove "experimental" from `cvars! {}` after testing in rec-wars / rustcycles
- Feature: Nested structs
- Feature: Commands
- Allow doc comments (and other attributes) on the Cvars struct HOT 1
- Make console configurable again (use string API)
- Aliases
- Try it out link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cvars.