Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions .github/actions/core-ref/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Paired Core revision
description: Select a same-name Core branch when present, otherwise use the required revision.
inputs:
fallback:
description: Core revision required by this collection.
required: true
outputs:
ref:
description: Exact paired commit or required Core revision.
value: ${{ steps.select.outputs.ref }}
runs:
using: composite
steps:
- id: select
shell: bash
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
FALLBACK: ${{ inputs.fallback }}
run: |
if [ "$BRANCH" = main ]; then
echo "ref=$FALLBACK" >> "$GITHUB_OUTPUT"
elif paired=$(git ls-remote --exit-code --heads https://github.com/LyraCoreProject/LyraCore "refs/heads/$BRANCH"); then
echo "ref=${paired%%[[:space:]]*}" >> "$GITHUB_OUTPUT"
else
status=$?
if [ "$status" -ne 2 ]; then
exit "$status"
fi
echo "ref=$FALLBACK" >> "$GITHUB_OUTPUT"
fi
3 changes: 3 additions & 0 deletions .github/check-core-tip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ for package_dir in "${package_dirs[@]}"; do
installed_links+=("$link")
done

# Check the linked Packages before any caller-selected verification command.
cargo +1.93.0 test --manifest-path "$core_root/Cargo.toml" -p lyracore-module --test package_api_lint

# The default check: every collection Package compiles into the module. A caller that needs the
# same linked tree for something else (e.g. the datascripts job's typegen/typecheck chain) passes
# its own command instead — the link/displace/cleanup dance above is identical either way.
Expand Down
42 changes: 36 additions & 6 deletions .github/workflows/core-tip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@ jobs:
path: collection
persist-credentials: false

- name: Select the paired Core revision
id: core-ref
uses: ./collection/.github/actions/core-ref
with:
fallback: 6e73c274d7b084c7c0b1842d4a7ae82316952b4a
- name: Check out the required Core revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LyraCoreProject/LyraCore
ref: f91066df4aef5c8d753dbe1d2203c6a669f485fa
ref: ${{ steps.core-ref.outputs.ref }}
path: lyracore
persist-credentials: false

Expand Down Expand Up @@ -132,11 +137,16 @@ jobs:
path: collection
persist-credentials: false

- name: Select the paired Core revision
id: core-ref
uses: ./collection/.github/actions/core-ref
with:
fallback: 6e73c274d7b084c7c0b1842d4a7ae82316952b4a
- name: Check out the required Core revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LyraCoreProject/LyraCore
ref: f91066df4aef5c8d753dbe1d2203c6a669f485fa
ref: ${{ steps.core-ref.outputs.ref }}
path: lyracore
persist-credentials: false

Expand Down Expand Up @@ -198,11 +208,16 @@ jobs:
with:
path: collection
persist-credentials: false
- name: Select the paired Core revision
id: core-ref
uses: ./collection/.github/actions/core-ref
with:
fallback: 6e73c274d7b084c7c0b1842d4a7ae82316952b4a
- name: Check out Core with bounded population checks
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LyraCoreProject/LyraCore
ref: f91066df4aef5c8d753dbe1d2203c6a669f485fa
ref: ${{ steps.core-ref.outputs.ref }}
path: lyracore
persist-credentials: false
- name: Install the Rust toolchain and Wasm target
Expand Down Expand Up @@ -749,11 +764,16 @@ jobs:
with:
path: collection
persist-credentials: false
- name: Select the paired Core revision
id: core-ref
uses: ./collection/.github/actions/core-ref
with:
fallback: 6e73c274d7b084c7c0b1842d4a7ae82316952b4a
- name: Check out Core with the additive Transfer migration check
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LyraCoreProject/LyraCore
ref: f91066df4aef5c8d753dbe1d2203c6a669f485fa
ref: ${{ steps.core-ref.outputs.ref }}
path: lyracore
persist-credentials: false
- name: Install the Rust toolchain and Wasm target
Expand Down Expand Up @@ -971,11 +991,16 @@ jobs:
with:
path: collection
persist-credentials: false
- name: Select the paired Core revision
id: core-ref
uses: ./collection/.github/actions/core-ref
with:
fallback: 6e73c274d7b084c7c0b1842d4a7ae82316952b4a
- name: Check out Core with the movement Gate
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LyraCoreProject/LyraCore
ref: f91066df4aef5c8d753dbe1d2203c6a669f485fa
ref: ${{ steps.core-ref.outputs.ref }}
path: lyracore
persist-credentials: false
- name: Install the Rust toolchain and Wasm target
Expand Down Expand Up @@ -1170,11 +1195,16 @@ jobs:
ref: 50e2cd10870d2cfb4a36018bbbd559f9d07c2062
path: comparison-collection
persist-credentials: false
- name: Select the paired Core revision
id: core-ref
uses: ./collection/.github/actions/core-ref
with:
fallback: 6e73c274d7b084c7c0b1842d4a7ae82316952b4a
- name: Check out Core with recorded recovery deadlines
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LyraCoreProject/LyraCore
ref: f91066df4aef5c8d753dbe1d2203c6a669f485fa
ref: ${{ steps.core-ref.outputs.ref }}
path: lyracore
persist-credentials: false
- name: Install the Rust toolchain and Wasm target
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/playerbots-capacity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,16 @@ jobs:
ref: e134b135099a7d358a0f0fab58654c200602b9b1
path: baseline
persist-credentials: false
- name: Select the paired Core revision
id: core-ref
uses: ./collection/.github/actions/core-ref
with:
fallback: 6e73c274d7b084c7c0b1842d4a7ae82316952b4a
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LyraCoreProject/LyraCore
# Core supplies the shared private integration fixtures.
ref: f91066df4aef5c8d753dbe1d2203c6a669f485fa
ref: ${{ steps.core-ref.outputs.ref }}
path: lyracore
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/playerbots-class-behavior.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@ jobs:
with:
path: collection
persist-credentials: false
- name: Select the paired Core revision
id: core-ref
uses: ./collection/.github/actions/core-ref
with:
fallback: 6e73c274d7b084c7c0b1842d4a7ae82316952b4a
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LyraCoreProject/LyraCore
ref: f91066df4aef5c8d753dbe1d2203c6a669f485fa
ref: ${{ steps.core-ref.outputs.ref }}
path: lyracore
persist-credentials: false
- name: Install pinned Rust and SpacetimeDB
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/playerbots-target-claims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ jobs:
ref: 0cae690301552430d713a582b0036e7096c215d2
path: baseline-core
persist-credentials: false
- name: Select the paired Core revision
id: core-ref
uses: ./collection/.github/actions/core-ref
with:
fallback: 6e73c274d7b084c7c0b1842d4a7ae82316952b4a
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LyraCoreProject/LyraCore
ref: f91066df4aef5c8d753dbe1d2203c6a669f485fa
ref: ${{ steps.core-ref.outputs.ref }}
path: lyracore
persist-credentials: false
- name: Install pinned Rust and SpacetimeDB
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
This repository is LyraCore's Official Package Collection. Each visible top-level directory is one
independently installable Package. There is no separate registry or index file.

The typed Runtime Script examples require Package API version 2. Each Package API version has a
tag, such as `api-v2`. After the compatibility checks pass on
`main`, CI moves the tag for the checked Core revision's Package API version to that collection
commit. Tags for older API versions stay at their last compatible commit.
This collection requires Package API version 3. Rust Packages use `actor`, `hooks`, `package`,
`tables`, and `script_binding`. Core checkouts on version 2 can use `api-v2`. Each Package API version has
a tag, such as `api-v3`. After the compatibility checks pass on `main`, CI moves the tag for the
checked Core revision's Package API version to that collection commit. Tags for older API versions stay at their last compatible commit.

`lyracore packages add <name>` and `lyracore packages update` select the tag from the version in
the checkout's `docs/package-api.md`. A missing tag refuses the operation. Each installed Package's
Expand Down
16 changes: 9 additions & 7 deletions dungeons/src/deadmines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

use spacetimedb::ReducerContext;

use crate::encounter::{self, ENCOUNTER_DONE};
use crate::{game_gameobject, game_world_entity};
use crate::package::encounter::{self, ENCOUNTER_DONE};
use crate::tables::{game_gameobject, game_world_entity};

pub(crate) const MAP_ID: u32 = 36;

Expand Down Expand Up @@ -79,10 +79,10 @@ crate::game_hook!(on_aggro, fn smite_calls_to_arms(ctx, payload) {
if creature.entry != MR_SMITE || creature.instance_id == 0 {
return;
}
let _ = crate::chat::apply_send_chat(
let _ = crate::actor::send_chat(
ctx,
creature,
crate::chat::CHAT_YELL,
lyracore_shared::chat::broadcast_chat::YELL,
0,
SMITE_AGGRO_YELL.to_string(),
);
Expand Down Expand Up @@ -130,10 +130,10 @@ crate::game_hook!(on_hp_threshold, fn smite_changes_weapons(ctx, payload) {
_ => return,
};
if let Some(smite) = ctx.db.game_world_entity().guid().find(payload.creature_guid) {
let _ = crate::chat::apply_send_chat(
let _ = crate::actor::send_chat(
ctx,
smite,
crate::chat::CHAT_YELL,
lyracore_shared::chat::broadcast_chat::YELL,
0,
yell.to_string(),
);
Expand Down Expand Up @@ -192,7 +192,9 @@ fn open_door_logged(ctx: &ReducerContext, go_entry: u32, instance_id: u64) {
}

fn mark_done(ctx: &ReducerContext, instance_id: u64, encounter_id: u32) {
if let Err(error) = encounter::set_encounter_state(ctx, instance_id, encounter_id, ENCOUNTER_DONE) {
if let Err(error) =
encounter::set_encounter_state(ctx, instance_id, encounter_id, ENCOUNTER_DONE)
{
spacetimedb::log::warn!("deadmines: encounter {encounter_id} state write failed: {error}");
}
}
Loading
Loading