Skip to content

Commit

Permalink
Complete rename
Browse files Browse the repository at this point in the history
  • Loading branch information
quellen-sol committed Oct 4, 2024
1 parent 33da4f3 commit b0a70fa
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 57 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
- name: Build Linux Binary and Zip
run: |
cargo build --release --target ${{ env.LINUX_GNU_TARGET }}
zip -j ap-bot-${{ env.LINUX_GNU_TARGET }}-${{ github.ref_name }}.zip ./target/${{ env.LINUX_GNU_TARGET }}/release/ap-bot
zip -j ArchipelaPal-${{ env.LINUX_GNU_TARGET }}-${{ github.ref_name }}.zip ./target/${{ env.LINUX_GNU_TARGET }}/release/ArchipelaPal
- name: Build Windows Binary and Zip
run: |
cargo build --release --target ${{ env.WINDOWS_GNU_TARGET }}
zip -j ap-bot-${{ env.WINDOWS_GNU_TARGET }}-${{ github.ref_name }}.zip ./target/${{ env.WINDOWS_GNU_TARGET }}/release/ap-bot.exe
zip -j ArchipelaPal-${{ env.WINDOWS_GNU_TARGET }}-${{ github.ref_name }}.zip ./target/${{ env.WINDOWS_GNU_TARGET }}/release/ArchipelaPal.exe
- name: Create Draft GitHub Release
uses: actions/create-release@v1
Expand All @@ -49,7 +49,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: APBot Release ${{ github.ref }}
release_name: ArchipelaPal Release ${{ github.ref }}
draft: true
prerelease: false

Expand All @@ -59,8 +59,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ap-bot-${{ env.LINUX_GNU_TARGET }}-${{ github.ref_name }}.zip
asset_name: ap-bot-${{ env.LINUX_GNU_TARGET }}-${{ github.ref_name }}.zip
asset_path: ./ArchipelaPal-${{ env.LINUX_GNU_TARGET }}-${{ github.ref_name }}.zip
asset_name: ArchipelaPal-${{ env.LINUX_GNU_TARGET }}-${{ github.ref_name }}.zip
asset_content_type: application/zip

- name: Upload Windows Asset
Expand All @@ -69,8 +69,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ap-bot-${{ env.WINDOWS_GNU_TARGET }}-${{ github.ref_name }}.zip
asset_name: ap-bot-${{ env.WINDOWS_GNU_TARGET }}-${{ github.ref_name }}.zip
asset_path: ./ArchipelaPal-${{ env.WINDOWS_GNU_TARGET }}-${{ github.ref_name }}.zip
asset_name: ArchipelaPal-${{ env.WINDOWS_GNU_TARGET }}-${{ github.ref_name }}.zip
asset_content_type: application/zip

- name: Upload APWorld
Expand All @@ -79,8 +79,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./world/apbot.apworld
asset_name: apbot.apworld
asset_path: ./world/archipelapal.apworld
asset_name: archipelapal.apworld
asset_content_type: application/zip

- name: Upload Example YAML
Expand Down
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions EXAMPLE.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: ExampleUser
game: APBot
game: ArchipelaPal
description: This is an example YAML that genrates between 100-200 chests with 20 goal items, and therefore 80-180 junk items

APBot:
ArchipelaPal:
progression_balancing: '50'
accessibility: items

Expand Down
2 changes: 1 addition & 1 deletion crates/ap-bot-main/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ap-bot"
name = "archipelapal"
version = "0.1.0"
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion crates/ap-bot-main/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct Args {
skip_start_confirmation: bool,
}

pub const GAME_NAME: &str = "APBot";
pub const GAME_NAME: &str = "ArchipelaPal";
pub const ITEM_HANDLING: i32 = 0b111;

#[tokio::main]
Expand Down
2 changes: 1 addition & 1 deletion scripts/make-and-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ START_DIR=$(pwd)

cd ../world
./make_apworld.sh
mv apbot.apworld ~/Archipelago/lib/worlds/
mv archipelapal.apworld ~/Archipelago/lib/worlds/
cd ~/Archipelago/output

# Delete ALL files in this directory, except for .zip files
Expand Down
2 changes: 0 additions & 2 deletions world/apbot/Errors.py

