Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shivers: Add events and fix require puzzle hints logic #4018

Merged
merged 28 commits into from
Dec 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9da0e95
Adds some events, renames things, fails for many players.
korydondzila Jul 22, 2024
6833fed
Adds entrance rules for requires hints.
korydondzila Jul 23, 2024
feb4608
Cleanup and add goal item.
korydondzila Jul 25, 2024
9d01dca
Cleanup.
korydondzila Jul 25, 2024
8a2f53e
Add additional rule.
korydondzila Jul 25, 2024
5b04610
Event and regions additions.
korydondzila Jul 28, 2024
a0e518a
Merge branch 'refs/heads/main' into add-events
korydondzila Aug 6, 2024
1e3ed5f
Updates from merge.
korydondzila Aug 6, 2024
865640f
Adds collect behavior option.
korydondzila Aug 6, 2024
cb7ea1b
Fix missing generator location.
korydondzila Aug 6, 2024
1c56c62
Fix whitespace and optimize imports.
korydondzila Aug 6, 2024
b72c9dc
Merge branch 'main' into add-events-and-collect-behavior
korydondzila Aug 17, 2024
9c49e4b
Switch location order back.
korydondzila Aug 30, 2024
37157de
Merge branch 'main' into add-events
korydondzila Aug 31, 2024
82f3781
Merge branch 'main' into add-events
korydondzila Sep 30, 2024
e0279cf
Add name replacement for storage.
korydondzila Sep 30, 2024
c5a6cd0
Fix test failure.
korydondzila Sep 30, 2024
8cdecd1
Improve puzzle hints required.
korydondzila Oct 1, 2024
878e3e0
Add missing locations and cleanup indirect conditions.
korydondzila Oct 1, 2024
d2e3099
Fix naming.
korydondzila Oct 1, 2024
574a02e
PR feedback.
korydondzila Oct 2, 2024
bfa7788
Missed comment.
korydondzila Oct 2, 2024
59a36f2
Cleanup imports, use strings for option equivalence, and update optio…
korydondzila Oct 3, 2024
d9d78d3
Fix rule.
korydondzila Oct 4, 2024
872dbe5
Create rolling buffer goal items and remove goal items and location f…
korydondzila Oct 28, 2024
53a8fab
Cleanup.
korydondzila Oct 28, 2024
003b679
Removes dateutil.
korydondzila Nov 13, 2024
75b1041
Fixes Subterranean World information plaque.
korydondzila Dec 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removes dateutil.
korydondzila committed Nov 13, 2024
commit 003b679214b48192ea5588bf687e3638e6714740
12 changes: 9 additions & 3 deletions worlds/shivers/Constants.py
Original file line number Diff line number Diff line change
@@ -3,17 +3,23 @@
import pkgutil
from datetime import datetime

from dateutil.relativedelta import relativedelta


def load_data_file(*args) -> dict:
fname = os.path.join("data", *args)
return json.loads(pkgutil.get_data(__name__, fname).decode())


def relative_years_from_today(dt2: datetime) -> int:
today = datetime.now()
years = today.year - dt2.year
if today.month < dt2.month or (today.month == dt2.month and today.day < dt2.day):
years -= 1
return years


location_id_offset: int = 27000
location_info = load_data_file("locations.json")
location_name_to_id = {name: location_id_offset + index for index, name in enumerate(location_info["all_locations"])}
exclusion_info = load_data_file("excluded_locations.json")
region_info = load_data_file("regions.json")
years_since_sep_30_1980 = relativedelta(datetime.now(), datetime.fromisoformat("1980-09-30")).years
years_since_sep_30_1980 = relative_years_from_today(datetime.fromisoformat("1980-09-30"))
1 change: 0 additions & 1 deletion worlds/shivers/requirements.txt

This file was deleted.