Skip to main content

Value

Enum Value 

Source
pub enum Value {
Show 13 variants Number(f64), String(String), LocalizedString(String), Bool(bool), Null, Array(Vec<Value>), Vector { x: Box<Value>, y: Box<Value>, z: Box<Value>, }, Enum { value_type: String, value: String, }, GlobalVariable(String), PlayerVariable { player: Box<Value>, variable: String, }, Subroutine(String), EventPlayer, Call { name: String, args: Vec<Value>, },
}
Expand description

A composable Workshop value expression.

Variants§

§

Number(f64)

§

String(String)

§

LocalizedString(String)

§

Bool(bool)

§

Null

§

Array(Vec<Value>)

§

Vector

Fields

§

Enum

Fields

§value_type: String
§value: String
§

GlobalVariable(String)

§

PlayerVariable

Fields

§player: Box<Value>
§variable: String
§

Subroutine(String)

§

EventPlayer

§

Call

Fields

§name: String
§args: Vec<Value>

Implementations§

Source§

impl Value

Source

pub fn number(value: f64) -> Self

Construct a numeric Workshop literal.

Source

pub fn string(value: impl Into<String>) -> Self

Construct a custom Workshop string literal.

Source

pub fn global_variable(name: impl Into<String>) -> Self

Source

pub fn player_variable(player: Value, name: impl Into<String>) -> Self

Source

pub fn call( name: impl Into<String>, args: impl IntoIterator<Item = Value>, ) -> Self

Construct a dynamic value call by canonical Workshop id.

§

impl Value

