You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling all Scribes! In the spell palette, we currently have documentation like this:
But some of these things are written with JavaScript-specific syntax. We need to extend all the current Components' property documentation to handle the new syntax for Python, CoffeeScript, Lua, Clojure and Io.
There's a new process with this that just uses the level editor patch system, so you don't have to set up your dev environment or anything.
There are too many properties/languages to easily track who is working on what in this GitHub issue, so please use this Google Doc to mark when you are doing or have done things, since we can't merge patches instantly. Note that not all properties have any syntax differences between languages, so many fields can just be marked done with no changes.
Different levels will have a few different Components needing documentation, but most are shared between most levels.
2. Click the Components tab.
3. Click on one of the Components.
4. Click the Component's Settings sub-tab.
5. Open the Property Documentation at the bottom.
6. Translate the JavaScript documentation into your programming language.
Look at programmable.Allied for a good example. Switch each field that has JavaScript-specific syntax to a multiple-language field, preserving the JavaScript one in a new javascript field, and adding your target language as another field.
Here's an example of changing from single-language (JavaScript) to multi-language:
7. Click "Submit Patch" under the chevron for the component to submit a patch (upper right).
8. Mark your language/Component "done" in the spreadsheet.
So, I have completed most of the snippets and python documentation with the exception of the programming.UsesXYZ components as the methods and properties for these components are not the same in different languages. Not sure how to work with that.
We could leave them for now, or we could document them using code-language-specific syntax, because actually it's mostly just the JavaScript builtins which are available regardless of language.
Since I am in checking them all, should those items already with Lua snippets using 'self' be changed to 'hero'? eg actions.Acts, isReady snippet is self:isReady("${1:cleave}")
Did a heap of component patches, but wasn't logged in... so all those seemingly random Lua additions and changing self to hero patches were me in case you wondered.
Activity
nemoyatpeace commentedon Jul 9, 2014
So as long as the level contains the component, it can be adjusted and patched in that level.
Could I just make a new level and add a thang that has every component, then patch it that way?
nwinter commentedon Jul 9, 2014
Yes, that should work (as long as none of the components conflict with each other so horribly as to break the level–I think they won't, but not sure).
nemoyatpeace commentedon Jul 11, 2014
So, I have completed most of the snippets and python documentation with the exception of the programming.UsesXYZ components as the methods and properties for these components are not the same in different languages. Not sure how to work with that.
nwinter commentedon Jul 11, 2014
We could leave them for now, or we could document them using code-language-specific syntax, because actually it's mostly just the JavaScript builtins which are available regardless of language.
gsaines commentedon Nov 20, 2014
https://app.asana.com/0/15388757953815/20686183437388
reesylou commentedon Jun 8, 2017
I have added Lua to most of the Snippets, and am gradually working through the other items. Is the spreadsheet still used/up to date?
nwinter commentedon Jun 8, 2017
Thanks @reesylou! The spreadsheet isn't up-to-date, so the latest state of what has property documentation and snippets is just going to be the Components themselves in the level editor. Most of the important ones are present in my test level, https://direct.codecombat.com/editor/level/items.
reesylou commentedon Jun 9, 2017
Since I am in checking them all, should those items already with Lua snippets using 'self' be changed to 'hero'? eg actions.Acts, isReady snippet is self:isReady("${1:cleave}")
nwinter commentedon Jun 9, 2017
Yes, and not just Lua, but the other languages, too. But it's not that big a deal, because we automatically convert to the new
heroformat on the front-end in absence of writing some code to do the data migration in the backend: https://github.com/codecombat/codecombat/blob/master/app/views/play/level/tome/editor/autocomplete.coffee#L285-L293reesylou commentedon Jun 10, 2017
Did a heap of component patches, but wasn't logged in... so all those seemingly random Lua additions and changing self to hero patches were me in case you wondered.