This file was deleted.

2 changes: 2 additions & 0 deletions world/archipelapal/Errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class ArchipelaPalError(Exception):
pass
6 changes: 3 additions & 3 deletions world/apbot/Items.py → world/archipelapal/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Junk Item
JUNK_CODE_OFFSET = 0x000000
JUNK_ITEM_NAME = "APBot Junk"
JUNK_ITEM_NAME = "ArchipelaPal Junk"
JUNK_ITEM_CODE = JUNK_CODE_OFFSET + 1

# Goal Item
Expand All @@ -17,8 +17,8 @@
SPEED_BOOST_NAME = "Speed Boost"
SPEED_BOOST_CODE = GAME_AFFECTOR_OFFSET + 1

class APBotItem(Item):
game = "APBot"
class ArchipelaPalItem(Item):
game = "ArchipelaPal"

item_names_table = {}

Expand Down
4 changes: 2 additions & 2 deletions world/apbot/Locations.py → world/archipelapal/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Chest ID offset
CHEST_ITEM_OFFSET = 0x030000

class APBotLocation(Location):
game = "APBot"
class ArchipelaPalLocation(Location):
game = "ArchipelaPal"

loc_table = {}

Expand Down
2 changes: 1 addition & 1 deletion world/apbot/Options.py → world/archipelapal/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class PctSpeedBoosts(Range):


@dataclass
class APBotOptions(PerGameCommonOptions):
class ArchipelaPalOptions(PerGameCommonOptions):
num_regions: NumRegions
min_chests_per_region: MinChestsPerRegion
max_chests_per_region: MaxChestsPerRegion
Expand Down
42 changes: 21 additions & 21 deletions world/apbot/__init__.py → world/archipelapal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
from BaseClasses import Region, ItemClassification
from worlds.AutoWorld import World, WebWorld
from .Errors import APBotError
from .Items import APBotItem, item_names_table, JUNK_ITEM_CODE, JUNK_ITEM_NAME, GOAL_ITEM_OFFSET, GOAL_ITEM_NAME, KEY_ITEM_OFFSET, SPEED_BOOST_NAME, SPEED_BOOST_CODE
from .Locations import APBotLocation, loc_table, CHEST_ITEM_OFFSET
from .Options import APBotOptions
from .Errors import ArchipelaPalError
from .Items import ArchipelaPalItem, item_names_table, JUNK_ITEM_CODE, JUNK_ITEM_NAME, GOAL_ITEM_OFFSET, GOAL_ITEM_NAME, KEY_ITEM_OFFSET, SPEED_BOOST_NAME, SPEED_BOOST_CODE
from .Locations import ArchipelaPalLocation, loc_table, CHEST_ITEM_OFFSET
from .Options import ArchipelaPalOptions
from .utils import *

class APBotWeb(WebWorld):
class ArchipelaPalWeb(WebWorld):
tutorials = []
theme = "ice"

class APBot(World):
class ArchipelaPal(World):
"""
An automatic world-playing bot for Archipelago Randomizer
"""

game = "APBot"
options_dataclass = APBotOptions
options: APBotOptions
web = APBotWeb()
game = "ArchipelaPal"
options_dataclass = ArchipelaPalOptions
options: ArchipelaPalOptions
web = ArchipelaPalWeb()

item_name_to_id = item_names_table
location_name_to_id = loc_table
Expand Down Expand Up @@ -47,13 +47,13 @@ def generate_early(self) -> None:
min_expected_chests = num_regions * min_chests_per_region + 1 # +1 for the starting chest

if min_chests_per_region > max_chests_per_region:
raise APBotError(f"min_chests_per_region ({min_chests_per_region}) must be less than or equal to max_chests_per_region ({max_chests_per_region})")
raise ArchipelaPalError(f"min_chests_per_region ({min_chests_per_region}) must be less than or equal to max_chests_per_region ({max_chests_per_region})")

if min_time > max_time:
raise APBotError(f"min_time_between_checks ({min_time}) must be less than or equal to max_time_between_checks ({max_time})")
raise ArchipelaPalError(f"min_time_between_checks ({min_time}) must be less than or equal to max_time_between_checks ({max_time})")

