Skip to main content

QuestEditor

Struct QuestEditor 

Source
pub struct QuestEditor {
Show 35 fields pub graphs: HashMap<String, QuestGraph>, pub active_graph_id: Option<String>, pub graph_state: QuestEditorGraphState, pub quest_state_store: QuestStateStore, pub faction_system: FactionSystem, pub journal: JournalSystem, pub chains: HashMap<String, QuestChain>, pub debug_tools: QuestDebugTools, pub undo_stack: VecDeque<QuestEditorAction>, pub redo_stack: VecDeque<QuestEditorAction>, pub max_undo: usize, pub validation_errors: Vec<QuestValidationError>, pub search_query: String, pub search_results: Vec<QuestSearchResult>, pub selected_chain_id: Option<String>, pub show_journal: bool, pub show_debug: bool, pub show_factions: bool, pub show_chains: bool, pub show_validation: bool, pub show_reward_preview: bool, pub show_statistics: bool, pub node_id_counter: u64, pub dirty: bool, pub status_message: String, pub status_timer: f32, pub rng: SimpleRng, pub panel_config: QuestEditorPanels, pub recent_files: Vec<String>, pub last_save_path: Option<String>, pub event_log: VecDeque<QuestEvent>, pub max_event_log: usize, pub preview_player_level: u32, pub reward_preview_results: Vec<RolledReward>, pub graph_annotations: Vec<QuestAnnotation>,
}

Fields§

§graphs: HashMap<String, QuestGraph>§active_graph_id: Option<String>§graph_state: QuestEditorGraphState§quest_state_store: QuestStateStore§faction_system: FactionSystem§journal: JournalSystem§chains: HashMap<String, QuestChain>§debug_tools: QuestDebugTools§undo_stack: VecDeque<QuestEditorAction>§redo_stack: VecDeque<QuestEditorAction>§max_undo: usize§validation_errors: Vec<QuestValidationError>§search_query: String§search_results: Vec<QuestSearchResult>§selected_chain_id: Option<String>§show_journal: bool§show_debug: bool§show_factions: bool§show_chains: bool§show_validation: bool§show_reward_preview: bool§show_statistics: bool§node_id_counter: u64§dirty: bool§status_message: String§status_timer: f32§rng: SimpleRng§panel_config: QuestEditorPanels§recent_files: Vec<String>§last_save_path: Option<String>§event_log: VecDeque<QuestEvent>§max_event_log: usize§preview_player_level: u32§reward_preview_results: Vec<RolledReward>§graph_annotations: Vec<QuestAnnotation>

Implementations§

Source§

impl QuestEditor

Source

pub fn new() -> Self

Source

pub fn allocate_id(&mut self) -> u64

Source

pub fn active_graph(&self) -> Option<&QuestGraph>

Source

pub fn active_graph_mut(&mut self) -> Option<&mut QuestGraph>

Source

pub fn new_quest(&mut self, quest_name: &str, quest_id: &str) -> String

Source

pub fn open_graph(&mut self, id: &str)

Source

pub fn add_node( &mut self, node_type: QuestNodeType, position: Vec2, ) -> Option<u64>

Source

pub fn remove_selected_nodes(&mut self)

Source

pub fn connect_nodes( &mut self, from: u64, from_port: usize, to: u64, to_port: usize, )

Source

pub fn undo(&mut self)

Source

pub fn redo(&mut self)

Source

pub fn validate_active(&mut self)

Source

pub fn update(&mut self, delta: f32)

Source

pub fn process_event(&mut self, event: QuestEvent)

Source

pub fn set_status(&mut self, msg: &str, duration: f32)

Source

pub fn preview_rewards(&mut self, node_id: u64)

Source

pub fn search(&mut self, query: &str)

Source

pub fn select_all(&mut self)

Source

pub fn deselect_all(&mut self)

Source

pub fn auto_layout_active(&mut self)

Source

pub fn add_chain(&mut self, chain: QuestChain)

Source

pub fn get_statistics(&self) -> QuestEditorStats

Source

pub fn export_to_json(&self, graph_id: &str) -> Result<String, String>

Source

pub fn add_faction_rep_delta( &mut self, faction_id: &str, delta: i32, reason: &str, quest_id: Option<&str>, )

Source

pub fn generate_journal_entry_for_quest( &mut self, quest_id: &str, graph_id: &str, )

Trait Implementations§

Source§

impl Debug for QuestEditor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more