Registers the condition types that come with the Conditions plugin: 'steamid', 'model', 'health', 'armor' and 'active_weapon'.
Summary
Functions
Functions
Compares the player's SteamID with the stored value using the chosen operator.
Parameters
- target Player
- data Map condition parameters: operator, steamid
Returns
- Boolean result of the comparison, false if the operator or the value is not set
Compares the player's model with the stored value using the chosen operator.
Parameters
- target Player
- data Map condition parameters: operator, model
Returns
- Boolean result of the comparison, false if the operator or the value is not set
Compares the player's health with the stored value using the chosen operator.
Parameters
- target Player
- data Map condition parameters: operator, health
Returns
- Boolean result of the comparison, false if the operator or the value is not set
Compares the player's armor with the stored value using the chosen operator.
Parameters
- target Player
- data Map condition parameters: operator, armor
Returns
- Boolean result of the comparison, false if the operator or the value is not set
Compares the class of the player's active weapon with the stored value using the chosen operator.
Parameters
- target Player
- data Map condition parameters: operator, weapon
Returns
- Boolean result of the comparison, false if the operator or the value is not set or the player has no valid active weapon
Builds the arguments for the text of the condition node: the operator symbol and the SteamID followed by the player's name.
Parameters
- panel Panel condition node, its parameters are stored in panel.data
- _data Map the registered condition table
Returns
- Map operator and steam_id, each an empty string while it is not set
Builds the arguments for the text of the condition node: the operator symbol and the model path.
Parameters
- panel Panel condition node, its parameters are stored in panel.data
- _data Map the registered condition table
Returns
- Map operator and model, each an empty string while it is not set
Builds the arguments for the text of the condition node: the operator symbol and the health value.
Parameters
- panel Panel condition node, its parameters are stored in panel.data
- _data Map the registered condition table
Returns
- Map operator and health, each an empty string while it is not set
Builds the arguments for the text of the condition node: the operator symbol and the armor value.
Parameters
- panel Panel condition node, its parameters are stored in panel.data
- _data Map the registered condition table
Returns
- Map operator and armor, each an empty string while it is not set
Builds the arguments for the text of the condition node: the operator symbol and the weapon class.
Parameters
- panel Panel condition node, its parameters are stored in panel.data
- _data Map the registered condition table
Returns
- Map operator and weapon, each an empty string while it is not set
set_parameters(id, data, panel, _menu, _parent)
shared plugins/conditions/plugin/lib/sh_default_conditions.lua:39Asks for a SteamID with a text prompt and stores it in the node data. Prompts again if the input does not start with 'STEAM_'.
Parameters
- id String condition id
- data Map the registered condition table
- panel Panel condition node that is being edited
- _menu Panel optional, defaults to
nilcontext menu the option was picked from, unused - _parent Panel optional, defaults to
nilthe fl_conditions panel, unused
set_parameters(id, data, panel, _menu, _parent)
shared plugins/conditions/plugin/lib/sh_default_conditions.lua:88Asks for a model path with a text prompt and stores it in the node data. Prompts again if the input does not start with 'models'.
Parameters
- id String condition id
- data Map the registered condition table
- panel Panel condition node that is being edited
- _menu Panel optional, defaults to
nilcontext menu the option was picked from, unused - _parent Panel optional, defaults to
nilthe fl_conditions panel, unused
set_parameters(_id, data, panel, _menu, _parent)
shared plugins/conditions/plugin/lib/sh_default_conditions.lua:136Asks for a health value with a text prompt and stores it in the node data as a number.
Parameters
- _id String condition id
- data Map the registered condition table
- panel Panel condition node that is being edited
- _menu Panel optional, defaults to
nilcontext menu the option was picked from, unused - _parent Panel optional, defaults to
nilthe fl_conditions panel, unused
set_parameters(_id, data, panel, _menu, _parent)
shared plugins/conditions/plugin/lib/sh_default_conditions.lua:180Asks for an armor value with a text prompt and stores it in the node data as a number.
Parameters
- _id String condition id
- data Map the registered condition table
- panel Panel condition node that is being edited
- _menu Panel optional, defaults to
nilcontext menu the option was picked from, unused - _parent Panel optional, defaults to
nilthe fl_conditions panel, unused
set_parameters(_id, data, panel, _menu, _parent)
shared plugins/conditions/plugin/lib/sh_default_conditions.lua:230Asks for a weapon class with a text prompt and stores it in the node data.
Parameters
- _id String condition id
- data Map the registered condition table
- panel Panel condition node that is being edited
- _menu Panel optional, defaults to
nilcontext menu the option was picked from, unused - _parent Panel optional, defaults to
nilthe fl_conditions panel, unused