| 
									
										
										
										
											2022-06-17 03:23:27 +02:00
										 |  |  | from BaseClasses import Item, MultiWorld, Region, Location, Entrance, Tutorial, ItemClassification, RegionType | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  | from .Items import item_table | 
					
						
							|  |  |  | from .Rules import set_rules | 
					
						
							| 
									
										
											  
											
												Website Style Upgrade (#353)
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* Seed download page improvements
* Add styles to weighted-settings page
* Minor adjustments to styles
* Revert base theme to grass
* Add more items to ArchipIDLE
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* Seed download page improvements
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* Add styles to weighted-settings page
* Minor adjustments to styles
* Revert base theme to grass
* Add more items to ArchipIDLE
* Improve Archipidle item name
* [WebHost] Update background images, waiting on jungle.png, added partyTime theme
* [WebHost] Fix tab ordering on landing page, remove islands on screen scale, fix tutorial page width scaling
* [WebHost] Final touches to WebHost
* Improve get_world_theme function, add partyTime theme to ArchipIDLE WebWorld
* Remove sending_visible from AutoWorld
* AP Ocarina of Time Client (#352)
* Core: update jinja (#351)
* some typing and cleaning, mostly in Fill.py (#349)
* some typing and cleaning, mostly in Fill.py
* address missing Option types
* resolve a few TODOs discussed in pull request
* SM: Optimize a bit (#350)
* SM: Optimize a bit
* SM: init bosses only once
* New World Order (#355)
* Core: update jinja
* SM: Optimize a bit
* AutoWorld: import worlds in alphabetical order, to be predictable rather than arbitrary
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
* Remove references to Z5Client in English OoT setup guide
* Prevent markdown code blocks from overflowing their container
Co-authored-by: espeon65536 <81029175+espeon65536@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
											
										 
											2022-03-28 20:12:17 -04:00
										 |  |  | from ..AutoWorld import World, WebWorld | 
					
						
							| 
									
										
										
										
											2022-05-21 00:12:28 -04:00
										 |  |  | from datetime import datetime | 
					
						
							| 
									
										
											  
											
												Website Style Upgrade (#353)
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* Seed download page improvements
* Add styles to weighted-settings page
* Minor adjustments to styles
* Revert base theme to grass
* Add more items to ArchipIDLE
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* Seed download page improvements
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* Add styles to weighted-settings page
* Minor adjustments to styles
* Revert base theme to grass
* Add more items to ArchipIDLE
* Improve Archipidle item name
* [WebHost] Update background images, waiting on jungle.png, added partyTime theme
* [WebHost] Fix tab ordering on landing page, remove islands on screen scale, fix tutorial page width scaling
* [WebHost] Final touches to WebHost
* Improve get_world_theme function, add partyTime theme to ArchipIDLE WebWorld
* Remove sending_visible from AutoWorld
* AP Ocarina of Time Client (#352)
* Core: update jinja (#351)
* some typing and cleaning, mostly in Fill.py (#349)
* some typing and cleaning, mostly in Fill.py
* address missing Option types
* resolve a few TODOs discussed in pull request
* SM: Optimize a bit (#350)
* SM: Optimize a bit
* SM: init bosses only once
* New World Order (#355)
* Core: update jinja
* SM: Optimize a bit
* AutoWorld: import worlds in alphabetical order, to be predictable rather than arbitrary
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
* Remove references to Z5Client in English OoT setup guide
* Prevent markdown code blocks from overflowing their container
Co-authored-by: espeon65536 <81029175+espeon65536@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
											
										 
											2022-03-28 20:12:17 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ArchipIDLEWebWorld(WebWorld): | 
					
						
							|  |  |  |     theme = 'partyTime' | 
					
						
							| 
									
										
										
										
											2022-05-11 13:05:53 -05:00
										 |  |  |     tutorials = [Tutorial( | 
					
						
							|  |  |  |         "Setup Guide", | 
					
						
							|  |  |  |         "A guide to playing ArchipIDLE", | 
					
						
							|  |  |  |         "English", | 
					
						
							|  |  |  |         "guide_en.md", | 
					
						
							|  |  |  |         "guide/en", | 
					
						
							|  |  |  |         ["Farrak Kilhn"] | 
					
						
							|  |  |  |     )] | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ArchipIDLEWorld(World): | 
					
						
							| 
									
										
										
										
											2022-03-13 23:44:30 -04:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     An idle game which sends a check every thirty seconds, up to one hundred checks. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  |     game = "ArchipIDLE" | 
					
						
							|  |  |  |     topology_present = False | 
					
						
							| 
									
										
										
										
											2022-04-01 10:04:42 -04:00
										 |  |  |     data_version = 3 | 
					
						
							| 
									
										
										
										
											2022-05-21 00:12:28 -04:00
										 |  |  |     hidden = (datetime.now().month != 4)  # ArchipIDLE is only visible during April | 
					
						
							| 
									
										
											  
											
												Website Style Upgrade (#353)
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* Seed download page improvements
* Add styles to weighted-settings page
* Minor adjustments to styles
* Revert base theme to grass
* Add more items to ArchipIDLE
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* Seed download page improvements
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets
* Landing Page Updates
* Markdown updates, colors coming later
* Remove testing theme from FF1
* Color updates for markdown styles
* Updates to generated pages, so many updates
* Add styles to weighted-settings page
* Minor adjustments to styles
* Revert base theme to grass
* Add more items to ArchipIDLE
* Improve Archipidle item name
* [WebHost] Update background images, waiting on jungle.png, added partyTime theme
* [WebHost] Fix tab ordering on landing page, remove islands on screen scale, fix tutorial page width scaling
* [WebHost] Final touches to WebHost
* Improve get_world_theme function, add partyTime theme to ArchipIDLE WebWorld
* Remove sending_visible from AutoWorld
* AP Ocarina of Time Client (#352)
* Core: update jinja (#351)
* some typing and cleaning, mostly in Fill.py (#349)
* some typing and cleaning, mostly in Fill.py
* address missing Option types
* resolve a few TODOs discussed in pull request
* SM: Optimize a bit (#350)
* SM: Optimize a bit
* SM: init bosses only once
* New World Order (#355)
* Core: update jinja
* SM: Optimize a bit
* AutoWorld: import worlds in alphabetical order, to be predictable rather than arbitrary
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
* Remove references to Z5Client in English OoT setup guide
* Prevent markdown code blocks from overflowing their container
Co-authored-by: espeon65536 <81029175+espeon65536@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
											
										 
											2022-03-28 20:12:17 -04:00
										 |  |  |     web = ArchipIDLEWebWorld() | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |     item_name_to_id = {} | 
					
						
							|  |  |  |     start_id = 9000 | 
					
						
							|  |  |  |     for item in item_table: | 
					
						
							|  |  |  |         item_name_to_id[item] = start_id | 
					
						
							|  |  |  |         start_id += 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     location_name_to_id = {} | 
					
						
							|  |  |  |     start_id = 9000 | 
					
						
							| 
									
										
										
										
											2022-03-13 14:37:56 -04:00
										 |  |  |     for i in range(1, 101): | 
					
						
							| 
									
										
										
										
											2022-03-30 21:34:39 -04:00
										 |  |  |         location_name_to_id[f"IDLE for at least {int(i / 2)} minutes {30 if (i % 2) > 0 else 0} seconds"] = start_id | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  |         start_id += 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def generate_basic(self): | 
					
						
							|  |  |  |         item_table_copy = list(item_table) | 
					
						
							|  |  |  |         self.world.random.shuffle(item_table_copy) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         item_pool = [] | 
					
						
							| 
									
										
										
										
											2022-03-13 14:37:56 -04:00
										 |  |  |         for i in range(100): | 
					
						
							| 
									
										
										
										
											2022-03-13 15:31:27 -04:00
										 |  |  |             item = Item( | 
					
						
							| 
									
										
										
										
											2022-03-13 20:39:13 -04:00
										 |  |  |                 item_table_copy[i], | 
					
						
							| 
									
										
										
										
											2022-06-17 03:23:27 +02:00
										 |  |  |                 ItemClassification.progression if i < 20 else ItemClassification.filler, | 
					
						
							| 
									
										
										
										
											2022-03-13 20:39:13 -04:00
										 |  |  |                 self.item_name_to_id[item_table_copy[i]], | 
					
						
							| 
									
										
										
										
											2022-03-13 15:31:27 -04:00
										 |  |  |                 self.player | 
					
						
							|  |  |  |             ) | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  |             item.game = 'ArchipIDLE' | 
					
						
							|  |  |  |             item_pool.append(item) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-13 20:44:08 -04:00
										 |  |  |         self.world.itempool += item_pool | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def set_rules(self): | 
					
						
							|  |  |  |         set_rules(self.world, self.player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def create_item(self, name: str) -> Item: | 
					
						
							| 
									
										
										
										
											2022-06-17 03:23:27 +02:00
										 |  |  |         return Item(name, ItemClassification.progression, self.item_name_to_id[name], self.player) | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def create_regions(self): | 
					
						
							|  |  |  |         self.world.regions += [ | 
					
						
							|  |  |  |             create_region(self.world, self.player, 'Menu', None, ['Entrance to IDLE Zone']), | 
					
						
							|  |  |  |             create_region(self.world, self.player, 'IDLE Zone', self.location_name_to_id) | 
					
						
							|  |  |  |         ] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # link up our region with the entrance we just made | 
					
						
							|  |  |  |         self.world.get_entrance('Entrance to IDLE Zone', self.player)\ | 
					
						
							|  |  |  |             .connect(self.world.get_region('IDLE Zone', self.player)) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-19 09:37:26 -04:00
										 |  |  |     def get_filler_item_name(self) -> str: | 
					
						
							|  |  |  |         return self.world.random.choice(item_table) | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-17 03:23:27 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  | def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None): | 
					
						
							| 
									
										
										
										
											2022-06-17 03:23:27 +02:00
										 |  |  |     region = Region(name, RegionType.Generic, name, player) | 
					
						
							| 
									
										
										
										
											2022-03-13 04:04:12 -04:00
										 |  |  |     region.world = world | 
					
						
							|  |  |  |     if locations: | 
					
						
							|  |  |  |         for location_name in locations.keys(): | 
					
						
							|  |  |  |             location = ArchipIDLELocation(player, location_name, locations[location_name], region) | 
					
						
							|  |  |  |             region.locations.append(location) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if exits: | 
					
						
							|  |  |  |         for _exit in exits: | 
					
						
							|  |  |  |             region.exits.append(Entrance(player, _exit, region)) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return region | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ArchipIDLELocation(Location): | 
					
						
							|  |  |  |     game: str = "ArchipIDLE" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def __init__(self, player: int, name: str, address=None, parent=None): | 
					
						
							|  |  |  |         super(ArchipIDLELocation, self).__init__(player, name, address, parent) |