LuaAPI: add more <tt> for function name captions
authorWuzzy
Tue, 04 Dec 2018 01:07:12 +0000
changeset 1656 a262e8d3380d
parent 1655 e7d9a849444b
child 1657 899707a349b3
LuaAPI: add more <tt> for function name captions
LuaAPI.wiki
--- a/LuaAPI.wiki	Tue Dec 04 01:03:21 2018 +0000
+++ b/LuaAPI.wiki	Tue Dec 04 01:07:12 2018 +0000
@@ -188,7 +188,7 @@
 
 If you want to add teams or hogs manually, you have to do it here. If you want to draw your own map using `AddPoint` and `FlushPoints`, you have to do this within this function as well.
 
-==== `WorldEdge` ====
+==== <tt>!WorldEdge</tt> ====
 The value of `WorldEdge` can have the following values:
 
 || *Identifier* || *Meaning* ||
@@ -395,13 +395,13 @@
 
 `frameIdx` is used for the rubber orientation. The possible values are explained in `PlaceRubber`. `centerX` and `centerY` are the coordinates of the rubber’s center.
 
-=== `onSpecialPoint(x, y, flags)` ===
+=== <tt>onSpecialPoint(x, y, flags)</tt> ===
 This is used while a special hand-drawn map is loaded. The engine is building these hand-drawn maps by reading points from the map definition. Optionally, some of these points may be “special”. These are not actually drawn on the map, but are used to store additional information for a position on the map. Special points currently need to be added manually in the map, the in-game editor is not able to add those yet (as of 0.9.23).
 Now, when such a special point at the coordinates `x` and `y` with an assigned value of `flags` is added, this function is called. `flags` is a whole number between `0` and `255` inclusive.
 
 This function is used in Racer and !TechRacer to define waypoints.
 
-=== `onAchievementsDeclaration()` ===
+=== </t>onAchievementsDeclaration()</tt> ===
 This function is called after the stats for the stats screen (after the game) have been generated. You are supposed to call `DeclareAchievement` here.
 
 == Functions for creating gears ==
@@ -501,7 +501,7 @@
 === <tt>!GetGearPosition(gearUid)</tt> ===
 Returns x,y coordinates for the specified gear. Not to be confused with `GetGearPos`.
 
-=== `GetGearCollisionMask(gearUid)` ===
+=== <tt>GetGearCollisionMask(gearUid)</tt> ===
 Returns the current collision mask of the given gear. See `SetGearCollisionMask` for an explanation of the mask.
 
 === <tt>!GetGearRadius(gearUid)</tt> ===
@@ -788,7 +788,7 @@
 
 <code language="lua">    gear = AddGear(...)
     FindPlace(gear, true, 0, LAND_WIDTH) -- places the gear randomly between 0 and LAND_WIDTH</code>
-=== `HogSay(gearUid, text, manner [,vgState])` ===
+=== <tt>HogSay(gearUid, text, manner [,vgState])</tt> ===
 Makes the specified gear say, think, or shout some text in a comic-style speech or thought bubble. `gearUid` is _not_ limited to hedgehogs, altough the function name suggests otherwise.
 
 The `manner` parameter specifies the type of the bubble and can have one of these values:
@@ -820,7 +820,7 @@
 === <tt>!SetGearPosition(gearUid, x, y)</tt> ===
 Places the specified gear exactly at the position (`x`,`y`). Not to be confused with `SetGearPos`.
 
-=== `SetGearCollisionMask(gearUid, mask)` ===
+=== <tt>SetGearCollisionMask(gearUid, mask)</tt> ===
 Set the collision mask of the given gear with `gearUid`.
 The collision mask defines with which gears and terrain types the gear can collide.
 
@@ -898,7 +898,7 @@
        end
     end</code>
 
-=== `HealHog(gearUid, healthBoost[, showMessage[, tint]])` (0.9.24) ===
+=== <tt>HealHog(gearUid, healthBoost[, showMessage[, tint]])</tt> (0.9.24) ===
 Convenience function to increase the health of a hedgehog with default visual effects.
 
 Specifically, this increases the health of the hedgehog gear with the given ID `gearUid` by `healthBoost`, displays some healing particles at the hedgehog and shows the health increae as a message. This is similar to the behavour after taking a health crate, or getting a health boost from vampirism.
