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

Fix #2400 -- Removed ancient wisdom #2401

Merged
merged 3 commits into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/addons/AGX.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Note that this mod only adds action groups 11 through 250, it does not change ho
**Known limitations (Action groups 11 through 250 only):**

- On a nearby vessel that is not your current focus, an action group with no actions assigned will always return a state of False and can not be set to a state of true via the "AG15 on." command. Assign the Script Trigger action as a work-around for this.
- At this point, AG11 through AG250 do not officially support RemoteTech through kOS. (Support will happen once all three mods involved have updated to KSP version 1.0 and made any internal changes necessary.) All three mods can be installed at the same time without issue, just be aware there may be unexpected behaviour when using action groups 11 through 250 from a kOS script in terms of RemoteTech signal delay and connection state.
- At this point, AG11 through AG250 do not officially support RemoteTech through kOS. (Support will happen once all three mods involved have made any internal changes necessary.) All three mods can be installed at the same time without issue, just be aware there may be unexpected behaviour when using action groups 11 through 250 from a kOS script in terms of RemoteTech signal delay and connection state.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
**Action state monitoring**

Expand Down
10 changes: 4 additions & 6 deletions doc/source/addons/IR.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ Infernal Robotics introduces robotics parts to the game, letting you create movi

.. figure:: http://i.imgur.com/O94LBvF.png

Starting version 0.20 of the Infernal Robotics, mod creators introduced API to for easier access to robotic features.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
Access structure IRAddon via ``ADDONS:IR``.

.. structure:: IRAddon
Expand Down Expand Up @@ -53,7 +51,7 @@ Access structure IRAddon via ``ADDONS:IR``.
:type: :struct:`List` of :struct:`IRControlGroup` objects
:access: Get only

Lists all Servo Groups for the Vessel on which the script is being executed. On IR versions prior to 0.21.5 will always return servo groups for current focused vessel.
Lists all Servo Groups for the Vessel on which the script is being executed.
mathuin marked this conversation as resolved.
Show resolved Hide resolved
Example of use::

for g in ADDONS:IR:GROUPS
Expand All @@ -67,7 +65,7 @@ Access structure IRAddon via ``ADDONS:IR``.
:type: :struct:`List` of :struct:`IRServo` objects
:access: Get only

Lists all Servos for the Vessel on which the script is being executed. On IR versions prior to 0.21.5 will always return servos for current focused vessel.
Lists all Servos for the Vessel on which the script is being executed.
mathuin marked this conversation as resolved.
Show resolved Hide resolved
Example of use::

for s in ADDONS:IR:ALLSERVOS
Expand All @@ -94,7 +92,7 @@ Access structure IRAddon via ``ADDONS:IR``.
:attr:`FORWARDKEY` :ref:`string <string>` Key assigned to forward movement
:attr:`REVERSEKEY` :ref:`string <string>` Key assigned to reverse movement
:attr:`SERVOS` List (readonly) List of servos in the group
:attr:`VESSEL` :struct:`Vessel` Vessel object, owning this servo group. Readonly, requires IR version 0.21.5 or later.
:attr:`VESSEL` :struct:`Vessel` Vessel object, owning this servo group. Readonly.
mathuin marked this conversation as resolved.
Show resolved Hide resolved

:meth:`MOVERIGHT()` void Commands servos in the group to move in positive direction
:meth:`MOVELEFT()` void Commands servos in the group to move in negative direction
Expand Down Expand Up @@ -160,7 +158,7 @@ Access structure IRAddon via ``ADDONS:IR``.
:type: :struct:`Vessel`
:access: Get only

If IR 0.21.5 or later is installed will return a Vessel that owns this ServoGroup, otherwise will return current focused Vessel
Returns a Vessel that owns this ServoGroup
mathuin marked this conversation as resolved.
Show resolved Hide resolved

.. method:: IRControlGroup:MOVERIGHT()

Expand Down
2 changes: 0 additions & 2 deletions doc/source/addons/RemoteTech.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ of some of its suffixes.
RTAddon
~~~~~~~

Starting version 0.17 of kOS you can access structure RTAddon via ``ADDONS:RT``.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
.. structure:: RTAddon

===================================== ===================================== =============
Expand Down
6 changes: 0 additions & 6 deletions doc/source/commands/flight/cooked.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,6 @@ When the program ends, these automatically unlock as well, which means that to c
Tuning cooked steering
----------------------

