Skip to content

Commit 1d97f37

Browse files
committed
Add the ability to copy a location into an event
1 parent 8ac78de commit 1d97f37

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

schemas/Manual.events.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
},
3535
"uniqueItems": true
3636
},
37+
"copy_location": {
38+
"description": "(Optional) Copies all information from the named location.",
39+
"type": "string"
40+
},
3741
"requires": {
3842
"description": "(Optional) A boolean logic string that describes the required items, counts, etc. needed to trigger this event.",
3943
"type": [ "string", "array" ],

src/Locations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
# location_id_to_name[None] = "__Manual Game Complete__"
6262
location_name_to_id = {name: id for id, name in location_id_to_name.items()}
6363

64+
for key, _ in enumerate(event_table):
65+
if "copy_location" in event_table[key]:
66+
event_table[key] = location_name_to_location[event_table[key]["copy_location"]] | event_table[key]
67+
6468
id = 0
6569
for key, event in enumerate(event_table):
6670
if "location_name" in event:

src/data/events.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
{
1010
"name": "Capcom event",
1111
"requires": "|@Left Side:all|"
12+
},
13+
{
14+
"name": "Stars_event",
15+
"copy_location": "Stars%"
1216
}
1317
]
1418
}

0 commit comments

Comments
 (0)