pub fn get_max_health(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getMaxHealth. Parameters: player.

pub fn is_in_alternate_form(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isInAlternateForm. Parameters: player.

pub fn get_normalized_health(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getNormalizedHealth. Parameters: player.

pub fn get_last_healing_over_time_id() -> Self

Constructs the canonical Workshop values getLastHealingOverTimeId.

pub fn get_objective_position(number: impl Into<Value>) -> Self

Constructs the canonical Workshop values getObjectivePosition. Parameters: number.

pub fn get_statistic( player: impl Into<Value>, statistic: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getStatistic. Parameters: player, statistic.

pub fn get_hero_statistic( player: impl Into<Value>, hero: impl Into<Value>, stat: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getHeroStatistic. Parameters: player, hero, stat.

pub fn get_facing_direction(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getFacingDirection. Parameters: player.

pub fn get_slot(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getSlot. Parameters: player.

pub fn entity_exists(entity: impl Into<Value>) -> Self

Constructs the canonical Workshop values entityExists. Parameters: entity.

pub fn get_last_created_health_pool() -> Self

Constructs the canonical Workshop values getLastCreatedHealthPool.

pub fn is_in_lo_s( start_pos: impl Into<Value>, end_pos: impl Into<Value>, barriers: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values isInLoS. Parameters: start_pos, end_pos, barriers.

pub fn nearest_walkable_position(position: impl Into<Value>) -> Self

Constructs the canonical Workshop values nearestWalkablePosition. Parameters: position.

pub fn random_integer(min: impl Into<Value>, max: impl Into<Value>) -> Self

Constructs the canonical Workshop values randomInteger. Parameters: min, max.

pub fn is_firing_secondary_fire(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isFiringSecondaryFire. Parameters: player.

pub fn null() -> Self

Constructs the canonical Workshop values null.

pub fn distance(start_pos: impl Into<Value>, end_pos: impl Into<Value>) -> Self

Constructs the canonical Workshop values distance. Parameters: start_pos, end_pos.

pub fn get_eye_position(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getEyePosition. Parameters: player.

pub fn get_speed(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getSpeed. Parameters: player.

pub fn get_velocity(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getVelocity. Parameters: player.

pub fn slice( array: impl Into<Value>, start_index: impl Into<Value>, count: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values slice. Parameters: array, start_index, count.

pub fn raycast_hit_position( start_pos: impl Into<Value>, end_pos: impl Into<Value>, players_to_include: impl Into<Value>, players_to_exclude: impl Into<Value>, include_player_owned_objects: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values raycastHitPosition. Parameters: start_pos, end_pos, players_to_include, players_to_exclude, include_player_owned_objects.

pub fn char_at(string: impl Into<Value>, index: impl Into<Value>) -> Self

Constructs the canonical Workshop values charAt. Parameters: string, index.

pub fn str_index(string: impl Into<Value>, character: impl Into<Value>) -> Self

Constructs the canonical Workshop values strIndex. Parameters: string, character.

pub fn x_component_of(vector: impl Into<Value>) -> Self

Constructs the canonical Workshop values __xComponentOf__. Parameters: vector.

pub fn y_component_of(vector: impl Into<Value>) -> Self

Constructs the canonical Workshop values __yComponentOf__. Parameters: vector.

pub fn z_component_of(vector: impl Into<Value>) -> Self

Constructs the canonical Workshop values __zComponentOf__. Parameters: vector.

pub fn get_total_time_elapsed() -> Self

Constructs the canonical Workshop values getTotalTimeElapsed.

pub fn get_average_server_load() -> Self

Constructs the canonical Workshop values getAverageServerLoad.

pub fn get_peak_server_load() -> Self

Constructs the canonical Workshop values getPeakServerLoad.

pub fn get_server_load() -> Self

Constructs the canonical Workshop values getServerLoad.

pub fn get_living_players(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getLivingPlayers. Parameters: team.

pub fn is_dead(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isDead. Parameters: player.

pub fn is_moving(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isMoving. Parameters: player.

pub fn attacker() -> Self

Constructs the canonical Workshop values attacker.

pub fn host_player() -> Self

Constructs the canonical Workshop values hostPlayer.

pub fn victim() -> Self

Constructs the canonical Workshop values victim.

pub fn add(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values add. Parameters: value, value_2.

pub fn is_using_ability1(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isUsingAbility1. Parameters: player.

pub fn is_firing_secondary(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isFiringSecondary. Parameters: player.

pub fn is_using_ability2(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isUsingAbility2. Parameters: player.

pub fn is_using_ultimate(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isUsingUltimate. Parameters: player.

pub fn direction_towards( start_pos: impl Into<Value>, end_pos: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values directionTowards. Parameters: start_pos, end_pos.

pub fn subtract(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values subtract. Parameters: value, value_2.

pub fn multiply(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values multiply. Parameters: value, value_2.

pub fn divide(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values divide. Parameters: value, value_2.

pub fn compare( value: impl Into<Value>, comparison: impl Into<Value>, value_2: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values compare. Parameters: value, comparison, value_2.

pub fn and(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values and. Parameters: value, value_2.

pub fn or(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values or. Parameters: value, value_2.

pub fn not(value: impl Into<Value>) -> Self

Constructs the canonical Workshop values not. Parameters: value.

pub fn count_of(array: impl Into<Value>) -> Self

Constructs the canonical Workshop values countOf. Parameters: array.

pub fn absolute_value(value: impl Into<Value>) -> Self

Constructs the canonical Workshop values absoluteValue. Parameters: value.

pub fn array(values: impl IntoIterator<Item = impl Into<Value>>) -> Self

Constructs the canonical Workshop values array. Parameters: values.

pub fn vector( x: impl Into<Value>, y: impl Into<Value>, z: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values vector. Parameters: x, y, z.

pub fn custom_string( string: impl Into<Value>, arg_0: impl Into<Value>, arg_1: impl Into<Value>, arg_2: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values customString. Parameters: string, arg_0, arg_1, arg_2.

pub fn format_string( format: impl Into<Value>, replacement1: impl Into<Value>, replacement2: impl Into<Value>, replacement3: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values string. Parameters: format, replacement1, replacement2, replacement3.

pub fn value_in_array(array: impl Into<Value>, index: impl Into<Value>) -> Self

Constructs the canonical Workshop values valueInArray. Parameters: array, index.

pub fn mapped_array( array: impl Into<Value>, condition: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values mappedArray. Parameters: array, condition.

pub fn first_of(array: impl Into<Value>) -> Self

Constructs the canonical Workshop values firstOf. Parameters: array.

pub fn string_replace( string: impl Into<Value>, search: impl Into<Value>, replacement: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values stringReplace. Parameters: string, search, replacement.

pub fn string_slice( string: impl Into<Value>, start_index: impl Into<Value>, count: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values stringSlice. Parameters: string, start_index, count.

pub fn string_split( string: impl Into<Value>, separator: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values stringSplit. Parameters: string, separator.

pub fn all_players(array: impl Into<Value>) -> Self

Constructs the canonical Workshop values allPlayers. Parameters: array.

pub fn random_real(min: impl Into<Value>, max: impl Into<Value>) -> Self

Constructs the canonical Workshop values randomReal. Parameters: min, max.

pub fn random_value_in_array(array: impl Into<Value>) -> Self

Constructs the canonical Workshop values randomValueInArray. Parameters: array.

pub fn randomized_array(array: impl Into<Value>) -> Self

Constructs the canonical Workshop values randomizedArray. Parameters: array.

pub fn raise_to_power( value: impl Into<Value>, value_2: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values raiseToPower. Parameters: value, value_2.

pub fn has_spawned(entity: impl Into<Value>) -> Self

Constructs the canonical Workshop values hasSpawned. Parameters: entity.

pub fn empty_array() -> Self

Constructs the canonical Workshop values emptyArray.

pub fn if_then_else( if_: impl Into<Value>, then: impl Into<Value>, else_: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values ifThenElse. Parameters: if_, then, else_.

pub fn current_array_element() -> Self

Constructs the canonical Workshop values currentArrayElement.

pub fn append_to_array(array: impl Into<Value>, value: impl Into<Value>) -> Self

Constructs the canonical Workshop values appendToArray. Parameters: array, value.

pub fn square_root(value: impl Into<Value>) -> Self

Constructs the canonical Workshop values squareRoot. Parameters: value.

pub fn get_health(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getHealth. Parameters: player.

pub fn get_hero(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getHero. Parameters: player.

pub fn hero(hero: impl Into<Value>) -> Self

Constructs the canonical Workshop values hero. Parameters: hero.

pub fn healer() -> Self

Constructs the canonical Workshop values healer.

pub fn has_status(player: impl Into<Value>, status: impl Into<Value>) -> Self

Constructs the canonical Workshop values hasStatus. Parameters: player, status.

pub fn event_was_health_pack() -> Self

Constructs the canonical Workshop values eventWasHealthPack.

pub fn get_position(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getPosition. Parameters: player.

pub fn event_healing() -> Self

Constructs the canonical Workshop values eventHealing.

pub fn is_alive(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isAlive. Parameters: player.

pub fn get_throttle(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getThrottle. Parameters: player.

pub fn get_players_in_radius( center: impl Into<Value>, radius: impl Into<Value>, team: impl Into<Value>, los_check: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getPlayersInRadius. Parameters: center, radius, team, los_check.

pub fn is_game_in_progress() -> Self

Constructs the canonical Workshop values isGameInProgress.

pub fn world_vector( local_vector: impl Into<Value>, relative_player: impl Into<Value>, transformation: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values worldVector. Parameters: local_vector, relative_player, transformation.

pub fn workshop_setting_integer( category: impl Into<Value>, name: impl Into<Value>, default: impl Into<Value>, min_value: impl Into<Value>, max_value: impl Into<Value>, sort_order: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values workshopSettingInteger. Parameters: category, name, default, min_value, max_value, sort_order.

pub fn workshop_setting_toggle( category: impl Into<Value>, name: impl Into<Value>, default: impl Into<Value>, sort_order: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values workshopSettingToggle. Parameters: category, name, default, sort_order.

pub fn workshop_setting_combo( category: impl Into<Value>, name: impl Into<Value>, default: impl Into<Value>, options: impl Into<Value>, sort_order: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values workshopSettingCombo. Parameters: category, name, default, options, sort_order.

pub fn all_heroes() -> Self

Constructs the canonical Workshop values allHeroes.

pub fn all_tank_heroes() -> Self

Constructs the canonical Workshop values allTankHeroes.

pub fn all_damage_heroes() -> Self

Constructs the canonical Workshop values allDamageHeroes.

pub fn all_support_heroes() -> Self

Constructs the canonical Workshop values allSupportHeroes.

pub fn allowed_heroes(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values allowedHeroes. Parameters: player.

pub fn event_player() -> Self

Constructs the canonical Workshop values eventPlayer.

pub fn local_player() -> Self

Constructs the canonical Workshop values localPlayer.

pub fn team_of(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values teamOf. Parameters: player.

pub fn opposite_team_of(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values oppositeTeamOf. Parameters: team.

pub fn number_of_players(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values numberOfPlayers. Parameters: team.

pub fn array_contains(array: impl Into<Value>, value: impl Into<Value>) -> Self

Constructs the canonical Workshop values arrayContains. Parameters: array, value.

pub fn current_array_index() -> Self

Constructs the canonical Workshop values currentArrayIndex.

pub fn index_of_array_value( array: impl Into<Value>, value: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values indexOfArrayValue. Parameters: array, value.

pub fn filtered_array( array: impl Into<Value>, condition: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values filteredArray. Parameters: array, condition.

pub fn sorted_array( array: impl Into<Value>, value_rank: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values sortedArray. Parameters: array, value_rank.

pub fn last_of(array: impl Into<Value>) -> Self

Constructs the canonical Workshop values lastOf. Parameters: array.

pub fn remove_from_array( array: impl Into<Value>, value: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values removeFromArray. Parameters: array, value.

pub fn max(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values max. Parameters: value, value_2.

pub fn min(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values min. Parameters: value, value_2.

pub fn round_to_integer( value: impl Into<Value>, rounding: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values roundToInteger. Parameters: value, rounding.

pub fn cross_product(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values crossProduct. Parameters: value, value_2.

pub fn direction_from_angles( horizontal_angle: impl Into<Value>, vertical_angle: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values directionFromAngles. Parameters: horizontal_angle, vertical_angle.

pub fn horizontal_angle_from_direction(direction: impl Into<Value>) -> Self

Constructs the canonical Workshop values horizontalAngleFromDirection. Parameters: direction.

pub fn vertical_angle_from_direction(direction: impl Into<Value>) -> Self

Constructs the canonical Workshop values verticalAngleFromDirection. Parameters: direction.

pub fn forward() -> Self

Constructs the canonical Workshop values forward.

pub fn custom_color( red: impl Into<Value>, green: impl Into<Value>, blue: impl Into<Value>, alpha: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values customColor. Parameters: red, green, blue, alpha.

pub fn is_button_held( player: impl Into<Value>, button: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values isButtonHeld. Parameters: player, button.

pub fn is_in_spawn_room(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isInSpawnRoom. Parameters: player.

pub fn is_true_for_all( array: impl Into<Value>, condition: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values isTrueForAll. Parameters: array, condition.

pub fn is_waiting_for_players() -> Self

Constructs the canonical Workshop values isWaitingForPlayers.

pub fn current_map() -> Self

Constructs the canonical Workshop values currentMap.

pub fn evaluate_once(value: impl Into<Value>) -> Self

Constructs the canonical Workshop values evaluateOnce. Parameters: value.

pub fn update_every_frame(value: impl Into<Value>) -> Self

Constructs the canonical Workshop values updateEveryFrame. Parameters: value.

pub fn last_created_entity() -> Self

Constructs the canonical Workshop values lastCreatedEntity.

pub fn last_text_id() -> Self

Constructs the canonical Workshop values lastTextId.

pub fn hero_icon_string(hero: impl Into<Value>) -> Self

Constructs the canonical Workshop values heroIconString. Parameters: hero.

pub fn ability_icon_string( hero: impl Into<Value>, button: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values abilityIconString. Parameters: hero, button.

pub fn icon_string(icon: impl Into<Value>) -> Self

Constructs the canonical Workshop values iconString. Parameters: icon.

pub fn input_binding_string(button: impl Into<Value>) -> Self

Constructs the canonical Workshop values inputBindingString. Parameters: button.

pub fn is_dummy(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isDummy. Parameters: player.

pub fn get_ability_cooldown( player: impl Into<Value>, button: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getAbilityCooldown. Parameters: player, button.

pub fn get_horizontal_facing_angle(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getHorizontalFacingAngle. Parameters: player.

pub fn get_vertical_facing_angle(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getVerticalFacingAngle. Parameters: player.

pub fn get_speed_in_direction( player: impl Into<Value>, direction: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getSpeedInDirection. Parameters: player, direction.

pub fn is_on_ground(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isOnGround. Parameters: player.

pub fn dot_product(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values dotProduct. Parameters: value, value_2.

pub fn event_damage() -> Self

Constructs the canonical Workshop values eventDamage.

pub fn normalize(vector: impl Into<Value>) -> Self

Constructs the canonical Workshop values normalize. Parameters: vector.

pub fn angle_difference( angle: impl Into<Value>, angle_2: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values angleDifference. Parameters: angle, angle_2.

pub fn event_ability() -> Self

Constructs the canonical Workshop values eventAbility.

pub fn get_ability_resource( player: impl Into<Value>, button: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getAbilityResource. Parameters: player, button.

pub fn get_altitude(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getAltitude. Parameters: player.

pub fn get_ammo(player: impl Into<Value>, clip: impl Into<Value>) -> Self

Constructs the canonical Workshop values getAmmo. Parameters: player, clip.

pub fn get_max_ammo(player: impl Into<Value>, clip: impl Into<Value>) -> Self

Constructs the canonical Workshop values getMaxAmmo. Parameters: player, clip.

pub fn get_ult_charge(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getUltCharge. Parameters: player.

pub fn is_duplicating_a_hero(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isDuplicatingAHero. Parameters: player.

pub fn is_firing_primary_fire(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isFiringPrimaryFire. Parameters: player.

pub fn is_in_air(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isInAir. Parameters: player.

pub fn is_in_view_angle( player: impl Into<Value>, location: impl Into<Value>, view_angle: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values isInViewAngle. Parameters: player, location, view_angle.

pub fn is_reloading(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isReloading. Parameters: player.

pub fn is_true_for_any( array: impl Into<Value>, condition: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values isTrueForAny. Parameters: array, condition.

pub fn get_players_on_hero( hero: impl Into<Value>, team: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getPlayersOnHero. Parameters: hero, team.

pub fn sin(angle: impl Into<Value>) -> Self

Constructs the canonical Workshop values sin. Parameters: angle.

pub fn vector_towards( start_pos: impl Into<Value>, end_pos: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values vectorTowards. Parameters: start_pos, end_pos.

pub fn get_last_damage_modification() -> Self

Constructs the canonical Workshop values getLastDamageModification.

pub fn get_hero_of_duplication(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getHeroOfDuplication. Parameters: player.

pub fn healee() -> Self

Constructs the canonical Workshop values healee.

pub fn event_was_critical_hit() -> Self

Constructs the canonical Workshop values eventWasCriticalHit.

pub fn get_ability_charge( player: impl Into<Value>, button: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getAbilityCharge. Parameters: player, button.

pub fn get_health_of_type( player: impl Into<Value>, health: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getHealthOfType. Parameters: player, health.

pub fn is_communicating( player: impl Into<Value>, type_: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values isCommunicating. Parameters: player, type_.

pub fn is_crouching(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isCrouching. Parameters: player.

pub fn get_spawn_points(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getSpawnPoints. Parameters: team.

pub fn is_assembling_heroes() -> Self

Constructs the canonical Workshop values isAssemblingHeroes.

pub fn is_in_setup() -> Self

Constructs the canonical Workshop values isInSetup.

pub fn is_objective_complete(number: impl Into<Value>) -> Self

Constructs the canonical Workshop values isObjectiveComplete. Parameters: number.

pub fn is_team_on_offense(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values isTeamOnOffense. Parameters: team.

pub fn get_players_in_view_angle( player: impl Into<Value>, team: impl Into<Value>, view_angle: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getPlayersInViewAngle. Parameters: player, team, view_angle.

pub fn get_current_weapon(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getCurrentWeapon. Parameters: player.

pub fn get_horizontal_speed(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getHorizontalSpeed. Parameters: player.

pub fn get_max_health_of_type( player: impl Into<Value>, health: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getMaxHealthOfType. Parameters: player, health.

pub fn get_number_of_deaths(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getNumberOfDeaths. Parameters: player.

pub fn get_number_of_elims(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getNumberOfElims. Parameters: player.

pub fn get_number_of_final_blows(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getNumberOfFinalBlows. Parameters: player.

pub fn get_player_closest_to_reticle( player: impl Into<Value>, team: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getPlayerClosestToReticle. Parameters: player, team.

pub fn get_score(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getScore. Parameters: player.

pub fn get_vertical_speed(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values getVerticalSpeed. Parameters: player.

pub fn is_communicating_anything(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isCommunicatingAnything. Parameters: player.

pub fn is_communicating_emote(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isCommunicatingEmote. Parameters: player.

pub fn is_communicating_spray(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isCommunicatingSpray. Parameters: player.

pub fn is_communicating_voiceline(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isCommunicatingVoiceline. Parameters: player.

pub fn is_jumping(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isJumping. Parameters: player.

pub fn is_meleeing(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isMeleeing. Parameters: player.

pub fn is_on_fire(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isOnFire. Parameters: player.

pub fn is_on_objective(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isOnObjective. Parameters: player.

pub fn is_on_wall(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isOnWall. Parameters: player.

pub fn is_standing(player: impl Into<Value>) -> Self

Constructs the canonical Workshop values isStanding. Parameters: player.

pub fn raycast_hit_normal( start_pos: impl Into<Value>, end_pos: impl Into<Value>, players_to_include: impl Into<Value>, players_to_exclude: impl Into<Value>, include_player_owned_objects: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values raycastHitNormal. Parameters: start_pos, end_pos, players_to_include, players_to_exclude, include_player_owned_objects.

pub fn raycast_hit_player( start_pos: impl Into<Value>, end_pos: impl Into<Value>, players_to_include: impl Into<Value>, players_to_exclude: impl Into<Value>, include_player_owned_objects: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values raycastHitPlayer. Parameters: start_pos, end_pos, players_to_include, players_to_exclude, include_player_owned_objects.

pub fn create_workshop_setting_hero( category: impl Into<Value>, name: impl Into<Value>, default: impl Into<Value>, sort_order: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values createWorkshopSettingHero. Parameters: category, name, default, sort_order.

pub fn create_workshop_setting_float( category: impl Into<Value>, name: impl Into<Value>, default: impl Into<Value>, min: impl Into<Value>, max: impl Into<Value>, sort_order: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values createWorkshopSettingFloat. Parameters: category, name, default, min, max, sort_order.

pub fn acos(value: impl Into<Value>) -> Self

Constructs the canonical Workshop values acos. Parameters: value.

pub fn acos_deg(value: impl Into<Value>) -> Self

Constructs the canonical Workshop values acosDeg. Parameters: value.

pub fn angle_between_vectors( vector: impl Into<Value>, vector_2: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values angleBetweenVectors. Parameters: vector, vector_2.

pub fn asin(value: impl Into<Value>) -> Self

Constructs the canonical Workshop values asin. Parameters: value.

pub fn asin_deg(value: impl Into<Value>) -> Self

Constructs the canonical Workshop values asinDeg. Parameters: value.

pub fn atan2(numerator: impl Into<Value>, denominator: impl Into<Value>) -> Self

Constructs the canonical Workshop values atan2. Parameters: numerator, denominator.

pub fn atan2_deg( numerator: impl Into<Value>, denominator: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values atan2Deg. Parameters: numerator, denominator.

pub fn cos(angle: impl Into<Value>) -> Self

Constructs the canonical Workshop values cos. Parameters: angle.

pub fn cos_deg(angle: impl Into<Value>) -> Self

Constructs the canonical Workshop values cosDeg. Parameters: angle.

pub fn event_direction() -> Self

Constructs the canonical Workshop values eventDirection.

pub fn event_was_environment() -> Self

Constructs the canonical Workshop values eventWasEnvironment.

pub fn get_capture_percentage() -> Self

Constructs the canonical Workshop values getCapturePercentage.

pub fn get_closest_player( center: impl Into<Value>, team: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getClosestPlayer. Parameters: center, team.

pub fn get_control_score_percentage(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getControlScorePercentage. Parameters: team.

pub fn get_control_scoring_team() -> Self

Constructs the canonical Workshop values getControlScoringTeam.

pub fn get_current_gamemode() -> Self

Constructs the canonical Workshop values getCurrentGamemode.

pub fn get_current_objective() -> Self

Constructs the canonical Workshop values getCurrentObjective.

pub fn get_dead_players(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getDeadPlayers. Parameters: team.

pub fn get_farthest_player( center: impl Into<Value>, team: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getFarthestPlayer. Parameters: center, team.

pub fn get_flag_carrier(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getFlagCarrier. Parameters: team.

pub fn get_flag_position(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getFlagPosition. Parameters: team.

pub fn get_last_assist_id() -> Self

Constructs the canonical Workshop values getLastAssistId.

pub fn get_last_damage_over_time_id() -> Self

Constructs the canonical Workshop values getLastDamageOverTimeId.

pub fn get_last_healing_modification() -> Self

Constructs the canonical Workshop values getLastHealingModification.

pub fn get_match_round() -> Self

Constructs the canonical Workshop values getMatchRound.

pub fn get_match_time() -> Self

Constructs the canonical Workshop values getMatchTime.

pub fn get_number_of_assist_ids() -> Self

Constructs the canonical Workshop values getNumberOfAssistIds.

pub fn get_number_of_damage_modification_ids() -> Self

Constructs the canonical Workshop values getNumberOfDamageModificationIds.

pub fn get_number_of_dead_players(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getNumberOfDeadPlayers. Parameters: team.

pub fn get_number_of_damage_over_time_ids() -> Self

Constructs the canonical Workshop values getNumberOfDamageOverTimeIds.

pub fn get_number_of_entity_ids() -> Self

Constructs the canonical Workshop values getNumberOfEntityIds.

pub fn get_number_of_healing_modification_ids() -> Self

Constructs the canonical Workshop values getNumberOfHealingModificationIds.

pub fn get_number_of_heroes( hero: impl Into<Value>, team: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getNumberOfHeroes. Parameters: hero, team.

pub fn get_number_of_healing_over_time_ids() -> Self

Constructs the canonical Workshop values getNumberOfHealingOverTimeIds.

pub fn get_number_of_living_players(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getNumberOfLivingPlayers. Parameters: team.

pub fn get_number_of_players_on_objective(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getNumberOfPlayersOnObjective. Parameters: team.

pub fn get_number_of_slots(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getNumberOfSlots. Parameters: team.

pub fn get_number_of_text_ids() -> Self

Constructs the canonical Workshop values getNumberOfTextIds.

pub fn get_payload_position() -> Self

Constructs the canonical Workshop values getPayloadPosition.

pub fn get_payload_progress_percentage() -> Self

Constructs the canonical Workshop values getPayloadProgressPercentage.

pub fn get_players_in_slot( slot: impl Into<Value>, team: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values getPlayersInSlot. Parameters: slot, team.

pub fn get_players_not_on_objective(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getPlayersNotOnObjective. Parameters: team.

pub fn get_players_on_objective(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values getPlayersOnObjective. Parameters: team.

pub fn horizontal_angle_towards( player: impl Into<Value>, position: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values horizontalAngleTowards. Parameters: player, position.

pub fn is_control_point_locked() -> Self

Constructs the canonical Workshop values isControlPointLocked.

pub fn is_flag_at_base(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values isFlagAtBase. Parameters: team.

pub fn is_flag_being_carried(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values isFlagBeingCarried. Parameters: team.

pub fn is_in_sudden_death() -> Self

Constructs the canonical Workshop values isInSuddenDeath.

pub fn is_match_between_rounds() -> Self

Constructs the canonical Workshop values isMatchBetweenRounds.

pub fn is_match_complete() -> Self

Constructs the canonical Workshop values isMatchComplete.

pub fn is_team_on_defense(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values isTeamOnDefense. Parameters: team.

pub fn local_vector( world_vector: impl Into<Value>, relative_player: impl Into<Value>, transformation: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values localVector. Parameters: world_vector, relative_player, transformation.

pub fn magnitude(vector: impl Into<Value>) -> Self

Constructs the canonical Workshop values magnitude. Parameters: vector.

pub fn sin_deg(angle: impl Into<Value>) -> Self

Constructs the canonical Workshop values sinDeg. Parameters: angle.

pub fn str_contains( string: impl Into<Value>, substring: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values strContains. Parameters: string, substring.

pub fn str_len(string: impl Into<Value>) -> Self

Constructs the canonical Workshop values strLen. Parameters: string.

pub fn tan(angle: impl Into<Value>) -> Self

Constructs the canonical Workshop values tan. Parameters: angle.

pub fn tan_deg(angle: impl Into<Value>) -> Self

Constructs the canonical Workshop values tanDeg. Parameters: angle.

pub fn is_hero_being_played( hero: impl Into<Value>, team: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values isHeroBeingPlayed. Parameters: hero, team.

pub fn team_score(team: impl Into<Value>) -> Self

Constructs the canonical Workshop values teamScore. Parameters: team.

pub fn vertical_angle_towards( player: impl Into<Value>, position: impl Into<Value>, ) -> Self

Constructs the canonical Workshop values verticalAngleTowards. Parameters: player, position.

pub fn backward() -> Self

Constructs the canonical Workshop values backward.

pub fn down() -> Self

Constructs the canonical Workshop values down.

pub fn left() -> Self

Constructs the canonical Workshop values left.

pub fn right() -> Self

Constructs the canonical Workshop values right.

pub fn up() -> Self

Constructs the canonical Workshop values up.

pub fn game_mode(gamemode: impl Into<Value>) -> Self

Constructs the canonical Workshop values gameMode. Parameters: gamemode.

pub fn modulo(value: impl Into<Value>, value_2: impl Into<Value>) -> Self

Constructs the canonical Workshop values modulo. Parameters: value, value_2.

Trait Implementations§

Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Value

Source§

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

Formats the value using the given formatter. Read more
Source§

impl From<&str> for Value

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl From<String> for Value

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for Condition

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl<T: Into<Value>> From<Vec<T>> for Value

Source§

fn from(values: Vec<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Into<Value>, const N: usize> From<[T; N]> for Value

Source§

fn from(values: [T; N]) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for Value

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for Value

Source§

fn from(value: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Value

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for Value

Source§

fn from(value: i8) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for Value

Source§

fn from(value: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Value

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for Value

Source§

fn from(value: i64) -> Self

Converts to this type from the input type.
Source§

impl From<isize> for Value

Source§

fn from(value: isize) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Value

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Value

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Value

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for Value

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for Value

Source§

fn from(value: usize) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Value

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnsafeUnpin for Value

§

impl UnwindSafe for Value

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.