File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
crates/bevy_mod_scripting_core/src Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
//! Systems which are used to extract the various resources and components used by BMS.
2
2
//!
3
3
//! These are designed to be used to pipe inputs into other systems which require them, while handling any configuration erorrs nicely.
4
-
4
+ #! [ allow ( deprecated ) ]
5
5
use std:: ops:: { Deref , DerefMut } ;
6
6
7
7
use bevy:: ecs:: {
@@ -119,11 +119,13 @@ unsafe impl<T: Resource + Default> SystemParam for ResScope<'_, T> {
119
119
/// - It is only safe to use when other system parameters do not create aliasing references inside their `get_param` calls
120
120
#[ derive( SystemParam ) ]
121
121
#[ doc( hidden) ]
122
+ #[ deprecated( note = "This type is unsafe to use in systems" ) ]
122
123
pub struct EventReaderScope < ' s , T : Event > {
123
124
events : ResScope < ' s , Events < T > > ,
124
125
reader : Local < ' s , EventCursor < T > > ,
125
126
}
126
127
128
+ #[ allow( deprecated) ]
127
129
impl < T : Event > EventReaderScope < ' _ , T > {
128
130
/// Read all events that happened since the last read
129
131
pub fn read ( & mut self ) -> EventIterator < ' _ , T > {
Original file line number Diff line number Diff line change 1
1
//! Contains the logic for handling script callback events
2
-
2
+ # [ allow ( deprecated ) ]
3
3
use crate :: {
4
4
bindings:: {
5
5
pretty_print:: DisplayWithWorld , script_value:: ScriptValue , ThreadWorldContainer ,
@@ -106,6 +106,7 @@ macro_rules! push_err_and_continue {
106
106
/// Passes events with the specified label to the script callback with the same name and runs the callback.
107
107
///
108
108
/// If any of the resources required for the handler are missing, the system will log this issue and do nothing.
109
+ #[ allow( deprecated) ]
109
110
pub fn event_handler < L : IntoCallbackLabel , P : IntoScriptPluginParams > (
110
111
world : & mut World ,
111
112
state : & mut SystemState < (
@@ -124,6 +125,7 @@ pub fn event_handler<L: IntoCallbackLabel, P: IntoScriptPluginParams>(
124
125
}
125
126
126
127
#[ profiling:: function]
128
+ #[ allow( deprecated) ]
127
129
fn event_handler_inner < L : IntoCallbackLabel , P : IntoScriptPluginParams > (
128
130
mut entity_query_state : Local < QueryState < ( Entity , Ref < ScriptComponent > ) > > ,
129
131
mut script_events : EventReaderScope < ScriptCallbackEvent > ,
You can’t perform that action at this time.
0 commit comments