if num_goal_items > min_expected_chests:
raise APBotError(f"num_goal_items ({num_goal_items}) must be less than or equal to the minimum expected number of chests ({min_expected_chests})")
raise ArchipelaPalError(f"num_goal_items ({num_goal_items}) must be less than or equal to the minimum expected number of chests ({min_expected_chests})")

itempool = []

Expand All @@ -69,7 +69,7 @@ def generate_early(self) -> None:
chest_name = f"Hub Chest {real_chest}"
chest_code = CHEST_ITEM_OFFSET + real_chest

location = APBotLocation(self.player, chest_name, chest_code, hub)
location = ArchipelaPalLocation(self.player, chest_name, chest_code, hub)
hub.locations.append(location)
self.chests_per_region_result.append(num_sphere_0_chests.value)

Expand All @@ -84,7 +84,7 @@ def generate_early(self) -> None:
# Create Key for this region
key_name = f"Key {region_display_num}"
key_code = KEY_ITEM_OFFSET + region_display_num
key_item = APBotItem(key_name, ItemClassification.progression, key_code, self.player)
key_item = ArchipelaPalItem(key_name, ItemClassification.progression, key_code, self.player)
itempool.append(key_item)
self.item_table[key_name] = {
"classification": ItemClassification.progression,
Expand All @@ -101,7 +101,7 @@ def generate_early(self) -> None:
chest_name = f"Chest {region_display_num}-{real_chest}"
chest_code = CHEST_ITEM_OFFSET + (region_display_num << 8) + real_chest

location = APBotLocation(self.player, chest_name, chest_code, region_obj)
location = ArchipelaPalLocation(self.player, chest_name, chest_code, region_obj)
region_obj.locations.append(location)

self.multiworld.regions.append(region_obj)
Expand All @@ -116,7 +116,7 @@ def rule(state, key_name=key_name):
hub.connect(region_obj, None, rule)

# Add Goal items
goal_item = APBotItem(GOAL_ITEM_NAME, ItemClassification.progression, GOAL_ITEM_OFFSET, self.player)
goal_item = ArchipelaPalItem(GOAL_ITEM_NAME, ItemClassification.progression, GOAL_ITEM_OFFSET, self.player)
self.item_table[GOAL_ITEM_NAME] = {
"classification": ItemClassification.progression,
"code": GOAL_ITEM_OFFSET,
Expand All @@ -138,7 +138,7 @@ def rule(state, key_name=key_name):
"classification": ItemClassification.useful,
"code": SPEED_BOOST_CODE,
}
speed_boost_item = APBotItem(SPEED_BOOST_NAME, ItemClassification.useful, SPEED_BOOST_CODE, self.player)
speed_boost_item = ArchipelaPalItem(SPEED_BOOST_NAME, ItemClassification.useful, SPEED_BOOST_CODE, self.player)
for speed_boost_num in range(num_speed_boosts):
itempool.append(speed_boost_item)
total_junk_items -= num_speed_boosts
Expand All @@ -148,7 +148,7 @@ def rule(state, key_name=key_name):
"classification": ItemClassification.filler,
"code": JUNK_ITEM_CODE,
}
junk_item = APBotItem(JUNK_ITEM_NAME, ItemClassification.filler, JUNK_ITEM_CODE, self.player)
junk_item = ArchipelaPalItem(JUNK_ITEM_NAME, ItemClassification.filler, JUNK_ITEM_CODE, self.player)
for junk_num in range(total_junk_items - num_goal_items):
itempool.append(junk_item)

Expand Down Expand Up @@ -176,9 +176,9 @@ def create_regions(self) -> None:
def create_items(self) -> None:
pass

def create_item(self, name: str) -> APBotItem:
def create_item(self, name: str) -> ArchipelaPalItem:
item = self.item_table[name]
return APBotItem(name, item.classification, item.code, self.player)
return ArchipelaPalItem(name, item.classification, item.code, self.player)

def fill_slot_data(self):
min_wait_time = self.options.min_time_between_checks.value
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion world/make_apworld.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
zip -r apbot.apworld apbot
zip -r archipelapal.apworld archipelapal

0 comments on commit b0a70fa

Please sign in to comment.