Move docs to luacs-docs/{lua,cs,landing-page}

luacs-docs/cs also has a proper http server for testing locally
This commit is contained in:
peelz
2022-08-03 21:34:42 -04:00
parent 53ea2b8973
commit 1bb7843811
136 changed files with 2208 additions and 2113 deletions

View File

@@ -1,9 +1,10 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: .NET Pre-Release
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
@@ -42,38 +43,34 @@ jobs:
- name: Publish MacClient
run: dotnet publish Barotrauma/BarotraumaClient/MacClient.csproj -c Release -clp:"ErrorsOnly;Summary" --self-contained -r osx-x64 \/p:Platform="x64"
- name: Archive Windows Release
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: 'barotrauma_lua_windows.zip'
#exclusions: '*.git* /*node_modules/* .editorconfig'
directory: 'Barotrauma/bin/ReleaseWindows/netcoreapp3.1/win-x64/publish'
type: zip
filename: barotrauma_lua_windows.zip
directory: Barotrauma/bin/ReleaseWindows/netcoreapp3.1/win-x64/publish
- name: Archive Linux Release
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: 'barotrauma_lua_linux.zip'
#exclusions: '*.git* /*node_modules/* .editorconfig'
directory: 'Barotrauma/bin/ReleaseLinux/netcoreapp3.1/linux-x64/publish'
type: zip
filename: barotrauma_lua_linux.zip
directory: Barotrauma/bin/ReleaseLinux/netcoreapp3.1/linux-x64/publish
- name: Archive Mac Release
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: 'barotrauma_lua_mac.zip'
#exclusions: '*.git* /*node_modules/* .editorconfig'
directory: 'Barotrauma/bin/ReleaseMac/netcoreapp3.1/osx-x64/publish'
type: zip
filename: barotrauma_lua_mac.zip
directory: Barotrauma/bin/ReleaseMac/netcoreapp3.1/osx-x64/publish
- name: Automatic Release
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: false
title: "Automatic Build"
title: Automatic Build
files: |
Barotrauma/bin/ReleaseWindows/netcoreapp3.1/win-x64/publish/barotrauma_lua_windows.zip
Barotrauma/bin/ReleaseLinux/netcoreapp3.1/linux-x64/publish/barotrauma_lua_linux.zip

View File

@@ -1,8 +1,17 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Update documentation
on:
workflow_dispatch:
env:
CI_DEPLOY_DIR: luacs-docs/ci-deploy
CI_ARTIFACTS_DIR: luacs-docs/ci-artifacts
DOCS_LUA_ROOT: luacs-docs/lua
DOCS_CS_ROOT: luacs-docs/cs
DOCS_LANDINGPAGE_ROOT: luacs-docs/landing-page
jobs:
update-docs-lua:
runs-on: ubuntu-latest
@@ -19,22 +28,23 @@ jobs:
- uses: leafo/gh-actions-luarocks@v4
- name: Run install script
working-directory: docs
working-directory: ${{ env.DOCS_LUA_ROOT }}
run: ./scripts/install.sh
- name: Run build script
working-directory: docs
working-directory: ${{ env.DOCS_LUA_ROOT }}
run: ./scripts/build.sh
- name: Create tarball
working-directory: docs/html
run: tar -czf ../../docs-lua.tar.gz .
run: |
mkdir -p "$CI_ARTIFACTS_DIR"
tar -czf "$CI_ARTIFACTS_DIR"/lua.tar.gz -C "$DOCS_LUA_ROOT"/build .
- name: Upload tarball
uses: actions/upload-artifact@v3
with:
name: docs-lua
path: docs-lua.tar.gz
path: ${{ env.CI_ARTIFACTS_DIR }}/lua.tar.gz
update-docs-cs:
runs-on: ubuntu-latest
@@ -42,38 +52,23 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v3
- name: Create directories
run: |
mkdir -p doxygen/build/baro-server
mkdir -p doxygen/build/baro-client
- name: Install doxygen
run: sudo apt-get update && sudo apt-get install -y doxygen
- name: Build server documentation
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: 'doxygen/baro-server'
doxyfile-path: './Doxyfile'
- name: Build client documentation
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: 'doxygen/baro-client'
doxyfile-path: './Doxyfile'
- name: Build containing documentation
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: 'doxygen/'
doxyfile-path: './Doxyfile'
- name: Run build script
working-directory: ${{ env.DOCS_CS_ROOT }}
run: ./scripts/build.sh
- name: Create tarball
working-directory: doxygen/build
run: tar -czf ../../docs-cs.tar.gz .
run: |
mkdir -p "$CI_ARTIFACTS_DIR"
tar -czf "$CI_ARTIFACTS_DIR"/cs.tar.gz -C "$DOCS_CS_ROOT"/build .
- name: Upload tarball
uses: actions/upload-artifact@v3
with:
name: docs-cs
path: docs-cs.tar.gz
path: ${{ env.CI_ARTIFACTS_DIR }}/cs.tar.gz
deploy-docs:
runs-on: ubuntu-latest
@@ -82,33 +77,32 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v3
- run: mkdir -p docs_deploy
- run: mkdir -p "$CI_ARTIFACTS_DIR" "$CI_DEPLOY_DIR"
- name: "Download build artifacts: lua docs"
uses: actions/download-artifact@v3
with:
name: docs-lua
path: docs_deploy
path: ${{ env.CI_ARTIFACTS_DIR }}
- name: "Download build artifacts: cs docs"
uses: actions/download-artifact@v3
with:
name: docs-cs
path: docs_deploy
- name: Copy landing page files
run: cp -r docs-landing-page/. docs_deploy/public
path: ${{ env.CI_ARTIFACTS_DIR }}
- name: Extract lua and cs tarballs
working-directory: docs_deploy
run: |
mkdir -p public/lua-docs public/cs-docs
tar -xzf docs-lua.tar.gz -C public/lua-docs
tar -xzf docs-cs.tar.gz -C public/cs-docs
mkdir -p "$CI_DEPLOY_DIR"/{lua,cs}-docs
tar -xzf "$CI_ARTIFACTS_DIR"/lua.tar.gz -C "$CI_DEPLOY_DIR"/lua-docs
tar -xzf "$CI_ARTIFACTS_DIR"/cs.tar.gz -C "$CI_DEPLOY_DIR"/cs-docs
- name: Copy landing page files
run: cp -r "$DOCS_LANDINGPAGE_ROOT"/. "$CI_DEPLOY_DIR"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs_deploy/public
publish_dir: ${{ env.CI_DEPLOY_DIR }}
keep_files: true

4
.gitignore vendored
View File

@@ -13,10 +13,6 @@ bld/
[Rr]elease*/
*.o
*/Barotrauma*/doc/
doxygen/html/
doxygen/*/html/
doxygen/*/*.tag
doxygen/build
# Misc vs crap
*.v12.suo

4
.gitmodules vendored
View File

@@ -1,6 +1,6 @@
[submodule "Libraries/moonsharp"]
path = Libraries/moonsharp
url = https://github.com/evilfactory/moonsharp.git
[submodule "docs/libs/ldoc"]
path = docs/libs/ldoc
[submodule "luacs-docs/lua/libs/ldoc"]
path = luacs-docs/lua/libs/ldoc
url = https://github.com/impulsh/LDoc.git

View File

@@ -11,13 +11,14 @@ using System.Net;
using System.Linq;
using System.Xml.Linq;
using System.Reflection;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Barotrauma
{
public static class LuaDocs
{
public static string ConvertTypeName(string type)
{
switch (type)
@@ -68,8 +69,68 @@ namespace Barotrauma
return n;
}
public static void GenerateDocsAll()
private static (bool Success, string Output, string Error) TryRunGitCommand(string args)
{
static string GetGitBinary()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process)
?.Split(';')
.Select(x => Path.Join(x, "git.exe"))
.FirstOrDefault(File.Exists);
}
else
{
return Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process)
?.Split(':')
.Select(x => Path.Join(x, "git"))
.FirstOrDefault(File.Exists);
}
}
var gitBinary = GetGitBinary();
if (gitBinary == null)
{
throw new InvalidOperationException("Failed to find git binary in PATH");
}
using var process = Process.Start(new ProcessStartInfo(gitBinary, args)
{
WindowStyle = ProcessWindowStyle.Hidden,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardInput = true,
RedirectStandardError = true,
RedirectStandardOutput = true,
});
process.Start();
var stdOut = process.StandardOutput.ReadToEndAsync();
var stdErr = process.StandardError.ReadToEndAsync();
Task.WhenAll(stdOut, stdErr).GetAwaiter().GetResult();
process.WaitForExit();
return (process.ExitCode == 0, stdOut.Result.TrimEnd('\r', '\n'), stdErr.Result);
}
private static readonly Lazy<string> GitDir = new Lazy<string>(() =>
{
var (success, gitDir, error) = TryRunGitCommand("rev-parse --show-toplevel");
if (!success)
{
throw new InvalidDataException($"Failed to determine the root of the git repo: {error}");
}
return gitDir;
});
public static void GenerateDocs()
{
var basePath = $"{GitDir.Value}/luacs-docs/lua";
Directory.Delete($"{basePath}/lua/generated", true);
GenerateDocs(typeof(Character), "Character.lua");
GenerateDocs(typeof(CharacterInfo), "CharacterInfo.lua");
GenerateDocs(typeof(CharacterHealth), "CharacterHealth.lua");
@@ -99,12 +160,13 @@ namespace Barotrauma
GenerateDocs(typeof(GameSettings), "GameSettings.lua", "Game.Settings");
}
public static void GenerateDocs(Type type, string name, string categoryName = null)
private static void GenerateDocs(Type type, string file, string categoryName = null)
{
GenerateDocs(type, "../../../../docs/baseluadocs/" + name, "../../../../docs/lua/generated/" + name, categoryName);
var basePath = $"{GitDir.Value}/luacs-docs/lua";
GenerateDocs(type, $"{basePath}/baseluadocs/{file}", $"{basePath}/lua/generated/{file}", categoryName);
}
public static void GenerateDocs(Type type, string baselua, string fileresult, string categoryName = null)
private static void GenerateDocs(Type type, string baselua, string fileresult, string categoryName = null)
{
var sb = new StringBuilder();
@@ -241,7 +303,7 @@ local {type.Name} = {EMPTY_TABLE}";
var returnName = ConvertTypeName(property.PropertyType.Name);
if (property.GetGetMethod().IsStatic)
if (property.GetGetMethod()?.IsStatic == true || property.GetSetMethod()?.IsStatic == true)
name = type.Name + "." + property.Name;
if (removed.Contains(name))
@@ -257,6 +319,7 @@ local {type.Name} = {EMPTY_TABLE}";
}
}
new FileInfo(fileresult).Directory.Create();
File.WriteAllText(fileresult, sb.ToString());
}
}