@@ -989,7 +989,7 @@
 === <tt>!SetHogLevel(gearUid, level)</tt> ===
 Sets the bot level from 0 to 5. `1` is the strongest bot level and `5` is the weakest one (this is the reverse of what players see). `0` means human player.
 
-=== `SetGearAIHints(gearUid, aiHint)` ===
+=== <tt>SetGearAIHints(gearUid, aiHint)</tt> ===
 Set some behaviour hints for computer-controlled hedgehogs for any given gear with `gearUid`.
 
 Set `aiHint` to either of:
@@ -1023,15 +1023,15 @@
 Returns `true` if the specified gameflag is enabled, otherwise `false`.
 
 === Turns ===
-==== `SkipTurn()` (0.9.24) ====
+==== <tt>SkipTurn()</tt> (0.9.24) ====
 Forces the current hedgehog to skip its turn.
 
-==== `EndTurn([noTaunts])` (0.9.23) ====
+==== <tt>EndTurn([noTaunts])</tt> (0.9.23) ====
 Ends the current turn immediately.
 
 Normally, a “Coward” taunt may be played and an announcer message may be shown (depending on the situation). Set the optional `noTaunts` parameter to `true` to force the engine to never play a taunt or show a message. `noTaunts` is `false` by default.
 
-==== `Retreat(time [, respectGetAwayTimeFactor)` (0.9.25) ====
+==== <tt>Retreat(time [, respectGetAwayTimeFactor)</tt> (0.9.25) ====
 Forces the current turn into the retreating phase, as if the hog made an attack. That is, the current hedgehog is unable to attack or select a weapon, only movement is possible until the retreat time is up.
 
 The retreat time must be set with `time` in milliseconds. By default, this time is automatically multiplied with get-away time percentage from the game scheme for seamless integration with schemes. If you want to ignore the game scheme for some reason and set the retreat time no matter what, set `respectGetAwayTimeFactor` to `false`.
@@ -1315,19 +1315,19 @@
 ==== <tt>!GetInputMask()</tt> ====
 Returns the current input mask of the player.
 
-==== `SetVampiric(bool)` (0.9.24) ====
+==== <tt>!SetVampiric(bool)</tt> (0.9.24) ====
 Toggles vampirism mode for this turn. Set `bool` to `true` to enable (same effect as if the hedgehog has used Vampirism), `false` to disable.
 
-==== `GetVampiric()` (0.9.25) ====
+==== <tt>!GetVampiric()</tt> (0.9.25) ====
 Returns true if vampirism mode is currently active.
 
-==== `SetLaserSight(bool)` (0.9.24) ====
+==== <tt>!SetLaserSight(bool)</tt> (0.9.24) ====
 Toggles laser sight for this turn. Set `bool` to `true` to enable (same effect as if the hedgehog has used Laser Sight), `false` to disable.
 
-==== `GetLaserSight()` (0.9.25) ====
+==== <tt>!GetLaserSight()</tt> (0.9.25) ====
 Returns true if laser sight (as utility) is currently active. The sniper rifle's built-in laser sight does not count.
 
-==== `EnableSwitchHog()` (0.9.25) ====
+==== <tt>!EnableSwitchHog()</tt> (0.9.25) ====
 Enable hog switching mode for the current hedgehog. This function should be called while the hedgehog is standing on solid ground (`GetFlightTime` returns 0).
 
 Internally, this tries to spawn a `gtSwitcher` gear which, as long it exists, handles the hog switching. You can delete this gear to stop the hog switching prematurely. If there already is a `gtSwitcher` gear, no additional gear is spawned.
@@ -1393,7 +1393,7 @@
 
 This function must not be called while it's the team's turn.
 
-==== `SetTeamLabel(teamname[, label])` (0.9.24) ====
+==== <tt>!SetTeamLabel(teamname[, label])</tt> (0.9.24) ====
 Set or remove a label for the team with the given team name. The label is a string and will be displayed next to the team's health bar.
 
 If `label` is `nil`, the label will be removed.
@@ -1491,20 +1491,20 @@
 === <tt>!GetZoom()</tt> ===
 Returns the current zoom level.
 
-=== `SetCinematicMode(enable)` (0.9.23) ===
+=== <tt>!SetCinematicMode(enable)</tt> (0.9.23) ===
 Turns on or off cinematic mode. Cinematic mode can be used for cutscenes etc.
 If `enable` is set to `true`, cinematic mode is enabled,
 if it is `false`, cinematic mode is disabled.
 
 == Sound functions ==
-=== `PlaySound(soundId, [gearUid [, instaVoice]])` ===
+=== <tt>!PlaySound(soundId, [gearUid [, instaVoice]])</tt> ===
 Plays the specified sound. Possible values for `soundId` are listed on the [Sounds] page.
 
 To play a voice (see [Taunts] for a list), you must also set `gearUid`. `gearUid` is the hedgehog gear which is used to “talk”.
 
 If you play a voice, by default the voice will respect an internal queue and might be played with an delay in order to prevent annoying voice overlapping. Since version 0.9.24, you can disable this behaviour and force Hedgewars to instantly play the voice by also setting `instaVoice` to `true`. Only use `instaVoice` when you really need it.
 
-=== `PlayMusicSound(soundId)` (0.9.25) ===
+=== <tt>!PlayMusicSound(soundId)</tt> (0.9.25) ===
 Plays a sound as replacement for the background music. The sound is played once. The main music is paused and the sound is played instead. The main background music does not resume automatically, so you should call `StopMusicSound` after a while.
 
 Example:
@@ -1512,10 +1512,10 @@
 PlayMusicSound(sndRideOfTheValkyries) -- Replace the background music the Ride of the Valkyries
 </code>
 
-=== `StopMusicSound(soundId)` (0.9.25) ===
+=== <tt>!StopMusicSound(soundId)</tt> (0.9.25) ===
 Stops the specified “music sound” (if it was still playing) and resumes the main background music.
 
-=== `SetSoundMask(soundId, isMasked)` (0.9.24) ===
+=== <tt>!SetSoundMask(soundId, isMasked)</tt> (0.9.24) ===
 Disables a given sound (including taunts) from being played by the engine. `soundId` is a valid sound ID on [Sounds] or [Taunts]. `isMasked` is a boolean. If `true`, the sound will not be played by the engine anymore. If `false`, playing this sound is allowed again.
 
 Sounds played by the Lua function `PlaySound` will always work, however, and ignore the sound mask.
@@ -1663,19 +1663,19 @@
 
 
 == Debugging Functions ==
-=== `WriteLnToConsole(string)` ===
+=== <tt>WriteLnToConsole(string)</tt> ===
 Writes `string` to `Logs/game0.log`, found in the user data directory.
 
-=== `WriteLnToChat(string)` (0.9.24) ===
+=== <tt>WriteLnToChat(string)</tt> (0.9.24) ===
 Writes `string` into the chat.
 
-=== `DumpPoint(x, y)` (0.9.23) ===
+=== <tt>DumpPoint(x, y)</tt> (0.9.23) ===
 Converts the whole numbers `x` and `y` to strings and writes them to `Logs/game0.log`, one line each.
 
-=== `StartGhostPoints(count)` ===
+=== <tt>StartGhostPoints(count)</tt> ===
 Just prints out “GHOST_POINTS” and the argument on the console. This function might change in later versions.
 
-=== `DeclareAchievement(id, teamname, location, value)` ===
+=== <tt>DeclareAchievement(id, teamname, location, value)</tt> ===
 Declares an achievement with the identifier `id` achieved by the team `teamname` on the map `location` with an achievement value (e.g. score) of `value`. `value` must be an integer. You are supposed to call this function inside an `onAchievementsDeclaration` callback.
 
 Currently, this actually just triggers a console output, but it might be changed later. The idea is to track multiplayer records.