bitburner-src/doc/source/netscript/stanekapi/canPlace.rst

16 lines
643 B
ReStructuredText
Raw Normal View History

2021-09-25 23:21:50 +02:00
canPlace() Netscript Function
=======================================
2021-10-17 03:00:36 +02:00
.. js:function:: canPlace(worldX, worldY, rotation, fragmentId)
2021-09-25 23:21:50 +02:00
:RAM cost: 0.5 GB
:param int worldX: World X against which to align the top left of the fragment.
:param int worldY: World Y against which to align the top left of the fragment.
2021-10-17 03:00:36 +02:00
:param int rotation: A number from 0 to 3, the mount of 90 degree turn to take.
2021-09-25 23:21:50 +02:00
:param int fragmentId: ID of the fragment to place.
:returns: `true` if the fragment can be placed at that position. `false` otherwise.
Example:
.. code-block:: javascript
canPlace(0, 4, 17); // returns true