Skip to content

Commit

Permalink
Add Airship Battle to Examples
Browse files Browse the repository at this point in the history
Signed-off-by: Indicado <[email protected]>
  • Loading branch information
Indicardo committed May 8, 2020
1 parent 4e3eebc commit 560250f
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 1 deletion.
157 changes: 157 additions & 0 deletions docs/examples/airship-battle.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
id: airship-battle
title: Airship Battle
---

[<i className="icon-right">➡️</i>](/docs/modules/general/main)
Every map XML file starts with the XML header and then the base `<map>` module.

```xml
<?xml version="1.0"?>
<map proto="1.4.2">
<!-- Specifies what the map is called -->
<name>Airship Battle</name>
<!-- States what version the map is -->
<version>1.0.4</version>
<!-- Tells the teams what the objective is in order to win the game -->
<objective>Leak lava from the enemy's obsidian core into the void.</objective>
<!-- States who made the map -->
<authors>
<author uuid="30e27366-0b14-4076-8f55-0819ece49ce3"/> <!-- Dewtroid -->
</authors>
<!-- Shows any map rules that are not in normal OCN rules -->
<rules>
<rule>Dispensers are disabled</rule>
</rules>
```

[<i className="icon-right">➡️</i>](/docs/modules/mechanics/filters)
These filters is used to prevent people from placing dispensers or obsidian in the regions they are applied to.

```xml
<filters>
<not id="deny-dispenser">
<material>dispenser</material>
</not>
<not id="deny-obsidian">
<material>obsidian</material>
</not>
</filters>
```

[<i className="icon-right">➡️</i>](/docs/modules/format/teams)
Defines the teams [colors](/reference/formatting#chatColors), names and how many people can be on the teams.

```xml
<teams>
<team id="blue-team" color="blue" max="24">Blue Team</team>
<team id="red-team" color="dark red" max="24">Red Team</team>
</teams>
```

[<i className="icon-right">➡️</i>](/docs/modules/mechanics/regions)
These regions reference the dispenser and obsidian filters defined above and states where they will work.

```xml
<regions>
<!-- Apply the deny-dispenser filter to a infinite region -->
<apply block-place="deny-dispenser" message="Dispensers are disabled on this map!">
<region>
<rectangle min="-oo,-oo" max="oo,oo"/>
</region>
</apply>
<apply leave="always" message="Don't exit the playing field!">
<region>
<rectangle min="-102,-4" max="102,125"/> <!-- Main area -->
<rectangle min="-36,-16" max="13,-2"/> <!-- Area between spawn tunnels -->
</region>
</apply>
<apply block="always" message="Don't edit blocks outside the playing field!">
<region>
<negative>
<union id="map">
<rectangle min="-100,-2" max="100,123"/> <!-- Main area -->
<rectangle min="-36,-14" max="13,-2"/> <!-- Area between spawn tunnels -->
</union>
</negative>
</region>
</apply>
<apply block-break="deny-obsidian" message="You may not break obsidian outside the core area!">
<region>
<complement>
<region id="map"/>
<cuboid min="13,85,23" max="18,92,30"/>
<cuboid min="-41,85,23" max="-36,92,30"/>
</complement>
</region>
</apply>
</regions>
```

[<i className="icon-right">➡️</i>](/docs/modules/gear/kits)
Define a kit with special TNT defuser shears.

```xml
<kits>
<kit id="shears">
<item slot="8" name="`6TNT Defuser" lore="`7Right click to defuse teammate's TNT|`7Does not work in `9water`7!" material="shears"/>
</kit>
</kits>
```

[<i className="icon-right">➡️</i>](/docs/modules/gear/repair-remove-keep)
Remove shears, obsidian and gold block items from the playing field when they are dropped.

```xml
<itemremove>
<item>shears</item>
<item>obsidian</item>
<item>gold block</item>
</itemremove>
```

[<i className="icon-right">➡️</i>](/docs/modules/mechanics/spawns)
Specify where the previously defined teams will spawn, the kit they will spawn with and what direction they face.

```xml
<spawns>
<spawn team="blue-team" yaw="270" kit="shears">
<cuboid min="4.5,91,-34" max="7.5,91,-31"/>
</spawn>
<spawn team="red-team" yaw="90" kit="shears">
<cuboid min="-30.5,91,-34" max="-27.5,91,-31"/>
</spawn>
<default yaw="180">
<cylinder base="-11.5,90,-33" radius="3" height="0"/>
</default>
</spawns>
```

[<i className="icon-right">➡️</i>](/docs/modules/objectives/dtc)
This specifies what material the core is made of, who each core belongs to and how far the lava needs to leak.

```xml
<cores material="obsidian" leak="10">
<core team="blue-team">
<cuboid min="13,85,23" max="18,92,30"/>
</core>
<core team="red-team">
<cuboid min="-41,85,23" max="-36,92,30"/>
</core>
</cores>
```

[<i className="icon-right">➡️</i>](/docs/modules/objectives/other)

This specifies how high players can build however it doesn't stop them from going over this limit.

```xml
<maxbuildheight>125</maxbuildheight>
```

[<i className="icon-right">➡️</i>](/docs/modules/general/main)
Close the main `<map>` module.

```xml
</map>
```
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = {
position: "left",
},
{
to: "docs/modules/general/main",
to: "docs/examples/airship-battle",
activeBasePath: "docs",
label: "Examples",
position: "left",
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ module.exports = {
],
Contribute: ["guides/contribute/migrate"],
},
Examples: ["examples/airship-battle"],
};
6 changes: 6 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,9 @@ table label {
padding: 1px 4px;
display: inline-block;
}

.icon-right {
float: right;
margin-left: 8px;
font-style: normal;
}

0 comments on commit 560250f

Please sign in to comment.