View File

@@ -1,25 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>LuaCs For Barotrauma</title>
<link rel="stylesheet" href="landing.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<a href="lua-docs/index.html"><div id="lua-docs" class="common-docs">
<div id="lua-bg" class="inner-bg">
<div id="lua-inner" class="inner-docs">
<img src="lua_logo.png" />
</div>
</div>
</div></a>
<a href="cs-docs/html/index.html"><div id="cs-docs" class="common-docs">
<div id="cs-bg" class="inner-bg">
<div id="cs-inner" class="inner-docs">
<img src="cs_logo.png" />
</div>
</div>
</div></a>
</body>
</html>

View File

@@ -1,132 +0,0 @@
body{
overflow: hidden;
font-size: 100%;
background-color: #777;
}
.common-docs{
z-index: 1;
text-justify: auto;
position: fixed;
top: 0;
bottom: 0;
transition-property: transform;
transition-duration: 0.5s;
transition-timing-function: ease-in-out;
overflow: hidden;
}
#lua-docs{
left: -10%;
right: 50%;
}
#cs-docs{
right: -10%;
left: 50%;
}
#cs-docs::before,#lua-docs::before{
content: "";
background: url(bg.jpg) repeat;
background-size: 80%;
background-blend-mode: luminosity;
filter: blur(2px);
position: absolute;
height: 200%;
width: 200%;
}
#lua-docs::before{
background-color: rgba(49, 49, 135, 1);
}
#cs-docs::before{
background-color: rgba(105, 44, 120, 1);
}
.common-docs:hover{
z-index: 2;
font-size: 300%;
transform: scale(1.05);
}
.inner-bg{
position: relative;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
transition-duration: 0.5s;
transition-timing-function: ease-in-out;
}
.inner-bg:hover{
background-color: rgba(255, 255, 255, 0.35);
}
.inner-docs{
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
background: radial-gradient(circle, #222, rgba(0, 0, 0, 0));
}
@media (min-width: 80em) {
.inner-docs img{
height: 30%;
width: auto;
}
.common-docs{
transform: skewX(-11deg);
}
#cs-docs::before,#lua-docs::before{
transform: skewX(11deg);
}
.common-docs:hover{
transform: skewX(-11deg) scale(1.05);
}
.inner-docs{
transform: skewX(11deg);
}
.inner-docs img{
height: 30%;
width: auto;
}
}
@media (max-width: 80em) {
.common-docs{
transform: skewX(-9deg);
}
#cs-docs::before,#lua-docs::before{
transform: skewX(9deg);
}
.common-docs:hover{
transform: skewX(-9deg) scale(1.05);
}
.inner-docs{
transform: skewX(9deg);
}
.inner-docs img{
height: 30%;
width: auto;
}
}
@media (max-width: 70em) {
.common-docs{
transform: skewX(0deg);
}
#cs-docs::before,#lua-docs::before{
transform: skewX(0deg);
}
.common-docs:hover{
transform: skewX(0deg) scale(1.05);
}
.inner-docs{
transform: skewX(0deg);
}
.inner-docs img{
height: auto;
width: 50%;
}
}

View File

@@ -1,543 +0,0 @@
:root {
--content-width: 100%;
--sidebar-width: 25%;
--padding-big: 48px;
--padding-normal: 24px;
--padding-small: 16px;
--padding-tiny: 10px;
--font-massive: 32px;
--font-huge: 24px;
--font-big: 18px;
--font-normal: 16px;
--font-tiny: 12px;
--font-style-normal: Segoe UI, Helvetica, Arial, sans-serif;
--font-style-code: Consolas, monospace;
--color-accent: rgb(47, 100, 74);
--color-accent-dark: rgb(33, 33, 33);
--color-white: rgb(255, 255, 255);
--color-offwhite: rgb(200, 200, 200);
--color-white-accent: rgb(203, 190, 209);
--color-black: rgb(0, 0, 0);
--color-lightgrey: rgb(160, 160, 160);
--color-background-light: rgb(245, 245, 245);
--color-background-dark: rgb(33, 33, 33);
--color-background-dark-ish: rgb(44, 44, 44);
--color-outline: rgb(149, 34, 160);
--color-good: #5190ff;
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
background-color: var(--color-background-dark);
font-family: var(--font-style-normal);
display: flex;
flex-direction: column;
}
a {
color: inherit;
text-decoration: inherit;
}
h1, h2, h3, h4 {
font-weight: 400;
}
ul li {
margin-left: var(--padding-small);
}
/* landing */
.landing {
background-color: var(--color-accent);
color: var(--color-white);
padding: 128px 0 128px 0;
}
.landing h1 {
margin: 0;
padding: 0;
border: none;
font-weight: 100;
font-size: var(--font-massive);
text-align: center;
}
.wrapper {
padding: var(--padding-small);
}
details {
user-select: none;
}
details summary {
outline: none;
}
code {
font-family: "Source Code Pro", monospace;
font-size: 85%;
white-space: pre;
tab-size: 4;
-moz-tab-size: 4;
padding: 1px 4px;
background-color: #282a36;
outline-style: solid;
outline-color: black;
outline-width: 2px;
}
pre {
background-color: rgb(0, 0, 0, 1);
margin-top: var(--padding-small);
padding: 2px;
overflow: auto;
}
pre code {
background-color: transparent;
}
span.realm {
width: 14px;
height: 14px;
border-radius: 3px;
display: inline-block;
margin-right: 5px;
}
span.realm.shared {
background: linear-gradient(45deg, #f80 0%, #f80 50%, #08f 51%, #08f 100%);
}
span.realm.client {
background-color: #f80;
}
span.realm.server {
background-color: #08f;
}
.colorful-label {
color: rgb(31, 141, 155);
}
/* wrapper element for sidebar/content */
main {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
width: var(--content-width);
margin: auto;
}
/* sidebar */
nav {
color: var(--color-offwhite);
background-color: var(--color-background-dark);
position: fixed;
display: flex;
flex-direction: column;
width: var(--sidebar-width);
height: 100%;
}
/* sidebar header */
nav header {
color: var(--color-white);
background-color: var(--color-accent);
padding: var(--padding-small);
}
nav header h1 {
font-size: var(--font-huge);
font-weight: 100;
text-align: center;
margin-bottom: var(--padding-small);
}
#search {
background-color: var(--color-accent-dark);
color: var(--color-white);
border: none;
font-size: var(--font-normal);
outline: none;
width: 100%;
padding: 6px;
}
#search::placeholder {
color: var(--color-white-accent);
}
#search::-webkit-search-cancel-button {
display: none;
}
/* sidebar contents */
nav section {
padding: var(--padding-small);
overflow: auto;
}
nav section ul {
list-style-type: none;
}
nav section::-webkit-scrollbar,
pre::-webkit-scrollbar {
width: 8px;
height: 8px;
}
nav section::-webkit-scrollbar-track,
pre::-webkit-scrollbar-track {
background: transparent;
}
nav section::-webkit-scrollbar-thumb {
background-color: var(--color-lightgrey);
}
pre::-webkit-scrollbar-thumb {
background-color: var(--color-lightgrey);
}
/* sidebar contents category */
nav section details.category {
padding-top: var(--padding-tiny);
}
nav section details.category > ul > li {
margin: 0;
line-height: 1.5;
}
nav section details.category > ul > li a {
display: inline-block;
width: 90%;
}
nav section details.category:first-of-type {
padding-top: calc(var(--padding-tiny) * -1);
}
nav section details.category summary::-webkit-details-marker {
opacity: 0.5;
cursor: pointer;
}
nav section details.category summary h2 {
color: var(--color-accent);
font-size: var(--font-big);
letter-spacing: 2px;
text-transform: uppercase;
cursor: pointer;
padding-bottom: var(--padding-tiny);
}
/* content */
article {
background-color: var(--color-background-dark-ish);
color: white;
width: calc(100% - var(--sidebar-width));
min-height: 100vh;
margin-left: var(--sidebar-width);
}
article .wrapper > *:first-child {
margin-top: 0;
}
/* header */
article header {
color: rgb(255, 255, 255);
background-color: var(--color-accent);
padding: var(--padding-tiny);
}
article header h1 {
border-bottom: 1px solid rgba(255, 255, 255, 0.25);
padding-bottom: 8px;
font-family: var(--font-style-code);
margin: 0;
}
article header h2 {
padding-top: var(--padding-tiny);
margin: 0;
font-size: var(--font-normal);
font-weight: normal;
}
article header.module a {
color: white !important;
text-decoration: underline;
}
details.category > summary {
list-style: none;
}
details.category > summary::-webkit-details-marker {
display: none;
}
article h1 {
font-size: 28px;
font-weight: 600;
border-bottom: 1px solid rgba(0, 0, 0, 0.25);
margin-top: 24px;
margin-bottom: 16px;
padding-bottom: 8px;
}
article h2 {
font-size: 20px;
font-weight: 600;
margin-top: 12px;
}
article h3 {
color: var(--color-good);
margin-top: var(--padding-tiny);
text-transform: uppercase;
}
article p {
margin-top: var(--padding-small);
}
article p a,
article ul li a,
article h1 a,
article h2 a {
color: var(--color-good);
font-weight: 600;
}
article h1.title {
color: rgb(255, 255, 255);
background-color: var(--color-accent);
margin-top: var(--padding-small);
margin-bottom: 0;
padding: var(--padding-tiny);
font-size: var(--font-big);
font-weight: 100;
letter-spacing: 2px;
text-transform: uppercase;
}
a.reference {
color: var(--color-good);
float: right;
margin-top: 8px;
padding-left: 8px;
font-size: 14px;
font-weight: 600;
}
.notice {
--color-notice-background: var(--color-accent);
--color-notice-text: var(--color-notice-background);
margin-top: var(--padding-tiny);
border: 2px solid var(--color-notice-background);
}
.notice.error {
--color-notice-background: rgb(194, 52, 130);
}
.notice.warning {
--color-notice-background: rgb(224, 169, 112);
--color-notice-text: rgb(167, 104, 37);
}
.notice .title {
color: var(--color-white);
background-color: var(--color-notice-background);
padding: var(--padding-tiny);
font-size: var(--font-normal);
text-transform: uppercase;
letter-spacing: 2px;
}
.notice p {
color: var(--color-notice-text);
margin: 0 !important;
padding: var(--padding-tiny);
}
/* function/table */
.method {
display: flex;
flex-flow: column;
padding: var(--padding-tiny);
margin-top: var(--padding-small);
}
.method header {
color: white;
background-color: inherit;
padding: 0;
order: -1;
}
.method header .anchor {
color: inherit;
text-decoration: inherit;
}
.method:target {
background-color: var(--color-background-dark);
outline: solid;
outline-width: 1px;
outline-color: var(--color-accent);
}
.method header:target {
background-color: var(--color-accent);
}
.method header h1 {
font-family: "Source Code Pro", monospace;
padding-bottom: var(--padding-tiny);
border-bottom: 1px solid var(--color-accent);
font-size: 20px;
}
.method header p:first-of-type {
margin-top: var(--padding-tiny);
}
.method h3 {
color: var(--color-good);
font-size: var(--font-normal);
letter-spacing: 2px;
text-transform: uppercase;
}
.method pre {
margin-top: var(--padding-tiny);
}
@media only screen and (max-width: 1100px) {
main nav {
position: inherit;
}
main article {
margin-left: 0;
}
}
.method ul {
margin-top: var(--padding-tiny);
background-color: inherit;
}
.method ul li {
list-style: none;
margin: 4px 0 0 var(--padding-normal);
}
.method ul li:first-of-type {
margin-top: 0;
}
.method ul li p {
margin: 4px 0 0 var(--padding-normal);
}
.method ul li pre {
margin: 4px 0 0 var(--padding-normal);
}
.method ul li a {
color: rgb(115, 53, 142);
font-weight: 600;
}
/* we have to manually specify these instead of making a shared class since you cannot customize the parameter class in ldoc */
.parameter, .type, .default {
display: inline-block;
color: rgb(255, 255, 255) !important;
padding: 4px;
font-size: 14px;
font-family: "Source Code Pro", monospace;
}
.parameter {
background-color: rgb(115, 53, 142);
}
.type {
background-color: rgb(31, 141, 155);
}
a.type {
font-weight: 300 !important;
text-decoration: underline;
}
.default {
background-color: rgb(193, 114, 11);
}
.type a {
padding: 0;
}
.or {
color: rgba(115, 53, 142, 0.5);
background-color: inherit;
width: calc(100% - 32px);
height: 8px;
margin: 0 0 8px 32px;
text-align: center;
font-weight: 600;
border-bottom: 1px solid rgba(115, 53, 142, 0.5);
}
.or span {
background-color: inherit;
padding: 0 8px 0 8px;
}
.strikethrough {
text-decoration: line-through;
}

View File

@@ -1,168 +0,0 @@
const skippedCategories = ["manual"];
class Node
{
constructor(name, element, expandable, noAutoCollapse, children = [])
{
this.name = name;
this.element = element;
this.expandable = expandable;
this.noAutoCollapse = noAutoCollapse;
this.children = children;
}
AddChild(name, element, expandable, noAutoCollapse, children)
{
let newNode = new Node(name, element, expandable, noAutoCollapse, children);
this.children.push(newNode);
return newNode;
}
}
class SearchManager
{
constructor(input, contents)
{
this.input = input;
this.input.addEventListener("input", event =>
{
this.OnInputUpdated(this.input.value.toLowerCase().replace(/:/g, "."));
});
// setup search tree
this.tree = new Node("", document.createElement("null"), true, true);
this.entries = {};
const categoryElements = contents.querySelectorAll(".category");
// iterate each kind (hooks/libraries/classes/etc)
for (const category of categoryElements)
{
const nameElement = category.querySelector(":scope > summary > h2");
if (!nameElement)
{
continue;
}
const categoryName = nameElement.textContent.trim().toLowerCase();
if (skippedCategories.includes(categoryName))
{
continue;
}
let categoryNode = this.tree.AddChild(categoryName, category, true, true);
const sectionElements = category.querySelectorAll(":scope > ul > li");
for (const section of sectionElements)
{
const entryElements = section.querySelectorAll(":scope > details > ul > li > a");
const sectionName = section.querySelector(":scope > details > summary > a")
.textContent
.trim()
.toLowerCase();
let sectionNode = categoryNode.AddChild(sectionName, section.querySelector(":scope > details"), true);
for (let i = 0; i < entryElements.length; i++)
{
const entryElement = entryElements[i];
const entryName = entryElement.textContent.trim().toLowerCase();
sectionNode.AddChild(sectionName + "." + entryName, entryElement.parentElement);
}
}
}
}
ResetVisibility(current)
{
current.element.style.display = "";
if (current.noAutoCollapse)
{
current.element.open = true;
}
else if (current.expandable)
{
current.element.open = false;
}
for (let node of current.children)
{
this.ResetVisibility(node);
}
}
Search(input, current)
{
let matched = false;
if (current.name.indexOf(input) != -1)
{
matched = true;
}
for (let node of current.children)
{
let childMatched = this.Search(input, node);
matched = matched || childMatched;
}
if (matched)
{
current.element.style.display = "";
if (current.expandable)
{
current.element.open = true;
}
}
else
{
current.element.style.display = "none";
if (current.expandable)
{
current.element.open = false;
}
}
return matched;
}
OnInputUpdated(input)
{
if (input.length <= 1)
{
this.ResetVisibility(this.tree);
return;
}
this.Search(input, this.tree);
}
}
window.onload = function()
{
const openDetails = document.querySelector(".category > ul > li > details[open]");
if (openDetails)
{
openDetails.scrollIntoView();
}
}
document.addEventListener("DOMContentLoaded", function()
{
const searchInput = document.getElementById("search");
const contents = document.querySelector("body > main > nav > section");
if (searchInput && contents)
{
new SearchManager(searchInput, contents);
}
});

View File

@@ -1,17 +0,0 @@
try {
cd $PSScriptRoot/..
Remove-Item -Force -Recurse ./html | Out-Null
New-Item -ItemType Directory ./html | Out-Null
Copy-Item -Path ./css/. -Destination ./html -Recurse -Force | Out-Null
Copy-Item -Path ./js/. -Destination ./html -Recurse -Force | Out-Null
if ((Get-Command "lua_modules/bin/ldoc" -ErrorAction SilentlyContinue) -eq $null) {
echo "ldoc not found; please run docs/scripts/install.ps1"
exit 1
}
lua_modules/bin/ldoc .
} finally {
popd
}

View File

@@ -1,12 +0,0 @@
try {
cd $PSScriptRoot/..
if ((Get-Command "python3" -ErrorAction SilentlyContinue) -eq $null) {
echo "python3 not found"
exit 1
}
python3 -m http.server -d html
} finally {
popd
}

