Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve template (axes footer) #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions HOWTO.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ local emin, emax = vm:read_from_map(p1, p2) -- Emerged minimum and maximum posit
The use of Admonitions (`NOTE`, `TIP`, `IMPORTANT`, `CAUTION`, and `WARNING`) are useful for bringing the reader's attention to a specific idea or statement.
The use of these should generally follow these situation guidelines:


NOTE: This information is noteworthy. You will find it insightful to understand something.

TIP: This information is helpful. You will have an easier time doing something if you follow this.
Expand Down Expand Up @@ -158,5 +157,3 @@ All types should link somewhere at some point (cross-reference or outside).
* `another_property:` `type`
** A description.
----

include::include/footer.adoc[]
2 changes: 0 additions & 2 deletions doc/classes/ItemStack.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -459,5 +459,3 @@ local taken = stack:peek_item(item)
|===
| `taken` | `ItemStack` | The item(s) copied from the stack.
|===

include::../../include/footer.adoc[]
4 changes: 0 additions & 4 deletions include/footer.adoc

This file was deleted.

108 changes: 25 additions & 83 deletions templates/standard.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,19 @@ This is the standard template of how a good AsciiDoc should be structured.
This paragraph describes the purpose of the document.
In this example, an imaginary API for a vehicle will be documented.

== Vehicle Properties

* `Vehicle.make`: `{type-string}`
* `Vehicle.model`: `{type-string}`
* `Vehicle.year`: `{type-number}`
* `Vehicle.trim`: `{type-string}`
* `Vehicle.color`: `ColorSpec`
== Properties
[%autowidth, frame=none]
|===
| `make` | `{type-string}` | ...
| `model` | `{type-string}` | ...
| `year` | `{type-number}` | ...
| `trim` | `{type-string}` | ...
| `color` | `ColorSpec` | ...
|===

== Vehicle Methods
=== Vehicle.new
=== `Vehicle.new(pos, properties)`
Spawns a new instance of a `Vehicle` at a given position and returns the new object.

==== Usage
----
vehicle = Vehicle.new(pos, properties)
----

==== Arguments
[%autowidth, frame=none]
|===
Expand All @@ -42,7 +38,7 @@ vehicle = Vehicle.new(pos, properties)
====
[source,lua]
----
local minivan = vehicle.new(vector.new(35, 2, 36), {
local minivan = Vehicle.new(vector.new(35, 2, 36), {
make = "Toyota",
model = "Previa",
year = 1992,
Expand All @@ -52,79 +48,45 @@ local minivan = vehicle.new(vector.new(35, 2, 36), {
----
====

=== Vehicle:set_properties
Sets the properties of the vehicle.
== Methods

==== Usage
----
vehicle:set_properties(properties)
----
=== `:set_properties(properties)`
Sets the properties of the vehicle.

==== Arguments
[%autowidth, frame=none]
|===
| `properties` | `{type-table}` | A list of <<Vehicle Properties, Vehicle properties>>.
|===

==== Returns
_None_

=== Vehicle:set_properties
=== `:get_properties()`
Gets the properties of the vehicle.

==== Usage
----
vehicle:get_properties()
----

==== Arguments
_None_

==== Returns
[%autowidth, frame=none]
|===
| `properties` | `{type-table}` | A list of <<Vehicle Properties, Vehicle properties>>.
|===

=== Vehicle:set_pos
=== `:set_pos(pos)`
Instantly moves the vehicle to the given position.

==== Usage
----
vehicle:set_pos(pos)
----

==== Arguments
[%autowidth, frame=none]
|===
| `pos` | `{class-vector}` | The position to move the vehicle to.
|===

==== Returns
_None_

=== Vehicle:get_pos
=== `:get_pos()`
Gets the current position of the vehicle.

==== Usage
----
vehicle:get_pos()
----

==== Arguments
_None_

==== Returns
[%autowidth, frame=none]
|===
| `pos` | `{class-vector}` | The current position of the vehicle.
|===

=== Vehicle:set_gear
==== Usage
----
success = vehicle:set_gear(gear)
----
=== `:set_gear(gear)`

==== Arguments
[%autowidth, frame=none]
Expand All @@ -142,24 +104,16 @@ success = vehicle:set_gear(gear)
| `success` | `{type-bool}` | Whether placement was successful.
|===

=== Vehicle:get_gear
=== `:get_gear()`
Returns the current gear of the vehicle as a number. See <<Vehicle:set_gear>> for expected values.

==== Usage
----
gear = vehicle:get_gear()
----

==== Arguments
_None_

==== Returns
[%autowidth, frame=none]
|===
| `gear` | `{type-number}` | Gear the vehicle is currently in.
|===

=== Vehicle:some_function
=== `:some_method(...)`
Does a thing.

NOTE: This is a note.
Expand All @@ -169,19 +123,19 @@ NOTE: This is a note.
1::
+
----
stuff = Vehicle:some_function(foo)
stuff = vehicle:some_method(foo)
----
2::
+
----
different, things = Vehicle:some_function(foo, bar)
different, things = vehicle:some_method(foo, bar)
----

==== Arguments
[%autowidth, frame=none]
|===
| `foo` | `{class-vector}` | Something.
| `bar`? | `{class-vector}` | Something else.
| `bar` | `{class-vector}` | Optional. Something else.
|===

==== Returns
Expand All @@ -203,14 +157,9 @@ different, things = Vehicle:some_function(foo, bar)

== Vehicle Helpers

=== gear_to_name
=== `gear_to_name(gear)`
Returns the name of the given gear.

==== Usage
----
name = gear_to_name(gear)
----

==== Arguments
[%autowidth, frame=none]
|===
Expand All @@ -231,14 +180,9 @@ a! `3` a! `third`
!===
|===

=== vehicle_type
=== `vehicle_type(make, model)`
Determines the vehicle type based on the make and model.

==== Usage
----
vtype = vehicle_type(make, model)
----

==== Arguments
[%autowidth, frame=none]
|===
Expand Down Expand Up @@ -270,5 +214,3 @@ end
----

====

include::../include/footer.adoc[]