engage/generated/app/struct_object/
baseitem.rs1#[cfg(feature = "app-struct_object-baseitem-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::struct_object::basepiece::{BasePiece, IBasePiece},
10 system::object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/struct_object/baseitem/BaseItem.md"))]
14 #[::unity::class(namespace = "App.StructObject", name = "BaseItem")]
15 #[parent(crate::app::struct_object::basepiece::BasePiece)]
16 pub struct BaseItem {
17 #[offset(16)]
18 #[rename(name = "_DictionaryKey")]
19 pub dictionary_key_field: ::unity::Il2CppString,
20 }
21}
22
23#[cfg(feature = "app-struct_object-baseitem-types")]
24pub use __types::*;
25
26#[cfg(feature = "app-struct_object-baseitem")]
27pub trait IBaseItemMethods: IBaseItem {
28 #[doc = "`get_DictionaryKey()` overload"]
29 fn get_dictionary_key(self) -> ::unity::Il2CppString {
30 unsafe {
31 let __receiver = <BaseItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
32 ::unity::il2cpp_call!((::unity::module_base()+0x2452de0usize)as*mut u8, ::unity::Il2CppString;
33(BaseItem)__receiver)
34 }
35 }
36 #[doc = "`set_DictionaryKey(::unity::Il2CppString)` overload"]
37 fn set_dictionary_key(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
38 unsafe {
39 let __receiver = <BaseItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
40 ::unity::il2cpp_call!((::unity::module_base()+0x2452df0usize)as*mut u8,();
41(BaseItem)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
42 }
43 }
44 #[doc = "`GetDebugName()` overload"]
45 fn get_debug_name(self) -> ::unity::Il2CppString {
46 unsafe {
47 let __receiver = <BaseItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
48 {
49 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
50 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
51 panic!(
52 "unity: virtual slot {}
53 out of range (vtable len {}
54) on the runtime class behind {}
55 (method `{}
56`)",
57 6usize,
58 __vt.len(),
59 <BaseItem as ::unity::ClassIdentity>::NAME,
60 "GetDebugName",
61 )
62 });
63 let __inner: extern "C" fn(BaseItem, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
64 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
65 __inner(__receiver, __mi)
66 }
67 }
68 }
69 #[doc = "`AddPiece(crate::system::object::Object)` overload"]
70 fn add_piece(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> () {
71 unsafe {
72 let __receiver = <BaseItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
73 {
74 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
75 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
76 panic!(
77 "unity: virtual slot {}
78 out of range (vtable len {}
79) on the runtime class behind {}
80 (method `{}
81`)",
82 7usize,
83 __vt.len(),
84 <BaseItem as ::unity::ClassIdentity>::NAME,
85 "AddPiece",
86 )
87 });
88 let __inner: extern "C" fn(BaseItem, crate::system::object::Object, ::unity::OptionalMethod) -> () =
89 ::core::mem::transmute(__vi.method_ptr);
90 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
91 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
92 }
93 }
94 }
95 #[doc = "`.ctor()` overload"]
96 fn ctor(self) -> () {
97 unsafe {
98 let __receiver = <BaseItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
99 ::unity::il2cpp_call!((::unity::module_base()+0x2452e60usize)as*mut u8,();
100(BaseItem)__receiver)
101 }
102 }
103}
104
105#[cfg(feature = "app-struct_object-baseitem")]
106impl<__T: IBaseItem> IBaseItemMethods for __T {}
107
108#[cfg(feature = "app-struct_object-baseitem")]
109impl BaseItem {
110 pub fn get_dictionary_key_method_info() -> &'static ::unity::il2cpp::MethodInfo {
111 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
112 }
113
114 pub fn set_dictionary_key_method_info() -> &'static ::unity::il2cpp::MethodInfo {
115 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
116 }
117
118 pub fn get_debug_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
119 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
120 }
121
122 pub fn add_piece_method_info() -> &'static ::unity::il2cpp::MethodInfo {
123 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
124 }
125
126 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
127 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
128 }
129}
130
131#[cfg(feature = "app-struct_object-baseitem")]
132impl BaseItem {
133 #[doc = "Direct (non-virtual) call to `BaseItem`'s own `GetDebugName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
134 pub unsafe fn get_debug_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
135 let __mi = Self::get_debug_name_method_info();
136 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
137 __inner(this.into(), ::core::option::Option::None)
138 }
139
140 #[doc = "Direct (non-virtual) call to `BaseItem`'s own `AddPiece`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
141 pub unsafe fn add_piece(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> () {
142 let __mi = Self::add_piece_method_info();
143 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> () =
144 ::core::mem::transmute(__mi.method_ptr);
145 __inner(this.into(), obj, ::core::option::Option::None)
146 }
147}
148
149#[cfg(feature = "app-struct_object-baseitem")]
150impl BaseItem {
151 #[doc = "`.ctor()` — no args"]
152 pub fn new() -> Self {
153 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
154 panic!(
155 "{}
156::{}
157 failed to instantiate",
158 ::core::stringify!(BaseItem),
159 ::core::stringify!(new),
160 )
161 });
162 <Self as IBaseItemMethods>::ctor(this);
163 this
164 }
165}
166
167#[cfg(feature = "app-struct_object-baseitem")]
168#[doc(hidden)]
169pub mod prelude {
170 pub use super::{BaseItem, IBaseItem, IBaseItemMethods};
171 #[cfg(feature = "app-struct_object-basepiece")]
172 pub use crate::app::struct_object::basepiece::IBasePieceMethods;
173 #[cfg(feature = "system-object")]
174 pub use crate::system::object::IObjectMethods;
175 pub use crate::{app::struct_object::basepiece::IBasePiece, system::object::IObject};
176}