forked from yixuan-rs/yixuan-rs
809 lines
31 KiB
Rust
809 lines
31 KiB
Rust
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
|
|
// @generated
|
|
|
|
use core::mem;
|
|
use core::cmp::Ordering;
|
|
|
|
extern crate flatbuffers;
|
|
use self::flatbuffers::{EndianScalar, Follow};
|
|
|
|
// struct Property, aligned to 4
|
|
#[repr(transparent)]
|
|
#[derive(Clone, Copy, PartialEq)]
|
|
pub struct Property(pub [u8; 8]);
|
|
impl Default for Property {
|
|
fn default() -> Self {
|
|
Self([0; 8])
|
|
}
|
|
}
|
|
impl core::fmt::Debug for Property {
|
|
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
|
|
f.debug_struct("Property")
|
|
.field("property", &self.property())
|
|
.field("value", &self.value())
|
|
.finish()
|
|
}
|
|
}
|
|
|
|
impl flatbuffers::SimpleToVerifyInSlice for Property {}
|
|
impl<'a> flatbuffers::Follow<'a> for Property {
|
|
type Inner = &'a Property;
|
|
#[inline]
|
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
|
<&'a Property>::follow(buf, loc)
|
|
}
|
|
}
|
|
impl<'a> flatbuffers::Follow<'a> for &'a Property {
|
|
type Inner = &'a Property;
|
|
#[inline]
|
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
|
flatbuffers::follow_cast_ref::<Property>(buf, loc)
|
|
}
|
|
}
|
|
impl<'b> flatbuffers::Push for Property {
|
|
type Output = Property;
|
|
#[inline]
|
|
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
|
|
let src = ::core::slice::from_raw_parts(self as *const Property as *const u8, <Self as flatbuffers::Push>::size());
|
|
dst.copy_from_slice(src);
|
|
}
|
|
#[inline]
|
|
fn alignment() -> flatbuffers::PushAlignment {
|
|
flatbuffers::PushAlignment::new(4)
|
|
}
|
|
}
|
|
|
|
impl<'a> flatbuffers::Verifiable for Property {
|
|
#[inline]
|
|
fn run_verifier(
|
|
v: &mut flatbuffers::Verifier, pos: usize
|
|
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
|
use self::flatbuffers::Verifiable;
|
|
v.in_buffer::<Self>(pos)
|
|
}
|
|
}
|
|
|
|
impl<'a> Property {
|
|
#[allow(clippy::too_many_arguments)]
|
|
pub fn new(
|
|
property: u32,
|
|
value: i32,
|
|
) -> Self {
|
|
let mut s = Self([0; 8]);
|
|
s.set_property(property);
|
|
s.set_value(value);
|
|
s
|
|
}
|
|
|
|
pub fn property(&self) -> u32 {
|
|
let mut mem = core::mem::MaybeUninit::<<u32 as EndianScalar>::Scalar>::uninit();
|
|
// Safety:
|
|
// Created from a valid Table for this object
|
|
// Which contains a valid value in this slot
|
|
EndianScalar::from_little_endian(unsafe {
|
|
core::ptr::copy_nonoverlapping(
|
|
self.0[0..].as_ptr(),
|
|
mem.as_mut_ptr() as *mut u8,
|
|
core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
|
|
);
|
|
mem.assume_init()
|
|
})
|
|
}
|
|
|
|
pub fn set_property(&mut self, x: u32) {
|
|
let x_le = x.to_little_endian();
|
|
// Safety:
|
|
// Created from a valid Table for this object
|
|
// Which contains a valid value in this slot
|
|
unsafe {
|
|
core::ptr::copy_nonoverlapping(
|
|
&x_le as *const _ as *const u8,
|
|
self.0[0..].as_mut_ptr(),
|
|
core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
|
|
);
|
|
}
|
|
}
|
|
|
|
pub fn value(&self) -> i32 {
|
|
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
|
|
// Safety:
|
|
// Created from a valid Table for this object
|
|
// Which contains a valid value in this slot
|
|
EndianScalar::from_little_endian(unsafe {
|
|
core::ptr::copy_nonoverlapping(
|
|
self.0[4..].as_ptr(),
|
|
mem.as_mut_ptr() as *mut u8,
|
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
|
);
|
|
mem.assume_init()
|
|
})
|
|
}
|
|
|
|
pub fn set_value(&mut self, x: i32) {
|
|
let x_le = x.to_little_endian();
|
|
// Safety:
|
|
// Created from a valid Table for this object
|
|
// Which contains a valid value in this slot
|
|
unsafe {
|
|
core::ptr::copy_nonoverlapping(
|
|
&x_le as *const _ as *const u8,
|
|
self.0[4..].as_mut_ptr(),
|
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
|
);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
pub enum EquipmentSuitTemplateOffset {}
|
|
#[derive(Copy, Clone, PartialEq)]
|
|
|
|
pub struct EquipmentSuitTemplate<'a> {
|
|
pub _tab: flatbuffers::Table<'a>,
|
|
}
|
|
|
|
impl<'a> flatbuffers::Follow<'a> for EquipmentSuitTemplate<'a> {
|
|
type Inner = EquipmentSuitTemplate<'a>;
|
|
#[inline]
|
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
|
Self { _tab: flatbuffers::Table::new(buf, loc) }
|
|
}
|
|
}
|
|
|
|
impl<'a> EquipmentSuitTemplate<'a> {
|
|
pub const VT_ID: flatbuffers::VOffsetT = 4;
|
|
pub const VT_NAME: flatbuffers::VOffsetT = 6;
|
|
pub const VT_PRIMARY_CONDITION: flatbuffers::VOffsetT = 8;
|
|
pub const VT_UNK_3: flatbuffers::VOffsetT = 10;
|
|
pub const VT_PRIMARY_SUIT_ABILITY: flatbuffers::VOffsetT = 12;
|
|
pub const VT_PRIMARY_DESCRIPTION: flatbuffers::VOffsetT = 14;
|
|
pub const VT_SECONDARY_CONDITION: flatbuffers::VOffsetT = 16;
|
|
pub const VT_UNK_7: flatbuffers::VOffsetT = 18;
|
|
pub const VT_SECONDARY_SUIT_ABILITY: flatbuffers::VOffsetT = 20;
|
|
pub const VT_SECONDARY_DESCRIPTION: flatbuffers::VOffsetT = 22;
|
|
pub const VT_SUIT_ICON: flatbuffers::VOffsetT = 24;
|
|
pub const VT_SUIT_STORY: flatbuffers::VOffsetT = 26;
|
|
pub const VT_SUIT_FILTER_OPTION: flatbuffers::VOffsetT = 28;
|
|
pub const VT_SUIT_ITEM_ICON: flatbuffers::VOffsetT = 30;
|
|
pub const VT_UNK_14: flatbuffers::VOffsetT = 32;
|
|
pub const VT_ORDER: flatbuffers::VOffsetT = 34;
|
|
pub const VT_UNK_16: flatbuffers::VOffsetT = 36;
|
|
pub const VT_UNK_17: flatbuffers::VOffsetT = 38;
|
|
pub const VT_UNK_18: flatbuffers::VOffsetT = 40;
|
|
pub const VT_UNK_19: flatbuffers::VOffsetT = 42;
|
|
pub const VT_UNK_20: flatbuffers::VOffsetT = 44;
|
|
pub const VT_UNK_21: flatbuffers::VOffsetT = 46;
|
|
pub const VT_PRIMARY_SUIT_PROPERTYS: flatbuffers::VOffsetT = 48;
|
|
pub const VT_UNK_23: flatbuffers::VOffsetT = 50;
|
|
pub const VT_UNK_24: flatbuffers::VOffsetT = 52;
|
|
pub const VT_UNK_25: flatbuffers::VOffsetT = 54;
|
|
pub const VT_UNK_26: flatbuffers::VOffsetT = 56;
|
|
pub const VT_UNK_27: flatbuffers::VOffsetT = 58;
|
|
pub const VT_TAG: flatbuffers::VOffsetT = 60;
|
|
|
|
#[inline]
|
|
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
|
EquipmentSuitTemplate { _tab: table }
|
|
}
|
|
#[allow(unused_mut)]
|
|
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
|
|
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
|
|
args: &'args EquipmentSuitTemplateArgs<'args>
|
|
) -> flatbuffers::WIPOffset<EquipmentSuitTemplate<'bldr>> {
|
|
let mut builder = EquipmentSuitTemplateBuilder::new(_fbb);
|
|
if let Some(x) = args.tag { builder.add_tag(x); }
|
|
if let Some(x) = args.unk_27 { builder.add_unk_27(x); }
|
|
if let Some(x) = args.unk_26 { builder.add_unk_26(x); }
|
|
if let Some(x) = args.unk_25 { builder.add_unk_25(x); }
|
|
builder.add_unk_24(args.unk_24);
|
|
if let Some(x) = args.unk_23 { builder.add_unk_23(x); }
|
|
if let Some(x) = args.primary_suit_propertys { builder.add_primary_suit_propertys(x); }
|
|
builder.add_unk_21(args.unk_21);
|
|
builder.add_unk_20(args.unk_20);
|
|
builder.add_unk_19(args.unk_19);
|
|
builder.add_unk_18(args.unk_18);
|
|
builder.add_unk_17(args.unk_17);
|
|
builder.add_unk_16(args.unk_16);
|
|
builder.add_order(args.order);
|
|
builder.add_unk_14(args.unk_14);
|
|
if let Some(x) = args.suit_item_icon { builder.add_suit_item_icon(x); }
|
|
if let Some(x) = args.suit_filter_option { builder.add_suit_filter_option(x); }
|
|
if let Some(x) = args.suit_story { builder.add_suit_story(x); }
|
|
if let Some(x) = args.suit_icon { builder.add_suit_icon(x); }
|
|
if let Some(x) = args.secondary_description { builder.add_secondary_description(x); }
|
|
builder.add_secondary_suit_ability(args.secondary_suit_ability);
|
|
builder.add_unk_7(args.unk_7);
|
|
builder.add_secondary_condition(args.secondary_condition);
|
|
if let Some(x) = args.primary_description { builder.add_primary_description(x); }
|
|
builder.add_primary_suit_ability(args.primary_suit_ability);
|
|
builder.add_unk_3(args.unk_3);
|
|
builder.add_primary_condition(args.primary_condition);
|
|
if let Some(x) = args.name { builder.add_name(x); }
|
|
builder.add_id(args.id);
|
|
builder.finish()
|
|
}
|
|
|
|
|
|
#[inline]
|
|
pub fn id(&self) -> u32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<u32>(EquipmentSuitTemplate::VT_ID, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn name(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EquipmentSuitTemplate::VT_NAME, None)}
|
|
}
|
|
#[inline]
|
|
pub fn primary_condition(&self) -> u32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<u32>(EquipmentSuitTemplate::VT_PRIMARY_CONDITION, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_3(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_3, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn primary_suit_ability(&self) -> u32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<u32>(EquipmentSuitTemplate::VT_PRIMARY_SUIT_ABILITY, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn primary_description(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EquipmentSuitTemplate::VT_PRIMARY_DESCRIPTION, None)}
|
|
}
|
|
#[inline]
|
|
pub fn secondary_condition(&self) -> u32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<u32>(EquipmentSuitTemplate::VT_SECONDARY_CONDITION, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_7(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_7, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn secondary_suit_ability(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_SECONDARY_SUIT_ABILITY, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn secondary_description(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EquipmentSuitTemplate::VT_SECONDARY_DESCRIPTION, None)}
|
|
}
|
|
#[inline]
|
|
pub fn suit_icon(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EquipmentSuitTemplate::VT_SUIT_ICON, None)}
|
|
}
|
|
#[inline]
|
|
pub fn suit_story(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EquipmentSuitTemplate::VT_SUIT_STORY, None)}
|
|
}
|
|
#[inline]
|
|
pub fn suit_filter_option(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EquipmentSuitTemplate::VT_SUIT_FILTER_OPTION, None)}
|
|
}
|
|
#[inline]
|
|
pub fn suit_item_icon(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EquipmentSuitTemplate::VT_SUIT_ITEM_ICON, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_14(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_14, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn order(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_ORDER, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_16(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_16, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_17(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_17, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_18(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_18, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_19(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_19, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_20(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_20, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_21(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_21, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn primary_suit_propertys(&self) -> Option<flatbuffers::Vector<'a, Property>> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, Property>>>(EquipmentSuitTemplate::VT_PRIMARY_SUIT_PROPERTYS, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_23(&self) -> Option<flatbuffers::Vector<'a, i32>> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(EquipmentSuitTemplate::VT_UNK_23, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_24(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(EquipmentSuitTemplate::VT_UNK_24, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_25(&self) -> Option<flatbuffers::Vector<'a, i32>> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(EquipmentSuitTemplate::VT_UNK_25, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_26(&self) -> Option<flatbuffers::Vector<'a, i32>> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(EquipmentSuitTemplate::VT_UNK_26, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_27(&self) -> Option<flatbuffers::Vector<'a, i32>> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(EquipmentSuitTemplate::VT_UNK_27, None)}
|
|
}
|
|
#[inline]
|
|
pub fn tag(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EquipmentSuitTemplate::VT_TAG, None)}
|
|
}
|
|
}
|
|
|
|
impl flatbuffers::Verifiable for EquipmentSuitTemplate<'_> {
|
|
#[inline]
|
|
fn run_verifier(
|
|
v: &mut flatbuffers::Verifier, pos: usize
|
|
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
|
use self::flatbuffers::Verifiable;
|
|
v.visit_table(pos)?
|
|
.visit_field::<u32>("id", Self::VT_ID, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
|
|
.visit_field::<u32>("primary_condition", Self::VT_PRIMARY_CONDITION, false)?
|
|
.visit_field::<i32>("unk_3", Self::VT_UNK_3, false)?
|
|
.visit_field::<u32>("primary_suit_ability", Self::VT_PRIMARY_SUIT_ABILITY, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("primary_description", Self::VT_PRIMARY_DESCRIPTION, false)?
|
|
.visit_field::<u32>("secondary_condition", Self::VT_SECONDARY_CONDITION, false)?
|
|
.visit_field::<i32>("unk_7", Self::VT_UNK_7, false)?
|
|
.visit_field::<i32>("secondary_suit_ability", Self::VT_SECONDARY_SUIT_ABILITY, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("secondary_description", Self::VT_SECONDARY_DESCRIPTION, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("suit_icon", Self::VT_SUIT_ICON, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("suit_story", Self::VT_SUIT_STORY, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("suit_filter_option", Self::VT_SUIT_FILTER_OPTION, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("suit_item_icon", Self::VT_SUIT_ITEM_ICON, false)?
|
|
.visit_field::<i32>("unk_14", Self::VT_UNK_14, false)?
|
|
.visit_field::<i32>("order", Self::VT_ORDER, false)?
|
|
.visit_field::<i32>("unk_16", Self::VT_UNK_16, false)?
|
|
.visit_field::<i32>("unk_17", Self::VT_UNK_17, false)?
|
|
.visit_field::<i32>("unk_18", Self::VT_UNK_18, false)?
|
|
.visit_field::<i32>("unk_19", Self::VT_UNK_19, false)?
|
|
.visit_field::<i32>("unk_20", Self::VT_UNK_20, false)?
|
|
.visit_field::<i32>("unk_21", Self::VT_UNK_21, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, Property>>>("primary_suit_propertys", Self::VT_PRIMARY_SUIT_PROPERTYS, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_23", Self::VT_UNK_23, false)?
|
|
.visit_field::<i32>("unk_24", Self::VT_UNK_24, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_25", Self::VT_UNK_25, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_26", Self::VT_UNK_26, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_27", Self::VT_UNK_27, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("tag", Self::VT_TAG, false)?
|
|
.finish();
|
|
Ok(())
|
|
}
|
|
}
|
|
pub struct EquipmentSuitTemplateArgs<'a> {
|
|
pub id: u32,
|
|
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub primary_condition: u32,
|
|
pub unk_3: i32,
|
|
pub primary_suit_ability: u32,
|
|
pub primary_description: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub secondary_condition: u32,
|
|
pub unk_7: i32,
|
|
pub secondary_suit_ability: i32,
|
|
pub secondary_description: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub suit_icon: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub suit_story: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub suit_filter_option: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub suit_item_icon: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub unk_14: i32,
|
|
pub order: i32,
|
|
pub unk_16: i32,
|
|
pub unk_17: i32,
|
|
pub unk_18: i32,
|
|
pub unk_19: i32,
|
|
pub unk_20: i32,
|
|
pub unk_21: i32,
|
|
pub primary_suit_propertys: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, Property>>>,
|
|
pub unk_23: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
|
|
pub unk_24: i32,
|
|
pub unk_25: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
|
|
pub unk_26: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
|
|
pub unk_27: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
|
|
pub tag: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
}
|
|
impl<'a> Default for EquipmentSuitTemplateArgs<'a> {
|
|
#[inline]
|
|
fn default() -> Self {
|
|
EquipmentSuitTemplateArgs {
|
|
id: 0,
|
|
name: None,
|
|
primary_condition: 0,
|
|
unk_3: 0,
|
|
primary_suit_ability: 0,
|
|
primary_description: None,
|
|
secondary_condition: 0,
|
|
unk_7: 0,
|
|
secondary_suit_ability: 0,
|
|
secondary_description: None,
|
|
suit_icon: None,
|
|
suit_story: None,
|
|
suit_filter_option: None,
|
|
suit_item_icon: None,
|
|
unk_14: 0,
|
|
order: 0,
|
|
unk_16: 0,
|
|
unk_17: 0,
|
|
unk_18: 0,
|
|
unk_19: 0,
|
|
unk_20: 0,
|
|
unk_21: 0,
|
|
primary_suit_propertys: None,
|
|
unk_23: None,
|
|
unk_24: 0,
|
|
unk_25: None,
|
|
unk_26: None,
|
|
unk_27: None,
|
|
tag: None,
|
|
}
|
|
}
|
|
}
|
|
|
|
pub struct EquipmentSuitTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
|
|
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
|
|
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
|
|
}
|
|
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentSuitTemplateBuilder<'a, 'b, A> {
|
|
#[inline]
|
|
pub fn add_id(&mut self, id: u32) {
|
|
self.fbb_.push_slot::<u32>(EquipmentSuitTemplate::VT_ID, id, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_NAME, name);
|
|
}
|
|
#[inline]
|
|
pub fn add_primary_condition(&mut self, primary_condition: u32) {
|
|
self.fbb_.push_slot::<u32>(EquipmentSuitTemplate::VT_PRIMARY_CONDITION, primary_condition, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_3(&mut self, unk_3: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_3, unk_3, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_primary_suit_ability(&mut self, primary_suit_ability: u32) {
|
|
self.fbb_.push_slot::<u32>(EquipmentSuitTemplate::VT_PRIMARY_SUIT_ABILITY, primary_suit_ability, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_primary_description(&mut self, primary_description: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_PRIMARY_DESCRIPTION, primary_description);
|
|
}
|
|
#[inline]
|
|
pub fn add_secondary_condition(&mut self, secondary_condition: u32) {
|
|
self.fbb_.push_slot::<u32>(EquipmentSuitTemplate::VT_SECONDARY_CONDITION, secondary_condition, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_7(&mut self, unk_7: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_7, unk_7, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_secondary_suit_ability(&mut self, secondary_suit_ability: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_SECONDARY_SUIT_ABILITY, secondary_suit_ability, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_secondary_description(&mut self, secondary_description: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_SECONDARY_DESCRIPTION, secondary_description);
|
|
}
|
|
#[inline]
|
|
pub fn add_suit_icon(&mut self, suit_icon: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_SUIT_ICON, suit_icon);
|
|
}
|
|
#[inline]
|
|
pub fn add_suit_story(&mut self, suit_story: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_SUIT_STORY, suit_story);
|
|
}
|
|
#[inline]
|
|
pub fn add_suit_filter_option(&mut self, suit_filter_option: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_SUIT_FILTER_OPTION, suit_filter_option);
|
|
}
|
|
#[inline]
|
|
pub fn add_suit_item_icon(&mut self, suit_item_icon: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_SUIT_ITEM_ICON, suit_item_icon);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_14(&mut self, unk_14: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_14, unk_14, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_order(&mut self, order: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_ORDER, order, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_16(&mut self, unk_16: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_16, unk_16, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_17(&mut self, unk_17: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_17, unk_17, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_18(&mut self, unk_18: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_18, unk_18, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_19(&mut self, unk_19: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_19, unk_19, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_20(&mut self, unk_20: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_20, unk_20, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_21(&mut self, unk_21: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_21, unk_21, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_primary_suit_propertys(&mut self, primary_suit_propertys: flatbuffers::WIPOffset<flatbuffers::Vector<'b , Property>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_PRIMARY_SUIT_PROPERTYS, primary_suit_propertys);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_23(&mut self, unk_23: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_UNK_23, unk_23);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_24(&mut self, unk_24: i32) {
|
|
self.fbb_.push_slot::<i32>(EquipmentSuitTemplate::VT_UNK_24, unk_24, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_25(&mut self, unk_25: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_UNK_25, unk_25);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_26(&mut self, unk_26: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_UNK_26, unk_26);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_27(&mut self, unk_27: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_UNK_27, unk_27);
|
|
}
|
|
#[inline]
|
|
pub fn add_tag(&mut self, tag: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplate::VT_TAG, tag);
|
|
}
|
|
#[inline]
|
|
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EquipmentSuitTemplateBuilder<'a, 'b, A> {
|
|
let start = _fbb.start_table();
|
|
EquipmentSuitTemplateBuilder {
|
|
fbb_: _fbb,
|
|
start_: start,
|
|
}
|
|
}
|
|
#[inline]
|
|
pub fn finish(self) -> flatbuffers::WIPOffset<EquipmentSuitTemplate<'a>> {
|
|
let o = self.fbb_.end_table(self.start_);
|
|
flatbuffers::WIPOffset::new(o.value())
|
|
}
|
|
}
|
|
|
|
impl core::fmt::Debug for EquipmentSuitTemplate<'_> {
|
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
|
let mut ds = f.debug_struct("EquipmentSuitTemplate");
|
|
ds.field("id", &self.id());
|
|
ds.field("name", &self.name());
|
|
ds.field("primary_condition", &self.primary_condition());
|
|
ds.field("unk_3", &self.unk_3());
|
|
ds.field("primary_suit_ability", &self.primary_suit_ability());
|
|
ds.field("primary_description", &self.primary_description());
|
|
ds.field("secondary_condition", &self.secondary_condition());
|
|
ds.field("unk_7", &self.unk_7());
|
|
ds.field("secondary_suit_ability", &self.secondary_suit_ability());
|
|
ds.field("secondary_description", &self.secondary_description());
|
|
ds.field("suit_icon", &self.suit_icon());
|
|
ds.field("suit_story", &self.suit_story());
|
|
ds.field("suit_filter_option", &self.suit_filter_option());
|
|
ds.field("suit_item_icon", &self.suit_item_icon());
|
|
ds.field("unk_14", &self.unk_14());
|
|
ds.field("order", &self.order());
|
|
ds.field("unk_16", &self.unk_16());
|
|
ds.field("unk_17", &self.unk_17());
|
|
ds.field("unk_18", &self.unk_18());
|
|
ds.field("unk_19", &self.unk_19());
|
|
ds.field("unk_20", &self.unk_20());
|
|
ds.field("unk_21", &self.unk_21());
|
|
ds.field("primary_suit_propertys", &self.primary_suit_propertys());
|
|
ds.field("unk_23", &self.unk_23());
|
|
ds.field("unk_24", &self.unk_24());
|
|
ds.field("unk_25", &self.unk_25());
|
|
ds.field("unk_26", &self.unk_26());
|
|
ds.field("unk_27", &self.unk_27());
|
|
ds.field("tag", &self.tag());
|
|
ds.finish()
|
|
}
|
|
}
|
|
pub enum EquipmentSuitTemplateTbOffset {}
|
|
#[derive(Copy, Clone, PartialEq)]
|
|
|
|
pub struct EquipmentSuitTemplateTb<'a> {
|
|
pub _tab: flatbuffers::Table<'a>,
|
|
}
|
|
|
|
impl<'a> flatbuffers::Follow<'a> for EquipmentSuitTemplateTb<'a> {
|
|
type Inner = EquipmentSuitTemplateTb<'a>;
|
|
#[inline]
|
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
|
Self { _tab: flatbuffers::Table::new(buf, loc) }
|
|
}
|
|
}
|
|
|
|
impl<'a> EquipmentSuitTemplateTb<'a> {
|
|
pub const VT_DATA: flatbuffers::VOffsetT = 4;
|
|
|
|
#[inline]
|
|
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
|
EquipmentSuitTemplateTb { _tab: table }
|
|
}
|
|
#[allow(unused_mut)]
|
|
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
|
|
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
|
|
args: &'args EquipmentSuitTemplateTbArgs<'args>
|
|
) -> flatbuffers::WIPOffset<EquipmentSuitTemplateTb<'bldr>> {
|
|
let mut builder = EquipmentSuitTemplateTbBuilder::new(_fbb);
|
|
if let Some(x) = args.data { builder.add_data(x); }
|
|
builder.finish()
|
|
}
|
|
|
|
|
|
#[inline]
|
|
pub fn data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EquipmentSuitTemplate<'a>>>> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EquipmentSuitTemplate>>>>(EquipmentSuitTemplateTb::VT_DATA, None)}
|
|
}
|
|
}
|
|
|
|
impl flatbuffers::Verifiable for EquipmentSuitTemplateTb<'_> {
|
|
#[inline]
|
|
fn run_verifier(
|
|
v: &mut flatbuffers::Verifier, pos: usize
|
|
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
|
use self::flatbuffers::Verifiable;
|
|
v.visit_table(pos)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<EquipmentSuitTemplate>>>>("data", Self::VT_DATA, false)?
|
|
.finish();
|
|
Ok(())
|
|
}
|
|
}
|
|
pub struct EquipmentSuitTemplateTbArgs<'a> {
|
|
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EquipmentSuitTemplate<'a>>>>>,
|
|
}
|
|
impl<'a> Default for EquipmentSuitTemplateTbArgs<'a> {
|
|
#[inline]
|
|
fn default() -> Self {
|
|
EquipmentSuitTemplateTbArgs {
|
|
data: None,
|
|
}
|
|
}
|
|
}
|
|
|
|
pub struct EquipmentSuitTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
|
|
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
|
|
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
|
|
}
|
|
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentSuitTemplateTbBuilder<'a, 'b, A> {
|
|
#[inline]
|
|
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<EquipmentSuitTemplate<'b >>>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EquipmentSuitTemplateTb::VT_DATA, data);
|
|
}
|
|
#[inline]
|
|
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EquipmentSuitTemplateTbBuilder<'a, 'b, A> {
|
|
let start = _fbb.start_table();
|
|
EquipmentSuitTemplateTbBuilder {
|
|
fbb_: _fbb,
|
|
start_: start,
|
|
}
|
|
}
|
|
#[inline]
|
|
pub fn finish(self) -> flatbuffers::WIPOffset<EquipmentSuitTemplateTb<'a>> {
|
|
let o = self.fbb_.end_table(self.start_);
|
|
flatbuffers::WIPOffset::new(o.value())
|
|
}
|
|
}
|
|
|
|
impl core::fmt::Debug for EquipmentSuitTemplateTb<'_> {
|
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
|
let mut ds = f.debug_struct("EquipmentSuitTemplateTb");
|
|
ds.field("data", &self.data());
|
|
ds.finish()
|
|
}
|
|
}
|