diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-03 21:51:34 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-03 21:51:34 -0400 |
| commit | bed3397a3acb42104cbf085455954313178d8433 (patch) | |
| tree | f4cd9f318b578c85e7a23c05896e7505c4c86e4b | |
| parent | c5edb28bd91936ede3c7d31a9d934ef5428fba40 (diff) | |
| download | lingo2-archipelago-bed3397a3acb42104cbf085455954313178d8433.tar.gz lingo2-archipelago-bed3397a3acb42104cbf085455954313178d8433.tar.bz2 lingo2-archipelago-bed3397a3acb42104cbf085455954313178d8433.zip | |
Added option for Daedalus roof access logic
| -rw-r--r-- | apworld/__init__.py | 1 | ||||
| -rw-r--r-- | apworld/options.py | 11 | ||||
| -rw-r--r-- | apworld/regions.py | 3 | ||||
| -rw-r--r-- | data/connections.txtpb | 1 | ||||
| -rw-r--r-- | data/maps/daedalus/connections.txtpb | 312 | ||||
| -rw-r--r-- | data/maps/daedalus/rooms/Orange Room Hallway.txtpb | 4 | ||||
| -rw-r--r-- | proto/data.proto | 2 | ||||
| -rw-r--r-- | proto/human.proto | 4 | ||||
| -rw-r--r-- | tools/datapacker/main.cpp | 5 |
9 files changed, 343 insertions, 0 deletions
| diff --git a/apworld/__init__.py b/apworld/__init__.py index 1f1e6fe..7ebdf56 100644 --- a/apworld/__init__.py +++ b/apworld/__init__.py | |||
| @@ -65,6 +65,7 @@ class Lingo2World(World): | |||
| 65 | 65 | ||
| 66 | def fill_slot_data(self): | 66 | def fill_slot_data(self): |
| 67 | slot_options = [ | 67 | slot_options = [ |
| 68 | "daedalus_roof_access", | ||
| 68 | "keyholder_sanity", | 69 | "keyholder_sanity", |
| 69 | "shuffle_doors", | 70 | "shuffle_doors", |
| 70 | "victory_condition", | 71 | "victory_condition", |
| diff --git a/apworld/options.py b/apworld/options.py index dacbc46..3216dff 100644 --- a/apworld/options.py +++ b/apworld/options.py | |||
| @@ -17,6 +17,16 @@ class KeyholderSanity(Toggle): | |||
| 17 | display_name = "Keyholder Sanity" | 17 | display_name = "Keyholder Sanity" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | class DaedalusRoofAccess(Toggle): | ||
| 21 | """ | ||
| 22 | If enabled, the player will be logically expected to be able to go from the castle entrance to any part of Daedalus | ||
| 23 | that is open to the air. If disabled, the player will only be expected to be able to enter the castle, the moat, | ||
| 24 | Icarus, and the area at the bottom of the stairs. Invisible walls that become opaque as you approach them are added | ||
| 25 | to the level to prevent the player from accidentally breaking logic. | ||
| 26 | """ | ||
| 27 | display_name = "Allow Daedalus Roof Access" | ||
| 28 | |||
| 29 | |||
| 20 | class VictoryCondition(Choice): | 30 | class VictoryCondition(Choice): |
| 21 | """Victory condition.""" | 31 | """Victory condition.""" |
| 22 | display_name = "Victory Condition" | 32 | display_name = "Victory Condition" |
| @@ -39,4 +49,5 @@ class VictoryCondition(Choice): | |||
| 39 | class Lingo2Options(PerGameCommonOptions): | 49 | class Lingo2Options(PerGameCommonOptions): |
| 40 | shuffle_doors: ShuffleDoors | 50 | shuffle_doors: ShuffleDoors |
| 41 | keyholder_sanity: KeyholderSanity | 51 | keyholder_sanity: KeyholderSanity |
| 52 | daedalus_roof_access: DaedalusRoofAccess | ||
| 42 | victory_condition: VictoryCondition | 53 | victory_condition: VictoryCondition |
| diff --git a/apworld/regions.py b/apworld/regions.py index fe2c99b..e30493c 100644 --- a/apworld/regions.py +++ b/apworld/regions.py | |||
| @@ -41,6 +41,9 @@ def create_regions(world: "Lingo2World"): | |||
| 41 | 41 | ||
| 42 | # TODO: The requirements of the opposite trigger also matter. | 42 | # TODO: The requirements of the opposite trigger also matter. |
| 43 | for connection in world.static_logic.objects.connections: | 43 | for connection in world.static_logic.objects.connections: |
| 44 | if connection.roof_access and not world.options.daedalus_roof_access: | ||
| 45 | continue | ||
| 46 | |||
| 44 | from_region = world.static_logic.get_room_region_name(connection.from_room) | 47 | from_region = world.static_logic.get_room_region_name(connection.from_room) |
| 45 | to_region = world.static_logic.get_room_region_name(connection.to_room) | 48 | to_region = world.static_logic.get_room_region_name(connection.to_room) |
| 46 | connection_name = f"{from_region} -> {to_region}" | 49 | connection_name = f"{from_region} -> {to_region}" |
| diff --git a/data/connections.txtpb b/data/connections.txtpb index f1b81d5..a79778f 100644 --- a/data/connections.txtpb +++ b/data/connections.txtpb | |||
| @@ -1193,6 +1193,7 @@ connections { | |||
| 1193 | } | 1193 | } |
| 1194 | } | 1194 | } |
| 1195 | oneway: true | 1195 | oneway: true |
| 1196 | roof_access: true | ||
| 1196 | } | 1197 | } |
| 1197 | connections { | 1198 | connections { |
| 1198 | from { | 1199 | from { |
| diff --git a/data/maps/daedalus/connections.txtpb b/data/maps/daedalus/connections.txtpb index 223710a..09613ae 100644 --- a/data/maps/daedalus/connections.txtpb +++ b/data/maps/daedalus/connections.txtpb | |||
| @@ -535,6 +535,11 @@ connections { | |||
| 535 | } | 535 | } |
| 536 | connections { | 536 | connections { |
| 537 | from_room: "Z2 Room" | 537 | from_room: "Z2 Room" |
| 538 | to_room: "Orange Room Hallway" | ||
| 539 | door { name: "Z2 Room Southeast Door" } | ||
| 540 | } | ||
| 541 | connections { | ||
| 542 | from_room: "Orange Room Hallway" | ||
| 538 | to_room: "Orange Room" | 543 | to_room: "Orange Room" |
| 539 | door { name: "Z2 Room Southeast Door" } | 544 | door { name: "Z2 Room Southeast Door" } |
| 540 | } | 545 | } |
| @@ -1545,3 +1550,310 @@ connections { | |||
| 1545 | to_room: "Pyramid Top" | 1550 | to_room: "Pyramid Top" |
| 1546 | door { name: "Pyramid Third Floor Door" } | 1551 | door { name: "Pyramid Third Floor Door" } |
| 1547 | } | 1552 | } |
| 1553 | connections { | ||
| 1554 | from_room: "Roof" | ||
| 1555 | to_room: "After Bee Room" | ||
| 1556 | oneway: true | ||
| 1557 | roof_access: true | ||
| 1558 | } | ||
| 1559 | connections { | ||
| 1560 | from_room: "Roof" | ||
| 1561 | to_room: "Amber North 2" | ||
| 1562 | oneway: true | ||
| 1563 | roof_access: true | ||
| 1564 | } | ||
| 1565 | connections { | ||
| 1566 | from_room: "Roof" | ||
| 1567 | to_room: "Black Hex" | ||
| 1568 | oneway: true | ||
| 1569 | roof_access: true | ||
| 1570 | } | ||
| 1571 | connections { | ||
| 1572 | from_room: "Roof" | ||
| 1573 | to_room: "Blue Hallway Tall Side" | ||
| 1574 | oneway: true | ||
| 1575 | roof_access: true | ||
| 1576 | } | ||
| 1577 | connections { | ||
| 1578 | from_room: "Roof" | ||
| 1579 | to_room: "Blue Hallway" | ||
| 1580 | oneway: true | ||
| 1581 | roof_access: true | ||
| 1582 | } | ||
| 1583 | # Blue Hallway Cut Side is inside. | ||
| 1584 | connections { | ||
| 1585 | from_room: "Roof" | ||
| 1586 | to_room: "Eye Painting" | ||
| 1587 | oneway: true | ||
| 1588 | roof_access: true | ||
| 1589 | } | ||
| 1590 | connections { | ||
| 1591 | from_room: "Roof" | ||
| 1592 | to_room: "Globe Room" | ||
| 1593 | oneway: true | ||
| 1594 | roof_access: true | ||
| 1595 | } | ||
| 1596 | connections { | ||
| 1597 | from_room: "Roof" | ||
| 1598 | to_room: "Gray Color Door" | ||
| 1599 | oneway: true | ||
| 1600 | roof_access: true | ||
| 1601 | } | ||
| 1602 | connections { | ||
| 1603 | from_room: "Roof" | ||
| 1604 | to_room: "Green Color Door" | ||
| 1605 | oneway: true | ||
| 1606 | roof_access: true | ||
| 1607 | } | ||
| 1608 | connections { | ||
| 1609 | from_room: "Roof" | ||
| 1610 | to_room: "Green Smiley" | ||
| 1611 | oneway: true | ||
| 1612 | roof_access: true | ||
| 1613 | } | ||
| 1614 | connections { | ||
| 1615 | from_room: "Roof" | ||
| 1616 | to_room: "Hedges" | ||
| 1617 | oneway: true | ||
| 1618 | roof_access: true | ||
| 1619 | } | ||
| 1620 | connections { | ||
| 1621 | from_room: "Roof" | ||
| 1622 | to_room: "Maze Paintings Area" | ||
| 1623 | oneway: true | ||
| 1624 | roof_access: true | ||
| 1625 | } | ||
| 1626 | connections { | ||
| 1627 | from_room: "Roof" | ||
| 1628 | to_room: "Maze" | ||
| 1629 | oneway: true | ||
| 1630 | roof_access: true | ||
| 1631 | } | ||
| 1632 | connections { | ||
| 1633 | from_room: "Roof" | ||
| 1634 | to_room: "North Castle Area" | ||
| 1635 | oneway: true | ||
| 1636 | roof_access: true | ||
| 1637 | } | ||
| 1638 | connections { | ||
| 1639 | from_room: "Roof" | ||
| 1640 | to_room: "Number Paintings Area" | ||
| 1641 | oneway: true | ||
| 1642 | roof_access: true | ||
| 1643 | } | ||
| 1644 | connections { | ||
| 1645 | from_room: "Roof" | ||
| 1646 | to_room: "Orange Room Hallway" | ||
| 1647 | oneway: true | ||
| 1648 | roof_access: true | ||
| 1649 | } | ||
| 1650 | connections { | ||
| 1651 | from_room: "Roof" | ||
| 1652 | to_room: "Outside Book Room" | ||
| 1653 | oneway: true | ||
| 1654 | roof_access: true | ||
| 1655 | } | ||
| 1656 | connections { | ||
| 1657 | from_room: "Roof" | ||
| 1658 | to_room: "Outside Eye Temple" | ||
| 1659 | oneway: true | ||
| 1660 | roof_access: true | ||
| 1661 | } | ||
| 1662 | connections { | ||
| 1663 | from_room: "Roof" | ||
| 1664 | to_room: "Outside Hedges" | ||
| 1665 | oneway: true | ||
| 1666 | roof_access: true | ||
| 1667 | } | ||
| 1668 | connections { | ||
| 1669 | from_room: "Roof" | ||
| 1670 | to_room: "Outside Hotel" | ||
| 1671 | oneway: true | ||
| 1672 | roof_access: true | ||
| 1673 | } | ||
| 1674 | connections { | ||
| 1675 | from_room: "Roof" | ||
| 1676 | to_room: "Outside House" | ||
| 1677 | oneway: true | ||
| 1678 | roof_access: true | ||
| 1679 | } | ||
| 1680 | connections { | ||
| 1681 | from_room: "Roof" | ||
| 1682 | to_room: "Outside Magic Room" | ||
| 1683 | oneway: true | ||
| 1684 | roof_access: true | ||
| 1685 | } | ||
| 1686 | connections { | ||
| 1687 | from_room: "Roof" | ||
| 1688 | to_room: "Outside Orange Room" | ||
| 1689 | oneway: true | ||
| 1690 | roof_access: true | ||
| 1691 | } | ||
| 1692 | connections { | ||
| 1693 | from_room: "Roof" | ||
| 1694 | to_room: "Outside Pyramid" | ||
| 1695 | oneway: true | ||
| 1696 | roof_access: true | ||
| 1697 | } | ||
| 1698 | connections { | ||
| 1699 | from_room: "Roof" | ||
| 1700 | to_room: "Outside Red Room" | ||
| 1701 | oneway: true | ||
| 1702 | roof_access: true | ||
| 1703 | } | ||
| 1704 | connections { | ||
| 1705 | from_room: "Roof" | ||
| 1706 | to_room: "Outside Salt Room" | ||
| 1707 | oneway: true | ||
| 1708 | roof_access: true | ||
| 1709 | } | ||
| 1710 | connections { | ||
| 1711 | from_room: "Roof" | ||
| 1712 | to_room: "Outside Snake Room" | ||
| 1713 | oneway: true | ||
| 1714 | roof_access: true | ||
| 1715 | } | ||
| 1716 | connections { | ||
| 1717 | from_room: "Roof" | ||
| 1718 | to_room: "Post Orange Smiley Three Way" | ||
| 1719 | oneway: true | ||
| 1720 | roof_access: true | ||
| 1721 | } | ||
| 1722 | connections { | ||
| 1723 | from_room: "Roof" | ||
| 1724 | to_room: "Purple NW Vestibule" | ||
| 1725 | oneway: true | ||
| 1726 | roof_access: true | ||
| 1727 | } | ||
| 1728 | connections { | ||
| 1729 | from_room: "Roof" | ||
| 1730 | to_room: "Purple Room East" | ||
| 1731 | oneway: true | ||
| 1732 | roof_access: true | ||
| 1733 | } | ||
| 1734 | connections { | ||
| 1735 | from_room: "Roof" | ||
| 1736 | to_room: "Purple Room South" | ||
| 1737 | oneway: true | ||
| 1738 | roof_access: true | ||
| 1739 | } | ||
| 1740 | connections { | ||
| 1741 | from_room: "Roof" | ||
| 1742 | to_room: "Purple Room West" | ||
| 1743 | oneway: true | ||
| 1744 | roof_access: true | ||
| 1745 | } | ||
| 1746 | connections { | ||
| 1747 | from_room: "Roof" | ||
| 1748 | to_room: "Purple SE Vestibule" | ||
| 1749 | oneway: true | ||
| 1750 | roof_access: true | ||
| 1751 | } | ||
| 1752 | connections { | ||
| 1753 | from_room: "Roof" | ||
| 1754 | to_room: "Pyramid Second Floor" | ||
| 1755 | oneway: true | ||
| 1756 | roof_access: true | ||
| 1757 | } | ||
| 1758 | connections { | ||
| 1759 | from_room: "Roof" | ||
| 1760 | to_room: "Pyramid Top" | ||
| 1761 | oneway: true | ||
| 1762 | roof_access: true | ||
| 1763 | } | ||
| 1764 | connections { | ||
| 1765 | from_room: "Roof" | ||
| 1766 | to_room: "Quiet Entrance" | ||
| 1767 | oneway: true | ||
| 1768 | roof_access: true | ||
| 1769 | } | ||
| 1770 | connections { | ||
| 1771 | from_room: "Roof" | ||
| 1772 | to_room: "Red Color Door" | ||
| 1773 | oneway: true | ||
| 1774 | roof_access: true | ||
| 1775 | } | ||
| 1776 | connections { | ||
| 1777 | from_room: "Roof" | ||
| 1778 | to_room: "South Castle Area" | ||
| 1779 | oneway: true | ||
| 1780 | roof_access: true | ||
| 1781 | } | ||
| 1782 | connections { | ||
| 1783 | from_room: "Roof" | ||
| 1784 | to_room: "Starting Room" | ||
| 1785 | oneway: true | ||
| 1786 | roof_access: true | ||
| 1787 | } | ||
| 1788 | connections { | ||
| 1789 | from_room: "Roof" | ||
| 1790 | to_room: "Sweet Foyer" | ||
| 1791 | oneway: true | ||
| 1792 | roof_access: true | ||
| 1793 | } | ||
| 1794 | connections { | ||
| 1795 | from_room: "Roof" | ||
| 1796 | to_room: "Tree Entrance" | ||
| 1797 | oneway: true | ||
| 1798 | roof_access: true | ||
| 1799 | } | ||
| 1800 | connections { | ||
| 1801 | from_room: "Roof" | ||
| 1802 | to_room: "West Castle Area" | ||
| 1803 | oneway: true | ||
| 1804 | roof_access: true | ||
| 1805 | } | ||
| 1806 | connections { | ||
| 1807 | from_room: "Roof" | ||
| 1808 | to_room: "West Spire" | ||
| 1809 | oneway: true | ||
| 1810 | roof_access: true | ||
| 1811 | } | ||
| 1812 | connections { | ||
| 1813 | from_room: "Roof" | ||
| 1814 | to_room: "Yellow Color Door" | ||
| 1815 | oneway: true | ||
| 1816 | roof_access: true | ||
| 1817 | } | ||
| 1818 | connections { | ||
| 1819 | from_room: "Roof" | ||
| 1820 | to_room: "Z2 Room" | ||
| 1821 | oneway: true | ||
| 1822 | roof_access: true | ||
| 1823 | } | ||
| 1824 | connections { | ||
| 1825 | from_room: "Roof" | ||
| 1826 | to_room: "Zoo Center" | ||
| 1827 | oneway: true | ||
| 1828 | roof_access: true | ||
| 1829 | } | ||
| 1830 | connections { | ||
| 1831 | from_room: "Roof" | ||
| 1832 | to_room: "Zoo E" | ||
| 1833 | oneway: true | ||
| 1834 | roof_access: true | ||
| 1835 | } | ||
| 1836 | connections { | ||
| 1837 | from_room: "Roof" | ||
| 1838 | to_room: "Zoo N" | ||
| 1839 | oneway: true | ||
| 1840 | roof_access: true | ||
| 1841 | } | ||
| 1842 | connections { | ||
| 1843 | from_room: "Roof" | ||
| 1844 | to_room: "Zoo NE" | ||
| 1845 | oneway: true | ||
| 1846 | roof_access: true | ||
| 1847 | } | ||
| 1848 | connections { | ||
| 1849 | from_room: "Roof" | ||
| 1850 | to_room: "Zoo S" | ||
| 1851 | oneway: true | ||
| 1852 | roof_access: true | ||
| 1853 | } | ||
| 1854 | connections { | ||
| 1855 | from_room: "Roof" | ||
| 1856 | to_room: "Zoo SE" | ||
| 1857 | oneway: true | ||
| 1858 | roof_access: true | ||
| 1859 | } | ||
| diff --git a/data/maps/daedalus/rooms/Orange Room Hallway.txtpb b/data/maps/daedalus/rooms/Orange Room Hallway.txtpb new file mode 100644 index 0000000..915e698 --- /dev/null +++ b/data/maps/daedalus/rooms/Orange Room Hallway.txtpb | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | name: "Orange Room Hallway" | ||
| 2 | panel_display_name: "Orange Room" | ||
| 3 | # This has the same door at both sides, and mainly just connects Z2 Room and | ||
| 4 | # Orange Room. It's separate because you can also get here from the Roof. | ||
| diff --git a/proto/data.proto b/proto/data.proto index 9cdf5fd..855c28c 100644 --- a/proto/data.proto +++ b/proto/data.proto | |||
| @@ -84,6 +84,8 @@ message Connection { | |||
| 84 | uint64 painting = 5; | 84 | uint64 painting = 5; |
| 85 | ProxyIdentifier panel = 6; | 85 | ProxyIdentifier panel = 6; |
| 86 | } | 86 | } |
| 87 | |||
| 88 | optional bool roof_access = 7; | ||
| 87 | } | 89 | } |
| 88 | 90 | ||
| 89 | message Door { | 91 | message Door { |
| diff --git a/proto/human.proto b/proto/human.proto index e0378cc..205b867 100644 --- a/proto/human.proto +++ b/proto/human.proto | |||
| @@ -62,6 +62,10 @@ message HumanConnection { | |||
| 62 | 62 | ||
| 63 | optional bool oneway = 3; | 63 | optional bool oneway = 3; |
| 64 | optional DoorIdentifier door = 4; | 64 | optional DoorIdentifier door = 4; |
| 65 | |||
| 66 | // If true, this connection will only be logically allowed if the Daedalus | ||
| 67 | // Roof Access option is enabled. | ||
| 68 | optional bool roof_access = 7; | ||
| 65 | } | 69 | } |
| 66 | 70 | ||
| 67 | message HumanConnections { | 71 | message HumanConnections { |
| diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index d7e0b69..595647d 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp | |||
| @@ -466,6 +466,11 @@ class DataPacker { | |||
| 466 | r_connection.set_required_door(door_id); | 466 | r_connection.set_required_door(door_id); |
| 467 | } | 467 | } |
| 468 | 468 | ||
| 469 | if (human_connection.has_roof_access()) { | ||
| 470 | f_connection.set_roof_access(human_connection.roof_access()); | ||
| 471 | r_connection.set_roof_access(human_connection.roof_access()); | ||
| 472 | } | ||
| 473 | |||
| 469 | container_.AddConnection(f_connection); | 474 | container_.AddConnection(f_connection); |
| 470 | if (!human_connection.oneway()) { | 475 | if (!human_connection.oneway()) { |
| 471 | container_.AddConnection(r_connection); | 476 | container_.AddConnection(r_connection); |
