Skip to content

Commit eb62961

Browse files
add entities article
1 parent 70c2aa6 commit eb62961

File tree

6 files changed

+40
-0
lines changed

6 files changed

+40
-0
lines changed
File renamed without changes.

web/astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export default defineConfig({
8080
items: [
8181
{label: 'Element types', link: 'Element'},
8282
{label: 'Element tree', link: 'Element_tree'},
83+
{label: 'Entities', link: 'Entity'},
8384
]
8485
},
8586
{

web/public/_redirects

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/wiki/ /
22
/wiki/* /:splat
33

4+
/MTA_Classes /Element
45
/Element/:elementname /:elementname
56

67
/Vector/:vectorclass /:vectorclass

web/src/pages/Element.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const elementsByCategory = getElementsByCategory();
1010
title: 'Element types',
1111
tableOfContents: false,
1212
}}>
13+
<p>In order to perform operations on MTA objects via scripting, pointers to internal classes are exported to scripts as Lua userdata. Each of these classes has a number of exported scripting functions associated with them. Elements that have a physical representation in the game are also known as <a href="/Entity">Entities</a>.</p>
1314
<p>An <strong>element</strong> is a generic class that can represent almost all in-game entities. The built-in element types are:</p>
1415
<ul>
1516
{Object.entries(elementsByCategory).map(([category, elements], index) => (
@@ -31,5 +32,6 @@ const elementsByCategory = getElementsByCategory();
3132

3233
<SeeAlsoSection seeAlsoLinks={getSeeAlsoLinksFromList([
3334
'article:Element_tree',
35+
'article:Entity',
3436
])} currentId='' />
3537
</StarlightPage>

web/src/pages/Element_tree.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ You can start the resource *elementbrowser* to see a live view of the element tr
111111

112112
<SeeAlsoSection seeAlsoLinks={getSeeAlsoLinksFromList([
113113
'article:Element',
114+
'article:Entity',
114115
])} currentId='' />
115116

116117
</StarlightPage>

web/src/pages/Entity.mdx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
2+
import { getSeeAlsoLinksFromList } from '@src/utils/general';
3+
import SeeAlsoSection from '@src/components/SeeAlsoSection.astro';
4+
5+
<StarlightPage frontmatter={{
6+
template: 'doc',
7+
title: 'Entity',
8+
tableOfContents: false,
9+
}}>
10+
An entity is an element that has a position and a physical representation in the world. The following elements are entities:
11+
12+
- [Player](/player)
13+
- [Ped](/ped)
14+
- [Vehicle](/vehicle)
15+
- [Building](/building)
16+
- [Object](/object)
17+
- [Pickup](/pickup)
18+
- [Marker](/marker)
19+
- [Collision shape](/colshape)
20+
- [Blip](/blip)
21+
- [Radar area](/radararea)
22+
- [Projectile](/projectile)
23+
- [Weapon](/weapon)
24+
- [Camera](/camera)
25+
- [Effect](/effect)
26+
- [Light](/light)
27+
- [Searchlight](/searchlight)
28+
- [Water](/water)
29+
- [Sound](/sound)
30+
31+
<SeeAlsoSection seeAlsoLinks={getSeeAlsoLinksFromList([
32+
'article:Element',
33+
'article:Element_tree',
34+
])} currentId='' />
35+
</StarlightPage>

0 commit comments

Comments
 (0)