.. note::
.. versionadded:: 0.18.0
This version of kOS completely gutted the internals of the old steering
system and replaced them with the system described below. Anything
said below this point is pertinent to version 0.18 and higher only.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
While cooked steering tries to come balanced to perform decently without user
interaction, there are some instances where you may need to help tune the
behavior. There are a number of settings you can adjust to tweak the
Expand Down
6 changes: 1 addition & 5 deletions doc/source/general/career_limits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@
Career Limits
=============

The theme of KSP 0.90 is that some features of your space program don't work until after you've made some upgrades.
The theme of KSP's "career mode" is that some features of your space program don't work until after you've made some upgrades.
mathuin marked this conversation as resolved.
Show resolved Hide resolved
kOS now supports enforcing these checks, as described below.

.. contents::
:local:
:depth: 2

.. warning::

.. These limitation enforcements do not exist in versions of kOS prior to kOS 0.15.4

mathuin marked this conversation as resolved.
Show resolved Hide resolved
The rules being enforced
------------------------

Expand Down
28 changes: 0 additions & 28 deletions doc/source/general/cpu_hardware.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ more advanced scripts. This page contains that type of information.
Update Ticks and Physics Ticks
------------------------------

.. note::
.. versionadded:: 0.17
Previous versions of kOS used to execute program code during the
Update phase, rather than the more correct Physics Update phase.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
Kerbal Space Program simulates the universe by running the universe in
small incremental time intervals that for the purpose of this
document, we will call "**physics ticks**". The exact length of time
Expand Down Expand Up @@ -78,12 +73,6 @@ other way around.
Electric Drain
--------------

.. versionadded:: 0.19.0
As of version 0.19.0, the electric charge drain varies depending
on CPU % usage. Prior to version 0.19.0, the CPU load made no
difference and the electric drain was constant regardless of
utilization.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
Real world CPUs often have low power modes, and sleep modes, and these are
vital to long distance probes. In these modes the computer deliberately
runs slowly in order to use less power, and then the program can tell it to
Expand Down Expand Up @@ -120,15 +109,6 @@ that update can make a big difference.
Triggers
--------

.. versionadded:: 0.19.3
Note that as of version 0.19.3 and up, the entire way that triggers
are dealt with by the underlying kOS CPU has been redesigned. In
previous versions it was not possible to have a trigger that lasts
longer than one **physics tick**, leading to a lot of warnings in
this section of the documentation. Many of those warnings are now
moot, which caused a re-write of most of this section of the
documentation.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
There are multiple things within kerboscript that run "in the background"
always updating, while the main script continues on. The way these work is
a bit like a real computer's interrupt handling system, but not *quite*.
Expand Down Expand Up @@ -370,14 +350,6 @@ Then even though the condition is immediately true, it will still wait one physi
CPU Update Loop
---------------

.. versionadded:: 0.19.3
As of version 0.19.3, the behaviour of triggers was changed
dramatically to enable triggers that last longer than one
*physics tick*, thereby causing the section of documentation
that follows to be completely re-written. If you were familiar
with triggers before 0.19.3, you should read the next section
carefully to be aware of what changed.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
.. versionadded:: 1.1.6.0
As of version 1.1.6.0, the entire layout of the CPU update loop
was re-written to handle the new trigger priority system.
Expand Down
2 changes: 0 additions & 2 deletions doc/source/general/parts_and_partmodules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Ship Parts and PartModules
==========================

As of v0.15, kOS has introduced the ability to access the functionality of Parts' actions, and right-click context menus. However, to understand how to use them it is necessary to first understand a little bit about the structure of parts in a vessel in Kerbal Space Program.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
In Kerbal Space Program, a Vessel is a collection of Parts arranged in a tree Structure. In kOS, you can access the parts one of two ways:

Tutorial
Expand Down
3 changes: 0 additions & 3 deletions doc/source/general/settingsWindows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ kOS Settings Windows
kOS Control Panel
-----------------

