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

class reference proofreading #47140

Merged
merged 1 commit into from
Mar 19, 2021
Merged

Conversation

paulloz
Copy link
Member

@paulloz paulloz commented Mar 18, 2021

Hi 🙂
I was looking for something utterly specific in the docs earlier and saw a few typos/weird things. So I made a dirty script to send all the XML content through my local LanguageTool server and quickly proofread the errors that made the most sense fixing.

I'm not used to PR-ing the class reference, so I hope I didn't make a mistake in the process of updating this.

@paulloz paulloz requested a review from a team as a code owner March 18, 2021 19:09
@Calinou
Copy link
Member

Calinou commented Mar 18, 2021

I was looking for something utterly specific in the docs earlier and saw a few typos/weird things. So I made a dirty script to send all the XML content through my local LanguageTool server and quickly proofread the errors that made the most sense fixing.

I've been there too 👀

@@ -261,7 +261,7 @@
The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed.
</member>
<member name="reset_on_save" type="bool" setter="set_reset_on_save_enabled" getter="is_reset_on_save_enabled" default="true">
This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation applied (as if it had been seeked to time 0), then reverted after saving.
This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation applied (as if it had been sought to time 0), then reverted after saving.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know "seeked" is an invalid form of the English verb "seek", but in this context (and throughout the API, as well as in other APIs), it's used with a different meaning.

"Seeking" is the action of changing the read or playback position for files or streams, and in this context I think that "seeked" (as "seek" action has been performed) is clearer than an irregular past participle that many may not know.

$ rg seeked
thirdparty/misc/stb_vorbis.c
226:// previous ones (e.g. you've seeked in the data); future attempts to decode

thirdparty/opus/opusfile.c
364:        /*We fell off the end of the link, which means we seeked back too far

thirdparty/libvorbis/vorbisfile.c
259:          /* we fell off the end of the link, which means we seeked

scene/animation/animation_tree.cpp
90:void AnimationNode::blend_animation(const StringName &p_animation, float p_time, float p_delta, bool p_seeked, float p_blend) {
117:    anim_state.seeked = p_seeked;
422:    ClassDB::bind_method(D_METHOD("blend_animation", "animation", "time", "delta", "seeked", "blend"), &AnimationNode::blend_animation);
856:                    bool seeked = as.seeked;
1057:                                           if (seeked) {
1166:                                           if (delta == 0 || seeked) {
1188:                                                   if (player2->is_playing() || seeked) {

scene/animation/animation_player.cpp
344:void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float p_time, float p_delta, float p_interp, bool p_is_current, bool p_seeked, bool p_started) {
611:                            if (p_seeked) {
711:                            if (p_delta == 0 || p_seeked) {
733:                                    if (player->is_playing() || p_seeked) {
770:void AnimationPlayer::_animation_process_data(PlaybackData &cd, float p_delta, float p_blend, bool p_seeked, bool p_started) {
816:    _animation_process_animation(cd.from, cd.pos, delta, p_blend, &cd == &playback.current, p_seeked, p_started);
824:    _animation_process_data(c.current, p_delta, 1.0f, c.seeked && p_delta != 0, p_started);
826:            c.seeked = false;
1220:   c.seeked = false;
1332:   playback.seeked = true;
1377:           playback.seeked = true; //need to restart stuff, like audio
1724:   playback.seeked = false;

scene/animation/animation_tree.h
72:             bool seeked;
107:    void blend_animation(const StringName &p_animation, float p_time, float p_delta, bool p_seeked, float p_blend);

scene/animation/animation_player.h
240:            bool seeked;
257:    void _animation_process_animation(AnimationData *p_anim, float p_time, float p_delta, float p_interp, bool p_is_current = true, bool p_seeked = false, bool p_started = false);
260:    void _animation_process_data(PlaybackData &cd, float p_delta, float p_blend, bool p_seeked, bool p_started);

doc/classes/AnimationNode.xml
32:                     <argument index="3" name="seeked" type="bool">

editor/script_editor_debugger.h
222:    void _profiler_seeked();

editor/script_editor_debugger.cpp
1719:void ScriptEditorDebugger::_profiler_seeked() {
2363:   ClassDB::bind_method(D_METHOD("_profiler_seeked"), &ScriptEditorDebugger::_profiler_seeked);
2590:           profiler->connect("break_request", this, "_profiler_seeked");

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's fair.

@@ -81,7 +81,7 @@
</argument>
<description>
Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. [b]This method only accepts gzip and deflate compression modes.[/b]
This method is potentially slower than [code]decompress[/code], as it may have to re-allocate it's output buffer multiple times while decompressing, where as [code]decompress[/code] knows it's output buffer size from the beginning.
This method is potentially slower than [code]decompress[/code], as it may have to re-allocate it's output buffer multiple times while decompressing, whereas [code]decompress[/code] knows it's output buffer size from the beginning.
Copy link
Member

@akien-mga akien-mga Mar 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This method is potentially slower than [code]decompress[/code], as it may have to re-allocate it's output buffer multiple times while decompressing, whereas [code]decompress[/code] knows it's output buffer size from the beginning.
This method is potentially slower than [code]decompress[/code], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [code]decompress[/code] knows its output buffer size from the beginning.

@@ -14,7 +14,7 @@
<return type="String">
</return>
<description>
Returns a translated name of the current constant in the Godot Shader Language. eg. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
Returns a translated name of the current constant in the Godot Shader Language. e.g. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Returns a translated name of the current constant in the Godot Shader Language. e.g. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
Returns a translated name of the current constant in the Godot Shader Language. E.g. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].

@@ -49,6 +49,7 @@
[/csharp]
[/codeblocks]
The following code will set [code]can_shoot[/code] to [code]false[/code] and start a timer. This will prevent player from shooting until the timer runs out. Next [code]can_shoot[/code] will be set to [code]true[/code] again allowing player to shoot once again.
[codeblocks]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird that this wasn't giving a warning with makerst.py :|

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple comments but looks great overall!

@akien-mga akien-mga merged commit ec3f220 into godotengine:master Mar 19, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Mar 19, 2021
@paulloz
Copy link
Member Author

paulloz commented Mar 19, 2021

As a side note, one thing LanguageTool suggested I didn't end up doing (I wasn't sure it was necessary) was removing "of" in every construction like "inside/outside of the ...". Here's the rule details.
E.g.

This container fits controls inside of the delimited area.
Clips the area outside of the region.
Attenuates the frequencies inside of a range around the AudioEffectFilter.cutoff_hz and cuts frequencies outside of this band.

@akien-mga
Copy link
Member

Cherry-picked for 3.3.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Mar 26, 2021
@aaronfranke
Copy link
Member

@akien-mga The documentation here is incorrect in 3.3 and 3.x, as the default FOV is 70, but it says 75 in this cherry-picked doc.

@akien-mga
Copy link
Member

@akien-mga The documentation here is incorrect in 3.3 and 3.x, as the default FOV is 70, but it says 75 in this cherry-picked doc.

PR welcome to fix it :)

@paulloz paulloz deleted the class-reference branch December 18, 2021 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants