diff --git a/Binaries/KAS-API-v2.xml b/Binaries/KAS-API-v2.xml index f5bb6e1cf..c5539f9e4 100644 --- a/Binaries/KAS-API-v2.xml +++ b/Binaries/KAS-API-v2.xml @@ -60,11 +60,11 @@ Triggers when a link between two parts has been successfully established. - The argument of the callback is a KAS event object that describes the link. - +

The argument of the callback is a KAS event object that describes the link.

+

Consider using when this state change is needed in scope of just one part. - +

Collection to add or remove a callback. @@ -72,11 +72,11 @@ Triggers when a link between two parts has been broken. - The argument of the callback is a KAS event object that describes the link. - +

The argument of the callback is a KAS event object that describes the link.

+

Consider using when this state change is needed in scope of just one part. - +

Collection to add or remove a callback. @@ -114,7 +114,7 @@
Actor who changed the links tate. - The actor type that initated the action. + The actor type that initiated the action. Base interface for an end of the link. @@ -142,10 +142,10 @@ Name of the attach node on the part. Arbitrary string. It cannot be empty. - Every link peer is bound to an attach node thru which the link is made (including the coupling + Every link peer is bound to an attach node through which the link is made (including the coupling operations). Several peer modules can share the same node, but in case of any of the modules has made a link, the other dependents will go into the state. - I.e. only one link can be made thru one attach node. + I.e. only one link can be made through one attach node. @@ -154,18 +154,18 @@ with. - +

The module will track the nodes and will adjust its state as those nodes were owned by the module. However, this module will never change the mode of those nodes. This can be used to lock or block the peer modules that control the different primary nodes, but need to cooperate with the other similar modules on the part. This setting allows defining a group of peer modules which only allow linking of a single module at the time. - - +

+

Note, that the part's is not present in this list by default. The implementation should explicitly check for the primary node, or the config must take care of it. - +

The list of the node names. It's never null.
@@ -218,7 +218,7 @@ The attach node. It's never null.
- Tells if this peer is currectly linked to another peer. + Tells if this peer is currently linked to another peer. The current state of the link. @@ -246,156 +246,99 @@ - Interface for a physical cable link. Such links keep the dsitance between the object below the - maximum, but don't restict any other movements of the objects relative to each other. + Interface for a physical cable link. Such links keep the distance between the object below the + maximum, but don't restrict any other movements of the objects relative to each other. - +

The specifics of this module is that the distance between the linked parts becomes variable. Once the link is created, the distance limit is set to the actual distance between the source and target. This limit won't allow the objects to separate too far from each other, but the objects will be allowed to come closer. The code can adjust the limit once the joint is created. - - +

+

Due to the specifics of handling this kind of joints in PhysX, the real distance between the objects can become greater than the distance limit. In fact, if there are forces that try to separate the objects, then the actual distance will always be a bit more than the limit. Do not expect this difference to have any meaning, it depends on the PhysX engine and can be anything. - +

- - Base interface for a KAS joint. - - - Every KAS part must have a joint module that controls how the KAS joints are maintained. - - - This interface is primarily designed for use form the implementations. - A third-party code must not interact with it directly. - - + + Maximum allowed distance between the parts to establish a link. + Distance in meters. It's constant and doesn't depend on the joint state. - - Sets up a physical joint between the source and target. - - - This method can be called either to establish a new joint or to restore an existing link on - load. - - - This method will call the method to ensure there are no errors. - If there are some, then the link is not created and the errors are reported to the logs. - - - true if joint was successfully created or updated. - The link's source. This part owns the joint module. - The link's target. - - - - - + + Rigidbody of the physical cable head. + The rigidbody object, or null if there is no physical head started. + Untiy3D: Rigidbody - - Destroys a physical link between the source and the target. + + + Maximum possible distance between the source and head/target physical anchors. + - This is a cleanup method. It must be safe to execute in any joint state, and should not throw - any errors. E.g. it may get called when the part's state is incomplete. + This is a desired distance. The engine will try to keep it equal or less to this value, + but depending on the forces that affect the objects, this distance may be never reached. + Various implementations can adjust this value, but not greater than + . - - - - Requests the joint to become unbreakable or normal. - - Normally, joint is set to unbreakable on time warp, but in general callers may do it at any - moment. In unbreakable state joint must behave as a hard connection that cannot be changed or - destructed by any force. - If true then joint must become unbreakable. + + The length in meters. Always positive, if the PhysX joint is created. Zero, otherwise. + + + + + - - Changes the current parts couple mode. + + + Returns the actual distance between the source and target/head physical anchors. + - - When both the source and the target peers support coupling, this mode can be arbitrary set or - reset via the joint module. If the new mode is "coupling", and the source and the target - vessels are different, then a coupling action will trigger. If the new mode is "don't couple", - and the source and the target parts are coupled, then a decoupling event is triggered. In all - the other cases it's just a boolean property change. - - - The modules must support the cycles and be ready to pick up the coupling role when the former - part has gave up. - + It's always 0 if the link is not established and there is no head started. Keep in mind + that the real length is almost never equal to the deployed cable lenght. This is due to how + the PhysX engine works: the force can only be applied when the joint is stretched. - The new settings of the mode. - - true if the new mode has been accepted. The change may be refused for any reason by the - implementation, and the caller must react accordingly. - - - - - - Checks if the joint constraints allow the link to be established. - The possible source of the link. - The possible target of the link. - - An empty array if the link can be created, or a list of user friendly errors otherwise. - - Untiy3D: Transform - - - Identifier of the joint on the part. - It's unique in scope of the part. - An arbitary string that identifies this joint. + + The distance in meters. Always positive, if the PhysX joint is created. Zero, otherwise. + + - - Tells the current coupling mode. + + Tells if the joint turns rigid when the parts are coupled. - Note, that if this mode set to true, it doesn't mean that the parts are coupled thru - this specific joint module. It only means that the parts, linked via this joint, are - guaranteed to belong to the same vessel, but the coupling can actually be done thru the other - parts. + This mode only has effect when the parts are coupled. Basically, when the locked mode is + true, the stock joint between the parts is preserved. When the mode is false, + the stock joint is destroyed and replaced by a PhysX distant joint. - true if the vessels should couple on link (merge them into one). - - - - Tells if there is a physical joint created. - true if the source and target parts are physically linked. - - - Tells the current link source. - The link's source or null if the link is not established. - - - Tells the current link target. - The link's target or null if the link is not established. + true if the joint is rigid. + + - - Attaches the specified object to the source and starts the environmental forces on it. - + Attaches the source to the specified physical object (a connector head). - The cable maximum length will be set to the actual distance between the source and the head. + The cable maximum length will be set to the actual distance between the source and the physical object. Note, that + this method must not be used to create a regular link between the source and target. The source object that owns the head. The transform at the head object to attach the cable to. It's also used as a starting point to find the rigidbody. - - - - + + + + Untiy3D: Rigidbody Untiy3D: Transform + FIXME: rename Stops handling the physical head. @@ -412,17 +355,17 @@ Sets the maximum possible distance between the source and the head/target physical anchors. - +

Setting the new length may trigger the physical effects if the value is less than the real cable length, since it will force the engine to pull the objects together. Don't reduce the length too rapidly to avoid the strong forces applied. - - +

+

Calling for this method doesn't have any effect if the PhysX joint is not created. When a brand new joint is created, it always has the distance limit set to the actual distance between the physical objects. I.e. this method must be called after the physical joint is created. - +

The new length. The value must be in range [0; cfgMaxCableLength]. If the value is not @@ -448,63 +391,120 @@ Defines if the joint should be fixed when the parts are coupled. If the mode is set on the non-coupled parts, then it only changes the bit and doesn't actually - affect the joint. If the part were coupled at the momemnt, then the joint is recreated + affect the joint. If the part were coupled at the moment, then the joint is recreated according to the new setting. The new mode.
- - Maximum allowed distance between the parts to establish a link. - Distance in meters. It's constant and doesn't depend on the joint state. + + Base interface for a KAS joint. + +

+ Every KAS part must have a joint module that controls how the KAS joints are maintained. +

+

+ This interface is primarily designed for use form the implementations. + A third-party code must not interact with it directly. +

+
- - Rigidbody of the physical cable head. - The rigibody object, or null if there is no physical head started. - Untiy3D: Rigidbody + + Identifier of the joint on the part. + It's unique in scope of the part. + An arbitrary string that identifies this joint. - - - Maximum possible distance between the source and head/target physical anchors. - + + Tells the current coupling mode. - This is a desired distance. The engine will try to keep it equal or less to this value, - but depending on the forces that affect the objects, this distance may be never reached. - Various implementations can adjust this value, but not greater than - . + Note, that if this mode set to true, it doesn't mean that the parts are coupled through + this specific joint module. It only means that the parts, linked via this joint, are + guaranteed to belong to the same vessel, but the coupling can actually be done through the other + parts. - - The length in meters. Always positive, if the PhysX joint is created. Zero, otherwise. - - - - - + true if the vessels should couple on link (merge them into one). + - - - Returns the actual distance between the source and target/head physical anchors. - + + Tells if there is a physical joint created. + true if the source and target parts are physically linked. + + + Tells the current link source. + The link's source or null if the link is not established. + + + Tells the current link target. + The link's target or null if the link is not established. + + + Sets up a physical joint between the source and target. - It's always 0 if the link is not established and there is no head started. Keep in mind - that the real length is almost never equal to the deployed cable lenght. This is due to how - the PhysX engine works: the force can only be applied when the joint is stretched. +

+ This method can be called either to establish a new joint or to restore an existing link on + load. +

+

+ This method will call the method to ensure there are no errors. + If there are some, then the link is not created and the errors are reported to the logs. +

- - The distance in meters. Always positive, if the PhysX joint is created. Zero, otherwise. - - + true if joint was successfully created or updated. + The link's source. This part owns the joint module. + The link's target. + + + + +
- - Tells if the joint turns rigid when the parts are coupled. + + Destroys a physical link between the source and the target. - This mode only has effect when the parts are coupled. Basically, when the locked mode is - true, the stock joint between the parts is preserved. When the mode is false, - the stiock joint is destroyed and repalced by a PhysX distant joint. + This is a cleanup method. It must be safe to execute in any joint state, and should not throw + any errors. E.g. it may get called when the part's state is incomplete. - true if the joint is rigid. + + + + Requests the joint to become unbreakable or normal. + + Normally, joint is set to unbreakable on time warp, but in general callers may do it at any + moment. In unbreakable state joint must behave as a hard connection that cannot be changed or + destructed by any force. + If true then joint must become unbreakable. + + + Changes the current parts couple mode. + +

+ When both the source and the target peers support coupling, this mode can be arbitrary set or + reset via the joint module. If the new mode is "coupling", and the source and the target + vessels are different, then a coupling action will trigger. If the new mode is "don't couple", + and the source and the target parts are coupled, then a decoupling event is triggered. In all + the other cases it's just a boolean property change. +

+

+ The modules must support the cycles and be ready to pick up the coupling role when the former + part has gave up. +

+
+ The new settings of the mode. + + true if the new mode has been accepted. The change may be refused for any reason by the + implementation, and the caller must react accordingly. + - + +
+ + Checks if the joint constraints allow the link to be established. + The possible source of the link. + The possible target of the link. + + An empty array if the link can be created, or a list of user friendly errors otherwise. + + Untiy3D: Transform @@ -516,24 +516,74 @@ the representation if the connecting points have moved (). + + + Unique name of the renderer that is used by the other modules to find this renderer. + + Arbitrary string. Can be empty. + + + Temporally sets another color to the link meshes. + Color or null if the original mesh color should be used. + + + Temporally sets another shader to the link meshes. + + Name of the shader or null if the original mesh shader should be used. + + + + Tells if the link colliders should be active. + The current state of the collider(s). + + Setting this property to false disables the link colliders, if there were any. Setting + this property to true doesn't make the link physical, it only enables the colliders + that were already on the link. + + + Unity3D: Collider + + + Tells if the renderer is started and active. + The start state. + + + + + Base position/direction of the connection point at the beginning of the link. The source + joint models will be aligned against this transform. + + The source game object's transform. + The value is undefined if the renderer is not started. + + + + + Base position/direction of the connection point at the end of the link. The target + joint models will be aligned against this transform. + + The target game object's transform. + The value is undefined if the renderer is not started. + + Starts rendering a link between the objects. - +

This method only indicates that the link is to be drawn between the specified points. The renderer is allowed to draw meshes even when not started. E.g. if there are constant parts of the link like the joint pivots. - - +

+

The ends of the link are not required to be located at the surface of the owning parts. It's up to the renderer to decide how to draw the link. - - +

+

It's OK to call this method multiple times with different or the same source/target arguments: the renderer must accept the values and update accordingly. However, this operation is rated as performance expensive, so the callers are discouraged to invoke this method too frequently (e.g. on every frame update). - +

The source node. The target node. @@ -541,30 +591,34 @@ Cancels rendering the link. +

The stopped renderer is not required to not render anything. The stopped state only tells that the source and the target positions provided to the method - must not be respresented as connected anymore. A specific renderer implementation is free to + must not be represented as connected anymore. A specific renderer implementation is free to choose how to represent this mode. - +

+

It's OK to call this method multiple time. If the renderer is already stopped the call must be treated as NO-OP with a little or no performance cost. - +

Called when a link representation update is required. +

It's called on every frame update if the link is started. The performance cost of this method is rated as moderate. The callers should consider optimization techniques to avoid calling this method on the every frame update. - +

+

A specific renderer implementation may introduce own optimization algorithm when the call becomes too heavy and slow. - +

- Verifies that there are no obstacles beween the points. + Verifies that there are no obstacles between the points. The renderer is not required to be started for this method to call. The source node. The target node. @@ -582,116 +636,66 @@ The object or null if the named mesh is not created. If the mesh cannot be retrieved. - - - Unique name of the randerer that is used by the other modules to find this renderer. - - Arbitrary string. Can be empty. - - - Temporally sets another color to the link meshes. - Color or null if the original mesh color should be used. - - - Temporally sets another shader to the link meshes. - - Name of the shader or null if the original mesh shader should be used. - - - - Tells if the link colliders should be active. - The current state of the collider(s). - - Setting this property to false disables the link colliders, if there were any. Setting - this oroperty to true doesn't make the link physlcal, it only enables the colliders - that were already on the link. - - - Unity3D: Collider - - - Tells if the renderer is started and active. - The start state. - - - - - Base position/direction of the connection point at the beginning of the link. The source - joint models will be aligned against this transform. - - The source game object's transform. - The value is undefined if the renderer is not started. - - - - - Base position/direction of the connection point at the end of the link. The target - joint models will be aligned against this transform. - - The target game object's transform. - The value is undefined if the renderer is not started. - - A generic source of a KAS link between two parts. - +

Source is the initiator of the link to the another part. It holds all the logic on making and maintaining the actual connection between the two parts. The other end of the connection must be which implements its own piece of the logic. - - +

+

The link source have a state that defines what it can do (). Not all actions are allowed in any state. The following state diagram tells what the source can do and when: - +

TransitionAction - => + => This module has initiated a link via the method call. - => + => Some other source module in the world has initiated a link. - => + => This module has cancelled the linking mode via the method call. - => + => This module has established a link. - => + => Some other module, which initiated a link, has cancelled or completed the linking mode. - => + => Some other module on the same part, which initiated a link, has established a link. I.e. this part cannot have more links. - => + => This module has broke its link via the method call. - => + => Some other module on the same part, which was linked, has broke its link via the method call. @@ -707,14 +711,29 @@
+ + Target of the link. + Target or null if nothing is linked. + It only defined for an established link. + + + + Joint module that manages a physical link. + The physical joint module on the part. + + + Renderer of the link meshes. + The renderer that represents the link. + + Starts the linking mode of this source. - +

Only one source at the time can be linking. If the part has more sources or targets, they are expected to become . - - A module can refuse the mode by returning false. +

+

A module can refuse the mode by returning false.

Defines how the pending link should be displayed. See for more @@ -736,20 +755,20 @@ Establishes a link between two parts. - +

The linking mode must be started via the call for this method to succeed. - - +

+

If the link has been established successfully, the source and the target parts become associated with each other. - - +

+

The link conditions will be checked via before creating the link. If the were errors, they will be reported to GUI if the linking mode was started with actor . The linking mode won't be cancelled in case of the link failure. - +

The target to link with. true if the parts were linked successfully. @@ -783,10 +802,10 @@ Specifies what initiates the action. The final result of the action doesn't depend on it, but the visual and sound representations may differ for the different actors. - - - - + + + + Untiy3D: MonoBehaviour.FixedUpdate @@ -799,7 +818,7 @@ The target to connect with. Tells if the source and target states needs to be checked. This check can be disabled when - checking for a "theoretical" posibility of the link. However, keep in mind that before doing + checking for a "theoretical" possibility of the link. However, keep in mind that before doing the actual link, the full check will be performed. @@ -815,25 +834,10 @@ true if the link can be made.
- - Target of the link. - Target or null if nothing is linked. - It only defined for an established link. - - - - Joint module that manages a physical link. - The physical joint module on the part. - - - Renderer of the link meshes. - The renderer that represents the link. - - Part module interface that defines the events for a link state changes. - Both the source and the target parts can recieve these events. To receive the events, a module + Both the source and the target parts can receive these events. To receive the events, a module needs to implement this interface. @@ -862,70 +866,72 @@ A generic target of a KAS link between two parts. - +

The target is a sink for a link initiated by the another part's . - - +

+

The link target have a state that defines what it can do (). Not all actions are allowed in any state. The following state diagram tells what the target can do and when: - +

+

TransitionAction - => + => This target is able to connect to a source that has just initiated a link. - => + => This target cannot connect to a source that has just initiated a link. - => + => The source module has ended its linking mode without linking to this target. - => + => A source from the world has linked to this target. - => + => A source from the world has linked to another target on the part that owns this target. - => + => The link to this target has been broken by the source. - => + => A source from the world has broke a link to another target on the part that owns this target. - => + => A source from the world has ended the linking mode, and the target's part hasn't linked. - => + => - A source from the world has linked to the owner of this target but thru another target. + A source from the world has linked to the owner of this target but through another target. +

See for the examples.
@@ -933,22 +939,22 @@ Source that maintains the link. Source or null if nothing is linked. - +

Setting of this property changes the target state: A non-null value changes the state to . null value changes the state to . - - Assigning the same value to this property doesn't trigger a state change event. - +

+

Assigning the same value to this property doesn't trigger a state change event.

+

Note, that not any state transition is possible. If the transition is invalid then an exception is thrown. - - - It's descouraged to assign this property from a code other than an implementation of +

+

+ It's discouraged to assign this property from a code other than an implementation of . - +

@@ -967,65 +973,6 @@ Interface that allows operating the winch parts. - - Sets the winch motor to the desired speed. - - - The motor is responsible for the deployed cable length changing. It can extend the cable, - retract the cable, or do nothing (idle). The winch and its head cannot get separated at a - greater distance than the current deployed cable length. That said, the motor is controlling - the distance. - - - The motor speed is not required to change immediately. The motor may need some time to get to - the target speed. It depends on the part implementation and configuration. The rule of thumb - is to not expect the to match the - right after the method call. There may be some time needed - before the values will match. However, the value will change - immediately, and will match the parameter. - - - Setting the motor speed may affect the connector state. E.g. if the connector was locked, - and the motor speed is set to a positive value (extending), then the connector is get - deployed. - - - The motor will automatically stop when the cable length reaches zero or the maximum allowed - value. In case of the zero length, the connector will be attempted to lock into the winch. - This attempt may fail due to the bad align of the connector. To retry the attempt, just call - this method again with a negative value. - - - - The new speed of the motor. The positive value instructs to extend the cable, and the - negative value commands to retract the cable. Zero value turns the motor off. The - infinite values can be used to set the target speed to the maximum allowed speed on the part. - - - - - - - - - - - - Sets the deployed cable length to the actual distance between the winch and the connector. - - This will "stretch" the cable by reducing the unused cable. - - - - - - Sets the deployed cable length to the maximum value allowed by the part. - If the connector is locked, then it will be deployed. - - - - - Maximum speed of retracting or extending the cable. Speed in meters per second. @@ -1043,7 +990,7 @@ Tells if the cable connector head is locked into the winch. In the locked state there is no free cable available, and there is no moving part - (the connector). If the winch is linked to a part and the connector is locked, then the traget + (the connector). If the winch is linked to a part and the connector is locked, then the target part is docked to the vessel that owns the winch. When the connector unlocks, the attached part undocks from the vessel. @@ -1069,25 +1016,25 @@ - Current speed of the motor spindel. + Current speed of the motor spindle. - +

This is the speed at which the cable is being extended or retracted at the current moment. The actual speed of the motor can differ from what was set via the control methods (e.g. - ) due to there is some inetria momentum. Negative speed means the cable - is being retracted, and the positive speed means the cable is being extened. - - + ) due to there is some inertia momentum. Negative speed means the cable + is being retracted, and the positive speed means the cable is being extended. +

+

The motor speed is always trying to match the . Depending on the part's implementation and settings, some time may be needed to actually have the match. - +

The speed in meters per second.
- Desired speed of the motor spindel. + Desired speed of the motor spindle. Ideally, the motor is always working at this speed. However, in the physics world of KSP the motor may operate at the lower or the higher speeds. It depends of the various conditions. @@ -1097,14 +1044,73 @@ + + Sets the winch motor to the desired speed. + +

+ The motor is responsible for the deployed cable length changing. It can extend the cable, + retract the cable, or do nothing (idle). The winch and its head cannot get separated at a + greater distance than the current deployed cable length. That said, the motor is controlling + the distance. +

+

+ The motor speed is not required to change immediately. The motor may need some time to get to + the target speed. It depends on the part implementation and configuration. The rule of thumb + is to not expect the to match the + right after the method call. There may be some time needed + before the values will match. However, the value will change + immediately, and will match the parameter. +

+

+ Setting the motor speed may affect the connector state. E.g. if the connector was locked, + and the motor speed is set to a positive value (extending), then the connector is get + deployed. +

+

+ The motor will automatically stop when the cable length reaches zero or the maximum allowed + value. In case of the zero length, the connector will be attempted to lock into the winch. + This attempt may fail due to the bad align of the connector. To retry the attempt, just call + this method again with a negative value. +

+
+ + The new speed of the motor. The positive value instructs to extend the cable, and the + negative value commands to retract the cable. Zero value turns the motor off. The + infinite values can be used to set the target speed to the maximum allowed speed on the part. + + + + + + + + +
+ + + Sets the deployed cable length to the actual distance between the winch and the connector. + + This will "stretch" the cable by reducing the unused cable. + + + + + + Sets the deployed cable length to the maximum value allowed by the part. + If the connector is locked, then it will be deployed. + + + + + - KAS API, version 1. + KAS API, version 2. - Tells if API V1 was loaded and ready to use. + Tells if API was loaded and ready to use. - KAS joints untils. + KAS joints utils. KAS attach nodes utils. @@ -1136,14 +1142,14 @@ Actor is unspecified. - It really depends on the situation how to treat this actor. In a normal case ther is always a + It really depends on the situation how to treat this actor. In a normal case there is always a specific actor set, but if an event originator cannot determine the actor then this type can be used. However, the event originator must ensure that the components that receive this event will know how to deal with it. - Thrid-party code has affected the link during its normal workflow. + Third-party code has affected the link during its normal workflow. The implementations must not execute any user facing effects when the action is executed from the API. @@ -1155,8 +1161,8 @@ Player input has affected the link state. - Defines currect state of the link. - Each implementation defines own state tranistion model. E.g. + Defines correct state of the link. + Each implementation defines own state transition model. E.g. or . In every state the module can only handle a very specific set of actions. Such approach helps keeping module logic more clear and granular. @@ -1166,7 +1172,7 @@ Initial and an invalid state. It must never be normally used. - Module is avalable for the links. + Module is available for the links. @@ -1176,7 +1182,7 @@ - Module has initated an outgoing link request and expecting for it to be accepted. + Module has initiated an outgoing link request and expecting for it to be accepted. @@ -1203,17 +1209,19 @@ Creates a new attach node on the part. +

It's expected there is no node with the same name on the part already. If there is one, then no extra node will be created, and the properties of the existing node will be updated instead (see below). However, it's an unexpected situation, so a warning record will be logged. - +

+

The node will have the following properties: Size is "small". Attach method is FIXED_JOINT. Node type is Stack. - +

Part to create node for. Name of the node to create. @@ -1231,7 +1239,7 @@ If the node doesn't belong to the part, then the owner will be fixed and a warning logged. Normally, it's not expected to add an attach node into a part that doesn't own it. If the node - is alaready in the part, then this method does nothing. + is already in the part, then this method does nothing. The part to add the node into. The attach node to add. @@ -1257,12 +1265,13 @@ Creates an attach node form the part's config definition string. - +

The string format is exactly the same as for the part's attach node definition. It consists of 10 parts, separated by a comma. Only the first 6 parts are mandatory, the others are optional. The format is the following: Position(X,Y,Z), Orientation(X,Y,Z), Size, AttachMethod, CrossFeedAllowed, IsRigid - +

+

Position is defined by the first 3 float numbers. Orientation is defined by the next 3 float numbers. @@ -1284,6 +1293,7 @@ of the two coupling nodes require it. +

The part to parse the node for. The new node will not be added to this part, but the @@ -1299,7 +1309,7 @@
Gets or creates a transform object for the attach node. - The trasnform is added into the root of the part model. + The transform is added into the root of the part model. The part that owns the node. The attach node to create the transform for. The object that matches the attach node connect point. @@ -1320,7 +1330,7 @@ Initializes joint to a consistent state. - +

It's not the same as creating a default joint. The state is consistent but different from the default: @@ -1336,33 +1346,33 @@ will remember the new relative rotation/position of the connected objects. - - +

+

Use this method before setting up a new or existing joint. By resetting the joint, you ensure it's in a consistent state, and the further adjustments will always give the same result regardless to how the joint was created and what components were affecting it. - +

Joint to reset.
Sets up joint so what it becomes a prismatic joint. - +

It's a standard PhysX configuration. Main axis is set to Z. Moving along it is allowed but can be constrained by a spring and limit. Drive mode is set to . - - +

+

Only main axis linear settings are changed. Consider using to eliminate side effects from the previous settings of the joint. - - +

+

Pure prismatic joint assumes 5 out of the 6 degrees of freedom to be locked (everything, except the main axis linear motion). Consider setting - to true since it may improve PhysXperformance. - - + to true since it may improve PhysX performance. +

+

For performance reasons some parameters combindations may result in different motion modes: @@ -1378,11 +1388,11 @@ don't forget to update the mode as well. - - +

+

Regardless to the modes set all the other parameters are also applied. I.e. you don't need to re-apply them when changing mode. - +

Joint to setup. @@ -1395,13 +1405,13 @@ Maximum spring force to apply when joint distance deviates from the original. - + Maximum allowed distance relative to the original value. Also, see remarks to the method. - + Force to apply to keep distance in limits. If it's 0 then the limit is impassible. - + Percentage of the limit force to use for dampering oscillation effect. @@ -1411,23 +1421,23 @@ Sets up joint so what it becomes a spherical hinge joint. - - It's a standard PhysiX configuration. Main axis is set to Z, and angular rotation around it is +

+ It's a standard PhysX configuration. Main axis is set to Z, and angular rotation around it is completely unrestricted. Secondary axes are X&Y can be restricted by applying spring force and/or limits. Drive mode is set to . - - +

+

Only angular settings are set. If joint had linear constraints defined they will stay unchanged. Consider using to eliminate side effects from the previous settings of the joint. - - +

+

Pure spherical joint assumes 3 out of the 6 degrees of freedom to be locked (all the three axes linear motions). Consider setting to true since it may improve PhysX performance. - - - For performance reasons some parameters combindations may result in different angular modes: +

+

+ For performance reasons some parameters combinations may result in different angular modes: When is Infinite or is @@ -1440,11 +1450,11 @@ If you plan to change either of the parameters don't forget to update the modes as well. - - +

+

Regardless to the modes set all the other parameters are also applied. I.e. you don't need to re-apply them when changing mode. - +

Joint to setup. @@ -1468,7 +1478,7 @@
- Sets up a cannonical distance joint. + Sets up a canonical distance joint. This method does not set all the properties of the PhysX joint! To get a consistent result, the joint must be reset via a call before invoking this @@ -1480,14 +1490,14 @@ The force to apply to calm down the oscillations. - The maximum distance to allow between the obejcts before applying the spring force. + The maximum distance to allow between the objects before applying the spring force. PhysX: Distant Joint - Sets up a cannonical fixed joint. + Sets up a canonical fixed joint. This method does not set all the properties of the PhysX joint! To get a consistent result, the joint must be reset via a call before invoking this @@ -1514,17 +1524,17 @@ Couples two parts together given they belong to the different vessels. - +

Once the coupling is done, one of the vessels will be destroyed. It will become a part of the other vessel. The new merged vessel will become active. Which vessel will be destroyed is determined by the parameter. - - +

+

This coupling requires the both attach nodes to be provided, and creates a "stack" nodes coupling. - +

+

IMPORTANT. The attach nodes must have a valid owner set.

- IMPORTANT. The attach nodes must have a valid owner set. The attach node at the source part that defines the source vessel. It must not be null. @@ -1535,7 +1545,7 @@ If false, then the source vessel will get coupled with the target. As a result, the source vessel will be destroyed. If true, then the method will find the least significant vessel of the two, and couple it with the most significant one. The least - signficant vessel will be destroyed. + significant vessel will be destroyed. The part that attached as a child into the new hierarchy. @@ -1565,10 +1575,10 @@ The child part that has decoupled from the owner vessel.
- Various tools to deal with the gme's physics. + Various tools to deal with the game's physics. - Applies the forces that affect a rigidbody on a selectial body. + Applies the forces that affect a rigidbody on a celestial body. This method replicates the logic from for the physical objects. Alas, this method is not available for a plain rigidbody. @@ -1581,7 +1591,6 @@ The multiplier that tells how significantly the rigidbody is resisting to the air flow. - Target or null if no valid target was found. diff --git a/Binaries/KSPDev_Utils.2.4.dll b/Binaries/KSPDev_Utils.2.4.dll deleted file mode 100644 index ddaceb380..000000000 Binary files a/Binaries/KSPDev_Utils.2.4.dll and /dev/null differ diff --git a/Binaries/KSPDev_Utils.2.6-KAS.dll b/Binaries/KSPDev_Utils.2.6-KAS.dll new file mode 100644 index 000000000..b861fcdd0 Binary files /dev/null and b/Binaries/KSPDev_Utils.2.6-KAS.dll differ diff --git a/Binaries/KSPDev_Utils.2.4.xml b/Binaries/KSPDev_Utils.2.6-KAS.xml similarity index 89% rename from Binaries/KSPDev_Utils.2.4.xml rename to Binaries/KSPDev_Utils.2.6-KAS.xml index eaefca14a..a6e06be14 100644 --- a/Binaries/KSPDev_Utils.2.4.xml +++ b/Binaries/KSPDev_Utils.2.6-KAS.xml @@ -1,7 +1,7 @@ - KSPDev_Utils.2.4 + KSPDev_Utils.2.6-KAS @@ -157,13 +157,6 @@ a subset of the persistent fields of the class. It's case-insensitive.
- - - A path to the fields's value in the config. Components must be separated by symbol /. - The path is relative, the absolute path is determined when doing actual (de)serialization. - The path is case-insensitive. - - A proto that (de)serializes field's value as a simple string. @@ -179,6 +172,13 @@ The prototype's class type. + + + A path to the fields's value in the config. Components must be separated by symbol /. + The path is relative, the absolute path is determined when doing actual (de)serialization. + The path is case-insensitive. + + A base for any persistent fields file annotation. This attribute doesn't assume much logic so, you basically override it only to create @@ -231,6 +231,18 @@ Config URL path from which the pacth was created (if any). + + Action to perform on the part or module. + + + Add new module. + + + Change fields in the part or modules. + + + Drop the part or module altogether. + Name of the patch. It must be unique in the game's scope. @@ -263,60 +275,6 @@ relevant anymore. - - Section that defines rules for the part to qualify for patching. - - - Section that defines how to change the part if it qualifies for patching. - - - Makes a patch form the config node. - Some sanity checks are done when loading, so this method can throw. - The node to read patch from. - - The patch node. It's never null, but if some fields cannot be read, they will remain - uninitialized. - - - - Makes a patch form the config. - Some sanity checks are done when loading, so this method can throw. - The config to make the pacth from. - - The patch node. It's never null, but if some fields cannot be read, they will remain - uninitialized. - - - - Returns friendly identificator of the patch. - The patch descriptor. - - - Makes pacth from a config node. - - The critical settings will be checked for the sane values. If a bad value found, then the - menthod will throw. - - The node to create from. - - The context of node loading. It can be any object, e.g. UrlDir.UrlConfig or - ConfigNode. It's only used for logging errors to give a context for debugging. - - The URL to the node in the game's DB. - The patch. It's never null. - - - Action to perform on the part or module. - - - Add new module. - - - Change fields in the part or modules. - - - Drop the part or module altogether. - Config class that specifies how to check if the part qualifies for patching. @@ -348,24 +306,12 @@ + + Section that defines rules for the part to qualify for patching. + Config class that specifies how pacth the qualifying part. - - Patching rules for the part config. - - - Patching rules for the module configs. - - The modules are patched in order. I.e. first module pacth in the upgrade section will be - applied to the first module in the part's save state. When the module needs to be skipped - from the patch, simply don't provide any rules. - - If the part's action is , then the module rules are - ignored. - - - Config class that defines patching rules. @@ -406,6 +352,60 @@ + + Patching rules for the part config. + + + Patching rules for the module configs. + + The modules are patched in order. I.e. first module pacth in the upgrade section will be + applied to the first module in the part's save state. When the module needs to be skipped + from the patch, simply don't provide any rules. + + If the part's action is , then the module rules are + ignored. + + + + + Section that defines how to change the part if it qualifies for patching. + + + Makes a patch form the config node. + Some sanity checks are done when loading, so this method can throw. + The node to read patch from. + + The patch node. It's never null, but if some fields cannot be read, they will remain + uninitialized. + + + + Makes a patch form the config. + Some sanity checks are done when loading, so this method can throw. + The config to make the pacth from. + + The patch node. It's never null, but if some fields cannot be read, they will remain + uninitialized. + + + + Returns friendly identificator of the patch. + The patch descriptor. + + + Makes pacth from a config node. + + The critical settings will be checked for the sane values. If a bad value found, then the + menthod will throw. + + The node to create from. + + The context of node loading. It can be any object, e.g. UrlDir.UrlConfig or + ConfigNode. It's only used for logging errors to give a context for debugging. + + The URL to the node in the game's DB. + The patch. It's never null. + Interface for the simple types that need custom (de)serialization logic. @@ -480,7 +480,7 @@ Returns patch nodes for the tag. This call can be very expensive. It's strongly encouraged to implement a lazy access approach - and cache the retunred values. + and cache the returned values. The mod to find the nodes for. If it's null or empty, then all the nodes will be @@ -492,7 +492,7 @@ Tests if the patch can be applied to the part node. The part node to test against. The patch to test. - The conext in whcih the part is being patched. + The context in which the part is being patched. Tells if anything should be reported to the logs. true if the TEST rules of the patch have matched. @@ -500,7 +500,7 @@ Applies the patch to the part node. The part node to patch. The patch to apply. - The conext in whcih the part is being patched. + The context in which the part is being patched. Checks if all pattern fields are set in the target. @@ -530,7 +530,8 @@ The part's config node. The loading context that tells how to extract the values. - The array of two values, where first value is the name, and the second value is ID. + The array of two values, where first value is the name, and the second value is ID. The values that cannot be + recovered will be null. @@ -1432,16 +1433,16 @@ KSP: IConfigNode + + Specifies if the annotated field is a collection of values. + true if the field is a collection. + Creates attribute for a persistent field of standard KSP types. - - Specifies if the annotated field is a collection of values. - true if the field is a collection. - A proto for handling all KSP specific types. @@ -1507,23 +1508,23 @@ - Specialization for the guiUnits localization. + Specialization for the guiUnits localization. - Use it when specifying a for a field + Use it when specifying a for a field with the units. - + KSP: KSPField - Specialization for the enabledText localization. + Specialization for the enabledText localization. - Use it when specifying a for a toggle + Use it when specifying a for a toggle field. @@ -1532,892 +1533,704 @@ - Specialization for the disabledText localization. + Specialization for the disabledText localization. - Use it when specifying a for a toggle + Use it when specifying a for a toggle field. KSP: KSPField - - - Attribute to mark a member as available for the runtime interaction. It may be exposed in the - debugging GUI. - - - - - User friendly name of the member. It will be presented in GUI. + + Base class for a GUI element that incapsulates a class instance member. + + This kind of controls are used to represent and/or edit the values of various types, but not in + the usual OnGUI approach. The usual Unity approach assumes that the value is passed and + returned in each rendering call. However, for the hermetic control, the source of the value is + defined only once, at the creation time. Once it's done, the rendering is only called to have + the logic handled. That said, the caller rendering method doesn't care about the underlying + data, and that's why it's "hermetic". + + The value source is either a field or a property of the class. Due to the need of using + reflections to access the member, these controls are not performance optimized. They are fine + for the debugging and settings dialogs, but for the performance demanding applications a regular + Unity approach is suggested. + + - - Any string to use to group the controls. + + - - - Creates an attribute that marks the member as availabel for the runtime changes. - - The user freindly string to present in GUI. - - The group of the controls. It may be used to filter the found mebers in debug GUI. + + Creates a control, bound to a member. + The class instance that owns the member to manage. + + The field to manage. It must be null if is set. + + + The property to manage. It's ignored if is not null. + + + The callback to call before changing the value. can be + throws form this action to prevent the change. + The callback to call when the value is changed. - - Helper class to deal with the debug GUI functionality. - - + + Returns the type of the member value. + The type object of the member. - - Dumps the objects hierarchy to the logs. - - This method recirsively goes down to the all decendants, starting from - . The path, however, is shown realtive to . - - The root object to make the path from. - The descendant of to dump descendants for. + + Get the value from the controlled member. + The type of the member. + The value of the member. - - Gets the fields, available for debugging. - The instance to get the fields from. - - The group to get the controls for. If empty, then all the controls are returned. + + Sets value to the controlled member. + The type of the member. + The new value to set. + + The actions list to submit the update actions into. If it's null, then the update and + the notification will happen immediately. - The member meta info for all the available fields. - - - Gets the properties, available for debugging. - The instance to get the properties from. - - The group to get the controls for. If empty, then all the controls are returned. - - The member meta info for all the available properties. - + + Calls the customized update method. + It's fail proof. - - Gets the methods, available for calling from the debugging GUI. - The atributed method must have zero parameters. - The instance to get the methods from. - - The group to get the controls for. If empty, then all the controls are returned. + + Implemnet actual setting logic. + The value to set. + + + Utility class to help building GUI layout buttons. + + + Makes a button that fires a callback when pressed or released. + + The callbacks are only fired once for every state change, and are guarnteed to not be called + during the layout phase. The callback is called *after* the state is updated. + + The current press state of the button. + The GUI content to present as the button's caption. + The GUI style of the control. + + The GUILayout options to apply to the control. It can be null. - The member meta info for all the available methods. - + + The callback to call when the button is pressed. Can be null. + + + The callback to call when the button is released. Can be null. + + + The action list to execute the callbacks thru. If the list is omitted, then the callback is + fired right away. Otherwise, it's added to the list and executed when the list is triggered. + + The new button press state. + - - Creates a debug dialog for the parts. + + Makes a toggle control that fires a callback when the state changes. - Implement a code that would react on user interactions and invoke this method to show a debug - dialog. The dialog can be bound to a specific part, in which case it only showns for that - part, or the dialog may allow interactively selecting a part from the scene. + The callbacks are only fired once for every state change, and are guaranteed to not be called + during the layout phase. The callback is called *after* the state is updated. - The titile of the dialog. - - The width of the dialog. If omitted, then the code will decide. + The current toggle state. + The GUI content to present as the button's caption. + The GUI style of the control. + + The GUILayout options to apply to the control. It can be null. - - The width of the value changing controls. If omitted, then the code will decide. + + The callback to call when the control is checked. Can be null. - - The group of the controls to present. If empty, then all the controls are shown. + The callback to call when the control is checked. Can be null. - - The part to attach the dialog to. If set, then the dialog won't allow changing the part via - GUI. Otherwise, there will be controls in the dialog that allow selection a part from the - scene. + + The action list to execute the callbacks thru. If the list is omitted, then the callback is + fired right away. Otherwise, it's added to the list and executed when the list is triggered. - The created dialog. - - + The new button toggle state. + - - Destroys the debug dialog. - The dialog to destroy. - + + Utility class to draw a simple table with the text column contents. + +

+ This table cannot hold non-string content. It keeps all the columns to be of the same size, and the + size is adjusted to the maximum column's size in all the rows. There is a one frame delay between + the content change and the column resizing, which may result in flickering if the content + changes too frequently. The columns try to take as small space as possible, so defining the + minimum size may be a good bet. +

+

+ This class is designed to be called on every frame. It's heavily performance optimized. +

+
- - Game object to use to host the debug dialogs. - + + Tells if the maximum size of the columns should be persistent between the frames. + +

+ If set to true, then the new frame will use the previous frame's data to determine the minimum column + sizes. Thus, the table could grow, but it never shrinks (unless is called). With this + setting set to false, the table size will be recalculated from the scratch on every frame. +

+

This property can be modified at any time, but it will have effect on the next frame only.

+
+ true if the column sizes are retained between the frames. +
- - Metadata about the member that is available for debugging. + + Index of the currently rendered column. - - Attribute, that describes the member. + + Current frame maximum widths of the columns. - - Field info for the field member. + + The maximum widths of the columns from the previous frame. - - Property info for the property member. + + Creates a table of the specified column width. + + It's OK to render more columns than reserved. They won't resized, but it's not an error. + + The number of columns to track. + + Tells if the maximum sizes should be persisted. See property for more details. + + - - Method info for the method member. + + Resets all the accumulated maximum column sizes to zero. + + Only makes sense when the mode is enabled. When this mode is disabled, the column sizes + are updated on every frame. + - - - Interface for the components that wants to know when their debug adjustable fields or properties - have changed. - + + Updates the table state each frame to remember the best column size values. - The methods of this interface not normally called during the game. It's used by the debug code - to update the components in runtime. + This method is only interested in the EventType.Layout phase, so no need to call it on + each GUI event when there is a cheap way to detect it. - - - - Notifies that one or more of the debug adjustable fields is about to be updated. - - - If the change must be rejected due to the module is not able to handle the update in its - current state. The description of the exception may be presented in GUI. - + + Tells that a new row is about to be rendered. + Call it before every new row. - - Notifies that one or more of the debug adjustable fields have changed. + + Adds a text column into the table. + The text to add. + + The style to apply to the text. If not set, then GUI.skin.label is used. + - - Debug dialog for adjusting the part configuration. - + + Adds a text column into the table. + The text to add. + The localizable message to get the minimum size from. + + The style to apply to the text. If not set, then GUI.skin.label is used. + + - - Generic interface for the modules that implement a GUI events handling. + + Adds a text column into the table with a value tooltip. + The text to add. + + The tooltip for the column value. Note, that the tooltip is not handled by the table, it gets + rendered by the Unity GUI functionality, which may need to be configured. + + + The style to apply to the text. If not set, then GUI.skin.label is used. + - - A callback which is called for every GUI event. + + Adds a text column into the table with a value tooltip. + The text to add. + + The tooltip for the column value. Note, that the tooltip is not handled by the table, it gets + rendered by the Unity GUI functionality, which may need to be configured. + + The localizable message to get the minimum size from. + + The style to apply to the text. If not set, then GUI.skin.label is used. + + + + + Adds a content into the table column. - - On the every frame update Unity sends at least two events to every handler: - and . There can be more input - events sent. The implementation must not change the number of controls in the view after the - layout event. - - - The modules don't need to implement this intefrace to be notified. It's called by the Unity - core via messanging. However, implementing the interface make the inheritance and the overall - code maintainability better. - + When possible, this method should be preferred over the other methods, which are simply the + shortcuts to this one. + The text/tooltip content of the column to add. + The style to apply to the text. + The minimum width of the column. + The maximum width of the column. + + + Auto-resizing scrolling control. + + This control automatically shrinks to its content to take as small space as possible, while + still not needing the scrolling. If the height of the content exceeds the specified maximum, + then a vertical scrollbar is added to the view and the view doesn't expand further. - - Actual screen position of the console window. + + The scrolling position of the area. - - A title bar location. + + The full height of the area. + The current height. - - A list of actions to apply at the end of the GUI frame. + + Starts the scrollable view. + The style of the scrollable area. + + The maximum height, the control is allowed to grow to before switching to the scrolling. + + + The layout options for the view. Don't set the height options! This dimension is controlled by + the control. + - - The part being adjusted. + + Marks the scrollable view end. - - Tells if the parent part capture mode is enabled. + + A utility class to render windows with an alternative transformation matrix. + This scope will remember the GUI.matrix property and restore it on exit. + - - Array of the modules, available for the debug dialog. - The key of the pair is the module name. + + Stores the old matrix. - - The index of the selected module in . + + Restores the matrix that was set before the scope started. - - Scroll view for the adjustable modules. + + Component for GUI dialog rescaling, based on the current game's GUI scale setting. + +

+ The scale is applied to the dialog controls by adjusting GUI.matrix, which is a global variable. It must be + restored to the original value before exiting OnGUI, or else the other controls in the game will also be + affected. +

+

+ This control simply magnifies the dialog. The good side of it is that the original code doesn't need to be changed. + The bad side is that the low-res graphics (like the controls backgrounds) may not look nice when stretched up. +

+
+ + + new Vector2(_windowRect.x, _windowRect.y)); + } + + void OnGUI() { + using (new GuiMatrixScope() { + _guiSkin.UpdateMatrix(); + _windowRect = GUILayout.Window(GetInstanceID(), _windowRect, WindowFunc, WindowTitle); + } + } + ]]> + + + +
- - Dialog title. + + The pivot point to scale the dialog at. + In a simple c case it's the position of the top-left corner of the dialog. + The pivot point to make the matrix at. - - Dialog width. + + The current scale which this control is tracking. + The scale for which the last onScaleUpdatedFn was called. - - Size of the controls for the values. + + Tells if the scale must be recalculated on the next access to . - - Controls group to show. + + Creates a scaled skin instance. + + A function that returns the pivot point for the scale transformation. In a regular usual case, this method returns + the position top-left corner of the last known dialog position. + + + A callback which will be called every time the game's UI scale is updated. The mods can react on it to + update their internal cached styles. This callback is processed from the method. + - - Tells if this dialog must be bound to one part only. + + Updates the current GUI matrix to adjust the scale. - There will be no part selection UI offered, so the caller must set the part. If the parent - part dies, then the dialog automatically closes. + This method can trigger the onScaleUpdatedFn callback. So it's best to call it at the very beginning of + the OnGUI method. - - - - - - Sets the part to be adjusted. - The part to set. + + Unregisters any game's callbacks. - - Shows a window that displays the winch controls. - Window ID. + + Makes a scaled skin based on the origin one. - - Simple performance counter to measure CPU cost of the code branch. - - The counter itself can have a performance impact, but it's not counted towards the methods or - function cost being measured. Don't profile branches that have other performance counters, since - such measurements will also count the overhead of thouse counters. - + + Reacts on the GUI scale change event and recalculates the skin. - - Measures timing in a simple action that doesn't return result. - The action to measure. + + Component for automatic GUISkin rescaling, based on the current game's GUI scale setting. + +

+ The scaling is achieved by proportional increase/decrease of the font size and margin/padding rects. The default + font stays unchanged, but all the controls that use default font size will get overrides for the nwe scaled size. + Some more elements will not get scaled: +

+

+ + The background images. + The textures, rendered via Label and DrawTexture controls. + The GUILayoutOption size settings. + The GUILayout.Space() control. + +

+
+ + + GUI.skin); + } + + void OnGUI() { + using (new GuiSkinScope(GuiScaledSkin.scaledSkin) { + _windowRect = GUILayout.Window(GetInstanceID(), _windowRect, WindowFunc, WindowTitle); + } + } + ]]> + + +
- - Measures timing in a function that returns result. - The function to measure. - The return parameter of the measured function. - The value from the measured function. + + The skin that is scaled to the current game's settings. + Dop not cache this instance! It changes as the scale setting does. + A copy of the original skin that is scaled to the currently selected game's settings. + - - Total number of readings captured. - The number of times was called. + + Tells if the skin must be recalculated on the next access to . - - Total elapsed milleseconds in all readings. - The total number of milliseconds, spent in the measured code. + + The scale setting which this instance currently tracks. + It's updated from the property getter. + The scale of . - - Average time spent per one reading. - The average time in milliseconds. + + The dialog title height with this skin applied. + It's a best guess number. It's NOT the real value to be used in the GUI layout engine. + The height of the GUI dialog title. - - Maximum time spent in one reading during the life of the counter. - The maximum duration, taken by the measured code. + + Creates a scaled skin instance. + + A getter function that returns the base skin. This skin must not be affected by the game's GUI scale! + + +

+ A callback which will be called every time the is updated. The mods can react on it to + update their internal cached styles. This callback is processed from the property getter. +

+

The very first call will be made in scope of the constructor.

+
- - Minimum time spent in one reading during the life of the counter. - The minimum duration, taken by the measured code. + + Unregisters any game's callbacks. - - Wrapper class that gives a GUI control for editing the standard game types. + + Makes a style that respects the provided scale factor. - This control is not performance optimized. It's primarily designed for the simplicity of - the calling code in the cases like a simple settings dialog or a debug inspector. + This method overrides the default font usage. The resulted style will be overriding the font size, even if the + original style wasn't assuming it. It may have performance or UI consequences. - - - + The skin that is a base for the scaling. + The style to get values from. + The scale factor, where 1.0 means "exactly as in the original". + A scaled style. The default font size will be overwritten. - - Interface for a generic GUI control that can manage it's state. - - For such controls it must be enough to only call the rendering method to have them properly - displaying and updating the underlying state. - + + Scales the provided RectOffset by the scale factor. + Primarily used to scale the KSP GUI controls. + The original value. + The scale factor. + A scaled RectOffset. - - Renders the control in GUI and handles all the interactions. - - The actions list to submit the update operations into. It can be null, in which case - the actions are expected to be executed right away. - - The style for the control canvas. - The options for the controls canvas. + + Makes a scaled skin based on the origin one. - - Human friendly string to present to label the value. + + Reacts on the GUI scale change event and recalculates the skin. - - The actual control that handles the value. + + A utility class to render windows with an alternative skin. + + When the scope starts, it changes global setting GUI.skin. On the scope end, the original value is restored. + It can be used from OnGUI method to replace skin for the entire window. + + - - Action for the button debug control. + + Stores the old skin and sets a new one. + The new skin to set. - - Creates a debug adjustment control for the basic type. - The field caption to show in the dialog. - - The instance of the object that holds the field to be adjusted via GUI. - - - The class that should get the member change notifications. If not set, then - will be the target. - - The field info of the target member. - The property info of the target member. - The action member info. + + Restores the skin that was set before the scope started. - - + + A simple wrapper around the GUI tooltip. + It tracks changes of the current tooltip and emits a GUILayout.Label when appropriate. - - Helper extensions for the generic dictionary container. - + + Tells if even an empty tooltip control still have to be rendered. - - - Returns a value from the dictionary by a key. If the key is not present yet, then a new - default entry is created and returned. - - The dictionary to get value from. - The key to lookup. - The type of the dictionary key. - The type of the dictionary value. - Either an existing value for the key or a default instance of the value. - - If there is a dictionary which values are collections or a class, then a special code is - always needed to properly access this dictionary: - - With this extension the key can safely be accessed with just one call: - - + + A delay for the tooltip control to hide when empty. + - - Helper extensions to deal with type. - - - - + + The tooltip, captured in the last frame. + It always behind one frame! - - - Transforms a pos&rot object from the world space to the local space. The opposite to - . - - The node to use as a parent. - The object in world space. - A new pos&rot object in the local space. - - - + + The last tooltip that was not an empty string. + It's used to present the tooltip during the hideDelay period. - - - Transforms a pos&rot object from the local space to the world space. The opposite to - . - - The node to use as a parent. - The object in local space. - A new pos&rot object in the wold space. - - - + + The last time a non-empty tooltip was spotted. + Used to determine if the control should be hidden. + - - Sets position and rotation in one call./// - The node to update. - The position and rotation in wolrd space. + + A controller for the Unity GUI tooltip. + + It gives a better control on how and when the GUI element tooltip is shown. The tooltip content is rendered as a + GUILayout.Label with the style provided. The Unity GUI layout mechanism applies limitations on when the + code can decide if the control should or should not be shown. This class handles all the requirements. + + + If set to true, then an empty label will be presented even if there is no active tooltip in the frame. It + may be useful for the fixed size layouts. + + + Tells for how long the empty tooltip is to be show as an element until a new non-empty value is obtained. It helps + to mitigate the UI flickering when the tooltip controls are located close to each other. The value is of the + seconds unit. The sparse dialogs may want to set this value to zero. On the other hand, the compact dialogs + with a lot of hinted elements may want to set some delay. As a rule of thumb, in UX a 200ms delay is + considered to be not noticeable by a regular human user. + - - Helper extensions to handel Unity rectangles. - + + Presents the tooltip control and updates the internal state. + + Must be called in every OnGUI call at the place where the tooltip content is supposed to be shown. + + The style of the tooltip. If not provided, then GUI.skin.label will be used. - - Returns the intersection of the specified rectangles. - The first rectangle to compare. - The second rectangle to compare. - The intersection rectangle. - + + Hermetic GUI control for the boolean members. - - A helper class to deal with plugins file structure. + + - - Standard plug-ins folder. + + Creates the control. + The boolean control caption. + The class instance that owns the member to control. + The field to control. + The property to control. + + The callback to call before changing the value. can be + throws form this action to prevent the change. + + The callback to call when the value is changed. + - - A standard directory name to place the mod's binary. + + Hermetic GUI control for the class types. - This name is not mandatory, and is not enforced by the game's core. It's a community adopted - name. + The members in the class must be attributed with + in order to be visible in the control. + + - - - A standard name to place the configs that should be ignored by the game's core. - - - The files in this directory will be ignored by the game during the loading process. This - is a common palce to put tghe mod's settings. A directory with such name can be placed - anywhere within the GameData folder. However, it's usually a subfolder of - . - + + Tells if the nested mebers should be presented. - - - Makes full absolute path from the provided relative path in the game's GameData folder. - + + + + + Creates a control, bound to a member. + The boolean control caption. + The class instance that owns the member to manage. + The field to manage. + The property to manage. + + The callback to call before changing the value. can be + throws form this action to prevent the change. + + The callback to call when the value is changed. + + + Hermetic GUI control for the enum types. - If joining of all the provided parts gives a full path then it's only normalized. In case of - path is relative it's resolved against game's GameData folder. - Note that method doesn't care if the path exists. + Use it when a cheap dropdown control needed. It's not good to work with too many options, + though. The rule of thumb: 2-7 options are OK. - Path parts for an absolute or relative path. - - Absolute path. All relative casts (e.g. '..') will be resolved, and all - directory separators will be translated to the platform format (e.g. '/' will become '\' on - Windows). - - - - Normalizes path by resolving all upcasts. Works for both relative and absolute paths. - - Note that method doesn't care if the path exists. - Path to normalize. - - Path with no . or .. casts. All directory separators will be translated to - / regardless to the platform settings. - - + + - - Returns path relative to the game's GameData folder. + + Creates a control, bound to a member. + The class instance that owns the member to manage. + The field to manage. + The property to manage. + + The callback to call before changing the value. can be + throws form this action to prevent the change. + + The callback to call when the value is changed. + + If false, then the control will start own horizontal section to align the input field + and buttons. + + + The function to use to map the enum values into a human friendly strings. By default, the enum + value is simply converted into string via ToString(). + + + + + Hermetic GUI control for the generic types, represented as a plain text. - Note that method doesn't care if the path exists. The returned path will always use / - as directory separator regardless to the platform. + The default implementation of the control supports all the standard game types that are used in + the config fiels. Extra types support can be added by providing a custom value prototype + interface. - Path parts tp consutruct an absolute or relative path. - - Relative path. All relative casts (e.g. '..') will be resolved, and all - directory separators will be translated to / regardless to the platform settings. - - - Let's say mod's exact location is not known (e.g. as it is for MiniAVC) and the mod needs to - load a texture. In order to do it the mod needs to know a GameData relative path which - can be used as a prefix to the texture. Below is a sample code that figures it out. - - - - - - Returns a relative game's path to the mod's root folder. - - - Given the mod's assembly was loaded from - GameData/ModFolder1/ModFolder2/Plugins/mod.dll, the returned path will be - GameData/ModFolder1/ModFolder2/ because of Plugins folder name is considered to - be a common name for the mod's binaries. - - - If the mod's DLL is located in the folder other than Plugins, then just the parent - folder is returned. E.g. for GameData/ModFolder1/ModFolder2/MyDLLs/mod.dll, the result - would be GameData/ModFolder1/ModFolder2/MyDLLs/. - - - The target to resolve the assembly for. - - An absolute path. There is always a trailing directory separator symbol. - - - - + + - - Returns a relative game's path to the file located in the data folder. - The object instance to use to resolve the mod's assembly. - The data file name. - - Instructs the method to create all the directories and subdirectories in the specified path, - should they not already exist. - - The optional sub-folder name to add to the path. - An absolute path. + + Currently accumulated text input. - - Returns full path to the plugins root folder (a.k.a. GameData). - The full path to the plugins folder. + + Tells if can be applied to the field. - - Base class for a GUI element that incapsulates a class instance member. - - This kind of controls are used to represent and/or edit the values of various types, but not in - the usual OnGUI approach. The usual Unity approach assumes that the value is passed and - returned in each rendering call. However, for the hermetic control, the source of the value is - defined only once, at the creation time. Once it's done, the rendering is only called to have - the logic handled. That said, the caller rendering method doesn't care about the underlying - data, and that's why it's "hermetic". - - The value source is either a field or a property of the class. Due to the need of using - reflections to access the member, these controls are not performance optimized. They are fine - for the debugging and settings dialogs, but for the performance demanding applications a regular - Unity approach is suggested. - - + + String literal that sets or represents the NULL value. - + - + Creates a control, bound to a member. The class instance that owns the member to manage. - - The field to manage. It must be null if is set. - - - The property to manage. It's ignored if is not null. - + The field to manage. + The property to manage. The callback to call before changing the value. can be throws form this action to prevent the change. The callback to call when the value is changed. - - - Returns the type of the member value. - The type object of the member. - - - Get the value from the controlled member. - The type of the member. - The value of the member. - - - Sets value to the controlled member. - The type of the member. - The new value to set. - - The actions list to submit the update actions into. If it's null, then the update and - the notification will happen immediately. + + If false, then the control will start own horizontal section to align the input field + and buttons. + + The value type conversion proto to use to covert the field value to/from string. By default, + all the game's standard configuration types are supported, except the collections. + + - - Calls the customized update method. - It's fail proof. - - - Implemnet actual setting logic. - The value to set. + + Generic interface for the modules that implement a GUI events handling. - - Utility class to help building GUI layout buttons. + + A callback which is called for every GUI event. + + + On the every frame update Unity sends at least two events to every handler: + and . There can be more input + events sent. The implementation must not change the number of controls in the view after the + layout event. + + + The modules don't need to implement this intefrace to be notified. It's called by the Unity + core via messanging. However, implementing the interface make the inheritance and the overall + code maintainability better. + + - - Makes a button that fires a callback when pressed or released. + + Interface for a generic GUI control that can manage it's state. - The callbacks are only fired once for every state change, and are guarnteed to not be called - during the layout phase. The callback is called *after* the state is updated. + For such controls it must be enough to only call the rendering method to have them properly + displaying and updating the underlying state. - The current press state of the button. - The GUI content to present as the button's caption. - The GUI style of the control. - - The GUILayout options to apply to the control. It can be null. - - - The callback to call when the button is pressed. Can be null. - - - The callback to call when the button is released. Can be null. - + + + Renders the control in GUI and handles all the interactions. - The action list to execute the callbacks thru. If the list is omitted, then the callback is - fired right away. Otherwise, it's added to the list and executed when the list is triggered. + The actions list to submit the update operations into. It can be null, in which case + the actions are expected to be executed right away. - The new button press state. - + The style for the control canvas. + The options for the controls canvas. - - Makes a toggle control that fires a callback when the state changes. + + Generic interface for the modules that manage own localizable items. - The callbacks are only fired once for every state change, and are guaranteed to not be called - during the layout phase. The callback is called *after* the state is updated. + The "item" can be anything. If the module pays special attention to deal with the "items", then + it should implement this interface so that the notification could be sent when the language has + changed (or updated). Here are some examples of the localizable items: + + + KSP events, actions or fields that are attributed with . + The module would want to call the method to + have the strings updated. + + Cached strings. The module would want to refresh the cache. + + Dynamically created part menu items. The module would want to recreate them. If that's the case + it's always better to implement , and then just call the update + method. + + - The current toggle state. - The GUI content to present as the button's caption. - The GUI style of the control. - - The GUILayout options to apply to the control. It can be null. - - - The callback to call when the control is checked. Can be null. - - The callback to call when the control is checked. Can be null. - - - The action list to execute the callbacks thru. If the list is omitted, then the callback is - fired right away. Otherwise, it's added to the list and executed when the list is triggered. - - The new button toggle state. - + - - Utility class to draw a simple table with the text colum contents. + + A callback which is called when the localization vesion has changed. - This table cannot hold non-string content. It keeps all the columns to be of the same, and the - size is adjusted to the maximum column's size in the rows. There is a one frame delay between - the content change and the column resizing, which may result in flickering if the content - changes too frequently. The columns try to take as small space as possible, so defining the - minimum size may be a good bet. + This method can be called before the module is fully initialized! A very common use-case is + calling this method from the part module OnAwake() method. - This class is designed to be called on every frame. It's heavily performance optimized. - - - - - Index of the curently rendered column. - - - Current frame maximum widths of the columns. - - - The maximum widths of the columns from the previous frame. - - - Creates a table of the specified column width. - - It's OK to render more columns than reserved. They won't resized, but it's not an error. - - The number of columns to track. - - - Updates the table state each frame to remember the best column size values. - - This method is only interested in the EventType.Layout phase, so no need to call it on - each GUI event when there is a cheap way to detect it. - - - - Tells that a new row is about to be rendered. - Call it before every new row. - - - Adds a text column into the table. - The text to add. - - The style to apply to the text. If not set, then GUI.skin.label is used. - - - - Adds a text column into the table. - The text to add. - The localizable message to get the minimum size from. - - The style to apply to the text. If not set, then GUI.skin.label is used. - - - - - Adds a text column into the table with a value tooltip. - The text to add. - - The tooltip for the column value. Note, that the tooltip is not handled by the table, it gets - rendered by the Unity GUI functionality, which may need to be configured. - - - The style to apply to the text. If not set, then GUI.skin.label is used. - - - - Adds a text column into the table with a value tooltip. - The text to add. - - The tooltip for the column value. Note, that the tooltip is not handled by the table, it gets - rendered by the Unity GUI functionality, which may need to be configured. - - The localizable message to get the minimum size from. - - The style to apply to the text. If not set, then GUI.skin.label is used. - - - - - Adds a content into the table column. - - When possible, this method should be preferred over the other methods, which are simply the - shortcuts to this one. - The text/tooltip content of the column to add. - The style to apply to the text. - The minimum width of the column. - The maximum width of the column. - - - Auto-resizing scrolling control. - - This control automatically shrinks to its content to take as small space as possible, while - still not needing the scrolling. If the height of the content exceeds the specified maximum, - then a vertical scrollbar is added to the view and the view doesn't expand further. - - - - The scrolling position of the area. - - - Starts the scrollable view. - The style of the scrollable area. - - The maximum height, the control is allowed to grow to before switching to the scrolling. - - - The layout options for the view. Don't set the height options! This dimension is controlled by - the control. - - - - Marks the scrollable view end. - - - The full height of the area. - The current height. - - - Hermetic GUI control for the boolean members. - - - - - - Creates the control. - The boolean control caption. - The class instance that owns the member to control. - The field to control. - The property to control. - - The callback to call before changing the value. can be - throws form this action to prevent the change. - - The callback to call when the value is changed. - - - - Hermetic GUI control for the class types. - - The members in the class must be attributed with - in order to be visible in the control. - - - - - - Tells if the nested mebers should be presented. - - - - - - Creates a control, bound to a member. - The boolean control caption. - The class instance that owns the member to manage. - The field to manage. - The property to manage. - - The callback to call before changing the value. can be - throws form this action to prevent the change. - - The callback to call when the value is changed. - - - Hermetic GUI control for the enum types. - - Use it when a cheap dropdown control needed. It's not good to work with too many options, - though. The rule of thumb: 2-7 options are OK. - - - - - - - Creates a control, bound to a member. - The class instance that owns the member to manage. - The field to manage. - The property to manage. - - The callback to call before changing the value. can be - throws form this action to prevent the change. - - The callback to call when the value is changed. - - If false, then the control will start own horizontal section to align the input field - and buttons. - - - The function to use to map the enum values into a human friendly strings. By default, the enum - value is simply converted into string via ToString(). - - - - - Hermetic GUI control for the generic types, represented as a plain text. - - The default implementation of the control supports all the standard game types that are used in - the config fiels. Extra types support can be added by providing a custom value prototype - interface. - - - - - - String literal that sets or represents the NULL value. - - - Currently accumulated text input. - - - Tells if can be applied to the field. - - - - - - Creates a control, bound to a member. - The class instance that owns the member to manage. - The field to manage. - The property to manage. - - The callback to call before changing the value. can be - throws form this action to prevent the change. - - The callback to call when the value is changed. - - If false, then the control will start own horizontal section to align the input field - and buttons. - - - The value type conversion proto to use to covert the field value to/from string. By default, - all the game's standard configuration types are supported, except the collections. - - - - - Generic interface for the modules that manage own localizable items. - - The "item" can be anything. If the module pays special attention to deal with the "items", then - it should implement this interface so that the notification could be sent when the language has - changed (or updated). Here are some examples of the localizable items: - - - KSP events, actions or fields that are attributed with . - The module would want to call the method to - have the strings updated. - - Cached strings. The module would want to refresh the cache. - - Dynamically created part menu items. The module would want to recreate them. If that's the case - it's always better to implement , and then just call the update - method. - - - - - - - A callback which is called when the localization vesion has changed. - - - This method can be called before the module is fully initialized! A very common use-case is - calling this method from the part module OnAwake() method. - - - Unless the implementing class is sealed, the method must be declared as virtual. - The descendants may want to react on the callback as well. + Unless the implementing class is sealed, the method must be declared as virtual. + The descendants may want to react on the callback as well. @@ -2433,10 +2246,10 @@ cannot be a string, though. - - - - + + + + Mapping of the key to the messages. @@ -2472,7 +2285,7 @@ - A utility class to render big disabled bloacks of GUI. + A utility class to render big disabled blocks of GUI. @@ -2481,8 +2294,8 @@ The new color for GUI.color. The new color for GUI.contentColor. The new color for GUI.backgroundColor. - - + + Untiy3D: GUI.color Untiy3D: GUI.contentColor Untiy3D: GUI.backgroundColor @@ -2535,7 +2348,7 @@ out of bounds of the window rectangle, it will be clipped. true if the window is being dragged. - + Untiy3D: GUI.DragWindow @@ -2652,6 +2465,31 @@ + + + Various values that give hints on how the messages should be presented in GUI. + + + It's up to the caller to handle theses settings. They improve the appearance, but are not + required for the proper content presentation. + + + + Minimum width of the area in GUI. + Defined via tag: <gui:min:width,height> + + + Minimum height of the area in GUI. + Defined via tag: <gui:min:width,height> + + + Maximum width of the area in GUI. + Defined via tag: <gui:max:width,height> + + + Maximum height of the area in GUI. + Defined via tag: <gui:max:width,height> + Current version of the loaded localizations. Increase it to have all the caches to invalidate. @@ -2679,7 +2517,7 @@ Tag to use when resolving the string via the localizer. It can be null to indicate that the localization is not needed. In this case the - will be used as text. + will be used as text. KSP.Localization.Localizer @@ -2694,6 +2532,32 @@ value. + + Localized Lingoona Grammar template for the tag. + + + The template is resolved via the Localizer only once. The resolved value is cached and + re-sued. + + + If there is no string defined for the tag, then a will be used. + A warning record will be logged to help tracking such issues. + + + When current language is changed the cached version needs to be reloaded. Call + the method to force it. However, as of KSP 1.3.0 the language + cannot be changed while the game is running. + + + + A Lingoona Grammar template in the + current language. + + + + KSP.Localization.Localizer + + Currently cached version of the localization content. @@ -2711,7 +2575,7 @@ Constructs a localizable message. The tag to use when getting the localized version of the template. If null then the - message will always use as text. + message will always use as text. @@ -2720,7 +2584,7 @@ on the Lingoona website. - If this parameter is omitted, then the will be used as a default + If this parameter is omitted, then the will be used as a default template. I.e. in case of the tag lookup failed, the tag string will be presented instead of a human readable string. @@ -2731,64 +2595,13 @@ An example of how the template can be used and what is the output in the language of the - . Provide it to illustrate the non-obvious cases. + . Provide it to illustrate the non-obvious cases. Lingoona Grammar help Handles any special tags that can prefix the actual template. - - Localized Lingoona Grammar template for the tag. - - - The template is resolved via the Localizer only once. The resolved value is cached and - re-sued. - - - If there is no string defined for the tag, then a will be used. - A warning record will be logged to help tracking such issues. - - - When current language is changed the cached version needs to be reloaded. Call - the method to force it. However, as of KSP 1.3.0 the language - cannot be changed while the game is running. - - - - A Lingoona Grammar template in the - current language. - - - - KSP.Localization.Localizer - - - - - Various values that give hints on how the messages should be presented in GUI. - - - It's up to the caller to handle theses settings. They improve the appearance, but are not - required for the proper content presentation. - - - - Minimum width of the area in GUI. - Defined via tag: <gui:min:width,height> - - - Minimum height of the area in GUI. - Defined via tag: <gui:min:width,height> - - - Maximum width of the area in GUI. - Defined via tag: <gui:max:width,height> - - - Maximum height of the area in GUI. - Defined via tag: <gui:max:width,height> - A utility class to localize the annotated members @@ -2805,18 +2618,18 @@ - Localizes the items. + Localizes the items. The localizable items must be declared as non-static public or protected members. The following items are supported: - . This type may have multiple localization items: for guiName - (spec=null) and for guiUnits (spec=). + . This type may have multiple localization items: for guiName + (spec=null) and for guiUnits (spec=). - . - . + . + . @@ -2825,14 +2638,14 @@ This method can be called at any time during the module's life. However, the - method looks the most appropriate. + method looks the most appropriate. The module instance to localize. - - - - + + + + KSP: KSPField @@ -2985,14 +2798,14 @@ A wrapper class to present a simple overlay window with some text. - The overlay windows don't have a border or title. The main purpose of such windows is +

The overlay windows don't have a border or title. The main purpose of such windows is present the "hints". I.e. short a lived piece of information presented for the current context. - The hint won't be shown in UI until explicitly requsted via a call to the ShowAt* method. - - + The hint won't be shown in UI until explicitly requested via a call to the ShowAt* method. +

+

Keep in mind that this window resources will be destroyed when the scene is re-loaded. I.e. the hint window must be re-created on every scene change. - +

In a common case, the initialization of the hint window is done on the game object awakening, @@ -3002,7 +2815,7 @@ HintOverlay hint; void Awake() { - hint = new HintOverlay(12, 3, Color.white, new Color(0f, 0f, 0f, 0.5f)); + hint = new HintOverlay(() => GUI.skin, () => GUI.skin.label, adjustGuiScale: true); } void OnGUI() { @@ -3011,42 +2824,46 @@ } }
- In the example above text of the hint is set on every frame update since frame count is updated - this frequently. Though, if your data is updated less frequently you may save some performance - by updating text in the methods different from OnGUI. +

In the example above the text of the hint is set on every frame update since the frame count is updated + this frequently. However, if your data is updated less frequently you may save some performance + by updating text in the methods different from OnGUI. You still need to call in + every frame, though. +

- - Size of the sample texture that fills hint window backgroud. - Small values may impact rendering performance. Large values will increase memory - footpring. Choose it wise. - - + Padding when showing hint on the right side of the mouse cursor. - + Padding when showing hint on the left side of the mouse cursor. - + + The hint overlay text. + + Linefeed symbols are correctly handled. Use them to make multiline content. Setting text is an + expensive operation since it results in window size recalculation. Don't update it more + frequently than the underlying data does. + + The text to be show as a hint. + + Precalculated UI text size for the currently assigned text. - + Precalculated style for the hint overlay window. - - Texture to use as the hint background. - - It's important to keep a reference to it in a C# realm. Since otherwise it will be GC'ed by - Unity that doesn't recognize references from the GUIStyle objects. As of Unity 2019.2.2. - + + The GUI scale for which was last updated. + Used to detect when the style needs to be updated. - - Constructs an overaly. - Size of the text font in the hint. - Padding between the text and the window boundaries. - Color of the hint text. - Color of the hint background. If alpha component is different - from 1.0 then background will be semi-transparent. + + Constructs an overlay. + A function that returns the reference skin. + A function that returns the style. + + If set to true, then the overlay will consider the current UI scale setting in the game. The text style + will be adjusted accordingly. + Shows hint text at the current mouse pointer. @@ -3064,27 +2881,13 @@ X position is screen coordinates. Y position is screen coordinates. - - Creates a clear color texture to fill background with. - A background color. - Texture of a default size. - - - The hint overlay text. - - Linefeed symbols are correctly handled. Use them to make multiline content. Setting text is an - expensive operation since it results in window size recalculation. Don't update it more - frequently than the underlaying data does. - - The text to be show as a hint. - A class to wrap a simple localizable UI string. Messages of this type don't have placeholders and can be just casted to a string. - - + + @@ -3118,19 +2921,19 @@ Define the parameter(s) type via the generic argument(s). When the string needs to be - presented, use the method to get the final value. + presented, use the method to get the final value. The arguments can be complex types that override the ToString() method. This approach can be used to customize the output format of the specific argument types. E.g. such values as "distance" can be formatted in a user friendly manner using - . + . - - - - + + + + Lingoona Grammar help @@ -3166,19 +2969,19 @@ Define the parameter(s) type via the generic argument(s). When the string needs to be - presented, use the method to get the final value. + presented, use the method to get the final value. The arguments can be complex types that override the ToString() method. This approach can be used to customize the output format of the specific argument types. E.g. such values as "distance" can be formatted in a user friendly manner using - . + . - - - - + + + + Lingoona Grammar help @@ -3216,19 +3019,19 @@ Define the parameter(s) type via the generic argument(s). When the string needs to be - presented, use the method to get the final value. + presented, use the method to get the final value. The arguments can be complex types that override the ToString() method. This approach can be used to customize the output format of the specific argument types. E.g. such values as "distance" can be formatted in a user friendly manner using - . + . - - - - + + + + Lingoona Grammar help @@ -3268,19 +3071,19 @@ Define the parameter(s) type via the generic argument(s). When the string needs to be - presented, use the method to get the final value. + presented, use the method to get the final value. The arguments can be complex types that override the ToString() method. This approach can be used to customize the output format of the specific argument types. E.g. such values as "distance" can be formatted in a user friendly manner using - . + . - - - - + + + + Lingoona Grammar help @@ -3322,19 +3125,19 @@ Define the parameter(s) type via the generic argument(s). When the string needs to be - presented, use the method to get the final value. + presented, use the method to get the final value. The arguments can be complex types that override the ToString() method. This approach can be used to customize the output format of the specific argument types. E.g. such values as "distance" can be formatted in a user friendly manner using - . + . - - - - + + + + Lingoona Grammar help @@ -3428,13 +3231,13 @@ resulted message may have a unit specification.
- Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. - - - - - + + + + +
Suffix for the "angle" units (degrees). @@ -3489,14 +3292,14 @@
- Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. - - - - - + + + + +
A wrapped numeric value. @@ -3551,11 +3354,11 @@ descendants. - - - - - + + + + + The prefix to use to denote the "money" cost values. @@ -3618,7 +3421,7 @@
- Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. The class uses the unit name localizations from the stock module ModuleEnviroSensor. In @@ -3626,12 +3429,12 @@ used for the unit names. - - - - - - + + + + + +
Localization tag for the "meter" units. @@ -3710,7 +3513,7 @@ - Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. The class uses the unit name localizations from the stock module ModuleEnviroSensor. In @@ -3718,11 +3521,11 @@ used for the unit names. - - - - - + + + + + Localization tag for the "kilonewton" units. @@ -3781,13 +3584,13 @@ Localized message formatting class for a Unity keyboard event. - Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. Even though the name assumes it's only relevant to keyboard, it is not! A mouse or joystick action can also be a part of a "keyboard event", e.g. Ctrl + LMB. - - - + + + Name overrides for special keys. @@ -3829,7 +3632,7 @@ - Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. The class uses the unit name localizations from the stock module ModuleEnviroSensor. In @@ -3837,12 +3640,12 @@ used for the unit names. - - - - - - + + + + + + Localization tag for the "gram" units. @@ -3961,13 +3764,13 @@ resulted message may have a unit specification. - Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. - - - - - + + + + + Suffix for the "percent" units (%). @@ -4078,7 +3881,7 @@ - Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. The class uses the unit name localizations from the stock module ModuleEnviroSensor. In @@ -4086,11 +3889,11 @@ used for the unit names. - - - - - + + + + + Localization tag for the "kilopascal" units. @@ -4157,13 +3960,13 @@ letters long, but it's not mandatory. - Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. - - - - + + + + A wrapped resource ID value. @@ -4228,14 +4031,14 @@ This class resolves the resource type/ID into it's full localized name. - Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. - - - - - + + + + + A wrapped resource ID value. @@ -4306,12 +4109,12 @@ - Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. - - - + + + A wrapped numeric value. @@ -4358,7 +4161,7 @@ - Use it as a generic parameter when creating a descendants. + Use it as a generic parameter when creating a descendants. The class uses the unit name localizations from the stock module InternalSpeed. In @@ -4366,11 +4169,11 @@ used for the unit names. - - - - - + + + + + Localization tag for the "meter per second" units. @@ -4469,44 +4272,501 @@ + + Returns the instance of the player in the current scene. + Instance of the player. + Global scene cache for all the sounds. - - Plays the specified sound. + + Plays the specified sound. + + Every request is cached, so that the subsequent calls to play the same sound won't require the + audio clip to load. However, the same cached sound cannot be played simultaneously from the + different calls - each call will abort the previous play action of the sound. + + + The file path relative to GameData. It can be empty, in which case nothing is played. + + + + + Loads the sound into cache but doesn't play it. + + Use this method when the sound is expected to be frequently played in the scene. However, it + it only makes sense to pre-cache a resource if the first usage of the sound is a latency + critical. The latency difference is not hight enough to be significant for the GUI actions. + + File path relative to GameData. + + + + Initializes the . + It's expected to be called only once. + + + + Loads the audio sample and plays it. + The file path relative to GameData. + An audio resource if loaded or found in the cache, otherwise null. + + + + Attribute to mark a member as available for the runtime interaction. It may be exposed in the + debugging GUI. + + + + + User friendly name of the member. It will be presented in GUI. + + + Any string to use to group the controls. + + + + Creates an attribute that marks the member as availabel for the runtime changes. + + The user freindly string to present in GUI. + + The group of the controls. It may be used to filter the found mebers in debug GUI. + + + + Helper class to deal with the debug GUI functionality. + + + + + Game object to use to host the debug dialogs. + + + + Metadata about the member that is available for debugging. + + + Attribute, that describes the member. + + + Field info for the field member. + + + Property info for the property member. + + + Method info for the method member. + + + Dumps the objects hierarchy to the logs. + + This method recirsively goes down to the all decendants, starting from + . The path, however, is shown realtive to . + + The root object to make the path from. + The descendant of to dump descendants for. + + + Gets the fields, available for debugging. + The instance to get the fields from. + + The group to get the controls for. If empty, then all the controls are returned. + + The member meta info for all the available fields. + + + + Gets the properties, available for debugging. + The instance to get the properties from. + + The group to get the controls for. If empty, then all the controls are returned. + + The member meta info for all the available properties. + + + + Gets the methods, available for calling from the debugging GUI. + The atributed method must have zero parameters. + The instance to get the methods from. + + The group to get the controls for. If empty, then all the controls are returned. + + The member meta info for all the available methods. + + + + Creates a debug dialog for the parts. + + Implement a code that would react on user interactions and invoke this method to show a debug + dialog. The dialog can be bound to a specific part, in which case it only showns for that + part, or the dialog may allow interactively selecting a part from the scene. + + The titile of the dialog. + + The width of the dialog. If omitted, then the code will decide. + + + The width of the value changing controls. If omitted, then the code will decide. + + + The group of the controls to present. If empty, then all the controls are shown. + + + The part to attach the dialog to. If set, then the dialog won't allow changing the part via + GUI. Otherwise, there will be controls in the dialog that allow selection a part from the + scene. + + The created dialog. + + + + + Destroys the debug dialog. + The dialog to destroy. + + + + + Interface for the components that wants to know when their debug adjustable fields or properties + have changed. + + + The methods of this interface not normally called during the game. It's used by the debug code + to update the components in runtime. + + + + + + Notifies that one or more of the debug adjustable fields is about to be updated. + + + If the change must be rejected due to the module is not able to handle the update in its + current state. The description of the exception may be presented in GUI. + + + + Notifies that one or more of the debug adjustable fields have changed. + + + Debug dialog for adjusting the part configuration. + + + + Actual screen position of the console window. + + + A title bar location. + + + A list of actions to apply at the end of the GUI frame. + + + The part being adjusted. + + + Tells if the parent part capture mode is enabled. + + + Array of the modules, available for the debug dialog. + The key of the pair is the module name. + + + The index of the selected module in . + + + Scroll view for the adjustable modules. + + + Dialog title. + + + Dialog width. + + + Size of the controls for the values. + + + Controls group to show. + + + Tells if this dialog must be bound to one part only. + + There will be no part selection UI offered, so the caller must set the part. If the parent + part dies, then the dialog automatically closes. + + + + + + + + Sets the part to be adjusted. + The part to set. + + + Shows a window that displays the winch controls. + Window ID. + + + Simple performance counter to measure CPU cost of the code branch. + + The counter itself can have a performance impact, but it's not counted towards the methods or + function cost being measured. Don't profile branches that have other performance counters, since + such measurements will also count the overhead of thouse counters. + + + + Total number of readings captured. + The number of times was called. + + + Total elapsed milleseconds in all readings. + The total number of milliseconds, spent in the measured code. + + + Average time spent per one reading. + The average time in milliseconds. + + + Maximum time spent in one reading during the life of the counter. + The maximum duration, taken by the measured code. + + + Minimum time spent in one reading during the life of the counter. + The minimum duration, taken by the measured code. + + + Measures timing in a simple action that doesn't return result. + The action to measure. + + + Measures timing in a function that returns result. + The function to measure. + The return parameter of the measured function. + The value from the measured function. + + + Wrapper class that gives a GUI control for editing the standard game types. + + This control is not performance optimized. It's primarily designed for the simplicity of + the calling code in the cases like a simple settings dialog or a debug inspector. + + + + + + + Human friendly string to present to label the value. + + + The actual control that handles the value. + + + Action for the button debug control. + + + Creates a debug adjustment control for the basic type. + The field caption to show in the dialog. + + The instance of the object that holds the field to be adjusted via GUI. + + + The class that should get the member change notifications. If not set, then + will be the target. + + The field info of the target member. + The property info of the target member. + The action member info. + + + + + + Helper extensions for the generic dictionary container. + + + + + Returns a value from the dictionary by a key. If the key is not present yet, then a new + default entry is created and returned. + + The dictionary to get value from. + The key to lookup. + The type of the dictionary key. + The type of the dictionary value. + Either an existing value for the key or a default instance of the value. + + If there is a dictionary which values are collections or a class, then a special code is + always needed to properly access this dictionary: + + With this extension the key can safely be accessed with just one call: + + + + + Helper extensions to deal with type. + + + + + + + + Transforms a pos&rot object from the world space to the local space. The opposite to + . + + The node to use as a parent. + The object in world space. + A new pos&rot object in the local space. + + + + + + + Transforms a pos&rot object from the local space to the world space. The opposite to + . + + The node to use as a parent. + The object in local space. + A new pos&rot object in the wold space. + + + + + + Sets position and rotation in one call./// + The node to update. + The position and rotation in wolrd space. + + + Helper extensions to handel Unity rectangles. + + + + Returns the intersection of the specified rectangles. + The first rectangle to compare. + The second rectangle to compare. + The intersection rectangle. + + + + A helper class to deal with plugins file structure. + + + Standard plug-ins folder. + + + A standard directory name to place the mod's binary. + + This name is not mandatory, and is not enforced by the game's core. It's a community adopted + name. + + + + + A standard name to place the configs that should be ignored by the game's core. + + + The files in this directory will be ignored by the game during the loading process. This + is a common palce to put tghe mod's settings. A directory with such name can be placed + anywhere within the GameData folder. However, it's usually a subfolder of + . + + + + Returns full path to the plugins root folder (a.k.a. GameData). + The full path to the plugins folder. + + + + Makes full absolute path from the provided relative path in the game's GameData folder. + - Every request is cached, so that the subsequent calls to play the same sound won't require the - audio clip to load. However, the same cached sound cannot be played simultaneously from the - different calls - each call will abort the previous play action of the sound. + If joining of all the provided parts gives a full path then it's only normalized. In case of + path is relative it's resolved against game's GameData folder. + Note that method doesn't care if the path exists. - - The file path relative to GameData. It can be empty, in which case nothing is played. - - + Path parts for an absolute or relative path. + + Absolute path. All relative casts (e.g. '..') will be resolved, and all + directory separators will be translated to the platform format (e.g. '/' will become '\' on + Windows). + - - Loads the sound into cache but doesn't play it. + + + Normalizes path by resolving all upcasts. Works for both relative and absolute paths. + + Note that method doesn't care if the path exists. + Path to normalize. + + Path with no . or .. casts. All directory separators will be translated to + / regardless to the platform settings. + + + + + Returns path relative to the game's GameData folder. - Use this method when the sound is expected to be frequently played in the scene. However, it - it only makes sense to pre-cache a resource if the first usage of the sound is a latency - critical. The latency difference is not hight enough to be significant for the GUI actions. + Note that method doesn't care if the path exists. The returned path will always use / + as directory separator regardless to the platform. - File path relative to GameData. - + Path parts tp consutruct an absolute or relative path. + + Relative path. All relative casts (e.g. '..') will be resolved, and all + directory separators will be translated to / regardless to the platform settings. + + + Let's say mod's exact location is not known (e.g. as it is for MiniAVC) and the mod needs to + load a texture. In order to do it the mod needs to know a GameData relative path which + can be used as a prefix to the texture. Below is a sample code that figures it out. + + + - - Initializes the . - It's expected to be called only once. - + + Returns a relative game's path to the mod's root folder. + + + Given the mod's assembly was loaded from + GameData/ModFolder1/ModFolder2/Plugins/mod.dll, the returned path will be + GameData/ModFolder1/ModFolder2/ because of Plugins folder name is considered to + be a common name for the mod's binaries. + + + If the mod's DLL is located in the folder other than Plugins, then just the parent + folder is returned. E.g. for GameData/ModFolder1/ModFolder2/MyDLLs/mod.dll, the result + would be GameData/ModFolder1/ModFolder2/MyDLLs/. + + + The target to resolve the assembly for. + + An absolute path. There is always a trailing directory separator symbol. + - - Loads the audio sample and plays it. - The file path relative to GameData. - An audio resource if loaded or found in the cache, otherwise null. + + - - Returns the instance of the player in the current scene. - Instance of the player. + + Returns a relative game's path to the file located in the data folder. + The object instance to use to resolve the mod's assembly. + The data file name. + + Instructs the method to create all the directories and subdirectories in the specified path, + should they not already exist. + + The optional sub-folder name to add to the path. + An absolute path. Flags to specify key modifiers combination. @@ -4594,7 +4854,22 @@ The button or null if event doesn't have any recognizable mouse button. - + + Checks if the mouse click event has happen during the frame. + + This check treats "left" and "right" modifiers equally. And it doesn't consider any of the + state modifiers (CAPS, NUM, SCROLL, etc.). + + The event to match for. + + true if the requested combination has matched the current frame state. + + + + Input.GetKeyDown + + + Checks if the mouse click event has happen during the frame. This check treats "left" and "right" modifiers equally. And it doesn't consider any of the @@ -4608,10 +4883,6 @@ Update method don't need to do so since the right action button can be extracted from Input. - - Tells if only the modifiers in the event need to be checked. This is how a "precondition" can - be verified when the GUI is interactive and depends on the pressed keys. - true if the requested combination has matched the current frame state. @@ -4628,8 +4899,8 @@ The fields of this type are correctly handled by the stock game persisting functionality - (). It's also compatible with the KSPDev persisting logic - (). + (). It's also compatible with the KSPDev persisting logic + (). Important! This type will be correctly loaded or saved by the KSP core but it will @@ -4654,7 +4925,7 @@ } ]]> - In case of the switch state needs to be checked from the other methods use + In case of the switch state needs to be checked from the other methods use property: - + KSP: KSPField + + Tells if any switch is being hold. + + This value is a version specific. I.e. the multiple versions of the utils DLL will not see + each other. So, if this property returns true then the only safe assumption is that any + switch within the running mod is being hold. Ideally, when all the mods in the game run + the same version of the utils DLL, this property will truly say if any in the game is + in the hold state. + + true if any switch key is being hold. + Maximum delay to record a click event. @@ -4748,6 +5030,15 @@ KSP: KeyBinding + + Defines the current hold state of the switch. + + This property may not represent the actual keyboard key hold state since it can be assigned + from the code. + + true if this switch is being hold. + + Key code for the switch. @@ -4765,13 +5056,57 @@ If the state needs to be reset then caller must do it explicitly. + + + Event that notifies about the hold state change. The event is only called when the state has + actually changed. + + + Remember to remove the listeners when their owner class is destroyed by the game. If it's not + done then no NRE will happen, but the "ghost" listeners will continue to react on the events. + + + + + Event that notifies that the switch key has been pressed. + + + Remember to remove the listeners when their owner class is destroyed by the game. If it's not + done then no NRE will happen, but the "ghost" listeners will continue to react on the events. + + + + + Event that notifies that the switch key has been released. + + + Remember to remove the listeners when their owner class is destroyed by the game. If it's not + done then no NRE will happen, but the "ghost" listeners will continue to react on the events. + + + + + Event that notifies about the click event. + + + + In order for the click event to trigger the key release event must happen within the + delay after the preceding press event. + + + Remember to remove the listeners when their owner class is destroyed by the game. If it's not + done then no NRE will happen, but the "ghost" listeners will continue to react on the events. + + + + Last press event timestamp. Loads a persisted switch binding. The node to get values from. - + KSP: KSPField @@ -4779,7 +5114,7 @@ Saves the switch binding. The node to store the values into. - + KSP: KSPField @@ -4811,71 +5146,7 @@ This method can be used to simulate a click event. The new hold state. - - - - Tells if any switch is being hold. - - This value is a version specific. I.e. the multiple versions of the utils DLL will not see - each other. So, if this property returns true then the only safe assumption is that any - switch within the running mod is being hold. Ideally, when all the mods in the game run - the same version of the utils DLL, this property will truly say if any in the game is - in the hold state. - - true if any switch key is being hold. - - - Defines the current hold state of the switch. - - This property may not represent the actual keyboard key hold state since it can be assigned - from the code. - - true if this switch is being hold. - - - - - Event that notifies about the hold state change. The event is only called when the state has - actually changed. - - - Remember to remove the listeners when their owner class is destroyed by the game. If it's not - done then no NRE will happen, but the "ghost" listeners will continue to react on the events. - - - - - Event that notifies that the switch key has been pressed. - - - Remember to remove the listeners when their owner class is destroyed by the game. If it's not - done then no NRE will happen, but the "ghost" listeners will continue to react on the events. - - - - - Event that notifies that the switch key has been released. - - - Remember to remove the listeners when their owner class is destroyed by the game. If it's not - done then no NRE will happen, but the "ghost" listeners will continue to react on the events. - - - - - Event that notifies about the click event. - - - - In order for the click event to trigger the key release event must happen within the - delay after the preceding press event. - - - Remember to remove the listeners when their owner class is destroyed by the game. If it's not - done then no NRE will happen, but the "ghost" listeners will continue to react on the events. - - - + Declares callbacks that are called when a joint between two parts is changed. @@ -5339,12 +5610,12 @@ libraries/versions in the game. + + Loaded library identifier. + Tells if the loader has already initialized. - - Loaded library indentifier. - A set of tools to format various game enities for debugging purposes. @@ -5452,10 +5723,10 @@ supported object types are: The primitive types and strings are returned as is. - . The string will have the part ID. - . The string will have a part ID and the module index. + . The string will have the part ID. + . The string will have a part ID and the module index. - . The string will have the full path in the game objects hirerachy. + . The string will have the full path in the game objects hirerachy. @@ -5615,8 +5886,8 @@ "looking" at the each other. - The object's "look" direction is a direction. The resulted - direction of the source will be the opposite to the target. + The object's "look" direction is a direction. The resulted + direction of the source will be the opposite to the target. The object to align. The child node of the source to use as the align point. @@ -5661,6 +5932,25 @@ Various tools to deal with procedural colliders. + + Defines how collisions should be checked on a primitive. + + + No collisions check. + + + Check collisions basing on the mesh. It's performance expensive. + + Unity3D: MeshCollider + + + Simple collider which fits the primitive type. It's performance optimized. + + Unity3D: PrimitiveType + + + Simple collider which wraps all mesh vertexes. It's performance optimized. + Drops the colliders in all the children objects, and adds one big collider to the parent. @@ -5673,7 +5963,7 @@ Note, that radius of the sphere and the capsule colliders is the same on both X and Y axis. If the combined boundary box has any of the dimensions significantly different then it makes - sense to choose a different collider type. Or break down the hirearchy into more colliders. + sense to choose a different collider type. Or break down the hierarchy into more colliders. Parent object. @@ -5688,6 +5978,7 @@ Then, the collider either wraps this box entirely, or sits inside it entirely. If this parameter is true then the collider will cover the boundary box. + The collider created or null. Unity 3D: GameObject @@ -5726,8 +6017,21 @@ , , and are supported. - FIXME: it's not working with asymetric meshes - FIXME: use GameOvbject.GetRedererBounds? + The adjusted collider. + FIXME: it's not working with asymmetric meshes + FIXME: use GameObject.GetRendererBounds? + + + Returns a collider of the requested type or creates one if needed. + + This method returns the exact collider component if it exist in the . However, if the object + doesn't have a collider, then a new one will be created. If the game object has a collider but its type is + incompatible, it will be deleted and a new compatible collider will be created. Note that the old collider, if + present, will be removed using the method. + + + + The found or created collider. Disables/enables all the colliders between the objects. @@ -5788,31 +6092,34 @@ The part to check for. The value to return if no suitable colliders found. - The filter function to apply to every collider. Return false from it to sklip the + The filter function to apply to every collider. Return false from it to skip the collider in the following checks. The square distance or if no colliders found. - - Defines how collisions should be checked on a primitive. - - - No collisions check. - - - Check collisions basing on the mesh. It's performance expensive. - - Unity3D: MeshCollider - - - Simple collider which fits the primitive type. It's performance optimized. - - Unity3D: PrimitiveType + + Destroys the collider in a way which is safe for physical callback methods. + + Uses DestroyImmediate to drop the collider when possible. If called during the FixedUpdate cycle, + the Destroy is used, and the collider gets explicitly disabled. In the latter case, the collider won't + actually be deleted after the call (it will on the next frame update), but it won't be executing any behavior and + another collider of the same type could be be added. The caller must always assume that the collider is not + immediately removed from the GameObject. Thus, the Collider.enabled property must be checked when + fetching the active collider. + + The object to destroy. Can be null. - - Simple collider which wraps all mesh vertexes. It's performance optimized. + + Returns the first active collider of the requested type. + + Use this method in conjunction with to properly handle colliders operations within one + frame. + + The object to get a collider from. + The type of the collider to request. + The collider or null if no active colliders of that type were found. Various tools to deal with game object hierarchy. @@ -5866,7 +6173,7 @@ Finds a transform in the hirerachy by the provided path. - See the path format in . + See the path format in . The transfrom to start looking from. @@ -5878,7 +6185,7 @@ a warning log record will be made. A transform or null if nothing found. - + Untiy3D: Transform @@ -5909,7 +6216,7 @@ parent until path a/b is found. If multiple paths have matched the pattern, then the shortest path will be returned. Be careful with this pattern since in case of not matching anything it will walk thought the whole hirerachy, starting from - . + . @@ -5965,7 +6272,7 @@ // *b* => a/abc ]]> - + Untiy3D: Transform @@ -6031,7 +6338,7 @@ The raw name with any symbols. A name where all the special symbols are properly escaped. - + Destroys the object in a way which is safe for physical callback methods. The Unity UnityEngine.Object.Destroy method only marks object for deletion, but before @@ -6042,11 +6349,11 @@ The object to destroy. Can be null. - - + + - - + + Searches thru the nodes, implementing the BFS algorithm. @@ -6119,20 +6426,21 @@ Rescales texture so what one sample covers exactly one unit of the primitive length. +

Normally one texture sample covers the whole primitive regardless to its length. By calling this method you ensure that one sample keeps its ratio comparing to a linear unit. If primitive is too short to fit the texture then the texture is truncated. If primitive is too long to be covered by one sample then the texture will be tiled to fill the space. - +

+

This methods assumes UV data on the primitive was created for a length of 1m. With this - assumption in mind the Z axis of the local scale is cosidered "the length". + assumption in mind the Z axis of the local scale is considered "the length". method guarantees that newly created primitive always has length of one meter but if primitive was created by other means its default length can be different. - +

Game object to adjust material on. Z axis scale gives the length. - Length to be completly covered by one sample of the texture. - + Length to be completely covered by one sample of the texture. Specific renderer to adjust texture in. If null then first renderer on the object will be updated. Note, that getting renderer from the object is an expensive operation. When performance is the key it makes sense caching the renderer, and @@ -6150,9 +6458,7 @@ parts. And it's a good practice to share materials within the same part. Game object to start searching for renderers from. - - New shader name. If null then it will not be changed. - + New shader name. If null then it will not be changed. Color to set. If null then it will not be changed. Unity3D: Shader Unity3D: Material @@ -6163,9 +6469,9 @@ XY of the cylinder. Z-axis of the cylinder. Material for the primitive. - Parent transfrom to atatch primitive to. + Parent transform to attach primitive to. Type of the collider to create on the primitive. - Sphere game object. + Cylinder game object. Unity3D: Material Unity3D: Transform @@ -6177,9 +6483,9 @@ Y-axis of the box. Z-axis of the box. Material for the primitive. - Parent transfrom to atatch primitive to. + Parent transform to attach primitive to. Type of the collider to create on the primitive. - Sphere game object. + Box game object. Unity3D: Material Unity3D: Transform @@ -6189,7 +6495,7 @@ Creates an ideal sphere. Diameter of the sphere. Material for the primitive. - Parent transfrom to atatch primitive to. + Parent transform to attach primitive to. Type of the collider to create on the primitive. Sphere game object. Unity3D: Material @@ -6198,13 +6504,34 @@
- Creates a primitive mesh and attaches it to the model. + Creates a primitive mesh without colliders and attaches it to the model. +

For Z and Y axis will be swapped to make Z "the length". - +

+

Collider on the primitive will be destroyed. Consider using to setup the right collider when needed. - +

+
+ The type of the primitive. + + The scale to bring all the mesh vertices to. The scale is applied on the mesh, i.e. it's + applied on the vertices, not the transform. + + The material to use for the primitive. + The parent transform to attach the primitive to. + The game object of the new primitive. + + Unity3D: GameObject.CreatePrimitive + Unity3D: Material + +
+ + Creates a primitive and attaches it to the model. + + For Z and Y axis will be swapped to make Z "the length". The primitive will + have a collider of the appropriate type. The type of the primitive. @@ -6220,19 +6547,19 @@
- Translates meshes's verticies. + Translates meshes' vertices. - This is different from setting postion, rotation and scale to the transform. This method - actually changes vetricies in the mesh. It's not performance effective, so avoid doing - it frequiently. + This is different from setting position, rotation and scale to the transform. This method + actually changes vertices in the mesh. It's not performance effective, so avoid doing + it frequently. Model object to change the mesh in. - Offset for the verticies. If not specified then the offset is zero. The offset is added + Offset for the vertices. If not specified then the offset is zero. The offset is added after the scale and the rotation have been applied. - Rotation for the verticies. If not set then no rotation is added. + Rotation for the vertices. If not set then no rotation is added. Scale for the vertex positions. If not specified then the scale is not affected. @@ -6261,10 +6588,10 @@ - + Tells if was called on the part. - + List of events to call to cleanup registered game event listeners. They are called from the destroy method. @@ -6272,16 +6599,16 @@ - + - + - + - + @@ -6298,6 +6625,14 @@ + + Notifies the part is being created from the stock EVA construction mode. + + This callback is called from . In the EVA mode the parts in flight are copied "as-is" and then + re-instantiated for the purpose of the drag operation. This may capture some internal state that the original part + would not wish to exist in the dragged part. This method can be used to reset such state. + + Shows a UI messages with regard to the currently active vessel. @@ -6307,7 +6642,7 @@ The message to show. - Tells if the messages is an error condition report. Such messages will be highlighed. + Tells if the messages is an error condition report. Such messages will be highlighted. @@ -6323,7 +6658,7 @@ This method can be called multiple times in the part's life time, so keep this method - ideponent. Repetative calls to this method should not break the part's logic. + idempotent. The repetitive calls to this method should not break the part's logic. @@ -6331,35 +6666,53 @@ Registers a game event listener and cleans it up on module destruction. Instead of overriding both OnAwake and OnDestroy methods to register/unregister - KSP event listeners, do register via this method. The unregistration will be done + KSP event listeners, do register via this method. The un-registration will be done automatically when the component dies. The game event to register for. The event listener. The type of EventData of the related event. + + Registers a game event listener and cleans it up on module destruction. + + Instead of overriding both OnAwake and OnDestroy methods to register/unregister + KSP event listeners, do register via this method. The un-registration will be done + automatically when the component dies. + + The game event to register for. + The event listener. + The first type in EventData of the related event. + The second type in EventData of the related event. + Helper methods to deal with the part models. - + Refreshes the highlighters on the part that owns the provided model. When a part is highlighted (e.g. due to the mouse hover event), it highlights its models via a pre-cached set of the highlighter components. This cache is constructed on the part creation. If a model is added or removed from the part in runtime, the cache needs to be updated. This - method does it by finding the part from the game objects hirerachy. If there is a part found, + method does it by finding the part from the game objects hierarchy. If there is a part found, then its highlighters are updated. The game object which needs an update. It can be null. + If set, then this object and all its children will be excluded from highlighting. - + Refreshes the highlighters on the part. - It goes thru the highlighters cache and drops all the renderers that are no more in the part's + It goes through the highlighters cache and drops all the renderers that are no more in the part's model hierarchy. Then, it gets all the renderers in the hierarchy and ensures all of them are in the cache. It's not a cheap operation performance wise. The part to refresh the highlighters for. It can be null. + + If set, then this object and all its children will be excluded from highlighting. Note, that the stock game logic + doesn't assume a case when some renderers from the model are not subject to highlighting. The client must track + events which result to the stock update logic to run and repeat the custom update to maintain the excluded state. + @@ -6592,6 +6945,11 @@ on the parent object to let them updating as needed. + + Previously known scale onf UI. + + The UI scale value that was in effect before the change. + Activates the component. @@ -6601,11 +6959,6 @@ Callback that is called when game settings, like UI scale, are changed. - - Previously known scale onf UI. - - The UI scale value that was in effect before the change. - Set of tools to check the API method arguments. @@ -6935,6 +7288,78 @@ The enum to use as the state constants. + + Current state of the machine. + + + Setting the same state as the current one is a NO-OP. Setting of a new state may throw an + exception in the strict mode. + + + The initial state is always null, which means STOPPED. The caller must set the + initial state before starting using the machine. In spite of the other transitions, the + initial state change is not restricted by the state transition constraints, regardless to the + setting. + + + To STOP the machine, just set the current state to null. No "enter state" + handlers will be executed in this case, but all the "leave state" handlers will do their job. + + + The current state. It can be null. + + + + + Tells if the machine was shutdown. + Once the machine was shutdown, all other interactions to it will be bounced with an error log. + true if machine has been shutdown and cannot serve transitions anymore. + + + Tells if all the transitions must be explicitly declared. + The strict mode state. + + + + + Delegate for a callback which notifies about a state change. + + The state of the machine. Its exact meaning depends on the circumstances under which the + callback has been called. + + + + + + + Delegate to track an arbitrary state transition. + The state before the change. + The state after the change. + + + + + + Event that fires before the state machine has changed its state. + + The event is fired before the new state has been applied to the state machine and the + transition callbacks are called, but after the transition validation is done. I.e. this + event won't trigger if the transition failed due to the constraints. + + + + + + + Event that fires when the state machine has changed its state. + + The event is fired after the new state has been applied to the state machine and all + the transition callbacks are handled. + + + + + Constructs a new uninitialized state machine. Tells if all the transitions must be explicitly declared. @@ -6947,7 +7372,7 @@ Defines a state and the allowed target states for it. - In the strict mode it's required that every transition is declared excplicitly. + In the strict mode it's required that every transition is declared explicitly. The source state. The list of the states that are allowed as the targets. @@ -6957,7 +7382,7 @@ Clears the transitions for the source state if any. - The source state to clear the tarnsitions for. + The source state to clear the transitions for. @@ -6984,9 +7409,9 @@ new state, to which the machine is going to switch. - Tells if this handler is allowed to be called when the state machine intitates from the + Tells if this handler is allowed to be called when the state machine initiates from the null state. This usually means the owning object is in process of loading its state. - Not all functionality can be availabe at this moment. + Not all functionality can be available at this moment. Tells if this handler is allowed to be called when the state machine goes into the null @@ -7011,14 +7436,14 @@ - - Verifies that the state machine is started. - If state machine is not yet started. - Verifies that the state machine is not started. If state machine is already started. + + Verifies that this machine has not been shutdown. + If the machine has been shutdown. + Changes the machine's state if the current and the new states are different. Checks if the @@ -7048,73 +7473,6 @@ Tells if the transition is about to happen or has already happen. - - Current state of the machine. - - - Setting the same state as the current one is a NO-OP. Setting of a new state may throw an - exception in the strict mode. - - - The initial state is always null, whiсh means STOPPED. The caller must set the - initial state before starting using the machine. In spite of the other transitions, the - initial state change is not restricted by the state transition constraints, regardless to the - setting. - - - To STOP the machine, just set the current state to null. No "enter state" - handlers will be executed in this case, but all the "leave state" handlers will do their job. - - - The current state. It can be null. - - - - - Tells if all the transitions must be excplicitly declared. - The strict mode state. - - - - - Event that fires before the state machine has changed its state. - - The event is fired before the new state has been applied to the state machine and the - transition callbacks are called, but after the transition validation is done. I.e. this - event won't trigger if the transition failed due to the constraints. - - - - - - - Event that fires when the state machine has changed its state. - - The event is fired after the new state has been applied to the state machine and all - the transition callbacks are handled. - - - - - - - Delegate for a callback which notifies about a state change. - - The state of the machine. Its exact meaning depends on the circumstances under which the - callback has been called. - - - - - - - Delegate to track an arbitrary state transition. - The state before the change. - The state after the change. - - - - A helper class that holds string and ID defintions for all the game stock resources. @@ -7284,6 +7642,17 @@ Position of the transform. + + Euler rotation. + + The rotation angles are automatically adjusted to stay within the [0; 360) range. + + The Euler angles of the rotation. + + + Orientation of the transform. + The rotation of the transfrom. + Constructs a default instance. Required for the persistence to work correctly. @@ -7357,16 +7726,5 @@ Ensures that all the angles are in the range of [0; 360). - - Euler rotation. - - The rotation angles are automatically adjusted to stay within the [0; 360) range. - - The Euler angles of the rotation. - - - Orientation of the transform. - The rotation of the transfrom. - diff --git a/CHANGELOG.md b/CHANGELOG.md index 4644dd45e..930c5e09c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,28 @@ +# 1.8 (June 27th, 2021): +* [NOTICE] If a connected KAS part gets involved in a stock EVA construction operation, it will get immediately detached from the peer. To avoid unpexected behvior, it's recommended to manually break the link before using EVA construction mode. +* [NOTICE] The interactive links (like in `PCB`) are now not possible in EVA construction mode. +* [Compatibility] Drop AVC version check due to the KSP `1.12` duplicated mods handling bug. +* [Change] Better detect if any of the peers in the KAS connection got destroyed for any reason. The link gets properly broken in this case. +* [Enhancement] Allow attaching to the winches surface to let reinforcing them with struts. +* [Enhancement] Don't show resources that cannot be transferred in the RTS GUI. +* [Enhancement] Allow disabling the controls hints in the RTS resource transfer dialog. Use setting `showTransferDialogHints`. +* [Enhancement] Allow disabling the controls hints in the winches remote control dialog. Use setting `showRemoteControlDialogHints`. +* [Enhancement #248] Add ability to scale Transfer GUI. +* [Enhancement #321] Scale the Winch GUI dialog. +* [Fix #302] GUI does not respect hide/show function. +* [Fix #306] Logs spam from the parts dropped on the ground. +* [Fix #307] Interactive attach mode conflicts with construction mode. +* [Fix #308] Linked parts can be dragged in construct mode. +* [Fix #309] TJ parts cannot align when pulled out of cargo. +* [Fix #311] Breaks the Asteroid Redirect Training Mission. +* [Fix #313] Coupling vessels via the rigid link cause vessel breakage. +* [Fix #314] Retract cable option is visible when the connector is locked. +* [Fix #315] Attaching KAS links resets EVA editor parts highlighting. +* [Fix #316] The detached physicsless parts stay physicsless. +* [Fix #317] Coupling role delegation doesn't work. +* [Fix #318] EVA construction mode highlighting stays on the KAS pipes after the mode is canceled. +* [Fix #320] Renderer is active even on the locked winch connector. + # 1.7 (July 30th, 2020): * [Change] Better react on the attached part(s) destruction to properly reset the link state. * [Change] Some performance improvement for the winch connector handling. diff --git a/KAS.version b/KAS.version index d9d2a6363..2d4e40261 100644 --- a/KAS.version +++ b/KAS.version @@ -7,8 +7,8 @@ }, "KSP_VERSION": { "MAJOR": 1, - "MINOR": 9, - "PATCH": 1 + "MINOR": 12, + "PATCH": 0 }, "KSP_VERSION_MAX": { "MAJOR": 1, @@ -17,15 +17,15 @@ }, "KSP_VERSION_MIN": { "MAJOR": 1, - "MINOR": 8, + "MINOR": 11, "PATCH": 0 }, "NAME": "KAS", "URL": "https://github.com/ihsoft/KAS/blob/master/KAS.version", "VERSION": { - "BUILD": 37663, + "BUILD": 38781, "MAJOR": 1, - "MINOR": 7, - "PATCH": 7516 + "MINOR": 8, + "PATCH": 7848 } } \ No newline at end of file diff --git a/Lang/en-us.cfg b/Lang/en-us.cfg index 1cb29d71c..d96cef8a7 100644 --- a/Lang/en-us.cfg +++ b/Lang/en-us.cfg @@ -1,10 +1,10 @@ -// Version: 6 +// Version: 7 // Do NOT change the version unless a new string is added or an existing one was deleted. // A simple string update is not a new version! The version number is used to keep all // the localizations in sync. The EN-US localization file is the primary file, and all the // other languages should catch-up as the version is increasing. // Authors: Supercheese -// Last updated: 30/07/2020 +// Last updated: 06/27/2021 Localization { en-us @@ -204,17 +204,17 @@ Localization #kasLOC_11010 = Highlight the winch in the scene // The text for the winch status in which it cannot be remotely operated for any // reason. - #kasLOC_11011 = Offline + #kasLOC_11011 = Offline // The GUI hint to explain the OFFLINE state. #kasLOC_11012 = Cannot contact the winch. Is the vessel controllable? // The text for the winch status that tells that the main winch attach node is // occupied by an incompatible (non-KAS) part. - #kasLOC_11013 = Blocked + #kasLOC_11013 = Blocked // The GUI hint to explain the BLOCKED state. #kasLOC_11014 = Winch attach node is blocked by another part // The text for the winch status that tells that the cable connector is locked to // the winch, and the cable length is zero. - #kasLOC_11015 = Retracted + #kasLOC_11015 = Retracted // The GUI hint to explain the RETRACTED state. #kasLOC_11016 = The connector is locked into the winch // The GUI hint of the button that triggers retracting of the cable. The cable will @@ -247,16 +247,16 @@ Localization // I.e. its actual length is not greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<1>> is the real cable length of type DistanceType. - #kasLOC_11025 = <<1>> / <<2>> + #kasLOC_11025 = <<1>> / <<2>> // The formatter string for the cable lengths when the cable *is* under strain. I.e. // its actual length is greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<2>> is the real cable length of type DistanceType. - #kasLOC_11026 = <<1>> / <<2>> + #kasLOC_11026 = <<1>> / <<2>> // The formatter string for the winch motor speed. // Argument <<1>> is the current motor speed type VelocityType. // Argument <<2>> is the settings for the desired motor speed of type VelocityType. - #kasLOC_11027 = <<1>> / <<2>> + #kasLOC_11027 = <<1>> / <<2>> // ********** Type: KAS.KASJointCableBase, KSPDev Messages @@ -361,7 +361,7 @@ Localization // Argument <<1>> is the maximum amount (capacity) of type CompactNumberType. // Example usage: // 2.56 / 1,234 - #kasLOC_12003 = <<1>> / <<2>> + #kasLOC_12003 = <<1>> / <<2>> // The information string that tells what is the selected or calculated transfer // speed is. #kasLOC_12004 = Current transfer speed: <<1>> units per second @@ -400,6 +400,9 @@ Localization // The message to present in the transfer dialog when the parts are docked. Hence, // the stock game functionality must be used to transfer the resources. #kasLOC_12016 = Not available in the docked mode + // The message to present when there are no resources that can be transferred in any + // direction between the vessels. + #kasLOC_12017 = Not found any resources for transfer // ********** Type: KAS.KASLinkSourceBase, KSPDev Messages @@ -430,6 +433,13 @@ Localization // Message to display when the target is refusing to couple (dock) with the link // source. #kasLOC_02008 = Target cannot couple + // Message to display when a linked part becomes a target to EVA construction move + // or detach operation. + #kasLOC_02009 = Unlinking due to the EVA construction action + // Message to display when an interactive link mode is being enabled while the stock + // EVA construction mode is active. In this mode the KAS interactive links are + // completely disabled to not interfere with the stock game functionality. + #kasLOC_02010 = Interactive links are not allowed in the EVA construction mode // ********** Type: KAS.KASLinkSourceInteractive, KSPDev Messages diff --git a/Lang/es-es.cfg b/Lang/es-es.cfg index 0dbce5593..142473048 100644 --- a/Lang/es-es.cfg +++ b/Lang/es-es.cfg @@ -201,17 +201,17 @@ Localization #kasLOC_11010 = Resalte el cabrestante en la escena. // The text for the winch status in which it cannot be remotely operated for any // reason. - #kasLOC_11011 = Desconectado + #kasLOC_11011 = Desconectado // The GUI hint to explain the OFFLINE state. #kasLOC_11012 = No se puede contactar con el cabrestante. ¿La nave es controlable? // The text for the winch status that tells that the main winch attach node is // occupied by an incompatible (non-KAS) part. - #kasLOC_11013 = Obstruido + #kasLOC_11013 = Obstruido // The GUI hint to explain the BLOCKED state. #kasLOC_11014 = El nodo de conexión del cabrestante está bloqueado por otra parte // The text for the winch status that tells that the cable connector is locked to // the winch, and the cable length is zero. - #kasLOC_11015 = Retraído + #kasLOC_11015 = Retraído // The GUI hint to explain the RETRACTED state. #kasLOC_11016 = El conector está bloqueado en el cabrestante. // The GUI hint of the button that triggers retracting of the cable. The cable will @@ -244,16 +244,16 @@ Localization // I.e. its actual length is not greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<1>> is the real cable length of type DistanceType. - #kasLOC_11025 = <<1>> / <<2>> + #kasLOC_11025 = <<1>> / <<2>> // The formatter string for the cable lengths when the cable *is* under strain. I.e. // its actual length is greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<2>> is the real cable length of type DistanceType. - #kasLOC_11026 = <<1>> / <<2>> + #kasLOC_11026 = <<1>> / <<2>> // The formatter string for the winch motor speed. // Argument <<1>> is the current motor speed type VelocityType. // Argument <<2>> is the settings for the desired motor speed of type VelocityType. - #kasLOC_11027 = <<1>> / <<2>> + #kasLOC_11027 = <<1>> / <<2>> // ********** Type: KAS.KASJointCableBase, KSPDev Messages @@ -358,7 +358,7 @@ Localization // Argument <<1>> is the maximum amount (capacity) of type CompactNumberType. // Example usage: // 2.56 / 1,234 - #kasLOC_12003 = <<1>> / <<2>> + #kasLOC_12003 = <<1>> / <<2>> // The information string that tells what is the selected or calculated tarnsfer // speed is. #kasLOC_12004 = Velocidad de transferencia actual: <<1>> unidades por segundo diff --git a/Lang/fr-fr.cfg b/Lang/fr-fr.cfg index cac9a8b1e..1116134b6 100644 --- a/Lang/fr-fr.cfg +++ b/Lang/fr-fr.cfg @@ -205,17 +205,17 @@ Localization #kasLOC_11010 = Mettre en surbrillance le treuil dans la scène // The text for the winch status in which it cannot be remotely operated for any // reason. - #kasLOC_11011 = Déconnecté + #kasLOC_11011 = Déconnecté // The GUI hint to explain the OFFLINE state. #kasLOC_11012 = Impossible de contacter le treuil. Le vaisseau est-il contrôlable ? // The text for the winch status that tells that the main winch attach node is // occupied by an incompatible (non-KAS) part. - #kasLOC_11013 = Blocked + #kasLOC_11013 = Blocked // The GUI hint to explain the BLOCKED state. #kasLOC_11014 = Le noeud d'attache du treuil est bloqué par une autre pièce // The text for the winch status that tells that the cable connector is locked to // the winch, and the cable length is zero. - #kasLOC_11015 = Rétracté + #kasLOC_11015 = Rétracté // The GUI hint to explain the RETRACTED state. #kasLOC_11016 = Le connecteur est bloqué dans le treuil // The GUI hint of the button that triggers retracting of the cable. The cable will @@ -248,16 +248,16 @@ Localization // I.e. its actual length is not greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<1>> is the real cable length of type DistanceType. - #kasLOC_11025 = <<1>> / <<2>> + #kasLOC_11025 = <<1>> / <<2>> // The formatter string for the cable lengths when the cable *is* under strain. I.e. // its actual length is greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<2>> is the real cable length of type DistanceType. - #kasLOC_11026 = <<1>> / <<2>> + #kasLOC_11026 = <<1>> / <<2>> // The formatter string for the winch motor speed. // Argument <<1>> is the current motor speed type VelocityType. // Argument <<2>> is the settings for the desired motor speed of type VelocityType. - #kasLOC_11027 = <<1>> / <<2>> + #kasLOC_11027 = <<1>> / <<2>> // ********** Type: KAS.KASJointCableBase, KSPDev Messages @@ -362,7 +362,7 @@ Localization // Argument <<1>> is the maximum amount (capacity) of type CompactNumberType. // Example usage: // 2.56 / 1,234 - #kasLOC_12003 = <<1>> / <<2>> + #kasLOC_12003 = <<1>> / <<2>> // The information string that tells what is the selected or calculated tarnsfer // speed is. #kasLOC_12004 = Vitesse de transfert actuelle : <<1>> unités par seconde diff --git a/Lang/it-it.cfg b/Lang/it-it.cfg index 5f495d300..617479fca 100644 --- a/Lang/it-it.cfg +++ b/Lang/it-it.cfg @@ -201,17 +201,17 @@ Localization #kasLOC_11010 = Evidenzia il verricello nella scena // The text for the winch status in which it cannot be remotely operated for any // reason. - #kasLOC_11011 = Fuori uso + #kasLOC_11011 = Fuori uso // The GUI hint to explain the OFFLINE state. #kasLOC_11012 = Impossibile contattare il verricello. Il vascello è controllabile? // The text for the winch status that tells that the main winch attach node is // occupied by an incompatible (non-KAS) part. - #kasLOC_11013 = Bloccato + #kasLOC_11013 = Bloccato // The GUI hint to explain the BLOCKED state. #kasLOC_11014 = Il nodo di attacco del verricello è bloccato da un altra parte // The text for the winch status that tells that the cable connector is locked to // the winch, and the cable length is zero. - #kasLOC_11015 = Ritratto + #kasLOC_11015 = Ritratto // The GUI hint to explain the RETRACTED state. #kasLOC_11016 = Il connettore è bloccato nel verricello // The GUI hint of the button that triggers retracting of the cable. The cable will @@ -244,16 +244,16 @@ Localization // I.e. its actual length is not greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<1>> is the real cable length of type DistanceType. - #kasLOC_11025 = <<1>> / <<2>> + #kasLOC_11025 = <<1>> / <<2>> // The formatter string for the cable lengths when the cable *is* under strain. I.e. // its actual length is greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<2>> is the real cable length of type DistanceType. - #kasLOC_11026 = <<1>> / <<2>> + #kasLOC_11026 = <<1>> / <<2>> // The formatter string for the winch motor speed. // Argument <<1>> is the current motor speed type VelocityType. // Argument <<2>> is the settings for the desired motor speed of type VelocityType. - #kasLOC_11027 = <<1>> / <<2>> + #kasLOC_11027 = <<1>> / <<2>> // ********** Type: KAS.KASJointCableBase, KSPDev Messages @@ -358,7 +358,7 @@ Localization // Argument <<1>> is the maximum amount (capacity) of type CompactNumberType. // Example usage: // 2.56 / 1,234 - #kasLOC_12003 = <<1>> / <<2>> + #kasLOC_12003 = <<1>> / <<2>> // The information string that tells what is the selected or calculated tarnsfer // speed is. #kasLOC_12004 = Velocità di trasferiemnto attuale: <<1>> unità al secondo diff --git a/Lang/pt-br.cfg b/Lang/pt-br.cfg index 05ea08b72..70bb90b3e 100644 --- a/Lang/pt-br.cfg +++ b/Lang/pt-br.cfg @@ -201,17 +201,17 @@ Localization #kasLOC_11010 = Destaca o guincho no cenário. // The text for the winch status in which it cannot be remotely operated for any // reason. - #kasLOC_11011 = Offline + #kasLOC_11011 = Offline // The GUI hint to explain the OFFLINE state. #kasLOC_11012 = Impossível contatar o guincho. A nave é controlável? // The text for the winch status that tells that the main winch attach node is // occupied by an incompatible (non-KAS) part. - #kasLOC_11013 = Bloqueada! + #kasLOC_11013 = Bloqueada! // The GUI hint to explain the BLOCKED state. #kasLOC_11014 = O nó de encaixe do guincho está bloqueado por outra peça. // The text for the winch status that tells that the cable connector is locked to // the winch, and the cable length is zero. - #kasLOC_11015 = Retraído! + #kasLOC_11015 = Retraído! // The GUI hint to explain the RETRACTED state. #kasLOC_11016 = O conector está travado no guincho. // The GUI hint of the button that triggers retracting of the cable. The cable will @@ -244,16 +244,16 @@ Localization // I.e. its actual length is not greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<1>> is the real cable length of type DistanceType. - #kasLOC_11025 = <<1>> / <<2>> + #kasLOC_11025 = <<1>> / <<2>> // The formatter string for the cable lengths when the cable *is* under strain. I.e. // its actual length is greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<2>> is the real cable length of type DistanceType. - #kasLOC_11026 = <<1>> / <<2>> + #kasLOC_11026 = <<1>> / <<2>> // The formatter string for the winch motor speed. // Argument <<1>> is the current motor speed type VelocityType. // Argument <<2>> is the settings for the desired motor speed of type VelocityType. - #kasLOC_11027 = <<1>> / <<2>> + #kasLOC_11027 = <<1>> / <<2>> // ********** Type: KAS.KASJointCableBase, KSPDev Messages @@ -358,7 +358,7 @@ Localization // Argument <<1>> is the maximum amount (capacity) of type CompactNumberType. // Example usage: // 2.56 / 1,234 - #kasLOC_12003 = <<1>> / <<2>> + #kasLOC_12003 = <<1>> / <<2>> // The information string that tells what is the selected or calculated tarnsfer // speed is. #kasLOC_12004 = Taxa de transferência atual: <<1>> unidades/segundo diff --git a/Lang/ru.cfg b/Lang/ru.cfg index ff081c52a..5be498d02 100644 --- a/Lang/ru.cfg +++ b/Lang/ru.cfg @@ -1,7 +1,7 @@ -// Version: 6 +// Version: 7 // Before changing the version, read the instructions in the en-us.cfg file! // Author: Igor Zavoychinskiy (IgorZ) -// Last updated: 30/07/2020 +// Last updated: 06/27/2021 Localization { ru @@ -244,16 +244,16 @@ Localization // I.e. its actual length is not greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<1>> is the real cable length of type DistanceType. - #kasLOC_11025 = <<1>> / <<2>> + #kasLOC_11025 = <<1>> / <<2>> // The formatter string for the cable lengths when the cable *is* under strain. I.e. // its actual length is greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<2>> is the real cable length of type DistanceType. - #kasLOC_11026 = <<1>> / <<2>> + #kasLOC_11026 = <<1>> / <<2>> // The formatter string for the winch motor speed. // Argument <<1>> is the current motor speed type VelocityType. // Argument <<2>> is the settings for the desired motor speed of type VelocityType. - #kasLOC_11027 = <<1>> / <<2>> + #kasLOC_11027 = <<1>> / <<2>> // ********** Type: KAS.KASJointCableBase, KSPDev Messages @@ -358,7 +358,7 @@ Localization // Argument <<1>> is the maximum amount (capacity) of type CompactNumberType. // Example usage: // 2.56 / 1,234 - #kasLOC_12003 = <<1>> / <<2>> + #kasLOC_12003 = <<1>> / <<2>> // The information string that tells what is the selected or calculated transfer // speed is. #kasLOC_12004 = Скорость переноса: <<1>> единиц в секунду @@ -397,6 +397,9 @@ Localization // The message to present in the transfer dialog when the parts are docked. Hence, // the stock game functionality must be used to transfer the resources. #kasLOC_12016 = Недоступно на пристыкованном аппарате + // The message to present when there are no resources that can be transferred in any + // direction between the vessels. + #kasLOC_12017 = Нет ресурсов для переноса // ********** Type: KAS.KASLinkSourceBase, KSPDev Messages @@ -427,6 +430,13 @@ Localization // Message to display when the target is refusing to couple (dock) with the link // source. #kasLOC_02008 = Гнездо не может пристыковаться + // Message to display when a linked part becomes a target to EVA construction move + // or detach operation. + #kasLOC_02009 = Рассоединение из-за действий в режиме строительства в открытом космосе + // Message to display when an interactive link mode is being enabled while the stock + // EVA construction mode is active. In this mode the KAS interactive links are + // completely disabled to not interfere with the stock game functionality. + #kasLOC_02010 = Интерактивные связи недоступны в режиме строительства в открытом космосе // ********** Type: KAS.KASLinkSourceInteractive, KSPDev Messages diff --git a/Lang/zh-cn.cfg b/Lang/zh-cn.cfg index 62eefa8a5..c1944c187 100644 --- a/Lang/zh-cn.cfg +++ b/Lang/zh-cn.cfg @@ -207,17 +207,17 @@ Localization #kasLOC_11010 = 高亮绞盘 // The text for the winch status in which it cannot be remotely operated for any // reason. - #kasLOC_11011 = 未连接 + #kasLOC_11011 = 未连接 // The GUI hint to explain the OFFLINE state. #kasLOC_11012 = 无法访问绞盘。飞船是否可控? // The text for the winch status that tells that the main winch attach node is // occupied by an incompatible (non-KAS) part. - #kasLOC_11013 = 被阻挡 + #kasLOC_11013 = 被阻挡 // The GUI hint to explain the BLOCKED state. #kasLOC_11014 = 绞盘连接节点被其他部件阻挡 // The text for the winch status that tells that the cable connector is locked to // the winch, and the cable length is zero. - #kasLOC_11015 = 收回 + #kasLOC_11015 = 收回 // The GUI hint to explain the RETRACTED state. #kasLOC_11016 = 接头被锁定在绞盘中。 // The GUI hint of the button that triggers retracting of the cable. The cable will @@ -250,16 +250,16 @@ Localization // I.e. its actual length is not greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<1>> is the real cable length of type DistanceType. - #kasLOC_11025 = <<1>> / <<2>> + #kasLOC_11025 = <<1>> / <<2>> // The formatter string for the cable lengths when the cable *is* under strain. I.e. // its actual length is greater than the winch allows. // Argument <<1>> is the length, allowed by the winch of type DistanceType. // Argument <<2>> is the real cable length of type DistanceType. - #kasLOC_11026 = <<1>> / <<2>> + #kasLOC_11026 = <<1>> / <<2>> // The formatter string for the winch motor speed. // Argument <<1>> is the current motor speed type VelocityType. // Argument <<2>> is the settings for the desired motor speed of type VelocityType. - #kasLOC_11027 = <<1>> / <<2>> + #kasLOC_11027 = <<1>> / <<2>> // ********** Type: KAS.KASJointCableBase, KSPDev Messages @@ -364,7 +364,7 @@ Localization // Argument <<1>> is the maximum amount (capacity) of type CompactNumberType. // Example usage: // 2.56 / 1,234 - #kasLOC_12003 = <<1>> / <<2>> + #kasLOC_12003 = <<1>> / <<2>> // The information string that tells what is the selected or calculated tarnsfer // speed is. #kasLOC_12004 = 当前传输速度: <<1>> units per second diff --git a/Parts/CableBrace/part_CH1.cfg b/Parts/CableBrace/part_CH1.cfg index 63a608b26..fcb69e252 100644 --- a/Parts/CableBrace/part_CH1.cfg +++ b/Parts/CableBrace/part_CH1.cfg @@ -42,4 +42,10 @@ PART attachNodeDef = 0.0, 0.0453, 0.0, 0.0, 1.0, 0.0, 0 allowCoupling = false } + MODULE + { + name = ModuleCargoPart + stackableQuantity = 10 + packedVolume = 1 + } } diff --git a/Parts/CableBrace/part_PCB1.cfg b/Parts/CableBrace/part_PCB1.cfg index a6b714db3..fbaf16e24 100644 --- a/Parts/CableBrace/part_PCB1.cfg +++ b/Parts/CableBrace/part_PCB1.cfg @@ -96,4 +96,10 @@ PART cableSpringForce = 1000 cableSpringDamper = 1 } + MODULE + { + name = ModuleCargoPart + stackableQuantity = 10 + packedVolume = 3 + } } diff --git a/Parts/JS1/part.cfg b/Parts/JS1/part.cfg index bb364aa81..199845c1d 100644 --- a/Parts/JS1/part.cfg +++ b/Parts/JS1/part.cfg @@ -60,4 +60,10 @@ PART attachNodeName = top allowCoupling = true } + MODULE + { + name = ModuleCargoPart + stackableQuantity = 5 + packedVolume = 6 + } } diff --git a/Parts/PortPylon/part.cfg b/Parts/PortPylon/part.cfg index cde857e91..480f5319a 100644 --- a/Parts/PortPylon/part.cfg +++ b/Parts/PortPylon/part.cfg @@ -54,4 +54,9 @@ PART attachNodeName = forward allowCoupling = true } + MODULE + { + name = ModuleCargoPart + packedVolume = 325 + } } diff --git a/Parts/PortPylonPwr/part.cfg b/Parts/PortPylonPwr/part.cfg index 30ce162c2..37a947742 100644 --- a/Parts/PortPylonPwr/part.cfg +++ b/Parts/PortPylonPwr/part.cfg @@ -66,4 +66,9 @@ PART attachNodeName = forward allowCoupling = true } + MODULE + { + name = ModuleCargoPart + packedVolume = 325 + } } diff --git a/Parts/RTS1/part.cfg b/Parts/RTS1/part.cfg index f55866260..1ac034b6c 100644 --- a/Parts/RTS1/part.cfg +++ b/Parts/RTS1/part.cfg @@ -4,7 +4,7 @@ PART module = Part author = Winn75,IgorZ rescaleFactor = 1 - node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0 + node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0 TechRequired = advFuelSystems entryCost = 12200 cost = 1200 @@ -44,7 +44,7 @@ PART linkType = MdHose linkTypeDisplayName = #kasLOC_99005 // #kasLOC_99005 = Hose-70 attachNodeName = kasSrcAuto0 - attachNodeDef = 0.0, 0.3573, 0.0, 0.0, 1.0, 0.0 + attachNodeDef = 0.0, 0.3573, 0.0, 0.0, 1.0, 0.0, 0 allowCoupling = true // KASLinkSourceBase @@ -108,4 +108,10 @@ PART cableSpringForce = 1 cableSpringDamper = 0 } + MODULE + { + name = ModuleCargoPart + stackableQuantity = 2 + packedVolume = 63 + } } diff --git a/Parts/TB60/part.cfg b/Parts/TB60/part.cfg index 4494370e5..8e9451c28 100644 --- a/Parts/TB60/part.cfg +++ b/Parts/TB60/part.cfg @@ -97,4 +97,10 @@ PART // KASJointTowBar maxSteeringAngle = 30 } + MODULE + { + name = ModuleCargoPart + stackableQuantity = 4 + packedVolume = 70 + } } diff --git a/Parts/TJ1/part.cfg b/Parts/TJ1/part.cfg index f3128ea35..eb4a99074 100644 --- a/Parts/TJ1/part.cfg +++ b/Parts/TJ1/part.cfg @@ -101,4 +101,10 @@ PART anchorAtSource = 0, 0, 0.1254 anchorAtTarget = 0, 0, 0.1254 } + MODULE + { + name = ModuleCargoPart + stackableQuantity = 4 + packedVolume = 71 + } } diff --git a/Parts/TJ2/part.cfg b/Parts/TJ2/part.cfg index 2b36c8c1a..133a23b30 100644 --- a/Parts/TJ2/part.cfg +++ b/Parts/TJ2/part.cfg @@ -101,4 +101,10 @@ PART anchorAtSource = 0, 0, 0.1254 anchorAtTarget = 0, 0, 0.1254 } + MODULE + { + name = ModuleCargoPart + stackableQuantity = 4 + packedVolume = 71 + } } diff --git a/Parts/Winch1/part.cfg b/Parts/Winch1/part.cfg index edfc94799..0effa49a7 100644 --- a/Parts/Winch1/part.cfg +++ b/Parts/Winch1/part.cfg @@ -16,8 +16,9 @@ PART title = #KAS_W1_Part_title // #KAS_W1_Part_title = W-50 Winch manufacturer = #KAS_W1_Part_manufacturer // #KAS_W1_Part_manufacturer = KAS Labs, Inc. description = #KAS_W1_Part_description // #KAS_W1_Part_description = An ancient sage once said: "Give me the right socket, and with a winch I'll pull Kerbin". This winch is not quite that strong, though it can lift up or tow a rather bulky vessel. Remember to attach a compatible socket on the target craft. Also, make sure there is enough power on the active vessel: the winch is hungry for electricity! - attachRules = 1,1,1,0,0 - mass = 0.1 + // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 1,1,1,1,0 + mass = 0.01 dragModelType = default maximum_drag = 0.2 minimum_drag = 0.2 @@ -55,6 +56,7 @@ PART // KASLinkSourcePhysical connectorMass = 0.01 + connectorCenterOfMass = 0,0,0 connectorInteractDistance = 0.5 decoupleIncompatibleTargets = true sndPathLockConnector = KAS/Sounds/winchSmallLock @@ -116,4 +118,9 @@ PART cableSpringForce = 1000 cableSpringDamper = 1 } + MODULE + { + name = ModuleCargoPart + packedVolume = 77 + } } diff --git a/Parts/Winch2/part.cfg b/Parts/Winch2/part.cfg index 355bc9d85..91993bb81 100644 --- a/Parts/Winch2/part.cfg +++ b/Parts/Winch2/part.cfg @@ -16,8 +16,9 @@ PART title = #KAS_W2_Part_title // #KAS_W2_Part_title = HW-80 Winch manufacturer = #KAS_W2_Part_manufacturer // #KAS_W2_Part_manufacturer = KAS Labs, Inc. description = #KAS_W2_Part_description // #KAS_W2_Part_description = A heavy duty version of the W-50 winch model. It has extra cable and features improved connection strength. However, it still cannot pull Kerbin. Note: warranty void if winches are used to winch witches, and it doesn't matter which winch or which witch. - attachRules = 1,1,1,0,0 - mass = 0.200 + // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 1,1,1,1,0 + mass = 0.01 dragModelType = default maximum_drag = 0.2 minimum_drag = 0.2 @@ -55,6 +56,7 @@ PART // KASLinkSourcePhysical connectorMass = 0.01 + connectorCenterOfMass = 0,0,0 connectorInteractDistance = 0.5 decoupleIncompatibleTargets = true sndPathLockConnector = KAS/Sounds/winchSmallLock @@ -116,4 +118,9 @@ PART cableSpringForce = 2000 cableSpringDamper = 1 } + MODULE + { + name = ModuleCargoPart + packedVolume = 55 + } } diff --git a/README.md b/README.md index 9468650d9..ec4b0ff14 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,10 @@ If you want doing EVA comfortably, you really should consider adding these mods Ask questions and propose suggestions on [the forum](https://forum.kerbalspaceprogram.com/index.php?/topic/142594-15-kerbal-attachment-system-kas-v10/). +# Using KAS in other mods + +Read the [KAS API docs](https://ihsoft.github.io/KAS/) to learn how KAS can be accessed from the other mods. + # Development To start your local building environment read [BUILD.md](https://github.com/ihsoft/KAS/blob/master/BUILD.md). diff --git a/Source-API/KAS-API.csproj b/Source-API/KAS-API.csproj index 7d91d8d51..22cb6f566 100644 --- a/Source-API/KAS-API.csproj +++ b/Source-API/KAS-API.csproj @@ -103,4 +103,10 @@ xcopy "$(TargetDir)$(TargetName).xml" "..\..\..\Binaries\" /Y + + bin\Debug\ + + + bin\Release\ + \ No newline at end of file diff --git a/Source-API/api/IKASEvents.cs b/Source-API/api/IKASEvents.cs index a6de05b5a..7b99a8863 100644 --- a/Source-API/api/IKASEvents.cs +++ b/Source-API/api/IKASEvents.cs @@ -27,11 +27,11 @@ public interface IKasEvents { /// Triggers when a link between two parts has been successfully established. /// - /// The argument of the callback is a KAS event object that describes the link. - /// + ///

The argument of the callback is a KAS event object that describes the link.

+ ///

/// Consider using when this state change /// is needed in scope of just one part. - /// + ///

///
/// Collection to add or remove a callback. /// @@ -39,11 +39,11 @@ public interface IKasEvents { /// Triggers when a link between two parts has been broken. /// - /// The argument of the callback is a KAS event object that describes the link. - /// + ///

The argument of the callback is a KAS event object that describes the link.

+ ///

/// Consider using when this state change /// is needed in scope of just one part. - /// + ///

///
/// Collection to add or remove a callback. /// diff --git a/Source-API/api/IKasLinkEvent.cs b/Source-API/api/IKasLinkEvent.cs index dd50d250c..a0cc8935c 100644 --- a/Source-API/api/IKasLinkEvent.cs +++ b/Source-API/api/IKasLinkEvent.cs @@ -15,7 +15,7 @@ public interface IKasLinkEvent { ILinkTarget target { get; } /// Actor who changed the links tate. - /// The actor type that initated the action. + /// The actor type that initiated the action. LinkActorType actor { get; } } diff --git a/Source-API/api/ILinkCableJoint.cs b/Source-API/api/ILinkCableJoint.cs index cda2999d9..28d785d20 100644 --- a/Source-API/api/ILinkCableJoint.cs +++ b/Source-API/api/ILinkCableJoint.cs @@ -7,24 +7,24 @@ namespace KASAPIv2 { /// -/// Interface for a physical cable link. Such links keep the dsitance between the object below the -/// maximum, but don't restict any other movements of the objects relative to each other. +/// Interface for a physical cable link. Such links keep the distance between the object below the +/// maximum, but don't restrict any other movements of the objects relative to each other. /// /// -/// +///

/// The specifics of this module is that the distance between the linked parts becomes variable. /// Once the link is created, the distance limit is set to the actual distance between the source /// and target. This limit won't allow the objects to separate too far from each other, but the /// objects will be allowed to come closer. The code can adjust the limit once the joint is /// created. -/// -/// +///

+///

/// Due to the specifics of handling this kind of joints in PhysX, the real distance between the /// objects can become greater than the distance limit. In fact, if there are forces that try /// to separate the objects, then the actual distance will always be a bit more than the limit. Do /// not expect this difference to have any meaning, it depends on the PhysX engine and can be /// anything. -/// +///

///
/// /// @@ -35,8 +35,8 @@ public interface ILinkCableJoint : ILinkJoint { float cfgMaxCableLength { get; } /// Rigidbody of the physical cable head. - /// The rigibody object, or null if there is no physical head started. - /// + /// The rigidbody object, or null if there is no physical head started. + /// Rigidbody headRb { get; } /// @@ -75,18 +75,17 @@ public interface ILinkCableJoint : ILinkJoint { /// /// This mode only has effect when the parts are coupled. Basically, when the locked mode is /// true, the stock joint between the parts is preserved. When the mode is false, - /// the stiock joint is destroyed and repalced by a PhysX distant joint. + /// the stock joint is destroyed and replaced by a PhysX distant joint. /// /// true if the joint is rigid. /// /// bool isLockedWhenCoupled { get; } - /// - /// Attaches the specified object to the source and starts the environmental forces on it. - /// + /// Attaches the source to the specified physical object (a connector head). /// - /// The cable maximum length will be set to the actual distance between the source and the head. + /// The cable maximum length will be set to the actual distance between the source and the physical object. Note, that + /// this method must not be used to create a regular link between the source and target. /// /// The source object that owns the head. /// @@ -97,8 +96,9 @@ public interface ILinkCableJoint : ILinkJoint { /// /// /// - /// - /// + /// + /// + /// FIXME: rename void StartPhysicalHead(ILinkSource source, Transform headObjAnchor); /// Stops handling the physical head. @@ -115,17 +115,17 @@ public interface ILinkCableJoint : ILinkJoint { /// Sets the maximum possible distance between the source and the head/target physical anchors. /// /// - /// + ///

/// Setting the new length may trigger the physical effects if the value is less than the real /// cable length, since it will force the engine to pull the objects together. Don't reduce the /// length too rapidly to avoid the strong forces applied. - /// - /// + ///

+ ///

/// Calling for this method doesn't have any effect if the PhysX joint is not created. When a /// brand new joint is created, it always has the distance limit set to the actual distance /// between the physical objects. I.e. this method must be called after the physical joint /// is created. - /// + ///

///
/// /// The new length. The value must be in range [0; cfgMaxCableLength]. If the value is not @@ -151,7 +151,7 @@ public interface ILinkCableJoint : ILinkJoint { /// Defines if the joint should be fixed when the parts are coupled. /// /// If the mode is set on the non-coupled parts, then it only changes the bit and doesn't actually - /// affect the joint. If the part were coupled at the momemnt, then the joint is recreated + /// affect the joint. If the part were coupled at the moment, then the joint is recreated /// according to the new setting. /// /// The new mode. diff --git a/Source-API/api/ILinkJoint.cs b/Source-API/api/ILinkJoint.cs index f23524b5f..d0ddfb020 100644 --- a/Source-API/api/ILinkJoint.cs +++ b/Source-API/api/ILinkJoint.cs @@ -6,25 +6,25 @@ namespace KASAPIv2 { /// Base interface for a KAS joint. /// -/// +///

/// Every KAS part must have a joint module that controls how the KAS joints are maintained. -/// -/// +///

+///

/// This interface is primarily designed for use form the implementations. /// A third-party code must not interact with it directly. -/// +///

///
public interface ILinkJoint { /// Identifier of the joint on the part. /// It's unique in scope of the part. - /// An arbitary string that identifies this joint. + /// An arbitrary string that identifies this joint. string cfgJointName { get; } /// Tells the current coupling mode. /// - /// Note, that if this mode set to true, it doesn't mean that the parts are coupled thru + /// Note, that if this mode set to true, it doesn't mean that the parts are coupled through /// this specific joint module. It only means that the parts, linked via this joint, are - /// guaranteed to belong to the same vessel, but the coupling can actually be done thru the other + /// guaranteed to belong to the same vessel, but the coupling can actually be done through the other /// parts. /// /// true if the vessels should couple on link (merge them into one). @@ -45,14 +45,14 @@ public interface ILinkJoint { /// Sets up a physical joint between the source and target. /// - /// + ///

/// This method can be called either to establish a new joint or to restore an existing link on /// load. - /// - /// + ///

+ ///

/// This method will call the method to ensure there are no errors. /// If there are some, then the link is not created and the errors are reported to the logs. - /// + ///

///
/// true if joint was successfully created or updated. /// The link's source. This part owns the joint module. @@ -82,17 +82,17 @@ public interface ILinkJoint { /// Changes the current parts couple mode. /// - /// + ///

/// When both the source and the target peers support coupling, this mode can be arbitrary set or /// reset via the joint module. If the new mode is "coupling", and the source and the target /// vessels are different, then a coupling action will trigger. If the new mode is "don't couple", /// and the source and the target parts are coupled, then a decoupling event is triggered. In all /// the other cases it's just a boolean property change. - /// - /// + ///

+ ///

/// The modules must support the cycles and be ready to pick up the coupling role when the former /// part has gave up. - /// + ///

///
/// The new settings of the mode. /// @@ -109,7 +109,7 @@ public interface ILinkJoint { /// /// An empty array if the link can be created, or a list of user friendly errors otherwise. /// - /// + /// string[] CheckConstraints(ILinkSource source, ILinkTarget target); } diff --git a/Source-API/api/ILinkPeer.cs b/Source-API/api/ILinkPeer.cs index 1f8677579..8230c03f5 100644 --- a/Source-API/api/ILinkPeer.cs +++ b/Source-API/api/ILinkPeer.cs @@ -30,10 +30,10 @@ public interface ILinkPeer { /// Name of the attach node on the part. /// Arbitrary string. It cannot be empty. /// - /// Every link peer is bound to an attach node thru which the link is made (including the coupling + /// Every link peer is bound to an attach node through which the link is made (including the coupling /// operations). Several peer modules can share the same node, but in case of any of the modules /// has made a link, the other dependents will go into the state. - /// I.e. only one link can be made thru one attach node. + /// I.e. only one link can be made through one attach node. /// string cfgAttachNodeName { get; } @@ -42,18 +42,18 @@ public interface ILinkPeer { /// with. ///
/// - /// + ///

/// The module will track the nodes and will adjust its state as those nodes were owned by the /// module. However, this module will never change the mode of those nodes. This can be used to /// lock or block the peer modules that control the different primary nodes, but need to cooperate /// with the other similar modules on the part. This setting allows defining a group of peer /// modules which only allow linking of a single module at the time. - /// - /// + ///

+ ///

/// Note, that the part's is not present in this list by /// default. The implementation should explicitly check for the primary node, or the config must /// take care of it. - /// + ///

///
/// The list of the node names. It's never null. string[] cfgDependentNodeNames { get; } @@ -106,7 +106,7 @@ public interface ILinkPeer { /// The attach node. It's never null. AttachNode attachNode { get; } - /// Tells if this peer is currectly linked to another peer. + /// Tells if this peer is currently linked to another peer. /// The current state of the link. /// bool isLinked { get; } diff --git a/Source-API/api/ILinkRenderer.cs b/Source-API/api/ILinkRenderer.cs index de5ec1645..0f68faadb 100644 --- a/Source-API/api/ILinkRenderer.cs +++ b/Source-API/api/ILinkRenderer.cs @@ -17,7 +17,7 @@ namespace KASAPIv2 { /// public interface ILinkRenderer { /// - /// Unique name of the randerer that is used by the other modules to find this renderer. + /// Unique name of the renderer that is used by the other modules to find this renderer. /// /// Arbitrary string. Can be empty. string cfgRendererName { get; } @@ -38,7 +38,7 @@ public interface ILinkRenderer { /// The current state of the collider(s). /// /// Setting this property to false disables the link colliders, if there were any. Setting - /// this oroperty to true doesn't make the link physlcal, it only enables the colliders + /// this property to true doesn't make the link physical, it only enables the colliders /// that were already on the link. /// /// @@ -74,21 +74,21 @@ public interface ILinkRenderer { /// Starts rendering a link between the objects. /// - /// + ///

/// This method only indicates that the link is to be drawn between the specified points. The /// renderer is allowed to draw meshes even when not started. E.g. if there are constant parts of /// the link like the joint pivots. - /// - /// + ///

+ ///

/// The ends of the link are not required to be located at the surface of the owning parts. It's /// up to the renderer to decide how to draw the link. - /// - /// + ///

+ ///

/// It's OK to call this method multiple times with different or the same source/target arguments: /// the renderer must accept the values and update accordingly. However, this operation is rated /// as performance expensive, so the callers are discouraged to invoke this method too frequently /// (e.g. on every frame update). - /// + ///

///
/// The source node. /// The target node. @@ -96,30 +96,34 @@ public interface ILinkRenderer { /// Cancels rendering the link. /// + ///

/// The stopped renderer is not required to not render anything. The stopped state only tells /// that the source and the target positions provided to the method - /// must not be respresented as connected anymore. A specific renderer implementation is free to + /// must not be represented as connected anymore. A specific renderer implementation is free to /// choose how to represent this mode. - /// + ///

+ ///

/// It's OK to call this method multiple time. If the renderer is already stopped the call must be /// treated as NO-OP with a little or no performance cost. - /// + ///

///
void StopRenderer(); /// Called when a link representation update is required. /// + ///

/// It's called on every frame update if the link is started. The performance cost of this method /// is rated as moderate. The callers should consider optimization techniques to avoid calling /// this method on the every frame update. - /// + ///

+ ///

/// A specific renderer implementation may introduce own optimization algorithm when the call /// becomes too heavy and slow. - /// + ///

///
void UpdateLink(); - /// Verifies that there are no obstacles beween the points. + /// Verifies that there are no obstacles between the points. /// The renderer is not required to be started for this method to call. /// The source node. /// The target node. diff --git a/Source-API/api/ILinkSource.cs b/Source-API/api/ILinkSource.cs index edb976a4a..af80a0988 100644 --- a/Source-API/api/ILinkSource.cs +++ b/Source-API/api/ILinkSource.cs @@ -8,16 +8,16 @@ namespace KASAPIv2 { /// A generic source of a KAS link between two parts. /// -/// +///

/// Source is the initiator of the link to the another part. It holds all the logic on making and /// maintaining the actual connection between the two parts. The other end of the connection must be /// which implements its own piece of the logic. -/// -/// +///

+///

/// The link source have a state that defines what it can do (). /// Not all actions are allowed in any state. The following state diagram tells what the source /// can do and when: -/// +///

/// /// /// TransitionAction @@ -97,11 +97,11 @@ public interface ILinkSource : ILinkPeer { /// Starts the linking mode of this source. /// - /// + ///

/// Only one source at the time can be linking. If the part has more sources or targets, they are /// expected to become . - /// - /// A module can refuse the mode by returning false. + ///

+ ///

A module can refuse the mode by returning false.

///
/// /// Defines how the pending link should be displayed. See for more @@ -123,20 +123,20 @@ public interface ILinkSource : ILinkPeer { /// Establishes a link between two parts. /// - /// + ///

/// The linking mode must be started via the call for this method to /// succeed. - /// - /// + ///

+ ///

/// If the link has been established successfully, the source and the target parts become /// associated with each other. - /// - /// + ///

+ ///

/// The link conditions will be checked via before creating the link. /// If the were errors, they will be reported to GUI if the linking mode was started with actor /// . The linking mode won't be cancelled in case of the link /// failure. - /// + ///

///
/// The target to link with. /// true if the parts were linked successfully. @@ -174,15 +174,15 @@ public interface ILinkSource : ILinkPeer { /// /// /// - /// - /// + /// + /// void BreakCurrentLink(LinkActorType actorType); /// Verifies if a link between the parts can be successful. /// The target to connect with. /// /// Tells if the source and target states needs to be checked. This check can be disabled when - /// checking for a "theoretical" posibility of the link. However, keep in mind that before doing + /// checking for a "theoretical" possibility of the link. However, keep in mind that before doing /// the actual link, the full check will be performed. /// /// diff --git a/Source-API/api/ILinkStateEventListener.cs b/Source-API/api/ILinkStateEventListener.cs index ebc6efa68..1166e13fd 100644 --- a/Source-API/api/ILinkStateEventListener.cs +++ b/Source-API/api/ILinkStateEventListener.cs @@ -8,7 +8,7 @@ namespace KASAPIv2 { /// Part module interface that defines the events for a link state changes. /// -/// Both the source and the target parts can recieve these events. To receive the events, a module +/// Both the source and the target parts can receive these events. To receive the events, a module /// needs to implement this interface. /// public interface ILinkStateEventListener { diff --git a/Source-API/api/ILinkTarget.cs b/Source-API/api/ILinkTarget.cs index ccbd8e0b9..67b2f079c 100644 --- a/Source-API/api/ILinkTarget.cs +++ b/Source-API/api/ILinkTarget.cs @@ -6,14 +6,15 @@ namespace KASAPIv2 { /// A generic target of a KAS link between two parts. /// -/// +///

/// The target is a sink for a link initiated by the another part's . -/// -/// +///

+///

/// The link target have a state that defines what it can do (). /// Not all actions are allowed in any state. The following state diagram tells what the target /// can do and when: -/// +///

+///

/// /// /// TransitionAction @@ -66,32 +67,33 @@ namespace KASAPIv2 { /// /// => /// -/// A source from the world has linked to the owner of this target but thru another target. +/// A source from the world has linked to the owner of this target but through another target. /// /// /// +///

///
/// See for the examples. public interface ILinkTarget : ILinkPeer { /// Source that maintains the link. /// Source or null if nothing is linked. /// - /// + ///

/// Setting of this property changes the target state: /// /// A non-null value changes the state to . /// null value changes the state to . /// - /// - /// Assigning the same value to this property doesn't trigger a state change event. - /// + ///

+ ///

Assigning the same value to this property doesn't trigger a state change event.

+ ///

/// Note, that not any state transition is possible. If the transition is invalid then an /// exception is thrown. - /// - /// - /// It's descouraged to assign this property from a code other than an implementation of + ///

+ ///

+ /// It's discouraged to assign this property from a code other than an implementation of /// . - /// + ///

///
/// /// diff --git a/Source-API/api/IWinchControl.cs b/Source-API/api/IWinchControl.cs index 30f594446..4cc505a66 100644 --- a/Source-API/api/IWinchControl.cs +++ b/Source-API/api/IWinchControl.cs @@ -22,7 +22,7 @@ public interface IWinchControl : ILinkSource { /// Tells if the cable connector head is locked into the winch. /// /// In the locked state there is no free cable available, and there is no moving part - /// (the connector). If the winch is linked to a part and the connector is locked, then the traget + /// (the connector). If the winch is linked to a part and the connector is locked, then the target /// part is docked to the vessel that owns the winch. When the connector unlocks, the /// attached part undocks from the vessel. /// @@ -48,25 +48,25 @@ public interface IWinchControl : ILinkSource { /// float currentCableLength { get; } - /// Current speed of the motor spindel. + /// Current speed of the motor spindle. /// - /// + ///

/// This is the speed at which the cable is being extended or retracted at the current moment. /// The actual speed of the motor can differ from what was set via the control methods (e.g. - /// ) due to there is some inetria momentum. Negative speed means the cable - /// is being retracted, and the positive speed means the cable is being extened. - /// - /// + /// ) due to there is some inertia momentum. Negative speed means the cable + /// is being retracted, and the positive speed means the cable is being extended. + ///

+ ///

/// The motor speed is always trying to match the . Depending on the /// part's implementation and settings, some time may be needed to actually have the match. - /// + ///

///
/// The speed in meters per second. /// /// float motorCurrentSpeed { get; } - /// Desired speed of the motor spindel. + /// Desired speed of the motor spindle. /// /// Ideally, the motor is always working at this speed. However, in the physics world of KSP the /// motor may operate at the lower or the higher speeds. It depends of the various conditions. @@ -79,31 +79,31 @@ public interface IWinchControl : ILinkSource { /// Sets the winch motor to the desired speed. /// - /// + ///

/// The motor is responsible for the deployed cable length changing. It can extend the cable, /// retract the cable, or do nothing (idle). The winch and its head cannot get separated at a /// greater distance than the current deployed cable length. That said, the motor is controlling /// the distance. - /// - /// + ///

+ ///

/// The motor speed is not required to change immediately. The motor may need some time to get to /// the target speed. It depends on the part implementation and configuration. The rule of thumb /// is to not expect the to match the /// right after the method call. There may be some time needed /// before the values will match. However, the value will change /// immediately, and will match the parameter. - /// - /// + ///

+ ///

/// Setting the motor speed may affect the connector state. E.g. if the connector was locked, /// and the motor speed is set to a positive value (extending), then the connector is get /// deployed. - /// - /// + ///

+ ///

/// The motor will automatically stop when the cable length reaches zero or the maximum allowed /// value. In case of the zero length, the connector will be attempted to lock into the winch. /// This attempt may fail due to the bad align of the connector. To retry the attempt, just call /// this method again with a negative value. - /// + ///

///
/// /// The new speed of the motor. The positive value instructs to extend the cable, and the diff --git a/Source-API/api/KASAPI.cs b/Source-API/api/KASAPI.cs index 59589e211..576817b21 100644 --- a/Source-API/api/KASAPI.cs +++ b/Source-API/api/KASAPI.cs @@ -16,12 +16,12 @@ // Name of the namespace denotes the API version. namespace KASAPIv2 { -/// KAS API, version 1. +/// KAS API, version 2. public static class KASAPI { - /// Tells if API V1 was loaded and ready to use. + /// Tells if API was loaded and ready to use. public static bool isLoaded; - /// KAS joints untils. + /// KAS joints utils. public static IJointUtils JointUtils; /// KAS attach nodes utils. diff --git a/Source-API/api/LinkActorType.cs b/Source-API/api/LinkActorType.cs index d3d6499e4..06b78a578 100644 --- a/Source-API/api/LinkActorType.cs +++ b/Source-API/api/LinkActorType.cs @@ -17,13 +17,13 @@ namespace KASAPIv2 { public enum LinkActorType { /// Actor is unspecified. /// - /// It really depends on the situation how to treat this actor. In a normal case ther is always a + /// It really depends on the situation how to treat this actor. In a normal case there is always a /// specific actor set, but if an event originator cannot determine the actor then this type can /// be used. However, the event originator must ensure that the components that receive this event /// will know how to deal with it. /// None = 0, - /// Thrid-party code has affected the link during its normal workflow. + /// Third-party code has affected the link during its normal workflow. /// The implementations must not execute any user facing effects when the action /// is executed from the API. /// diff --git a/Source-API/api/LinkState.cs b/Source-API/api/LinkState.cs index ac372accb..9d129fec9 100644 --- a/Source-API/api/LinkState.cs +++ b/Source-API/api/LinkState.cs @@ -4,8 +4,8 @@ namespace KASAPIv2 { -/// Defines currect state of the link. -/// Each implementation defines own state tranistion model. E.g. +/// Defines correct state of the link. +/// Each implementation defines own state transition model. E.g. /// or . In every state the module can only /// handle a very specific set of actions. Such approach helps keeping module logic more clear and /// granular. @@ -13,7 +13,7 @@ namespace KASAPIv2 { public enum LinkState { /// Initial and an invalid state. It must never be normally used. None = 0, - /// Module is avalable for the links. + /// Module is available for the links. Available, /// /// Module is unavailable for the link because of another module on the same node has already @@ -21,7 +21,7 @@ public enum LinkState { /// Locked, /// - /// Module has initated an outgoing link request and expecting for it to be accepted. + /// Module has initiated an outgoing link request and expecting for it to be accepted. /// Linking, /// Module is linked to another module. diff --git a/Source-API/api/Utils/IAttachNodesUtils.cs b/Source-API/api/Utils/IAttachNodesUtils.cs index 77d804ecb..8739158ca 100644 --- a/Source-API/api/Utils/IAttachNodesUtils.cs +++ b/Source-API/api/Utils/IAttachNodesUtils.cs @@ -12,17 +12,19 @@ namespace KASAPIv2 { public interface IAttachNodesUtils { /// Creates a new attach node on the part. /// + ///

/// It's expected there is no node with the same name on the part already. If there is one, then /// no extra node will be created, and the properties of the existing node will be updated instead /// (see below). However, it's an unexpected situation, so a warning record will be logged. - /// + ///

+ ///

/// The node will have the following properties: /// /// Size is "small". /// Attach method is FIXED_JOINT. /// Node type is Stack. /// - /// + ///

///
/// Part to create node for. /// Name of the node to create. @@ -40,7 +42,7 @@ public interface IAttachNodesUtils { /// /// If the node doesn't belong to the part, then the owner will be fixed and a warning logged. /// Normally, it's not expected to add an attach node into a part that doesn't own it. If the node - /// is alaready in the part, then this method does nothing. + /// is already in the part, then this method does nothing. /// /// The part to add the node into. /// The attach node to add. @@ -66,12 +68,13 @@ public interface IAttachNodesUtils { /// Creates an attach node form the part's config definition string. /// - /// + ///

/// The string format is exactly the same as for the part's attach node definition. It consists of /// 10 parts, separated by a comma. Only the first 6 parts are mandatory, the others are optional. /// The format is the following: /// Position(X,Y,Z), Orientation(X,Y,Z), Size, AttachMethod, CrossFeedAllowed, IsRigid - /// + ///

+ ///

/// /// Position is defined by the first 3 float numbers. /// Orientation is defined by the next 3 float numbers. @@ -93,6 +96,7 @@ public interface IAttachNodesUtils { /// of the two coupling nodes require it. /// /// + ///

///
/// /// The part to parse the node for. The new node will not be added to this part, but the @@ -108,7 +112,7 @@ public interface IAttachNodesUtils { AttachNode ParseNodeFromString(Part ownerPart, string def, string nodeId); /// Gets or creates a transform object for the attach node. - /// The trasnform is added into the root of the part model. + /// The transform is added into the root of the part model. /// The part that owns the node. /// The attach node to create the transform for. /// The object that matches the attach node connect point. diff --git a/Source-API/api/Utils/IJointUtils.cs b/Source-API/api/Utils/IJointUtils.cs index f66ac79ca..122ac77d2 100644 --- a/Source-API/api/Utils/IJointUtils.cs +++ b/Source-API/api/Utils/IJointUtils.cs @@ -23,7 +23,7 @@ public interface IJointUtils { /// Initializes joint to a consistent state. /// - /// + ///

/// It's not the same as creating a default joint. The state is consistent but different from the /// default: /// @@ -39,33 +39,33 @@ public interface IJointUtils { /// will remember the new relative rotation/position of the connected objects. /// /// - /// - /// + ///

+ ///

/// Use this method before setting up a new or existing joint. By resetting the joint, you ensure /// it's in a consistent state, and the further adjustments will always give the same result /// regardless to how the joint was created and what components were affecting it. - /// + ///

///
/// Joint to reset. void ResetJoint(ConfigurableJoint joint); /// Sets up joint so what it becomes a prismatic joint. /// - /// + ///

/// It's a standard PhysX configuration. Main axis is set to Z. Moving along it is allowed but can /// be constrained by a spring and limit. Drive mode is set to /// . - /// - /// + ///

+ ///

/// Only main axis linear settings are changed. Consider using to /// eliminate side effects from the previous settings of the joint. - /// - /// + ///

+ ///

/// Pure prismatic joint assumes 5 out of the 6 degrees of freedom to be locked (everything, /// except the main axis linear motion). Consider setting - /// to true since it may improve PhysXperformance. - /// - /// + /// to true since it may improve PhysX performance. + ///

+ ///

/// For performance reasons some parameters combindations may result in different motion modes: /// /// @@ -81,11 +81,11 @@ public interface IJointUtils { /// don't forget to update the mode as well. /// /// - /// - /// + ///

+ ///

/// Regardless to the modes set all the other parameters are also applied. I.e. you don't need to /// re-apply them when changing mode. - /// + ///

///
/// Joint to setup. /// @@ -120,23 +120,23 @@ void SetupPrismaticJoint(ConfigurableJoint joint, /// Sets up joint so what it becomes a spherical hinge joint. /// - /// - /// It's a standard PhysiX configuration. Main axis is set to Z, and angular rotation around it is + ///

+ /// It's a standard PhysX configuration. Main axis is set to Z, and angular rotation around it is /// completely unrestricted. Secondary axes are X&Y can be restricted by applying spring force /// and/or limits. Drive mode is set to . - /// - /// + ///

+ ///

/// Only angular settings are set. If joint had linear constraints defined they will stay /// unchanged. Consider using to eliminate side effects from the previous /// settings of the joint. - /// - /// + ///

+ ///

/// Pure spherical joint assumes 3 out of the 6 degrees of freedom to be locked (all the three /// axes linear motions). Consider setting to true /// since it may improve PhysX performance. - /// - /// - /// For performance reasons some parameters combindations may result in different angular modes: + ///

+ ///

+ /// For performance reasons some parameters combinations may result in different angular modes: /// /// /// When is Infinite or is @@ -149,11 +149,11 @@ void SetupPrismaticJoint(ConfigurableJoint joint, /// If you plan to change either of the parameters don't forget to update the modes as well. /// /// - /// - /// + ///

+ ///

/// Regardless to the modes set all the other parameters are also applied. I.e. you don't need to /// re-apply them when changing mode. - /// + ///

///
/// Joint to setup. /// @@ -183,7 +183,7 @@ void SetupSphericalJoint(ConfigurableJoint joint, float angleLimitForce = 0, float angleLimitDamperRatio = 0.1f); - /// Sets up a cannonical distance joint. + /// Sets up a canonical distance joint. /// /// This method does not set all the properties of the PhysX joint! To get a consistent /// result, the joint must be reset via a call before invoking this @@ -195,7 +195,7 @@ void SetupSphericalJoint(ConfigurableJoint joint, /// /// The force to apply to calm down the oscillations. /// - /// The maximum distance to allow between the obejcts before applying the spring force. + /// The maximum distance to allow between the objects before applying the spring force. /// /// /// PhysX: Distant Joint @@ -205,7 +205,7 @@ void SetupDistanceJoint(ConfigurableJoint joint, float springDamper = 0, float maxDistance = Mathf.Infinity); - /// Sets up a cannonical fixed joint. + /// Sets up a canonical fixed joint. /// /// This method does not set all the properties of the PhysX joint! To get a consistent /// result, the joint must be reset via a call before invoking this diff --git a/Source-API/api/Utils/ILinkUtils.cs b/Source-API/api/Utils/ILinkUtils.cs index 6bba07d7a..5313719db 100644 --- a/Source-API/api/Utils/ILinkUtils.cs +++ b/Source-API/api/Utils/ILinkUtils.cs @@ -20,17 +20,17 @@ public interface ILinkUtils { /// Couples two parts together given they belong to the different vessels. /// - /// + ///

/// Once the coupling is done, one of the vessels will be destroyed. It will become a part of the /// other vessel. The new merged vessel will become active. Which vessel will be destroyed is /// determined by the parameter. - /// - /// + ///

+ ///

/// This coupling requires the both attach nodes to be provided, and creates a "stack" nodes /// coupling. - /// + ///

+ ///

IMPORTANT. The attach nodes must have a valid owner set.

///
- /// IMPORTANT. The attach nodes must have a valid owner set. /// /// The attach node at the source part that defines the source vessel. It must not be null. /// @@ -41,13 +41,12 @@ public interface ILinkUtils { /// If false, then the source vessel will get coupled with the target. As a result, the /// source vessel will be destroyed. If true, then the method will find the least /// significant vessel of the two, and couple it with the most significant one. The least - /// signficant vessel will be destroyed. + /// significant vessel will be destroyed. /// /// The part that attached as a child into the new hierarchy. /// /// - Part CoupleParts(AttachNode sourceNode, AttachNode targetNode, - bool toDominantVessel = false); + Part CoupleParts(AttachNode sourceNode, AttachNode targetNode, bool toDominantVessel = false); /// Decouples the connected parts and breaks down one vessel into two. /// diff --git a/Source-API/api/Utils/IPhysicsUtils.cs b/Source-API/api/Utils/IPhysicsUtils.cs index a84012277..d7cd21dde 100644 --- a/Source-API/api/Utils/IPhysicsUtils.cs +++ b/Source-API/api/Utils/IPhysicsUtils.cs @@ -8,9 +8,9 @@ // Name of the namespace denotes the API version. namespace KASAPIv2 { -/// Various tools to deal with the gme's physics. +/// Various tools to deal with the game's physics. public interface IPhysicsUtils { - /// Applies the forces that affect a rigidbody on a selectial body. + /// Applies the forces that affect a rigidbody on a celestial body. /// /// This method replicates the logic from for the physical objects. /// Alas, this method is not available for a plain rigidbody. @@ -23,7 +23,6 @@ public interface IPhysicsUtils { /// /// The multiplier that tells how significantly the rigidbody is resisting to the air flow. /// - /// Target or null if no valid target was found. void ApplyGravity(Rigidbody rb, Vessel vessel, double rbAirDragMult = 1.0); } diff --git a/Source-API/docs_project/Examples/KAS-API-Examples.csproj b/Source-API/docs_project/Examples/KAS-API-Examples.csproj index 1bdec6c1a..f22ba1900 100644 --- a/Source-API/docs_project/Examples/KAS-API-Examples.csproj +++ b/Source-API/docs_project/Examples/KAS-API-Examples.csproj @@ -22,6 +22,7 @@ 4 False C:\Users\IH\AppData\Roaming\ICSharpCode\SharpDevelop5\Settings.SourceAnalysis + 9 x64 @@ -48,6 +49,12 @@ obj\ Project + + bin\Debug\ + + + bin\Release\ + @@ -66,8 +73,8 @@ ..\..\..\Binaries\KAS-API-v2.dll - - ..\..\..\Binaries\KSPDev_Utils.2.4.dll + + ..\..\..\Binaries\KSPDev_Utils.2.6-KAS.dll Q:\KSP_x64_Data\Managed\UnityEngine.dll diff --git a/Source-API/docs_project/KAS_API.shfbproj b/Source-API/docs_project/KAS_API.shfbproj index 4a567b924..df37349bc 100644 --- a/Source-API/docs_project/KAS_API.shfbproj +++ b/Source-API/docs_project/KAS_API.shfbproj @@ -1,5 +1,5 @@  - + Documentation Documentation Documentation - ..\..\docs\APIv1\ - KAS_API_v1 + ..\..\docs\APIv2\ + KAS_API @@ -27,12 +27,12 @@ sources--> False MemberName en-US - KAS API v1 + KAS API AboveNamespaces OnlyWarningsAndErrors Website False - .NET Framework 3.5 + .NET Framework 4.5 False False True @@ -42,10 +42,6 @@ sources--> Attributes, ExplicitInterfaceImplementations, Protected, ProtectedInternalAsProtected, PublicCompilerGenerated, EditorBrowsableNever, NonBrowsable False - - {@TokenFiles} - - @@ -68,14 +64,14 @@ sources--> - + <para>The main namespace for the KAS functionality <i>implementations</i>.</para> <para>A third-party code usually don't need to access anything from this namespace. The only legitimate exception is writing a module that inherits a KAS module. In all the other cases a third-party code must use <see cref="N:KASAPIv1">KAS API</see> to interact with the KAS modules.</para> <para>If inheriting is the case then a depedent mod must include a reference to the <c>KAS.dll</c> assembly. However, this assembly must not be released together with the mod. Having two KAS assemblies in the game may badly break it.</para> -<para>KAS API namespace. The third-party code must use the types and interfaces from this namespace instead of depending on the mod modules.</para> + <para>KAS API namespace. The third-party code must use the types and interfaces from this namespace instead of depending on the mod modules.</para> <para>Each API release has a version. Once the API is released to the public, its methods cannot be changed. In case of a new functionality is relased, a new version (and the namespace) will be created. The old namespace will not be removed, so the mods that were built with the old version will continue to work.</para> <para>If API is needed, the depedent mod should only include a reference to <c>KAS-API-v1.dll</c> (version number may vary). This assembly version never changes, so the dependency will never break. It's OK to provide an API assembly with the mod since multliple API assemblies will not conflict with each other. Moreover, having "own" copy of the API ensures the mod will load even if KAS is not installed in the game. There is an ability to check if KAS is installed in the run-time (see example below).</para> <example> @@ -95,13 +91,32 @@ public class MyModule : PartModule { } ]]></code> </example> - + + <para>KAS API namespace. The third-party code must use the types and interfaces from this namespace instead of depending on the mod modules.</para> +<para>Each API release has a version. Once the API is released to the public, its methods cannot be changed. In case of a new functionality is relased, a new version (and the namespace) will be created. The old namespace will not be removed, so the mods that were built with the old version will continue to work.</para> +<para>If API is needed, the depedent mod should only include a reference to <c>KAS-API-v2.dll</c> (version number may vary). This assembly version never changes, so the dependency will never break. It's OK to provide an API assembly with the mod since multliple API assemblies will not conflict with each other. Moreover, having "own" copy of the API ensures the mod will load even if KAS is not installed in the game. There is an ability to check if KAS is installed in the run-time (see example below).</para> +<example> +Always use API interfaces, they are clearly defined and never change once released. +<code><![CDATA[ +using KASAPIv1; + +public class MyModule : PartModule { + public void RightSample() { + if (KASAPI.isLoaded) { + var model = KASAPI.LinkUtils.DecoupleParts(part, part.parent); + } else { + Debug.LogWarning("KAS is not installed"); + } + } +} +]]></code> +</example> + - diff --git a/Source-API/docs_project/KSPDevUtils_API.shfbproj b/Source-API/docs_project/KSPDevUtils_API.shfbproj deleted file mode 100644 index 62a2dc0ac..000000000 --- a/Source-API/docs_project/KSPDevUtils_API.shfbproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - AnyCPU - 2.0 - {e5322bb3-9c85-4ed2-ae33-c67b45f0d8b1} - 2017.9.26.0 - - KSPDev - - - KSPDev Utils API - - .NET Framework 3.5 - Help\KSPDev-API\ - KPSDev_Utils_API - en-US - - - - 100 - OnlyErrors - Website - False - False - False - True - False - Help\Working\KSPDev-API\ - - - - - - - - - - - - - - - - - - 1.0.0.0 - 2 - False - C# - Blank - False - VS2013 - False - MemberName - KSPDev Utils API - AboveNamespaces - None - None - False - False - -1 - 100 - 100 - -1 - None - 100 - VS - - - - None - EditorBrowsableNever, NonBrowsable - - - - - - - - - - - - - - - - - - - - - - - - - - - OnBuildSuccess - - - - Q:\KSP_Data\Managed\Assembly-CSharp.dll - - - Q:\KSP_Data\Managed\UnityEngine.dll - - - \ No newline at end of file diff --git a/Source-API/docs_project/KSP_API.shfbproj b/Source-API/docs_project/KSP_API.shfbproj index 78fa9f303..54beb34e9 100644 --- a/Source-API/docs_project/KSP_API.shfbproj +++ b/Source-API/docs_project/KSP_API.shfbproj @@ -1,5 +1,5 @@  - + @@ -7,33 +7,93 @@ AnyCPU 2.0 {854f4123-1608-425c-b6bb-71f702fa74e6} - 2015.6.5.0 + 2017.9.26.0 - - + + + + KSP API - .NET Framework 3.5 + .NET Framework 4.5 Help\KSP-API\ KSP_API en-US - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False Help\Working\KSP-API\ @@ -55,7 +115,7 @@ None 100 VS - None + EditorBrowsableNever, NonBrowsable None 1.0.0.0 2 diff --git a/Source/KAS.csproj b/Source/KAS.csproj index ec7f9ef1e..456fadfe2 100644 --- a/Source/KAS.csproj +++ b/Source/KAS.csproj @@ -21,6 +21,7 @@ False False bin\Release\KAS.xml + 9 x64 @@ -58,8 +59,8 @@ ..\Binaries\KAS-API-v2.dll - - ..\Binaries\KSPDev_Utils.2.4.dll + + ..\Binaries\KSPDev_Utils.2.6-KAS.dll 4.0 @@ -113,8 +114,6 @@ - - @@ -146,6 +145,9 @@ + + + IF EXIST "Q:\GameData\KAS" xcopy "$(TargetPath)" "Q:\GameData\KAS\Plugins\" /Y @@ -155,4 +157,10 @@ IF EXIST "Q:\GameData\KAS" xcopy "$(TargetDir)KAS-API-v2.*" "Q:\GameData\KAS\Plu + + bin\Debug\ + + + bin\Release\ + \ No newline at end of file diff --git a/Source/KSPDev_candidates/Hierarchy2.cs b/Source/KSPDev_candidates/Hierarchy2.cs deleted file mode 100644 index 0d3f91170..000000000 --- a/Source/KSPDev_candidates/Hierarchy2.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Kerbal Development tools. -// Author: igor.zavoychinskiy@gmail.com -// This software is distributed under Public domain license. -using UnityEngine; - -// ReSharper disable once CheckNamespace -namespace KSPDev.ModelUtils { - -/// Various tools to deal with game object hierarchy. -public static class Hierarchy2 { - /// Destroys the object in a way which is safe for physical callback methods. - /// - /// The Unity UnityEngine.Object.Destroy method only marks object for deletion, but before - /// the next fixed frame cycle completed, the object still can be found in the hierarchy. And it - /// may trigger physics before the final cleanup. This method ensures that none of these - /// side-effects happen and it doesn't use physics incompatible DestroyImmediate - /// method. - /// - /// The object to destroy. Can be null. - public static void SafeDestroy(Transform obj) { - if (obj != null) { - SafeDestroy(obj.gameObject); - } - } - - /// - public static void SafeDestroy(GameObject obj) { - if (obj != null) { - obj.transform.SetParent(null, worldPositionStays: false); - obj.name = "$disposed"; - obj.SetActive(false); - Object.Destroy(obj); - } - } - - /// - public static void SafeDestroy(Component obj) { - if (obj != null) { - SafeDestroy(obj.gameObject); - } - } -} - -} // namespace diff --git a/Source/KSPDev_candidates/Meshes2.cs b/Source/KSPDev_candidates/Meshes2.cs deleted file mode 100644 index 31b602415..000000000 --- a/Source/KSPDev_candidates/Meshes2.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Kerbal Development tools. -// Author: igor.zavoychinskiy@gmail.com -// This software is distributed under Public domain license. - -using UnityEngine; - -// ReSharper disable once CheckNamespace -namespace KSPDev.ModelUtils { - -/// Various tools to deal with procedural meshes. -public static class Meshes2 { - /// Creates a cylinder. - /// XY of the cylinder. - /// Z-axis of the cylinder. - /// Material for the primitive. - /// Parent transform to attach primitive to. - /// Type of the collider to create on the primitive. - /// Sphere game object. - /// Unity3D: Material - /// - /// Unity3D: Transform - /// - public static GameObject CreateCylinder( - float diameter, float length, Material material, Transform parent, - Colliders.PrimitiveCollider colliderType = Colliders.PrimitiveCollider.None) { - // Default length scale is 2.0. - var obj = CreatePrimitive( - PrimitiveType.Cylinder, new Vector3(diameter, diameter, length / 2), - material, parent: parent); - Colliders.AdjustCollider( - obj, new Vector3(diameter, diameter, length), - colliderType, shapeType: PrimitiveType.Cylinder); - return obj; - } - - /// Creates an ideal sphere. - /// Diameter of the sphere. - /// Material for the primitive. - /// Parent transform to attach primitive to. - /// Type of the collider to create on the primitive. - /// Sphere game object. - /// Unity3D: Material - /// - /// Unity3D: Transform - /// - public static GameObject CreateSphere( - float diameter, Material material, Transform parent, - Colliders.PrimitiveCollider colliderType = Colliders.PrimitiveCollider.None) { - var scale = new Vector3(diameter, diameter, diameter); - var obj = CreatePrimitive(PrimitiveType.Sphere, scale, material, parent: parent); - Colliders.AdjustCollider(obj, scale, colliderType, shapeType: PrimitiveType.Sphere); - return obj; - } - - /// Creates a primitive mesh and attaches it to the model. - /// - /// For Z and Y axis will be swapped to make Z "the length". - /// - /// Collider on the primitive will be destroyed. Consider using - /// to setup the right collider when needed. - /// - /// - /// The type of the primitive. - /// - /// The scale to bring all the mesh vertices to. The scale is applied on the mesh, i.e. it's - /// applied on the vertices, not the transform. - /// - /// The material to use for the primitive. - /// The parent transform to attach the primitive to. - /// The game object of the new primitive. - /// - /// Unity3D: GameObject.CreatePrimitive - /// Unity3D: Material - /// - public static GameObject CreatePrimitive( - PrimitiveType type, Vector3 meshScale, Material material, Transform parent) { - var primitive = GameObject.CreatePrimitive(type); - var collider = primitive.GetComponent(); - collider.enabled = false; - Object.Destroy(collider); - Hierarchy.MoveToParent(primitive.transform, parent); - primitive.GetComponent().material = material; - - // Make object's Z axis its length. For this rotate around X axis. - var meshRotation = - type == PrimitiveType.Cylinder ? Quaternion.Euler(90, 0, 0) : Quaternion.identity; - Meshes.TranslateMesh(primitive, rotation: meshRotation, scale: meshScale); - return primitive; - } -} - -} // namespace diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs index 4b841557f..33902c757 100644 --- a/Source/Properties/AssemblyInfo.cs +++ b/Source/Properties/AssemblyInfo.cs @@ -27,7 +27,7 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion ("1.7.*")] -[assembly: AssemblyInformationalVersion ("1.7 for KSP v1")] -[assembly: KSPAssembly ("KAS", 1, 7)] +[assembly: AssemblyVersion ("1.8.*")] +[assembly: AssemblyInformationalVersion ("1.8 for KSP v1")] +[assembly: KSPAssembly ("KAS", 1, 8)] [assembly: AssemblyFlags (AssemblyNameFlags.PublicKey)] diff --git a/Source/api_impl/AttachNodesUtilsImpl.cs b/Source/api_impl/AttachNodesUtilsImpl.cs index d197fe79d..22eab5228 100644 --- a/Source/api_impl/AttachNodesUtilsImpl.cs +++ b/Source/api_impl/AttachNodesUtilsImpl.cs @@ -67,6 +67,9 @@ public void DropNode(Part part, AttachNode attachNode) { HostedDebugLog.Fine(part, "Drop attach node: {0}", NodeId(attachNode)); part.attachNodes.Remove(attachNode); attachNode.attachedPartId = 0; // Just in case. + if (attachNode.icon != null) { + attachNode.DestroyNodeIcon(); + } } } diff --git a/Source/api_impl/LinkUtilsImpl.cs b/Source/api_impl/LinkUtilsImpl.cs index 25c38849d..a27dbee4d 100644 --- a/Source/api_impl/LinkUtilsImpl.cs +++ b/Source/api_impl/LinkUtilsImpl.cs @@ -5,6 +5,7 @@ using KASAPIv2; using KSPDev.LogUtils; using System.Linq; +using UnityEngine; // ReSharper disable once CheckNamespace namespace KASImpl { @@ -54,20 +55,17 @@ public ILinkPeer FindLinkPeer(ILinkPeer srcPeer) { } /// - public Part CoupleParts(AttachNode sourceNode, AttachNode targetNode, - bool toDominantVessel = false) { + public Part CoupleParts(AttachNode sourceNode, AttachNode targetNode, bool toDominantVessel = false) { if (toDominantVessel) { - var dominantVessel = - Vessel.GetDominantVessel(sourceNode.owner.vessel, targetNode.owner.vessel); + var dominantVessel = GetDominantVessel(sourceNode.owner.vessel, targetNode.owner.vessel); if (dominantVessel != targetNode.owner.vessel) { var tmp = sourceNode; sourceNode = targetNode; targetNode = tmp; } } - DebugEx.Fine("Couple {0} to {1}", - KASAPI.AttachNodesUtils.NodeId(sourceNode), - KASAPI.AttachNodesUtils.NodeId(targetNode)); + DebugEx.Fine( + "Couple {0} to {1}", KASAPI.AttachNodesUtils.NodeId(sourceNode), KASAPI.AttachNodesUtils.NodeId(targetNode)); var srcPart = sourceNode.owner; var srcVessel = srcPart.vessel; KASAPI.AttachNodesUtils.AddNode(srcPart, sourceNode); @@ -79,6 +77,22 @@ public Part CoupleParts(AttachNode sourceNode, AttachNode targetNode, targetNode.attachedPart = srcPart; targetNode.attachedPartId = srcPart.flightID; tgtPart.attachMode = AttachModes.STACK; + + // In KPS 1.11 the landed vessels are anchored to the surface with a constantly renewable fixed joint. + // When it breaks (and it breaks on every fixed frame), the game recognizes this as a detachment of the connected + // part from the vessel's root. Once coupled, the source's anchor makes no sense and interferes with the KAS logic. + if (srcPart.vessel.IsAnchored) { + DebugEx.Info("Reset RB anchor on vessel: {0}", srcPart.vessel.vesselName); + srcPart.vessel.ResetRBAnchor(); + // The reset method only requests destroying. The joint still can emit a break event on the next physical frame. + var rbAnchor = srcPart.vessel.rootPart.GetComponents().FirstOrDefault(j => j.connectedBody == null); + if (rbAnchor != null) { + Object.DestroyImmediate(rbAnchor); + } else { + DebugEx.Error("Cannot find the anchor joint on vessel: {0}", srcPart.vessel.vesselName); + } + } + srcPart.Couple(tgtPart); // Depending on how active vessel has updated do either force active or make active. Note, that // active vessel can be EVA kerbal, in which case nothing needs to be adjusted. @@ -112,8 +126,9 @@ public Part DecoupleParts(Part part1, Part part2, DebugEx.Warning("Cannot decouple {0} <=> {1} - not coupled!", part1, part2); return null; } + var parentPart = partToDecouple.parent; - if (vesselInfo != null) { + if (partToDecouple.vessel != null && vesselInfo != null) { // Simulate the IActivateOnDecouple behaviour since Undock() doesn't do it. var srcAttachNode = partToDecouple.FindAttachNodeByPart(partToDecouple.parent); if (srcAttachNode != null) { @@ -134,15 +149,64 @@ public Part DecoupleParts(Part part1, Part part2, vesselInfo.Save(vesselInfoCfg); DebugEx.Fine("Restore vessel info:\n{0}", vesselInfoCfg); partToDecouple.Undock(vesselInfo); + } else if (partToDecouple.vessel == null) { + // During the EVA construction mode the parts can have no vessel. + DebugEx.Fine("EVA construction mode detected. Skip decoupling."); } else { // Do simple decouple event which will screw the decoupled vessel root part. DebugEx.Warning("No vessel info found! Just decoupling"); partToDecouple.decouple(); } - part1.vessel.CycleAllAutoStrut(); - part2.vessel.CycleAllAutoStrut(); + + // KSP sometimes fails to restore the physic state of the decoupled parts. Fix it here. No guarantees, though. + foreach (var rb in partToDecouple.GetComponentsInChildren()) { + if (rb.isKinematic) { + DebugEx.Warning("KSP ISSUE WORKAROUND: Make rigidbody physical: part={0}, rb={1}", + partToDecouple, DbgFormatter.TranformPath(rb.gameObject)); + rb.isKinematic = false; + rb.velocity = parentPart.rb.velocity; + rb.angularVelocity = parentPart.rb.angularVelocity; + } + } + + if (part1.vessel != null) { + part1.vessel.CycleAllAutoStrut(); + if (vesselInfo1 != null) { + part1.vessel.vesselName = vesselInfo1.name; + part1.vessel.vesselType = vesselInfo1.vesselType; + } + } + if (part2.vessel != null) { + part2.vessel.CycleAllAutoStrut(); + if (vesselInfo2 != null) { + part2.vessel.vesselName = vesselInfo2.name; + part2.vessel.vesselType = vesselInfo2.vesselType; + } + } return partToDecouple; } + + /// Finds which of the two vessels is more important. + /// Used in the linking operations to figure which vessel should be the parent. + /// The first vessel. + /// The second vessel. + /// The vessel that is recognized as the most important. + public static Vessel GetDominantVessel(Vessel v1, Vessel v2) { + var type1 = v1.vesselType <= VesselType.Base ? v1.vesselType : VesselType.Debris; + var type2 = v2.vesselType <= VesselType.Base ? v2.vesselType : VesselType.Debris; + if (type1 > type2) { + return v1; + } + if (type2 > type1) { + return v2; + } + var totalMass1 = v1.GetTotalMass(); + var totalMass2 = v2.GetTotalMass(); + if (Mathf.Abs(totalMass1 - totalMass2) < float.Epsilon) { + return v1.id.CompareTo(v2.id) <= 0 ? v2 : v1; // For stable result. + } + return totalMass1 > totalMass2 ? v1 : v2; + } } } // namespace diff --git a/Source/compatibility/PatchFilesProcessor.cs b/Source/compatibility/PatchFilesProcessor.cs index 2f2c5bb38..77f0081f1 100644 --- a/Source/compatibility/PatchFilesProcessor.cs +++ b/Source/compatibility/PatchFilesProcessor.cs @@ -25,6 +25,9 @@ internal sealed class PatchFilesProcessor : UpgradeScript { #region implemented abstract members of UpgradeScript /// public override TestResult OnTest(ConfigNode node, LoadContext loadContext, ref string nodeName) { + if (_partPatches.Count == 0) { + return TestResult.Pass; // No need to patch. + } if (node.GetValue("$$failed") != null) { return TestResult.Failed; } @@ -32,9 +35,8 @@ public override TestResult OnTest(ConfigNode node, LoadContext loadContext, ref if (partName == null) { return TestResult.Pass; // Part was dropped during the upgrade. } - List patches; var hasMatches = false; - if (_partPatches.TryGetValue(partName, out patches)) { + if (_partPatches.TryGetValue(partName, out var patches)) { for (var i = patches.Count - 1; i >= 0; --i) { var patch = patches[i]; try { @@ -89,7 +91,7 @@ public override void OnUpgrade(ConfigNode node, LoadContext loadContext, ConfigN Versioning.version_major, Versioning.version_minor, Versioning.Revision); #endregion - #region UpgradeScript oevrrides + #region UpgradeScript overrides /// protected override void OnInit() { _partPatches = PartNodePatcher.GetPatches("KAS") diff --git a/Source/controllers/ControllerWinchRemote.cs b/Source/controllers/ControllerWinchRemote.cs index 51ae73f9c..d71b7d8ec 100644 --- a/Source/controllers/ControllerWinchRemote.cs +++ b/Source/controllers/ControllerWinchRemote.cs @@ -23,7 +23,7 @@ namespace KAS { // Next localization ID: #kasLOC_11028. [KSPAddon(KSPAddon.Startup.Flight, false /*once*/)] [PersistentFieldsDatabase("KAS/settings/KASConfig")] -internal sealed class ControllerWinchRemote : MonoBehaviour, IHasGUI { +sealed class ControllerWinchRemote : MonoBehaviour, IHasGUI { #region Localizable GUI strings. /// static readonly Message WindowTitleTxt = new Message( @@ -97,7 +97,7 @@ internal sealed class ControllerWinchRemote : MonoBehaviour, IHasGUI { /// static readonly Message WinchModeOfflineTxt = new Message( "#kasLOC_11011", - defaultTemplate: "Offline", + defaultTemplate: "Offline", description: "The text for the winch status in which it cannot be remotely operated for any" + " reason."); @@ -110,7 +110,7 @@ internal sealed class ControllerWinchRemote : MonoBehaviour, IHasGUI { /// static readonly Message WinchModeBlockedTxt = new Message( "#kasLOC_11013", - defaultTemplate: "Blocked", + defaultTemplate: "Blocked", description: "The text for the winch status that tells that the main winch attach node is" + " occupied by an incompatible (non-KAS) part."); @@ -123,7 +123,7 @@ internal sealed class ControllerWinchRemote : MonoBehaviour, IHasGUI { /// static readonly Message WinchModeRetractedTxt = new Message( "#kasLOC_11015", - defaultTemplate: "Retracted", + defaultTemplate: "Retracted", description: "The text for the winch status that tells that the cable connector is locked to" + " the winch, and the cable length is zero."); @@ -195,7 +195,7 @@ internal sealed class ControllerWinchRemote : MonoBehaviour, IHasGUI { static readonly Message RelaxedCableLengthTxt = new Message( "#kasLOC_11025", - defaultTemplate: "<<1>> / <<2>>", + defaultTemplate: "<<1>> / <<2>>", description: "The formatter string for the cable lengths when the cable is *not* under" + " strain. I.e. its actual length is not greater than the winch allows." + "\nArgument <<1>> is the length, allowed by the winch of type DistanceType." @@ -205,7 +205,7 @@ internal sealed class ControllerWinchRemote : MonoBehaviour, IHasGUI { static readonly Message StrainedCableLengthTxt = new Message( "#kasLOC_11026", - defaultTemplate: "<<1>> / <<2>>", + defaultTemplate: "<<1>> / <<2>>", description: "The formatter string for the cable lengths when the cable *is* under strain." + " I.e. its actual length is greater than the winch allows." + "\nArgument <<1>> is the length, allowed by the winch of type DistanceType." @@ -215,17 +215,28 @@ internal sealed class ControllerWinchRemote : MonoBehaviour, IHasGUI { static readonly Message MotorSpeedTxt = new Message( "#kasLOC_11027", - defaultTemplate: "<<1>> / <<2>>", + defaultTemplate: "<<1>> / <<2>>", description: "The formatter string for the winch motor speed." + "\nArgument <<1>> is the current motor speed type VelocityType." + "\nArgument <<2>> is the settings for the desired motor speed of type VelocityType."); #endregion #region Configuration settings + // ReSharper disable FieldCanBeMadeReadOnly.Local + // ReSharper disable ConvertToConstant.Local + /// Keyboard key to trigger the GUI. /// - [PersistentField("Winch/remoteControlKey")] - public string openGuiKey = "&P"; // Alt+P + [PersistentField("Winch/remoteControlKey", group = StdPersistentGroups.Default)] + string _openGuiKey = "&P"; // Alt+P + + /// Tells if the control hints should be shown in the remote winches control dialog. + /// + [PersistentField("Winch/showRemoteControlDialogHints", group = StdPersistentGroups.Default)] + bool _showRemoteControlDialogHints = true; + + // ReSharper enable FieldCanBeMadeReadOnly.Local + // ReSharper enable ConvertToConstant.Local #endregion #region Internal helper types @@ -233,7 +244,6 @@ internal sealed class ControllerWinchRemote : MonoBehaviour, IHasGUI { class WinchState { // ReSharper disable once InconsistentNaming public string vesselGUID; - public string vesselName; public IWinchControl winchModule; public uint flightId; public float motorSpeedSetting = 1.0f; @@ -246,8 +256,8 @@ class WinchState { #endregion #region GUI styles and contents - GUIStyle _guiNoWrapStyle; - GUIStyle _guiNoWrapCenteredStyle; + GUIStyle _guiNoWrapCenteredLabelStyle; + GUIStyle _guiNoWrapCenteredBoxStyle; // These fields are set/updated in LoadLocalizedContent. GUIContent _highlightWinchCnt; GUIContent _startRetractingCnt; @@ -264,7 +274,6 @@ class WinchState { GUIContent _stretchBtnCnt; GUIContent _detachBtnCnt; GUIContent _closeGuiCnt; - float _winchCableStatusMinWidth; #endregion #region Local fields @@ -276,17 +285,13 @@ class WinchState { WinchState[] _sortedSceneModules; /// Actual screen position of the console window. - /// TODO(ihsoft): Persist and restore. - static Rect _windowRect = new Rect(100, 100, 1, 1); + Rect _windowRect = new Rect(100, 100, 1, 1); - /// A title bar location. - static readonly Rect TitleBarRect = new Rect(0, 0, 10000, 20); - /// A list of actions to apply at the end of the GUI frame. - static readonly GuiActionsList GuiActions = new GuiActionsList(); + readonly GuiActionsList _guiActions = new GuiActionsList(); - /// Style to draw a control of the minimum size. - static readonly GUILayoutOption MinSizeLayout = GUILayout.ExpandWidth(false); + /// The controller of the game's UI scale. + GuiScale _guiScale; /// Keyboard event that opens/closes the remote GUI. static Event _openGuiEvent; @@ -304,7 +309,7 @@ class WinchState { /// GUI table to align winch status fields. /// Cable status + Motor status - readonly GUILayoutStringTable _guiWinchTable = new GUILayoutStringTable(2); + readonly GUILayoutStringTable _guiWinchTable = new(2, keepMaxSize: true); #endregion #region IHasGUI implementation @@ -318,9 +323,12 @@ public void OnGUI() { ToggleGui(!_isGuiOpen); } if (_isGuiOpen) { - _windowRect = GUILayout.Window( - GetInstanceID(), _windowRect, ConsoleWindowFunc, WindowTitleTxt.Format(_openGuiEvent), - GUILayout.MaxHeight(1), GUILayout.MaxWidth(1)); + using (new GuiMatrixScope()) { + _guiScale.UpdateMatrix(); + _windowRect = GUILayout.Window( + GetInstanceID(), _windowRect, ConsoleWindowFunc, WindowTitleTxt.Format(_openGuiEvent), + GUILayout.MaxHeight(1), GUILayout.MaxWidth(1)); + } } } #endregion @@ -345,7 +353,9 @@ public static void ToggleGui(bool isVisible) { void Awake() { DebugEx.Info("Winch remote controller created"); ConfigAccessor.ReadFieldsInType(GetType(), this); - _openGuiEvent = Event.KeyboardEvent(openGuiKey); + _guiScale = + new GuiScale(getPivotFn: () => new Vector2(_windowRect.x, _windowRect.y), onScaleUpdatedFn: MakeGuiStyles); + _openGuiEvent = Event.KeyboardEvent(_openGuiKey); _instance = this; LoadLocalizedContent(); GameEvents.onLanguageSwitched.Add(LoadLocalizedContent); @@ -364,18 +374,24 @@ void OnDestroy() { } #endregion + #region Local utility methods + /// The GUI tooltip control. Only used in the method. + readonly GuiTooltip _tooltip = new(); + /// Shows a window that displays the winch controls. /// Window ID. void ConsoleWindowFunc(int windowId) { - MakeGuiStyles(); - - if (GuiActions.ExecutePendingGuiActions()) { + if (_guiActions.ExecutePendingGuiActions()) { MaybeUpdateModules(); _guiWinchTable.UpdateFrame(); } if (_sortedSceneModules.Length == 0) { - GUILayout.Label(NoContentTxt, _guiNoWrapStyle); + GUILayout.Label(NoContentTxt, _guiNoWrapCenteredBoxStyle); + if (GUILayout.Button(_closeGuiCnt)) { + _guiActions.Add(() => _isGuiOpen = false); + } + return; } // TODO(ihsoft): Add paging and the setting for the number of items per page. @@ -383,6 +399,9 @@ void ConsoleWindowFunc(int windowId) { foreach (var winchState in _sortedSceneModules) { var winch = winchState.winchModule; var winchCable = winchState.winchModule.linkJoint as ILinkCableJoint; + if (winchCable == null) { + continue; // Wrong setup, but we don't want massive NPEs. + } var disableWinchGui = !winch.part.vessel.IsControllable || winch.isNodeBlocked || winch.isLocked; var motorSpeed = winchState.motorSpeedSetting * winch.cfgMotorMaxSpeed; @@ -399,10 +418,9 @@ void ConsoleWindowFunc(int windowId) { fnOff: () => { winch.part.SetHighlightDefault(); }, - actionsList: GuiActions); + actionsList: _guiActions); // Cable retracting controls. - System.Diagnostics.Debug.Assert(winchCable != null, nameof(winchCable) + " != null"); using (new GuiEnabledStateScope(!disableWinchGui && winchCable.realCableLength > 0)) { // Start retracting the cable column. winchState.retractBtnPressed &= winch.motorTargetSpeed < 0; @@ -410,38 +428,34 @@ void ConsoleWindowFunc(int windowId) { winchState.retractBtnPressed, _startRetractingCnt, GUI.skin.button, - new[] {MinSizeLayout}, + null, fnOn: () => winch.SetMotor(-motorSpeed), fnOff: () => winch.SetMotor(0), - actionsList: GuiActions); + actionsList: _guiActions); // Retract the cable column. winchState.retracting &= winch.motorTargetSpeed < 0; winchState.retracting = GUILayoutButtons.Push( winchState.retracting, _retractCnt, GUI.skin.button, - new[] {MinSizeLayout}, + null, fnPush: () => winch.SetMotor(-motorSpeed), fnRelease: () => winch.SetMotor(0), - actionsList: GuiActions); + actionsList: _guiActions); } // Cable length/status column. if (!winch.part.vessel.IsControllable) { - _guiWinchTable.AddTextColumn( - _winchModeOfflineCnt, _guiNoWrapCenteredStyle, minWidth: _winchCableStatusMinWidth); + _guiWinchTable.AddTextColumn(_winchModeOfflineCnt, _guiNoWrapCenteredLabelStyle); } else if (winch.isNodeBlocked || winch.isLocked) { - _guiWinchTable.AddTextColumn( - _winchModeBlockedCnt, _guiNoWrapCenteredStyle, minWidth: _winchCableStatusMinWidth); + _guiWinchTable.AddTextColumn(_winchModeBlockedCnt, _guiNoWrapCenteredLabelStyle); } else if (winch.isConnectorLocked) { - _guiWinchTable.AddTextColumn( - _winchModeRetractedCnt, _guiNoWrapCenteredStyle, minWidth: _winchCableStatusMinWidth); + _guiWinchTable.AddTextColumn(_winchModeRetractedCnt, _guiNoWrapCenteredLabelStyle); } else { _cableStatusCnt.text = winchCable.realCableLength <= winch.currentCableLength ? RelaxedCableLengthTxt.Format(winch.currentCableLength, winchCable.realCableLength) : StrainedCableLengthTxt.Format(winch.currentCableLength, winchCable.realCableLength); - _guiWinchTable.AddTextColumn( - _cableStatusCnt, _guiNoWrapCenteredStyle, minWidth: _winchCableStatusMinWidth); + _guiWinchTable.AddTextColumn(_cableStatusCnt, _guiNoWrapCenteredLabelStyle); } // Cable extending controls. @@ -453,33 +467,33 @@ void ConsoleWindowFunc(int windowId) { winchState.extendBtnPressed, _startExtendingCnt, GUI.skin.button, - new[] {MinSizeLayout}, + null, fnOn: () => winch.SetMotor(motorSpeed), fnOff: () => winch.SetMotor(0), - actionsList: GuiActions); + actionsList: _guiActions); // Extend the cable column. winchState.extending &= winch.motorTargetSpeed > 0; winchState.extending = GUILayoutButtons.Push( winchState.extending, _extendCnt, GUI.skin.button, - new[] {MinSizeLayout}, + null, fnPush: () => winch.SetMotor(motorSpeed), fnRelease: () => winch.SetMotor(0), - actionsList: GuiActions); + actionsList: _guiActions); } using (new GuiEnabledStateScope(!disableWinchGui)) { // Motor speed settings column. - using (new GUILayout.VerticalScope(_motorSpeedSettingsCnt, GUI.skin.label)) { + using (new GUILayout.VerticalScope(_motorSpeedSettingsCnt, _guiNoWrapCenteredLabelStyle)) { GUI.changed = false; GUILayout.FlexibleSpace(); - var newMotorSpeedSetting = GUILayout.HorizontalSlider( - winchState.motorSpeedSetting, 0.1f, 1.0f, - GUILayout.Width(100f)); + var newMotorSpeedSetting = + GUILayout.HorizontalSlider(winchState.motorSpeedSetting, 0.1f, 1.0f, GUILayout.Width(100f)); + GUILayout.FlexibleSpace(); if (GUI.changed) { var state = winchState; - GuiActions.Add(() => { + _guiActions.Add(() => { state.motorSpeedSetting = newMotorSpeedSetting; var newSpeed = newMotorSpeedSetting * winch.cfgMotorMaxSpeed; if (state.extending || state.extendBtnPressed) { @@ -495,57 +509,59 @@ void ConsoleWindowFunc(int windowId) { // Motor speed info column. _motorSpeedCnt.text = MotorSpeedTxt.Format(Mathf.Abs(winch.motorCurrentSpeed), motorSpeed); - _guiWinchTable.AddTextColumn( - _motorSpeedCnt, _guiNoWrapCenteredStyle, minWidth: MotorSpeedTxt.guiTags.minWidth); + _guiWinchTable.AddTextColumn(_motorSpeedCnt, _guiNoWrapCenteredLabelStyle); // Release cable column. using (new GuiEnabledStateScope( !disableWinchGui && winch.currentCableLength < winch.cfgMaxCableLength)) { - if (GUILayout.Button(_releaseBtnCnt, GUI.skin.button, MinSizeLayout)) { - GuiActions.Add(winch.ReleaseCable); + if (GUILayout.Button(_releaseBtnCnt, GUI.skin.button)) { + _guiActions.Add(winch.ReleaseCable); } } // Stretch cable column. using (new GuiEnabledStateScope(!disableWinchGui && !winch.isConnectorLocked)) { - if (GUILayout.Button(_stretchBtnCnt, GUI.skin.button, MinSizeLayout)) { - GuiActions.Add(winch.StretchCable); + if (GUILayout.Button(_stretchBtnCnt, GUI.skin.button)) { + _guiActions.Add(winch.StretchCable); } } // Disconnect connector column. using (new GuiEnabledStateScope(!disableWinchGui && winch.isLinked)) { - if (GUILayout.Button(_detachBtnCnt, GUI.skin.button, MinSizeLayout)) { - GuiActions.Add(() => winch.BreakCurrentLink(LinkActorType.Player)); + if (GUILayout.Button(_detachBtnCnt, GUI.skin.button)) { + _guiActions.Add(() => winch.BreakCurrentLink(LinkActorType.Player)); } } } } - using (new GUILayout.HorizontalScope()) { - if (GUILayout.Button(_closeGuiCnt, MinSizeLayout)) { - GuiActions.Add(() => _isGuiOpen = false); - } - GUILayout.Label(""); - GUI.Label(GUILayoutUtility.GetLastRect(), GUI.tooltip); + if (GUILayout.Button(_closeGuiCnt)) { + _guiActions.Add(() => _isGuiOpen = false); } - - // Allow the window to be dragged by its title bar. - GuiWindow.DragWindow(ref _windowRect, TitleBarRect); + if (_showRemoteControlDialogHints) { + _tooltip.Update(); + } + GUI.DragWindow(); } - /// Creates the styles. Only does it once. + /// Creates the styles when the scale changes or initializes. void MakeGuiStyles() { - if (_guiNoWrapStyle == null) { - _guiNoWrapStyle = new GUIStyle(GUI.skin.label) { - stretchHeight = true, - wordWrap = false, - alignment = TextAnchor.MiddleLeft - }; - _guiNoWrapCenteredStyle = new GUIStyle(_guiNoWrapStyle) { - alignment = TextAnchor.MiddleCenter - }; - } + var skin = GUI.skin; + _guiWinchTable.ResetMaxSizes(); + var buttonStyle = skin.button; + _guiNoWrapCenteredLabelStyle = new GUIStyle(skin.label) { + stretchHeight = true, + wordWrap = false, + margin = buttonStyle.margin, + padding = buttonStyle.padding, + alignment = TextAnchor.MiddleCenter, + }; + _guiNoWrapCenteredBoxStyle = new GUIStyle(skin.box) { + wordWrap = false, + margin = buttonStyle.margin, + padding = buttonStyle.padding, + alignment = TextAnchor.MiddleCenter, + }; } /// Prepares or updates the localizable GUI strings. @@ -570,12 +586,6 @@ void LoadLocalizedContent() { _winchModeRetractedCnt = new GUIContent(WinchModeRetractedTxt, WinchModeRetractedTxtHint); RelaxedCableLengthTxt.LoadLocalization(); // To update guiTags. StrainedCableLengthTxt.LoadLocalization(); // To update guiTags. - _winchCableStatusMinWidth = Mathf.Max( - RelaxedCableLengthTxt.guiTags.minWidth, - StrainedCableLengthTxt.guiTags.minWidth, - WinchModeOfflineTxt.guiTags.minWidth, - WinchModeBlockedTxt.guiTags.minWidth, - WinchModeRetractedTxt.guiTags.minWidth); } /// Checks if the cached list of the winch controllers needs to be refreshed. @@ -593,7 +603,6 @@ void MaybeUpdateModules() { ? _sceneModules[w.part.flightID] : new WinchState() { vesselGUID = w.part.vessel.id.ToString(), - vesselName = w.part.vessel.vesselName, flightId = w.part.flightID, winchModule = w, }) @@ -610,6 +619,7 @@ void MaybeUpdateModules() { void OnVesselUpdated(Vessel v) { _modulesNeedUpdate = true; } + #endregion } } // namespace diff --git a/Source/modules/AbstractJoint.cs b/Source/modules/AbstractJoint.cs index af6fd3fef..3b704530a 100644 --- a/Source/modules/AbstractJoint.cs +++ b/Source/modules/AbstractJoint.cs @@ -15,7 +15,6 @@ using System.Text; using UnityEngine; -// ReSharper disable InheritdocInvalidUsage // ReSharper disable once CheckNamespace namespace KAS { @@ -247,6 +246,7 @@ public abstract class AbstractJoint : AbstractPartModule, public Vector3 anchorAtTarget = Vector3.zero; #endregion + // ReSharper disable MemberCanBePrivate.Global #region CFG/persistent fields /// /// Tells if the source and the target parts should couple when making a link between the @@ -276,6 +276,8 @@ public abstract class AbstractJoint : AbstractPartModule, /// [KSPField(isPersistant = true)] public float persistedLinkLength = -1.0f; + + // ReSharper enable MemberCanBePrivate.Global #endregion #region ILinkJoint properties @@ -287,8 +289,8 @@ public abstract class AbstractJoint : AbstractPartModule, /// public bool coupleOnLinkMode { - get { return coupleWhenLinked; } - private set { coupleWhenLinked = value; } + get => coupleWhenLinked; + private set => coupleWhenLinked = value; } /// @@ -304,7 +306,7 @@ public bool coupleOnLinkMode { /// Distance in meters or null. The null value means that this joint doesn't care /// about the particular length in the current state, and it's up to the implementation. /// - protected float? originalLength => persistedLinkLength < 0 ? (float?) null : persistedLinkLength; + protected float? originalLength => persistedLinkLength < 0 ? null : persistedLinkLength; /// Tells if the parts of the link are coupled in the vessels hierarchy. /// @@ -402,7 +404,7 @@ public override void OnDebugAdjustablesUpdated() { #endregion #region IActivateOnDecouple implementation - /// + /// public virtual void DecoupleAction(string nodeName, bool weDecouple) { if (isLinked && !selfDecoupledAction && linkSource.coupleNode != null && linkSource.coupleNode.id == nodeName) { @@ -414,13 +416,12 @@ public virtual void DecoupleAction(string nodeName, bool weDecouple) { #endregion #region IJointEventsListener implementation - /// + /// public virtual void OnJointBreak(float breakForce) { - HostedDebugLog.Fine(this, "Joint is broken with force: {0}", breakForce); Part parentPart = null; Vector3 relPos = Vector3.zero; Quaternion relRot = Quaternion.identity; - if (isLinked && part.parent != linkTarget.part) { + if (isLinked && part.parent != null && part.parent != linkTarget.part) { // Calculate relative position and rotation of the part to properly restore the coupling. parentPart = part.parent; var root = vessel.rootPart.transform; @@ -438,9 +439,11 @@ public virtual void OnJointBreak(float breakForce) { // doesn't validate which joint has actually broke. AsyncCall.CallOnFixedUpdate(this, () => { if (isLinked && customJoints.Any(x => x == null)) { + HostedDebugLog.Info(this, "KAS joint is broken, unlink the parts"); + linkSource.BreakCurrentLink(LinkActorType.Physics); // It was KAS joint that broke. Restore the part attachment and break KAS link. if (parentPart != null) { - HostedDebugLog.Fine(this, "Restore coupling with: {0}", parentPart); + HostedDebugLog.Info(this, "Restore coupling with: {0}", parentPart); var parentPartTransform = parentPart.transform; var parentPartRotation = parentPartTransform.rotation; var partTransform = part.transform; @@ -448,8 +451,6 @@ public virtual void OnJointBreak(float breakForce) { partTransform.rotation = parentPartRotation * relRot; part.Couple(parentPart); } - HostedDebugLog.Info(this, "KAS joint is broken, unlink the parts"); - linkSource.BreakCurrentLink(LinkActorType.Physics); } }); } @@ -460,6 +461,7 @@ public virtual void OnJointBreak(float breakForce) { public override void OnAwake() { base.OnAwake(); RegisterGameEventListener(GameEvents.onVesselRename, OnVesselRename); + RegisterGameEventListener(GameEvents.onPartDeCoupleNewVesselComplete, OnVesselDecoupled); } #endregion @@ -569,7 +571,8 @@ public virtual bool SetCoupleOnLinkMode(bool isCoupleOnLink) { #endregion #region IModuleInfo implementation - /// + + /// public override string GetInfo() { var sb = new StringBuilder(base.GetInfo()); if (linkBreakForce > 0) { @@ -593,17 +596,17 @@ public override string GetInfo() { return sb.ToString(); } - /// + /// public virtual string GetModuleTitle() { return ModuleTitle; } - /// + /// public virtual Callback GetDrawModulePanelCallback() { return null; } - /// + /// public virtual string GetPrimaryField() { return null; } @@ -816,15 +819,6 @@ protected string CheckAngleLimitAtTarget(ILinkSource source, ILinkTarget target) /// void CoupleParts() { if (isCoupled) { - // If the parts are already coupled, then refresh the state and update the joints. - if (persistedSrcVesselInfo == null) { - HostedDebugLog.Fine(this, "Update link source vessel info to: {0}", vessel); - persistedSrcVesselInfo = GetVesselInfo(vessel); - } - if (persistedTgtVesselInfo == null) { - HostedDebugLog.Fine(this, "Update link target vessel info to: {0}", vessel); - persistedTgtVesselInfo = GetVesselInfo(vessel); - } SetupPhysXJoints(); return; } @@ -837,8 +831,7 @@ void CoupleParts() { // Remember the vessel info to restore it on the decoupling. And do the couple! persistedSrcVesselInfo = GetVesselInfo(linkSource.part.vessel); persistedTgtVesselInfo = GetVesselInfo(linkTarget.part.vessel); - KASAPI.LinkUtils.CoupleParts( - linkSource.coupleNode, linkTarget.coupleNode, toDominantVessel: true); + KASAPI.LinkUtils.CoupleParts(linkSource.coupleNode, linkTarget.coupleNode, toDominantVessel: true); SetupPhysXJoints(); } @@ -864,7 +857,6 @@ void DecoupleParts() { selfDecoupledAction = false; persistedSrcVesselInfo = null; persistedTgtVesselInfo = null; - DelegateCouplingRole(linkTarget.part); SetCustomJoints(null); } @@ -908,8 +900,7 @@ void OnVesselRename(GameEvents.HostedFromToAction action) { /// /// The link source at the moment of cleanup. void MaybeBreakLink(ILinkSource source) { - // Delay the nodes cleanup to let the other logic work smoothly. Copy the properties since - // they will be null'ed on the link destruction. + // Delay the nodes cleanup to let the other logic work smoothly. AsyncCall.CallOnEndOfFrame(this, () => { if (isLinked) { source.BreakCurrentLink(LinkActorType.Physics); @@ -928,19 +919,18 @@ static DockedVesselInfo GetVesselInfo(Vessel v) { return vesselInfo; } - /// Restores the name and type of the vessels of the former coupled parts. + /// Restores the name and type of the vessel of the former coupled part. /// /// The source and target parts need to be separated, but the logical link still need to exist. /// On restore the vessel info will be cleared on the module. Alas, when the link is broken /// externally, the root vessel part cannot be properly restored. /// void RestorePartialVesselInfo(ILinkSource source, ILinkTarget target, bool weDecouple) { + var vesselInfo = weDecouple ? persistedSrcVesselInfo : persistedTgtVesselInfo; + var childPart = weDecouple ? source.part : target.part; AsyncCall.CallOnEndOfFrame(this, () => { - var vesselInfo = weDecouple ? persistedSrcVesselInfo : persistedTgtVesselInfo; - var childPart = weDecouple ? source.part : target.part; - if (childPart.vessel.vesselType != vesselInfo.vesselType - || childPart.vessel.vesselName != vesselInfo.name) { - HostedDebugLog.Warning(this, "Partially restoring vessel info on {0}: type={1}, name={2}", + if (childPart != null && childPart.vessel != null && vesselInfo != null) { + HostedDebugLog.Warning(this, "Restoring vessel info on {0} without root: type={1}, name={2}", childPart, vesselInfo.vesselType, vesselInfo.name); childPart.vessel.vesselType = vesselInfo.vesselType; childPart.vessel.vesselName = vesselInfo.name; @@ -950,44 +940,46 @@ void RestorePartialVesselInfo(ILinkSource source, ILinkTarget target, bool weDec }); } - /// - /// Goes thru the parts on the source and target vessels, and tries to restore the coupling - /// between the vessels. - /// + static bool _globalCouplingCheckInProcess; + void OnVesselDecoupled(Vessel parentVessel, Vessel newVessel) { + // This callback will trigger in all joints, but only one check must be done. + if (!_globalCouplingCheckInProcess) { + HostedDebugLog.Info(this, "Scheduling global coupling check..."); + _globalCouplingCheckInProcess = true; + AsyncCall.CallOnEndOfFrame(this, () => { + _globalCouplingCheckInProcess = false; + CheckIfCanRestoreCoupling(parentVessel, newVessel); + }); + } + } + + /// Tries to couple back two newly separated vessels. /// - /// Any linking module on the source or the target vessel, which is linked and in the docking - /// mode, will be attempted to restore the vessels coupling. This work will be done at the end of - /// frame to let the other logic to cleanup. + /// Walks over all KAS link joints in the both vessels to find out if any of them can keep the vessels coupled. If + /// that's the case, then the coupling is re-established through the found joint. Must be called at the end of frame. /// - /// - /// The former target part that was holding the coupling with this part. - /// - void DelegateCouplingRole(Part tgtPart) { - AsyncCall.CallOnEndOfFrame(this, () => { - var candidates = new List() - .Concat( - vessel.parts - .SelectMany(p => p.Modules.OfType()) - .Where( - j => !ReferenceEquals(j, this) && j.coupleOnLinkMode && j.isLinked - && j.linkTarget.part.vessel == tgtPart.vessel)) - .Concat( - tgtPart.vessel.parts - .SelectMany(p => p.Modules.OfType()) - .Where( - j => j.coupleOnLinkMode && j.isLinked && j.linkTarget.part.vessel == vessel)) - .ToList(); - foreach (var joint in candidates) { - HostedDebugLog.Fine(this, "Trying to couple via: {0}", joint); - if (joint.SetCoupleOnLinkMode(true)) { - HostedDebugLog.Info(this, "The coupling role is delegated to: {0}", joint); - return; - } - } - if (candidates.Any()) { - HostedDebugLog.Warning(this, "None of the found candidates took the coupling role"); + /// The former parent in the parts hierarchy. + /// The former child in the parts hierarchy. + void CheckIfCanRestoreCoupling(Vessel parentVessel, Vessel newVessel) { + _globalCouplingCheckInProcess = false; + var candidates = new List() + .Concat( + parentVessel.parts + .SelectMany(p => p.Modules.OfType()) + .Where(j => j.coupleOnLinkMode && j.isLinked && j.linkTarget.part.vessel == newVessel)) + .Concat( + newVessel.parts + .SelectMany(p => p.Modules.OfType()) + .Where(j => j.coupleOnLinkMode && j.isLinked && j.linkTarget.part.vessel == parentVessel)) + .ToList(); + foreach (var linkJoint in candidates) { + if (linkJoint.SetCoupleOnLinkMode(true)) { + HostedDebugLog.Info(this, "The coupling role is delegated to: {0}", linkJoint); + return; + } else { + HostedDebugLog.Fine(this, "The coupling attempt has been rejected by: {0}", linkJoint); } - }); + } } #endregion } diff --git a/Source/modules/AbstractLinkPeer.cs b/Source/modules/AbstractLinkPeer.cs index 2c2029fe8..f27155d21 100644 --- a/Source/modules/AbstractLinkPeer.cs +++ b/Source/modules/AbstractLinkPeer.cs @@ -2,16 +2,16 @@ // Author: igor.zavoychinskiy@gmail.com // License: Public Domain +using System; +using System.Collections; using KASAPIv2; using KSPDev.KSPInterfaces; using KSPDev.LogUtils; using KSPDev.PartUtils; using KSPDev.ProcessingUtils; -using System; using System.Linq; using UnityEngine; -// ReSharper disable InheritdocInvalidUsage // ReSharper disable once CheckNamespace namespace KAS { @@ -27,7 +27,7 @@ public abstract class AbstractLinkPeer : AbstractPartModule, // KAS interfaces. ILinkPeer, ILinkStateEventListener, // KSPDev syntax sugar interfaces. - IKSPActivateOnDecouple { + IsPartDeathListener, IKSPActivateOnDecouple { #region Part's config fields /// See . @@ -124,8 +124,7 @@ public abstract class AbstractLinkPeer : AbstractPartModule, public string cfgAttachNodeName => attachNodeName; /// - public string[] cfgDependentNodeNames => - _dependentNodeNames ?? (_dependentNodeNames = dependentNodes.Split(',')); + public string[] cfgDependentNodeNames => _dependentNodeNames ??= dependentNodes.Split(','); string[] _dependentNodeNames; /// @@ -205,7 +204,7 @@ public abstract class AbstractLinkPeer : AbstractPartModule, #endregion #region IActivateOnDecouple implementation - /// + /// public virtual void DecoupleAction(string nodeName, bool weDecouple) { if (nodeName == attachNodeName) { HostedDebugLog.Fine(this, "Schedule coupling check from DECOUPLE action..."); @@ -214,6 +213,11 @@ public virtual void DecoupleAction(string nodeName, bool weDecouple) { } #endregion + #region IsPartDeathListener declaration + /// + public abstract void OnPartDie(); + #endregion + #region AbstractPartModule overrides /// public override void OnAwake() { @@ -221,6 +225,10 @@ public override void OnAwake() { linkStateMachine = new SimpleStateMachine(); SetupStateMachine(); RegisterGameEventListener(GameEvents.onPartCouple, OnPartCoupleEvent); + RegisterGameEventListener(GameEvents.onPartDie, OnPartDieEvent); + RegisterGameEventListener(GameEvents.OnEVAConstructionModePartAttached, OnEVAConstructionModePartAttachedGameEvent); + RegisterGameEventListener(GameEvents.OnEVAConstructionModePartDetached, OnEVAConstructionModePartDetachedGameEvent); + RegisterGameEventListener(GameEvents.onVesselWillDestroy, OnVesselWillDestroyGameEvent); } /// @@ -232,7 +240,12 @@ public override void OnDestroy() { /// public override void OnStart(StartState state) { base.OnStart(state); - + + // KAS doesn't handle non-physical peers. Both ends of the link must be physical to work properly. + if (part.physicalSignificance != Part.PhysicalSignificance.FULL) { + HostedDebugLog.Error(this, "The part is non-physical. KAS will NOT work properly with it!"); + } + // Adjust state of a newly added module. if (persistedLinkState == LinkState.Available) { var linkedModule = part.Modules.OfType() @@ -276,7 +289,7 @@ public override void OnStartFinished(StartState state) { .Where(p => p.isLinked && (p.cfgAttachNodeName == attachNodeName || p.cfgDependentNodeNames.Contains(attachNodeName))) .ToList() - .ForEach(m => SetLinkState(LinkState.Available)); + .ForEach(m => m.SetLinkState(LinkState.Available)); } else { HostedDebugLog.Fine(this, "Restored link to: {0}", otherPeer); } @@ -293,12 +306,10 @@ protected override void InitModuleSettings() { parsedAttachNode = part.FindAttachNode(attachNodeName); isAutoAttachNode = parsedAttachNode == null; if (isAutoAttachNode) { - parsedAttachNode = KASAPI.AttachNodesUtils.ParseNodeFromString( - part, attachNodeDef, attachNodeName); + parsedAttachNode = KASAPI.AttachNodesUtils.ParseNodeFromString(part, attachNodeDef, attachNodeName); if (parsedAttachNode != null) { - HostedDebugLog.Fine( - this, "Created auto node: {0}", KASAPI.AttachNodesUtils.NodeId(parsedAttachNode)); - if (coupleNode != null && (HighLogic.LoadedSceneIsFlight || HighLogic.LoadedSceneIsEditor)) { + HostedDebugLog.Fine(this, "Created auto node: {0}", KASAPI.AttachNodesUtils.NodeId(parsedAttachNode)); + if (coupleNode != null && (HighLogic.LoadedSceneIsFlight && vessel != null || HighLogic.LoadedSceneIsEditor)) { // Only pre-add the node in the scenes that assume restoring a vessel state. // We'll drop it in the OnStartFinished if not used. KASAPI.AttachNodesUtils.AddNode(part, coupleNode); @@ -313,18 +324,23 @@ protected override void InitModuleSettings() { nodeTransform = KASAPI.AttachNodesUtils.GetTransformForNode(part, parsedAttachNode); } } + + /// + protected override void OnEvaPartLoaded() { + base.OnEvaPartLoaded(); + persistedLinkState = LinkState.Available; + persistedLinkPartId = 0; + persistedLinkNodeName = ""; + } #endregion #region IsPackable implementation - /// + /// public virtual void OnPartUnpack() { - // The check may want to establish a link, but this will only succeed if the physics has - // started. - HostedDebugLog.Fine(this, "Schedule coupling check from UNPACK..."); - AsyncCall.CallOnEndOfFrame(this, CheckCoupleNode); + StartCoroutine(ValidateCoupling(part, "UNPACK")); } - /// + /// public virtual void OnPartPack() { } #endregion @@ -346,11 +362,16 @@ protected virtual void CheckCoupleNode() { // Ensure the auto node is removed and is cleared from the attached part if not used. KASAPI.AttachNodesUtils.DropNode(part, coupleNode); } + // Unblock node if the blocker is removed. + if (linkState == LinkState.NodeIsBlocked && parsedAttachNode.attachedPart == null) { + HostedDebugLog.Fine(this, "Resetting the blocked state due to the attachment has cleared"); + SetLinkState(LinkState.Available); + } } /// Sets the peer's state machine. protected virtual void SetupStateMachine() { - linkStateMachine.onAfterTransition += (start, end) => { + linkStateMachine.onAfterTransition += (_, end) => { persistedLinkState = linkState; if (coupleNode != null && (HighLogic.LoadedSceneIsFlight || HighLogic.LoadedSceneIsEditor)) { if (end == LinkState.Available) { @@ -407,7 +428,7 @@ protected virtual void SetOtherPeer(ILinkPeer peer) { var oldPeer = _otherPeer; _otherPeer = peer; if (_otherPeer != null) { - persistedLinkPartId = (uint) _otherPeer?.part.flightID; + persistedLinkPartId = _otherPeer.part.flightID; persistedLinkNodeName = _otherPeer.cfgAttachNodeName; } else { persistedLinkPartId = 0; @@ -415,6 +436,12 @@ protected virtual void SetOtherPeer(ILinkPeer peer) { } OnPeerChange(oldPeer); } + + /// Triggers when any of the peers becomes a target to the EVA construction operations. + /// This callback is called before the actual interaction happens. + /// The peer that is being manipulated. + protected virtual void OnPeerManipulatedInEva(ILinkPeer target) { + } #endregion #region ILinkStateEventListener implementation @@ -437,7 +464,7 @@ public virtual void OnKASLinkedState(IKasLinkEvent info, bool isLinkedState) { /// public void OnKASNodeBlockedState(ILinkPeer ownerPeer, bool isBlocked) { - throw new NotImplementedException(); // Obsolete. + HostedDebugLog.Error(this, "Method call is unexpected! Doing nothing"); // Obsolete. } #endregion @@ -451,10 +478,80 @@ void OnPartCoupleEvent(GameEvents.FromToAction action) { node = action.to.FindPartThroughNodes(action.from); } if (node != null && node.id == attachNodeName) { - HostedDebugLog.Fine(this, "Schedule coupling check on coupling event: from={0}, to={1}", - action.from, action.to); - AsyncCall.CallOnEndOfFrame(this, CheckCoupleNode); + StartCoroutine(ValidateCoupling(part, "Couple Event")); + } + } + + /// Reacts on this part death and initiates the death callbacks. + void OnPartDieEvent(Part p) { + if (p == part) { + HostedDebugLog.Fine(this, "Link peer dies..."); + OnPartDie(); + } + } + + /// Reset any linked state on the EVA attached part since it's a clone. + void OnEVAConstructionModePartAttachedGameEvent(Vessel v, Part p) { + if (p.parent == part) { + StartCoroutine(ValidateCoupling(p, "EVA attach")); + } + } + + /// Detects if any of the peers was detached from the parent vessel vai EVA construction mode. + void OnEVAConstructionModePartDetachedGameEvent(Vessel v, Part p) { + if (p == part) { + OnPeerManipulatedInEva(this); + } else if (p == otherPeer?.part) { + OnPeerManipulatedInEva(otherPeer); + } + } + + /// Detects of any the peers was picked up in the EVA construction mode. + void OnVesselWillDestroyGameEvent(Vessel targetVessel) { + if (UIPartActionControllerInventory.Instance == null + || UIPartActionControllerInventory.Instance.CurrentCargoPart == null) { + return; // Nothing to do. + } + var evaCargoPart = UIPartActionControllerInventory.Instance.CurrentCargoPart; + if (part.flightID == evaCargoPart.flightID) { + OnPeerManipulatedInEva(this); + } else if (otherPeer?.part.flightID == evaCargoPart.flightID) { + OnPeerManipulatedInEva(otherPeer); + } + } + + /// Validates coupling state on the parts that may be in a packed state. + /// + /// Use this method when the part in question can be packed. Rhe method will wait till it unpacks, and then will call + /// the on it. + /// + /// The part to wait for the state on. + /// A brief reason of why the method is being called. Only used for logging. + /// Co-routine enumerator. + IEnumerator ValidateCoupling(Part p, string reason) { + Func stateCheckFn = () => + linkState == LinkState.Available && p.State == PartStates.IDLE && (p == part || p.parent == part) + && coupleNode?.attachedPart != null; + if (!stateCheckFn.Invoke()) { + yield break; // Nothing to do. + } + if (p.packed) { + HostedDebugLog.Fine(this, "Waiting for the packed part to unpack: part={0}", p); + yield return new WaitWhile(() => p.packed && stateCheckFn.Invoke()); + } + if (linkState != LinkState.Available) { + HostedDebugLog.Fine(this, "Another module took the ownership on the link"); + yield break; + } + if (!stateCheckFn.Invoke()) { + HostedDebugLog.Warning( + this, "Part has changed while waiting for coupling: state={0}, parent={1}, coupleNode={2}, attachedPart={3}", + p.State, p.parent, coupleNode, coupleNode?.attachedPart); + yield break; } + yield return new WaitForEndOfFrame(); + HostedDebugLog.Fine(this, "Trigger coupling check: dependency={0}, reason={1}", p, reason); + CheckCoupleNode(); } #endregion } diff --git a/Source/modules/AbstractPipeRenderer.cs b/Source/modules/AbstractPipeRenderer.cs index 49cee4b44..1b39df39b 100644 --- a/Source/modules/AbstractPipeRenderer.cs +++ b/Source/modules/AbstractPipeRenderer.cs @@ -8,7 +8,6 @@ using KSPDev.DebugUtils; using KSPDev.LogUtils; using KSPDev.ModelUtils; -using KSPDev.PartUtils; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -25,7 +24,7 @@ public abstract class AbstractPipeRenderer : AbstractProceduralModel, #region Localizable GUI strings /// - public static readonly Message LinkCollidesWithObjectMsg = new Message( + static readonly Message LinkCollidesWithObjectMsg = new Message( "#kasLOC_07000", defaultTemplate: "Link collides with: <<1>>", description: "Message to display when the link cannot be created due to an obstacle." @@ -33,7 +32,7 @@ public abstract class AbstractPipeRenderer : AbstractProceduralModel, example: "Link collides with: Mk2 Cockpit"); /// - public static readonly Message LinkCollidesWithSurfaceMsg = new Message( + static readonly Message LinkCollidesWithSurfaceMsg = new Message( "#kasLOC_07001", defaultTemplate: "Link collides with the surface", description: "Message to display when the link strut orientation cannot be changed due to it" @@ -139,7 +138,7 @@ public enum PipeTextureRescaleMode { /// public virtual Color? colorOverride { - get { return _colorOverride; } + get => _colorOverride; set { _colorOverride = value; UpdateMaterialOverrides(); @@ -149,7 +148,7 @@ public virtual Color? colorOverride { /// public virtual string shaderNameOverride { - get { return _shaderNameOverride; } + get => _shaderNameOverride; set { _shaderNameOverride = value; UpdateMaterialOverrides(); @@ -159,7 +158,7 @@ public virtual string shaderNameOverride { /// public virtual bool isPhysicalCollider { - get { return _isPhysicalCollider; } + get => _isPhysicalCollider; set { _isPhysicalCollider = value; UpdateColliderOverrides(); @@ -254,6 +253,10 @@ public override void OnDebugAdjustablesUpdated() { #region ILinkRenderer implemetation /// public virtual void StartRenderer(Transform source, Transform target) { + if (source == null || target == null) { + HostedDebugLog.Error(this, "Cannot make renderer: source={0}, target={1}", source, target); + return; + } if (isStarted) { if (sourceTransform == source && targetTransform == target) { return; // NO-OP @@ -266,18 +269,16 @@ public virtual void StartRenderer(Transform source, Transform target) { targetPart = targetTransform.GetComponentInParent(); CreatePipeMesh(); - // Update the meshes on the source vessel. - PartModel.UpdateHighlighters(part); - sourceTransform.GetComponentsInChildren().ToList() - .ForEach(r => r.SetPropertyBlock(part.mpb)); - vessel.parts.ForEach(p => SetCollisionIgnores(p, true)); + // Update the meshes on the source vessel. + if (vessel != null) { + // Vessel can be NULL for the EVA dragged parts. + vessel.parts.ForEach(p => SetCollisionIgnores(p, true)); + } // Update the target vessel relations (if any). if (targetPart != null) { - PartModel.UpdateHighlighters(targetPart); - targetTransform.GetComponentsInChildren().ToList() - .ForEach(r => r.SetPropertyBlock(targetPart.mpb)); - if (targetPart.vessel != vessel) { + if (targetPart.vessel != null && targetPart.vessel != vessel) { + // Vessel can be NULL for the EVA dragged parts. targetPart.vessel.parts.ForEach(p => SetCollisionIgnores(p, true)); } } @@ -307,12 +308,11 @@ public virtual void StopRenderer() { } DestroyPipeMesh(); - PartModel.UpdateHighlighters(part); // Update the target vessel relations (if any). if (targetPart != null) { - PartModel.UpdateHighlighters(targetPart); - if (targetPart.vessel != vessel) { + if (targetPart.vessel != null && targetPart.vessel != vessel) { + // Vessel can be NULL for the EVA dragged parts. targetPart.vessel.parts .Where(p => p != null) // It's a cleanup method. .ToList() @@ -535,7 +535,7 @@ IEnumerator UpdateLinkCoroutine() { UpdateLink(); yield return null; } - // The coroutine is expected to be terminated explicitly! + // The coroutine is expected to be terminated explicitly before unlinking. HostedDebugLog.Warning(this, "Terminate coroutine on renderer stop!"); } #endregion diff --git a/Source/modules/KASInternalPhysicalConnector.cs b/Source/modules/KASInternalPhysicalConnector.cs index ea33e73a9..d8d3233dc 100644 --- a/Source/modules/KASInternalPhysicalConnector.cs +++ b/Source/modules/KASInternalPhysicalConnector.cs @@ -14,7 +14,7 @@ namespace KAS { /// /// /// This is an internal module. It must not be instantiated or accessed outside of the KAS -/// mod. The module must only be created thru the factory method. +/// mod. The module must only be created through the factory method. /// /// /// The promoted object becomes independent from the creator. When the module is destroyed, its @@ -25,7 +25,7 @@ namespace KAS { /// /// // ReSharper disable once InconsistentNaming -internal sealed class KASInternalPhysicalConnector : MonoBehaviour { +sealed class KASInternalPhysicalConnector : MonoBehaviour { #region Factory methods (static) /// Promotes the specified object into a physical connector object. /// @@ -35,6 +35,7 @@ internal sealed class KASInternalPhysicalConnector : MonoBehaviour { /// The part's module which will control the connector. /// The object to be promoted. /// + /// The KASInternalPhysicalConnector module that was created and added to the object. public static KASInternalPhysicalConnector Promote( PartModule ownerModule, GameObject obj, float interactionDistance = 0) { var connectorRb = obj.GetComponent() ?? obj.AddComponent(); @@ -42,8 +43,6 @@ public static KASInternalPhysicalConnector Promote( connectorRb.isKinematic = ownerModule.part.packed; connectorRb.velocity = ownerModule.part.rb.velocity; connectorRb.angularVelocity = ownerModule.part.rb.angularVelocity; - connectorRb.ResetInertiaTensor(); - connectorRb.ResetCenterOfMass(); var connectorModule = obj.AddComponent(); connectorModule.ownerModule = ownerModule; @@ -51,8 +50,7 @@ public static KASInternalPhysicalConnector Promote( if (interactionDistance > 0) { // This mesh is placed on a special layer which is not rendered in the game. It's only // used to detect the special zones triggers, so keep it simple. - var interactionTriggerObj = Meshes2.CreatePrimitive( - PrimitiveType.Cube, Vector3.one, null, obj.transform); + var interactionTriggerObj = Meshes.CreatePrimitive(PrimitiveType.Cube, Vector3.one, null, obj.transform); interactionTriggerObj.name = InteractionAreaCollider; var collider = interactionTriggerObj.AddComponent(); collider.isTrigger = true; @@ -145,8 +143,6 @@ void Awake() { var connectorObj = connectorRb.gameObject; var oldParent = connectorObj.transform.parent; connectorObj.transform.parent = null; - PartModel.UpdateHighlighters(oldParent); - PartModel.UpdateHighlighters(connectorObj.transform); if (connectorRb.isKinematic) { // The kinematic RB must be parented, or else it's considered static. connectorRb.transform.parent = ownerModule.gameObject.transform; @@ -163,7 +159,8 @@ void OnDestroy() { } void FixedUpdate() { - if (connectorRb != null && ownerModule != null && !connectorRb.isKinematic) { + // Vessel can be NULL for the EVA dragged parts. + if (connectorRb != null && ownerModule != null && ownerModule.vessel != null && !connectorRb.isKinematic) { KASAPI.PhysicsUtils.ApplyGravity(connectorRb, ownerModule.vessel); } } @@ -182,8 +179,6 @@ void CleanupModule(bool destroyImmediate = true) { // Bring the model back to the part or to the new host. var oldParent = gameObject.transform.parent; gameObject.transform.parent = Hierarchy.GetPartModelTransform(ownerModule.part); - PartModel.UpdateHighlighters(oldParent); - PartModel.UpdateHighlighters(ownerModule.part); } if (destroyImmediate) { DestroyImmediate(connectorRb); diff --git a/Source/modules/KASJointCableBase.cs b/Source/modules/KASJointCableBase.cs index 974ed1cf4..e0c482e4b 100644 --- a/Source/modules/KASJointCableBase.cs +++ b/Source/modules/KASJointCableBase.cs @@ -228,9 +228,7 @@ public override string GetModuleTitle() { #endregion #region Utility methods - /// - /// Creates a distance joint between the source and an arbitrary physical object. - /// + /// Creates a distance joint between the source and an arbitrary physical object. /// It sets the maximum cable length to the persisted value. Even if it's zero! /// The source of the link. /// The rigidbody of the physical object. diff --git a/Source/modules/KASJointRigid.cs b/Source/modules/KASJointRigid.cs index bb5b5b7d4..4a9eeb607 100644 --- a/Source/modules/KASJointRigid.cs +++ b/Source/modules/KASJointRigid.cs @@ -30,8 +30,7 @@ protected override void SetupPhysXJoints() { /// The created joint (if any) is populated to the hosting part. void MaybeCreateStockJoint() { if (linkTarget.part.attachJoint == null) { - HostedDebugLog.Fine( - this, "Create a stock joint between: {0} <=> {1}", linkSource, linkTarget); + HostedDebugLog.Fine(this, "Create a stock joint between: {0} <=> {1}", linkSource, linkTarget); linkTarget.part.CreateAttachJoint(AttachModes.STACK); } } @@ -39,11 +38,9 @@ void MaybeCreateStockJoint() { /// Creates a stock-alike joint between the unrelated parts. /// The physical joints will be controlled by the module. void CreateCustomJoint() { - HostedDebugLog.Fine( - this, "Create a stock-alike joint between: {0} <=> {1}", linkSource, linkTarget); - var stockJoint = PartJoint.Create(linkSource.part, linkTarget.part, - linkSource.coupleNode, linkTarget.coupleNode, - AttachModes.STACK); + HostedDebugLog.Fine(this, "Create a stock-alike joint between: {0} <=> {1}", linkSource, linkTarget); + var stockJoint = PartJoint.Create( + linkSource.part, linkTarget.part, linkSource.coupleNode, linkTarget.coupleNode, AttachModes.STACK); SetCustomJoints(stockJoint.joints.ToArray()); } #endregion diff --git a/Source/modules/KASLinkResourceConnector.cs b/Source/modules/KASLinkResourceConnector.cs index c180a1348..8bbc2d7ad 100644 --- a/Source/modules/KASLinkResourceConnector.cs +++ b/Source/modules/KASLinkResourceConnector.cs @@ -12,6 +12,8 @@ using KSPDev.ResourceUtils; using System.Collections.Generic; using System.Linq; +using KASAPIv2; +using KSP.UI; using UnityEngine; // ReSharper disable once CheckNamespace @@ -19,7 +21,7 @@ namespace KAS { /// Module which transfer resources between two linked vessels. /// -// Next localization ID: #kasLOC_12017 +// Next localization ID: #kasLOC_12018 [PersistentFieldsDatabase("KAS/settings/KASConfig")] // ReSharper disable once InconsistentNaming public sealed class KASLinkResourceConnector : KASLinkSourcePhysical, @@ -58,7 +60,7 @@ public sealed class KASLinkResourceConnector : KASLinkSourcePhysical, static readonly Message ResourceAmounts = new Message( "#kasLOC_12003", - defaultTemplate: "<<1>> / <<2>>", + defaultTemplate: "<<1>> / <<2>>", description: "The status string saying current and maximum amounts of the resource in the" + " vessel. The gui tags are suggested to define the minimum size of the text, to avoid" + " the dialog flickering when the resource is being transferred." @@ -152,9 +154,22 @@ public sealed class KASLinkResourceConnector : KASLinkSourcePhysical, defaultTemplate: "Not available in the docked mode", description: "The message to present in the transfer dialog when the parts are docked." + " Hence, the stock game functionality must be used to transfer the resources."); + + /// + static readonly Message NoResourcesFound = new Message( + "#kasLOC_12017", + defaultTemplate: "Not found any resources for transfer", + description: "The message to present when there are no resources that can be transferred in any direction between" + + " the vessels."); #endregion #region Part's config fields + // ReSharper disable MemberCanBePrivate.Global + // ReSharper disable CollectionNeverUpdated.Global + // ReSharper disable ClassNeverInstantiated.Global + // ReSharper disable ConvertToConstant.Global + // ReSharper disable FieldCanBeMadeReadOnly.Global + /// The maximum allowed speed of transferring a resource. /// [KSPField] @@ -191,12 +206,12 @@ public sealed class KASLinkResourceConnector : KASLinkSourcePhysical, /// beyond this list will be ignored. /// /// - /// is ignored when the allowed resources list is set. + /// is ignored when the allowed resources list is set. /// /// [PersistentField("allowedResource", isCollection = true, group = StdPersistentGroups.PartConfigLoadGroup)] - public List allowedResource = new List(); + public List allowedResources = new List(); /// /// The list of the resources that will be forcibly allowed or disallowed for the transfer via @@ -222,19 +237,17 @@ public sealed class KASLinkResourceConnector : KASLinkSourcePhysical, /// disallow a resource, add a negative override: -LiquidFuel. /// /// - /// + /// /// [PersistentField("resourceOverride", isCollection = true, group = StdPersistentGroups.PartConfigLoadGroup)] - public List resourceOverride = new List(); + public List resourceOverrides = new List(); /// Container for the fuel mixture component. // ReSharper disable once ClassNeverInstantiated.Global public class FuelMixtureComponent { /// Name of the resource. [PersistentField("name")] - // ReSharper disable once FieldCanBeMadeReadOnly.Global - // ReSharper disable once ConvertToConstant.Global public string name = ""; /// @@ -242,18 +255,13 @@ public class FuelMixtureComponent { /// 1.0 to get the percentage. /// [PersistentField("ratio")] - // ReSharper disable once FieldCanBeMadeReadOnly.Global - // ReSharper disable once ConvertToConstant.Global - public double ratio; + public double ratio = 0.0; } /// Container for the fuel mixture. - // ReSharper disable once ClassNeverInstantiated.Global public class FuelMixture { /// The mixture components. [PersistentField("component", isCollection = true)] - // ReSharper disable once CollectionNeverUpdated.Global - // ReSharper disable once FieldCanBeMadeReadOnly.Global public List components = new List(); } @@ -264,6 +272,25 @@ public class FuelMixture { /// [PersistentField("RTS/fuelMixture", isCollection = true)] public List fuelMixtures = new List(); + + // ReSharper restore MemberCanBePrivate.Global + // ReSharper restore CollectionNeverUpdated.Global + // ReSharper restore ClassNeverInstantiated.Global + // ReSharper restore ConvertToConstant.Global + // ReSharper restore FieldCanBeMadeReadOnly.Global + #endregion + + #region Configuration settings + // ReSharper disable FieldCanBeMadeReadOnly.Local + // ReSharper disable ConvertToConstant.Local + + /// Tells if the control hints should be shown in the transfer dialog. + /// + [PersistentField("RTS/showTransferDialogHints", group = StdPersistentGroups.Default)] + bool _showTransferDialogHints = true; + + // ReSharper enable FieldCanBeMadeReadOnly.Local + // ReSharper enable ConvertToConstant.Local #endregion #region Context menu events/actions @@ -274,8 +301,8 @@ public class FuelMixture { defaultTemplate = "Open GUI", description = "The context menu event that opens the resources transfer GUI.")] public void OpenGuiEvent() { - if (isLinked && !_isGuiOpen) { - _isGuiOpen = true; + if (isLinked && !isGuiOpen) { + isGuiOpen = true; SetPendingTransferOption(null); _resourceListNeedsUpdate = true; MaybeUpdateResourceOptionList(); @@ -287,25 +314,35 @@ public void OpenGuiEvent() { /// Actual screen position of the console window. Rect _windowRect = new Rect(100, 100, 1, 1); - /// A title bar location. - readonly Rect _titleBarRect = new Rect(0, 0, 10000, 20); - /// A list of actions to apply at the end of the GUI frame. readonly GuiActionsList _guiActions = new GuiActionsList(); - /// Style to draw a control of the minimum size. - static readonly GUILayoutOption MinSizeLayout = GUILayout.ExpandWidth(false); - /// Tells if GUI is open. + bool isGuiOpen { + get => _isGuiOpen; + set { + if (value) { + UpdateResourcesTransferGui(force: true); + } + _isGuiOpen = value; + } + } bool _isGuiOpen; /// GUI table to align resource names and quantities. /// Left Name + Left Amount + Right Amount + Right Name - readonly GUILayoutStringTable _guiResourcesTable = new GUILayoutStringTable(4); + readonly GUILayoutStringTable _guiResourcesTable = new GUILayoutStringTable(4, keepMaxSize: true); /// Definition of all the resources for the both linked vessels. ResourceTransferOption[] _resourceRows = new ResourceTransferOption[0]; + /// List of resources that can actually be transferred in any direction. + /// + /// It's derived from and only have rows where both sides of the link have non zero + /// capacity for the resource. + /// + ResourceTransferOption[] _canTransferResources = new ResourceTransferOption[0]; + /// Index of the vessels resources. Dictionary _resourceRowsHash = new Dictionary(); @@ -334,6 +371,9 @@ public void OpenGuiEvent() { /// The timeout to update the resources counters in GUI in seconds. /// It's a performance affecting settings. const float TransferStateUpdatePeriod = 0.1f; + + /// The controller of the game's UI scale. + GuiScale _guiScale; #endregion #region Cached values @@ -347,8 +387,6 @@ public void OpenGuiEvent() { #region GUI styles & contents GUIStyle _guiNoWrapCenteredStyle; - GUIStyle _guiResourceStyle; - GUIStyle _guiTransferBtnStyle; GUIContent _autoScaleToggleCnt; GUIContent _leftToRightToggleCnt; GUIContent _leftToRightButtonCnt; @@ -371,31 +409,33 @@ class ResourceTransferOption { public bool canMoveRightToLeft; public bool canMoveLeftToRight; + public bool leftHasCapacity; + public bool rightHasCapacity; public double previousUpdate; readonly int _hashCode; public bool leftToRightTransferToggle { - get { return _leftToRightTransferToggle; } - set { UpdateTransferTriggerFlag(ref _leftToRightTransferToggle, value); } + get => _leftToRightTransferToggle; + set => UpdateTransferTriggerFlag(ref _leftToRightTransferToggle, value); } bool _leftToRightTransferToggle; public bool leftToRightTransferPress { - get { return _leftToRightTransferPress; } - set { UpdateTransferTriggerFlag(ref _leftToRightTransferPress, value); } + get => _leftToRightTransferPress; + set => UpdateTransferTriggerFlag(ref _leftToRightTransferPress, value); } bool _leftToRightTransferPress; public bool rightToLeftTransferToggle { - get { return _rightToLeftTransferToggle; } - set { UpdateTransferTriggerFlag(ref _rightToLeftTransferToggle, value); } + get => _rightToLeftTransferToggle; + set => UpdateTransferTriggerFlag(ref _rightToLeftTransferToggle, value); } bool _rightToLeftTransferToggle; public bool rightToLeftTransferPress { - get { return _rightToLeftTransferPress; } - set { UpdateTransferTriggerFlag(ref _rightToLeftTransferPress, value); } + get => _rightToLeftTransferPress; + set => UpdateTransferTriggerFlag(ref _rightToLeftTransferPress, value); } bool _rightToLeftTransferPress; @@ -466,6 +506,13 @@ void UpdateTransferTriggerFlag(ref bool property, bool newValue) { /// public override void OnAwake() { base.OnAwake(); + _guiScale = new GuiScale( + getPivotFn: () => new Vector2(_windowRect.x, _windowRect.y), onScaleUpdatedFn: MakeGuiStyles); + } + + /// + public override void OnStart(StartState state) { + base.OnStart(state); RegisterGameEventListener(GameEvents.onVesselWasModified, OnVesselUpdated); RegisterGameEventListener(GameEvents.onVesselDestroy, OnVesselUpdated); RegisterGameEventListener(GameEvents.onVesselCreate, OnVesselUpdated); @@ -483,8 +530,7 @@ public override void OnUpdate() { base.OnUpdate(); if (_rotatingCylinder != null) { if (cableJoint.realCableLength > float.Epsilon) { - var angle = 360.0f - * (cableJoint.realCableLength % cylinderPerimeterLength) / cylinderPerimeterLength; + var angle = 360.0f * (cableJoint.realCableLength % cylinderPerimeterLength) / cylinderPerimeterLength; _rotatingCylinder.localRotation = Quaternion.Euler(angle, 0, 0); } } @@ -512,10 +558,17 @@ public override void UpdateContextMenu() { base.UpdateContextMenu(); PartModuleUtils.SetupEvent(this, OpenGuiEvent, e => { - e.active = linkTarget != null && linkTarget.part != null && !linkTarget.part.vessel.isEVA; + e.active = linkTarget != null && linkTarget.part != null + && linkTarget.part.vessel != null && !linkTarget.part.vessel.isEVA; }); } + /// + protected override void LogicalLink(ILinkTarget target) { + base.LogicalLink(target); + _guiResourcesTable.ResetMaxSizes(); + } + /// protected override void PhysicalLink() { base.PhysicalLink(); @@ -526,11 +579,12 @@ protected override void PhysicalLink() { #region IHasGUI implementation /// public void OnGUI() { - _isGuiOpen &= linkTarget != null; - if (Time.timeScale <= float.Epsilon) { - return; // No events and menu in the paused mode. + isGuiOpen &= linkTarget != null && !linkTarget.part.isVesselEVA; + if (!isGuiOpen || Time.timeScale <= float.Epsilon || !UIMasterController.Instance.IsUIShowing) { + return; } - if (_isGuiOpen) { + using (new GuiMatrixScope()) { + _guiScale.UpdateMatrix(); _windowRect = GUILayout.Window( GetInstanceID(), _windowRect, TransferResourcesWindowFunc, WindowTitleTxt, GUILayout.MaxHeight(1), GUILayout.MaxWidth(1)); @@ -539,21 +593,20 @@ public void OnGUI() { #endregion #region GUI methods + /// The GUI tooltip control. Only used in the method. + readonly GuiTooltip _tooltip = new(); + /// Shows a window that displays the resource transfer controls. /// Window ID. void TransferResourcesWindowFunc(int windowId) { - // Allow the window to be dragged by its title bar. - GuiWindow.DragWindow(ref _windowRect, _titleBarRect); - - MakeGuiStyles(); - // In the docked mode the players must use the stock transfer mechanism. if (vessel == linkTarget.part.vessel) { - GUILayout.Label(NotAvailableInDockedMode, new GUIStyle(GUI.skin.label) { wordWrap = false }); - if (GUILayout.Button(CloseDialogBtn, MinSizeLayout)) { - _isGuiOpen = false; + GUILayout.Label(NotAvailableInDockedMode, _guiNoWrapCenteredStyle); + if (GUILayout.Button(CloseDialogBtn)) { + isGuiOpen = false; } SetPendingTransferOption(null); // Cancel all transfers. + GUI.DragWindow(); return; } @@ -567,37 +620,46 @@ void TransferResourcesWindowFunc(int windowId) { } UpdateResourcesTransferGui(); } - - GUILayout.Label(OwnerVesselTxt.Format(vessel.vesselName), GUI.skin.box); - GUILayout.Label(ConnectedVesselTxt.Format(linkTarget.part.vessel.vesselName), GUI.skin.box); - for (var i = _resourceRows.Length - 1; i >= 0; i--) { + + GUILayout.Label(OwnerVesselTxt.Format(vessel.vesselName), _guiNoWrapCenteredStyle); + GUILayout.Label(ConnectedVesselTxt.Format(linkTarget.part.vessel.vesselName), _guiNoWrapCenteredStyle); + + // No resources, no transfer. + if (_canTransferResources.Length == 0) { + GUILayout.Label(NoResourcesFound, _guiNoWrapCenteredStyle); + if (GUILayout.Button(CloseDialogBtn)) { + // GuiActions.Add(() => _isGuiOpen = false); + isGuiOpen = false; + } + SetPendingTransferOption(null); // Cancel all transfers. + GUI.DragWindow(); + return; + } + + for (var i = _canTransferResources.Length - 1; i >= 0; i--) { var row = _resourceRows[i]; _guiResourcesTable.StartNewRow(); using (new GUILayout.HorizontalScope()) { - _guiResourcesTable.AddTextColumn( - row.caption, _guiResourceStyle, minWidth: ResourceName.guiTags.minWidth); - _guiResourcesTable.AddTextColumn( - row.leftInfo, _guiNoWrapCenteredStyle, minWidth: ResourceAmounts.guiTags.minWidth); + _guiResourcesTable.AddTextColumn(row.caption, _guiNoWrapCenteredStyle); + _guiResourcesTable.AddTextColumn(row.leftInfo, _guiNoWrapCenteredStyle); using (new GuiEnabledStateScope(row.canMoveRightToLeft)) { row.rightToLeftTransferToggle = GUILayoutButtons.Toggle( - row.rightToLeftTransferToggle, _leftToRightToggleCnt, _guiTransferBtnStyle, null, + row.rightToLeftTransferToggle, _leftToRightToggleCnt, GUI.skin.button, null, GuiActionUpdateTransferItem, GuiActionUpdateTransferItem, _guiActions); row.rightToLeftTransferPress = GUILayoutButtons.Push( - row.rightToLeftTransferPress, _leftToRightButtonCnt, _guiTransferBtnStyle, null, + row.rightToLeftTransferPress, _leftToRightButtonCnt, GUI.skin.button, null, GuiActionUpdateTransferItem, GuiActionUpdateTransferItem, _guiActions); } using (new GuiEnabledStateScope(row.canMoveLeftToRight)) { row.leftToRightTransferPress = GUILayoutButtons.Push( - row.leftToRightTransferPress, _rightToLeftButtonCnt, _guiTransferBtnStyle, null, + row.leftToRightTransferPress, _rightToLeftButtonCnt, GUI.skin.button, null, GuiActionUpdateTransferItem, GuiActionUpdateTransferItem, _guiActions); row.leftToRightTransferToggle = GUILayoutButtons.Toggle( - row.leftToRightTransferToggle, _rightToLeftToggleCnt, _guiTransferBtnStyle, null, + row.leftToRightTransferToggle, _rightToLeftToggleCnt, GUI.skin.button, null, GuiActionUpdateTransferItem, GuiActionUpdateTransferItem, _guiActions); } - _guiResourcesTable.AddTextColumn( - row.rightInfo, _guiNoWrapCenteredStyle, minWidth: ResourceAmounts.guiTags.minWidth); - _guiResourcesTable.AddTextColumn( - row.caption, _guiResourceStyle, minWidth: ResourceName.guiTags.minWidth); + _guiResourcesTable.AddTextColumn(row.rightInfo, _guiNoWrapCenteredStyle); + _guiResourcesTable.AddTextColumn(row.caption, _guiNoWrapCenteredStyle); } } @@ -613,13 +675,13 @@ void TransferResourcesWindowFunc(int windowId) { } GUILayout.Label(TransferSpeedTxt.Format(_transferSpeed)); - using (new GUILayout.HorizontalScope()) { - if (GUILayout.Button(CloseDialogBtn, MinSizeLayout)) { - _guiActions.Add(() => _isGuiOpen = false); - } - GUILayout.Label(""); - GUI.Label(GUILayoutUtility.GetLastRect(), GUI.tooltip); + if (GUILayout.Button(CloseDialogBtn)) { + _guiActions.Add(() => isGuiOpen = false); + } + if (_showTransferDialogHints) { + _tooltip.Update(); } + GUI.DragWindow(); } /// Finds the currently active option and makes it active. @@ -631,19 +693,15 @@ void GuiActionUpdateTransferItem() { MaybeAutoScaleSpeed(); } - /// Creates the styles. Only does it once. + /// Creates the styles when the scale changes or initializes. void MakeGuiStyles() { - if (_guiNoWrapCenteredStyle != null) { - return; - } - _guiNoWrapCenteredStyle = new GUIStyle(GUI.skin.box) { + var skin = GUI.skin; + _guiResourcesTable.ResetMaxSizes(); + _guiNoWrapCenteredStyle = new GUIStyle(skin.box) { wordWrap = false, - alignment = TextAnchor.MiddleCenter - }; - _guiResourceStyle = new GUIStyle(_guiNoWrapCenteredStyle); - _guiTransferBtnStyle = new GUIStyle(GUI.skin.button) { alignment = TextAnchor.MiddleCenter, - stretchHeight = true + margin = skin.button.margin, + padding = skin.button.padding, }; } #endregion @@ -661,7 +719,6 @@ void MaybeAutoScaleSpeed() { var maxUnscaledAmount = double.PositiveInfinity; for (var i = _pendingOption.resources.Length - 1; i >= 0; i--) { var unit = _pendingOption.resourceRatios[i]; - var resource = _pendingOption.resources[i]; var amount = _currentFromPartAmounts[i] / unit; if (amount < maxUnscaledAmount) { maxUnscaledAmount = amount; @@ -727,10 +784,10 @@ bool DoTransfer() { /// Updates GUI for all the resources. /// - /// To not waste too much CPU, this method opdates by timer. However, when an instant update is + /// To not waste too much CPU, this method updates by timer. However, when an instant update is /// needed, it can be requested via the parameter. /// - /// Tells if GUI must be upadted regardless to the timer. + /// Tells if GUI must be updated regardless to the timer. void UpdateResourcesTransferGui(bool force = false) { if (!force && Time.unscaledTime - _lastResourcesGuiUpdate < TransferStateUpdatePeriod) { return; @@ -739,6 +796,8 @@ void UpdateResourcesTransferGui(bool force = false) { for (var i = _resourceRows.Length - 1; i >= 0; i--) { UpdateOptionTransferGui(_resourceRows[i]); } + _canTransferResources = + _resourceRows.Where(r => r.leftHasCapacity && r.rightHasCapacity).ToArray(); } /// Updates the resources amounts and the transfer states in GUI. @@ -749,10 +808,13 @@ void UpdateOptionTransferGui(ResourceTransferOption resOption) { var rightInfoString = ""; resOption.canMoveRightToLeft = true; resOption.canMoveLeftToRight = true; + var leftCapacity = 0.0; + var rightCapacity = 0.0; for (var i = 0; i < resOption.resources.Length; i++) { part.GetConnectedResourceTotals( resOption.resources[i], ResourceFlowMode.ALL_VESSEL_BALANCE, out resOption.leftAmounts[i], out resOption.leftCapacities[i]); + leftCapacity += resOption.leftCapacities[i]; leftInfoString += (i > 0 ? "\n" : "") + CompactNumberType.Format(resOption.leftAmounts[i]) + " / " @@ -760,6 +822,7 @@ void UpdateOptionTransferGui(ResourceTransferOption resOption) { linkTarget.part.GetConnectedResourceTotals( resOption.resources[i], ResourceFlowMode.ALL_VESSEL_BALANCE, out resOption.rightAmounts[i], out resOption.rightCapacities[i]); + rightCapacity += resOption.rightCapacities[i]; rightInfoString += (i > 0 ? "\n" : "") + CompactNumberType.Format(resOption.rightAmounts[i]) + " / " @@ -773,6 +836,8 @@ void UpdateOptionTransferGui(ResourceTransferOption resOption) { resOption.canMoveLeftToRight = false; } } + resOption.leftHasCapacity = leftCapacity >= double.Epsilon; + resOption.rightHasCapacity = rightCapacity >= double.Epsilon; resOption.leftInfo.text = leftInfoString; resOption.rightInfo.text = rightInfoString; } @@ -803,18 +868,18 @@ void MaybeUpdateResourceOptionList() { .ToList(); // Find the predefined resources that the part can pump between the vessels. - var allowedResourceIds = allowedResource - .Select(x => StockResourceNames.GetId(x)) + var allowedResourceIds = allowedResources + .Select(StockResourceNames.GetId) .ToArray(); if (allowedResourceIds.Length == 0) { // If no specific resources set, then allow all the vessel resources that are material and // not restricted for pumping. Allow overriding to include/exclude a specific resource. - var overrideEnabled = resourceOverride + var overrideEnabled = resourceOverrides .Where(x => x.Length > 0 && x[0] == '+') .Select(x => StockResourceNames.GetId(x.Substring(1))) .ToArray(); - var overrideDisabled = resourceOverride + var overrideDisabled = resourceOverrides .Where(x => x.Length > 0 && x[0] == '-') .Select(x => StockResourceNames.GetId(x.Substring(1))); var nonMovableIds = PartResourceLibrary.Instance.resourceDefinitions @@ -858,8 +923,8 @@ void MaybeUpdateResourceOptionList() { /// Sets the currently transferring option. Erasing the previous one. /// The new option or null. void SetPendingTransferOption(ResourceTransferOption newOption) { - if (newOption != _pendingOption && _pendingOption != null) { - _pendingOption.StopAllTransfers(); + if (newOption != _pendingOption) { + _pendingOption?.StopAllTransfers(); } _pendingOption = newOption; if (_pendingOption == null && _autoScaleSpeed) { diff --git a/Source/modules/KASLinkSourceBase.cs b/Source/modules/KASLinkSourceBase.cs index 6ea8dec73..a8952e03a 100644 --- a/Source/modules/KASLinkSourceBase.cs +++ b/Source/modules/KASLinkSourceBase.cs @@ -14,7 +14,6 @@ using System.Text; using UnityEngine; -// ReSharper disable InheritdocInvalidUsage // ReSharper disable once CheckNamespace namespace KAS { @@ -31,7 +30,7 @@ namespace KAS { /// KSP: IActivateOnDecouple /// /// -// Next localization ID: #kasLOC_02009. +// Next localization ID: #kasLOC_02011. // TODO(ihsoft): Handle KIS actions. // TODO(ihsoft): Handle part staged action. // ReSharper disable once InconsistentNaming @@ -41,7 +40,7 @@ public class KASLinkSourceBase : AbstractLinkPeer, // KAS interfaces. ILinkSource, // KSPDev syntax sugar interfaces. - IsPartDeathListener, IKSPDevModuleInfo, IHasContextMenu { + IKSPDevModuleInfo, IHasContextMenu { #region Localizable GUI strings /// @@ -105,6 +104,27 @@ public class KASLinkSourceBase : AbstractLinkPeer, defaultTemplate: "Target cannot couple", description: "Message to display when the target is refusing to couple (dock) with the link" + " source."); + + /// + static readonly Message EvaActionBrokeLinkMsg = new Message( + "#kasLOC_02009", + defaultTemplate: "Unlinking due to the EVA construction action", + description: "Message to display when a linked part becomes a target to EVA construction move or detach" + + " operation."); + + /// + static readonly Message CannotLinkInEvaConstructionModeMsg = new Message( + "#kasLOC_02010", + defaultTemplate: "Interactive links are not allowed in the EVA construction mode", + description: "Message to display when an interactive link mode is being enabled while the stock EVA construction" + + " mode is active. In this mode the KAS interactive links are completely disabled to not interfere with the" + + " stock game functionality."); + #endregion + + #region Constants and inheratable fields + /// Path to the sound that indicates the link was broken forcibly (for any reason). + /// TODO(IgorZ): Move to the common config. + protected const string SoundLinkForceBroken = "KAS/Sounds/broke"; #endregion #region ILinkSource properties implementation @@ -271,6 +291,17 @@ public override void OnStart(StartState state) { InitStartState(); RegisterGameEventListener(GameEvents.onPartDeCoupleComplete, OnPartDeCoupleCompleteEvent); } + /// + public override void OnStartFinished(StartState state) { + base.OnStartFinished(state); + if (isLinked && !linkJoint.isLinked) { + if (linkJoint.CreateJoint(this, linkTarget)) { + HostedDebugLog.Info(this, "Restored joint with {0}", linkTarget); + } else { + HostedDebugLog.Info(this, "Cannot restore joint with {0}", linkTarget); + } + } + } /// public override void OnInitialize() { @@ -349,67 +380,63 @@ protected override void RestoreOtherPeer() { /// protected override void CheckCoupleNode() { base.CheckCoupleNode(); + + // Handle a case when this source doesn't want to couple with the child. if (coupleNode == null) { - // If the part doesn't want to couple, then we should obey. if (parsedAttachNode.attachedPart != null) { - HostedDebugLog.Error( - this, "Cannot maintain coupling with: {0}", parsedAttachNode.attachedPart); + HostedDebugLog.Error(this, "Cannot maintain coupling with: {0}", parsedAttachNode.attachedPart); if (linkState == LinkState.Available) { AsyncCall.CallOnEndOfFrame(this, () => { if (parsedAttachNode.attachedPart) { - HostedDebugLog.Info( - this, "Decoupling incompatible part: {0}", parsedAttachNode.attachedPart); + HostedDebugLog.Info(this, "Decoupling incompatible part: {0}", parsedAttachNode.attachedPart); parsedAttachNode.attachedPart.decouple(); + UpdateContextMenu(); } }); } else if (linkState == LinkState.Linked && linkTarget != null) { HostedDebugLog.Warning(this, "Breaking the link to: {0}", linkTarget); - AsyncCall.CallOnEndOfFrame(this, () => BreakCurrentLink(LinkActorType.API)); + AsyncCall.CallOnEndOfFrame(this, () => { + BreakCurrentLink(LinkActorType.API); + UpdateContextMenu(); + }); } else { AsyncCall.CallOnEndOfFrame(this, () => { if (parsedAttachNode.attachedPart) { - HostedDebugLog.Error( - this, "Cannot pickup coupling in unexpected link state: {0}", linkState); + HostedDebugLog.Error(this, "Cannot pickup coupling in unexpected link state: {0}", linkState); parsedAttachNode.attachedPart.decouple(); + UpdateContextMenu(); } }); } } return; } - if (linkState == LinkState.Available && coupleNode != null && coupleNode.attachedPart != null) { - var target = coupleNode.attachedPart.Modules + + // Handle the case when a part is attached externally. + if (linkState == LinkState.Available && coupleNode?.attachedPart != null) { + // Try all the possible targets on the other part to make the link. + var targets = coupleNode.attachedPart.Modules .OfType() - .FirstOrDefault(t => t.cfgLinkType == cfgLinkType && t.linkState == LinkState.Available - && t.coupleNode != null && t.coupleNode.attachedPart == part - && CheckCanLinkTo(t)); - if (target != null) { - HostedDebugLog.Fine(this, "Linking with the pre-attached part: {0}", target); - LinkToTarget(LinkActorType.API, target); - } - if (!isLinked) { - // Let the other part a chance to couple, and block if it didn't succeed. - HostedDebugLog.Fine(this, "Cannot link, wait for the other part: target={0}", - coupleNode.attachedPart); - AsyncCall.CallOnEndOfFrame(this, () => { - if (linkState == LinkState.Available && coupleNode.attachedPart != null) { - HostedDebugLog.Warning(this, "Cannot link to the pre-attached part: from={0}, to={1}", - KASAPI.AttachNodesUtils.NodeId(coupleNode), - KASAPI.AttachNodesUtils.NodeId(coupleNode.FindOpposingNode())); - SetLinkState(LinkState.NodeIsBlocked); - } - }); + .Where(t => t.coupleNode?.attachedPart == part && CheckCanLinkTo(t, reportToLog: false)); + foreach (var target in targets) { + if (LinkToTarget(LinkActorType.API, target)) { + HostedDebugLog.Info(this, "Restored the link with the externally attached part: {0}", target); + break; + } + HostedDebugLog.Warning(this, "The link attempt has been rejected: {0}", target); } - } else if (linkState == LinkState.NodeIsBlocked && parsedAttachNode.attachedPart == null) { - SetLinkState(LinkState.Available); + AsyncCall.CallOnEndOfFrame(this, () => { + if (linkState == LinkState.Available && coupleNode?.attachedPart != null) { + HostedDebugLog.Warning(this, "Cannot link to the pre-attached part: from={0}, to={1}", + KASAPI.AttachNodesUtils.NodeId(coupleNode), + KASAPI.AttachNodesUtils.NodeId(coupleNode.FindOpposingNode())); + SetLinkState(LinkState.NodeIsBlocked); + UpdateContextMenu(); + } + }); } - // Restore the link state if not yet done. - if (isLinked && !linkJoint.isLinked) { - linkJoint.CreateJoint(this, linkTarget); - } - - UpdateContextMenu(); // To update the dock/undock menu. + UpdateContextMenu(); } /// @@ -484,7 +511,7 @@ public override void OnDebugAdjustablesUpdated() { #region IsPartDeathListener implementation /// - public virtual void OnPartDie() { + public override void OnPartDie() { if (isLinked) { HostedDebugLog.Info(this, "Part has died. Drop the link to: {0}", linkTarget); BreakCurrentLink(LinkActorType.Physics); @@ -522,6 +549,12 @@ public virtual string GetPrimaryField() { #region ILinkSource implementation /// public virtual bool StartLinking(GUILinkMode mode, LinkActorType actor) { + if (mode == GUILinkMode.Interactive && EVAConstructionModeController.Instance.IsOpen) { + ShowStatusMessage(CannotLinkInEvaConstructionModeMsg, isError: true); + HostedDebugLog.Warning(this, "Cannot make interactive links in the EVA construction mode"); + UISoundPlayer.instance.Play(KASAPI.CommonConfig.sndPathBipWrong); + return false; + } if (!linkStateMachine.CheckCanSwitchTo(LinkState.Linking)) { if (actor == LinkActorType.Player) { ShowStatusMessage(SourceIsNotAvailableForLinkMsg, isError: true); @@ -720,6 +753,17 @@ protected virtual string[] CheckBasicLinkConditions(ILinkTarget target, bool che } return errors.ToArray(); } + + /// + protected override void OnPeerManipulatedInEva(ILinkPeer target) { + base.OnPeerManipulatedInEva(target); + if (isLinked) { + HostedDebugLog.Info(this, "Unlinking from {0} due EVA construction action: target={1}", otherPeer, target); + ShowStatusMessage(EvaActionBrokeLinkMsg, isError: true); + UISoundPlayer.instance.Play(SoundLinkForceBroken); + BreakCurrentLink(LinkActorType.API); + } + } #endregion #region KASEvents listeners @@ -749,12 +793,13 @@ void OnStopLinkingKASEvent(ILinkSource source) { /// This event can get called from the physics callbacks. /// The vessel that is being destroyed. void OnVesselWillDestroyGameEvent(Vessel targetVessel) { - if (isLinked && vessel != linkTarget.part.vessel - && (targetVessel == vessel || targetVessel == linkTarget.part.vessel)) { - HostedDebugLog.Info( - this, "Drop the link due to the peer vessel destruction: {0}", targetVessel); - BreakCurrentLink(LinkActorType.Physics); + if (!isLinked || vessel == linkTarget.part.vessel + || (targetVessel != vessel && targetVessel != linkTarget.part.vessel)) { + return; // Nothing to do. } + HostedDebugLog.Info( + this, "Drop the link due to the peer vessel destruction: {0}", targetVessel); + BreakCurrentLink(LinkActorType.Physics); } /// Loads the state that should be processed after all the modules are created. diff --git a/Source/modules/KASLinkSourcePhysical.cs b/Source/modules/KASLinkSourcePhysical.cs index e6864bbdb..ed8832cff 100644 --- a/Source/modules/KASLinkSourcePhysical.cs +++ b/Source/modules/KASLinkSourcePhysical.cs @@ -113,6 +113,12 @@ public class KASLinkSourcePhysical : KASLinkSourceBase { [Debug.KASDebugAdjustable("Connector mass")] public float connectorMass = 0.01f; + /// Center of mass of the connector object. + /// + [KSPField] + [Debug.KASDebugAdjustable("Connector CoM")] + public Vector3 connectorCenterOfMass = Vector3.zero; + /// Maximum distance at which an EVA kerbal can pickup a dropped connector. /// [KSPField] @@ -242,8 +248,7 @@ public virtual void ReturnConnectorEvent() { && linkTarget != null && linkTarget.part.vessel == FlightGlobals.ActiveVessel) { BreakCurrentLink(LinkActorType.Player); SetConnectorState(ConnectorState.Locked); - HostedDebugLog.Info( - this, "{0} has returned the winch connector", FlightGlobals.ActiveVessel.vesselName); + HostedDebugLog.Info(this, "{0} has returned the winch connector", FlightGlobals.ActiveVessel.vesselName); } } @@ -397,6 +402,9 @@ public override void OnBeforeDebugAdjustablesUpdate() { /// public override void OnDebugAdjustablesUpdated() { base.OnDebugAdjustablesUpdated(); + if (connectorObj != null && connectorObj.GetComponent() != null) { + connectorObj.GetComponent().centerOfMass = connectorCenterOfMass; + } AsyncCall.CallOnEndOfFrame( this, () => { @@ -432,6 +440,13 @@ public override void OnAwake() { RegisterGameEventListener(GameEvents.onVesselChange, OnVesselChange); } + /// + public override void OnStartFinished(StartState state) { + base.OnStartFinished(state); + if (HighLogic.LoadedSceneIsEditor) { + SetConnectorState(ConnectorState.Locked); + } + } /// protected override void CheckSettingsConsistency() { if (!allowCoupling) { @@ -470,6 +485,13 @@ public override void OnPartUnpack() { SetConnectorState(connectorState); } + /// + protected override void OnEvaPartLoaded() { + base.OnEvaPartLoaded(); + persistedIsConnectorLocked = true; + persistedConnectorPosAndRot = null; + } + /// protected override void RestoreOtherPeer() { base.RestoreOtherPeer(); @@ -479,17 +501,6 @@ protected override void RestoreOtherPeer() { } } - /// - public override void OnPartDie() { - base.OnPartDie(); - // Make sure the connector is locked into the winch to not leave it behind. - if (connectorObj != null) { - // Don't relay on the connector state machine, it will try to destroy immediately. - KASInternalPhysicalConnector.Demote(connectorObj.gameObject, true); - } - SetConnectorState(ConnectorState.Locked); - } - /// protected override void SetupStateMachine() { base.SetupStateMachine(); @@ -509,14 +520,15 @@ protected override void SetupStateMachine() { linkStateMachine.AddStateHandlers( LinkState.NodeIsBlocked, enterHandler: oldState => { - if (decoupleIncompatibleTargets - && coupleNode != null && coupleNode.attachedPart != null) { + if (decoupleIncompatibleTargets && coupleNode?.attachedPart != null) { HostedDebugLog.Warning(this, "Decouple incompatible part from the node: {0}", coupleNode.FindOpposingNode().attachedPart); UISoundPlayer.instance.Play(KASAPI.CommonConfig.sndPathBipWrong); - ShowStatusMessage( - CannotLinkToPreAttached.Format(coupleNode.attachedPart), isError: true); + ShowStatusMessage(CannotLinkToPreAttached.Format(coupleNode.attachedPart), isError: true); KASAPI.LinkUtils.DecoupleParts(part, coupleNode.attachedPart); + if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.evaController != null) { + FlightGlobals.ActiveVessel.evaController.InterruptWeld(); // In case of it was the stock EVA action. + } } }, callOnShutdown: false); @@ -527,7 +539,7 @@ protected override void SetupStateMachine() { connectorStateMachine.onAfterTransition += (start, end) => { if (end != null) { // Do nothing on state machine shutdown. persistedIsConnectorLocked = isConnectorLocked; - if (end == ConnectorState.Locked) { + if (end == ConnectorState.Locked && !isAutoAttachNode) { KASAPI.AttachNodesUtils.AddNode(part, coupleNode); } else if (coupleNode.attachedPart == null) { KASAPI.AttachNodesUtils.DropNode(part, coupleNode); @@ -577,6 +589,7 @@ protected override void SetupStateMachine() { enterHandler: oldState => { SaveConnectorModelPosAndRot(); cableJoint.SetLockedOnCouple(true); + linkRenderer.StopRenderer(); // Align the docking part to the nodes if it's a separate vessel. if (oldState.HasValue && linkTarget.part.vessel != vessel) { @@ -587,6 +600,9 @@ protected override void SetupStateMachine() { }, leaveHandler: newState => { cableJoint.SetLockedOnCouple(false); + if (linkTarget != null) { + linkRenderer.StartRenderer(nodeTransform, linkTarget.nodeTransform); + } SaveConnectorModelPosAndRot(saveNonPhysical: newState == ConnectorState.Deployed); linkJoint.SetCoupleOnLinkMode(false); }, @@ -601,7 +617,7 @@ protected override void SetupStateMachine() { ConnectorState.Deployed, enterHandler: oldState => StartPhysicsOnConnector(), leaveHandler: newState => StopPhysicsOnConnector(), - callOnShutdown: false); + callOnShutdown: true); } /// @@ -610,6 +626,15 @@ protected override void ShutdownStateMachine() { connectorStateMachine.currentState = null; } + /// + protected override void OnPeerManipulatedInEva(ILinkPeer target) { + base.OnPeerManipulatedInEva(target); + if (ReferenceEquals(target, this) && !isLinked) { + SetConnectorState(ConnectorState.Locked); + Colliders.UpdateColliders(gameObject, isPhysical: false); // The locked connector can have some colliders. + } + } + /// protected override void LogicalLink(ILinkTarget target) { StopPhysicsOnConnector(); @@ -680,7 +705,7 @@ public override void UpdateContextMenu() { #endregion #region Inheritable utility methods - /// Changes the connector state + /// Changes the connector state. /// /// It's a convenience method. The caller can change the state of the connector state machine /// instead. @@ -692,16 +717,13 @@ protected void SetConnectorState(ConnectorState newState) { connectorStateMachine.currentState = newState; } - /// - /// Tells if the currently active vessel is an EVA kerbal who carries the connector. - /// + /// Tells if the currently active vessel is an EVA kerbal who carries the connector. /// true if the connector on the kerbal. protected bool IsActiveEvaHoldingConnector() { return FlightGlobals.fetch != null // To prevent NRE on the game shutdown. && FlightGlobals.ActiveVessel != null // It's null in the non-flight scenes. && FlightGlobals.ActiveVessel.isEVA - && isLinked - && linkTarget != null && linkTarget.part != null + && isLinked && linkTarget?.part != null // For the inconsistent cases. && linkTarget.part.vessel == FlightGlobals.ActiveVessel; } @@ -808,8 +830,7 @@ void SaveConnectorModelPosAndRot(bool saveNonPhysical = false) { return; } if (saveNonPhysical && connectorObj == null && persistedConnectorPosAndRot != null) { - // For non physical connector only update connector if not yet updated. To allow restoring - // a deployed connector at an arbitrary location. + // Only save non-physical connector if not yet done. return; } var connector = connectorObj @@ -845,11 +866,12 @@ void StartPhysicsOnConnector() { var connector = KASInternalPhysicalConnector.Promote( this, connectorObj.gameObject, connectorInteractDistance); connector.connectorRb.mass = connectorMass; + connector.connectorRb.centerOfMass = connectorCenterOfMass; part.mass -= connectorMass; part.rb.mass -= connectorMass; linkRenderer.StartRenderer(nodeTransform, physPartAttach); - Colliders.UpdateColliders(connectorModel.gameObject); + Colliders.UpdateColliders(connectorModel.gameObject, isEnabled: true); cableJoint.StartPhysicalHead(this, physPipeAttachObj); SaveConnectorModelPosAndRot(); } diff --git a/Source/modules/KASLinkTargetBase.cs b/Source/modules/KASLinkTargetBase.cs index c2ae89a33..ff14f8e77 100644 --- a/Source/modules/KASLinkTargetBase.cs +++ b/Source/modules/KASLinkTargetBase.cs @@ -35,7 +35,7 @@ public class KASLinkTargetBase : // KAS interfaces. ILinkTarget, // Syntax sugar parents. - IsPartDeathListener, IKSPDevModuleInfo { + IKSPDevModuleInfo { #region Localizable GUI strings /// @@ -135,18 +135,14 @@ protected override void OnPeerChange(ILinkPeer oldPeer) { /// protected override void CheckCoupleNode() { base.CheckCoupleNode(); - // The source is responsible to handle the link, which may be done at the end of frame. So put - // our check at the end of the frame queue to go behind any delayed actions. - System.Diagnostics.Debug.Assert( - parsedAttachNode != null, nameof(parsedAttachNode) + " != null"); + + // In this frame the other parts has to pickup the coupling. If they didn't, we block. AsyncCall.CallOnEndOfFrame(this, () => { - if (linkState == LinkState.Available - && parsedAttachNode != null && parsedAttachNode.attachedPart != null) { + if (linkState == LinkState.Available && coupleNode != null && coupleNode.attachedPart != null) { + HostedDebugLog.Fine(this, "Detected a blocking part at the couple node: from={0}, to={1}", + KASAPI.AttachNodesUtils.NodeId(coupleNode), + KASAPI.AttachNodesUtils.NodeId(coupleNode.FindOpposingNode())); SetLinkState(LinkState.NodeIsBlocked); - } else { - if (linkState == LinkState.NodeIsBlocked && parsedAttachNode.attachedPart == null) { - SetLinkState(LinkState.Available); - } } }); } @@ -190,7 +186,7 @@ public override void OnDebugAdjustablesUpdated() { #region IsPartDeathListener implemenation /// - public virtual void OnPartDie() { + public override void OnPartDie() { if (isLinked) { HostedDebugLog.Info(this, "Part has died. Drop the link to: {0}", linkSource); linkSource.BreakCurrentLink(LinkActorType.Physics); @@ -279,7 +275,7 @@ protected virtual bool CheckCanLinkWith(ILinkSource source) { /// The highlighting state. /// void SetEligiblePartHighlighting(bool isHighlighted) { - if (highlightCompatibleTargets) { + if (highlightCompatibleTargets && !EVAConstructionModeController.Instance.IsOpen) { if (isHighlighted) { part.SetHighlightType(Part.HighlightType.AlwaysOn); part.SetHighlightColor(highlightColor); diff --git a/Source/modules/KASLinkWinch.cs b/Source/modules/KASLinkWinch.cs index db7db0acc..6cb3628aa 100644 --- a/Source/modules/KASLinkWinch.cs +++ b/Source/modules/KASLinkWinch.cs @@ -450,7 +450,7 @@ public override void UpdateContextMenu() { : ExtendCableMenuTxt; }); PartModuleUtils.SetupEvent(this, ToggleRetractCableEvent, e => { - e.active = linkState != LinkState.NodeIsBlocked; + e.active = !isConnectorLocked && linkState != LinkState.NodeIsBlocked && connectorState != ConnectorState.Docked; e.guiName = motorTargetSpeed < -float.Epsilon ? StopRetractingMenuTxt : RetractCableMenuTxt; diff --git a/Source/modules/KASRendererPipe.cs b/Source/modules/KASRendererPipe.cs index 40b51d650..564c8dfd7 100644 --- a/Source/modules/KASRendererPipe.cs +++ b/Source/modules/KASRendererPipe.cs @@ -6,6 +6,8 @@ using KSPDev.KSPInterfaces; using KSPDev.LogUtils; using KSPDev.ModelUtils; +using KSPDev.PartUtils; +using KSPDev.ProcessingUtils; using KSPDev.Types; using System; using UnityEngine; @@ -18,43 +20,43 @@ namespace KAS { /// Module that draws a pipe between two nodes. /// /// Usually, the renderer is started or stopped by a link source. However, it can be any module. -/// +///

/// At each end of the pipe a model can be drawn to make the connection look nicer, it's /// configured separately for the pipe source and target. If nothing is configured, then the pipe /// (which is a cylinder mesh) simply touches the attach nodes of the parts. If the pipe diameter /// is big, then it may look bad since the edges of the cylinder won't mix nicely with the part /// meshes. -/// -/// +///

+///

/// One way to improve appearance is adding a sphere mesh of the same or bigger diameter at the /// location where pipe touches the part. This way the cylinder edges will "sink" in the spheres. /// The sphere diameter can be set via sphereDiameter setting. -/// -/// +///

+///

/// By default, the sphere is placed at the part's mesh (depending on how the part's attach node /// is configured, actually). If it needs to be offset above or below of the default position, the /// sphereOffset setting can be used. -/// -/// +///

+///

/// If the sphere is offset above the part's mesh, there may be desirable to simulate a small /// piece of pipe between the part's mesh and the sphere. This can be done by defining pipe diameter /// via armDiameter. -/// -/// +///

+///

/// Finally, a complete prefab model can be inserted! This model will be inserted between the part /// and the sphere. The model path is defined via model setting. To properly orient the /// model, two extra parameters are needed: modelPartAttachAt, which defines how the model /// attaches to the part; and modelPipeAttachAt, which defines where the pipe attaches to the /// model. If sphere or offsets were set, they will be counter relative to modelPipeAttachAt. -/// -/// +///

+///

/// Normally, the pipe models are shown and hidden depending on the state the pipe. However, it's /// possible to define a static position where the model(s) will be placed when the renderer is /// stopped. This is done via setting parkAttachAt. -/// -/// +///

+///

/// The descendants of this module can use the custom persistent fields of groups: -/// +///

/// /// StdPersistentGroups.PartConfigLoadGroup /// StdPersistentGroups.PartPersistant @@ -310,6 +312,12 @@ public override void OnAwake() { targetJointNode = new ModelPipeEndNode(TargetNodeName, targetJointConfig); } + /// + public override void OnStart(StartState state) { + base.OnAwake(); + RegisterGameEventListener(GameEvents.onVesselWasModified, VesselModifiedGameEvent); + } + /// public override void OnDestroy() { base.OnDestroy(); @@ -332,6 +340,12 @@ protected override void CreatePipeMesh() { UpdateJointNode(sourceJointNode, sourceTransform); UpdateJointNode(targetJointNode, targetTransform); + // Update highlighters on the newly created/moved objects. + AsyncCall.CallOnEndOfFrame(this, () => { + PartModel.UpdateHighlighters(part, exclude: sourceTransform); + PartModel.UpdateHighlighters(targetPart, exclude: targetTransform); + }); + // Have the overrides applied if any. UpdateMaterialOverrides(); UpdateColliderOverrides(); @@ -340,7 +354,7 @@ protected override void CreatePipeMesh() { /// protected override void DestroyPipeMesh() { if (pipeTransform != null) { - UnityEngine.Object.Destroy(pipeTransform.gameObject); + Destroy(pipeTransform.gameObject); } pipeTransform = null; pipeMeshRenderer = null; @@ -350,6 +364,10 @@ protected override void DestroyPipeMesh() { if (targetJointNode != null && targetTransform != null) { UpdateJointNode(targetJointNode, null); } + + // Update highlighters on the deleted/moved objects. + PartModel.UpdateHighlighters(part); + PartModel.UpdateHighlighters(targetPart); } /// @@ -460,15 +478,15 @@ protected virtual void UpdateJointNode(ModelPipeEndNode node, Transform alignTo) var sphere = node.pipeAttach.Find(sphereName); if (config.sphereDiameter > float.Epsilon && makeProceduralModels) { if (sphere == null) { - sphere = Meshes2.CreateSphere(config.sphereDiameter, pipeMaterial, node.pipeAttach, - colliderType: Colliders.PrimitiveCollider.Shape).transform; + sphere = Meshes.CreateSphere(config.sphereDiameter, pipeMaterial, node.pipeAttach, + colliderType: Colliders.PrimitiveCollider.Shape).transform; sphere.name = sphereName; sphere.rotation = Quaternion.LookRotation(node.partAttach.up, node.partAttach.forward); } sphere.GetComponent().sharedMaterial = pipeMaterial; // For performance. RescalePipeTexture(sphere, sphere.localScale.z * config.sphereDiameter * 2.0f); } else if (sphere != null) { - Hierarchy2.SafeDestroy(sphere); + Hierarchy.SafeDestroy(sphere); } // Parking position, if defined. @@ -482,7 +500,7 @@ protected virtual void UpdateJointNode(ModelPipeEndNode node, Transform alignTo) newPosition: config.parkAttachAt.pos, newRotation: config.parkAttachAt.rot); } else if (parkAttach != null) { - Hierarchy2.SafeDestroy(parkAttach); + Hierarchy.SafeDestroy(parkAttach); } // Place prefab between the part and the pipe if specified. @@ -515,9 +533,9 @@ protected virtual void UpdateJointNode(ModelPipeEndNode node, Transform alignTo) if (config.armDiameter > float.Epsilon && config.sphereOffset > float.Epsilon && makeProceduralModels) { if (arm == null) { - arm = Meshes2.CreateCylinder(config.armDiameter, config.sphereOffset, pipeMaterial, - node.pipeAttach, - colliderType: Colliders.PrimitiveCollider.Shape).transform; + arm = Meshes.CreateCylinder(config.armDiameter, config.sphereOffset, pipeMaterial, + node.pipeAttach, + colliderType: Colliders.PrimitiveCollider.Shape).transform; arm.name = armName; } arm.GetComponent().sharedMaterial = pipeMaterial; // For performance. @@ -526,7 +544,7 @@ protected virtual void UpdateJointNode(ModelPipeEndNode node, Transform alignTo) armTransform.localRotation = Quaternion.LookRotation(Vector3.forward); RescalePipeTexture(armTransform, arm.localScale.z * config.sphereOffset); } else if (arm != null) { - Hierarchy2.SafeDestroy(arm); + Hierarchy.SafeDestroy(arm); } // Adjust to the new target. @@ -543,7 +561,7 @@ protected virtual void CreateLinkPipe() { var colliderType = pipeColliderIsPhysical ? Colliders.PrimitiveCollider.Shape : Colliders.PrimitiveCollider.None; - pipeTransform = Meshes2.CreateCylinder( + pipeTransform = Meshes.CreateCylinder( pipeDiameter, 1.0f, pipeMaterial, sourceTransform, colliderType: colliderType).transform; pipeTransform.GetComponent().sharedMaterial = pipeMaterial; pipeMeshRenderer = pipeTransform.GetComponent(); // To speedup OnUpdate() handling. @@ -615,6 +633,25 @@ protected void RescalePipeTexture(Transform obj, float length, Renderer renderer }); } #endregion + + #region Local utility methods + void VesselModifiedGameEvent(Vessel v) { + if (v == vessel && isStarted) { + AsyncCall.CallOnEndOfFrame(this, () => { + if (isStarted) { + PartModel.UpdateHighlighters(part, exclude: sourceTransform); + } + }); + } + if (targetPart != null && v == targetPart.vessel) { + AsyncCall.CallOnEndOfFrame(this, () => { + if (targetPart != null) { + PartModel.UpdateHighlighters(targetPart, exclude: targetTransform); + } + }); + } + } + #endregion } } // namespace diff --git a/Source/modules/KASRendererTelescopicPipe.cs b/Source/modules/KASRendererTelescopicPipe.cs index 179f584a1..48aaa91b2 100644 --- a/Source/modules/KASRendererTelescopicPipe.cs +++ b/Source/modules/KASRendererTelescopicPipe.cs @@ -61,6 +61,11 @@ public sealed class KASRendererTelescopicPipe : AbstractProceduralModel, #endregion #region Part's config fields + // ReSharper disable MemberCanBePrivate.Global + // ReSharper disable CollectionNeverUpdated.Global + // ReSharper disable FieldCanBeMadeReadOnly.Global + // ReSharper disable ClassNeverInstantiated.Global + /// Name of the renderer for this procedural part. /// /// This setting is used to let link source know primary renderer for the linked state. @@ -183,7 +188,12 @@ public class Orientation { /// [PersistentField("parkedOrientation", isCollection = true, group = StdPersistentGroups.PartConfigLoadGroup)] - public List parkedOrientations = new List(); + public List parkedOrientations = new(); + + // ReSharper enable MemberCanBePrivate.Global + // ReSharper enable CollectionNeverUpdated.Global + // ReSharper enable FieldCanBeMadeReadOnly.Global + // ReSharper enable ClassNeverInstantiated.Global #endregion // FIXME: check colliders. @@ -221,7 +231,7 @@ public void RetractToMinMenuAction() { /// public Color? colorOverride { - get { return _colorOverride; } + get => _colorOverride; set { _colorOverride = value; Meshes.UpdateMaterials(_srcPartJoint.gameObject, newColor: _colorOverride ?? materialColor); @@ -231,7 +241,7 @@ public Color? colorOverride { /// public string shaderNameOverride { - get { return _shaderNameOverride; } + get => _shaderNameOverride; set { _shaderNameOverride = value; // FIXME: update material everywhere. @@ -245,7 +255,7 @@ public string shaderNameOverride { /// public bool isPhysicalCollider { - get { return _isPhysicalCollider; } + get => _isPhysicalCollider; set { _isPhysicalCollider = value; Colliders.UpdateColliders(_srcPartJoint.gameObject, isEnabled: value); @@ -258,7 +268,7 @@ public bool isPhysicalCollider { /// public Transform sourceTransform { - get { return _sourceTransform; } + get => _sourceTransform; private set { _sourceTransform = value; UpdateLinkLengthAndOrientation(); @@ -268,7 +278,7 @@ private set { /// public Transform targetTransform { - get { return _targetTransform; } + get => _targetTransform; private set { _targetTransform = value; UpdateLinkLengthAndOrientation(); @@ -507,7 +517,7 @@ public override void LocalizeModule() { } #endregion - #region ILinkRenderer implemetation + #region ILinkRenderer implementation /// public void StartRenderer(Transform source, Transform target) { sourceTransform = source; @@ -594,12 +604,13 @@ void UpdateLinkLengthAndOrientation() { new Vector3(0, 0, GetClampedLinkLength(linkVector) - _tgtJointHandleLength)); // 4. Rotate tgtStrutJoint around Z axis so what its pivot axle (X) is perpendicular to // the target part attach node. + var forward = targetTransform.forward; _tgtStrutJoint.rotation = - Quaternion.LookRotation(_tgtStrutJoint.forward, targetTransform.forward); + Quaternion.LookRotation(_tgtStrutJoint.forward, forward); // 5. Rotate tgtPivot around X axis (pivot axle) so that its forward vector points along // target attach node direction. _tgtStrutJointPivot.localRotation = - Quaternion.Euler(Vector3.Angle(_tgtStrutJoint.forward, -targetTransform.forward), 0, 0); + Quaternion.Euler(Vector3.Angle(_tgtStrutJoint.forward, -forward), 0, 0); } // Distribute pistons between the first and the last while keeping the direction. @@ -696,7 +707,7 @@ void UpdateValuesFromModel() { ///
/// /// Same model in this part is copied several times, and they are organized into a hierarchy. So - /// if there were any scale or rotation adjustments they will accumulate thru the hierarchy + /// if there were any scale or rotation adjustments they will accumulate through the hierarchy /// breaking the whole model. That's why all local transformations must be default. /// /// Model to copy. diff --git a/Tools/clients/CurseForgeClient.py b/Tools/clients/CurseForgeClient.py index 1b98f2477..bf7af657c 100644 --- a/Tools/clients/CurseForgeClient.py +++ b/Tools/clients/CurseForgeClient.py @@ -19,6 +19,7 @@ import logging import os.path import re +import ssl import urllib2 from utils import FormDataUtil @@ -38,6 +39,8 @@ API_GET_VERSIONS = '/api/game/versions' # The project details are not available via the stock API. So using CFWidgets. API_GET_PROJECT = 'https://api.cfwidget.com/project/{project_id}' +# The user agent ID to use to make calls to the backend. Cloudflare doesn't accept empty values. +USER_AGENT = 'KSPDevReleaseScript' LOGGER = logging.getLogger('ApiClient') @@ -169,18 +172,23 @@ def UploadFile(project_id, filepath, changelog, game_versions, def _CallAPI(url, data, headers, raise_on_error=True): """Invokes the API call.""" + headers = headers or {} + if 'user-agent' not in headers: + headers['user-agent'] = USER_AGENT resp_obj = { 'error': True, 'reason': 'unknown' } try: - request = urllib2.Request(url, data, headers=headers or {}) - response = urllib2.urlopen(request) + request = urllib2.Request(url, data, headers=headers) + gcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + response = urllib2.urlopen(request, context=gcontext) resp_obj = json.loads(response.read()) headers = response.info().dict except urllib2.HTTPError as ex: resp_obj = { 'error': True, 'reason': '%d - %s' % (ex.code, ex.reason) } try: resp_obj = json.loads(ex.read()) - except: - pass # Not a JSON response + except Exception as e: + if 'errorMessage' not in resp_obj: + resp_obj['errorMessage'] = str(e) if ex.code == 401: raise AuthorizationRequiredError(resp_obj['errorMessage']) if ex.code == 403: diff --git a/Tools/make_binary.cmd b/Tools/make_binary.cmd index 218e9e99f..967f5ddf0 100644 --- a/Tools/make_binary.cmd +++ b/Tools/make_binary.cmd @@ -1,4 +1,4 @@ @echo off REM Until new major version of C# is released the build number in the path will keep counting. REM KAS *requires* .NET compiler version 4.0 or higher. Don't get confused with KSP run-time requirement of 3.5. -"C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe" ..\Source\KAS.csproj /t:Clean,Build /p:Configuration=Release +"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\amd64\MSBuild.exe" ..\Source\KAS.csproj /t:Clean,Build /p:Configuration=Release diff --git a/Tools/publish_curseforge_args.txt b/Tools/publish_curseforge_args.txt index 9a7698e6d..a35cfeb48 100644 --- a/Tools/publish_curseforge_args.txt +++ b/Tools/publish_curseforge_args.txt @@ -4,4 +4,4 @@ --github=ihsoft/KAS --versions=latest_all_builds --title=KAS {tag} ---archive=../KAS_v1.7.zip +--archive=../KAS_v1.8.zip diff --git a/Tools/publish_github_args.txt b/Tools/publish_github_args.txt index 462ec45a8..452c51fa0 100644 --- a/Tools/publish_github_args.txt +++ b/Tools/publish_github_args.txt @@ -4,4 +4,4 @@ --changelog=../CHANGELOG.md --as_draft --title=KAS v{tag} ---archive=../KAS_v1.7.zip +--archive=../KAS_v1.8.zip diff --git a/Tools/publish_spacedock_args.txt b/Tools/publish_spacedock_args.txt index 6e5ad5ab6..38739a34f 100644 --- a/Tools/publish_spacedock_args.txt +++ b/Tools/publish_spacedock_args.txt @@ -3,4 +3,4 @@ --changelog=../CHANGELOG.md --github=ihsoft/KAS --ksp_version=latest ---archive=../KAS_v1.7.zip +--archive=../KAS_v1.8.zip diff --git a/Tools/release_setup.json b/Tools/release_setup.json index 12660c936..05a374120 100644 --- a/Tools/release_setup.json +++ b/Tools/release_setup.json @@ -23,7 +23,8 @@ "bin/Release/{PACKAGE_NAME}.xml", "{MINIAVC_VERSION_FILE}", "/Binaries/*", - "-MiniAVC-V2.version" + "-MiniAVC-V2.version", + "-MiniAVC-V2.dll" ] } } diff --git a/docs/APIv1/WebTOC.xml b/docs/APIv1/WebTOC.xml deleted file mode 100644 index 9d5859c99..000000000 --- a/docs/APIv1/WebTOC.xml +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/APIv1/fti/FTI_100.json b/docs/APIv1/fti/FTI_100.json deleted file mode 100644 index 91fb1377c..000000000 --- a/docs/APIv1/fti/FTI_100.json +++ /dev/null @@ -1 +0,0 @@ -{"distancelimitforce":[2818050],"drawn":[2490369],"decoupleparts":[1310721,3342337,7143426,7340033],"destructed":[2555905],"decide":[2490369],"default":[1,524290,1179650,1703938,1769473,1900545,1966082,2293761,4128770,4980737,7143428,7929857],"definition":[196609,1769474,4259841,5898241,7208961,9306114],"depend":[3473409,5046273],"deal":[3342341,7208961,7340033,7864321,8650753,8716289],"dumpjoint":[655361,1638402,8650753],"disconnects":[3473409,8126465,9371649],"desire":[9437185],"def":[1769474],"declares":[9437185],"degrees":[2686978,2818049],"dampering":[2686978,2818050],"dropnode":[196609,1179650,7208961],"differ":[3473409,9240577],"domain":[196609,262145,327681,393217,458753,524289,589825,655361,720897,786433,851969,917505,983041,1048577,1114113,1179649,1245185,1310721,1376257,1441793,1507329,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3211265,3276801,3342337,3407873,3473409,3538945,3604481,3670017,3735553,3801089,3866625,3932161,3997697,4063233,4128769,4194305,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5308417,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"drop":[1179651,4194305,4390913,7274497],"defining":[7929857],"detected":[3407873],"destroyed":[4128772,8781825],"desired":[393217,3997697,4653057,5242881,8978434,9043969],"defined":[1769474,2686977,3342337,7405569],"defines":[3342340,3735553,4128770,4259841,6029313,8060929,8126465,8192001,8388609,8519681,8781825,9175042,9306113,9371649,9633793],"debugex":[4194305,5111809,5439492,5505028,5832708,6946820,8781828,9437185],"dropjoint":[1114113,2621442,3145729,7733249],"deleted":[1835009,3473409],"docking":[6225921],"determine":[8126465],"disconnectparts":[3473409,8126465,9371649],"deviates":[2686978,2818049],"displayed":[3342337,3735553,9568257],"double":[4980738],"diagram":[9371649,9633793],"depending":[3342337,5242881,9240577],"details":[2949121,3473409,3735554,5373953,8126465,9371650],"drive":[1966081,2686977,2818049],"direct":[7143426],"decouples":[1310721,7143425,7340033],"decoupled":[7143426],"different":[1310721,1966081,2490369,2686977,2818049,3473409,4128769,4521985,5767169,7340033,7929857],"disabled":[3801089,4259841,8912897,9306113],"dependency":[3342337],"distance":[393217,655361,786433,2097154,2818052,2883590,3014657,4063235,4653058,5046274,5242883,5701634,6488065,8454146,8585217,8650753,8978433,9502730],"distancelimit":[2818052],"direction":[6029314,6750209,7077889,8060930],"draw":[2490370],"degree":[1769473],"dependents":[6094849],"decoupling":[4521985,7143425],"dsitance":[3342337,9502721],"dockedvesselinfo":[7143429,9109506],"deployedcablelength":[2883585,3014657,4063233,5242882,5701633,9502722],"distant":[2097153],"description":[196609,262145,393217,458753,589825,655361,720897,786433,1048577,1114113,1310721,1572865,1900545,3211265,3276801,3342339,3604481,3932161,3997697,4063233,4259841,4390913,4587521,5308417,6029313,6291457,7208961,7274497,7340033,7733250,7798785,7864321,8060930,8126465,8519681,8650753,8716289,8781825,8978434,9175041,9306113,9371650,9437185,9502722,9568257,9633793,9830401],"depends":[4653057,9043969,9502721],"depedent":[3342337],"directly":[7733249],"difference":[9502721],"dump":[1441793,1638401],"drives":[1966081],"destroy":[9437185],"descouraged":[9764865],"designed":[7733249],"dynamic":[8454145],"downstream":[8781825],"dll":[327681,524289,851969,917505,983041,1179649,1245185,1376257,1441793,1507329,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3342337,3407873,3473409,3538945,3670017,3735553,3801089,3866625,4128769,4194305,4325377,4456449,4521985,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6094849,6160385,6225921,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"destroys":[1114113,2621441,7733249],"drops":[196609,1179649,7208961],"deployed":[393218,4325378,4653059,5701633,6488065,8978434],"determined":[4128769],"disabling":[3801089],"distancelimitdamperratio":[2818050],"describes":[5439489,6946817],"debug":[2949123,3342337,3473410,3735555,3801091,5373955,7405569,8126465,9371655,9764865],"discouraged":[2490369,3670017],"docked":[8257537],"dumpspringjoint":[655361,1441794,8650753]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_101.json b/docs/APIv1/fti/FTI_101.json deleted file mode 100644 index 1e8771fde..000000000 --- a/docs/APIv1/fti/FTI_101.json +++ /dev/null @@ -1 +0,0 @@ -{"extending":[3997697,4653057,8978433,9699329],"exposes":[196609,262145,393217,458753,589825,655361,720897,786433,1048577,1114113,1310721,1572865,3211265,3276801,3932161,3997697,4063233,4259841,4390913,4587521,5308417,6029313,6291457,7208961,7274497,7340033,7733249,7798785,7864321,8060929,8519681,8650753,8716289,8781825,8978433,9306113,9371649,9437185,9502721,9633793,9830401],"existing":[196609,1703937,1966081,2293761,3145729,7208961],"entered":[2228225],"effects":[2686977,2818049,2883586,2949121,3473409,3735553,5373953,8126465,9371650],"enumerations":[3342337],"examples":[2949121,3342337,3473410,3735553,3801089,4194305,5111809,5373953,5439489,5505025,5832705,6946817,7405569,8126465,8323073,8781825,9371653,9437185,9633794,9764865],"eventdata":[5439490,5505026,5832706,6946818],"events":[720897,1376257,3342338,8519683,8781825,8847361,9830401],"exceed":[9043969],"expected":[1703937,2031617,2293761,3735553,9568257],"ended":[5505025,9633794],"enumeration":[3342337,8126465,9175041,9568257],"expect":[4653057,9502721,9568257],"equals":[4194305,5111809],"equal":[5242881,5701633],"extend":[4653058],"eliminate":[2686977,2818049],"establishes":[589826,3538945,3604482,5373953,9371650],"established":[1114113,2359297,2949121,3735553,4915201,5373954,5439489,5636097,5701633,6291457,7405569,7667713,7733249,8781825,9175041,9371651],"engine":[2883585,5242881,5701633,9502721],"ends":[2490369],"extened":[9240577],"error":[131074,3801089],"end":[1835009,3342337,3473409,4259841,5636098,6029313,6750209,8060929,9306114,9371649],"expecting":[9175041],"establish":[3145729,4063233,5046273,9502721],"execute":[2621441,2949121,3473409,3735553,5373953,8126465,9371650],"enable":[1769473],"extra":[2293761,2883585],"example":[327681,524289,851969,917505,983041,1179649,1245185,1376257,1441793,1507329,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3342337,3407873,3473409,3538945,3670017,3735553,3801089,3866625,4128769,4194305,4325377,4456449,4521985,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6094849,6160385,6225921,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"event":[2031617,2752513,3342337,3866628,4194314,4390914,4521985,5111818,5439489,6946817,7274498,7798785,8781825,9764865],"enum":[8126465,9175041,9568257],"errors":[2359297,2621441,3145730,3407873,3801091,5373953],"empty":[2359297,3407873,5177345,5767169,6094849,6160385],"elements":[3801089],"effect":[2686978,2818050,2883585,8126465],"exception":[9764865],"extended":[3997697,8454145,8978433,9240577],"ensures":[3342337],"enablepreprocessing":[2686977,2818049],"explicitly":[7929857,9306113],"enterhandler":[9371649],"ending":[9568257],"exactly":[1769473,2949121,3473409,3670017,3735553,3801089,5373953,7405569,8126465,9371651,9764865],"ensure":[1966081,3145729,7602177],"environmental":[786433,3014657,9502721],"expensive":[2490369]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_102.json b/docs/APIv1/fti/FTI_102.json deleted file mode 100644 index 2eaf7d5fc..000000000 --- a/docs/APIv1/fti/FTI_102.json +++ /dev/null @@ -1 +0,0 @@ -{"findlinkpeer":[1310721,3670018,7340033],"future":[3670017],"false":[2555905,2949122,3735555,3801093,4128770,5373954,6553601,8847361,9371650],"following":[196609,262145,393217,458753,589825,655361,720897,786433,1048577,1114113,1310721,1572865,1769473,2293761,3211265,3276801,3932161,3997697,4063233,4259841,4390913,4587521,5308417,6029313,6291457,7208961,7274497,7340033,7733249,7798785,7864321,8060929,8519681,8650753,8716289,8781825,8978433,9306113,9371650,9437185,9502721,9633794,9830401],"flight":[7471105],"finds":[1310721,3670017,7340033],"forces":[786433,1048577,2883586,3014657,4980738,5242881,7864321,9502722],"form":[196609,1769473,7208961,7733249],"format":[1769474],"feed":[1769473],"flightintegrator":[4980737],"findtargetfromsource":[7405569,9371649],"fail":[2949121,3735553,4653057,5373953,9371649],"facing":[2949121,3473409,3735553,5373953,8126465,9371650],"fact":[9502721],"flow":[1769474,4980737],"friendly":[196609,1900546,2359297,3407873,7208961],"frame":[1835009,2490369,3080193,3473409],"forget":[2686978,2818050],"firstordefault":[3473409,7405569,8126465,8323073,9371650,9764865],"fixed":[655361,983042,1703937,8650753],"fully":[5898241],"factor":[1769473],"free":[2162689,2686977,2818049,8257537],"forbidden":[1769473],"functionality":[3342337],"frequently":[2490369],"fixed_joint":[2293761],"formatted":[1441793,1638401],"follow":[1],"fields":[720898,9830401],"failed":[1769473,2949121,3735553,3801089,5373953,9371649],"force":[458753,1769473,2031618,2097154,2555905,2686983,2818054,2883585,3473411,5701633,9437186],"failure":[5373953],"field":[327682,851970,917506,1245186,1376258,1507330,2424834],"first":[1769474,7143425],"freedom":[1769473,2686977,2818049],"fixedupdate":[1835009,3473410],"final":[3473409],"float":[1769474,2031617,2097155,2686982,2818054,2883585,3473409,4653057,5046273,5242881,5701633,8192001,8454145,8585217,9043969,9240577,9437185,9699329],"findmoduleimplementing":[2949122,3342337,3735554,3801090,5373954,9371650],"findsourcefromtarget":[9764865],"findmodulesimplementing":[3473409,7405569,8126465,8323073,9371651,9764865]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_103.json b/docs/APIv1/fti/FTI_103.json deleted file mode 100644 index b3ce0cba6..000000000 --- a/docs/APIv1/fti/FTI_103.json +++ /dev/null @@ -1 +0,0 @@ -{"goes":[3866625],"gravity":[4980737],"global":[720897,1376257,3342338,7274497,8781825,9830401],"guaranteed":[6225921],"got":[2949121,3866625],"general":[131073,2555905],"generic":[3342339,8716289,9371649,9633793],"getter":[8192001],"gui":[3342337,3538945,3801089,5373953,9568258],"granular":[9175041],"gameobject":[2031618,9437185],"gmail":[196609,262145,327681,393217,458753,524289,589825,655361,720897,786433,851969,917505,983041,1048577,1114113,1179649,1245185,1310721,1376257,1441793,1507329,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3211265,3276801,3342337,3407873,3473409,3538945,3604481,3670017,3735553,3801089,3866625,3932161,3997697,4063233,4128769,4194305,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5308417,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"green":[2949121,3735553,5373953,9371649],"gives":[1900545],"given":[1310721,4128769,7340033],"game":[2031617,3342337,6750209,7077889,8388609,8847361],"gave":[4521985],"group":[3866625,7929857],"gettransformfornode":[196609,524290,7208961],"greater":[2883585,4653057,5242881,9502721],"good":[4980737],"guilinkmode":[2949124,3342337,3735558,3801089,5373957,9371652,9568258],"gets":[196609,524289,7208961,8912897]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_104.json b/docs/APIv1/fti/FTI_104.json deleted file mode 100644 index b3d1b87cf..000000000 --- a/docs/APIv1/fti/FTI_104.json +++ /dev/null @@ -1 +0,0 @@ -{"headrb":[4063233,4456450,5242881,9502721],"happen":[8781825],"heavy":[3080193],"head":[786434,1835009,2883585,3014659,3997697,4063235,4456450,4653057,5242881,5701634,8257537,8454145,8585217,8978433,9502725],"hinge":[655361,2686977,8650753],"hierarchy":[4128769,4259841,7602177,9306113,9830401],"hard":[2555905],"headobjanchor":[3014658],"holder":[3342337,7798785],"hostobj":[2031618,9437187],"handle":[9175041],"handling":[786433,1835009,9502722],"holds":[9371649],"handlers":[2031617,3866625],"hits":[3407873],"higher":[9043969],"having":[3342337],"helps":[9175041]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_105.json b/docs/APIv1/fti/FTI_105.json deleted file mode 100644 index c7225fabd..000000000 --- a/docs/APIv1/fti/FTI_105.json +++ /dev/null @@ -1 +0,0 @@ -{"igor":[196609,262145,327681,393217,458753,524289,589825,655361,720897,786433,851969,917505,983041,1048577,1114113,1179649,1245185,1310721,1376257,1441793,1507329,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3211265,3276801,3342337,3407873,3473409,3538945,3604481,3670017,3735553,3801089,3866625,3932161,3997697,4063233,4128769,4194305,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5308417,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"inheritance":[9830401],"ilinksourceexample_breakfromphysyicalmethod":[3473409],"ienumerable":[3473409],"interaction":[9568257],"interfaces":[3342339,9306113],"include":[3342337],"interface":[196609,262145,393217,458753,524289,589825,655361,786433,983041,1048577,1114113,1179649,1310721,1441793,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3211265,3276801,3342345,3407873,3473409,3538945,3604481,3670017,3735553,3801089,3866625,3932161,3997697,4063233,4128769,4194305,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5308417,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208962,7274498,7340034,7405569,7471105,7536641,7602177,7667713,7733252,7798786,7864322,7929857,7995393,8060931,8192001,8257537,8323073,8388609,8454145,8519684,8585217,8650754,8716291,8781826,8847361,8912897,8978435,9043969,9109505,9240577,9306116,9371650,9437188,9502723,9633794,9699329,9764865],"isstarted":[6029313,6815746,8060929],"indicates":[2490369],"ilinkutils":[851970,1310723,3342337,3670018,4128770,7143426,7340035,7602177],"iattachnodesutils":[196611,524290,917506,1179650,1703938,1769474,1900546,2293762,3342337,4128769,7208963,7602177],"ilinkpeer":[3342337,3670020,3866626,4259843,4521985,5636100,5767170,5898242,5963778,6094850,6356996,6422531,6553604,6619138,7471106,7602178,7929858,8257537,8388610,8912900,8978433,9306115,9371649,9633793,9764865],"index":[4259841,5963778,9306113],"invalid":[9175041,9764865],"implemented":[9306113],"incomplete":[2621441],"iwinchcontrol":[393219,3342337,3997699,4325382,4653065,6488069,8257539,8454149,8585218,8978435,9043973,9240580,9699332],"ikaslinkevent":[2752514,3276803,3342337,4718594,4849666,5439493,5505026,5832706,6881282,6946821,7798787,8126465,8781826],"islinked":[2752514,3932161,4259841,5570562,6356993,6422530,7733249,8257537,9306113],"invoking":[983041,2097153],"iscoupleonlink":[4521986],"information":[2752513],"internally":[3538945],"isloaded":[720897,2424834,3342337,9830401],"input":[8126465,9568257],"implementations":[5242881,7733249,8126465],"inheritdoc":[9437185],"involved":[2752513],"immediately":[1835009,3473409,4653058],"ilinkjoint":[1114115,2359298,2555906,2621443,3145733,3342337,3932163,4521987,4784130,4915202,5570562,6225923,7012354,7602177,7667714,7733251,8257537,9502721],"isrigid":[1769474],"improve":[2686977,2818049],"ilinkrenderer":[262147,2162690,2490370,3080194,3342337,3407874,6029315,6160386,6750211,6815747,7077891,7536642,7995394,8060931,8192002,8323076,8847362],"ilinkstateeventlistener":[1572867,2752514,3342337,3866626,8519683],"ilinksource":[589827,1835009,2359298,2621441,2949124,3014659,3145733,3342338,3473414,3538948,3604482,3735556,3801091,5242881,5308419,5373958,5439490,5505028,5832708,6881282,6946818,7012354,7405571,7667714,7733249,8126466,8257537,8323074,8454145,8781826,8978433,9175041,9306113,9371655,9633794,9764867],"initiates":[3473409],"initiated":[3538945,3735553,5832705,6291457,8781825,9371652,9633795],"instance":[6619137,6684673],"initializes":[655361,1966081,8650753],"int":[5963777],"int32":[5963777],"interactive":[9568257],"ignore":[8192001],"integer":[1769473],"initiator":[9371649],"introduce":[3080193],"iactivateondecouple":[1179649],"iphysicsutils":[327682,1048579,3342337,4980738,7864323],"internal":[8126465],"identifies":[4784129],"islocked":[4259841,6356993,6553601,8912898,9306113],"implements":[9371649,9437185],"ijointutils":[655363,983042,1245186,1441794,1638402,1966082,2097154,2686978,2818050,3342337,8650755],"isphysicalcollider":[6029313,8060929,8847362],"invoke":[2490369],"isunbreakable":[2555906],"installed":[3342339],"implement":[3670017,8519681],"ideally":[9043969],"incompatible":[1572865,3866625,4259841,6553601,8519681,9306113],"initrenderer":[8323073],"interact":[7733249],"icommonconfig":[1507330,3342337,4194306,4390915,5111810,5177346,7274499],"info":[2752514,3342337,4194305,4587522,5111809,5439492,5505028,5832708,6684673,6946820,7143426,8716291,8781828,9109506],"isconnectorlocked":[3997697,4325377,4653057,8257538,8978433],"impassible":[2686977,2818049],"initial":[9175041],"interfere":[8912897],"ignores":[9306113],"infinite":[2686978,2818050,4653057],"instructs":[4653057],"ilinkvesselinfo":[3342337,4128769,4587523,6684674,8716291,9109506],"initated":[4718593,9175041],"isnodeblocked":[4259841,6553602,8912897,9306113],"impact":[8847361],"inetria":[9240577],"implementation":[2162689,2949121,3080193,3473409,3735553,4521985,4653057,5373953,7929857,8126466,9175041,9240577,9371650,9764865],"including":[6094849,7143425],"ikasjointeventslistener":[458755,2031618,3342337,9437188],"interacts":[6029313,8060929,8847361],"identifier":[3932161,4259841,4784129,5767169,7733249,9306113],"ikasevents":[1376258,3342337,5439490,5505026,5832706,6291459,6946818,8781827],"impossible":[4390913,5177345,7274497],"ilinktarget":[589826,2359298,2621441,2949121,3145733,3211267,3342337,3473410,3538948,3604482,3735553,3801091,4849666,4915202,5373958,7405570,8126465,8454145,9175041,9306113,9371652,9633795,9764867],"idle":[4653057],"instead":[2293761,3342337],"ilinkcablejoint":[786435,1835011,2883589,3014661,3342337,4063235,4456450,5046274,5242886,5701635,9502726],"instruct":[1769473],"isblocked":[3866626]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_106.json b/docs/APIv1/fti/FTI_106.json deleted file mode 100644 index ba5440057..000000000 --- a/docs/APIv1/fti/FTI_106.json +++ /dev/null @@ -1 +0,0 @@ -{"just0":[4194305,5111809],"just":[4521985,4653057,4980737,5439489,6946817,9633794],"jointutils":[720897,1245186,9830401],"joints":[720897,1245185,3342338,7733249,8650753,9437185,9502721,9830401],"joined":[2818049],"joint":[655369,983047,1114115,1441796,1638404,1769476,1966089,2031618,2097159,2359297,2490369,2555908,2621441,2686988,2818057,2883587,2949121,3145732,3342337,3473409,3735553,3932162,4521985,4784130,5046273,5242881,5308417,5373953,5570561,5701634,6029314,6225923,6750209,7012354,7077889,7733255,8060930,8650761,9371650,9437187,9502721]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_107.json b/docs/APIv1/fti/FTI_107.json deleted file mode 100644 index 6622268bb..000000000 --- a/docs/APIv1/fti/FTI_107.json +++ /dev/null @@ -1 +0,0 @@ -{"keydropconnector":[4194306,4390913,7274497],"know":[3801089,9437185],"kspfield":[8323073],"kind":[2031617,9502721],"keeping":[9175041],"key":[4194306,4390914,5111810,7274498],"kasevents":[720897,1376258,5439496,5505032,5832712,6946824,8781832,9830401],"keypickupconnector":[4390913,5111810,7274497],"keeps":[2097153],"kaseventsexample1":[5439489,5505025,5832705,6946817,8781825],"ksp":[1179650,1703937,2293763,3342337,8650753,9043969],"kasapiv1":[196609,262145,327682,393217,458753,524290,589825,655361,720897,786433,851970,917506,983042,1048577,1114113,1179650,1245186,1310721,1376258,1441794,1507330,1572865,1638402,1703938,1769474,1835010,1900546,1966082,2031618,2097154,2162690,2293762,2359300,2424834,2490370,2555906,2621442,2686978,2752515,2818050,2883586,2949122,3014660,3080194,3145734,3211265,3276801,3342338,3407874,3473411,3538948,3604481,3670019,3735556,3801091,3866627,3932161,3997697,4063233,4128772,4194306,4259841,4325378,4390913,4456450,4521986,4587521,4653058,4718594,4784130,4849666,4915202,4980738,5046274,5111810,5177346,5242882,5308417,5373955,5439490,5505026,5570562,5636098,5701634,5767170,5832706,5898242,5963778,6029313,6094850,6160386,6225922,6291457,6356994,6422530,6488066,6553602,6619138,6684674,6750210,6815746,6881282,6946818,7012354,7077890,7143426,7208962,7274498,7340034,7405570,7471106,7536642,7602178,7667714,7733250,7798786,7864322,7929858,7995394,8060930,8126467,8192002,8257538,8323074,8388610,8454148,8519682,8585218,8650754,8716290,8781826,8847362,8912898,8978434,9043970,9109506,9175042,9240578,9306116,9371650,9437186,9502722,9568258,9633794,9699330,9764866,9830403],"kas":[65537,131073,196609,262145,327685,393217,458753,524292,589825,655361,720903,786433,851973,917509,983044,1048577,1114113,1179652,1245189,1310721,1376261,1441796,1507333,1572865,1638404,1703940,1769476,1835012,1900548,1966084,2031620,2097156,2162692,2228225,2293764,2359300,2424836,2490372,2555908,2621444,2686980,2752516,2818052,2883588,2949124,3014660,3080196,3145732,3211265,3276801,3342349,3407876,3473412,3538948,3604481,3670020,3735556,3801092,3866628,3932161,3997697,4063233,4128772,4194308,4259841,4325380,4390913,4456452,4521988,4587521,4653060,4718596,4784132,4849668,4915204,4980740,5046276,5111812,5177348,5242884,5308417,5373956,5439493,5505028,5570564,5636100,5701636,5767172,5832708,5898244,5963780,6029313,6094852,6160388,6225924,6291457,6356996,6422532,6488068,6553604,6619140,6684676,6750212,6815748,6881284,6946821,7012356,7077892,7143428,7208964,7274500,7340037,7405572,7471108,7536644,7602180,7667716,7733255,7798788,7864324,7929860,7995396,8060932,8126469,8192004,8257540,8323076,8388612,8454148,8519684,8585220,8650756,8716292,8781829,8847364,8912900,8978436,9043972,9109508,9175044,9240580,9306116,9371654,9437188,9502724,9568260,9633797,9699332,9764868,9830411],"keyboard":[4194306,4390914,5111810,7274498],"keyboardevent":[4194311,5111815],"kasapi":[327682,720899,851970,917506,1245186,1376258,1507330,2424834,3342339,5439496,5505032,5832712,6946824,8781832,9830404]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_108.json b/docs/APIv1/fti/FTI_108.json deleted file mode 100644 index 94ae73d67..000000000 --- a/docs/APIv1/fti/FTI_108.json +++ /dev/null @@ -1 +0,0 @@ -{"leavehandler":[9371649],"linkpartid":[2949121,3735553,4259841,5373953,7471106,9306113,9371649],"local":[1966081],"logformat":[2949121,3735553,5373953,9371649],"logic":[3670017,4980737,8126465,9175041,9306114,9371650],"lenght":[5701633],"logs":[3145729,3801089],"linkutils":[720897,851970,3342337,9830401],"looks":[1966082],"linkstopped":[5439491,5505027,5832707,6946819,8781827],"logging":[1900545,3801089],"locks":[1572865,3866625,8519681],"log":[3801089,7405569,9371651,9764865],"linkstate":[3342337,3866625,4259841,6356996,6422529,6553601,8912897,9175042,9306113,9371664,9633793,9764865],"list":[2359297,3407873,3604481,4259841,5898241,7602177,7929859,8781826,9306113],"longer":[2228225],"located":[2490369],"linkactortype":[589825,2949122,3342337,3473415,3538948,3604481,3735555,3801089,4718594,5373957,8126469,9371656],"limit":[2686979,2818052,2883588,9502725],"loading":[5963777,7471105],"linksource":[3211265,3473412,3932161,7667714,7733249,9633793,9764868],"linkmoduleindex":[4259841,5963778,9306113],"linkcreated":[5439491,5505027,5832707,6946819,8781827],"locate":[2228225],"linefeed":[1441793,1638401],"like":[2490369,3538945],"linktotarget":[589826,2949121,3473410,3538948,3604483,3735553,3801089,5373957,9371651],"logerror":[2949122,3735554,3801090,5373954,9371650],"listed":[5898241],"length":[393218,2883591,3014657,4325377,4653060,5242881,5701633,6488065,8454145,8585217,8978434],"looking":[2228225],"link":[1,262147,589829,720897,851969,1114114,1310721,1572865,1835009,2162689,2359300,2490373,2621441,2752516,2949126,3080193,3145730,3211265,3276802,3342344,3473413,3538949,3604482,3670017,3735558,3801098,3866625,3932162,4063233,4259843,4849666,4915202,5046273,5308419,5373963,5439494,5505029,5636099,5701633,5767169,5832709,6029318,6094852,6225921,6291458,6422529,6750209,6881282,6946822,7012353,7077889,7340033,7405570,7536641,7667714,7733252,7798786,7995393,8060939,8126469,8192002,8323074,8519682,8781830,8847363,8912900,9175045,9306117,9371674,9502723,9568259,9633800,9764865,9830401],"linear":[1966081,2686978,2818053],"logwarningformat":[3473410,8126465,9371649],"lists":[8781825],"linking":[589826,2949122,3342337,3538945,3670017,3735555,3801089,5373956,5505025,5832705,6291458,7929857,8781826,9175042,9371658,9568257,9633795],"lower":[9043969],"linkstatemachine":[9371655],"letting":[3801089],"linked":[3538945,3670017,4259842,5373953,5570561,6225921,6422529,7405570,7471105,8257537,9175042,9306114,9371654,9502721,9633798,9764867],"linkstarted":[5439491,5505027,5832707,6946819,8781827],"listeners":[3342337,9437185],"linkrenderer":[5308417,8323076,9371649],"light":[2949121,3735553,5373953,9371649],"lock":[4653057,7929857],"lin":[1835009,3145730,3473409,4915201,7667713,9306113],"linktarget":[3473410,3932161,4915202,5308417,7405572,7733249,8126465,9371654],"linkjoint":[5308417,7012354,8257537,9371649],"little":[2162689],"load":[131073,3145729,3342337],"logged":[1703937,2293761,3801090],"logwarning":[3342337],"locked":[1769473,1966081,2686978,2818050,2949121,3735553,3997697,4325377,4653057,6094849,8257539,8912898,8978433,9175041,9371652,9633795],"lost":[1966081],"loaded":[720897,2424833,9830401],"links":[3276801,3342338,3670017,4718593,7340033,7798785,8126465,9175041,9371649,9502721],"limits":[1966081,2686978,2818049,2883585,9043969],"linkbroken":[5439491,5505027,5832707,6946819,8781827]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_109.json b/docs/APIv1/fti/FTI_109.json deleted file mode 100644 index 50cc18697..000000000 --- a/docs/APIv1/fti/FTI_109.json +++ /dev/null @@ -1 +0,0 @@ -{"models":[6029314,6750209,7077889,8060930],"motor":[393217,3997698,4653066,8454145,8978435,9043971,9240579],"motorcurrentspeed":[3997697,4653058,8978433,9043969,9240578],"mods":[3342337],"momentum":[9240577],"making":[9306113,9371649],"mind":[3801089,5701633],"mod":[3342341,7274497],"mode":[589826,1114113,1769473,2162689,2686978,2818053,2949124,3342337,3538946,3735559,3932161,4521990,5373957,5505026,5832706,6225922,6291458,7733250,7929857,8781826,9371654,9568257,9633794],"meshes":[2490369,5308417,6029314,7536641,7995393,8060930,8323073,9371649],"myfakerb":[9437186],"makes":[3801089],"main":[2686977,2818053],"multiple":[2162689,2490369,8912897],"mandatory":[1769473],"meaning":[9502721],"maxdistance":[2097154],"moving":[2818049,8257537],"moment":[2555905,3997697,8454145,8978433,9240577],"moderate":[3080193],"merged":[4128769],"means":[2883585,6225921,8192001,9240578],"meters":[5046273,5242881,5701633,8454145,8585217,9240577,9699329],"message":[3801089],"maintaining":[9371649],"method":[524289,983043,1179649,1441793,1638401,1703938,1769473,1835009,1900545,1966082,2031618,2097155,2162691,2293762,2359297,2490372,2555905,2621442,2686977,2752513,2818051,2883587,2949121,3014657,3080195,3145732,3407874,3473410,3538947,3604481,3670017,3735553,3801089,3866625,4128770,4194305,4325377,4521985,4653059,4980739,5111809,5373954,6488065,7143426,9371652],"module":[1572865,2752513,2949122,3145729,3342338,3735555,3801089,3866626,4259842,4521985,4849665,5308417,5373954,5963778,6225921,6881281,7012354,7405569,7733249,7929861,8060929,8519683,9175051,9306114,9371660,9502721,9633793,9764865],"mymodule":[3342337],"multiplier":[4980737],"modules":[2752513,3342337,3866626,4521985,6029313,6094850,6160385,7929859,8060929],"methods":[196610,262146,393218,458754,589826,655362,786434,1048578,1114114,1310722,1572866,1835010,3342338,3473411,7208962,7340033,7733249,7864321,8060929,8519681,8650753,8978433,9240577,9371649,9437185,9502721],"manage":[8126465],"minumim":[1769473],"make":[8912897],"movements":[3342337,9502721],"manages":[3342337,5308417,7012353,8060929,9371649],"mesh":[7536641,7995393],"maintains":[3211265,9633793,9764865],"match":[4653059,9240578],"maximum":[393217,786433,2097153,2686978,2818050,2883586,3014657,3342337,3997698,4063234,4325377,4653058,5046273,5242881,8585218,8978435,9502724,9699329],"motortargetspeed":[3997697,4653058,8978433,9043970,9240578,9699329],"machine":[9371649],"model":[524289,3342337,9175041],"multliple":[3342337],"modes":[1966081,2686982,2818051],"maxspringforce":[2686978,2818050],"matches":[524289],"merge":[6225921],"mean":[6225921],"motions":[2686977],"monobehaviour":[3473410],"movement":[2818050],"moved":[8060929],"member":[8126465,9175041,9568257],"misspelled":[2228225],"maintained":[7733249],"motion":[2818050],"members":[196609,262145,393217,458753,589825,655361,720897,786433,1048577,1114113,1310721,1572865,3211265,3276801,3932161,3997697,4063233,4259841,4390913,4587521,5308417,6029313,6291457,7208961,7274497,7340033,7733249,7798785,7864321,8060929,8126465,8519681,8650753,8716289,8781825,8978433,9175041,9306113,9371649,9437185,9502721,9568257,9633793,9830401]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_110.json b/docs/APIv1/fti/FTI_110.json deleted file mode 100644 index f59aa9abd..000000000 --- a/docs/APIv1/fti/FTI_110.json +++ /dev/null @@ -1 +0,0 @@ -{"nodes":[720897,917505,1769474,3342337,4128770,5898241,7208961,7602177,7929860,9830401],"nre":[8781825],"nodeisblocked":[3866625,6553601,9175041],"notified":[8781825],"normal":[1114113,1769473,2555905,6029313,7733249,8060929,8126465,8192001],"negative":[4653058,9240577],"numbers":[1769474],"nullable":[7536642],"node":[196614,524292,1179652,1572865,1703942,1769483,1900548,2293770,2490370,3407874,3866625,4128770,4259847,5898244,6094852,6553601,7208966,7602179,7929859,8388609,8519681,8912901,9175041,9306119],"need":[2686977,2818049,4259841,4653057,7602177,7929857,9306113],"namespace":[196609,262145,327682,393217,458753,524292,589825,655361,720897,786433,851970,917506,983042,1048577,1114113,1179652,1245186,1310721,1376258,1441794,1507330,1572865,1638402,1703940,1769475,1835010,1900547,1966082,2031618,2097154,2162690,2293763,2359298,2424834,2490370,2555906,2621442,2686978,2752514,2818050,2883586,2949122,3014658,3080194,3145730,3211265,3276801,3342341,3407874,3473410,3538946,3604481,3670018,3735554,3801090,3866626,3932161,3997697,4063233,4128772,4194306,4259841,4325378,4390913,4456450,4521986,4587521,4653058,4718594,4784130,4849666,4915202,4980739,5046274,5111810,5177346,5242882,5308417,5373954,5439490,5505026,5570562,5636098,5701634,5767170,5832706,5898242,5963778,6029313,6094850,6160386,6225922,6291457,6356994,6422530,6488066,6553602,6619138,6684674,6750210,6815746,6881282,6946818,7012354,7077890,7143430,7208962,7274498,7340034,7405570,7471106,7536642,7602178,7667714,7733250,7798786,7864322,7929858,7995394,8060930,8126466,8192002,8257538,8323074,8388610,8454146,8519682,8585218,8650754,8716290,8781826,8847362,8912898,8978434,9043970,9109506,9175042,9240578,9306114,9371650,9437186,9502722,9568258,9633794,9699330,9764866,9830402],"notifies":[3342337,9437185],"new":[196609,1769475,1966082,2293762,2752513,2883587,3145729,3342338,3473409,4128770,4521988,4653057,7208961,9371654],"needed":[3342337,4653057,5439489,6946817,9240577],"names":[4259841,7929858,9306113],"nodetype":[2293761],"normally":[1703937,2555905,9175041],"nodeid":[196609,1769474,1900546,7208961],"null":[1769473,2949122,3473412,3670017,3735554,3801090,4128770,4456449,4915201,4980737,5373954,5636097,5898241,7143426,7405572,7536641,7602177,7667713,7929857,7995393,8126466,8388609,9109505,9371656,9764870],"numpad0":[4194306,5111810],"numpad":[4194305,5111809],"nodename":[2293762],"needs":[1835009,3473409,3801090,8126465,8519681,9437185],"negativeinfinity":[2883585],"notification":[2752513,8781825],"number":[1769473,3342337],"nodetransform":[2293762,4259841,8388610,9306113]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_111.json b/docs/APIv1/fti/FTI_111.json deleted file mode 100644 index 62637aafb..000000000 --- a/docs/APIv1/fti/FTI_111.json +++ /dev/null @@ -1 +0,0 @@ -{"oscillation":[2686978,2818050],"ownerpeer":[3866626],"onawake":[5439490,5505026,5832706,6946818,8781826],"objec":[6750209,7077889],"occupied":[4259841,6553601,9175041,9306113],"operating":[3342337,8978433],"optional":[1769473,2097155,2555905,2686982,2818054,3801091,4128769,4980737,7143428],"optionally":[3342337,8060929],"outgoing":[9175041],"onlinkbroken":[5439490,5505026,5832706,6291457,6946820,8781827],"optimization":[3080194],"operate":[9043969],"objects":[262145,1835009,1966081,2097153,2490369,2883586,3342337,3473410,4980737,5242881,8060929,9502725],"ondestroy":[5439489,5505025,5832705,6946817,8781825],"ownerpart":[524290,1769474],"onstartlinking":[5439490,5505026,5832708,6291457,6946818,8781827],"obstructed":[3801090],"oscillations":[2097153],"owns":[524289,2031617,3014657,3145729,4259841,4587521,6619137,6684673,8257537,8716289,9306113,9633794],"onkasnodeblockedstate":[1572865,3866626,8519681],"oppossing":[1769473],"otherpeer":[4259841,5636098,9306113],"obejcts":[2097153],"operations":[6094849],"override":[5439489,5505025,5832705,6946817,8781825],"object":[196609,458753,524290,786433,2031618,3014659,3342337,4456449,5439489,6946817,7208961,8388609,8781825,8847361,9437186,9502722,9830401],"one":[1310721,2293761,2949121,3473409,3670018,3735554,3801089,4128770,4980737,5373953,5439489,6094850,6225921,6946817,7143425,7340033,7405569,8126465,8454145,8912897,9175041,9371651,9764865],"orientation":[1769474,2293761,4259841,8388609,9306113],"operation":[2490369],"order":[1769473,8454145],"original":[2686978,2818051,7536641,7995393],"owning":[2490369],"ongui":[4194305,5111809],"obstacles":[262145,3407873,8060929],"owned":[7143426,7929857],"owner":[1703937,7143425,8257537,9633793],"onlinkcreated":[5439492,5505026,5832706,6291457,6946818,8781827],"overload":[3538945,3604481,5373953],"onkaslinkedstate":[1572865,2752514,5439489,6946817,8519681],"onjointbreak":[1835009,3473411],"occurred":[131073],"onstoplinking":[5439490,5505028,5832706,6291457,6946818,8781827],"old":[3342338,7143425],"outputs":[655362,1441793,1638401,8650754],"ommited":[1769473],"onkasjointbreak":[458753,2031618,9437186],"omitted":[1769474]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_112.json b/docs/APIv1/fti/FTI_112.json deleted file mode 100644 index 9272080d7..000000000 --- a/docs/APIv1/fti/FTI_112.json +++ /dev/null @@ -1 +0,0 @@ -{"pure":[2686977,2818049],"physix":[2686977],"physical":[786434,1114114,1835010,2621441,2883589,3145729,3342337,3473410,3932161,4063235,4259841,4456450,4980737,5242881,5308417,5570561,5701633,7012354,7733251,8388609,8847361,9306113,9371649,9502726],"parameters":[524289,983041,1179649,1441793,1638401,1703937,1769473,1900545,1966081,2031617,2097153,2293761,2359297,2490369,2555905,2686980,2752513,2818052,2883585,3014657,3145729,3407873,3473409,3538945,3670017,3735553,3801089,3866625,4128769,4521985,4653057,4980737,5373953,7143425],"parsed":[4259841,5898241,9306113],"percentage":[2686978,2818050],"present":[7929857,8126465],"points":[262145,2490369,3407873,8060930],"performance":[2162689,2490369,2686978,2818049,3080193],"public":[196609,262145,327682,393217,458753,524289,589825,655361,720897,786433,851970,917506,983041,1048577,1114113,1179649,1245186,1310721,1376258,1441793,1507330,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424834,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949122,3014657,3080193,3145729,3211265,3276801,3342340,3407873,3473412,3538945,3604481,3670017,3735554,3801090,3866625,3932161,3997697,4063233,4128769,4194306,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111810,5177345,5242881,5308417,5373954,5439491,5505027,5570561,5636097,5701633,5767169,5832707,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946819,7012353,7077889,7143425,7208962,7274498,7340034,7405570,7471105,7536641,7602177,7667713,7733250,7798786,7864322,7929857,7995393,8060930,8126467,8192001,8257537,8323075,8388609,8454145,8519682,8585217,8650754,8716290,8781828,8847361,8912897,8978434,9043969,9109505,9175042,9240577,9306114,9371655,9437187,9502722,9568258,9633794,9699329,9764866,9830402],"prismatic":[655361,2818051,8650753],"parse":[1769474],"parameter":[3801089,4128769,4653057],"persisted":[4259842,4587521,5963777,7471105,8716289,9109505,9306114],"plain":[4980737],"playe":[9568257],"pending":[3735553],"persists":[131073],"private":[8323073],"produce":[1769473],"point":[524289,3014657,4980737,6029314,6750209,7077889,8060930],"physics":[327681,720897,1835009,2031617,3342337,3473412,7864321,8126466,9043969,9830401],"pee":[4259842,6553601,8912897,9306114],"physicalanchortransform":[8454145],"pickup":[4390913,5111809,7274497],"previous":[2686977,2818049],"performed":[3801089],"positiveinfinity":[2883585],"parent":[3342337,7143426,8847361],"peer":[1310721,1572865,3670021,3866627,4259847,5898241,5963777,6094850,6356993,6422530,7340033,7471105,7602177,7929858,8519681,8912897,9306119],"postpone":[1835009,3473409],"part":[196611,393217,524292,1179655,1572866,1703945,1769480,2293768,2752513,2949123,3145729,3342341,3473412,3735556,3801090,3866627,3932161,4128774,4259847,4325377,4521985,4587522,4653058,4784130,5373955,5439489,5898242,5963777,6094849,6225921,6553601,6619142,6684678,6946817,7012353,7143435,7208963,7405573,7471106,7602178,7733250,7929857,8126468,8257541,8323073,8519683,8650753,8716290,8912898,8978433,9175042,9306119,9371667,9568257,9633795,9764869],"primarily":[7733249],"possible":[786433,2359298,2883586,4063233,5242881,8585217,9502722,9764865],"physx":[983042,2097154,2686978,2818050,2883585,5242881,5701634,9502722],"position":[1769474,1966082,2293761,2686977,2818049,4259841,6029314,6750209,7077889,8060930,8388609,9306113],"presented":[8126466],"parts":[589827,1114113,1310722,1769474,2490370,2949122,3342339,3538946,3604482,3735554,3801091,4063233,4128769,4259841,4521986,5046273,5373957,5439489,5570561,6225922,6291458,6946817,7143425,7340034,7602177,7733249,8519681,8781826,8978433,9306113,9371656,9502722,9633793],"party":[3342337,7733249,8126465],"part2":[7143428],"part1":[7143428],"possibility":[3801089],"parsing":[1769473],"peers":[1900545,4259841,4521985,5767170,7602177,8912898,9306113],"player":[5373953,8126468],"primary":[7929858],"partmodule":[3342337,5439489,5505025,5832705,6946817,8781825,9437185],"properties":[655362,983041,1441793,1638401,2097153,2293762,3211266,3276802,3932162,3997698,4063234,4259842,4390914,4587522,4980737,5308418,6029314,6291458,7143425,7274497,7733249,7798785,8060929,8650754,8716289,8781825,8978433,9306113,9371649,9502721,9633793],"pressed":[4194305,5111809],"pivots":[2490369],"pull":[2883585],"pick":[4521985,4980737],"positive":[4653058,5242881,5701633,9240577],"parsenodefromstring":[196609,1769474,7208961],"provided":[2162689,4128769,7143425],"plan":[2686978,2818050],"physicsutils":[327682,720897,9830401],"page":[131073,2228228],"physically":[5570561],"provide":[3342337],"physxperformance":[2818049],"property":[4194306,4456450,4521985,4718594,4784130,4849666,4915202,5046274,5111810,5177346,5242882,5439490,5505026,5570562,5636098,5701634,5767170,5832706,5898242,5963778,6094850,6160386,6225922,6356994,6422530,6553602,6619138,6684674,6750210,6815746,6881282,6946818,7012354,7077890,7405570,7471106,7536642,7602178,7667714,7929858,7995394,8192002,8257538,8323074,8388610,8454146,8585218,8847363,8912898,9043970,9109506,9240578,9699330,9764869],"piece":[9371649],"par":[196609,1769474,2621441,3342337,5898241,7208962,7929857,9043969,9240577,9633793],"posibility":[3801089],"positions":[2162689,8454145],"path":[5177345]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_114.json b/docs/APIv1/fti/FTI_114.json deleted file mode 100644 index e052b4c8e..000000000 --- a/docs/APIv1/fti/FTI_114.json +++ /dev/null @@ -1 +0,0 @@ -{"ratio":[8192002],"resetting":[1966081],"retract":[4653058],"resetjoint":[655361,983041,1966082,2097153,2686977,2818049,8650753],"root":[524289,7143425],"rule":[4653057],"rescale":[1769473],"represent":[2162689],"right":[1966081,4653057],"reset":[983041,1966083,2097153,4521985],"remember":[1966081],"reaches":[4653057],"reached":[5242881],"rendering":[262146,2162689,2490369,3342337,8060931],"rapidly":[2883585],"representations":[3473409],"remarks":[524289,983041,1179649,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2490369,2555905,2621441,2686977,2752513,2818051,2883585,2949121,3014657,3080193,3145729,3407873,3473409,3538945,3670017,3735553,3866625,4128769,4325377,4521985,4653057,4784129,4980737,5242881,5373953,5439489,5505025,5701633,5767169,5832705,5898241,5963777,6094849,6225921,6488065,6750209,6946817,7077889,7143425,7405569,7471105,7602177,7733249,7929857,8060929,8126465,8192001,8257537,8454145,8519681,8585217,8781825,8847361,8912897,9043969,9175041,9240577,9306113,9371649,9437185,9502721,9633793,9764865],"required":[262145,1769473,2162689,2490369,3080193,3407873,3538945,4653057,5898242,7602177,8060929],"reasons":[2686977,2818049],"rendered":[8060929],"renderername":[8323074],"receive":[8519681],"restict":[3342337,9502721],"rigibody":[4456449],"retracted":[9240578],"rightsample":[3342337],"rated":[2490369,3080193],"range":[2097153,2883585],"reported":[3145729,3801089,5373953],"refuse":[3735553],"require":[1769473,3538945],"releasecable":[393217,4325378,4653057,6488065,8454145,8978433],"role":[4521985],"reserve":[3997697,8585217,8978433],"real":[2883588,5701633,9502721,9568257],"react":[4521985],"reduce":[2883585],"rotation":[1966082,2686980],"reject":[9175041],"rejectinglinks":[9175041,9371653,9633795],"reporttolog":[3801091],"requests":[1114113,2555905,7733249],"render":[2162689],"return":[524289,1441793,1638401,1769473,1900545,2293761,2359297,2818049,2949123,3145729,3407873,3473410,3538945,3670017,3735556,3801093,4128769,4521985,4980737,5373956,7143425,7405570,8126465,8192001,9371655,9764866],"represents":[8323073,9306113],"realcablelength":[2883585,3014657,4063233,5242881,5701634,9502722],"relative":[1966082,2818049,3342337,8257537,9502721],"rbairdragmult":[4980738],"release":[3342337],"responsible":[4653057,8060929],"reporttogui":[3801091],"recieve":[8519681],"result":[983041,1966081,2097153,2686977,2818049,3473409,4128769,8126465],"relased":[3342337],"reports":[3538945],"rigidbody":[1048577,3014658,4063233,4456452,4980742,7864321,9502721],"redirected":[1],"resources":[983041,1179649,1703937,1769473,2097153,2293761,2359297,2686977,2818049,3014657,3473409,4456449,8847361],"released":[3342338,8912897],"renderers":[4259841,8192001,8388609,9306113],"requested":[2228225],"rigid":[1769473,6029313,8060929,8257537,8847361],"rounded":[2883585],"restricted":[2686977],"ready":[720897,2424833,4521985,9175041,9830401],"remove":[5439493,5505029,5832709,6946821,8781829],"regardless":[1966081,2686977,2818049,3801089],"requires":[4128769],"reducing":[6488065],"renderer":[2162691,2490371,3080193,3407873,5308417,6029314,6160385,6750209,6815745,7077889,8060931,8323074,9371649],"randerer":[6029313,6160385,8060929],"reason":[4521985],"replicates":[4980737],"retracting":[3997697,8978433,9699329],"removed":[3342337],"respresented":[2162689],"restore":[3145729,7143425],"resource":[5177345],"returns":[196609,1900545,4063233,5701633,7208961,7405569,9371649,9502721,9764865],"request":[327681,524289,851969,917505,983041,1179649,1245185,1376257,1441793,1507329,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3407873,3473409,3538945,3670017,3735553,3801089,3866625,4128769,4194305,4325377,4456449,4521985,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6094849,6160385,6225921,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175044,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"retry":[4653057],"reference":[196609,262145,327681,393217,458753,524289,589825,655361,720897,786433,851969,917505,983041,1048577,1114113,1179649,1245185,1310721,1376257,1441793,1507329,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3211265,3276801,3342337,3407873,3473409,3538945,3604481,3670017,3735553,3801089,3866625,3932161,3997697,4063233,4128769,4194305,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5308417,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"resisting":[4980737],"representation":[196609,262145,1900545,3080193,7208961,8060930,8192001],"record":[2293761],"refused":[4521985],"returning":[3735553]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_115.json b/docs/APIv1/fti/FTI_115.json deleted file mode 100644 index 0ed1da9e8..000000000 --- a/docs/APIv1/fti/FTI_115.json +++ /dev/null @@ -1 +0,0 @@ -{"shrinked":[6029313,8060929,8192002],"springforce":[2097154,2686980,2818052],"source":[327681,524289,589826,786434,851969,917505,983041,1114114,1179649,1245185,1376257,1441793,1507329,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162690,2293761,2359300,2424833,2490373,2555905,2621442,2686977,2752514,2818049,2883586,2949130,3014662,3080193,3145733,3211265,3276802,3342339,3407876,3473415,3538945,3670018,3735564,3801099,3866625,3932161,4063234,4128773,4194305,4259842,4325377,4456449,4521988,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242882,5373963,5439495,5505033,5570562,5636097,5701634,5767170,5832713,5898241,5963777,6029313,6094849,6160385,6225921,6291458,6356993,6422529,6488065,6553601,6619138,6684673,6750209,6815745,6881285,6946823,7012353,7077891,7143425,7208961,7274497,7340033,7405576,7471105,7536641,7602177,7667715,7733252,7798788,7864321,7929857,7995393,8060930,8126470,8192001,8257537,8323073,8388609,8454146,8519682,8585217,8650753,8716289,8781833,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306115,9371680,9437185,9502726,9568257,9633803,9699329,9764870,9830401],"sort":[65537],"stopepd":[5439489,5505025,5832705,6946817,8781825],"syntax":[327681,524289,851969,917505,983041,1179649,1245185,1376257,1441793,1507329,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3407873,3473409,3538945,3670017,3735553,3801089,3866625,4128769,4194305,4325377,4456449,4521985,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6094849,6160385,6225921,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"sets":[393219,655364,786433,983041,1114113,2097153,2686977,2818049,2883585,3145729,4325377,4653057,6029314,6488065,7536641,7733249,7995393,8060930,8650756,8978435,9371649,9502721],"sample":[9371649],"stops":[786433,1835009,9502721],"subscribers":[8781826],"specifies":[2293761,3342337,3473409,3735553,9568257],"simplestatemachine":[9371649],"specified":[786433,2490369,3014657,3538945,9502721],"stretch":[6488065,8192001],"sourcenode":[4128770],"shift_y":[4194305,5111809],"significant":[4128770],"springs":[1966081],"selectial":[1048577,4980737,7864321],"states":[3801089,9371649],"setupprismaticjoint":[655361,2818050,8650753],"srcpart":[2949122,3473410,3735554,3801090,5373954,7405570,8126466,9371656],"springjoint":[1441794],"setting":[1966081,2686977,2818049,2883585,3801089,4653057,7929857,8847361,9043969,9764865],"setupdistancejoint":[655361,2097154,8650753],"stretching":[2818049,8192001],"surface":[2490369],"setcablelength":[786433,2883586,5242881,9502722],"stop":[4653057],"second":[7143425,9240577,9699329],"settransitionconstraint":[9371653],"synchronously":[3866625],"secondary":[2686977],"sorry":[131073,2228225],"search":[65537,2228225],"setup":[983041,2097153,2686977,2818049,5898241],"send":[196609,262145,327681,393217,458753,524289,589825,655361,720897,786433,851969,917505,983041,1048577,1114113,1179649,1245185,1310721,1376257,1441793,1507329,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3211265,3276801,3342337,3407873,3473409,3538945,3604481,3670017,3735553,3801089,3866625,3932161,3997697,4063233,4128769,4194305,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5308417,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"speed":[393217,3997699,4653064,8978436,9043971,9240583,9699330],"stack":[2293761,4128769],"successful":[589825,3538945,3801089,9371649],"sent":[3866625,8847361],"settings":[720897,1441793,1507329,1638401,1769473,2686978,2752513,2818050,3342337,4521985,7274497,9240577,9830401],"signficant":[4128769],"startrenderer":[262145,2162689,2490370,6750209,6815745,7077889,8060929],"single":[2031617,2097155,2686982,2818054,2883585,4259841,4325377,4653057,5046273,5242882,5701633,6488065,7602177,7929857,8192001,8257537,8454146,8585217,9043970,9240579,9306113,9502721,9699330],"strict":[9371649],"setmotor":[393217,4325377,4653058,6488065,8257537,8454145,8978433,9043969,9240578,9699329],"set":[983041,1966081,2097153,2555905,2686982,2818053,2883587,3014657,3801089,4521985,4653058,6225921,7536641,7995393,8192001,8323073,8847361,9109505,9175041,9240577,9502721,9764865],"specifics":[9502722],"speeds":[9043969],"sources":[2949121,3735553],"silently":[3801089],"said":[4653057],"supported":[2949121,3735553,5373953,9371649,9437185],"spherical":[655361,2686979,8650753],"strain":[2883585],"separated":[1769473,4653057],"state":[655361,1966084,2162689,2555905,2621442,2752513,3342338,3866626,4259842,4653057,5046273,5439489,6029313,6094849,6356994,6422529,6553601,6815745,6946817,7929858,8060929,8126465,8192001,8257537,8519681,8650753,8847361,8912897,9175044,9306115,9371652,9437186,9633795,9764869],"significantly":[4980737,6029313,8060929,8192001],"share":[6094849,8912897],"slow":[3080193],"starts":[262145,589825,786433,2490369,3014657,3735553,8060929,9371649,9502721],"shrink":[8192001],"stoprenderer":[262145,2162690,8060929],"springdamper":[2097154],"staring":[3538945],"standard":[2686977,2818049],"startphysicalhead":[786433,1835009,3014658,5242881,9502721],"sndpathbipwrong":[4390913,5177346,7274497],"sounds":[5177345],"succeed":[5373953],"specific":[2162689,3080193,6225921,9175041],"site":[131073],"size":[1769476,2293761],"string":[196609,655362,1441795,1638403,1769479,1900547,2293762,2359298,3407874,4194307,4784131,5111811,5177347,5767171,6094851,6160387,7208961,7929858,7995394,8323073,8650754],"selected":[1769473],"start":[2949121,6815745],"situation":[2293761],"setupsourcestatemodel":[9371649],"startlinking":[589825,2949122,3735555,3801089,5373955,9371651],"small":[1769473,2293761],"stretchratio":[6029313,8060929,8192002],"simple":[3342337,7798785],"started":[2490369,3407873,3735553,4456449,5373954,5439489,5505025,5701633,5832706,6029313,6750209,6815745,6946817,7077889,8060929,8781825],"setupfixedjoint":[655361,983042,8650753],"specialized":[9306113],"showing":[3801089],"stopphysicalhead":[786433,1835010,3014657,9502721],"system":[1769474,1966081,2031617,2097155,2293761,2555905,2686982,2752513,2818054,2883585,3801091,3866625,4128769,4521985,4653057,4980737,9830401],"starting":[1769473,3014657],"setcoupleonlinkmode":[1114113,4521986,6225921,7602177,7733249],"support":[4521986,7602177,9175041],"separate":[9502722],"sink":[9633793],"shadernameoverride":[6029313,7995394,8060929],"sound":[3473409,4390913,5177345,7274497],"sourcetransform":[6029313,7077890,8060929],"spindel":[3997698,8978434,9043969,9240577],"similar":[7929857],"subscriber":[8781825],"stretchcable":[393217,4325377,4653057,6488066,8454145,8978433],"sate":[8126465],"safe":[2621441,3473409],"strong":[458753,1769473,2031617,2883585,9437185],"shader":[6029313,7995395,8060929],"special":[2883585],"sense":[3801089],"spring":[2097154,2686977,2818051],"simpley":[4194305,5111809],"setupsphericaljoint":[655361,2686978,8650753],"successfully":[3145729,3538945,3735553,5373954,5439489,6291457,8781825],"strength":[2097153],"springdamperratio":[2686978,2818050],"setter":[8192001],"stopped":[2162691,5505025,6291457,8781825],"stretched":[5701633,6029313,8060929,8192002],"static":[327681,851969,917505,1245185,1376257,1507329,2424833,2949121,3473409,3735553,3801089,5373953,7405569,8126465,9371653,9764865,9830401],"shortcutsdemo":[4194305,5111809],"srcpeer":[3670018],"stay":[2686977],"scope":[1769473,4784129,5439489,6946817]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_116.json b/docs/APIv1/fti/FTI_116.json deleted file mode 100644 index 5b16c9c66..000000000 --- a/docs/APIv1/fti/FTI_116.json +++ /dev/null @@ -1 +0,0 @@ -{"tools":[3342339,7340033,7864321,8650753],"transition":[9371649,9633793,9764866],"takes":[3342337,8060929],"taken":[4259841,8912897,9306113],"types":[3342337,5767169,8126465],"three":[2686977],"tiny":[1769473],"try":[131073,2228225,5242881,9502721],"techniques":[3080193],"thumb":[4653057],"title":[65537],"triggred":[3866625],"todominantvessel":[4128771],"tranistion":[9175041],"top":[196609,262145,393217,458753,589825,655361,720897,786433,1048577,1114113,1310721,1572865,2228225,3211265,3276801,3604481,3932161,3997697,4063233,4259841,4390913,4587521,5308417,6029313,6291457,7208961,7274497,7340033,7733250,7798785,7864321,8060930,8519681,8650753,8716289,8781825,8978434,9306113,9371650,9437185,9502722,9633793,9830401],"two":[589826,1310722,1769475,2097153,2949121,3342338,3538945,3604482,3735553,3801089,4128770,5373954,5439489,6291458,6946817,7143425,7340034,8060929,8781826,9371654,9633793],"tgtpart":[2949122,3735554,3801090,5373954,9371652,9764866],"text":[1441793,1638401],"targettransform":[6029313,6750210,8060929],"trying":[9240577],"teh":[4718593],"transform":[196609,524292,1835009,2162690,2293763,2359297,2490372,3014660,3407876,4259841,5242881,6029314,6750214,6815746,7077894,7208961,8060930,8388611,9306113],"transitions":[3538945],"turns":[4653057,8847361],"transformation":[8388609],"triggers":[458753,1572866,2031617,2752514,3866625,5439489,5505025,5832705,6291460,6946817,8519682,8781828,8847361,9437185],"track":[7929857],"thrown":[8781825,9764865],"transformations":[8060929],"triggered":[3342337,3866625,4521985,8781825],"typo":[2228225],"trasnform":[524289],"thrid":[8126465],"time":[2162689,2555905,3342337,3735553,4653058,7929857,9240577],"target":[589825,786433,1114114,2162689,2359299,2490372,2621441,2752513,2883585,2949126,3145732,3276802,3342338,3407875,3473411,3538947,3670019,3735558,3801099,3932161,4063234,4128771,4521987,4653058,4849668,4915202,4980738,5242881,5308417,5373962,5439490,5505026,5570561,5701633,5832706,6029313,6750210,6946818,7405570,7733251,7798787,8060929,8126466,8454145,8519681,8781826,9043969,9371658,9502724,9633807,9764868],"targets":[2949121,3735553],"tells":[720897,2162689,2424833,2949121,3473409,3735553,3801089,3866625,3932164,3997697,4259843,4915201,4980737,5373953,5570561,6029314,6225921,6422529,6553601,6815745,7667713,7733252,8060930,8126465,8257537,8847361,8912897,8978433,9306115,9371651,9633793,9830401],"trigger":[2883586,4194305,4390914,4521985,5111809,7274498,9764865],"true":[2555905,2686977,2818049,2949121,3145729,3538945,3735554,3801095,4128769,4521985,5373954,5570561,6225922,6553601,8257537,9371650],"touched":[1966081],"torque":[2686979],"throw":[2621441],"treated":[2162689],"targetspeed":[4653059],"targe":[9633793],"tate":[3276801,4718593,7798785],"temporally":[6029314,7536641,7995393,8060930],"triggering":[8781825],"targetnode":[4128770],"topic":[1,196609,262145,327681,393217,458753,524289,589825,655361,720897,786433,851969,917505,983041,1048577,1114113,1179649,1245185,1310721,1376257,1441793,1507329,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3211265,3276801,3342337,3407873,3473409,3538945,3604481,3670017,3735553,3801089,3866625,3932161,3997697,4063233,4128769,4194305,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5308417,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"traget":[8257537],"times":[2490369],"theoretical":[3801089],"type":[196609,262145,327681,393217,458753,524291,589825,655361,720897,786433,851969,917505,983041,1048577,1114113,1179650,1245185,1310721,1376257,1441794,1507329,1572865,1638402,1703938,1769477,1900546,1966081,2031618,2097156,2293765,2359299,2424833,2490370,2555905,2686983,2752514,2818055,2883585,3014658,3145731,3211265,3276801,3407875,3473409,3538947,3670018,3735555,3801093,3866626,3932161,3997697,4063233,4128772,4194305,4259842,4390913,4456449,4521986,4587521,4653057,4718594,4784129,4849665,4915201,4980740,5046273,5111809,5177345,5242881,5308417,5373954,5439489,5505025,5570561,5636097,5701633,5767170,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143429,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126466,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9240577,9306114,9371649,9437185,9502721,9633793,9699329,9764865,9830401],"third":[3342337,7733249],"till":[1835009,3473409,3997697,8454145,8978433]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_117.json b/docs/APIv1/fti/FTI_117.json deleted file mode 100644 index 13490d60f..000000000 --- a/docs/APIv1/fti/FTI_117.json +++ /dev/null @@ -1 +0,0 @@ -{"untils":[720897,1245185,9830401],"unbreakable":[1114113,2555908,7733249],"url":[2228225,4390913,5177345,7274497],"undefined":[6750209,7077889],"uninitialized":[9568257],"unexpected":[2293761],"update":[262145,1835009,2490370,2686978,2818050,3080194,3473410,8060929],"utils":[327681,720899,851969,917505,9830403],"unit":[2818049],"unique":[1769473,4784129,6029313,6160385,8060929],"uint":[7471105],"unity3d":[8847361],"unrestricted":[2686977],"unityengine":[983041,1441793,1638401,1966081,2031617,2097153,2293761,2490370,2686977,2818049,3014657,3407874,4980737],"unlocks":[8257537],"unlocked":[2949121],"undocks":[8257537],"uint32":[7471105],"updated":[2293761,3145729],"unity":[2031617,3473409,4194305,5111809],"unspecified":[8126465],"user":[196609,1900546,2359297,2949121,3407873,3473409,3735553,3801089,5373953,7208961,8126465,9371650],"untiy3d":[2359297,3014658,3473410,4456449],"using":[2686977,2818049,3342337,5439489,6946817],"useful":[1900545],"unavailable":[9175041],"updatelink":[262145,3080194,8060930],"used":[1769473,3014657,4653057,5767169,6029313,6160385,7536641,7929857,7995393,8060929,8126465,8912897,9175041,9568257],"unused":[6488065],"unblocked":[3866625],"unchanged":[2686977]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_118.json b/docs/APIv1/fti/FTI_118.json deleted file mode 100644 index fb61ce0c6..000000000 --- a/docs/APIv1/fti/FTI_118.json +++ /dev/null @@ -1 +0,0 @@ -{"valid":[3670017,4980737],"values":[2490369,2883585,4653058,8454145],"vessel":[1310721,4128777,4980741,5963777,7143429,7340033,7471105,8257538,9109505],"vessels":[1310721,3342337,4128770,4521985,6225921,7340033,8716289],"vesselinfo2":[7143426],"vesselinfo1":[7143426],"virtual":[9437185],"various":[3342341,5242881,7208961,7274497,7340033,7864321,8650753,9043969],"view":[327681,524289,851969,917505,983041,1179649,1245185,1376257,1441793,1507329,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3407873,3473409,3538945,3670017,3735553,3801089,3866625,4128769,4194305,4325377,4456449,4521985,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6094849,6160385,6225921,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"vesse":[4587521,8716289,9109505],"versions":[3670017],"vesselinfo":[4587521,8716289,9109506],"vary":[3342337],"value":[327681,393217,524289,851969,917505,1245185,1376257,1441793,1507329,1638401,1769476,1900545,2293761,2359297,2424833,2818049,2883588,3145729,3407873,3538945,3670017,3735553,3801089,4128769,4194305,4325377,4456449,4521985,4653063,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242883,5373953,5439489,5505025,5570561,5636097,5701633,5767170,5832705,5898241,5963778,6094849,6160385,6225921,6356993,6422529,6553601,6619137,6684673,6750210,6815745,6881281,6946817,7012353,7077890,7143425,7405569,7471106,7536641,7602177,7667713,7929857,7995393,8126465,8192002,8257537,8323073,8388609,8454146,8585217,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9568258,9699329,9764868],"verifies":[262145,589825,3407873,3801089,8060929,9371649],"visual":[3473409,8192001],"var":[2949122,3342338,3473409,3735554,3801090,4194311,5111815,5373954,7405569,8126465,9371653,9764865],"variable":[9502721],"version":[327681,524289,851969,917505,983041,1179649,1245185,1376257,1441793,1507329,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3342342,3407873,3473409,3538946,3670017,3735553,3801089,3866625,4128769,4194305,4325377,4456449,4521985,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6094849,6160385,6225921,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830402],"void":[983041,1179649,1703937,1835009,1966081,2031617,2097153,2162689,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3342337,3473410,3866625,4194305,4325377,4653057,4980737,5111809,5439494,5505030,5832710,6488065,6946822,8126465,8323073,8781830,9371650,9437185]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_119.json b/docs/APIv1/fti/FTI_119.json deleted file mode 100644 index f6211324e..000000000 --- a/docs/APIv1/fti/FTI_119.json +++ /dev/null @@ -1 +0,0 @@ -{"warp":[2555905],"waitforendofframe":[3473409],"wants":[4259841,7929857,9306113],"web":[2228225],"working":[9043969],"world":[9043969,9371649,9633797],"warning":[1703937,2293761,9437185],"works":[5701633],"winch":[393218,3342337,3997698,4653059,6488065,8257539,8454145,8585218,8978437],"warnings":[3801089],"workflow":[8126465],"work":[3342337,3866625]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_121.json b/docs/APIv1/fti/FTI_121.json deleted file mode 100644 index 6edce9ec4..000000000 --- a/docs/APIv1/fti/FTI_121.json +++ /dev/null @@ -1 +0,0 @@ -{"yield":[3473409],"yup":[4194305,5111809]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_97.json b/docs/APIv1/fti/FTI_97.json deleted file mode 100644 index 20db21584..000000000 --- a/docs/APIv1/fti/FTI_97.json +++ /dev/null @@ -1 +0,0 @@ -{"assign":[9764865],"allow":[1114113,2097153,2359297,7733249,7929857,9502721],"applygravity":[1048577,4980738,7864321],"attaches":[786433,3014657,9502721],"anglelimitdamperratio":[2686978],"align":[4259841,4653057,7929857,9306113],"assembly":[327681,524289,851969,917505,983041,1179649,1245185,1376257,1441793,1507329,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3342338,3407873,3473409,3538945,3670017,3735553,3801089,3866625,4128769,4194305,4325377,4456449,4521985,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6094849,6160385,6225921,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"attachmethod":[1769474],"applies":[1048577,4980737,7864321],"applied":[458753,2031618,2686977,2818049,2883585,5701633,9437185],"algorithm":[3080193],"approach":[3670017,9175041],"allocated":[9175041],"actual":[393217,1769473,2031617,2883585,3014657,3801089,4063233,5701633,6225921,6488065,7602177,8454145,8978433,9240577,9371649,9502723],"active":[4128769,6029313,6815745,8060929],"able":[5767169,9633793],"addnode":[196609,1703938,7208961,7602177],"adjust":[5242881,7929857,8060929,9502721],"allows":[1769473,3342337,3866625,7929857,8978433],"addstatehandlers":[9371649],"adjustjoint":[1114113,2555906,7733249],"arbitary":[4784129],"anchors":[786433,2883585,4063234,4259841,5242881,5701633,8388609,9306113,9502723],"affects":[8192001],"accumulated":[1966081],"anglelimitforce":[2686978],"assumes":[2686977,2818049,7405569,9371649,9764865],"assumed":[1769473],"adds":[196609,1703937,7208961],"assuming":[2949121,3735553,3801089,5373953,9371649],"attach":[196614,524291,720897,917505,1179650,1572865,1703939,1769475,1900545,2293763,3014657,3342337,3866625,4128771,4259846,5898243,6094851,6553601,7208967,7602179,7929857,8519681,8912899,9175041,9306118,9830401],"attempted":[4653057],"atmosphere":[4980737],"atatched":[2293761],"avoid":[2883585,3080193,3801089],"alt_y":[4194305,5111809],"api":[65537,131073,196609,262145,327684,393217,458753,524292,589825,655361,720898,786433,851972,917508,983044,1048577,1114113,1179652,1245188,1310721,1376260,1441796,1507332,1572865,1638404,1703940,1769476,1835012,1900548,1966084,2031620,2097156,2162692,2228225,2293764,2359300,2424837,2490372,2555908,2621444,2686980,2752516,2818052,2883588,2949127,3014660,3080196,3145732,3211265,3276801,3342347,3407876,3473414,3538948,3604481,3670020,3735559,3801094,3866628,3932161,3997697,4063233,4128772,4194308,4259841,4325380,4390913,4456452,4521988,4587521,4653060,4718596,4784132,4849668,4915204,4980740,5046276,5111812,5177348,5242884,5308417,5373959,5439492,5505028,5570564,5636100,5701636,5767172,5832708,5898244,5963780,6029313,6094852,6160388,6225924,6291457,6356996,6422532,6488068,6553604,6619140,6684676,6750212,6815748,6881284,6946820,7012356,7077892,7143428,7208964,7274500,7340036,7405572,7471108,7536644,7602180,7667716,7733252,7798788,7864324,7929860,7995396,8060932,8126472,8192004,8257540,8323076,8388612,8454148,8519684,8585220,8650756,8716292,8781828,8847364,8912900,8978436,9043972,9109508,9175044,9240580,9306116,9371657,9437188,9502724,9568261,9633796,9699332,9764868,9830406],"axes":[2686978],"axis":[2686978,2818053],"avalable":[9175041],"accepted":[4521985,9175041],"attempt":[3801089,4653058],"argument":[5439489,5505025,5832705,6946817],"actually":[9240577,9437185],"added":[524289,1769474],"administrator":[131073],"angle":[2686979],"allowing":[1769473],"affect":[1048577,3866625,4653057,4980737,5242881,7864321],"attachnodesutils":[720897,917506,9830401],"accordingly":[2490369,4521985],"add":[1703939,5439493,5505029,5832709,6946821,8781829],"attached":[4128769,8257537],"angular":[1966081,2686979],"actor":[3276802,3342337,3538947,3735554,4718596,5373953,7798786,8126466],"actortype":[3473410],"arbitrary":[4521985,5767169,6094849,6160385],"anymore":[2162689],"available":[2228225,4980737,5963777,7471105,8257537,9175041,9371662,9633798,9764865],"accept":[2490369,9175043],"applying":[2097153,2686977],"allowed":[393217,2490369,2818050,4063233,4325377,4653058,5046273,8978433,9371649,9502722,9633793],"acceptinglinks":[9175041,9633796],"associated":[5373953],"apply":[2097153,2686980,2818052,4980737],"assigning":[9764865],"address":[2228225],"array":[2359297,3407873],"attachnode":[524290,1179653,1703941,1769474,1900546,2293764,4128772,4259841,5898244,7602181,9306113],"air":[4980737],"alaready":[1703937],"affected":[8126466,8454145],"adjustments":[1966081],"aligned":[4259841,6029314,6750209,7077889,8060930,8388609,9306113],"ability":[3342337,4259841,8912897,9306113],"action":[3473410,3735553,3801089,4390913,4521985,4718593,5177345,7274497,8126465,9371649,9633793],"actors":[3473409],"alas":[4980737],"attachnodemethod":[2293761],"actions":[2031617,9175041,9371649,9633793],"automatically":[1,1769473,4653057],"affecting":[1966081],"arguments":[2490369],"appropriate":[8781825],"anglelimit":[2686980],"additionally":[7143425],"assemblies":[3342337]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_98.json b/docs/APIv1/fti/FTI_98.json deleted file mode 100644 index c1692b991..000000000 --- a/docs/APIv1/fti/FTI_98.json +++ /dev/null @@ -1 +0,0 @@ -{"breakforce":[2031618,9437186],"brand":[2883585],"breakcurrentlink":[589825,3473412,3538945,5373953,8126465,9371652],"brokenjointlistenerexample":[9437185],"box":[2228225],"broke":[9371650,9633793],"beween":[262145,3407873,8060929],"blocked":[1572865,3866627,8519681],"built":[3342337],"breaking":[3342337,9437185],"bool":[2424833,2555905,2752513,2949121,3145729,3538945,3735554,3801093,3866625,4128769,4521986,5373954,5570561,6225921,6422529,6553601,6815745,8257537,8847361,8912897,9371650],"block":[1441793,1638401,7929857],"base":[3342338,4259841,4980737,5439489,5505025,5832705,6029314,6750209,6946817,7077889,7733249,8060930,8388609,8781825,9306114],"body":[1048577,1966081,4980737,7864321],"boundary":[2883585],"behave":[2555905],"breaks":[589825,1310721,3473409,7143425,7340033,9371649],"bad":[4653057],"bit":[9502721],"break":[2031617,3342337,3473409],"beginning":[6029313,7077889,8060929],"bound":[6094849],"belong":[1310721,1703937,4128769,5898241,7340033],"boolean":[2424833,2555905,2752513,3145729,3538945,3735553,3801092,3866625,4128769,4521987,5373956,5439489,5570561,6225922,6422529,6553601,6815745,6946817,7602178,8257537,8847361,8912897],"bodies":[2818049,6029313,8060929,8847361],"broken":[458753,1835009,1966081,2031617,3473410,5439489,5505025,5832705,6291457,6946818,8781826,8912897,9437186,9633793]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_99.json b/docs/APIv1/fti/FTI_99.json deleted file mode 100644 index 8fa78ecff..000000000 --- a/docs/APIv1/fti/FTI_99.json +++ /dev/null @@ -1 +0,0 @@ -{"clear":[9175041],"currectly":[4259841,6422529,9306113],"coupling":[1769474,3932161,4128771,4521988,6094849,6225921,7143426,7602178,7733249],"creates":[196611,524289,1769473,2293761,4128769,7208963],"created":[1572865,1769474,1966081,2293761,2359297,2752513,2883587,3145730,3342337,3932161,5242881,5439489,5505025,5570561,5701633,5832705,6946817,7733249,8519681,8781825,9502722],"connecting":[8060929],"check":[2228225,3342337,3801091,7929857,8126465],"constrained":[2818049],"cfgattachnodename":[4259841,6094850,7929857,9306113],"crossfeedallowed":[1769474],"connectparts":[2949121,3735553,5373953,9371649],"completely":[1769473,2686977],"connect":[524289,3801089,5767169,9633794],"colliders":[3342337,8060929,8847361],"cfgdependentnodenames":[4259841,7929858,9306113],"creation":[5898241],"cfgmotormaxspeed":[3997697,8978433,9043969,9699330],"couplenode":[4259841,4521985,7602178,9306113],"cfgrenderername":[6029313,6160386,8060929,8323073],"callers":[2490369,2555905,3080193],"controlling":[4653057],"comparing":[6029313,8060929,8192001],"coordinating":[3866625],"create":[524289,1769474,2293762],"coupleonlinkmode":[3145729,3932161,4521985,6225922,7733249,8257537],"changing":[2686977,2818049,4653057],"control":[7929857,9240577],"conditions":[5373953,9043969],"com":[196609,262145,327681,393217,458753,524289,589825,655361,720897,786433,851969,917505,983041,1048577,1114113,1179649,1245185,1310721,1376257,1441793,1507329,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3211265,3276801,3342337,3407873,3473409,3538945,3604481,3670017,3735553,3801089,3866625,3932161,3997697,4063233,4128769,4194305,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5308417,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"coded":[4194305,5111809],"components":[1966081],"code":[3342337,3670017,3801089,7733249,8126465,9437185,9502721,9764865],"clearly":[3342337],"couple":[1114113,4128769,4259841,4521986,6225921,7602177,7733249,9306113],"core":[3473409],"checked":[3801089,4194305,5111809,5373953],"createnode":[196609,2293762,7208961],"comma":[1769473],"cross":[1769473],"configuration":[2686977,2818049,4653057],"combindations":[2686977,2818049],"caller":[3801089,4521985,7602177],"currentcablelength":[3997697,4653057,6488065,8454146,8978433],"cancels":[262145,589825,2162689,2949121,8060929,9371649],"child":[4128769,7143427],"coupleparts":[1310721,4128770,7340033,7602177],"commands":[4653057],"cfgjointname":[3932161,4784130,7733249],"checkconstraints":[1114113,2359298,3145730,7733249],"connects":[2949121,3735553,3801089,5373953,9371649],"comments":[196609,262145,327681,393217,458753,524289,589825,655361,720897,786433,851969,917505,983041,1048577,1114113,1179649,1245185,1310721,1376257,1441793,1507329,1572865,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949121,3014657,3080193,3145729,3211265,3276801,3342337,3407873,3473409,3538945,3604481,3670017,3735553,3801089,3866625,3932161,3997697,4063233,4128769,4194305,4259841,4325377,4390913,4456449,4521985,4587521,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111809,5177345,5242881,5308417,5373953,5439489,5505025,5570561,5636097,5701633,5767169,5832705,5898241,5963777,6029313,6094849,6160385,6225921,6291457,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946817,7012353,7077889,7143425,7208961,7274497,7340033,7405569,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126465,8192001,8257537,8323073,8388609,8454145,8519681,8585217,8650753,8716289,8781825,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371649,9437185,9502721,9568257,9633793,9699329,9764865,9830401],"ctrl_y":[4194305,5111809],"cable":[393218,2883586,3014658,3342337,3997700,4063233,4325377,4456449,4653063,5701633,6488067,8257538,8454146,8585218,8978438,9240579,9502722,9699329],"closest":[2883585,4980737],"color":[6029313,7536645,8060929],"compatible":[5767169],"checks":[1114113,2359297,7733249,9371649],"call":[983041,1835009,2097153,2162690,2490369,3080193,3145729,3407873,3473409,4653058,5373953,9371652],"ctrl2_y":[4194305,5111809],"collection":[5439489,5505025,5832705,6946817,8781825],"contain":[2228225],"calls":[8192001,9568257],"classes":[3342337],"consists":[1769473],"common":[720897,1507329,9830401],"choice":[4980737],"connection":[458753,1966081,2031617,2555905,6029314,6750209,7077889,7143426,8060930,9371650,9437185],"calculate":[8454145],"checkifconnected":[9371649],"collision":[8847361],"calling":[2883585,3080193,9437185],"conflict":[3342337],"cancellinking":[589825,2949123,3735554,3801089,5373953,9371651],"complete":[9306113,9568258],"commonconfig":[720897,1507330,9830401],"controls":[7733249],"changed":[2555905,2818049,2883585,3276801,3342337,4718593,7798785,8126465,9437185],"changes":[1114113,3342339,4521985,7733249,8126465,8519681,9764867],"cancel":[3801089,9568257],"contact":[131073],"connectpartswithcheck":[3801089],"choose":[2162689],"ctrl":[4194305,5111809],"cycles":[4521985],"configurablejoint":[983043,1638402,1966082,2097155,2686979,2818051],"consistent":[655361,983041,1966083,2097153,8650753],"cooperate":[7929857],"coloroverride":[6029313,7536642,8060929],"callbacks":[8781825],"createjoint":[1114113,2621441,3145730,7733249],"cancelled":[5373953,9371650],"care":[3342337,7929857,8060929,8192001,9437185],"case":[3342337,4653057,5373953,6094849],"constant":[2490369,5046273],"completed":[2752513,9371649],"copy":[327681,524289,851969,917505,983041,1179649,1245185,1376257,1441793,1507329,1638401,1703937,1769473,1835009,1900545,1966081,2031617,2097153,2162689,2293761,2359297,2424833,2490369,2555905,2621441,2686977,2752513,2818049,2883585,2949122,3014657,3080193,3145729,3342338,3407873,3473411,3538945,3670017,3735554,3801090,3866625,4128769,4194306,4325377,4456449,4521985,4653057,4718593,4784129,4849665,4915201,4980737,5046273,5111810,5177345,5242881,5373954,5439490,5505026,5570561,5636097,5701633,5767169,5832706,5898241,5963777,6094849,6160385,6225921,6356993,6422529,6488065,6553601,6619137,6684673,6750209,6815745,6881281,6946818,7012353,7077889,7143425,7208961,7274497,7340033,7405570,7471105,7536641,7602177,7667713,7733249,7798785,7864321,7929857,7995393,8060929,8126466,8192001,8257537,8323074,8388609,8454145,8519681,8585217,8650753,8716289,8781826,8847361,8912897,8978433,9043969,9109505,9175041,9240577,9306113,9371654,9437186,9502721,9568257,9633793,9699329,9764866,9830401],"currect":[3342337,9175041],"checkcanlinkto":[589825,3801091,5373953,9371649],"constraints":[1114113,2359297,2686977,2949121,3735553,5373953,7733249,9371649],"coordinate":[1966081],"cfgmaxcablelength":[2883587,3997697,4063233,4325377,4653057,5046274,5242881,8585218,8978433,9502721],"checkstates":[3801090],"cleanup":[2621441],"creating":[589825,1966081,2949121,3538945,5373953,9371649],"closer":[9502721],"collider":[8847362],"couples":[1310721,4128769,7340033],"coupled":[4128769,4521985,6225922],"connected":[1179649,1310721,1966082,2162689,3473411,7143425,7340033,7405569,8126467,9371653,9764865],"cannonical":[655362,983041,2097153,8650754],"coroutine":[1835009,3473409],"cases":[4521985],"consider":[2686978,2818050,3080193,5439489,6946817],"called":[262145,1835009,2031617,2621441,2883585,3080193,3145729,3473410,8060929,8781825],"continue":[3342337],"checkcolliderhits":[262145,3407874,8060929],"config":[196609,720897,1507329,1769473,7208961,7929857,9830401],"callback":[5439490,5505026,5832706,6946818,9437185],"class":[327681,720897,851969,917505,1245185,1376257,1507329,2424833,3342338,3473409,5439489,5505025,5832705,6946817,8781825,9437185,9830402],"checking":[3801089],"cost":[2162689,3080193],"current":[1114113,2883585,3932163,3997697,4194305,4259841,4521985,4653057,4915201,5111809,6225921,6356994,6422529,7667713,7733252,8847361,8978433,9240578,9306113],"calm":[2097153],"change":[2686978,2752513,2818050,3342337,3473409,3670017,4521986,4653058,5439489,6946817,7929857,9764865],"cfglinktype":[2949122,3735554,3801090,4259841,5373954,5767170,9306113,9371650],"configured":[2883585],"connector":[393217,3997697,4194305,4325377,4390914,4653061,5111809,6488065,7274498,8257541,8454145,8585217,8978434],"container":[3342337,7274497]} \ No newline at end of file diff --git a/docs/APIv1/fti/FTI_Files.json b/docs/APIv1/fti/FTI_Files.json deleted file mode 100644 index e75be3e84..000000000 --- a/docs/APIv1/fti/FTI_Files.json +++ /dev/null @@ -1 +0,0 @@ -["KAS API v1 - Redirect\u0000index.html\u000018","KAS API v1 - Search\u0000search.html\u000012","General Error\u0000html/GeneralError.htm\u000033","IAttachNodesUtils Methods\u0000html/Methods_T_KASAPIv1_IAttachNodesUtils.htm\u0000100","ILinkRenderer Methods\u0000html/Methods_T_KASAPIv1_ILinkRenderer.htm\u000074","KASAPI.PhysicsUtils Field\u0000html/F_KASAPIv1_KASAPI_PhysicsUtils.htm\u000068","IWinchControl Methods\u0000html/Methods_T_KASAPIv1_IWinchControl.htm\u000080","IKasJointEventsListener Methods\u0000html/Methods_T_KASAPIv1_IKasJointEventsListener.htm\u000055","IAttachNodesUtils.GetTransformForNode Method\u0000html/M_KASAPIv1_IAttachNodesUtils_GetTransformForNode.htm\u0000139","ILinkSource Methods\u0000html/Methods_T_KASAPIv1_ILinkSource.htm\u0000102","IJointUtils Methods\u0000html/Methods_T_KASAPIv1_IJointUtils.htm\u0000109","KASAPI Fields\u0000html/Fields_T_KASAPIv1_KASAPI.htm\u000082","ILinkCableJoint Methods\u0000html/Methods_T_KASAPIv1_ILinkCableJoint.htm\u000077","KASAPI.LinkUtils Field\u0000html/F_KASAPIv1_KASAPI_LinkUtils.htm\u000068","KASAPI.AttachNodesUtils Field\u0000html/F_KASAPIv1_KASAPI_AttachNodesUtils.htm\u000069","IJointUtils.SetupFixedJoint Method\u0000html/M_KASAPIv1_IJointUtils_SetupFixedJoint.htm\u0000123","IPhysicsUtils Methods\u0000html/Methods_T_KASAPIv1_IPhysicsUtils.htm\u000051","ILinkJoint Methods\u0000html/Methods_T_KASAPIv1_ILinkJoint.htm\u000093","IAttachNodesUtils.DropNode Method\u0000html/M_KASAPIv1_IAttachNodesUtils_DropNode.htm\u0000126","KASAPI.JointUtils Field\u0000html/F_KASAPIv1_KASAPI_JointUtils.htm\u000068","ILinkUtils Methods\u0000html/Methods_T_KASAPIv1_ILinkUtils.htm\u000073","KASAPI.KasEvents Field\u0000html/F_KASAPIv1_KASAPI_KasEvents.htm\u000068","IJointUtils.DumpSpringJoint Method\u0000html/M_KASAPIv1_IJointUtils_DumpSpringJoint.htm\u000096","KASAPI.CommonConfig Field\u0000html/F_KASAPIv1_KASAPI_CommonConfig.htm\u000069","ILinkStateEventListener Methods\u0000html/Methods_T_KASAPIv1_ILinkStateEventListener.htm\u000070","IJointUtils.DumpJoint Method\u0000html/M_KASAPIv1_IJointUtils_DumpJoint.htm\u000096","IAttachNodesUtils.AddNode Method\u0000html/M_KASAPIv1_IAttachNodesUtils_AddNode.htm\u0000166","IAttachNodesUtils.ParseNodeFromString Method\u0000html/M_KASAPIv1_IAttachNodesUtils_ParseNodeFromString.htm\u0000449","ILinkCableJoint.StopPhysicalHead Method\u0000html/M_KASAPIv1_ILinkCableJoint_StopPhysicalHead.htm\u0000127","IAttachNodesUtils.NodeId Method\u0000html/M_KASAPIv1_IAttachNodesUtils_NodeId.htm\u0000115","IJointUtils.ResetJoint Method\u0000html/M_KASAPIv1_IJointUtils_ResetJoint.htm\u0000239","IKasJointEventsListener.OnKASJointBreak Method\u0000html/M_KASAPIv1_IKasJointEventsListener_OnKASJointBreak.htm\u0000140","IJointUtils.SetupDistanceJoint Method\u0000html/M_KASAPIv1_IJointUtils_SetupDistanceJoint.htm\u0000204","ILinkRenderer.StopRenderer Method\u0000html/M_KASAPIv1_ILinkRenderer_StopRenderer.htm\u0000151","Page Not Found\u0000html/PageNotFound.htm\u000067","IAttachNodesUtils.CreateNode Method\u0000html/M_KASAPIv1_IAttachNodesUtils_CreateNode.htm\u0000231","ILinkJoint.CheckConstraints Method\u0000html/M_KASAPIv1_ILinkJoint_CheckConstraints.htm\u0000136","KASAPI.isLoaded Field\u0000html/F_KASAPIv1_KASAPI_isLoaded.htm\u000075","ILinkRenderer.StartRenderer Method\u0000html/M_KASAPIv1_ILinkRenderer_StartRenderer.htm\u0000229","ILinkJoint.AdjustJoint Method\u0000html/M_KASAPIv1_ILinkJoint_AdjustJoint.htm\u0000135","ILinkJoint.DropJoint Method\u0000html/M_KASAPIv1_ILinkJoint_DropJoint.htm\u0000116","IJointUtils.SetupSphericalJoint Method\u0000html/M_KASAPIv1_IJointUtils_SetupSphericalJoint.htm\u0000486","ILinkStateEventListener.OnKASLinkedState Method\u0000html/M_KASAPIv1_ILinkStateEventListener_OnKASLinkedState.htm\u0000130","IJointUtils.SetupPrismaticJoint Method\u0000html/M_KASAPIv1_IJointUtils_SetupPrismaticJoint.htm\u0000491","ILinkCableJoint.SetCableLength Method\u0000html/M_KASAPIv1_ILinkCableJoint_SetCableLength.htm\u0000308","ILinkSource.CancelLinking Method\u0000html/M_KASAPIv1_ILinkSource_CancelLinking.htm\u0000330","ILinkCableJoint.StartPhysicalHead Method\u0000html/M_KASAPIv1_ILinkCableJoint_StartPhysicalHead.htm\u0000160","ILinkRenderer.UpdateLink Method\u0000html/M_KASAPIv1_ILinkRenderer_UpdateLink.htm\u0000116","ILinkJoint.CreateJoint Method\u0000html/M_KASAPIv1_ILinkJoint_CreateJoint.htm\u0000191","ILinkTarget Properties\u0000html/Properties_T_KASAPIv1_ILinkTarget.htm\u000045","IKasLinkEvent Properties\u0000html/Properties_T_KASAPIv1_IKasLinkEvent.htm\u000054","KASAPIv1 Namespace\u0000html/N_KASAPIv1.htm\u0000555","ILinkRenderer.CheckColliderHits Method\u0000html/M_KASAPIv1_ILinkRenderer_CheckColliderHits.htm\u0000135","ILinkSource.BreakCurrentLink Method\u0000html/M_KASAPIv1_ILinkSource_BreakCurrentLink.htm\u0000440","ILinkSource.LinkToTarget Method (LinkActorType, ILinkTarget)\u0000html/M_KASAPIv1_ILinkSource_LinkToTarget_1.htm\u0000174","ILinkSource.LinkToTarget Method\u0000html/Overload_KASAPIv1_ILinkSource_LinkToTarget.htm\u000054","ILinkUtils.FindLinkPeer Method\u0000html/M_KASAPIv1_ILinkUtils_FindLinkPeer.htm\u0000146","ILinkSource.StartLinking Method\u0000html/M_KASAPIv1_ILinkSource_StartLinking.htm\u0000399","ILinkSource.CheckCanLinkTo Method\u0000html/M_KASAPIv1_ILinkSource_CheckCanLinkTo.htm\u0000485","ILinkStateEventListener.OnKASNodeBlockedState Method\u0000html/M_KASAPIv1_ILinkStateEventListener_OnKASNodeBlockedState.htm\u0000170","ILinkJoint Properties\u0000html/Properties_T_KASAPIv1_ILinkJoint.htm\u000078","IWinchControl Properties\u0000html/Properties_T_KASAPIv1_IWinchControl.htm\u000099","ILinkCableJoint Properties\u0000html/Properties_T_KASAPIv1_ILinkCableJoint.htm\u000085","ILinkUtils.CoupleParts Method\u0000html/M_KASAPIv1_ILinkUtils_CoupleParts.htm\u0000297","ICommonConfig.keyDropConnector Property\u0000html/P_KASAPIv1_ICommonConfig_keyDropConnector.htm\u0000244","ILinkPeer Properties\u0000html/Properties_T_KASAPIv1_ILinkPeer.htm\u0000224","IWinchControl.ReleaseCable Method\u0000html/M_KASAPIv1_IWinchControl_ReleaseCable.htm\u000097","ICommonConfig Properties\u0000html/Properties_T_KASAPIv1_ICommonConfig.htm\u000068","ILinkCableJoint.headRb Property\u0000html/P_KASAPIv1_ILinkCableJoint_headRb.htm\u000095","ILinkJoint.SetCoupleOnLinkMode Method\u0000html/M_KASAPIv1_ILinkJoint_SetCoupleOnLinkMode.htm\u0000233","ILinkVesselInfo Properties\u0000html/Properties_T_KASAPIv1_ILinkVesselInfo.htm\u000051","IWinchControl.SetMotor Method\u0000html/M_KASAPIv1_IWinchControl_SetMotor.htm\u0000385","IKasLinkEvent.actor Property\u0000html/P_KASAPIv1_IKasLinkEvent_actor.htm\u000084","ILinkJoint.cfgJointName Property\u0000html/P_KASAPIv1_ILinkJoint_cfgJointName.htm\u000094","IKasLinkEvent.target Property\u0000html/P_KASAPIv1_IKasLinkEvent_target.htm\u000077","ILinkJoint.linkTarget Property\u0000html/P_KASAPIv1_ILinkJoint_linkTarget.htm\u000087","IPhysicsUtils.ApplyGravity Method\u0000html/M_KASAPIv1_IPhysicsUtils_ApplyGravity.htm\u0000198","ILinkCableJoint.cfgMaxCableLength Property\u0000html/P_KASAPIv1_ILinkCableJoint_cfgMaxCableLength.htm\u000094","ICommonConfig.keyPickupConnector Property\u0000html/P_KASAPIv1_ICommonConfig_keyPickupConnector.htm\u0000244","ICommonConfig.sndPathBipWrong Property\u0000html/P_KASAPIv1_ICommonConfig_sndPathBipWrong.htm\u000089","ILinkCableJoint.deployedCableLength Property\u0000html/P_KASAPIv1_ILinkCableJoint_deployedCableLength.htm\u0000166","ILinkSource Properties\u0000html/Properties_T_KASAPIv1_ILinkSource.htm\u000060","ILinkSource.LinkToTarget Method (ILinkTarget)\u0000html/M_KASAPIv1_ILinkSource_LinkToTarget.htm\u0000449","IKasEvents.OnLinkCreated Property\u0000html/P_KASAPIv1_IKasEvents_OnLinkCreated.htm\u0000346","IKasEvents.OnStopLinking Property\u0000html/P_KASAPIv1_IKasEvents_OnStopLinking.htm\u0000322","ILinkJoint.isLinked Property\u0000html/P_KASAPIv1_ILinkJoint_isLinked.htm\u000089","ILinkPeer.otherPeer Property\u0000html/P_KASAPIv1_ILinkPeer_otherPeer.htm\u000088","ILinkCableJoint.realCableLength Property\u0000html/P_KASAPIv1_ILinkCableJoint_realCableLength.htm\u0000159","ILinkPeer.cfgLinkType Property\u0000html/P_KASAPIv1_ILinkPeer_cfgLinkType.htm\u0000108","IKasEvents.OnStartLinking Property\u0000html/P_KASAPIv1_IKasEvents_OnStartLinking.htm\u0000322","ILinkPeer.attachNode Property\u0000html/P_KASAPIv1_ILinkPeer_attachNode.htm\u0000122","ILinkPeer.linkModuleIndex Property\u0000html/P_KASAPIv1_ILinkPeer_linkModuleIndex.htm\u0000102","ILinkRenderer Properties\u0000html/Properties_T_KASAPIv1_ILinkRenderer.htm\u0000167","ILinkPeer.cfgAttachNodeName Property\u0000html/P_KASAPIv1_ILinkPeer_cfgAttachNodeName.htm\u0000155","ILinkRenderer.cfgRendererName Property\u0000html/P_KASAPIv1_ILinkRenderer_cfgRendererName.htm\u000093","ILinkJoint.coupleOnLinkMode Property\u0000html/P_KASAPIv1_ILinkJoint_coupleOnLinkMode.htm\u0000151","IKasEvents Properties\u0000html/Properties_T_KASAPIv1_IKasEvents.htm\u000083","ILinkPeer.linkState Property\u0000html/P_KASAPIv1_ILinkPeer_linkState.htm\u000083","ILinkPeer.isLinked Property\u0000html/P_KASAPIv1_ILinkPeer_isLinked.htm\u000089","IWinchControl.StretchCable Method\u0000html/M_KASAPIv1_IWinchControl_StretchCable.htm\u000098","ILinkPeer.isNodeBlocked Property\u0000html/P_KASAPIv1_ILinkPeer_isNodeBlocked.htm\u0000100","ILinkPeer.part Property\u0000html/P_KASAPIv1_ILinkPeer_part.htm\u000080","ILinkVesselInfo.part Property\u0000html/P_KASAPIv1_ILinkVesselInfo_part.htm\u000080","ILinkRenderer.targetTransform Property\u0000html/P_KASAPIv1_ILinkRenderer_targetTransform.htm\u0000118","ILinkRenderer.isStarted Property\u0000html/P_KASAPIv1_ILinkRenderer_isStarted.htm\u000088","IKasLinkEvent.source Property\u0000html/P_KASAPIv1_IKasLinkEvent_source.htm\u000077","IKasEvents.OnLinkBroken Property\u0000html/P_KASAPIv1_IKasEvents_OnLinkBroken.htm\u0000345","ILinkSource.linkJoint Property\u0000html/P_KASAPIv1_ILinkSource_linkJoint.htm\u000085","ILinkRenderer.sourceTransform Property\u0000html/P_KASAPIv1_ILinkRenderer_sourceTransform.htm\u0000118","ILinkUtils.DecoupleParts Method\u0000html/M_KASAPIv1_ILinkUtils_DecoupleParts.htm\u0000250","IAttachNodesUtils Interface\u0000html/T_KASAPIv1_IAttachNodesUtils.htm\u0000138","ICommonConfig Interface\u0000html/T_KASAPIv1_ICommonConfig.htm\u0000107","ILinkUtils Interface\u0000html/T_KASAPIv1_ILinkUtils.htm\u0000110","ILinkSource.linkTarget Property\u0000html/P_KASAPIv1_ILinkSource_linkTarget.htm\u0000193","ILinkPeer.linkPartId Property\u0000html/P_KASAPIv1_ILinkPeer_linkPartId.htm\u0000102","ILinkRenderer.colorOverride Property\u0000html/P_KASAPIv1_ILinkRenderer_colorOverride.htm\u000099","ILinkPeer.coupleNode Property\u0000html/P_KASAPIv1_ILinkPeer_coupleNode.htm\u0000145","ILinkJoint.linkSource Property\u0000html/P_KASAPIv1_ILinkJoint_linkSource.htm\u000087","ILinkJoint Interface\u0000html/T_KASAPIv1_ILinkJoint.htm\u0000214","IKasLinkEvent Interface\u0000html/T_KASAPIv1_IKasLinkEvent.htm\u000092","IPhysicsUtils Interface\u0000html/T_KASAPIv1_IPhysicsUtils.htm\u000089","ILinkPeer.cfgDependentNodeNames Property\u0000html/P_KASAPIv1_ILinkPeer_cfgDependentNodeNames.htm\u0000225","ILinkRenderer.shaderNameOverride Property\u0000html/P_KASAPIv1_ILinkRenderer_shaderNameOverride.htm\u000096","ILinkRenderer Interface\u0000html/T_KASAPIv1_ILinkRenderer.htm\u0000286","LinkActorType Enumeration\u0000html/T_KASAPIv1_LinkActorType.htm\u0000313","ILinkRenderer.stretchRatio Property\u0000html/P_KASAPIv1_ILinkRenderer_stretchRatio.htm\u0000144","IWinchControl.isConnectorLocked Property\u0000html/P_KASAPIv1_IWinchControl_isConnectorLocked.htm\u0000167","ILinkSource.linkRenderer Property\u0000html/P_KASAPIv1_ILinkSource_linkRenderer.htm\u0000142","ILinkPeer.nodeTransform Property\u0000html/P_KASAPIv1_ILinkPeer_nodeTransform.htm\u0000100","IWinchControl.currentCableLength Property\u0000html/P_KASAPIv1_IWinchControl_currentCableLength.htm\u0000151","ILinkStateEventListener Interface\u0000html/T_KASAPIv1_ILinkStateEventListener.htm\u0000138","IWinchControl.cfgMaxCableLength Property\u0000html/P_KASAPIv1_IWinchControl_cfgMaxCableLength.htm\u0000101","IJointUtils Interface\u0000html/T_KASAPIv1_IJointUtils.htm\u0000147","ILinkVesselInfo Interface\u0000html/T_KASAPIv1_ILinkVesselInfo.htm\u000090","IKasEvents Interface\u0000html/T_KASAPIv1_IKasEvents.htm\u0000400","ILinkRenderer.isPhysicalCollider Property\u0000html/P_KASAPIv1_ILinkRenderer_isPhysicalCollider.htm\u0000132","ILinkPeer.isLocked Property\u0000html/P_KASAPIv1_ILinkPeer_isLocked.htm\u0000154","IWinchControl Interface\u0000html/T_KASAPIv1_IWinchControl.htm\u0000188","IWinchControl.motorTargetSpeed Property\u0000html/P_KASAPIv1_IWinchControl_motorTargetSpeed.htm\u0000136","ILinkVesselInfo.vesselInfo Property\u0000html/P_KASAPIv1_ILinkVesselInfo_vesselInfo.htm\u000084","LinkState Enumeration\u0000html/T_KASAPIv1_LinkState.htm\u0000228","IWinchControl.motorCurrentSpeed Property\u0000html/P_KASAPIv1_IWinchControl_motorCurrentSpeed.htm\u0000192","ILinkPeer Interface\u0000html/T_KASAPIv1_ILinkPeer.htm\u0000301","ILinkSource Interface\u0000html/T_KASAPIv1_ILinkSource.htm\u00001146","IKasJointEventsListener Interface\u0000html/T_KASAPIv1_IKasJointEventsListener.htm\u0000218","ILinkCableJoint Interface\u0000html/T_KASAPIv1_ILinkCableJoint.htm\u0000350","GUILinkMode Enumeration\u0000html/T_KASAPIv1_GUILinkMode.htm\u0000116","ILinkTarget Interface\u0000html/T_KASAPIv1_ILinkTarget.htm\u0000340","IWinchControl.cfgMotorMaxSpeed Property\u0000html/P_KASAPIv1_IWinchControl_cfgMotorMaxSpeed.htm\u000090","ILinkTarget.linkSource Property\u0000html/P_KASAPIv1_ILinkTarget_linkSource.htm\u0000271","KASAPI Class\u0000html/T_KASAPIv1_KASAPI.htm\u0000124"] \ No newline at end of file diff --git a/docs/APIv1/html/F_KASAPIv1_KASAPI_AttachNodesUtils.htm b/docs/APIv1/html/F_KASAPIv1_KASAPI_AttachNodesUtils.htm deleted file mode 100644 index 9800ccbde..000000000 --- a/docs/APIv1/html/F_KASAPIv1_KASAPI_AttachNodesUtils.htm +++ /dev/null @@ -1,26 +0,0 @@ -KASAPI.AttachNodesUtils Field

KASAPIAttachNodesUtils Field

KAS attach nodes utils.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public static IAttachNodesUtils AttachNodesUtils
Request Example - View Source

Field Value

Type: IAttachNodesUtils
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/F_KASAPIv1_KASAPI_CommonConfig.htm b/docs/APIv1/html/F_KASAPIv1_KASAPI_CommonConfig.htm deleted file mode 100644 index 4e4c7e643..000000000 --- a/docs/APIv1/html/F_KASAPIv1_KASAPI_CommonConfig.htm +++ /dev/null @@ -1,26 +0,0 @@ -KASAPI.CommonConfig Field

KASAPICommonConfig Field

KAS common config settings.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public static ICommonConfig CommonConfig
Request Example - View Source

Field Value

Type: ICommonConfig
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/F_KASAPIv1_KASAPI_JointUtils.htm b/docs/APIv1/html/F_KASAPIv1_KASAPI_JointUtils.htm deleted file mode 100644 index 42bccaaac..000000000 --- a/docs/APIv1/html/F_KASAPIv1_KASAPI_JointUtils.htm +++ /dev/null @@ -1,26 +0,0 @@ -KASAPI.JointUtils Field

KASAPIJointUtils Field

KAS joints untils.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public static IJointUtils JointUtils
Request Example - View Source

Field Value

Type: IJointUtils
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/F_KASAPIv1_KASAPI_KasEvents.htm b/docs/APIv1/html/F_KASAPIv1_KASAPI_KasEvents.htm deleted file mode 100644 index 84980e3cc..000000000 --- a/docs/APIv1/html/F_KASAPIv1_KASAPI_KasEvents.htm +++ /dev/null @@ -1,26 +0,0 @@ -KASAPI.KasEvents Field

KASAPIKasEvents Field

KAS global events.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public static IKasEvents KasEvents
Request Example - View Source

Field Value

Type: IKasEvents
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/F_KASAPIv1_KASAPI_LinkUtils.htm b/docs/APIv1/html/F_KASAPIv1_KASAPI_LinkUtils.htm deleted file mode 100644 index 44a8c3917..000000000 --- a/docs/APIv1/html/F_KASAPIv1_KASAPI_LinkUtils.htm +++ /dev/null @@ -1,26 +0,0 @@ -KASAPI.LinkUtils Field

KASAPILinkUtils Field

KAS link utils.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public static ILinkUtils LinkUtils
Request Example - View Source

Field Value

Type: ILinkUtils
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/F_KASAPIv1_KASAPI_PhysicsUtils.htm b/docs/APIv1/html/F_KASAPIv1_KASAPI_PhysicsUtils.htm deleted file mode 100644 index f6eaa77fd..000000000 --- a/docs/APIv1/html/F_KASAPIv1_KASAPI_PhysicsUtils.htm +++ /dev/null @@ -1,26 +0,0 @@ -KASAPI.PhysicsUtils Field

KASAPIPhysicsUtils Field

KAS physics utils.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public static IPhysicsUtils PhysicsUtils
Request Example - View Source

Field Value

Type: IPhysicsUtils
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/F_KASAPIv1_KASAPI_isLoaded.htm b/docs/APIv1/html/F_KASAPIv1_KASAPI_isLoaded.htm deleted file mode 100644 index 901bde559..000000000 --- a/docs/APIv1/html/F_KASAPIv1_KASAPI_isLoaded.htm +++ /dev/null @@ -1,26 +0,0 @@ -KASAPI.isLoaded Field

KASAPIisLoaded Field

Tells if API V1 was loaded and ready to use.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public static bool isLoaded
Request Example - View Source

Field Value

Type: Boolean
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Fields_T_KASAPIv1_KASAPI.htm b/docs/APIv1/html/Fields_T_KASAPIv1_KASAPI.htm deleted file mode 100644 index fd8c014d2..000000000 --- a/docs/APIv1/html/Fields_T_KASAPIv1_KASAPI.htm +++ /dev/null @@ -1,10 +0,0 @@ -KASAPI Fields

KASAPI Fields

The KASAPI type exposes the following members.

Fields
-   - NameDescription
Public fieldStatic memberAttachNodesUtils
KAS attach nodes utils.
Public fieldStatic memberCommonConfig
KAS common config settings.
Public fieldStatic memberisLoaded
Tells if API V1 was loaded and ready to use.
Public fieldStatic memberJointUtils
KAS joints untils.
Public fieldStatic memberKasEvents
KAS global events.
Public fieldStatic memberLinkUtils
KAS link utils.
Public fieldStatic memberPhysicsUtils
KAS physics utils.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_AddNode.htm b/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_AddNode.htm deleted file mode 100644 index 8a44adeb5..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_AddNode.htm +++ /dev/null @@ -1,34 +0,0 @@ -IAttachNodesUtils.AddNode Method

IAttachNodesUtilsAddNode Method

Adds an existing attach node into the part.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void AddNode(
-	Part part,
-	AttachNode attachNode
-)
Request Example - View Source

Parameters

part
Type: (Default Namespace)Part
The part to add the node into.
attachNode
Type: (Default Namespace)AttachNode
The attach node to add.
Remarks
- If the node doesn't belong to the part, then the owner will be fixed and a warning logged. - Normally, it's not expected to add an attach node into a part that doesn't own it. If the node - is alaready in the part, then this method does nothing. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_CreateNode.htm b/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_CreateNode.htm deleted file mode 100644 index 1d33ba82a..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_CreateNode.htm +++ /dev/null @@ -1,39 +0,0 @@ -IAttachNodesUtils.CreateNode Method

IAttachNodesUtilsCreateNode Method

Creates a new attach node on the part.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
AttachNode CreateNode(
-	Part part,
-	string nodeName,
-	Transform nodeTransform
-)
Request Example - View Source

Parameters

part
Type: (Default Namespace)Part
Part to create node for.
nodeName
Type: SystemString
Name of the node to create.
nodeTransform
Type: UnityEngineTransform
Transform that specifies node position and orientation.

Return Value

Type: AttachNode
New attach node atatched to the part.
Remarks
- It's expected there is no node with the same name on the part already. If there is one, then - no extra node will be created, and the properties of the existing node will be updated instead - (see below). However, it's an unexpected situation, so a warning record will be logged. -

- The node will have the following properties: -

  • Size is "small".
  • Attach method is FIXED_JOINT.
  • Node type is Stack.

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_DropNode.htm b/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_DropNode.htm deleted file mode 100644 index 634692dbd..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_DropNode.htm +++ /dev/null @@ -1,31 +0,0 @@ -IAttachNodesUtils.DropNode Method

IAttachNodesUtilsDropNode Method

Drops the attach node on the part.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void DropNode(
-	Part part,
-	AttachNode attachNode
-)
Request Example - View Source

Parameters

part
Type: (Default Namespace)Part
The part to drop the node on.
attachNode
Type: (Default Namespace)AttachNode
The attach node to drop.
Remarks
Doesn't drop the node if it's connected to a part.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_GetTransformForNode.htm b/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_GetTransformForNode.htm deleted file mode 100644 index f77333d08..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_GetTransformForNode.htm +++ /dev/null @@ -1,29 +0,0 @@ -IAttachNodesUtils.GetTransformForNode Method

IAttachNodesUtilsGetTransformForNode Method

Gets or creates a transform object for the attach node.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
Transform GetTransformForNode(
-	Part ownerPart,
-	AttachNode an
-)
Request Example - View Source

Parameters

ownerPart
Type: (Default Namespace)Part
The part that owns the node.
an
Type: (Default Namespace)AttachNode
The attach node to create the transform for.

Return Value

Type: Transform
The object that matches the attach node connect point.
Remarks
The trasnform is added into the root of the part model.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_NodeId.htm b/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_NodeId.htm deleted file mode 100644 index 22caf7298..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_NodeId.htm +++ /dev/null @@ -1,28 +0,0 @@ -IAttachNodesUtils.NodeId Method

IAttachNodesUtilsNodeId Method

Returns a user friendly attach node representation.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string NodeId(
-	AttachNode an
-)
Request Example - View Source

Parameters

an
Type: (Default Namespace)AttachNode
The node to get the string for.

Return Value

Type: String
The user friendly node description.
Remarks
It gives on the node and it's peers, which is useful when logging.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_ParseNodeFromString.htm b/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_ParseNodeFromString.htm deleted file mode 100644 index 5df7fa64a..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IAttachNodesUtils_ParseNodeFromString.htm +++ /dev/null @@ -1,51 +0,0 @@ -IAttachNodesUtils.ParseNodeFromString Method

IAttachNodesUtilsParseNodeFromString Method

Creates an attach node form the part's config definition string.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
AttachNode ParseNodeFromString(
-	Part ownerPart,
-	string def,
-	string nodeId
-)
Request Example - View Source

Parameters

ownerPart
Type: (Default Namespace)Part
- The part to parse the node for. The new node will not be added to this part, but the - required settings from this part will be used to produce the node (e.g. the rescale - factor). -
def
Type: SystemString
The string to parse.
nodeId
Type: SystemString
The ID of the new node. Keep it unique in scope of the part.

Return Value

Type: AttachNode
- The new node or null if parsing has failed. The created node will not be automatically - added to the part. -
Remarks

- The string format is exactly the same as for the part's attach node definition. It consists of - 10 parts, separated by a comma. Only the first 6 parts are mandatory, the others are optional. - The format is the following: - Position(X,Y,Z), Orientation(X,Y,Z), Size, AttachMethod, CrossFeedAllowed, IsRigid

  • Position is defined by the first 3 float numbers.
  • Orientation is defined by the next 3 float numbers.
  • Size is an integer number starting from 0 (tiny). If the size is omitted, it's - assumed to be 1 (small). When coupling two nodes, the minumim size of the two is - selected to create the actual joint. -
  • AttachMethod is a node attach type, which must be 0.
  • CrossFeedAllowed is 1 when the resources can flow thru this node, and 0 - when the flow must be forbidden. Note, that in order to enable the cross feed mode, the - oppossing node must be allowing it as well. If ommited, then the value is 1. -
  • IsRigid is 0 for the normal part joint, which allows some degree of freedom - under a strong force. Value 1 will instruct to create a completely locked joint. If - omitted, then the value is 0. Note, the the rigid joint will be created if any - of the two coupling nodes require it. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IJointUtils_DumpJoint.htm b/docs/APIv1/html/M_KASAPIv1_IJointUtils_DumpJoint.htm deleted file mode 100644 index 0a7df20a6..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IJointUtils_DumpJoint.htm +++ /dev/null @@ -1,28 +0,0 @@ -IJointUtils.DumpJoint Method

IJointUtilsDumpJoint Method

Outputs all properties of the joint to the string.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string DumpJoint(
-	ConfigurableJoint joint
-)
Request Example - View Source

Parameters

joint
Type: UnityEngineConfigurableJoint
Joint to dump settings for.

Return Value

Type: String
Linefeed formatted block of text.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IJointUtils_DumpSpringJoint.htm b/docs/APIv1/html/M_KASAPIv1_IJointUtils_DumpSpringJoint.htm deleted file mode 100644 index e90b34fb9..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IJointUtils_DumpSpringJoint.htm +++ /dev/null @@ -1,28 +0,0 @@ -IJointUtils.DumpSpringJoint Method

IJointUtilsDumpSpringJoint Method

Outputs all properties of the joint to the string.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string DumpSpringJoint(
-	SpringJoint joint
-)
Request Example - View Source

Parameters

joint
Type: UnityEngineSpringJoint
Joint to dump settings for.

Return Value

Type: String
Linefeed formatted block of text.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IJointUtils_ResetJoint.htm b/docs/APIv1/html/M_KASAPIv1_IJointUtils_ResetJoint.htm deleted file mode 100644 index 195b6769d..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IJointUtils_ResetJoint.htm +++ /dev/null @@ -1,41 +0,0 @@ -IJointUtils.ResetJoint Method

IJointUtilsResetJoint Method

Initializes joint to a consistent state.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void ResetJoint(
-	ConfigurableJoint joint
-)
Request Example - View Source

Parameters

joint
Type: UnityEngineConfigurableJoint
Joint to reset.
Remarks

- It's not the same as creating a default joint. The state is consistent but different from the - default: -

  • All linear and angular drive modes set to Locked. -
  • All drives, springs and limits are zeroed.
  • The coordinate system is reset to local. Y looks up, and X looks right.
  • - The connected body is not touched. Connection, if any, won't be broken on the reset. -
  • - Any state accumulated so far (e.g. relative rotation or position) will be lost, and the joint - will remember the new relative rotation/position of the connected objects. -

- Use this method before setting up a new or existing joint. By resetting the joint, you ensure - it's in a consistent state, and the further adjustments will always give the same result - regardless to how the joint was created and what components were affecting it. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IJointUtils_SetupDistanceJoint.htm b/docs/APIv1/html/M_KASAPIv1_IJointUtils_SetupDistanceJoint.htm deleted file mode 100644 index fa36532b8..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IJointUtils_SetupDistanceJoint.htm +++ /dev/null @@ -1,41 +0,0 @@ -IJointUtils.SetupDistanceJoint Method

IJointUtilsSetupDistanceJoint Method

Sets up a cannonical distance joint.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void SetupDistanceJoint(
-	ConfigurableJoint joint,
-	float springForce = 0f,
-	float springDamper = 0f,
-	float maxDistance = ∞f
-)
Request Example - View Source

Parameters

joint
Type: UnityEngineConfigurableJoint
The joint to setup.
springForce (Optional)
Type: SystemSingle
- The strength of the spring that keeps the two objects in range. -
springDamper (Optional)
Type: SystemSingle
The force to apply to calm down the oscillations.
maxDistance (Optional)
Type: SystemSingle
- The maximum distance to allow between the obejcts before applying the spring force. -
Remarks
- This method does not set all the properties of the PhysX joint! To get a consistent - result, the joint must be reset via a ResetJoint(ConfigurableJoint) call before invoking this - method. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IJointUtils_SetupFixedJoint.htm b/docs/APIv1/html/M_KASAPIv1_IJointUtils_SetupFixedJoint.htm deleted file mode 100644 index fb1026502..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IJointUtils_SetupFixedJoint.htm +++ /dev/null @@ -1,34 +0,0 @@ -IJointUtils.SetupFixedJoint Method

IJointUtilsSetupFixedJoint Method

Sets up a cannonical fixed joint.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void SetupFixedJoint(
-	ConfigurableJoint joint
-)
Request Example - View Source

Parameters

joint
Type: UnityEngineConfigurableJoint
The joint to setup.
Remarks
- This method does not set all the properties of the PhysX joint! To get a consistent - result, the joint must be reset via a ResetJoint(ConfigurableJoint) call before invoking this - method. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IKasJointEventsListener_OnKASJointBreak.htm b/docs/APIv1/html/M_KASAPIv1_IKasJointEventsListener_OnKASJointBreak.htm deleted file mode 100644 index 63b39a543..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IKasJointEventsListener_OnKASJointBreak.htm +++ /dev/null @@ -1,34 +0,0 @@ -IKasJointEventsListener.OnKASJointBreak Method

IKasJointEventsListenerOnKASJointBreak Method

- Triggers when a connection on the object is broken due to too strong force applied. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void OnKASJointBreak(
-	GameObject hostObj,
-	float breakForce
-)
Request Example - View Source

Parameters

hostObj
Type: UnityEngineGameObject
The game object that owns the joint.
breakForce
Type: SystemSingle
The actual force that has been applied to break the joint.
Remarks
- This event is expected to be called from a Unity physics method. Not all actions can be done - from this kind of handlers. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkCableJoint_StartPhysicalHead.htm b/docs/APIv1/html/M_KASAPIv1_ILinkCableJoint_StartPhysicalHead.htm deleted file mode 100644 index 31ef1c1a2..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkCableJoint_StartPhysicalHead.htm +++ /dev/null @@ -1,36 +0,0 @@ -ILinkCableJoint.StartPhysicalHead Method

ILinkCableJointStartPhysicalHead Method

- Attaches the specified object to the source and starts the environmental forces on it. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void StartPhysicalHead(
-	ILinkSource source,
-	Transform headObjAnchor
-)
Request Example - View Source

Parameters

source
Type: KASAPIv1ILinkSource
The source object that owns the head.
headObjAnchor
Type: UnityEngineTransform
- The transform at the head object to attach the cable to. It's also used as a starting point - to find the rigidbody. -
Remarks
- The cable maximum length will be set to the actual distance between the source and the head. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkCableJoint_StopPhysicalHead.htm b/docs/APIv1/html/M_KASAPIv1_ILinkCableJoint_StopPhysicalHead.htm deleted file mode 100644 index 761532e0c..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkCableJoint_StopPhysicalHead.htm +++ /dev/null @@ -1,31 +0,0 @@ -ILinkCableJoint.StopPhysicalHead Method

ILinkCableJointStopPhysicalHead Method

Stops handling the physical head.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void StopPhysicalHead()
Request Example - View Source
Remarks
- It must not be called from the physics update methods (e.g. FixedUpdate or - OnJointBreak) since the link's physical objects may be deleted immediately. If the link - needs to be broken from these methods, use a coroutine to postpone the call till the end of - the frame. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_AdjustJoint.htm b/docs/APIv1/html/M_KASAPIv1_ILinkJoint_AdjustJoint.htm deleted file mode 100644 index ac846a988..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_AdjustJoint.htm +++ /dev/null @@ -1,31 +0,0 @@ -ILinkJoint.AdjustJoint Method

ILinkJointAdjustJoint Method

Requests the joint to become unbreakable or normal.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void AdjustJoint(
-	bool isUnbreakable = false
-)
Request Example - View Source

Parameters

isUnbreakable (Optional)
Type: SystemBoolean
If true then joint must become unbreakable.
Remarks
- Normally, joint is set to unbreakable on time warp, but in general callers may do it at any - moment. In unbreakable state joint must behave as a hard connection that cannot be changed or - destructed by any force.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_CheckConstraints.htm b/docs/APIv1/html/M_KASAPIv1_ILinkJoint_CheckConstraints.htm deleted file mode 100644 index ba1cffd97..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_CheckConstraints.htm +++ /dev/null @@ -1,31 +0,0 @@ -ILinkJoint.CheckConstraints Method

ILinkJointCheckConstraints Method

Checks if the joint constraints allow the link to be established.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string[] CheckConstraints(
-	ILinkSource source,
-	ILinkTarget target
-)
Request Example - View Source

Parameters

source
Type: KASAPIv1ILinkSource
The possible source of the link.
target
Type: KASAPIv1ILinkTarget
The possible target of the link.

Return Value

Type: String
- An empty array if the link can be created, or a list of user friendly errors otherwise. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_CreateJoint.htm b/docs/APIv1/html/M_KASAPIv1_ILinkJoint_CreateJoint.htm deleted file mode 100644 index 99aa6dac1..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_CreateJoint.htm +++ /dev/null @@ -1,35 +0,0 @@ -ILinkJoint.CreateJoint Method

ILinkJointCreateJoint Method

Sets up a physical joint between the source and target.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool CreateJoint(
-	ILinkSource source,
-	ILinkTarget target
-)
Request Example - View Source

Parameters

source
Type: KASAPIv1ILinkSource
The link's source. This part owns the joint module.
target
Type: KASAPIv1ILinkTarget
The link's target.

Return Value

Type: Boolean
true if joint was successfully created or updated.
Remarks

- This method can be called either to establish a new joint or to restore an existing link on - load. -

- This method will call the CheckConstraints(ILinkSource, ILinkTarget) method to ensure there are no errors. - If there are some, then the link is not created and the errors are reported to the logs. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_DropJoint.htm b/docs/APIv1/html/M_KASAPIv1_ILinkJoint_DropJoint.htm deleted file mode 100644 index 5ee45d72f..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_DropJoint.htm +++ /dev/null @@ -1,29 +0,0 @@ -ILinkJoint.DropJoint Method

ILinkJointDropJoint Method

Destroys a physical link between the source and the target.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void DropJoint()
Request Example - View Source
Remarks
- This is a cleanup method. It must be safe to execute in any joint state, and should not throw - any errors. E.g. it may get called when the part's state is incomplete. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_SetCoupleOnLinkMode.htm b/docs/APIv1/html/M_KASAPIv1_ILinkJoint_SetCoupleOnLinkMode.htm deleted file mode 100644 index fdced1ac8..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkJoint_SetCoupleOnLinkMode.htm +++ /dev/null @@ -1,39 +0,0 @@ -ILinkJoint.SetCoupleOnLinkMode Method

ILinkJointSetCoupleOnLinkMode Method

Changes the current parts couple mode.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool SetCoupleOnLinkMode(
-	bool isCoupleOnLink
-)
Request Example - View Source

Parameters

isCoupleOnLink
Type: SystemBoolean
The new settings of the mode.

Return Value

Type: Boolean
true if the new mode has been accepted. The change may be refused for any reason by the - implementation, and the caller must react accordingly. -
Remarks

- When both the source and the target peers support coupling, this mode can be arbitrary set or - reset via the joint module. If the new mode is "coupling", and the source and the target - vessels are different, then a coupling action will trigger. If the new mode is "don't couple", - and the source and the target parts are coupled, then a decoupling event is triggered. In all - the other cases it's just a boolean property change. -

- The modules must support the cycles and be ready to pick up the coupling role when the former - part has gave up. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_CheckColliderHits.htm b/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_CheckColliderHits.htm deleted file mode 100644 index d0139896c..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_CheckColliderHits.htm +++ /dev/null @@ -1,31 +0,0 @@ -ILinkRenderer.CheckColliderHits Method

ILinkRendererCheckColliderHits Method

Verifies that there are no obstacles beween the points.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string[] CheckColliderHits(
-	Transform source,
-	Transform target
-)
Request Example - View Source

Parameters

source
Type: UnityEngineTransform
Source node.
target
Type: UnityEngineTransform
Target node.

Return Value

Type: String
- An empty array if no hits were detected, or a list of user friendly errors otherwise. -
Remarks
The renderer is not required to be started for this method to call.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_StartRenderer.htm b/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_StartRenderer.htm deleted file mode 100644 index 295ed4af8..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_StartRenderer.htm +++ /dev/null @@ -1,41 +0,0 @@ -ILinkRenderer.StartRenderer Method

ILinkRendererStartRenderer Method

Starts rendering a link between the objects.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void StartRenderer(
-	Transform source,
-	Transform target
-)
Request Example - View Source

Parameters

source
Type: UnityEngineTransform
The source node.
target
Type: UnityEngineTransform
The target node.
Remarks

- This method only indicates that the link is to be drawn between the specified points. The - renderer is allowed to draw meshes even when not started. E.g. if there are constant parts of - the link like the joint pivots. -

- The ends of the link are not required to be located at the surface of the owning parts. It's - up to the renderer to decide how to draw the link. -

- It's OK to call this method multiple times with different or the same source/target arguments: - the renderer must accept the values and update accordingly. However, this operation is rated - as performance expensive, so the callers are discouraged to invoke this method too frequently - (e.g. on every frame update). -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_StopRenderer.htm b/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_StopRenderer.htm deleted file mode 100644 index e50d31417..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_StopRenderer.htm +++ /dev/null @@ -1,34 +0,0 @@ -ILinkRenderer.StopRenderer Method

ILinkRendererStopRenderer Method

Cancels rendering the link.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void StopRenderer()
Request Example - View Source
Remarks
- The stopped renderer is not required to not render anything. The stopped state only tells - that the source and the target positions provided to the StartRenderer(Transform, Transform) method - must not be respresented as connected anymore. A specific renderer implementation is free to - choose how to represent this mode. -

- It's OK to call this method multiple time. If the renderer is already stopped the call must be - treated as NO-OP with a little or no performance cost. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_UpdateLink.htm b/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_UpdateLink.htm deleted file mode 100644 index 81ce67f85..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkRenderer_UpdateLink.htm +++ /dev/null @@ -1,32 +0,0 @@ -ILinkRenderer.UpdateLink Method

ILinkRendererUpdateLink Method

Called when a link representation update is required.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void UpdateLink()
Request Example - View Source
Remarks
- The performance cost of this method is rated as moderate. The callers should consider - optimization techniques to avoid calling this method on the every frame update. -

- A specific renderer implementation may introduce own optimization algorithm when the call - becomes too heavy and slow. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkSource_LinkToTarget_1.htm b/docs/APIv1/html/M_KASAPIv1_ILinkSource_LinkToTarget_1.htm deleted file mode 100644 index 3d87270bd..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkSource_LinkToTarget_1.htm +++ /dev/null @@ -1,33 +0,0 @@ -ILinkSource.LinkToTarget Method (LinkActorType, ILinkTarget)

ILinkSourceLinkToTarget Method (LinkActorType, ILinkTarget)

Establishes a link between two parts.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool LinkToTarget(
-	LinkActorType actor,
-	ILinkTarget target
-)
Request Example - View Source

Parameters

actor
Type: KASAPIv1LinkActorType
The actor, who initiated the link.
target
Type: KASAPIv1ILinkTarget
The target to link with.

Return Value

Type: Boolean
true if the parts were linked successfully.
Remarks
- This version of the method doesn't require staring the linking mode. All the required - transitions are done internally, and the method only reports if the link was successful or - not. No GUI mode can be specified when creating a link like this. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkStateEventListener_OnKASLinkedState.htm b/docs/APIv1/html/M_KASAPIv1_ILinkStateEventListener_OnKASLinkedState.htm deleted file mode 100644 index f42b4b741..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkStateEventListener_OnKASLinkedState.htm +++ /dev/null @@ -1,32 +0,0 @@ -ILinkStateEventListener.OnKASLinkedState Method

ILinkStateEventListenerOnKASLinkedState Method

Triggers when any module on the part has created a link.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void OnKASLinkedState(
-	IKasLinkEvent info,
-	bool isLinked
-)
Request Example - View Source

Parameters

info
Type: KASAPIv1IKasLinkEvent
The source and target information about the link.
isLinked
Type: SystemBoolean
The new link state.
Remarks
- This is a notification event. When it triggers, the modules, involved in the link, has already - completed their settings change. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkStateEventListener_OnKASNodeBlockedState.htm b/docs/APIv1/html/M_KASAPIv1_ILinkStateEventListener_OnKASNodeBlockedState.htm deleted file mode 100644 index ad66f65ee..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkStateEventListener_OnKASNodeBlockedState.htm +++ /dev/null @@ -1,35 +0,0 @@ -ILinkStateEventListener.OnKASNodeBlockedState Method

ILinkStateEventListenerOnKASNodeBlockedState Method

- Triggers when a peer locks itself due to its attach node is blocked by an incompatible part. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void OnKASNodeBlockedState(
-	ILinkPeer ownerPeer,
-	bool isBlocked
-)
Request Example - View Source

Parameters

ownerPeer
Type: KASAPIv1ILinkPeer
The peer which goes into the (un)blocked state.
isBlocked
Type: SystemBoolean
Tells if the peer got blocked or unblocked.
Remarks
- The event is sent to all the modules on the part except the module which triggred the event. - It allows coordinating the work of a group of link modules on the same part. The event - handlers must not synchronously affect the state of module which triggered the event. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkUtils_CoupleParts.htm b/docs/APIv1/html/M_KASAPIv1_ILinkUtils_CoupleParts.htm deleted file mode 100644 index ddddf6415..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkUtils_CoupleParts.htm +++ /dev/null @@ -1,46 +0,0 @@ -ILinkUtils.CoupleParts Method

ILinkUtilsCoupleParts Method

Couples two parts together given they belong to the different vessels.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
Part CoupleParts(
-	AttachNode sourceNode,
-	AttachNode targetNode,
-	bool toDominantVessel = false
-)
Request Example - View Source

Parameters

sourceNode
Type: (Default Namespace)AttachNode
- The attach node at the source part that defines the source vessel. It must not be null. -
targetNode
Type: (Default Namespace)AttachNode
- The attach node at the target part that defines the target vessel. It must not be null. -
toDominantVessel (Optional)
Type: SystemBoolean
- If false, then the source vessel will get coupled with the target. As a result, the - source vessel will be destroyed. If true, then the method will find the least - significant vessel of the two, and couple it with the most significant one. The least - signficant vessel will be destroyed. -

Return Value

Type: Part
The part that attached as a child into the new hierarchy.
Remarks

- Once the coupling is done, one of the vessels will be destroyed. It will become a part of the - other vessel. The new merged vessel will become active. Which vessel will be destroyed is - determined by the toDominantVessel parameter. -

- This coupling requires the both attach nodes to be provided, and creates a "stack" nodes - coupling. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_ILinkUtils_FindLinkPeer.htm b/docs/APIv1/html/M_KASAPIv1_ILinkUtils_FindLinkPeer.htm deleted file mode 100644 index 8651147c5..000000000 --- a/docs/APIv1/html/M_KASAPIv1_ILinkUtils_FindLinkPeer.htm +++ /dev/null @@ -1,32 +0,0 @@ -ILinkUtils.FindLinkPeer Method

ILinkUtilsFindLinkPeer Method

Finds the other peer of the link.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
ILinkPeer FindLinkPeer(
-	ILinkPeer srcPeer
-)
Request Example - View Source

Parameters

srcPeer
Type: KASAPIv1ILinkPeer
The peer to find a target for.

Return Value

Type: ILinkPeer
The peer or null if no valid target was found.
Remarks
- The links are always 1-to-1, i.e. one source peer can be linked to exactly one target peer. - It's discouraged to implement this logic in the own code since the linking approach may change - in the future versions. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IPhysicsUtils_ApplyGravity.htm b/docs/APIv1/html/M_KASAPIv1_IPhysicsUtils_ApplyGravity.htm deleted file mode 100644 index 67e726eec..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IPhysicsUtils_ApplyGravity.htm +++ /dev/null @@ -1,38 +0,0 @@ -IPhysicsUtils.ApplyGravity Method

IPhysicsUtilsApplyGravity Method

Applies the forces that affect a rigidbody on a selectial body.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void ApplyGravity(
-	Rigidbody rb,
-	Vessel vessel,
-	double rbAirDragMult = 1
-)
Request Example - View Source

Parameters

rb
Type: UnityEngineRigidbody
The rigidbody to apply the forces to.
vessel
Type: (Default Namespace)Vessel
- The vessel to use as a base point for the gravity and atmosphere properties. When there is no - good choice, just pick the closest one. -
rbAirDragMult (Optional)
Type: SystemDouble
- The multiplier that tells how significantly the rigidbody is resisting to the air flow. -

Return Value

Type: 
Target or null if no valid target was found.
Remarks
- This method replicates the logic from FlightIntegrator for the physical objects. - Alas, this method is not available for a plain rigidbody. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IWinchControl_ReleaseCable.htm b/docs/APIv1/html/M_KASAPIv1_IWinchControl_ReleaseCable.htm deleted file mode 100644 index 9e9d07da9..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IWinchControl_ReleaseCable.htm +++ /dev/null @@ -1,26 +0,0 @@ -IWinchControl.ReleaseCable Method

IWinchControlReleaseCable Method

Sets the deployed cable length to the maximum value allowed by the part.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void ReleaseCable()
Request Example - View Source
Remarks
If the connector is locked, then it will be deployed.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/M_KASAPIv1_IWinchControl_StretchCable.htm b/docs/APIv1/html/M_KASAPIv1_IWinchControl_StretchCable.htm deleted file mode 100644 index 9b553c500..000000000 --- a/docs/APIv1/html/M_KASAPIv1_IWinchControl_StretchCable.htm +++ /dev/null @@ -1,28 +0,0 @@ -IWinchControl.StretchCable Method

IWinchControlStretchCable Method

- Sets the deployed cable length to the actual distance between the winch and the connector. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
void StretchCable()
Request Example - View Source
Remarks
This will "stretch" the cable by reducing the unused cable.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_IAttachNodesUtils.htm b/docs/APIv1/html/Methods_T_KASAPIv1_IAttachNodesUtils.htm deleted file mode 100644 index 8e2e87598..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_IAttachNodesUtils.htm +++ /dev/null @@ -1,10 +0,0 @@ -IAttachNodesUtils Methods

IAttachNodesUtils Methods

The IAttachNodesUtils type exposes the following members.

Methods
-   - NameDescription
Public methodAddNode
Adds an existing attach node into the part.
Public methodCreateNode
Creates a new attach node on the part.
Public methodDropNode
Drops the attach node on the part.
Public methodGetTransformForNode
Gets or creates a transform object for the attach node.
Public methodNodeId
Returns a user friendly attach node representation.
Public methodParseNodeFromString
Creates an attach node form the part's config definition string.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_IJointUtils.htm b/docs/APIv1/html/Methods_T_KASAPIv1_IJointUtils.htm deleted file mode 100644 index 5e74f2523..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_IJointUtils.htm +++ /dev/null @@ -1,10 +0,0 @@ -IJointUtils Methods

IJointUtils Methods

The IJointUtils type exposes the following members.

Methods
-   - NameDescription
Public methodDumpJoint
Outputs all properties of the joint to the string.
Public methodDumpSpringJoint
Outputs all properties of the joint to the string.
Public methodResetJoint
Initializes joint to a consistent state.
Public methodSetupDistanceJoint
Sets up a cannonical distance joint.
Public methodSetupFixedJoint
Sets up a cannonical fixed joint.
Public methodSetupPrismaticJoint
Sets up joint so what it becomes a prismatic joint.
Public methodSetupSphericalJoint
Sets up joint so what it becomes a spherical hinge joint.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_IKasJointEventsListener.htm b/docs/APIv1/html/Methods_T_KASAPIv1_IKasJointEventsListener.htm deleted file mode 100644 index f926ed873..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_IKasJointEventsListener.htm +++ /dev/null @@ -1,12 +0,0 @@ -IKasJointEventsListener Methods

IKasJointEventsListener Methods

The IKasJointEventsListener type exposes the following members.

Methods
-   - NameDescription
Public methodOnKASJointBreak
- Triggers when a connection on the object is broken due to too strong force applied. -
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkCableJoint.htm b/docs/APIv1/html/Methods_T_KASAPIv1_ILinkCableJoint.htm deleted file mode 100644 index f117f4fb4..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkCableJoint.htm +++ /dev/null @@ -1,14 +0,0 @@ -ILinkCableJoint Methods

ILinkCableJoint Methods

The ILinkCableJoint type exposes the following members.

Methods
-   - NameDescription
Public methodSetCableLength
- Sets the maximum possible distance between the source and the head/target physical anchors. -
Public methodStartPhysicalHead
- Attaches the specified object to the source and starts the environmental forces on it. -
Public methodStopPhysicalHead
Stops handling the physical head.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkJoint.htm b/docs/APIv1/html/Methods_T_KASAPIv1_ILinkJoint.htm deleted file mode 100644 index bf27664b5..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkJoint.htm +++ /dev/null @@ -1,10 +0,0 @@ -ILinkJoint Methods

ILinkJoint Methods

The ILinkJoint type exposes the following members.

Methods
-   - NameDescription
Public methodAdjustJoint
Requests the joint to become unbreakable or normal.
Public methodCheckConstraints
Checks if the joint constraints allow the link to be established.
Public methodCreateJoint
Sets up a physical joint between the source and target.
Public methodDropJoint
Destroys a physical link between the source and the target.
Public methodSetCoupleOnLinkMode
Changes the current parts couple mode.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkRenderer.htm b/docs/APIv1/html/Methods_T_KASAPIv1_ILinkRenderer.htm deleted file mode 100644 index d5ee464ab..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkRenderer.htm +++ /dev/null @@ -1,10 +0,0 @@ -ILinkRenderer Methods

ILinkRenderer Methods

The ILinkRenderer type exposes the following members.

Methods
-   - NameDescription
Public methodCheckColliderHits
Verifies that there are no obstacles beween the points.
Public methodStartRenderer
Starts rendering a link between the objects.
Public methodStopRenderer
Cancels rendering the link.
Public methodUpdateLink
Called when a link representation update is required.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkSource.htm b/docs/APIv1/html/Methods_T_KASAPIv1_ILinkSource.htm deleted file mode 100644 index 977a36302..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkSource.htm +++ /dev/null @@ -1,10 +0,0 @@ -ILinkSource Methods

ILinkSource Methods

The ILinkSource type exposes the following members.

Methods
-   - NameDescription
Public methodCode exampleBreakCurrentLink
Breaks the link between the source and the target.
Public methodCode exampleCancelLinking
Cancels the linking mode without creating a link.
Public methodCode exampleCheckCanLinkTo
Verifies if a link between the parts can be successful.
Public methodCode exampleLinkToTarget(ILinkTarget)
Establishes a link between two parts.
Public methodLinkToTarget(LinkActorType, ILinkTarget)
Establishes a link between two parts.
Public methodCode exampleStartLinking
Starts the linking mode of this source.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkStateEventListener.htm b/docs/APIv1/html/Methods_T_KASAPIv1_ILinkStateEventListener.htm deleted file mode 100644 index 04925fa34..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkStateEventListener.htm +++ /dev/null @@ -1,12 +0,0 @@ -ILinkStateEventListener Methods

ILinkStateEventListener Methods

The ILinkStateEventListener type exposes the following members.

Methods
-   - NameDescription
Public methodOnKASLinkedState
Triggers when any module on the part has created a link.
Public methodOnKASNodeBlockedState
- Triggers when a peer locks itself due to its attach node is blocked by an incompatible part. -
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkUtils.htm b/docs/APIv1/html/Methods_T_KASAPIv1_ILinkUtils.htm deleted file mode 100644 index fd23cec16..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_ILinkUtils.htm +++ /dev/null @@ -1,10 +0,0 @@ -ILinkUtils Methods

ILinkUtils Methods

The ILinkUtils type exposes the following members.

Methods
-   - NameDescription
Public methodCoupleParts
Couples two parts together given they belong to the different vessels.
Public methodDecoupleParts
Decouples the connected parts and breaks down one vessel into two.
Public methodFindLinkPeer
Finds the other peer of the link.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_IPhysicsUtils.htm b/docs/APIv1/html/Methods_T_KASAPIv1_IPhysicsUtils.htm deleted file mode 100644 index 895a75717..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_IPhysicsUtils.htm +++ /dev/null @@ -1,10 +0,0 @@ -IPhysicsUtils Methods

IPhysicsUtils Methods

The IPhysicsUtils type exposes the following members.

Methods
-   - NameDescription
Public methodApplyGravity
Applies the forces that affect a rigidbody on a selectial body.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Methods_T_KASAPIv1_IWinchControl.htm b/docs/APIv1/html/Methods_T_KASAPIv1_IWinchControl.htm deleted file mode 100644 index bc3042012..000000000 --- a/docs/APIv1/html/Methods_T_KASAPIv1_IWinchControl.htm +++ /dev/null @@ -1,12 +0,0 @@ -IWinchControl Methods

IWinchControl Methods

The IWinchControl type exposes the following members.

Methods
-   - NameDescription
Public methodReleaseCable
Sets the deployed cable length to the maximum value allowed by the part.
Public methodSetMotor
Sets the winch motor to the desired speed.
Public methodStretchCable
- Sets the deployed cable length to the actual distance between the winch and the connector. -
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/N_KASAPIv1.htm b/docs/APIv1/html/N_KASAPIv1.htm deleted file mode 100644 index 9734211ee..000000000 --- a/docs/APIv1/html/N_KASAPIv1.htm +++ /dev/null @@ -1,41 +0,0 @@ -KASAPIv1 Namespace

KASAPIv1 Namespace

KAS API namespace. The third-party code must use the types and interfaces from this namespace instead of depending on the mod modules.

Each API release has a version. Once the API is released to the public, its methods cannot be changed. In case of a new functionality is relased, a new version (and the namespace) will be created. The old namespace will not be removed, so the mods that were built with the old version will continue to work.

If API is needed, the depedent mod should only include a reference to KAS-API-v1.dll (version number may vary). This assembly version never changes, so the dependency will never break. It's OK to provide an API assembly with the mod since multliple API assemblies will not conflict with each other. Moreover, having "own" copy of the API ensures the mod will load even if KAS is not installed in the game. There is an ability to check if KAS is installed in the run-time (see example below).

Examples
-Always use API interfaces, they are clearly defined and never change once released. -
using KASAPIv1;
-
-public class MyModule : PartModule {
-  public void RightSample() {
-    var source = part.FindModuleImplementing<ILinkSource>();
-    if (KASAPI.isLoaded) {
-      var model = KASAPI.LinkUtils.DecoupleParts(part, part.parent);
-    } else {
-      Debug.LogWarning("KAS is not installed");
-    }
-  }
-}
Classes
-   - ClassDescription
Public classKASAPI
KAS API, version 1.
Interfaces
-   - InterfaceDescription
Public interfaceIAttachNodesUtils
Various methods to deal with part's attach nodes.
Public interfaceICommonConfig
Container for the various global settings of the mod.
Public interfaceIJointUtils
Various tools to deal with KSP part joints.
Public interfaceCode exampleIKasEvents
Defines global events that are triggered by KAS.
Public interfaceCode exampleIKasJointEventsListener
Interface that notifies listeners about joints breaking.
Public interfaceIKasLinkEvent
A holder for simple source-to-target event.
Public interfaceILinkCableJoint
- Interface for a physical cable link. Such links keep the dsitance between the object below the - maximum but don't restict any other movements of the objects relative to each other. -
Public interfaceILinkJoint
Base interface for a KAS joint.
Public interfaceILinkPeer
Base interface for an end of the link.
Public interfaceILinkRenderer
- Interface for a module that takes care of rendering a link and, optionally, manages its - colliders. -
Public interfaceCode exampleILinkSource
A generic source of a KAS link between two parts.
Public interfaceILinkStateEventListener
Part module interface that defines the events for a link state changes.
Public interfaceCode exampleILinkTarget
A generic target of a KAS link between two parts.
Public interfaceILinkUtils
Various tools to deal with KAS links.
Public interfaceILinkVesselInfo
A generic interface to deal with the vessels info.
Public interfaceIPhysicsUtils
Various tools to deal with the gme's physics.
Public interfaceIWinchControl
Interface that allows operating the winch parts.
Enumerations
-   - EnumerationDescription
Public enumerationGUILinkMode
Specifies how the linking mode is displayed in GUI.
Public enumerationCode exampleLinkActorType
Defines an actor that changes KAS link.
Public enumerationLinkState
Defines currect state of the link.
- \ No newline at end of file diff --git a/docs/APIv1/html/Overload_KASAPIv1_ILinkSource_LinkToTarget.htm b/docs/APIv1/html/Overload_KASAPIv1_ILinkSource_LinkToTarget.htm deleted file mode 100644 index d521c1dca..000000000 --- a/docs/APIv1/html/Overload_KASAPIv1_ILinkSource_LinkToTarget.htm +++ /dev/null @@ -1,10 +0,0 @@ -ILinkSource.LinkToTarget Method

ILinkSourceLinkToTarget Method

Overload List
-   - NameDescription
Public methodCode exampleLinkToTarget(ILinkTarget)
Establishes a link between two parts.
Public methodLinkToTarget(LinkActorType, ILinkTarget)
Establishes a link between two parts.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ICommonConfig_sndPathBipWrong.htm b/docs/APIv1/html/P_KASAPIv1_ICommonConfig_sndPathBipWrong.htm deleted file mode 100644 index 28cf2c093..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ICommonConfig_sndPathBipWrong.htm +++ /dev/null @@ -1,26 +0,0 @@ -ICommonConfig.sndPathBipWrong Property

ICommonConfigsndPathBipWrong Property

URL of the sound for the impossible action.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string sndPathBipWrong { get; }
Request Example - View Source

Property Value

Type: String
An empty string or a path to the sounds resource.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IKasEvents_OnStartLinking.htm b/docs/APIv1/html/P_KASAPIv1_IKasEvents_OnStartLinking.htm deleted file mode 100644 index 589cfbd83..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IKasEvents_OnStartLinking.htm +++ /dev/null @@ -1,57 +0,0 @@ -IKasEvents.OnStartLinking Property

IKasEventsOnStartLinking Property

Triggers when a source has initiated linking mode.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
EventData<ILinkSource> OnStartLinking { get; }
Request Example - View Source

Property Value

Type: EventDataILinkSource
Collection to add or remove a callback.
Remarks
The argument of the callback is the link source that started the mode.
Examples
public class KasEventsExample1: PartModule {
-  public override void OnAwake() {
-    base.OnAwake();
-    KASAPI.KasEvents.OnStartLinking.Add(LinkStarted);
-    KASAPI.KasEvents.OnStopLinking.Add(LinkStopped);
-    KASAPI.KasEvents.OnLinkCreated.Add(LinkCreated);
-    KASAPI.KasEvents.OnLinkBroken.Add(LinkBroken);
-  }
-
-  void OnDestroy() {
-    KASAPI.KasEvents.OnStartLinking.Remove(LinkStarted);
-    KASAPI.KasEvents.OnStopLinking.Remove(LinkStopped);
-    KASAPI.KasEvents.OnLinkCreated.Remove(LinkCreated);
-    KASAPI.KasEvents.OnLinkBroken.Remove(LinkBroken);
-  }
-
-  void LinkStarted(ILinkSource source) {
-    DebugEx.Info("Link started by: {0}", source);
-  }
-
-  void LinkStopped(ILinkSource source) {
-    DebugEx.Info("Link stopepd by: {0}", source);
-  }
-
-  void LinkCreated(IKasLinkEvent ev) {
-    DebugEx.Info("Link created: {0} <=> {1}", ev.source, ev.target);
-  }
-
-  void LinkBroken(IKasLinkEvent ev) {
-    DebugEx.Info("Link broken: {0} <=> {1}", ev.source, ev.target);
-  }
-}
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IKasLinkEvent_actor.htm b/docs/APIv1/html/P_KASAPIv1_IKasLinkEvent_actor.htm deleted file mode 100644 index fb0a1fe2e..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IKasLinkEvent_actor.htm +++ /dev/null @@ -1,26 +0,0 @@ -IKasLinkEvent.actor Property

IKasLinkEventactor Property

Actor who changed the links tate.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
LinkActorType actor { get; }
Request Example - View Source

Property Value

Type: LinkActorType
The actor type that initated teh action.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IKasLinkEvent_source.htm b/docs/APIv1/html/P_KASAPIv1_IKasLinkEvent_source.htm deleted file mode 100644 index c31f1579e..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IKasLinkEvent_source.htm +++ /dev/null @@ -1,26 +0,0 @@ -IKasLinkEvent.source Property

IKasLinkEventsource Property

Link source.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
ILinkSource source { get; }
Request Example - View Source

Property Value

Type: ILinkSource
The link source module.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IKasLinkEvent_target.htm b/docs/APIv1/html/P_KASAPIv1_IKasLinkEvent_target.htm deleted file mode 100644 index 96939ee50..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IKasLinkEvent_target.htm +++ /dev/null @@ -1,26 +0,0 @@ -IKasLinkEvent.target Property

IKasLinkEventtarget Property

Link target.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
ILinkTarget target { get; }
Request Example - View Source

Property Value

Type: ILinkTarget
The link target module.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkCableJoint_cfgMaxCableLength.htm b/docs/APIv1/html/P_KASAPIv1_ILinkCableJoint_cfgMaxCableLength.htm deleted file mode 100644 index 5dd3ea068..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkCableJoint_cfgMaxCableLength.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkCableJoint.cfgMaxCableLength Property

ILinkCableJointcfgMaxCableLength Property

Maximum allowed distance between the parts to establish a link.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
float cfgMaxCableLength { get; }
Request Example - View Source

Property Value

Type: Single
Distance in meters. It's constant and doesn't depend on the joint state.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkCableJoint_deployedCableLength.htm b/docs/APIv1/html/P_KASAPIv1_ILinkCableJoint_deployedCableLength.htm deleted file mode 100644 index 7c70819a0..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkCableJoint_deployedCableLength.htm +++ /dev/null @@ -1,35 +0,0 @@ -ILinkCableJoint.deployedCableLength Property

ILinkCableJointdeployedCableLength Property

- Maximum possible distance between the source and head/target physical anchors. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
float deployedCableLength { get; }
Request Example - View Source

Property Value

Type: Single
- The length in meters. Always positive, if the PhysX joint is created. Zero, otherwise. -
Remarks
- This is a desired distance. The engine will try to keep it equal or less to this value, - but depending on the forces that affect the objects, this distance may be never reached. - Various implementations can adjust this value, but not greater than - cfgMaxCableLength. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkCableJoint_headRb.htm b/docs/APIv1/html/P_KASAPIv1_ILinkCableJoint_headRb.htm deleted file mode 100644 index cc57e741f..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkCableJoint_headRb.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkCableJoint.headRb Property

ILinkCableJointheadRb Property

Rigidbody of the physical cable head.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
Rigidbody headRb { get; }
Request Example - View Source

Property Value

Type: Rigidbody
The rigibody object, or null if there is no physical head started.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_cfgJointName.htm b/docs/APIv1/html/P_KASAPIv1_ILinkJoint_cfgJointName.htm deleted file mode 100644 index 7dc116543..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_cfgJointName.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkJoint.cfgJointName Property

ILinkJointcfgJointName Property

Identifier of the joint on the part.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string cfgJointName { get; }
Request Example - View Source

Property Value

Type: String
An arbitary string that identifies this joint.
Remarks
It's unique in scope of the part.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_coupleOnLinkMode.htm b/docs/APIv1/html/P_KASAPIv1_ILinkJoint_coupleOnLinkMode.htm deleted file mode 100644 index b3b41abef..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_coupleOnLinkMode.htm +++ /dev/null @@ -1,30 +0,0 @@ -ILinkJoint.coupleOnLinkMode Property

ILinkJointcoupleOnLinkMode Property

Tells the current coupling mode.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool coupleOnLinkMode { get; }
Request Example - View Source

Property Value

Type: Boolean
true if the vessels should couple on link (merge them into one).
Remarks
- Note, that if this mode set to true, it doesn't mean that the parts are coupled thru - this specific joint module. It only means that the parts, linked via this joint, are - guaranteed to be coupled, but the actual docking can be done by other joint or part. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_isLinked.htm b/docs/APIv1/html/P_KASAPIv1_ILinkJoint_isLinked.htm deleted file mode 100644 index fe583604f..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_isLinked.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkJoint.isLinked Property

ILinkJointisLinked Property

Tells if there is a physical joint created.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool isLinked { get; }
Request Example - View Source

Property Value

Type: Boolean
true if the source and target parts are physically linked.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_linkSource.htm b/docs/APIv1/html/P_KASAPIv1_ILinkJoint_linkSource.htm deleted file mode 100644 index ecd832065..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_linkSource.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkJoint.linkSource Property

ILinkJointlinkSource Property

Tells the current link source.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
ILinkSource linkSource { get; }
Request Example - View Source

Property Value

Type: ILinkSource
The link's source or null if the link is not established.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_linkTarget.htm b/docs/APIv1/html/P_KASAPIv1_ILinkJoint_linkTarget.htm deleted file mode 100644 index c10afd94e..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkJoint_linkTarget.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkJoint.linkTarget Property

ILinkJointlinkTarget Property

Tells the current link target.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
ILinkTarget linkTarget { get; }
Request Example - View Source

Property Value

Type: ILinkTarget
The link's target or null if the link is not established.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_attachNode.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_attachNode.htm deleted file mode 100644 index 906ef27bb..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_attachNode.htm +++ /dev/null @@ -1,29 +0,0 @@ -ILinkPeer.attachNode Property

ILinkPeerattachNode Property

Parsed attach node definition of the peer.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
AttachNode attachNode { get; }
Request Example - View Source

Property Value

Type: AttachNode
The attach node. It's never null.
Remarks
- This node is required to be fully setup on the part creation. The node must belong to the - part, but it's not required to be listed in the part's attach nodes list. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_cfgAttachNodeName.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_cfgAttachNodeName.htm deleted file mode 100644 index b701f1452..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_cfgAttachNodeName.htm +++ /dev/null @@ -1,31 +0,0 @@ -ILinkPeer.cfgAttachNodeName Property

ILinkPeercfgAttachNodeName Property

Name of the attach node on the part.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string cfgAttachNodeName { get; }
Request Example - View Source

Property Value

Type: String
Arbitrary string. It cannot be empty.
Remarks
- Every link peer is bound to an attach node thru which the link is made (including the coupling - operations). Several peer modules can share the same node, but in case of any of the modules - has made a link, the other dependents will go into the Locked state. - I.e. only one link can be made thru one attach node. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_cfgDependentNodeNames.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_cfgDependentNodeNames.htm deleted file mode 100644 index 803041b45..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_cfgDependentNodeNames.htm +++ /dev/null @@ -1,39 +0,0 @@ -ILinkPeer.cfgDependentNodeNames Property

ILinkPeercfgDependentNodeNames Property

- List of the attach node names, which this module doesn't own, but wants to align the state - with. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string[] cfgDependentNodeNames { get; }
Request Example - View Source

Property Value

Type: String
The list of the node names. It's never null.
Remarks

- The module will track the nodes and will adjust its state as those nodes were owned by the - module. However, this module will never change the mode of those nodes. This can be used to - lock or block the peer modules that control the different primary nodes, but need to cooperate - with the other similar modules on the part. This setting allows defining a group of peer - modules which only allow linking of a single module at the time. -

- Note, that the part's cfgAttachNodeName is not present in this list by - default. The implementation should explicitly check for the primary node, or the config must - take care of it. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_cfgLinkType.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_cfgLinkType.htm deleted file mode 100644 index b085c2a2e..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_cfgLinkType.htm +++ /dev/null @@ -1,29 +0,0 @@ -ILinkPeer.cfgLinkType Property

ILinkPeercfgLinkType Property

Source link type identifier.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string cfgLinkType { get; }
Request Example - View Source

Property Value

Type: String
Arbitrary string. Can be empty.
Remarks
- This value is used to find the compatible peers. The peers of the different types will not - be able to connect with each other. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_coupleNode.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_coupleNode.htm deleted file mode 100644 index 25c8ed33d..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_coupleNode.htm +++ /dev/null @@ -1,31 +0,0 @@ -ILinkPeer.coupleNode Property

ILinkPeercoupleNode Property

- Attach node to use when the peers need to couple into a single parts hierarchy. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
AttachNode coupleNode { get; }
Request Example - View Source

Property Value

Type: AttachNode
The attach node or null if the peer doesn't support coupling.
Remarks
- The node is not required to be in the list of the attach nodes of the part. The caller must - ensure it before doing the actual coupling. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_isLinked.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_isLinked.htm deleted file mode 100644 index 1b1d873e9..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_isLinked.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkPeer.isLinked Property

ILinkPeerisLinked Property

Tells if this peer is currectly linked to another peer.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool isLinked { get; }
Request Example - View Source

Property Value

Type: Boolean
The current state of the link.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_isLocked.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_isLocked.htm deleted file mode 100644 index 3dd0b713f..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_isLocked.htm +++ /dev/null @@ -1,33 +0,0 @@ -ILinkPeer.isLocked Property

ILinkPeerisLocked Property

- Tells if the peer's link ability is disabled due to it's attach node is taken by another peer - on the same part. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool isLocked { get; }
Request Example - View Source

Property Value

Type: Boolean
The locked state.
Remarks
- When multiple peers on the part share the same attach node, only one of them can make a link - via this node. Once the attach node is used for a link, the other peers gets locked and don't - interfere until the link is broken and the node is released. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_isNodeBlocked.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_isNodeBlocked.htm deleted file mode 100644 index 1af678287..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_isNodeBlocked.htm +++ /dev/null @@ -1,27 +0,0 @@ -ILinkPeer.isNodeBlocked Property

ILinkPeerisNodeBlocked Property

Tells if the peer's attach node is occupied by an incompatible part.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool isNodeBlocked { get; }
Request Example - View Source

Property Value

Type: Boolean
true if the state is NodeIsBlocked, or false, otherwise. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_linkModuleIndex.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_linkModuleIndex.htm deleted file mode 100644 index 83fc59f00..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_linkModuleIndex.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkPeer.linkModuleIndex Property

ILinkPeerlinkModuleIndex Property

The persisted index of the module on the part of the other peer.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
int linkModuleIndex { get; }
Request Example - View Source

Property Value

Type: Int32
The module index or -1.
Remarks
This value must be available during the vessel loading.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_linkPartId.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_linkPartId.htm deleted file mode 100644 index 390464812..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_linkPartId.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkPeer.linkPartId Property

ILinkPeerlinkPartId Property

The persisted ID of the linked part of the other peer.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
uint linkPartId { get; }
Request Example - View Source

Property Value

Type: UInt32
The flight ID of the part or 0.
Remarks
This value must be available during the vessel loading.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_linkState.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_linkState.htm deleted file mode 100644 index 27826d515..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_linkState.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkPeer.linkState Property

ILinkPeerlinkState Property

Current state of the peer.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
LinkState linkState { get; }
Request Example - View Source

Property Value

Type: LinkState
The current state.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_nodeTransform.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_nodeTransform.htm deleted file mode 100644 index f2f971521..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_nodeTransform.htm +++ /dev/null @@ -1,29 +0,0 @@ -ILinkPeer.nodeTransform Property

ILinkPeernodeTransform Property

- Transform that defines the position and orientation of the base node to which all the - renderers and physical anchors are aligned. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
Transform nodeTransform { get; }
Request Example - View Source

Property Value

Type: Transform
Game object transformation. It's never null.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_otherPeer.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_otherPeer.htm deleted file mode 100644 index 57b4576fc..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_otherPeer.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkPeer.otherPeer Property

ILinkPeerotherPeer Property

Other end of the link.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
ILinkPeer otherPeer { get; }
Request Example - View Source

Property Value

Type: ILinkPeer
The other end of the link or null if no link established.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_part.htm b/docs/APIv1/html/P_KASAPIv1_ILinkPeer_part.htm deleted file mode 100644 index 0cc37f308..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkPeer_part.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkPeer.part Property

ILinkPeerpart Property

Part that owns the source.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
Part part { get; }
Request Example - View Source

Property Value

Type: Part
Instance of the part.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_cfgRendererName.htm b/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_cfgRendererName.htm deleted file mode 100644 index 44b7fa57f..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_cfgRendererName.htm +++ /dev/null @@ -1,28 +0,0 @@ -ILinkRenderer.cfgRendererName Property

ILinkRenderercfgRendererName Property

- Unique name of the randerer that is used by the other modules to find this renderer. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string cfgRendererName { get; }
Request Example - View Source

Property Value

Type: String
Arbitrary string. Can be empty.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_colorOverride.htm b/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_colorOverride.htm deleted file mode 100644 index c10bac94e..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_colorOverride.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkRenderer.colorOverride Property

ILinkRenderercolorOverride Property

Temporally sets another color to the link meshes.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
Nullable<Color> colorOverride { get; set; }
Request Example - View Source

Property Value

Type: NullableColor
Color or null if the original mesh color should be used.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_isPhysicalCollider.htm b/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_isPhysicalCollider.htm deleted file mode 100644 index 1ba82e569..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_isPhysicalCollider.htm +++ /dev/null @@ -1,30 +0,0 @@ -ILinkRenderer.isPhysicalCollider Property

ILinkRendererisPhysicalCollider Property

Tells if the link interacts with the rigid bodies.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool isPhysicalCollider { get; set; }
Request Example - View Source

Property Value

Type: Boolean
The current state of the collider(s).
Remarks
- Setting this property to false turns the link colliders into triggers. I.e. the link - won't have a physical impact but the collision events will be sent to the parent game object. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_isStarted.htm b/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_isStarted.htm deleted file mode 100644 index 6b264e57f..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_isStarted.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkRenderer.isStarted Property

ILinkRendererisStarted Property

Tells if the renderer is started and active.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool isStarted { get; }
Request Example - View Source

Property Value

Type: Boolean
The start state.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_shaderNameOverride.htm b/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_shaderNameOverride.htm deleted file mode 100644 index abe1b8edb..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_shaderNameOverride.htm +++ /dev/null @@ -1,28 +0,0 @@ -ILinkRenderer.shaderNameOverride Property

ILinkRenderershaderNameOverride Property

Temporally sets another shader to the link meshes.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
string shaderNameOverride { get; set; }
Request Example - View Source

Property Value

Type: String
- Name of the shader or null if the original mesh shader should be used. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_sourceTransform.htm b/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_sourceTransform.htm deleted file mode 100644 index 44fb32314..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_sourceTransform.htm +++ /dev/null @@ -1,29 +0,0 @@ -ILinkRenderer.sourceTransform Property

ILinkRenderersourceTransform Property

- Base position/direction of the connection point at the beginning of the link. The source - joint models will be aligned against this transform. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
Transform sourceTransform { get; }
Request Example - View Source

Property Value

Type: Transform
The source game object's transform.
Remarks
The value is undefined if the renderer is not started.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_stretchRatio.htm b/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_stretchRatio.htm deleted file mode 100644 index edec2b816..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_stretchRatio.htm +++ /dev/null @@ -1,33 +0,0 @@ -ILinkRenderer.stretchRatio Property

ILinkRendererstretchRatio Property

- Defines how significantly the link has stretched or shrinked comparing to it's "normal" state. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
float stretchRatio { get; set; }
Request Example - View Source

Property Value

Type: Single
The stretch/shrink ratio.
Remarks
- A value below 1.0 means the link has shrinked. Otherwise, it's stretched. -

- This ratio only affects the visual representation. For the renderers that don't care about - stretching it's ok to always return 1.0 from the getter and ignore calls to the setter. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_targetTransform.htm b/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_targetTransform.htm deleted file mode 100644 index fc2aac6f9..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkRenderer_targetTransform.htm +++ /dev/null @@ -1,29 +0,0 @@ -ILinkRenderer.targetTransform Property

ILinkRenderertargetTransform Property

- Base position/direction of the connection point at the end of the link. The target - joint models will be aligned against this transform. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
Transform targetTransform { get; }
Request Example - View Source

Property Value

Type: Transform
The target game object's transform.
Remarks
The value is undefined if the renderer is not started.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkSource_linkJoint.htm b/docs/APIv1/html/P_KASAPIv1_ILinkSource_linkJoint.htm deleted file mode 100644 index f3d047d80..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkSource_linkJoint.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkSource.linkJoint Property

ILinkSourcelinkJoint Property

Joint module that manages a physical link.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
ILinkJoint linkJoint { get; }
Request Example - View Source

Property Value

Type: ILinkJoint
The physical joint module on the part.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkSource_linkRenderer.htm b/docs/APIv1/html/P_KASAPIv1_ILinkSource_linkRenderer.htm deleted file mode 100644 index e6e108ecd..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkSource_linkRenderer.htm +++ /dev/null @@ -1,34 +0,0 @@ -ILinkSource.linkRenderer Property

ILinkSourcelinkRenderer Property

Renderer of the link meshes.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
ILinkRenderer linkRenderer { get; }
Request Example - View Source

Property Value

Type: ILinkRenderer
The renderer that represents the link.
Examples
public ILinkRenderer linkRenderer { get; private set; }
-
-[KSPField]
-public string rendererName = "";
-
-void InitRenderer() {
-  linkRenderer = part.FindModulesImplementing<ILinkRenderer>()
-      .FirstOrDefault(r => r.cfgRendererName == rendererName);
-}
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkSource_linkTarget.htm b/docs/APIv1/html/P_KASAPIv1_ILinkSource_linkTarget.htm deleted file mode 100644 index 0d9466ec8..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkSource_linkTarget.htm +++ /dev/null @@ -1,36 +0,0 @@ -ILinkSource.linkTarget Property

ILinkSourcelinkTarget Property

Target of the link.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
ILinkTarget linkTarget { get; }
Request Example - View Source

Property Value

Type: ILinkTarget
Target or null if nothing is linked.
Remarks
It only defined for an established link.
Examples
// Returns the linked part of the source, if any. It assumes there is exactly one source module
-// on the source part.
-public static Part FindTargetFromSource(Part srcPart) {
-  var source = srcPart.FindModulesImplementing<ILinkSource>()
-      .FirstOrDefault(s => s.linkTarget != null);
-  if (source == null) {
-    Debug.Log("Source is not connected");
-    return null;
-  }
-  return source.linkTarget.part;
-}
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkVesselInfo_part.htm b/docs/APIv1/html/P_KASAPIv1_ILinkVesselInfo_part.htm deleted file mode 100644 index 92040c3c7..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkVesselInfo_part.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkVesselInfo.part Property

ILinkVesselInfopart Property

Part that owns the info.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
Part part { get; }
Request Example - View Source

Property Value

Type: Part
Instance of the part.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_ILinkVesselInfo_vesselInfo.htm b/docs/APIv1/html/P_KASAPIv1_ILinkVesselInfo_vesselInfo.htm deleted file mode 100644 index e15a06c76..000000000 --- a/docs/APIv1/html/P_KASAPIv1_ILinkVesselInfo_vesselInfo.htm +++ /dev/null @@ -1,26 +0,0 @@ -ILinkVesselInfo.vesselInfo Property

ILinkVesselInfovesselInfo Property

The persisted vessel's info.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
DockedVesselInfo vesselInfo { get; set; }
Request Example - View Source

Property Value

Type: DockedVesselInfo
The vessel info or null.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IWinchControl_cfgMaxCableLength.htm b/docs/APIv1/html/P_KASAPIv1_IWinchControl_cfgMaxCableLength.htm deleted file mode 100644 index bb2bd9dbc..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IWinchControl_cfgMaxCableLength.htm +++ /dev/null @@ -1,28 +0,0 @@ -IWinchControl.cfgMaxCableLength Property

IWinchControlcfgMaxCableLength Property

Maximum reserve of the cable in the winch.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
float cfgMaxCableLength { get; }
Request Example - View Source

Property Value

Type: Single
The length of the cable in meters.
Remarks
- This is the maximum possible distance between the winch and its connector head. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IWinchControl_cfgMotorMaxSpeed.htm b/docs/APIv1/html/P_KASAPIv1_IWinchControl_cfgMotorMaxSpeed.htm deleted file mode 100644 index bf816bcdf..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IWinchControl_cfgMotorMaxSpeed.htm +++ /dev/null @@ -1,26 +0,0 @@ -IWinchControl.cfgMotorMaxSpeed Property

IWinchControlcfgMotorMaxSpeed Property

Maximum speed of retracting or extending the cable.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
float cfgMotorMaxSpeed { get; }
Request Example - View Source

Property Value

Type: Single
Speed in meters per second.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IWinchControl_currentCableLength.htm b/docs/APIv1/html/P_KASAPIv1_IWinchControl_currentCableLength.htm deleted file mode 100644 index 0a723e664..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IWinchControl_currentCableLength.htm +++ /dev/null @@ -1,31 +0,0 @@ -IWinchControl.currentCableLength Property

IWinchControlcurrentCableLength Property

Amount of the cable that was extended till the moment.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
float currentCableLength { get; }
Request Example - View Source

Property Value

Type: Single
The length of the cable in meters.
Remarks
- This value is dynamic and can be affected by the motor. This is not the actual distance - between the winch and the connector head! In order to find one, take the - physicalAnchorTransform values from the source and target, and calculate the - distance between their positions. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IWinchControl_isConnectorLocked.htm b/docs/APIv1/html/P_KASAPIv1_IWinchControl_isConnectorLocked.htm deleted file mode 100644 index 5d45315e1..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IWinchControl_isConnectorLocked.htm +++ /dev/null @@ -1,31 +0,0 @@ -IWinchControl.isConnectorLocked Property

IWinchControlisConnectorLocked Property

Tells if the cable connector head is locked into the winch.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
bool isConnectorLocked { get; }
Request Example - View Source

Property Value

Type: Boolean
true if the connector is rigid relative to the owner part.
Remarks
- In the locked state there is no free cable available, and there is no moving part - (the connector). If the winch is linked to a part and the connector is locked, then the traget - part is docked to the vessel that owns the winch. When the connector unlocks, the - attached part undocks from the vessel. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IWinchControl_motorCurrentSpeed.htm b/docs/APIv1/html/P_KASAPIv1_IWinchControl_motorCurrentSpeed.htm deleted file mode 100644 index 3df07863d..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IWinchControl_motorCurrentSpeed.htm +++ /dev/null @@ -1,34 +0,0 @@ -IWinchControl.motorCurrentSpeed Property

IWinchControlmotorCurrentSpeed Property

Current speed of the motor spindel.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
float motorCurrentSpeed { get; }
Request Example - View Source

Property Value

Type: Single
The speed in meters per second.
Remarks

- This is the speed at which the cable is being extended or retracted at the current moment. - The actual speed of the motor can differ from what was set via the control methods (e.g. - SetMotor(Single)) due to there is some inetria momentum. Negative speed means the cable - is being retracted, and the positive speed means the cable is being extened. -

- The motor speed is always trying to match the motorTargetSpeed. Depending on the - part's implementation and settings, some time may be needed to actually have the match. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/P_KASAPIv1_IWinchControl_motorTargetSpeed.htm b/docs/APIv1/html/P_KASAPIv1_IWinchControl_motorTargetSpeed.htm deleted file mode 100644 index 36877be88..000000000 --- a/docs/APIv1/html/P_KASAPIv1_IWinchControl_motorTargetSpeed.htm +++ /dev/null @@ -1,29 +0,0 @@ -IWinchControl.motorTargetSpeed Property

IWinchControlmotorTargetSpeed Property

Desired speed of the motor spindel.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
float motorTargetSpeed { get; }
Request Example - View Source

Property Value

Type: Single
The speed target. It's can never exceed the part's limits setting.
Remarks
- Ideally, the motor is always working at this speed. However, in the physics world of KSP the - motor may operate at the lower or the higher speeds. It depends of the various conditions. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_ICommonConfig.htm b/docs/APIv1/html/Properties_T_KASAPIv1_ICommonConfig.htm deleted file mode 100644 index 83fd2fba3..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_ICommonConfig.htm +++ /dev/null @@ -1,10 +0,0 @@ -ICommonConfig Properties

ICommonConfig Properties

The ICommonConfig type exposes the following members.

Properties
-   - NameDescription
Public propertyCode examplekeyDropConnector
Keyboard key to trigger the drop connector event.
Public propertyCode examplekeyPickupConnector
Keyboard key to trigger the pickup connector event.
Public propertysndPathBipWrong
URL of the sound for the impossible action.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_IKasEvents.htm b/docs/APIv1/html/Properties_T_KASAPIv1_IKasEvents.htm deleted file mode 100644 index 41282f00d..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_IKasEvents.htm +++ /dev/null @@ -1,10 +0,0 @@ -IKasEvents Properties

IKasEvents Properties

The IKasEvents type exposes the following members.

Properties
-   - NameDescription
Public propertyCode exampleOnLinkBroken
Triggers when a link between two parts has been broken.
Public propertyCode exampleOnLinkCreated
Triggers when a link between two parts has been successfully established.
Public propertyCode exampleOnStartLinking
Triggers when a source has initiated linking mode.
Public propertyCode exampleOnStopLinking
Triggers when a source has stopped linking mode.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_IKasLinkEvent.htm b/docs/APIv1/html/Properties_T_KASAPIv1_IKasLinkEvent.htm deleted file mode 100644 index 68be79f92..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_IKasLinkEvent.htm +++ /dev/null @@ -1,10 +0,0 @@ -IKasLinkEvent Properties

IKasLinkEvent Properties

The IKasLinkEvent type exposes the following members.

Properties
-   - NameDescription
Public propertyactor
Actor who changed the links tate.
Public propertysource
Link source.
Public propertytarget
Link target.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkCableJoint.htm b/docs/APIv1/html/Properties_T_KASAPIv1_ILinkCableJoint.htm deleted file mode 100644 index adb5aad7c..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkCableJoint.htm +++ /dev/null @@ -1,14 +0,0 @@ -ILinkCableJoint Properties

ILinkCableJoint Properties

The ILinkCableJoint type exposes the following members.

Properties
-   - NameDescription
Public propertycfgMaxCableLength
Maximum allowed distance between the parts to establish a link.
Public propertydeployedCableLength
- Maximum possible distance between the source and head/target physical anchors. -
Public propertyheadRb
Rigidbody of the physical cable head.
Public propertyrealCableLength
- Returns the actual distance between the source and target/head physical anchors. -
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkJoint.htm b/docs/APIv1/html/Properties_T_KASAPIv1_ILinkJoint.htm deleted file mode 100644 index 2bbc6a7a4..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkJoint.htm +++ /dev/null @@ -1,10 +0,0 @@ -ILinkJoint Properties

ILinkJoint Properties

The ILinkJoint type exposes the following members.

Properties
-   - NameDescription
Public propertycfgJointName
Identifier of the joint on the part.
Public propertycoupleOnLinkMode
Tells the current coupling mode.
Public propertyisLinked
Tells if there is a physical joint created.
Public propertylinkSource
Tells the current link source.
Public propertylinkTarget
Tells the current link target.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkPeer.htm b/docs/APIv1/html/Properties_T_KASAPIv1_ILinkPeer.htm deleted file mode 100644 index 4b381c44b..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkPeer.htm +++ /dev/null @@ -1,21 +0,0 @@ -ILinkPeer Properties

ILinkPeer Properties

The ILinkPeer type exposes the following members.

Properties
-   - NameDescription
Public propertyattachNode
Parsed attach node definition of the peer.
Public propertycfgAttachNodeName
Name of the attach node on the part.
Public propertycfgDependentNodeNames
- List of the attach node names, which this module doesn't own, but wants to align the state - with. -
Public propertycfgLinkType
Source link type identifier.
Public propertycoupleNode
- Attach node to use when the peers need to couple into a single parts hierarchy. -
Public propertyisLinked
Tells if this peer is currectly linked to another peer.
Public propertyisLocked
- Tells if the peer's link ability is disabled due to it's attach node is taken by another peer - on the same part. -
Public propertyisNodeBlocked
Tells if the peer's attach node is occupied by an incompatible part.
Public propertylinkModuleIndex
The persisted index of the module on the part of the other peer.
Public propertylinkPartId
The persisted ID of the linked part of the other peer.
Public propertylinkState
Current state of the peer.
Public propertynodeTransform
- Transform that defines the position and orientation of the base node to which all the - renderers and physical anchors are aligned. -
Public propertyotherPeer
Other end of the link.
Public propertypart
Part that owns the source.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkRenderer.htm b/docs/APIv1/html/Properties_T_KASAPIv1_ILinkRenderer.htm deleted file mode 100644 index 4a5ea9662..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkRenderer.htm +++ /dev/null @@ -1,20 +0,0 @@ -ILinkRenderer Properties

ILinkRenderer Properties

The ILinkRenderer type exposes the following members.

Properties
-   - NameDescription
Public propertycfgRendererName
- Unique name of the randerer that is used by the other modules to find this renderer. -
Public propertycolorOverride
Temporally sets another color to the link meshes.
Public propertyisPhysicalCollider
Tells if the link interacts with the rigid bodies.
Public propertyisStarted
Tells if the renderer is started and active.
Public propertyshaderNameOverride
Temporally sets another shader to the link meshes.
Public propertysourceTransform
- Base position/direction of the connection point at the beginning of the link. The source - joint models will be aligned against this transform. -
Public propertystretchRatio
- Defines how significantly the link has stretched or shrinked comparing to it's "normal" state. -
Public propertytargetTransform
- Base position/direction of the connection point at the end of the link. The target - joint models will be aligned against this transform. -
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkSource.htm b/docs/APIv1/html/Properties_T_KASAPIv1_ILinkSource.htm deleted file mode 100644 index c02496c27..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkSource.htm +++ /dev/null @@ -1,10 +0,0 @@ -ILinkSource Properties

ILinkSource Properties

The ILinkSource type exposes the following members.

Properties
-   - NameDescription
Public propertylinkJoint
Joint module that manages a physical link.
Public propertyCode examplelinkRenderer
Renderer of the link meshes.
Public propertyCode examplelinkTarget
Target of the link.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkTarget.htm b/docs/APIv1/html/Properties_T_KASAPIv1_ILinkTarget.htm deleted file mode 100644 index 28f863617..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkTarget.htm +++ /dev/null @@ -1,10 +0,0 @@ -ILinkTarget Properties

ILinkTarget Properties

The ILinkTarget type exposes the following members.

Properties
-   - NameDescription
Public propertyCode examplelinkSource
Source that maintains the link.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkVesselInfo.htm b/docs/APIv1/html/Properties_T_KASAPIv1_ILinkVesselInfo.htm deleted file mode 100644 index 88f6673a3..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_ILinkVesselInfo.htm +++ /dev/null @@ -1,10 +0,0 @@ -ILinkVesselInfo Properties

ILinkVesselInfo Properties

The ILinkVesselInfo type exposes the following members.

Properties
-   - NameDescription
Public propertypart
Part that owns the info.
Public propertyvesselInfo
The persisted vessel's info.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/Properties_T_KASAPIv1_IWinchControl.htm b/docs/APIv1/html/Properties_T_KASAPIv1_IWinchControl.htm deleted file mode 100644 index feeb5da4c..000000000 --- a/docs/APIv1/html/Properties_T_KASAPIv1_IWinchControl.htm +++ /dev/null @@ -1,10 +0,0 @@ -IWinchControl Properties

IWinchControl Properties

The IWinchControl type exposes the following members.

Properties
-   - NameDescription
Public propertycfgMaxCableLength
Maximum reserve of the cable in the winch.
Public propertycfgMotorMaxSpeed
Maximum speed of retracting or extending the cable.
Public propertycurrentCableLength
Amount of the cable that was extended till the moment.
Public propertyisConnectorLocked
Tells if the cable connector head is locked into the winch.
Public propertymotorCurrentSpeed
Current speed of the motor spindel.
Public propertymotorTargetSpeed
Desired speed of the motor spindel.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/T_KASAPIv1_GUILinkMode.htm b/docs/APIv1/html/T_KASAPIv1_GUILinkMode.htm deleted file mode 100644 index 73d2923ed..000000000 --- a/docs/APIv1/html/T_KASAPIv1_GUILinkMode.htm +++ /dev/null @@ -1,30 +0,0 @@ -GUILinkMode Enumeration

GUILinkMode Enumeration

Specifies how the linking mode is displayed in GUI.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public enum GUILinkMode
Request Example - View Source
Members
-   - Member nameValueDescription
None0Uninitialized value. Must never be used in the real calls.
Interactive1 - The ending part of the link will expect the player's input to complete or cancel the link. -
API2No GUI interaction is expected to complete the link.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/T_KASAPIv1_IJointUtils.htm b/docs/APIv1/html/T_KASAPIv1_IJointUtils.htm deleted file mode 100644 index 3232bbfb1..000000000 --- a/docs/APIv1/html/T_KASAPIv1_IJointUtils.htm +++ /dev/null @@ -1,28 +0,0 @@ -IJointUtils Interface

IJointUtils Interface

Various tools to deal with KSP part joints.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public interface IJointUtils
Request Example - View Source

The IJointUtils type exposes the following members.

Methods
-   - NameDescription
Public methodDumpJoint
Outputs all properties of the joint to the string.
Public methodDumpSpringJoint
Outputs all properties of the joint to the string.
Public methodResetJoint
Initializes joint to a consistent state.
Public methodSetupDistanceJoint
Sets up a cannonical distance joint.
Public methodSetupFixedJoint
Sets up a cannonical fixed joint.
Public methodSetupPrismaticJoint
Sets up joint so what it becomes a prismatic joint.
Public methodSetupSphericalJoint
Sets up joint so what it becomes a spherical hinge joint.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/T_KASAPIv1_ILinkCableJoint.htm b/docs/APIv1/html/T_KASAPIv1_ILinkCableJoint.htm deleted file mode 100644 index 08dcf11cb..000000000 --- a/docs/APIv1/html/T_KASAPIv1_ILinkCableJoint.htm +++ /dev/null @@ -1,53 +0,0 @@ -ILinkCableJoint Interface

ILinkCableJoint Interface

- Interface for a physical cable link. Such links keep the dsitance between the object below the - maximum but don't restict any other movements of the objects relative to each other. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public interface ILinkCableJoint : ILinkJoint
Request Example - View Source

The ILinkCableJoint type exposes the following members.

Properties
-   - NameDescription
Public propertycfgMaxCableLength
Maximum allowed distance between the parts to establish a link.
Public propertydeployedCableLength
- Maximum possible distance between the source and head/target physical anchors. -
Public propertyheadRb
Rigidbody of the physical cable head.
Public propertyrealCableLength
- Returns the actual distance between the source and target/head physical anchors. -
Top
Methods
-   - NameDescription
Public methodSetCableLength
- Sets the maximum possible distance between the source and the head/target physical anchors. -
Public methodStartPhysicalHead
- Attaches the specified object to the source and starts the environmental forces on it. -
Public methodStopPhysicalHead
Stops handling the physical head.
Top
Remarks

- The specifics of this module is that the distance between the linked parts becomes variable. - Once the link is created, the distance limit is set to the actual distance between the source - and target. This limit won't allow the objects to separate too far from each other, but the - objects will be allowed to come closer. The code can adjust the limit once the joint is - created. -

- Due to the specifics of handling this kind of joints in PhysX, the real distance between the - objects can become greater than the distance limit. In fact, if there are forces that try - to separate the objects, then the actual distance will always be a bit more than the limit. Do - not expect this difference to have any meaning, it depends on the PhysX engine and can be - anything. -

See Also
\ No newline at end of file diff --git a/docs/APIv1/html/T_KASAPIv1_ILinkRenderer.htm b/docs/APIv1/html/T_KASAPIv1_ILinkRenderer.htm deleted file mode 100644 index de291ff45..000000000 --- a/docs/APIv1/html/T_KASAPIv1_ILinkRenderer.htm +++ /dev/null @@ -1,46 +0,0 @@ -ILinkRenderer Interface

ILinkRenderer Interface

- Interface for a module that takes care of rendering a link and, optionally, manages its - colliders. -

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public interface ILinkRenderer
Request Example - View Source

The ILinkRenderer type exposes the following members.

Properties
-   - NameDescription
Public propertycfgRendererName
- Unique name of the randerer that is used by the other modules to find this renderer. -
Public propertycolorOverride
Temporally sets another color to the link meshes.
Public propertyisPhysicalCollider
Tells if the link interacts with the rigid bodies.
Public propertyisStarted
Tells if the renderer is started and active.
Public propertyshaderNameOverride
Temporally sets another shader to the link meshes.
Public propertysourceTransform
- Base position/direction of the connection point at the beginning of the link. The source - joint models will be aligned against this transform. -
Public propertystretchRatio
- Defines how significantly the link has stretched or shrinked comparing to it's "normal" state. -
Public propertytargetTransform
- Base position/direction of the connection point at the end of the link. The target - joint models will be aligned against this transform. -
Top
Methods
-   - NameDescription
Public methodCheckColliderHits
Verifies that there are no obstacles beween the points.
Public methodStartRenderer
Starts rendering a link between the objects.
Public methodStopRenderer
Cancels rendering the link.
Public methodUpdateLink
Called when a link representation update is required.
Top
Remarks
- The link can be rendered between any two transformations. The renderer is responsible to adjust - the representation if the connecting points have moved (UpdateLink). -
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/T_KASAPIv1_ILinkTarget.htm b/docs/APIv1/html/T_KASAPIv1_ILinkTarget.htm deleted file mode 100644 index a2f77c58d..000000000 --- a/docs/APIv1/html/T_KASAPIv1_ILinkTarget.htm +++ /dev/null @@ -1,49 +0,0 @@ -ILinkTarget Interface

ILinkTarget Interface

A generic target of a KAS link between two parts.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public interface ILinkTarget : ILinkPeer
Request Example - View Source

The ILinkTarget type exposes the following members.

Properties
-   - NameDescription
Public propertyCode examplelinkSource
Source that maintains the link.
Top
Remarks

- The target is a sink for a link initiated by the another part's ILinkSource. -

- The link target have a state that defines what it can do (linkState). - Not all actions are allowed in any state. The following state diagram tells what the target - can do and when: -

TransitionAction
Available => AcceptingLinks - This target is able to connect to a source that has just initiated a link. -
Available => RejectingLinks - This target cannot connect to a source that has just initiated a link. -
AcceptingLinks => Available - The source module has ended its linking mode without linking to this target. -
AcceptingLinks => LinkedA source from the world has linked to this target.
AcceptingLinks => Locked - A source from the world has linked to another target on the part that owns this target. -
Linked => AvailableThe link to this target has been broken by the source.
Locked => Available - A source from the world has broke a link to another target on the part that owns this - target. -
RejectingLinks => Available - A source from the world has ended the linking mode, and the target's part hasn't linked. -
RejectingLinks => Locked - A source from the world has linked to the owner of this target but thru another target. -
Examples
See ILinkSource for the examples.
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/T_KASAPIv1_KASAPI.htm b/docs/APIv1/html/T_KASAPIv1_KASAPI.htm deleted file mode 100644 index 372209c0b..000000000 --- a/docs/APIv1/html/T_KASAPIv1_KASAPI.htm +++ /dev/null @@ -1,28 +0,0 @@ -KASAPI Class

KASAPI Class

KAS API, version 1.
Inheritance Hierarchy
SystemObject
  KASAPIv1KASAPI

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public static class KASAPI
Request Example - View Source

The KASAPI type exposes the following members.

Fields
-   - NameDescription
Public fieldStatic memberAttachNodesUtils
KAS attach nodes utils.
Public fieldStatic memberCommonConfig
KAS common config settings.
Public fieldStatic memberisLoaded
Tells if API V1 was loaded and ready to use.
Public fieldStatic memberJointUtils
KAS joints untils.
Public fieldStatic memberKasEvents
KAS global events.
Public fieldStatic memberLinkUtils
KAS link utils.
Public fieldStatic memberPhysicsUtils
KAS physics utils.
Top
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/T_KASAPIv1_LinkActorType.htm b/docs/APIv1/html/T_KASAPIv1_LinkActorType.htm deleted file mode 100644 index e42b1441b..000000000 --- a/docs/APIv1/html/T_KASAPIv1_LinkActorType.htm +++ /dev/null @@ -1,46 +0,0 @@ -LinkActorType Enumeration

LinkActorType Enumeration

Defines an actor that changes KAS link.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public enum LinkActorType
Request Example - View Source
Members
-   - Member nameValueDescription
None0Actor is unspecified.
API1Thrid-party code has affected the link during its normal workflow.
Physics2Link has changed as a result of physics effect.
Player3Player input has affected the link state.
Remarks
- The implementations of ILinkSource and ILinkTarget may check the - type to determine how the action needs to be presented to the player. The type - API must never be presented to the player, it's used by the internal - logic to manage the sate of the links. For all the other types it's up to the implementation how - to present it. -
Examples
// Disconnects the source part from its target. Only once source can be connected on the part.
-// And it can be connected to the exactly one target.
-public static void DisconnectParts(Part srcPart) {
-  var source = srcPart.FindModulesImplementing<ILinkSource>()
-      .FirstOrDefault(s => s.linkTarget != null);
-  if (source == null) {
-    Debug.LogWarningFormat("Part is not connected to anything");
-    return;
-  }
-  // LinkActorType.API tells the implementation to not execute any user facing effects on the
-  // link. See LinkActorType for more details.
-  source.BreakCurrentLink(LinkActorType.API);
-}
See Also
\ No newline at end of file diff --git a/docs/APIv1/html/T_KASAPIv1_LinkState.htm b/docs/APIv1/html/T_KASAPIv1_LinkState.htm deleted file mode 100644 index 326dc3aa4..000000000 --- a/docs/APIv1/html/T_KASAPIv1_LinkState.htm +++ /dev/null @@ -1,39 +0,0 @@ -LinkState Enumeration

LinkState Enumeration

Defines currect state of the link.

- Namespace: -  KASAPIv1
- Assembly: -  KAS-API-v1 (in KAS-API-v1.dll) Version: KAS API v1
Syntax
C#
public enum LinkState
Request Example - View Source
Members
-   - Member nameValueDescription
None0Initial and an invalid state. It must never be normally used.
Available1Module is avalable for the links.
Locked2 - Module is unavailable for the link because of another module on the part has established one. -
Linking3 - Module has initated an outgoing link request and expecting for it to be accepted. -
Linked4Module is linked to another module.
AcceptingLinks5Module is ready to accept a link and may accept the request.
RejectingLinks6Module doesn't accept link and will reject any request.
NodeIsBlocked7 - The attach node, allocated to the module, is occupied by another part, which doesn't support - linking. -
Remarks
Each implementation defines own state tranistion model. E.g. - ILinkSource or ILinkTarget. In every state the module can only - handle a very specific set of actions. Such approach helps keeping module logic more clear and - granular. -
See Also
\ No newline at end of file diff --git a/docs/APIv1/icons/AlertNote.png b/docs/APIv1/icons/AlertNote.png deleted file mode 100644 index 0ab92b66a..000000000 Binary files a/docs/APIv1/icons/AlertNote.png and /dev/null differ diff --git a/docs/APIv1/scripts/jquery-1.11.0.min.js b/docs/APIv1/scripts/jquery-1.11.0.min.js deleted file mode 100644 index 73f33fb3a..000000000 --- a/docs/APIv1/scripts/jquery-1.11.0.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f -}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="
a",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/\s*$/g,sb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:l.htmlSerialize?[0,"",""]:[1,"X
","
"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("