mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Connections Plando Support
This commit is contained in:
13
Mystery.py
13
Mystery.py
@@ -7,7 +7,7 @@ import typing
|
||||
import os
|
||||
|
||||
import ModuleUpdate
|
||||
from BaseClasses import PlandoItem
|
||||
from BaseClasses import PlandoItem, PlandoConnection
|
||||
|
||||
ModuleUpdate.update()
|
||||
|
||||
@@ -566,6 +566,17 @@ def roll_settings(weights, plando_options: typing.Set[str] = frozenset(("bosses"
|
||||
if roll_percentage(get_choice("percentage", placement, 100)):
|
||||
ret.plando_texts[str(get_choice("at", placement))] = str(get_choice("text", placement))
|
||||
|
||||
ret.plando_connections = []
|
||||
if "connections" in plando_options:
|
||||
options = weights.get("plando_connections", [])
|
||||
for placement in options:
|
||||
if roll_percentage(get_choice("percentage", placement, 100)):
|
||||
ret.plando_connections.append(PlandoConnection(
|
||||
get_choice("entrance", placement),
|
||||
get_choice("exit", placement),
|
||||
get_choice("direction", placement, "both")
|
||||
))
|
||||
|
||||
if 'rom' in weights:
|
||||
romweights = weights['rom']
|
||||
|
||||
|
Reference in New Issue
Block a user