pub enum Action {
SetGlobalVariable {
variable: GlobalVarId,
value: ValueId,
span: Option<Span>,
target_span: Option<Span>,
},
ModifyGlobalVariable {
variable: GlobalVarId,
op: ModifyOp,
value: ValueId,
span: Option<Span>,
target_span: Option<Span>,
},
SetPlayerVariable {
player: ValueId,
variable: PlayerVarId,
value: ValueId,
span: Option<Span>,
target_span: Option<Span>,
},
ModifyPlayerVariable {
player: ValueId,
variable: PlayerVarId,
op: ModifyOp,
value: ValueId,
span: Option<Span>,
target_span: Option<Span>,
},
AssignMember {
target: ValueId,
op: Option<ModifyOp>,
value: ValueId,
span: Option<Span>,
},
CallSubroutine {
subroutine: SubroutineId,
span: Option<Span>,
callee_span: Option<Span>,
},
If {
branches: Vec<IfBranch>,
else_body: Option<Vec<ActionId>>,
span: Option<Span>,
},
While {
condition: ValueId,
body: Vec<ActionId>,
span: Option<Span>,
},
ForGlobalVariable {
variable: GlobalVarId,
start: ValueId,
stop: ValueId,
step: ValueId,
body: Vec<ActionId>,
span: Option<Span>,
target_span: Option<Span>,
},
ForPlayerVariable {
player: ValueId,
variable: PlayerVarId,
start: ValueId,
stop: ValueId,
step: ValueId,
body: Vec<ActionId>,
span: Option<Span>,
},
Call {
name: String,
args: Vec<ValueId>,
span: Option<Span>,
},
}Expand description
A workshop action.
Variants§
SetGlobalVariable
Fields
§
variable: GlobalVarIdModifyGlobalVariable
Fields
§
variable: GlobalVarIdSetPlayerVariable
Fields
§
variable: PlayerVarIdModifyPlayerVariable
Fields
§
variable: PlayerVarIdAssignMember
Assignment to a canonical Workshop member-access target, optionally indexed. This is not a builtin catalog action; the emitter preserves the native member-assignment syntax.
CallSubroutine
Fields
§
subroutine: SubroutineIdIf
While
ForGlobalVariable
Fields
§
variable: GlobalVarIdForPlayerVariable
For Player Variable(player, name, start, stop, step): the
per-player loop form (frontend-neutral; parsed from reference
evidence, not emitted by Wright’s own lowering, which models
foreach counters as globals under the declared #119 contract).
Fields
§
variable: PlayerVarIdCall
Any other action call with side effects.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more