Add bug report link to WebWorld (#440)
* Add bug report link to WebWorld * change bug_report_page to an optional reword bug report link text. * update Minecraft bug report page to a template. * change wording of link. * add `bug_report_page` documentation to api.md
This commit is contained in:
parent
a4daa78c0b
commit
1fe82b1312
|
@ -21,6 +21,10 @@
|
||||||
{% elif world.web.settings_page %}
|
{% elif world.web.settings_page %}
|
||||||
<a href="{{ url_for("player_settings", game=game_name) }}">Settings Page</a>
|
<a href="{{ url_for("player_settings", game=game_name) }}">Settings Page</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if world.web.bug_report_page %}
|
||||||
|
<span class="link-spacer">|</span>
|
||||||
|
<a href="{{ world.web.bug_report_page }}">Report a Bug</a>
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -56,12 +56,17 @@ game.
|
||||||
### WebWorld Class
|
### WebWorld Class
|
||||||
|
|
||||||
A `WebWorld` class contains specific attributes and methods that can be modified
|
A `WebWorld` class contains specific attributes and methods that can be modified
|
||||||
for your world specifically on the webhost. At the moment this comprises of `settings_page`
|
for your world specifically on the webhost.
|
||||||
which can be changed to a link instead of an AP generated settings page, and a `theme` to be used for your game specific AP pages. Available themes:
|
|
||||||
|
`settings_page` which can be changed to a link instead of an AP generated settings page.
|
||||||
|
|
||||||
|
`theme` to be used for your game specific AP pages. Available themes:
|
||||||
| dirt | grass (default) | grassFlowers | ice | jungle | ocean | partyTime |
|
| dirt | grass (default) | grassFlowers | ice | jungle | ocean | partyTime |
|
||||||
|---|---|---|---|---|---|---|
|
|---|---|---|---|---|---|---|
|
||||||
| <img src="img/theme_dirt.JPG" width="100"> | <img src="img/theme_grass.JPG" width="100"> | <img src="img/theme_grassFlowers.JPG" width="100"> | <img src="img/theme_ice.JPG" width="100"> | <img src="img/theme_jungle.JPG" width="100"> | <img src="img/theme_ocean.JPG" width="100"> | <img src="img/theme_partyTime.JPG" width="100"> |
|
| <img src="img/theme_dirt.JPG" width="100"> | <img src="img/theme_grass.JPG" width="100"> | <img src="img/theme_grassFlowers.JPG" width="100"> | <img src="img/theme_ice.JPG" width="100"> | <img src="img/theme_jungle.JPG" width="100"> | <img src="img/theme_ocean.JPG" width="100"> | <img src="img/theme_partyTime.JPG" width="100"> |
|
||||||
|
|
||||||
|
`bug_report_page` (optional) can be a link to a bug reporting page, most likely a GitHub issue page, that will be placed by the site to help direct users to report bugs.
|
||||||
|
|
||||||
### MultiWorld Object
|
### MultiWorld Object
|
||||||
|
|
||||||
The `MultiWorld` object references the whole multiworld (all items and locations
|
The `MultiWorld` object references the whole multiworld (all items and locations
|
||||||
|
|
|
@ -93,6 +93,9 @@ class WebWorld:
|
||||||
# Available: dirt, grass, grassFlowers, ice, jungle, ocean, partyTime
|
# Available: dirt, grass, grassFlowers, ice, jungle, ocean, partyTime
|
||||||
theme = "grass"
|
theme = "grass"
|
||||||
|
|
||||||
|
# display a link to a bug report page, most likely a link to a GitHub issue page.
|
||||||
|
bug_report_page: Optional[str]
|
||||||
|
|
||||||
|
|
||||||
class World(metaclass=AutoWorldRegister):
|
class World(metaclass=AutoWorldRegister):
|
||||||
"""A World object encompasses a game's Items, Locations, Rules and additional data or functionality required.
|
"""A World object encompasses a game's Items, Locations, Rules and additional data or functionality required.
|
||||||
|
|
|
@ -11,11 +11,17 @@ from worlds.generic.Rules import exclusion_rules
|
||||||
|
|
||||||
from BaseClasses import Region, Entrance, Item
|
from BaseClasses import Region, Entrance, Item
|
||||||
from .Options import minecraft_options
|
from .Options import minecraft_options
|
||||||
from ..AutoWorld import World
|
from ..AutoWorld import World, WebWorld
|
||||||
|
|
||||||
client_version = 7
|
client_version = 7
|
||||||
minecraft_version = "1.17.1"
|
minecraft_version = "1.17.1"
|
||||||
|
|
||||||
|
|
||||||
|
class MinecraftWebWorld(WebWorld):
|
||||||
|
theme = "jungle"
|
||||||
|
bug_report_page = "https://github.com/KonoTyran/Minecraft_AP_Randomizer/issues/new?assignees=&labels=bug&template=bug_report.yaml&title=%5BBug%5D%3A+Brief+Description+of+bug+here"
|
||||||
|
|
||||||
|
|
||||||
class MinecraftWorld(World):
|
class MinecraftWorld(World):
|
||||||
"""
|
"""
|
||||||
Minecraft is a game about creativity. In a world made entirely of cubes, you explore, discover, mine,
|
Minecraft is a game about creativity. In a world made entirely of cubes, you explore, discover, mine,
|
||||||
|
@ -26,6 +32,7 @@ class MinecraftWorld(World):
|
||||||
game: str = "Minecraft"
|
game: str = "Minecraft"
|
||||||
options = minecraft_options
|
options = minecraft_options
|
||||||
topology_present = True
|
topology_present = True
|
||||||
|
web = MinecraftWebWorld()
|
||||||
|
|
||||||
item_name_to_id = {name: data.code for name, data in item_table.items()}
|
item_name_to_id = {name: data.code for name, data in item_table.items()}
|
||||||
location_name_to_id = {name: data.id for name, data in advancement_table.items()}
|
location_name_to_id = {name: data.id for name, data in advancement_table.items()}
|
||||||
|
|
Loading…
Reference in New Issue