Skip to content

Commit 6f424cc

Browse files
committed
2 parents 6e3b020 + 8f663e9 commit 6f424cc

File tree

24 files changed

+450
-649
lines changed

24 files changed

+450
-649
lines changed

.github/workflows/pr-titles.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
chore
2727
test
2828
docs
29+
refactor
30+
2931
scopes: |
3032
ladfile
3133
ladfile_builder

assets/tests/api_availability/api_available_on_callback.lua

Lines changed: 0 additions & 5 deletions
This file was deleted.

assets/tests/api_availability/api_available_on_callback.rhai

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
assert(world ~= nil, "World was not found")
2+
assert(world.get_type_by_name("TestComponent") ~= nil, "Could not find TestComponent type")
3+
local global_invocation = Entity.from_raw(1)
4+
5+
function on_test()
6+
assert(world ~= nil, "World was not found")
7+
assert(world.get_type_by_name("TestComponent") ~= nil, "Could not find TestComponent type")
8+
Entity.from_raw(1)
9+
10+
-- assert global_invocation happened
11+
assert(global_invocation ~= nil, "Global invocation did not happen")
12+
13+
return true
14+
end
15+
16+
function on_test_post_update()
17+
return true
18+
end
19+
20+
function on_test_last()
21+
return true
22+
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
assert(type_of(world) != "()", "World was not found");
2+
assert(type_of(world.get_type_by_name.call("TestComponent")) != "()", "Could not find TestComponent type");
3+
let global_invocation = Entity.from_raw.call(1);
4+
5+
fn on_test(){
6+
assert(type_of(world) != "()", "World was not found");
7+
assert(type_of(world.get_type_by_name.call("TestComponent")) != "()", "Could not find TestComponent type");
8+
Entity.from_raw.call(1);
9+
10+
// assert global_invocation happened
11+
assert(type_of(global_invocation) != "()", "Global invocation did not happen");
12+
13+
return true;
14+
}
15+
16+
fn on_test_post_update(){
17+
return true;
18+
}
19+
20+
fn on_test_last(){
21+
return true;
22+
}

assets/tests/api_availability/api_available_on_script_load.lua

Lines changed: 0 additions & 3 deletions
This file was deleted.

assets/tests/api_availability/api_available_on_script_load.rhai

Lines changed: 0 additions & 3 deletions
This file was deleted.

assets/tests/pop/vec.rhai

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ let res = world.get_resource.call(res_type);
33

44
let popped = res.vec_usize.pop.call();
55

6-
assert(popped == 5, "Pop did not work");
6+
assert(popped == 5, "Pop did not work, got " + popped);

crates/bevy_mod_scripting_core/src/bindings/schedule.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ impl ScriptSystemBuilder {
334334
bevy::log::debug_once!("First call to script system {}", name);
335335
match handler_ctxt.call_dynamic_label(
336336
&name,
337-
self.script_id.clone(),
337+
&self.script_id,
338338
Entity::from_raw(0),
339339
vec![],
340340
guard.clone(),

0 commit comments

Comments
 (0)