From 2600e5a5cd6591c5fd905e40ddc69b1672748e6a Mon Sep 17 00:00:00 2001 From: Gabber235 Date: Fri, 9 Aug 2024 16:24:24 +0200 Subject: [PATCH] Update Adapter Docs --- .../documentation_orchestrator.rs | 1 + discord_bot/src/main.rs | 2 +- .../adapters/BasicAdapter/BasicAdapter.mdx | 1 + .../entries/quest/completable_objective.mdx | 32 +++++++++++++++++++ .../adapters/EntityAdapter/EntityAdapter.mdx | 5 +++ .../entries/entity/allay_instance.mdx | 23 +++++++++++++ .../entries/entity/chicken_instance.mdx | 23 +++++++++++++ .../entries/entity/frog_instance.mdx | 23 +++++++++++++ .../entries/entity/magma_cube_instance.mdx | 23 +++++++++++++ .../entries/entity/slime_instance.mdx | 23 +++++++++++++ .../entries/action/despawn_mythicmobs_mob.mdx | 2 +- .../entries/action/spawn_mythicmobs_mob.mdx | 2 +- 12 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 documentation/docs/adapters/BasicAdapter/entries/quest/completable_objective.mdx create mode 100644 documentation/docs/adapters/EntityAdapter/entries/entity/allay_instance.mdx create mode 100644 documentation/docs/adapters/EntityAdapter/entries/entity/chicken_instance.mdx create mode 100644 documentation/docs/adapters/EntityAdapter/entries/entity/frog_instance.mdx create mode 100644 documentation/docs/adapters/EntityAdapter/entries/entity/magma_cube_instance.mdx create mode 100644 documentation/docs/adapters/EntityAdapter/entries/entity/slime_instance.mdx diff --git a/code_generator/src/bin/entry_docs_generator/documentation_orchestrator.rs b/code_generator/src/bin/entry_docs_generator/documentation_orchestrator.rs index 37837495a1..f5db6215db 100644 --- a/code_generator/src/bin/entry_docs_generator/documentation_orchestrator.rs +++ b/code_generator/src/bin/entry_docs_generator/documentation_orchestrator.rs @@ -479,6 +479,7 @@ fn find_adapters_names() -> Result, OrchestrationError> { .filter(|path| path.is_dir()) .map(|path| path.file_name().unwrap().to_str().unwrap().to_string()) .filter(|adapter| adapter.ends_with("Adapter")) + .filter(|adapter| !adapter.starts_with("_")) .collect::>(); return Ok(adapters); diff --git a/discord_bot/src/main.rs b/discord_bot/src/main.rs index 1bb25d7023..678695d837 100644 --- a/discord_bot/src/main.rs +++ b/discord_bot/src/main.rs @@ -1,4 +1,4 @@ -use std::{cmp::min, sync::Arc}; +use std::sync::Arc; use actix_web::{middleware::Logger, App, HttpServer}; use once_cell::sync::Lazy; diff --git a/documentation/docs/adapters/BasicAdapter/BasicAdapter.mdx b/documentation/docs/adapters/BasicAdapter/BasicAdapter.mdx index f0d2a57d82..d77b38bb95 100644 --- a/documentation/docs/adapters/BasicAdapter/BasicAdapter.mdx +++ b/documentation/docs/adapters/BasicAdapter/BasicAdapter.mdx @@ -144,6 +144,7 @@ first. | Name | Description | | ---- | ----------- | +| [Completable Objective](./entries/quest/completable_objective.mdx) | An objective that can show a completed stage | | [Location Objective](./entries/quest/location_objective.mdx) | A location objective definition | | [Objective Lines](./entries/quest/objective_lines.mdx) | Display all the current objectives | | [Quest Complete Event](./entries/quest/quest_complete_event.mdx) | Triggered when a quest is completed for a player | diff --git a/documentation/docs/adapters/BasicAdapter/entries/quest/completable_objective.mdx b/documentation/docs/adapters/BasicAdapter/entries/quest/completable_objective.mdx new file mode 100644 index 0000000000..89c31187de --- /dev/null +++ b/documentation/docs/adapters/BasicAdapter/entries/quest/completable_objective.mdx @@ -0,0 +1,32 @@ +import * as fields from '@site/src/components/EntryField'; +import Admonition from '@theme/Admonition'; +import Link from '@docusaurus/Link'; + +# Completable Objective + +The `Completable Objective` entry is an objective that can show a completed stage. +It is shown to the player when the show criteria are met, regardless of if the completed criteria are met. + +## How could this be used? +This is useful when the quest has multiple objectives that can be completed in different orders. +For example, the player needs to collect wheat, eggs, and milk to make a cake. +The order in which the player collects the items does not matter. +But you want to show the player which items they have collected. + + +## Fields + + + + + + + The criteria need to be met for the objective to be able to be shown. + + + The criteria to display the objective as completed. + + + + + diff --git a/documentation/docs/adapters/EntityAdapter/EntityAdapter.mdx b/documentation/docs/adapters/EntityAdapter/EntityAdapter.mdx index 874709b63c..351d0d41c4 100644 --- a/documentation/docs/adapters/EntityAdapter/EntityAdapter.mdx +++ b/documentation/docs/adapters/EntityAdapter/EntityAdapter.mdx @@ -70,15 +70,19 @@ first. | Name | Description | | ---- | ----------- | +| [Allay Instance](./entries/entity/allay_instance.mdx) | An instance of a allay entity | | [Cat Instance](./entries/entity/cat_instance.mdx) | An instance of a cat entity | +| [Chicken Instance](./entries/entity/chicken_instance.mdx) | An instance of a chicken entity | | [Cow Instance](./entries/entity/cow_instance.mdx) | An instance of a cow entity | | [Enderman Instance](./entries/entity/enderman_instance.mdx) | An instance of a enderman entity | +| [Frog Instance](./entries/entity/frog_instance.mdx) | An instance of a frog entity | | [Hit Box Definition](./entries/entity/hit_box_definition.mdx) | A hit box for an entity to allow interaction with a different entity | | [Hoglin Instance](./entries/entity/hoglin_instance.mdx) | An instance of a hoglin entity | | [Husk Instance](./entries/entity/husk_instance.mdx) | An instance of a husk entity | | [Interaction Indicator Definition](./entries/entity/interaction_indicator_definition.mdx) | Interaction Indicator | | [Iron Golem Instance](./entries/entity/iron_golem_instance.mdx) | An instance of an iron golem entity | | [Item Display Instance](./entries/entity/item_display_instance.mdx) | An instance of an item display entity | +| [Magma Cube Instance](./entries/entity/magma_cube_instance.mdx) | An instance of a magma cube entity | | [Named Entity Definition](./entries/entity/named_entity_definition.mdx) | An entity with a name above it's head and the indicator | | [Npc Instance](./entries/entity/npc_instance.mdx) | An instance of a simplified premade npc | | [Piglin Brute Instance](./entries/entity/piglin_brute_instance.mdx) | An instance of a piglin brute entity | @@ -86,6 +90,7 @@ first. | [Player Instance](./entries/entity/player_instance.mdx) | An instance of a player entity | | [Self Npc Definition](./entries/entity/self_npc_definition.mdx) | The definition of the self NPC | | [Skeleton Instance](./entries/entity/skeleton_instance.mdx) | An instance of a skeleton entity | +| [Slime Instance](./entries/entity/slime_instance.mdx) | An instance of a slime entity | | [Stacked Entity Definition](./entries/entity/stacked_entity_definition.mdx) | A stacking of entities | | [Text Display Instance](./entries/entity/text_display_instance.mdx) | An instance of a text display entity | | [Villager Instance](./entries/entity/villager_instance.mdx) | An instance of a villager entity | diff --git a/documentation/docs/adapters/EntityAdapter/entries/entity/allay_instance.mdx b/documentation/docs/adapters/EntityAdapter/entries/entity/allay_instance.mdx new file mode 100644 index 0000000000..1daafc1db2 --- /dev/null +++ b/documentation/docs/adapters/EntityAdapter/entries/entity/allay_instance.mdx @@ -0,0 +1,23 @@ +import * as fields from '@site/src/components/EntryField'; +import Admonition from '@theme/Admonition'; +import Link from '@docusaurus/Link'; + +# Allay Instance + +The `Allay Instance` class is an entry that represents an instance of an allay entity. + +## How could this be used? + +This could be used to create an allay entity. + + +## Fields + + + + + + + + + diff --git a/documentation/docs/adapters/EntityAdapter/entries/entity/chicken_instance.mdx b/documentation/docs/adapters/EntityAdapter/entries/entity/chicken_instance.mdx new file mode 100644 index 0000000000..de7979e5af --- /dev/null +++ b/documentation/docs/adapters/EntityAdapter/entries/entity/chicken_instance.mdx @@ -0,0 +1,23 @@ +import * as fields from '@site/src/components/EntryField'; +import Admonition from '@theme/Admonition'; +import Link from '@docusaurus/Link'; + +# Chicken Instance + +The `ChickenInstance` class is an entry that represents an instance of a chicken entity. + +## How could this be used? + +This could be used to create a chicken entity. + + +## Fields + + + + + + + + + diff --git a/documentation/docs/adapters/EntityAdapter/entries/entity/frog_instance.mdx b/documentation/docs/adapters/EntityAdapter/entries/entity/frog_instance.mdx new file mode 100644 index 0000000000..7d6d05d43d --- /dev/null +++ b/documentation/docs/adapters/EntityAdapter/entries/entity/frog_instance.mdx @@ -0,0 +1,23 @@ +import * as fields from '@site/src/components/EntryField'; +import Admonition from '@theme/Admonition'; +import Link from '@docusaurus/Link'; + +# Frog Instance + +The `FrogInstance` class is an entry that represents an instance of a frog entity. + +## How could this be used? + +This could be used to create a frog entity. + + +## Fields + + + + + + + + + diff --git a/documentation/docs/adapters/EntityAdapter/entries/entity/magma_cube_instance.mdx b/documentation/docs/adapters/EntityAdapter/entries/entity/magma_cube_instance.mdx new file mode 100644 index 0000000000..c0be4a4745 --- /dev/null +++ b/documentation/docs/adapters/EntityAdapter/entries/entity/magma_cube_instance.mdx @@ -0,0 +1,23 @@ +import * as fields from '@site/src/components/EntryField'; +import Admonition from '@theme/Admonition'; +import Link from '@docusaurus/Link'; + +# Magma Cube Instance + +The `MagmaCubeInstance` class is an entry that represents an instance of a magma cube entity. + +## How could this be used? + +This could be used to create a magma cube entity. + + +## Fields + + + + + + + + + diff --git a/documentation/docs/adapters/EntityAdapter/entries/entity/slime_instance.mdx b/documentation/docs/adapters/EntityAdapter/entries/entity/slime_instance.mdx new file mode 100644 index 0000000000..32e6540831 --- /dev/null +++ b/documentation/docs/adapters/EntityAdapter/entries/entity/slime_instance.mdx @@ -0,0 +1,23 @@ +import * as fields from '@site/src/components/EntryField'; +import Admonition from '@theme/Admonition'; +import Link from '@docusaurus/Link'; + +# Slime Instance + +The `SlimeInstance` class is an entry that represents an instance of a slime entity. + +## How could this be used? + +This could be used to create a slime entity. + + +## Fields + + + + + + + + + diff --git a/documentation/docs/adapters/MythicMobsAdapter/entries/action/despawn_mythicmobs_mob.mdx b/documentation/docs/adapters/MythicMobsAdapter/entries/action/despawn_mythicmobs_mob.mdx index ed66068a89..cf7f115b6f 100644 --- a/documentation/docs/adapters/MythicMobsAdapter/entries/action/despawn_mythicmobs_mob.mdx +++ b/documentation/docs/adapters/MythicMobsAdapter/entries/action/despawn_mythicmobs_mob.mdx @@ -17,6 +17,6 @@ This action could be used in stories or quests in various ways. For instance, if - + The mob's name diff --git a/documentation/docs/adapters/MythicMobsAdapter/entries/action/spawn_mythicmobs_mob.mdx b/documentation/docs/adapters/MythicMobsAdapter/entries/action/spawn_mythicmobs_mob.mdx index 128c27f88d..e469590888 100644 --- a/documentation/docs/adapters/MythicMobsAdapter/entries/action/spawn_mythicmobs_mob.mdx +++ b/documentation/docs/adapters/MythicMobsAdapter/entries/action/spawn_mythicmobs_mob.mdx @@ -17,7 +17,7 @@ This action could be used in a plethora of scenarios. From simple quests requiri - + The mob's name