diff --git a/README.md b/README.md index 8f61ce2..324f085 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,4 @@ # VS: Tournament Small mod that adds some utilities to Valkyrien Skies 2 -[Documentation](wiki/main.md) \ No newline at end of file +[Documentation](doc) \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/TournamentConfig.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/TournamentConfig.kt index 382ab36..60d281e 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/TournamentConfig.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/TournamentConfig.kt @@ -50,10 +50,10 @@ object TournamentConfig { @JsonSchema(description = "The speed at which the thruster will stop applying force. (-1 means that it always applies force)") var thrusterShutoffSpeed = 80.0 - @JsonSchema(description = "The weight of a ballast when not redstone powered") + @JsonSchema(description = "The weight of a ballast when redstone powered") var ballastWeight = 10000.0 - @JsonSchema(description = "The weight of a ballast when redstone powered") + @JsonSchema(description = "The weight of a ballast when not redstone powered") var ballastNoWeight = 800.0 @JsonSchema(description = "The force the pulse gun applies to a ship") diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/BallastBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/BallastBlock.kt index 1fdf58f..ae07764 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/BallastBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/BallastBlock.kt @@ -9,6 +9,7 @@ import net.minecraft.world.level.block.state.BlockState import net.minecraft.world.level.block.state.StateDefinition import net.minecraft.world.level.block.state.properties.BlockStateProperties.POWER import net.minecraft.world.level.material.Material +import org.valkyrienskies.tournament.TournamentConfig import org.valkyrienskies.tournament.doc.Doc import org.valkyrienskies.tournament.doc.Documented import org.valkyrienskies.tournament.doc.documentation @@ -62,6 +63,11 @@ class BallastBlock : Block( .section("Usage") { content("Power with redstone to increase weight") } + .section("Config") { + content("The on and off weight of the ballast is configurable. " + + "The default off weight is ${TournamentConfig.SERVER.ballastNoWeight}, " + + "and the default on weight is ${TournamentConfig.SERVER.ballastWeight}.") + } } } } diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/BalloonBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/BalloonBlock.kt index 425cd26..7a66c2c 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/BalloonBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/BalloonBlock.kt @@ -22,6 +22,9 @@ import org.valkyrienskies.mod.common.getShipObjectManagingPos import org.valkyrienskies.tournament.TournamentConfig import org.valkyrienskies.tournament.TournamentLootTables import org.valkyrienskies.tournament.TournamentTriggers +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.ship.TournamentShips open class BalloonBlock : Block( @@ -90,6 +93,15 @@ open class BalloonBlock : Block( level.destroyBlock(neighbor, false) } } + } + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Balloon") + .kind(Doc.Kind.BLOCK) + .summary("Increases lift of the ship.") + .summary("There are two variants: powered- and unpowered- balloon. The powered balloon has higher lift but requires a redstone signal.") + .summary("The powered balloon will be 3x stronger when powered than the unpowered balloon.") + } } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ChunkLoaderBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ChunkLoaderBlock.kt index 3884119..ad644b4 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ChunkLoaderBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ChunkLoaderBlock.kt @@ -9,6 +9,9 @@ import net.minecraft.world.level.block.entity.BlockEntityType import net.minecraft.world.level.block.state.BlockState import net.minecraft.world.level.material.Material import org.valkyrienskies.tournament.blockentity.ChunkLoaderBlockEntity +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.util.block.GlassBaseEntityBlock class ChunkLoaderBlock: GlassBaseEntityBlock( @@ -36,4 +39,15 @@ class ChunkLoaderBlock: GlassBaseEntityBlock( super.onRemove(state, level, pos, newState, isMoving) } + + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Chunk Loader") + .kind(Doc.Kind.BLOCK) + .summary("Loads ships when players are not near.") + .section("Notice") { + content("Experimental feature!") + } + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/PropellerBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/PropellerBlock.kt index bc5eaae..31223c6 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/PropellerBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/PropellerBlock.kt @@ -22,6 +22,9 @@ import org.valkyrienskies.mod.common.getShipObjectManagingPos import org.valkyrienskies.mod.common.util.toJOML import org.valkyrienskies.mod.common.util.toJOMLD import org.valkyrienskies.tournament.blockentity.PropellerBlockEntity +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.ship.TournamentShips import org.valkyrienskies.tournament.util.DirectionalShape import org.valkyrienskies.tournament.util.RotShapes @@ -149,4 +152,13 @@ class PropellerBlock( override fun canConnectTo(state: BlockState, direction: Direction): Boolean = direction in Direction.entries - state.getValue(FACING) + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Propeller") + .kind(Doc.Kind.BLOCK) + .summary("Redstone-powered ship propeller.") + .summary("There is a small propeller (designed to look like a torpedo propeller) and a large (3x3) propeller.") + .summary("Popellers take a bit of time to spin up (reach their maximum force), which makes them unsuitable for steering and similar.") + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/RopeHookBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/RopeHookBlock.kt index bdb039a..827f862 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/RopeHookBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/RopeHookBlock.kt @@ -28,6 +28,9 @@ import org.valkyrienskies.tournament.util.block.DirectionalBaseEntityBlock import org.valkyrienskies.tournament.util.debug.DebugLine import org.valkyrienskies.tournament.util.helper.Helper3d import org.valkyrienskies.tournament.blockentity.RopeHookBlockEntity +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.util.DirectionalShape import org.valkyrienskies.tournament.util.RotShapes import java.awt.Color @@ -174,4 +177,14 @@ class RopeHookBlock : DirectionalBaseEntityBlock( return defaultBlockState() .setValue(FACING, ctx.nearestLookingDirection.opposite) } + + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Rope Hook") + .kind(Doc.Kind.BLOCK) + .summary("Allows for one rope connection at a time. " + + "Disconnects when powered with redstone. " + + "Right click two rope hooks with a rope item to connect them. ") + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SeatBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SeatBlock.kt index 4b0132d..24929d8 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SeatBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SeatBlock.kt @@ -22,6 +22,9 @@ import org.joml.Vector3d import org.joml.Vector3dc import org.valkyrienskies.mod.common.ValkyrienSkiesMod import org.valkyrienskies.mod.common.util.toDoubles +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation class SeatBlock : HorizontalDirectionalBlock(Properties.of(Material.WOOL) @@ -72,4 +75,12 @@ class SeatBlock : player.startRiding(seatEntity) return InteractionResult.CONSUME } + + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Seat") + .kind(Doc.Kind.BLOCK) + .summary("A seat that players can use") + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SensorBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SensorBlock.kt index ec2fd73..cf464b3 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SensorBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SensorBlock.kt @@ -19,7 +19,11 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties.FAC import net.minecraft.world.level.material.Material import net.minecraft.world.phys.shapes.CollisionContext import net.minecraft.world.phys.shapes.VoxelShape +import org.valkyrienskies.tournament.TournamentConfig import org.valkyrienskies.tournament.blockentity.SensorBlockEntity +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.util.DirectionalShape import org.valkyrienskies.tournament.util.RotShapes @@ -116,4 +120,13 @@ class SensorBlock: BaseEntityBlock( override fun canConnectTo(state: BlockState, direction: Direction): Boolean = direction == state.getValue(FACING) + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Distance Sensor") + .kind(Doc.Kind.BLOCK) + .summary("Redstone distance sensor that measures the distance to the block in front of it.") + .summary("The sensor has a default range of ${TournamentConfig.SERVER.sensorDistance} blocks. " + + "If the target is closer, it outputs a higher redstone signal.") + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ShipAssemblerBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ShipAssemblerBlock.kt index b1d0f55..3f66c34 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ShipAssemblerBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ShipAssemblerBlock.kt @@ -28,6 +28,9 @@ import org.valkyrienskies.mod.common.getShipManagingPos import org.valkyrienskies.mod.common.isChunkInShipyard import org.valkyrienskies.tournament.TournamentConfig import org.valkyrienskies.tournament.TournamentTriggers +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.util.DirectionalShape import org.valkyrienskies.tournament.util.RotShapes import org.valkyrienskies.tournament.util.ShipAssembler @@ -129,4 +132,15 @@ class ShipAssemblerBlock : DirectionalBlock ( .setValue(FACING, ctx.nearestLookingDirection) } + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Ship Assembler") + .kind(Doc.Kind.BLOCK) + .summary("Assembles ships by finding a structure of connected blocks that are not blacklisted. " + + "Activated via right-click or redstone signal.") + .section("Notice") { + content("There is a limit to how many blocks can be assembled!") + } + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SpinnerBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SpinnerBlock.kt index 17684d0..80fe637 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SpinnerBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/SpinnerBlock.kt @@ -17,6 +17,9 @@ import org.valkyrienskies.mod.common.getShipManagingPos import org.valkyrienskies.mod.common.getShipObjectManagingPos import org.valkyrienskies.mod.common.util.toJOML import org.valkyrienskies.mod.common.util.toJOMLD +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.ship.TournamentShips import org.valkyrienskies.tournament.util.DirectionalShape import org.valkyrienskies.tournament.util.RotShapes @@ -110,4 +113,12 @@ class SpinnerBlock : DirectionalBlock( reader: BlockGetter, pos: BlockPos ): VoxelShape = RotShapes.cube().makeMcShape() + + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Spinner") + .kind(Doc.Kind.BLOCK) + .summary("Applies rotational force around its Y-axis.") + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ThrusterBlock.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ThrusterBlock.kt index c499112..0e455a9 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ThrusterBlock.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/blocks/ThrusterBlock.kt @@ -27,8 +27,12 @@ import org.valkyrienskies.core.api.ships.ServerShip import org.valkyrienskies.mod.common.getShipManagingPos import org.valkyrienskies.mod.common.getShipObjectManagingPos import org.valkyrienskies.mod.common.util.toJOMLD +import org.valkyrienskies.tournament.TournamentConfig import org.valkyrienskies.tournament.TournamentItems import org.valkyrienskies.tournament.TournamentProperties +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.ship.TournamentShips import org.valkyrienskies.tournament.util.DirectionalShape import org.valkyrienskies.tournament.util.RotShapes @@ -210,4 +214,23 @@ class ThrusterBlock( } } + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Thruster") + .kind(Doc.Kind.BLOCK) + .summary("Redstone-powered, upgradable thruster.") + .summary("There are two variants. A small thruster and a \"normal\" thruster.") + .summary("The thruster is only active when redstone powered. " + + "It can be upgraded by right-clicking on it with a thruster upgrade.") + .section("Config") { + content("The maximum thruster tier is ${TournamentConfig.SERVER.thrusterTiersNormal} for the normal thruster, " + + "and ${TournamentConfig.SERVER.thrusterTiersTiny} for the small thruster.") + content("The normal thruster has a force of ${TournamentConfig.SERVER.thrusterSpeed} N, " + + "which gets multiplied by the tier / level of the thruster.") + content("The small thruster is ${TournamentConfig.SERVER.thrusterTinyForceMultiplier}x as powerful as the normal thruster " + + "=> ${TournamentConfig.SERVER.thrusterTinyForceMultiplier * TournamentConfig.SERVER.thrusterSpeed} N") + content("Thrusters shut off at a speed of ${TournamentConfig.SERVER.thrusterShutoffSpeed} m/s") + } + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/cc/CCChunkLoadingAPI.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/cc/CCChunkLoadingAPI.kt index b2d486f..9fe8778 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/cc/CCChunkLoadingAPI.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/cc/CCChunkLoadingAPI.kt @@ -12,6 +12,9 @@ import org.valkyrienskies.mod.common.util.toJOMLD import org.valkyrienskies.tournament.chunk.ChunkLoader import org.valkyrienskies.tournament.chunk.ChunkLoaderManager import org.valkyrienskies.tournament.chunk.ChunkLoadingTicket +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.util.extension.toChunkPos class CCChunkLoadingAPI( @@ -79,4 +82,26 @@ class CCChunkLoadingAPI( override fun getFutureChunk(): ChunkPos = getCurrPos().toChunkPos(frontOff!!) + + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Chunk Loading API") + .kind(Doc.Kind.CC_API) + .summary("A simple API for loading chunks around the computer") + .summary("This API is still experimental and might not be functional") + .section("vst_chunks.start") { + content("`start(priority: number, chunkVec: {x: number, z: number})`") + content("Starts chunk-loading") + content("Will load all chunks in the rectangle of the computer's position and the given `chunkVec` (relative to the computer's position) every tick") + content("The `priority` specifies the priority of the chunk-loading. The higher this integer is, the higher the priority") + } + .section("vst_chunks.stop") { + content("`stop()`") + } + .section("vst_chunks.help") { + content("`help()`") + content("Returns a short summary of the API") + } + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/cc/CCComponentsAPI.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/cc/CCComponentsAPI.kt index 367b026..603f85b 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/cc/CCComponentsAPI.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/cc/CCComponentsAPI.kt @@ -8,6 +8,9 @@ import net.minecraft.server.level.ServerLevel import org.joml.Vector3d import org.valkyrienskies.core.api.ships.ServerShip import org.valkyrienskies.tournament.TournamentConfig +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.ship.TournamentShips import org.valkyrienskies.tournament.util.extension.toDouble @@ -45,4 +48,18 @@ class CCComponentsAPI( ) } } + + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Components API") + .kind(Doc.Kind.CC_API) + .summary("A simple API for getting a list of all the thrusters on the current ship") + .summary("It is recommended to use CC: VS with this API") + .section("vst_components.get_thrusters") { + content("`get_thrusters()`") + content("Returns a list of all the thrusters on the current ship") + content("Every element in that list looks similar to this: {pos:{x,y,z}, force:{x,y,z}}") + } + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/doc/Documented.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/doc/Documented.kt index fd6d43a..19e6779 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/doc/Documented.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/doc/Documented.kt @@ -117,7 +117,7 @@ class DocumentationContext { when (fmt) { Format.MEDIAWIKI -> when (kind) { - Section.ContentKind.TEXT -> sb.append(text) + Section.ContentKind.TEXT -> sb.appendLine(text) Section.ContentKind.CODE -> { sb.append("") sb.append(text) @@ -125,7 +125,7 @@ class DocumentationContext { } } Format.GH_MARKDOWN -> when (kind) { - Section.ContentKind.TEXT -> sb.append(text) + Section.ContentKind.TEXT -> sb.appendLine(text) Section.ContentKind.CODE -> { sb.appendLine("```") sb.appendLine(text) diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/items/PulseGunItem.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/items/PulseGunItem.kt index beb6395..2316ae4 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/items/PulseGunItem.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/items/PulseGunItem.kt @@ -11,6 +11,9 @@ import org.valkyrienskies.mod.common.getShipObjectManagingPos import org.valkyrienskies.mod.common.util.toJOML import org.valkyrienskies.tournament.TournamentConfig import org.valkyrienskies.tournament.TournamentItems +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.ship.TournamentShips class PulseGunItem: Item( @@ -47,4 +50,12 @@ class PulseGunItem: Item( return super.useOn(context) } + + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Pulse Gun") + .kind(Doc.Kind.ITEM) + .summary("Applies a force impulse onto a ship when right-clicked") + } + } } \ No newline at end of file diff --git a/common/src/main/kotlin/org/valkyrienskies/tournament/items/ShipDeleteWandItem.kt b/common/src/main/kotlin/org/valkyrienskies/tournament/items/ShipDeleteWandItem.kt index 32cbf06..4633892 100644 --- a/common/src/main/kotlin/org/valkyrienskies/tournament/items/ShipDeleteWandItem.kt +++ b/common/src/main/kotlin/org/valkyrienskies/tournament/items/ShipDeleteWandItem.kt @@ -10,6 +10,9 @@ import net.minecraft.world.item.Rarity import net.minecraft.world.item.context.UseOnContext import org.valkyrienskies.mod.common.getShipObjectManagingPos import org.valkyrienskies.tournament.TournamentItems +import org.valkyrienskies.tournament.doc.Doc +import org.valkyrienskies.tournament.doc.Documented +import org.valkyrienskies.tournament.doc.documentation import org.valkyrienskies.tournament.util.extension.delete class ShipDeleteWandItem:Item( @@ -40,4 +43,13 @@ class ShipDeleteWandItem:Item( return super.useOn(context) } + + class DocImpl: Documented { + override fun getDoc() = documentation { + page("Ship Deletion Tool") + .kind(Doc.Kind.ITEM) + .summary("Deletes right-clicked ships") + .summary("Creative only") + } + } } \ No newline at end of file diff --git a/doc/blocks/ballast.md b/doc/blocks/ballast.md new file mode 100644 index 0000000..85bbb50 --- /dev/null +++ b/doc/blocks/ballast.md @@ -0,0 +1,7 @@ +# Ballast +A block that has a redstone adjustable weight + +## Usage +Power with redstone to increase weight +## Config +The on and off weight of the ballast is configurable. The default off weight is 800.0, and the default on weight is 10000.0. diff --git a/doc/blocks/balloon.md b/doc/blocks/balloon.md new file mode 100644 index 0000000..6df15d1 --- /dev/null +++ b/doc/blocks/balloon.md @@ -0,0 +1,7 @@ +# Balloon +Increases lift of the ship. + +There are two variants: powered- and unpowered- balloon. The powered balloon has higher lift but requires a redstone signal. + +The powered balloon will be 3x stronger when powered than the unpowered balloon. + diff --git a/doc/blocks/chunk_loader.md b/doc/blocks/chunk_loader.md new file mode 100644 index 0000000..b128629 --- /dev/null +++ b/doc/blocks/chunk_loader.md @@ -0,0 +1,5 @@ +# Chunk Loader +Loads ships when players are not near. + +## Notice +Experimental feature! diff --git a/doc/blocks/distance_sensor.md b/doc/blocks/distance_sensor.md new file mode 100644 index 0000000..60bab61 --- /dev/null +++ b/doc/blocks/distance_sensor.md @@ -0,0 +1,5 @@ +# Distance Sensor +Redstone distance sensor that measures the distance to the block in front of it. + +The sensor has a default range of 10.0 blocks. If the target is closer, it outputs a higher redstone signal. + diff --git a/doc/blocks/propeller.md b/doc/blocks/propeller.md new file mode 100644 index 0000000..55b4fc8 --- /dev/null +++ b/doc/blocks/propeller.md @@ -0,0 +1,7 @@ +# Propeller +Redstone-powered ship propeller. + +There is a small propeller (designed to look like a torpedo propeller) and a large (3x3) propeller. + +Popellers take a bit of time to spin up (reach their maximum force), which makes them unsuitable for steering and similar. + diff --git a/doc/blocks/rope_hook.md b/doc/blocks/rope_hook.md new file mode 100644 index 0000000..d908731 --- /dev/null +++ b/doc/blocks/rope_hook.md @@ -0,0 +1,3 @@ +# Rope Hook +Allows for one rope connection at a time. Disconnects when powered with redstone. Right click two rope hooks with a rope item to connect them. + diff --git a/doc/blocks/seat.md b/doc/blocks/seat.md new file mode 100644 index 0000000..a83ca93 --- /dev/null +++ b/doc/blocks/seat.md @@ -0,0 +1,3 @@ +# Seat +A seat that players can use + diff --git a/doc/blocks/ship_assembler.md b/doc/blocks/ship_assembler.md new file mode 100644 index 0000000..555a444 --- /dev/null +++ b/doc/blocks/ship_assembler.md @@ -0,0 +1,5 @@ +# Ship Assembler +Assembles ships by finding a structure of connected blocks that are not blacklisted. Activated via right-click or redstone signal. + +## Notice +There is a limit to how many blocks can be assembled! diff --git a/doc/blocks/spinner.md b/doc/blocks/spinner.md new file mode 100644 index 0000000..9b8215b --- /dev/null +++ b/doc/blocks/spinner.md @@ -0,0 +1,3 @@ +# Spinner +Applies rotational force around its Y-axis. + diff --git a/doc/blocks/thruster.md b/doc/blocks/thruster.md new file mode 100644 index 0000000..d4af2ee --- /dev/null +++ b/doc/blocks/thruster.md @@ -0,0 +1,15 @@ +# Thruster +Redstone-powered, upgradable thruster. + +There are two variants. A small thruster and a "normal" thruster. + +The thruster is only active when redstone powered. It can be upgraded by right-clicking on it with a thruster upgrade. + +## Config +The maximum thruster tier is 4 for the normal thruster, and 2 for the small thruster. + +The normal thruster has a force of 10000.0 N, which gets multiplied by the tier / level of the thruster. + +The small thruster is 0.2x as powerful as the normal thruster => 2000.0 N + +Thrusters shut off at a speed of 80.0 m/s diff --git a/doc/cc/chunk_loading_api.md b/doc/cc/chunk_loading_api.md new file mode 100644 index 0000000..8dfa64c --- /dev/null +++ b/doc/cc/chunk_loading_api.md @@ -0,0 +1,19 @@ +# Chunk Loading API +A simple API for loading chunks around the computer + +This API is still experimental and might not be functional + +## vst_chunks.start +`start(priority: number, chunkVec: {x: number, z: number})` + +Starts chunk-loading + +Will load all chunks in the rectangle of the computer's position and the given `chunkVec` (relative to the computer's position) every tick + +The `priority` specifies the priority of the chunk-loading. The higher this integer is, the higher the priority +## vst_chunks.stop +`stop()` +## vst_chunks.help +`help()` + +Returns a short summary of the API diff --git a/doc/cc/components_api.md b/doc/cc/components_api.md new file mode 100644 index 0000000..4db69ae --- /dev/null +++ b/doc/cc/components_api.md @@ -0,0 +1,11 @@ +# Components API +A simple API for getting a list of all the thrusters on the current ship + +It is recommended to use CC: VS with this API + +## vst_components.get_thrusters +`get_thrusters()` + +Returns a list of all the thrusters on the current ship + +Every element in that list looks similar to this: {pos:{x,y,z}, force:{x,y,z}} diff --git a/doc/items/pulse_gun.md b/doc/items/pulse_gun.md new file mode 100644 index 0000000..aa5aed2 --- /dev/null +++ b/doc/items/pulse_gun.md @@ -0,0 +1,3 @@ +# Pulse Gun +Applies a force impulse onto a ship when right-clicked + diff --git a/doc/items/ship_deletion_tool.md b/doc/items/ship_deletion_tool.md new file mode 100644 index 0000000..d683693 --- /dev/null +++ b/doc/items/ship_deletion_tool.md @@ -0,0 +1,5 @@ +# Ship Deletion Tool +Deletes right-clicked ships + +Creative only + diff --git a/wiki/cc.md b/wiki/cc.md deleted file mode 100644 index e9cb90a..0000000 --- a/wiki/cc.md +++ /dev/null @@ -1,9 +0,0 @@ -# ComputerCraft integration -Tournament has integration for CC: Restitched and CC: Tweaked. -This is optional which means that you don't need to have any of them installed. - -## APIs -* [vst_chunks](cc/vst_chunks.md) -* [vst_components](cc/vst_components.md) - -## Peripherals \ No newline at end of file diff --git a/wiki/cc/vst_chunks.md b/wiki/cc/vst_chunks.md deleted file mode 100644 index 4bdfdd6..0000000 --- a/wiki/cc/vst_chunks.md +++ /dev/null @@ -1,35 +0,0 @@ -# vst_chunks -A simple API for loading chunks around the computer. - -## Namespaces -* `vst_chunks` - -## Functions -### start -`start(priority: number, chunkVec: {x: number, z: number})` - -Starts chunk-loading. - -Will load all chunks in the rectangle of the computer's position and -the given `chunkVec` (relative to the computer's position) every tick. - -The `priority` specifies the priority of the chunk-loading. -The higher this integer is, the higher the priority. - -### stop -`stop()` - -Stops chunk-loading. - -### help -`help()` - -Returns a short summary of the API. - -## Other information -![info](../tournament_chunk_loading.png) -The green full circle is the current position of the computer. - -The green circle with a hole is the `chunkVec` (relative to the computer's position). - -The blue rectangle is all the chunks that should be loaded. \ No newline at end of file diff --git a/wiki/cc/vst_components.md b/wiki/cc/vst_components.md deleted file mode 100644 index 629f6f8..0000000 --- a/wiki/cc/vst_components.md +++ /dev/null @@ -1,16 +0,0 @@ -# vst_chunks -A simple API for getting a list of all the thrusters on the current ship. - -It is recommended to use CC: VS with this API. - -## Namespaces -* `vst_components` - -## Functions -### get_thrusters -`get_thrusters()` - -Returns a list of all the thrusters on the current ship. -Every element in that list is a table with the following fields: -* `pos` a table with the position of the thruster (x, y, z) relative to the ship's center of mass -* `force` the force of the thruster (x, y, z) relative to the position of the thruster (thrusterSpeed * tier (* thrusterTinyForceMultiplier if tiny)) (* 0 if under water) diff --git a/wiki/main.md b/wiki/main.md deleted file mode 100644 index 96af035..0000000 --- a/wiki/main.md +++ /dev/null @@ -1,3 +0,0 @@ -# VS: Tournament documentation -## Pages -* [CC integration](cc.md) \ No newline at end of file diff --git a/wiki/tournament_chunk_loading.png b/wiki/tournament_chunk_loading.png deleted file mode 100644 index 4960e11..0000000 Binary files a/wiki/tournament_chunk_loading.png and /dev/null differ