As of kOS v0.15, kOS now makes use of Kerbal Space Program's built-in
Application Launcher toolbar, to open a config/status panel for kOS.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
This panel behaves like the other display panels the launcher creates,
and operates mutually exclusively with them. (For example you can't
make the kOS App Control Panel appear at the same time as the stock
Expand Down
11 changes: 2 additions & 9 deletions doc/source/language/delegates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
Delegates (function references)
===============================

.. note::
.. versionadded:: 0.19.0
The delegate feature described on this page did not exist
prior to kOS 0.19.0.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
.. contents:: Contents
:local:
:depth: 2
Expand All @@ -32,9 +27,7 @@ Kerboscript provides this feature with a built-in type called a
:struct:`KOSDelegate`, which remembers the details needed
to be able to call a function later on.

The topic can be a bit confusing to people new to it, but this video,
produced shortly before the release of kOS 0.19.0 by one of the
(then new) collaborators of the team may help:
The topic can be a bit confusing to people new to it, but this video by one of the collaborators of the team may help:

`CheersKevin's explanation of delegates <https://www.youtube.com/watch?v=pcbURdU_WyU>`__

mathuin marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -392,7 +385,7 @@ Kinds of Delegate (no suffixes)
Under the hood, kOS handles several different kinds of "functions" and
methods that aren't actually implemented the same way. A ``KOSDelegate``
attempts to hide the details of these differences from the user, but
one difference in particular still stands out. In kOS version 0.19.0,
one difference in particular still stands out. As of kOS version 1.1.5.2,
mathuin marked this conversation as resolved.
Show resolved Hide resolved
you cannot reliably make a delegate of a suffix just yet. (*This is
intended as a future feature though. It's been put off because it
involves decisions that impact the future of the language and which, once
Expand Down
11 changes: 0 additions & 11 deletions doc/source/language/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ Structures are variables that contain more than one piece of information. For ex
PRINT "The Mun's periapsis altitude is: " + MUN:PERIAPSIS.
PRINT "The ship's surface velocity is: " + SHIP:VELOCITY:SURFACE.

.. note::
.. versionadded:: 0.19.0
As of this kOS version, in fact ALL values a script can see are
now a kind of :struct:`Structure <structure>`, even basic primitive
types such as Boolean and Scalar.


mathuin marked this conversation as resolved.
Show resolved Hide resolved
Many structures also let you set a specific component of them, for example::

SET VEC TO V(10,10,10). // A vector with x,y,z components
Expand All @@ -96,10 +89,6 @@ Structures also often contain methods. A method is a suffix of a structure that
PRINT PLIST:SUBLIST(0,4). // calling a suffix method with 2
// arguments that returns a list.

.. note::
.. versionadded:: 0.15
Methods now perform the activity when the interpreter comes up to it. Prior to this version, execution was sometimes delayed until some later time depending on the trigger setup or flow-control.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
For more information, see the :ref:`Structures Section <language structures>`. A full list of structure types can be found on the :ref:`Structures <structures>` page. For a more detailed breakdown of the language, see the :ref:`Language Syntax Constructs <syntax>` page.


Expand Down
4 changes: 0 additions & 4 deletions doc/source/language/syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,6 @@ Some suffixes are actually functions you can call. When that is the case, these
User Functions
--------------

.. note::
.. versionadded:: 0.17
This feature did not exist in prior versions of kerboscript.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
Help for the new user - What is a Function?
In programming terminology, there is a commonly used feature of
many programming languages that works as follows:
Expand Down
18 changes: 2 additions & 16 deletions doc/source/language/user_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,6 @@ expression, the expression will not get executed if the calling
function had an argument present in that position. The expression
only gets executed if the system needed to pad a missing argument.

.. note::
.. versionadded:: 0.18.3
Optional Parameters were added as a new feature in kOS 0.18.3



mathuin marked this conversation as resolved.
Show resolved Hide resolved
.. _interpreter functions:

Functions and the terminal interpreter
Expand All @@ -344,7 +338,7 @@ up jumping into random parts of your code that have nothing
to do with the actual function call you're trying to
make.

As a rule of thumb, in kOS 0.17.0, make sure you only use
As a rule of thumb, make sure you only use
functions from inside script programs. Don't try to call
them interactively from the interpreter prompt. You will
get very strange and (seemingly) inexplicable errors.
Expand Down Expand Up @@ -420,14 +414,6 @@ This is now **illegal** syntax::

declare x. // no initial value for x given.

.. warning::
.. versionadded:: 0.17
**Breaking Change:** The kerboscript from prior versions
of kOS did allow you do make ``declare`` statements
without any initializers in them (and in fact you couldn't
provide an initializer for them in prior versions even if
you wanted to).

mathuin marked this conversation as resolved.
Show resolved Hide resolved
In order to avoid the issue of having uninitialized variables in
kerboscript, any declare statement *requires* the use of the
initializer clause.
Expand Down Expand Up @@ -647,7 +633,7 @@ User Function Gotchas
Calling program's functions from the interpreter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As :ref:`explained above <interpreter functions>`, kOS 0.17.0 does
As :ref:`explained above <interpreter functions>`, kOS does
mathuin marked this conversation as resolved.
Show resolved Hide resolved
not support the calling of a function from the interpreter console
and if you attempt it you will get very strange and random errors
that you might waste a lot of time trying to track down.
Expand Down
44 changes: 1 addition & 43 deletions doc/source/language/variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ The following alternate versions have identical meaning to each other:
* ``GLOBAL`` *identifier* ``TO`` *expression* *dot*
* ``GLOBAL`` *identifier* ``IS`` *expression* *dot*

.. warning::
.. versionadded:: 0.17
** BREAKING CHANGE: **
The meaning, and syntax, of this statement changed considerably
in this update. Prior to this version, DECLARE always created
global variables no matter where it appeared in the script.
See 'initializer required' below.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
.. warning::
.. versionadded:: 1.5
** BREAKING CHANGE: **
Expand Down Expand Up @@ -124,16 +116,6 @@ global is to declare it explicitly with one of these DECLARE statements**.
Initializer required in DECLARE
:::::::::::::::::::::::::::::::

.. note::
.. versionadded:: 0.17
The syntax without the initializer, looking like so:

.. code-block:: kerboscript

DECLARE x. // no initializer like "TO 1."

is **no longer legal syntax**.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
Kerboscript now requires the use of the initializer clause (the "TO"
keyword) after the identifier name so as to make it impossible for
there to exist any uninitialized variables in a script.
Expand Down Expand Up @@ -245,12 +227,6 @@ expression, the expression will not get executed if the calling
function had an argument present in that position. The expression
only gets executed if the system needed to pad a missing argument.

.. note::
.. versionadded:: 0.18.3
Optional Parameters were added as a new feature in kOS 0.18.3



mathuin marked this conversation as resolved.
Show resolved Hide resolved
.. note::

**Pass By Value**
Expand Down Expand Up @@ -381,19 +357,7 @@ Calling a LOCK that was created in another file
:::::::::::::::::::::::::::::::::::::::::::::::

If you try to call a lock that is declared in another program
file you run, it does not work, and has never worked prior to kOS
0.17.0:

File1.ks::

run File2.
print "x's locked value is " + x.

File2.ks::

lock x to "this is x".

But now with the Kerboscript of kOS 0.17.0, you can make it work
file you run, it does not work. You can make it work
mathuin marked this conversation as resolved.
Show resolved Hide resolved
by inserting empty parentheses after the lock name to help give
the compiler the hint that you expected x to be a function call
(which is what a lock really is):
Expand Down Expand Up @@ -494,12 +458,6 @@ variable.
Scoping terms
-------------

.. note::
.. versionadded:: 0.17
In prior versions of Kerboscript, all identifiers other than
DECLARE PARAMETER identifiers were always global variables no
matter what, even if you used the DECLARE statement to make them.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
What is Scope?
The term *Scope* simply refers to asking the question "where in the
code can this variable be used, and how long does it last before it
Expand Down
8 changes: 0 additions & 8 deletions doc/source/math/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ Fundamental Constants
There is a bound variable called CONSTANT which contains some basic fundamental
constants about the universe that you may find handy in your math operations.

.. versionadded:: 0.18
Prior to kOS version 0.18, ``constant`` was a function call, and
therefore to say ``constant:pi``, you had to say ``constant():pi``.
The function call ``constant()`` still exists and still works, but
the new way without the parentheses is preferred going forward,
and the way with the parentheses may become deprecated later.
For the moment, both ways of doing it work.

mathuin marked this conversation as resolved.
Show resolved Hide resolved
.. list-table::
:header-rows: 1
:widths: 1 4
Expand Down
Loading