View File

@@ -1,24 +0,0 @@
<div class="landing">
<h1>Lua For Barotrauma Documentation</h1>
</div>
<div class="wrapper">
<p style="text-align: center;"></p>
<h2>Welcome to the Lua For Barotrauma documentation!</h2>
<p>This is a work in progress documentation, not everything is documented here, but because Barotrauma classes are exposed to Lua, you can check the Barotrauma source code for functions and fields that you can access.</p>
<h2>Installing Lua For Barotrauma</h2>
<p>Downloading and using the Core Content Package from <a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2559634234" target="_blank">Workshop</a> should be enough to have it installed, but if you want to install it manually, you can check out <a href="{* ldoc.url('manual/installing-lua-for-barotrauma-manually') *}">this guide.</a>
</p>
<h2>Getting Started</h2>
<p>If you want to get started with Lua For Barotrauma modding, check out <a href="{* ldoc.url('manual/getting-started') *}">this guide.</a>
</p>
<h2>Links</h2>
<p>
<a href="https://github.com/evilfactory/Barotrauma-lua-attempt" target="_blank">Github</a><br>
<a href="https://discord.gg/f9zvNNuxu9" target="_blank">Discord Server</a>
</p>
</div>

View File

@@ -1,138 +0,0 @@
{%
local baseUrl = ldoc.css:gsub("ldoc.css", "")
local repo = "https://github.com/evilfactory/Barotrauma-lua-attempt/"
local pageTitle = mod and (ldoc.display_name(mod) .. " - " .. ldoc.title) or ldoc.title
local oldmarkup = ldoc.markup
function ldoc.markup(text, item)
return oldmarkup(text, item, ldoc.plain)
end
function ldoc.url(path)
return baseUrl .. path
end
function ldoc.realm_icon(realm)
return "<span class=\"realm " .. (realm or "") .. "\"></span>"
end
function ldoc.sidebar_item(item, module)
local text = ""
local deprecated = item.tags.deprecated
if deprecated then
text = text .. "<span class=\"strikethrough\">"
else
text = text .. "<span>"
end
text = text .. ldoc.realm_icon(item.tags.realm[1])
text = text .. "<a href=\""
.. ldoc.ref_to_module(module) .. "#" .. item.name
.. "\">"
if ldoc.is_kind_classmethod(module.kind) then
text = text .. item.name:gsub(".+:", "")
else
text = text .. item.name:gsub(module.name .. ".", "")
end
text = text
.. "</a>"
.. "</span>"
return text
end
function ldoc.item_header(item)
local text = ""
text = text .. "<a class=\"anchor\">"
local deprecated = item.tags.deprecated
if deprecated then
text = text .. "<h1 class=\"strikethrough\">"
else
text = text .. "<h1>"
end
text = text
.. ldoc.realm_icon(item.tags.realm[1])
.. ldoc.display_name(item)
.. "</h1>"
.. "</a>"
return text
end
function ldoc.is_kind_classmethod(kind)
return kind ~= "libraries"
end
function ldoc.repo_reference(item)
return repo .. "tree/master" .. item.file.filename:gsub(item.file.base, "/gamemode") .. "#L" .. item.lineno
end
local function moduleDescription(mod)
if (mod.type == "topic") then
return mod.body:gsub(mod.display_name, ""):gsub("#", ""):sub(1, 256) .. "..."
end
return mod.summary
end
%}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{pageTitle}}</title>
<meta property="og:type" content="website" />
<meta property="og:title" content="{{pageTitle}}" />
<meta property="og:site_name" content="Lua For Barotrauma Documentation" />
{% if (mod) then %}
<meta property="og:description" content="{{moduleDescription(mod)}}" />
{% else %}
<meta property="og:description" content="A Barotrauma modification that adds Lua modding support." />
{% end %}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro" />
<link rel="stylesheet" href="{* ldoc.css *}" />
<link rel="stylesheet" href="{* ldoc.url('highlight.css') *}" />
</head>
<body>
<main>
{(templates/sidebar.ltp)}
<article>
{% if (ldoc.root) then -- we're rendering the landing page (index.html) %}
{(templates/landing.ltp)}
{% elseif (ldoc.body) then -- we're rendering non-code elements %}
<div class="wrapper">
{* ldoc.body *}
</div>
{% elseif (module) then -- we're rendering libary contents %}
<div class="wrapper">
{(templates/module.ltp)}
</div>
{% end %}
</article>
</main>
<script type="text/javascript" src="{* ldoc.url('app.js') *}"></script>
<script type="text/javascript" src="{* ldoc.url('highlight.min.js') *}"></script>
<script type="text/javascript">
var elements = document.querySelectorAll("pre code")
hljs.configure({
languages: ["lua", ""]
});
for (var i = 0; i < elements.length; i++)
{
hljs.highlightBlock(elements[i]);
}
</script>
</body>
</html>

View File

@@ -1,152 +0,0 @@
<header class="module">
<h1>{{mod.name}}</h1>
<h2>{* ldoc.markup(mod.summary) *}</h2>
</header>
<p>{* ldoc.markup(mod.description) *}</p>
{%
local kinds = {}
local kindsIpairs = {}
for kind, items in mod.kinds() do
local name = kind
if kind == "Tables" then
name = "Fields"
end
for item in items() do
if kinds[name] == nil then
kinds[name] = {}
local value = {}
value.kind = name
value.items = kinds[name]
table.insert(kindsIpairs, value)
end
kinds[name][item] = true
end
end
%}
{% for i, value in ipairs(kindsIpairs) do
local kind = value.kind
local items = value.items
%}
<h1 class="title">{{kind}}</h1>
{% for item, _ in pairs(items) do %}
<section class="method" id="{{item.name}}">
<header>
{* ldoc.item_header(item) *}
{% if item.tags.deprecated then %}
<div class="notice warning">
<div class="title">Deprecated</div>
<p>This API is deprecated and shouldn&#x27;t be used anymore.</p>
</div>
{% end %}
{% if (item.tags.internal) then %}
<div class="notice error">
<div class="title">Internal</div>
<p>This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.</p>
</div>
{% end %}
{% if (ldoc.descript(item):len() == 0) then %}
<div class="notice warning">
<div class="title">Incomplete</div>
<p>Documentation for this section is incomplete and needs expanding.</p>
</div>
{% else %}
<p>{* ldoc.markup(ldoc.descript(item)) *}</p>
{% end %}
</header>
{# function arguments #}
{% if (item.params and #item.params > 0) then %}
{% local subnames = mod.kinds:type_of(item).subnames %}
{% if (subnames) then %}
<h3>{{subnames}}</h3>
{% end %}
{% for argument in ldoc.modules.iter(item.params) do %}
{% local argument, sublist = item:subparam(argument) %}
<ul>
{% for argumentName in ldoc.modules.iter(argument) do %}
{% local displayName = item:display_name_of(argumentName) %}
{% local type = ldoc.typename(item:type_of_param(argumentName)) %}
{% local default = item:default_of_param(argumentName) %}
<li>
<span class="tag parameter">{{displayName}}</span>
{% if (type ~= "") then %}
<span class="tag">{* type *}</span>
{% end %}
{% if (default and default ~= true) then %}
<span class="tag default">default: {{default}}</span>
{% elseif (default) then %}
<span class="tag default">optional</span>
{% end %}
<p>{* ldoc.markup(item.params.map[argumentName]) *}</p>
</li>
{% end %}
</ul>
{% end %}
{% end %}
{# function returns #}
{% if ((not ldoc.no_return_or_parms) and item.retgroups) then %}
{% local groups = item.retgroups %}
<h3>Returns</h3>
<ul>
{% for i, group in ldoc.ipairs(groups) do %}
{% for returnValue in group:iter() do %}
{% local type, ctypes = item:return_type(returnValue) %}
{% type = ldoc.typename(type) %}
<li>
{% if (type ~= "") then %}
{* type *}
{% else -- we'll assume that it will return a variable type if none is set %}
<span class="tag type">any</span>
{% end %}
<p>{* ldoc.markup(returnValue.text) *}</p>
</li>
{% end %}
{% if (i ~= #groups) then %}
<div class="or"><span>OR</span></div>
{% end %}
{% end %}
</ul>
{% end %}
{% if (item.usage) then -- function usage %}
<h3>Example Usage</h3>
{% for usage in ldoc.modules.iter(item.usage) do %}
<pre><code>{* usage *}</code></pre>
{% end %}
{% end %}
{% if (item.see) then %}
<h3>See Also</h3>
<ul>
{% for see in ldoc.modules.iter(item.see) do %}
<li><a href="{* ldoc.href(see) *}">{{see.label}}</a></li>
{% end %}
</ul>
{% end %}
</section>
{% end %}
{% end %}

View File

@@ -1,102 +0,0 @@
{%
local function isKindExpandable(kind)
return kind ~= "Manual"
end
%}
<nav>
<header>
{% if (not ldoc.root) then %}
<h1><a href="{* ldoc.url('') *}">Lua For Barotrauma Documentation</a></h1>
{% end %}
<input id="search" type="search" autocomplete="off" placeholder="Search..." />
</header>
<section>
{% for kind, mods, type in ldoc.kinds() do %}
{% if (ldoc.allowed_in_contents(type, mod)) then %}
<details class="category" open>
<summary>
<h2>{{kind}}</h2>
</summary>
<ul>
{% for currentMod in mods() do %}
{% local name = ldoc.display_name(currentMod) %}
<li>
{% if (isKindExpandable(kind)) then %}
<details {{currentMod.name == (mod or {}).name and "open" or ""}}>
<summary><a href="{* ldoc.ref_to_module(currentMod) *}">{{name}}</a></summary>
<ul>
{% else %}
<a href="{* ldoc.ref_to_module(currentMod) *}">{{name}}</a>
{% end %}
{% if (isKindExpandable(kind)) then
currentMod.items:sort(function(a, b)
return a.name < b.name
end)
end %}
{%
local isThereFunctions = false
for k, v in pairs(currentMod.items) do
if (v.kind == "functions") then
isThereFunctions = true
break
end
end
%}
{% if isThereFunctions then %}
<li>
<label class="colorful-label">FUNCTIONS</label>
</li>
{% end %}
{% for k, v in pairs(currentMod.items) do %}
{% if (v.kind == "functions") then %}
<li>
{* ldoc.sidebar_item(v, currentMod) *}
</li>
{% end %}
{% end %}
{%
local isThereFields = false
for k, v in pairs(currentMod.items) do
if (v.kind == "fields" or v.kind == "tables") then
isThereFields = true
break
end
end
%}
{% if isThereFields then %}
<li>
<label class="colorful-label">FIELDS</label>
</li>
{% end %}
{% for k, v in pairs(currentMod.items) do %}
{% if (v.kind == "fields" or v.kind == "tables") then %}
<li>
{* ldoc.sidebar_item(v, currentMod) *}
</li>
{% end %}
{% end %}
{% if (isKindExpandable(kind)) then %}
</ul>
</details>
{% end %}
</li>
{% end %}
</ul>
</details>
{% end %}
{% end %}
</section>
</nav>

View File

@@ -1,8 +0,0 @@
<doxygenlayout version="1.0">
<navindex>
<tab type="user" url="./index.html" title="Documentation introduction"/>
<tab type="user" url="../baro-server/html/index.html" title="Server class documentation"/>
<tab type="user" url="../baro-client/html/index.html" title="Client class documentation"/>
<tab type="mainpage" visible="yes" title=""/>
</navindex>
</doxygenlayout>

View File

@@ -1,244 +0,0 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.9.4 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="user" url="../../html/index.html" title="Documentation introduction"/>
<tab type="user" url="../../baro-server/html/index.html" title="Server class documentation"/>
<tab type="user" url="./index.html" title="Client class documentation"/>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="concepts" visible="yes" title="">
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<concepts visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a concept page -->
<concept>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<definition visible="yes" title=""/>
<detaileddescription title=""/>
<authorsection visible="yes"/>
</concept>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

View File

@@ -1,244 +0,0 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.9.4 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="user" url="../../html/index.html" title="Documentation introduction"/>
<tab type="user" url="./index.html" title="Server class documentation"/>
<tab type="user" url="../../baro-client/html/index.html" title="Client class documentation"/>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="concepts" visible="yes" title="">
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<concepts visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a concept page -->
<concept>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<definition visible="yes" title=""/>
<detaileddescription title=""/>
<authorsection visible="yes"/>
</concept>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

View File

@@ -1,16 +0,0 @@
@echo off
if not exist ".\build" mkdir ".\build"
if not exist ".\build\baro-server" mkdir ".\build\baro-server"
if not exist ".\build\baro-client" mkdir ".\build\baro-client"
cd .\baro-server
echo Building server documentation
doxygen Doxyfile
cd ..\baro-client
echo Building client documentation
doxygen Doxyfile
cd ..
echo Building shared documentation
doxygen Doxyfile

View File

@@ -1,5 +0,0 @@
@echo off
if not exist ".\build" mkdir ".\build"
echo Building shared documentation
doxygen Doxyfile

4
luacs-docs/cs/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
html
*/html
*/*.tag
build

View File

@@ -0,0 +1,8 @@
<doxygenlayout version="1.0">
<navindex>
<tab type="user" url="./index.html" title="Documentation introduction"/>
<tab type="user" url="../baro-server/html/index.html" title="Server class documentation"/>
<tab type="user" url="../baro-client/html/index.html" title="Client class documentation"/>
<tab type="mainpage" visible="yes" title=""/>
</navindex>
</doxygenlayout>

View File

@@ -906,8 +906,8 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = ../../Barotrauma/BarotraumaShared/SharedSource \
../../Barotrauma/BarotraumaClient/ClientSource
INPUT = ../../../Barotrauma/BarotraumaShared/SharedSource \
../../../Barotrauma/BarotraumaClient/ClientSource
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

View File

@@ -0,0 +1,243 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.9.4 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="user" url="../../html/index.html" title="Documentation introduction"/>
<tab type="user" url="../../baro-server/html/index.html" title="Server class documentation"/>
<tab type="user" url="./index.html" title="Client class documentation"/>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="concepts" visible="yes" title="">
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<concepts visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a concept page -->
<concept>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<definition visible="yes" title=""/>
<detaileddescription title=""/>
<authorsection visible="yes"/>
</concept>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

View File

@@ -906,8 +906,8 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = ../../Barotrauma/BarotraumaShared/SharedSource \
../../Barotrauma/BarotraumaServer/ServerSource
INPUT = ../../../Barotrauma/BarotraumaShared/SharedSource \
../../../Barotrauma/BarotraumaServer/ServerSource
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

View File

@@ -0,0 +1,243 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.9.4 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="user" url="../../html/index.html" title="Documentation introduction"/>
<tab type="user" url="./index.html" title="Server class documentation"/>
<tab type="user" url="../../baro-client/html/index.html" title="Client class documentation"/>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="concepts" visible="yes" title="">
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<concepts visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a concept page -->
<concept>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<definition visible="yes" title=""/>
<detaileddescription title=""/>
<authorsection visible="yes"/>
</concept>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

View File

@@ -19,163 +19,136 @@ div.fragment {
padding-right: 3px;
}
body
{
body {
background-color: #333333;
/** for docs **/
color: #a1a1a1;
}
#page-content
{
#page-content {
background-color: #333333;
color: #bcbcbc;
}
pre, pre.fragment
{
pre, pre.fragment {
background-color: #282828;
}
.icon
{
.icon {
color: #333;
background-color: #2f436b;
/* from orig #728DC1; */;
}
.arrow
{
.arrow {
color: #324872;
/* from orig #9CAFD4; */;
}
/* to make keyword visible for above 'pre' */
.highlight .nf
{
.highlight .nf {
color: #00adee;
}
img
{
img {
background-color: #333333;
}
/** Note/Message boxes **/
div.admonition, div.warning
{
div.admonition, div.warning {
background-color: #474747;
}
div.admonition p.admonition-title, div.warning p.admonition-title
{
div.admonition p.admonition-title, div.warning p.admonition-title {
background-color: #707070;
}
/**** News ***/
#content-outer
{
#content-outer {
background-color: #333333;
}
.postmeta
{
.postmeta {
background-color: #474747;
border-color: #595959;
}
/**** Blog ****/
div.blogpost
{
div.blogpost {
background-color: #333;
}
div.blogpost-header
{
div.blogpost-header {
background-color: #333;
}
div.blogbody
{
div.blogbody {
background-color: #474747;
}
/**** Jobs ****/
.dataTable tbody .even
{
.dataTable tbody .even {
background-color: #474747;
}
.dataTable thead th
{
.dataTable thead th {
background-color: #6b6b6b;
}
/* Job Post Overlay */
#fancybox-outer
{
#fancybox-outer {
color: #bcbcbc;
background-color: #282828;
}
/***** Search box *****/
#MSearchBox
{
#MSearchBox {
background-color: #333333;
}
#MSearchBox .left
{
#MSearchBox .left {
filter: invert(80%);
}
#MSearchSelect
{
#MSearchSelect {
background-color: transparent;
}
.MSearchBoxActive #MSearchField
{
.MSearchBoxActive #MSearchField {
color: #333333;
/* this is inverted */;
/* this is inverted */
}
#MSearchBox .right
{
#MSearchBox .right {
filter: invert(80%);
}
#MSearchCloseImg
{
#MSearchCloseImg {
background-color: transparent;
}
/** Magnifying glass dropdown list **/
#MSearchSelectWindow
{
#MSearchSelectWindow {
background-color: #333333;
border-color: #404040;
}
a.SelectItem, a.SelectItem:focus, a.SelectItem:active
{
a.SelectItem, a.SelectItem:focus, a.SelectItem:active {
color: #999;
}
a.SelectItem:hover
{
a.SelectItem:hover {
color: #bcbcbc;
}
/** Query Results dropdown list **/
#MSearchResultsWindow
{
/* left: !important; / * from orig 992px; * / dynamically generated value */
#MSearchResultsWindow {
/* left: !important; / * from orig 992px; * / dynamically generated value */
border-color: #404040;
}
@@ -187,48 +160,47 @@ a.SelectItem:hover
/* #MSearchCloseImg {
} */
.SRPage .SREntry
{
.SRPage .SREntry {
font-size: 80%;
}
.SRResult:hover
{
.SRResult:hover {
background-color: #404040;
}
.SRSymbol:hover
{
.SRSymbol:hover {
color: #4a69a9;
/* from orig #425E97; */;
}
/***** For Docs *****/
div.header
{
div.header {
background-color: #333333;
border-bottom-color: #001;
background-image: none;
}
div.directory
{
div.directory {
border-top-color: #404040;
border-bottom-color: #404040;
}
td.memItemLeft, td.memItemRight, .mdescLeft, .mdescRight, .memdoc, .memTemplParams, .memTemplItemLeft, .memTemplItemRight
{
td.memItemLeft,
td.memItemRight,
.mdescLeft,
.mdescRight,
.memdoc,
.memTemplParams,
.memTemplItemLeft,
.memTemplItemRight {
background-color: #282828;
}
.memSeparator
{
.memSeparator {
border-bottom-color: #333333;
}
.memtitle
{
.memtitle {
background-color: #333333;
background-image: none;
border-top-color: #404040;
@@ -236,8 +208,7 @@ td.memItemLeft, td.memItemRight, .mdescLeft, .mdescRight, .memdoc, .memTemplPara
border-right-color: #404040;
}
.memproto, dl.reflist dt
{
.memproto, dl.reflist dt {
/* 2nd for ToDo List */
color: #949b8c;
/* #878f7e; */
@@ -249,29 +220,24 @@ td.memItemLeft, td.memItemRight, .mdescLeft, .mdescRight, .memdoc, .memTemplPara
border-right-color: #404040;
}
.memname
{
.memname {
background-color: #333333;
}
a
{
a {
color: #adb8a1;
}
a.el, a.el:visited
{
a.el, a.el:visited {
color: #6f8b4c;
/* #6d7c5d; */;
}
.memdoc
{
.memdoc {
background-image: none;
}
.memdoc, dl.reflist dd
{
.memdoc, dl.reflist dd {
/* 2nd for ToDo List */
background-color: #282828;
border-bottom-color: #404040;
@@ -279,27 +245,23 @@ a.el, a.el:visited
border-right-color: #404040;
}
.paramname
{
.paramname {
color: #8f6262;
}
img.formulaInl
{
img.formulaInl {
filter: invert(84%);
background-color: #fff;
}
/* Template box headers */
.memtemplate
{
.memtemplate {
color: #607fbb;
/* from orignial #4665A2; */;
}
/* Labels - protected, static, virtual */
span.mlabel
{
span.mlabel {
background-color: #282828;
border-color: #333;
color: #aaa;
@@ -307,153 +269,127 @@ span.mlabel
}
/* Header */
h2.groupheader
{
h2.groupheader {
color: #4c6db0;
/* from orig. #354C7B; */
border-bottom-color: #333333;
}
.inherit_header img
{
.inherit_header img {
background-color: #333333;
}
/* To make comments visible */
span.comment
{
span.comment {
color: #7b7b7b;
}
/* Even rows of lists */
.directory tr.even
{
.directory tr.even {
background-color: #303030;
}
/* Tables */
table.fieldtable
{
table.fieldtable {
border-color: #404040;
}
.fieldtable th
{
.fieldtable th {
color: #aaa;
background-color: #333333;
border-bottom-color: #404040;
background-image: none;
}
.fieldtable td.fieldtype, .fieldtable td.fieldname
{
.fieldtable td.fieldtype, .fieldtable td.fieldname {
border-right-color: #404040;
border-bottom-color: #404040;
}
.fieldtable td.fielddoc
{
.fieldtable td.fielddoc {
border-bottom-color: #404040;
}
div.center > img
{
div.center > img {
background-color: #cccccc;
filter: invert(100%);
}
/**** Source Code View ****/
div.fragment
{
div.fragment {
background-color: #282828;
border-color: #333333;
}
.navpath li.navelem a
{
.navpath li.navelem a {
color: #d1d1d1;
text-shadow: none;
}
.navpath li.navelem a:hover
{
.navpath li.navelem a:hover {
color: #f1f1f1;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
}
span.lineno
{
span.lineno {
background-color: #333333;
border-right-color: #333333;
color: #666;
}
span.line
{
span.line {
background-color: #3f3f3f;
}
span.lineno a
{
span.lineno a {
background-color: #333333;
}
span.lineno a:hover
{
span.lineno a:hover {
background-color: #444444;
}
a.code, a.code:visited, a.line, a.line:visited
{
a.code, a.code:visited, a.line, a.line:visited {
color: #4fa2b3;
}
span.keyword
{
span.keyword {
color: #00b300;
}
span.keywordtype
{
span.keywordtype {
color: #ac7339;
}
span.stringliteral
{
span.stringliteral {
color: #0140ff;
}
#powerTip
{
#powerTip {
background-color: #282828;
}
#powerTip div
{
#powerTip div {
background-color: #282828;
}
/**** Navigation ****/
#nav-tree
{
#nav-tree {
background-color: #282828;
background-image: none;
}
#nav-tree img
{
#nav-tree img {
background-color: #282828;
}
#nav-tree .selected a
{
#nav-tree .selected a {
color: #bcbcbc;
}
/** Split bar **/
.ui-resizable-e
{
.ui-resizable-e {
filter: invert(70%);
opacity: 0.2;
}
@@ -462,32 +398,27 @@ span.stringliteral
/*** Type 1 e.g. https://dartsim.github.io/api/ ***/
.tabs, .tabs2, .tabs3
{
.tabs, .tabs2, .tabs3 {
background-image: none;
}
.tablist li
{
.tablist li {
background-image: none;
}
.tablist li.current a
{
.tablist li.current a {
color: #aaa;
background-image: none;
background-color: #444;
}
.tablist a
{
.tablist a {
color: #bcbcbc;
text-shadow: none;
background-image: none;
}
.tablist a:hover
{
.tablist a:hover {
color: #bcbcbc;
background-color: #444444;
background-image: none;
@@ -495,20 +426,17 @@ span.stringliteral
/*** Type 2 e.g. https://clang.llvm.org/doxygen/ ***/
.sm-dox
{
.sm-dox {
background-image: none;
}
.sm-dox a, .sm-dox a.highlighted
{
.sm-dox a, .sm-dox a.highlighted {
color: #bcbcbc;
text-shadow: none;
background-image: none;
}
.sm-dox a:focus, .sm-dox a:active, .sm-dox a:hover
{
.sm-dox a:focus, .sm-dox a:active, .sm-dox a:hover {
color: #bcbcbc;
background-color: #444444;
background-image: none;
@@ -516,82 +444,68 @@ span.stringliteral
/** Pop-Pane **/
.sm-dox ul
{
.sm-dox ul {
background-color: #333333;
border-color: #666;
}
.sm-dox ul a, .sm-dox ul a:focus, .sm-dox ul a:hover, .sm-dox ul a:active
{
.sm-dox ul a, .sm-dox ul a:focus, .sm-dox ul a:hover, .sm-dox ul a:active {
background-color: #333333;
}
.sm-dox span.scroll-up, .sm-dox span.scroll-down
{
.sm-dox span.scroll-up, .sm-dox span.scroll-down {
background-color: #333333;
}
.sm-dox span.scroll-up:hover, .sm-dox span.scroll-down:hover
{
.sm-dox span.scroll-up:hover, .sm-dox span.scroll-down:hover {
background-color: #444444;
}
.sm-dox a span.sub-arrow
{
.sm-dox a span.sub-arrow {
border-top-color: #bcbcbc;
}
.sm-dox a:hover span.sub-arrow
{
.sm-dox a:hover span.sub-arrow {
border-top-color: #cccccc;
}
.sm-dox ul a, .sm-dox ul a:hover, .sm-dox ul a:focus, .sm-dox ul a:active, .sm-dox ul a.highlighted
{
.sm-dox ul a, .sm-dox ul a:hover, .sm-dox ul a:focus, .sm-dox ul a:active, .sm-dox ul a.highlighted {
color: #bcbcbc;
}
.sm-dox > li > ul::before, .sm-dox > li > ul::after
{
.sm-dox > li > ul::before, .sm-dox > li > ul::after {
border-bottom-color: #333333;
}
/* Top menu-item highlighted only, for contrast with arrow */
.sm-dox a.highlighted
{
.sm-dox a.highlighted {
background-color: #444444;
}
.sm-dox ul a.highlighted
{
.sm-dox ul a.highlighted {
background-color: #333333;
}
/**** Bottom Tab ****/
.navpath ul
{
.navpath ul {
background-image: none;
border-color: #666;
}
img.footer
{
img.footer {
background-color: #333333;
opacity: 0.1;
}
/**** Navigation Tab ****/ /* e.g. nlohmann.github.io/json */
div.navtab
{
div.navtab {
background-color: #333333;
}
/**** Classes ****/
/*** Class List, Member List ***/
td.indexkey, td.indexvalue, tr.memlist
{
td.indexkey, td.indexvalue, tr.memlist {
background-color: #333333;
}

View File

@@ -0,0 +1,36 @@
Import-Module $PSScriptRoot/../../scripts/location.ps1
try {
Change-Location $PSScriptRoot/..
if ((Get-Command "doxgen" -ErrorAction SilentlyContinue) -eq $null) {
echo "doxygen not found"
exit 1
}
Remove-Item -Force -Recurse ./build | Out-Null
New-Item -ItemType Directory ./build | Out-Null
New-Item -ItemType Directory ./build/baro-server | Out-Null
New-Item -ItemType Directory ./build/baro-client | Out-Null
echo "Building server docs"
try {
Change-Location ./baro-server
doxygen ./Doxyfile
} finally {
Restore-Location
}
echo "Building client docs"
try {
Change-Location ./baro-client
doxygen ./Doxyfile
} finally {
Restore-Location
}
echo "Building shared docs"
doxygen ./Doxyfile
} finally {
Restore-Location
}

29
luacs-docs/cs/scripts/build.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "$DIR/.."
if ! command -v "doxygen" &> /dev/null; then
echo "doxygen not found"
exit 1
fi
rm -rf ./build
mkdir -p ./build
mkdir -p ./build/baro-server
mkdir -p ./build/baro-client
echo "Building server docs"
(
cd ./baro-server
doxygen ./Doxyfile
)
echo "Building client docs"
(
cd ./baro-client
doxygen ./Doxyfile
)
echo "Building shared docs"
doxygen ./Doxyfile

View File

@@ -0,0 +1,18 @@
Import-Module $PSScriptRoot/../../scripts/location.ps1
try {
Change-Location $PSScriptRoot/..
if ((Get-Command "python3" -ErrorAction SilentlyContinue) -eq $null) {
echo "python3 not found"
exit 1
}
python3 ../scripts/http_server.py ./build `
--port 8001 `
--route /:html `
--route /baro-client:baro-client `
--route /baro-server:baro-server
} finally {
Restore-Location
}

15
luacs-docs/cs/scripts/serve.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "$DIR/.."
if ! command -v "python3" &> /dev/null; then
echo "python3 not found"
exit 1
fi
python3 ../scripts/http_server.py ./build \
--port 8001 \
--route /:html \
--route /baro-client:baro-client \
--route /baro-server:baro-server

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>LuaCs For Barotrauma</title>
<link rel="stylesheet" href="landing.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<a href="lua-docs/index.html"><div id="lua-docs" class="common-docs">
<div id="lua-bg" class="inner-bg">
<div id="lua-inner" class="inner-docs">
<img src="lua_logo.png" />
</div>
</div>
</div></a>
<a href="cs-docs/html/index.html"><div id="cs-docs" class="common-docs">
<div id="cs-bg" class="inner-bg">
<div id="cs-inner" class="inner-docs">
<img src="cs_logo.png" />
</div>
</div>
</div></a>
</body>
</html>

View File

@@ -0,0 +1,131 @@
body {
overflow: hidden;
font-size: 100%;
background-color: #777;
}
.common-docs {
z-index: 1;
text-justify: auto;
position: fixed;
top: 0;
bottom: 0;
transition-property: transform;
transition-duration: 0.5s;
transition-timing-function: ease-in-out;
overflow: hidden;
}
#lua-docs {
left: -10%;
right: 50%;
}
#cs-docs {
right: -10%;
left: 50%;
}
#cs-docs::before, #lua-docs::before {
content: "";
background: url(bg.jpg) repeat;
background-size: 80%;
background-blend-mode: luminosity;
filter: blur(2px);
position: absolute;
height: 200%;
width: 200%;
}
#lua-docs::before {
background-color: rgba(49, 49, 135, 1);
}
#cs-docs::before {
background-color: rgba(105, 44, 120, 1);
}
.common-docs:hover {
z-index: 2;
font-size: 300%;
transform: scale(1.05);
}
.inner-bg {
position: relative;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
transition-duration: 0.5s;
transition-timing-function: ease-in-out;
}
.inner-bg:hover {
background-color: rgba(255, 255, 255, 0.35);
}
.inner-docs {
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
background: radial-gradient(circle, #222, rgba(0, 0, 0, 0));
}
@media (min-width: 80em) {
.inner-docs img {
height: 30%;
width: auto;
}
.common-docs {
transform: skewX(-11deg);
}
#cs-docs::before, #lua-docs::before {
transform: skewX(11deg);
}
.common-docs:hover {
transform: skewX(-11deg) scale(1.05);
}
.inner-docs {
transform: skewX(11deg);
}
.inner-docs img {
height: 30%;
width: auto;
}
}
@media (max-width: 80em) {
.common-docs {
transform: skewX(-9deg);
}
#cs-docs::before, #lua-docs::before {
transform: skewX(9deg);
}
.common-docs:hover {
transform: skewX(-9deg) scale(1.05);
}
.inner-docs {
transform: skewX(9deg);
}
.inner-docs img {
height: 30%;
width: auto;
}
}
@media (max-width: 70em) {
.common-docs {
transform: skewX(0deg);
}
#cs-docs::before, #lua-docs::before {
transform: skewX(0deg);
}
.common-docs:hover {
transform: skewX(0deg) scale(1.05);
}
.inner-docs {
transform: skewX(0deg);
}
.inner-docs img {
height: auto;
width: 50%;
}
}

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,2 +1,2 @@
html
build
lua_modules

View File

@@ -6,7 +6,7 @@ file = {
module_file = {}
dir = "html"
dir = "build"
project = "LuaForBarotrauma"
title = "LuaForBarotrauma Documentation"

View File

@@ -10,7 +10,7 @@
* @author Zeno Rocha <hi@zenorocha.com>
*/
.hljs {
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;

543
luacs-docs/lua/css/ldoc.css Normal file
View File

@@ -0,0 +1,543 @@
:root {
--content-width: 100%;
--sidebar-width: 25%;
--padding-big: 48px;
--padding-normal: 24px;
--padding-small: 16px;
--padding-tiny: 10px;
--font-massive: 32px;
--font-huge: 24px;
--font-big: 18px;
--font-normal: 16px;
--font-tiny: 12px;
--font-style-normal: Segoe UI, Helvetica, Arial, sans-serif;
--font-style-code: Consolas, monospace;
--color-accent: rgb(47, 100, 74);
--color-accent-dark: rgb(33, 33, 33);
--color-white: rgb(255, 255, 255);
--color-offwhite: rgb(200, 200, 200);
--color-white-accent: rgb(203, 190, 209);
--color-black: rgb(0, 0, 0);
--color-lightgrey: rgb(160, 160, 160);
--color-background-light: rgb(245, 245, 245);
--color-background-dark: rgb(33, 33, 33);
--color-background-dark-ish: rgb(44, 44, 44);
--color-outline: rgb(149, 34, 160);
--color-good: #5190ff;
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
background-color: var(--color-background-dark);
font-family: var(--font-style-normal);
display: flex;
flex-direction: column;
}
a {
color: inherit;
text-decoration: inherit;
}
h1, h2, h3, h4 {
font-weight: 400;
}
ul li {
margin-left: var(--padding-small);
}
/* landing */
.landing {
background-color: var(--color-accent);
color: var(--color-white);
padding: 128px 0 128px 0;
}
.landing h1 {
margin: 0;
padding: 0;
border: none;
font-weight: 100;
font-size: var(--font-massive);
text-align: center;
}
.wrapper {
padding: var(--padding-small);
}
details {
user-select: none;
}
details summary {
outline: none;
}
code {
font-family: "Source Code Pro", monospace;
font-size: 85%;
white-space: pre;
tab-size: 4;
-moz-tab-size: 4;
padding: 1px 4px;
background-color: #282a36;
outline-style: solid;
outline-color: black;
outline-width: 2px;
}
pre {
background-color: rgb(0, 0, 0, 1);
margin-top: var(--padding-small);
padding: 2px;
overflow: auto;
}
pre code {
background-color: transparent;
}
span.realm {
width: 14px;
height: 14px;
border-radius: 3px;
display: inline-block;
margin-right: 5px;
}
span.realm.shared {
background: linear-gradient(45deg, #f80 0%, #f80 50%, #08f 51%, #08f 100%);
}
span.realm.client {
background-color: #f80;
}
span.realm.server {
background-color: #08f;
}
.colorful-label {
color: rgb(31, 141, 155);
}
/* wrapper element for sidebar/content */
main {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
width: var(--content-width);
margin: auto;
}
/* sidebar */
nav {
color: var(--color-offwhite);
background-color: var(--color-background-dark);
position: fixed;
display: flex;
flex-direction: column;
width: var(--sidebar-width);
height: 100%;
}
/* sidebar header */
nav header {
color: var(--color-white);
background-color: var(--color-accent);
padding: var(--padding-small);
}
nav header h1 {
font-size: var(--font-huge);
font-weight: 100;
text-align: center;
margin-bottom: var(--padding-small);
}
#search {
background-color: var(--color-accent-dark);
color: var(--color-white);
border: none;
font-size: var(--font-normal);
outline: none;
width: 100%;
padding: 6px;
}
#search::placeholder {
color: var(--color-white-accent);
}
#search::-webkit-search-cancel-button {
display: none;
}
/* sidebar contents */
nav section {
padding: var(--padding-small);
overflow: auto;
}
nav section ul {
list-style-type: none;
}
nav section::-webkit-scrollbar,
pre::-webkit-scrollbar {
width: 8px;
height: 8px;
}
nav section::-webkit-scrollbar-track,
pre::-webkit-scrollbar-track {
background: transparent;
}
nav section::-webkit-scrollbar-thumb {
background-color: var(--color-lightgrey);
}
pre::-webkit-scrollbar-thumb {
background-color: var(--color-lightgrey);
}
/* sidebar contents category */
nav section details.category {
padding-top: var(--padding-tiny);
}
nav section details.category > ul > li {
margin: 0;
line-height: 1.5;
}
nav section details.category > ul > li a {
display: inline-block;
width: 90%;
}
nav section details.category:first-of-type {
padding-top: calc(var(--padding-tiny) * -1);
}
nav section details.category summary::-webkit-details-marker {
opacity: 0.5;
cursor: pointer;
}
nav section details.category summary h2 {
color: var(--color-accent);
font-size: var(--font-big);
letter-spacing: 2px;
text-transform: uppercase;
cursor: pointer;
padding-bottom: var(--padding-tiny);
}
/* content */
article {
background-color: var(--color-background-dark-ish);
color: white;
width: calc(100% - var(--sidebar-width));
min-height: 100vh;
margin-left: var(--sidebar-width);
}
article .wrapper > *:first-child {
margin-top: 0;
}
/* header */
article header {
color: rgb(255, 255, 255);
background-color: var(--color-accent);
padding: var(--padding-tiny);
}
article header h1 {
border-bottom: 1px solid rgba(255, 255, 255, 0.25);
padding-bottom: 8px;
font-family: var(--font-style-code);
margin: 0;
}
article header h2 {
padding-top: var(--padding-tiny);
margin: 0;
font-size: var(--font-normal);
font-weight: normal;
}
article header.module a {
color: white !important;
text-decoration: underline;
}
details.category > summary {
list-style: none;
}
details.category > summary::-webkit-details-marker {
display: none;
}
article h1 {
font-size: 28px;
font-weight: 600;
border-bottom: 1px solid rgba(0, 0, 0, 0.25);
margin-top: 24px;
margin-bottom: 16px;
padding-bottom: 8px;
}
article h2 {
font-size: 20px;
font-weight: 600;
margin-top: 12px;
}
article h3 {
color: var(--color-good);
margin-top: var(--padding-tiny);
text-transform: uppercase;
}
article p {
margin-top: var(--padding-small);
}
article p a,
article ul li a,
article h1 a,
article h2 a {
color: var(--color-good);
font-weight: 600;
}
article h1.title {
color: rgb(255, 255, 255);
background-color: var(--color-accent);
margin-top: var(--padding-small);
margin-bottom: 0;
padding: var(--padding-tiny);
font-size: var(--font-big);
font-weight: 100;
letter-spacing: 2px;
text-transform: uppercase;
}
a.reference {
color: var(--color-good);
float: right;
margin-top: 8px;
padding-left: 8px;
font-size: 14px;
font-weight: 600;
}
.notice {
--color-notice-background: var(--color-accent);
--color-notice-text: var(--color-notice-background);
margin-top: var(--padding-tiny);
border: 2px solid var(--color-notice-background);
}
.notice.error {
--color-notice-background: rgb(194, 52, 130);
}
.notice.warning {
--color-notice-background: rgb(224, 169, 112);
--color-notice-text: rgb(167, 104, 37);
}
.notice .title {
color: var(--color-white);
background-color: var(--color-notice-background);
padding: var(--padding-tiny);
font-size: var(--font-normal);
text-transform: uppercase;
letter-spacing: 2px;
}
.notice p {
color: var(--color-notice-text);
margin: 0 !important;
padding: var(--padding-tiny);
}
/* function/table */
.method {
display: flex;
flex-flow: column;
padding: var(--padding-tiny);
margin-top: var(--padding-small);
}
.method header {
color: white;
background-color: inherit;
padding: 0;
order: -1;
}
.method header .anchor {
color: inherit;
text-decoration: inherit;
}
.method:target {
background-color: var(--color-background-dark);
outline: solid;
outline-width: 1px;
outline-color: var(--color-accent);
}
.method header:target {
background-color: var(--color-accent);
}
.method header h1 {
font-family: "Source Code Pro", monospace;
padding-bottom: var(--padding-tiny);
border-bottom: 1px solid var(--color-accent);
font-size: 20px;
}
.method header p:first-of-type {
margin-top: var(--padding-tiny);
}
.method h3 {
color: var(--color-good);
font-size: var(--font-normal);
letter-spacing: 2px;
text-transform: uppercase;
}
.method pre {
margin-top: var(--padding-tiny);
}
@media only screen and (max-width: 1100px) {
main nav {
position: inherit;
}
main article {
margin-left: 0;
}
}
.method ul {
margin-top: var(--padding-tiny);
background-color: inherit;
}
.method ul li {
list-style: none;
margin: 4px 0 0 var(--padding-normal);
}
.method ul li:first-of-type {
margin-top: 0;
}
.method ul li p {
margin: 4px 0 0 var(--padding-normal);
}
.method ul li pre {
margin: 4px 0 0 var(--padding-normal);
}
.method ul li a {
color: rgb(115, 53, 142);
font-weight: 600;
}
/* we have to manually specify these instead of making a shared class since you cannot customize the parameter class in ldoc */
.parameter, .type, .default {
display: inline-block;
color: rgb(255, 255, 255) !important;
padding: 4px;
font-size: 14px;
font-family: "Source Code Pro", monospace;
}
.parameter {
background-color: rgb(115, 53, 142);
}
.type {
background-color: rgb(31, 141, 155);
}
a.type {
font-weight: 300 !important;
text-decoration: underline;
}
.default {
background-color: rgb(193, 114, 11);
}
.type a {
padding: 0;
}
.or {
color: rgba(115, 53, 142, 0.5);
background-color: inherit;
width: calc(100% - 32px);
height: 8px;
margin: 0 0 8px 32px;
text-align: center;
font-weight: 600;
border-bottom: 1px solid rgba(115, 53, 142, 0.5);
}
.or span {
background-color: inherit;
padding: 0 8px 0 8px;
}
.strikethrough {
text-decoration: line-through;
}

138
luacs-docs/lua/js/app.js Normal file
View File

@@ -0,0 +1,138 @@
const skippedCategories = ["manual"];
class Node {
constructor(name, element, expandable, noAutoCollapse, children = []) {
this.name = name;
this.element = element;
this.expandable = expandable;
this.noAutoCollapse = noAutoCollapse;
this.children = children;
}
AddChild(name, element, expandable, noAutoCollapse, children) {
let newNode = new Node(name, element, expandable, noAutoCollapse, children);
this.children.push(newNode);
return newNode;
}
}
class SearchManager {
constructor(input, contents) {
this.input = input;
this.input.addEventListener("input", event => {
this.OnInputUpdated(this.input.value.toLowerCase().replace(/:/g, "."));
});
// setup search tree
this.tree = new Node("", document.createElement("null"), true, true);
this.entries = {};
const categoryElements = contents.querySelectorAll(".category");
// iterate each kind (hooks/libraries/classes/etc)
for (const category of categoryElements) {
const nameElement = category.querySelector(":scope > summary > h2");
if (!nameElement) {
continue;
}
const categoryName = nameElement.textContent.trim().toLowerCase();
if (skippedCategories.includes(categoryName)) {
continue;
}
let categoryNode = this.tree.AddChild(categoryName, category, true, true);
const sectionElements = category.querySelectorAll(":scope > ul > li");
for (const section of sectionElements) {
const entryElements = section.querySelectorAll(":scope > details > ul > li > a");
const sectionName = section.querySelector(":scope > details > summary > a")
.textContent
.trim()
.toLowerCase();
let sectionNode = categoryNode.AddChild(sectionName, section.querySelector(":scope > details"), true);
for (let i = 0; i < entryElements.length; i++) {
const entryElement = entryElements[i];
const entryName = entryElement.textContent.trim().toLowerCase();
sectionNode.AddChild(sectionName + "." + entryName, entryElement.parentElement);
}
}
}
}
ResetVisibility(current) {
current.element.style.display = "";
if (current.noAutoCollapse) {
current.element.open = true;
}
else if (current.expandable) {
current.element.open = false;
}
for (let node of current.children) {
this.ResetVisibility(node);
}
}
Search(input, current) {
let matched = false;
if (current.name.indexOf(input) != -1) {
matched = true;
}
for (let node of current.children) {
let childMatched = this.Search(input, node);
matched = matched || childMatched;
}
if (matched) {
current.element.style.display = "";
if (current.expandable) {
current.element.open = true;
}
} else {
current.element.style.display = "none";
if (current.expandable) {
current.element.open = false;
}
}
return matched;
}
OnInputUpdated(input) {
if (input.length <= 1) {
this.ResetVisibility(this.tree);
return;
}
this.Search(input, this.tree);
}
}
window.onload = function() {
const openDetails = document.querySelector(".category > ul > li > details[open]");
if (openDetails) {
openDetails.scrollIntoView();
}
}
document.addEventListener("DOMContentLoaded", function() {
const searchInput = document.getElementById("search");
const contents = document.querySelector("body > main > nav > section");
if (searchInput && contents) {
new SearchManager(searchInput, contents);
}
});

Some files were not shown because too many files have changed in this diff Show More