User:Max34/SourceRenewed: Difference between revisions
Jump to navigation
Jump to search
Note:Perhaps in the future it will be renamed to point_sound. Or not.
Code Fix:Fixed a crash when the filters tries to check an already deleted entity. If the entity does not exist when checking, the comparison will be made with an empty value.
Code Fix:Fixed a bug that caused the deleted logic_branch to be treated as false instead of removing it from the list.
Note:The entity now uses a new optimization system. Since this system is not fully implemented, the entity is partially broken, for now.
(Created page with "{{DISPLAYTITLE:<b style="user-select:none; font-family:consolas; text-transform:uppercase"><span style="background:black; padding:0 3px; border-radius:6px;">Sou<span style="co...") |
No edit summary |
||
Line 2: | Line 2: | ||
<b style="pointer-events:none; user-select:none; font-family:consolas; font-size:15px; background:black; width:16px; height:16px; display:inline-flex; justify-content:center; align-items:center; border-radius:3px; line-height:0"><span style="color:white; position:relative; z-index:1">S</span><span style="color:rgb(208,48,48); margin-left:-3px">R</span></b> '''SourceRenewed''' (working title) is a project based on the {{Src13sp|4}}. Adds some new and useful things to the engine and improves the existing ones. However, unlike {{Mapbase|4}}, this project is not meant to be fully backward compatible with any Source branch. Made by [[User:Max34|Max_34]]. | <b style="pointer-events:none; user-select:none; font-family:consolas; font-size:15px; background:black; width:16px; height:16px; display:inline-flex; justify-content:center; align-items:center; border-radius:3px; line-height:0"><span style="color:white; position:relative; z-index:1">S</span><span style="color:rgb(208,48,48); margin-left:-3px">R</span></b> '''SourceRenewed''' (working title) is a project based on the {{Src13sp|4}}. Adds some new and useful things to the engine and improves the existing ones. However, unlike {{Mapbase|4}}, this project is not meant to be fully backward compatible with any Source branch. Made by [[User:Max34|Max_34]]. | ||
== Changes in the common class of all entities == | |||
{{Table | {{Table | ||
| {{ | | {{tr| | ||
{{ | {{th|radius=3px 0 0 0| Parameters }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th|radius=0 3px 0 0| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Entity State}} }} | ||
{{ | {{td|align=center| choice }} | ||
{{ | {{td| {{Code|preset=1|Disabled}} or {{Code|preset=1|Enabled}} (by default). Whether the entity is enabled or disabled when spawning. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{th| Inputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Enable}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Enables an entity. }} | ||
{{ | {{td|rowspan=3| This entity state system is something new and has nothing to do with the deprecated "Start Disabled". For now, this only works with entities that have been reworked.<br>{{Todo}}<br>☐ Figure out if this “Read-only” is worth it, or is it better to disable any I/O interaction when the entity is disabled. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Toggle}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Toggles the state of an entity between enabled and disabled. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Disable}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Disables an entity. When an entity is disabled, it becomes “Read-only”. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|SetTeam}}</s><br>{{Code|preset=1|SetGroup}} }} | ||
{{ | {{td|align=center| integer }} | ||
{{ | {{td| Sets the group for the entity. By default, all entities are in group 0. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|FireUser1}}</s><br>{{Code|preset=1|FireCustom1}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires the {{Code|preset=1|OnCustom1}} event if the entity is enabled. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|FireUser2}}</s><br>{{Code|preset=1|FireCustom2}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires the {{Code|preset=1|OnCustom2}} event if the entity is enabled. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|FireUser3}}</s><br>{{Code|preset=1|FireCustom3}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires the {{Code|preset=1|OnCustom3}} event if the entity is enabled. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|FireUser4}}</s><br>{{Code|preset=1|FireCustom4}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires the {{Code|preset=1|OnCustom4}} event if the entity is enabled. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{th| Outputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnSpawn}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fired when the entity spawns. }} | ||
{{ | {{td| {{Todo}}<br>☐ Make sure this event happens at the right time. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnKilled}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fired when the entity has been deleted. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|OnUser1}}</s><br>{{Code|preset=1|OnCustom1}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|FireCustom1}} input. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|OnUser2}}</s><br>{{Code|preset=1|OnCustom2}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|FireCustom2}} input. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|OnUser3}}</s><br>{{Code|preset=1|OnCustom3}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|FireCustom3}} input. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center|radius=0 0 0 3px| <s>{{Code|preset=0|OnUser4}}</s><br>{{Code|preset=1|OnCustom4}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|FireCustom4}} input. }} | ||
{{ | {{td|radius=0 0 3px 0}} | ||
}} | }} | ||
}} | }} | ||
== Env Entities == | |||
=== env_sound === | === env_sound === | ||
<p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|ambient_generic}}</p> | <p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|ambient_generic}}</p> | ||
Line 124: | Line 123: | ||
== Filter Entities == | |||
{{Code Fix|Fixed a crash when the filters tries to check an already deleted entity. If the entity does not exist when checking, the comparison will be made with an empty value.}} | |||
<div style="display:flex; gap:28px"> | |||
<div> | |||
=== filter_class === | === filter_class === | ||
<p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|filter_activator_class}}</p> | <p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|filter_activator_class}}</p> | ||
</div> | |||
<div> | |||
=== filter_group === | === filter_group === | ||
<p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|filter_activator_team}}</p> | <p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|filter_activator_team}}</p> | ||
</div> | |||
<div> | |||
=== filter_name === | === filter_name === | ||
<p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|filter_activator_name}}</p> | <p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|filter_activator_name}}</p> | ||
{{ | </div> | ||
</div> | |||
{{Table | |||
| {{tr| | |||
{{th|radius=3px 0 0 0| Parameters }} | |||
{{th| Type }} | |||
{{th| {{int:listfiles_description}} }} | |||
{{th|radius=0 3px 0 0| Notes }} | |||
}} | |||
{{tr| | |||
{{td|align=center| {{Code|preset=1|Filter}} }} | |||
{{td|align=center| string }} | |||
{{td| . }} | |||
{{td}} | |||
}} | |||
{{tr| | |||
{{td|align=center| {{Code|preset=1|Filtering Type}} }} | |||
{{td|align=center| choice }} | |||
{{td| . }} | |||
{{td}} | |||
}} | |||
{{tr| | |||
{{th| Inputs }} | |||
{{th| Type }} | |||
{{th| {{int:listfiles_description}} }} | |||
{{th| Notes }} | |||
}} | |||
{{tr| | |||
{{td|align=center| {{Code|preset=1|GetFilter}} }} | |||
{{td|align=center| void }} | |||
{{td| . }} | |||
{{td| “Read-only” event. }} | |||
}} | |||
{{tr| | |||
{{td|align=center| {{Code|preset=1|SetFilter}} }} | |||
{{td|align=center| string }} | |||
{{td| . }} | |||
{{td}} | |||
}} | |||
{{tr| | |||
{{td|align=center| {{Code|preset=1|FilterActivator}} }} | |||
{{td|align=center| void }} | |||
{{td| . }} | |||
{{td}} | |||
}} | |||
{{tr| | |||
{{td|align=center| {{Code|preset=1|FilterCaller}} }} | |||
{{td|align=center| void }} | |||
{{td| . }} | |||
{{td}} | |||
}} | |||
{{tr| | |||
{{th| Outputs }} | |||
{{th| Type }} | |||
{{th| {{int:listfiles_description}} }} | |||
{{th| Notes }} | |||
}} | |||
{{tr| | |||
{{td|align=center| {{Code|preset=1|OnGetFilter}} }} | |||
{{td|align=center| string }} | |||
{{td| . }} | |||
{{td| “Read-only” event. }} | |||
}} | |||
{{tr| | |||
{{td|align=center| {{Code|preset=1|OnFail}} }} | |||
{{td|align=center| void }} | |||
{{td| . }} | |||
{{td}} | |||
}} | |||
{{tr| | |||
{{td|align=center|radius=0 0 0 3px| {{Code|preset=1|OnPass}} }} | |||
{{td|align=center| void }} | |||
{{td| . }} | |||
{{td|radius=0 0 3px 0}} | |||
}} | |||
}} | |||
== Logic Entities == | |||
=== logic_auto === | === logic_auto === | ||
* Not edict anymore. | * Not edict anymore. | ||
Line 150: | Line 229: | ||
=== logic_branch === | === logic_branch === | ||
{{Table | {{Table | ||
| {{ | | {{tr| | ||
{{ | {{th|radius=3px 0 0 0| Parameters }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th|radius=0 3px 0 0| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Initial value}} }} | ||
{{ | {{td|align=center| float }} | ||
{{ | {{td| Initial branch value. All negative numbers are {{Code|preset=1|false}}; all positive {{Code|preset=1|true}}; 0 depending on setting {{Code|preset=1|Treat 0 as}}. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Treat 0 as}} }} | ||
{{ | {{td|align=center| choice }} | ||
{{ | {{td| {{Code|preset=1|false}} (by default), {{Code|preset=1|indeterminate}} (for ternary mode) or {{Code|preset=1|true}}. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{th| Inputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|GetValue}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Test}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|SetValue}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|SetValueTest}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|Toggle}}</s><br>{{Code|preset=1|ToggleValue}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|ToggleTest}}</s><br>{{Code|preset=1|ToggleValueTest}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{th| Outputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnGetValue}} }} | ||
{{ | {{td|align=center| float }} | ||
{{ | {{td| . }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnFalse}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnIndeterminate}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center|radius=0 0 0 3px| {{Code|preset=1|OnTrue}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td|radius=0 0 3px 0}} | ||
}} | }} | ||
}} | }} | ||
Line 255: | Line 334: | ||
=== logic_compare === | === logic_compare === | ||
{{Table | {{Table | ||
| {{ | | {{tr| | ||
{{ | {{th|radius=3px 0 0 0| Parameters }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th|radius=0 3px 0 0| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|Initial value}}</s><br>{{Code|preset=1|First value}} }} | ||
{{ | {{td|align=center| string }} | ||
{{ | {{td| Initial first value. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|Compare value}}</s><br>{{Code|preset=1|Second value}} }} | ||
{{ | {{td|align=center| string }} | ||
{{ | {{td| The value to compare against. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{th| Inputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|GetFirstValue}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|GetSecondValue}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|SetValue}}</s><br>{{Code|preset=1|SetFirstValue}} }} | ||
{{ | {{td|align=center| string }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|SetCompareValue}}</s><br>{{Code|preset=1|SetSecondValue}} }} | ||
{{ | {{td|align=center| string }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|CompareInt}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|Compare}}</s><br>{{Code|preset=1|CompareFloat}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|CompareString}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{th| Outputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnGetFirstValue}} }} | ||
{{ | {{td|align=center| string }} | ||
{{ | {{td| . }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnGetSecondValue}} }} | ||
{{ | {{td|align=center| string }} | ||
{{ | {{td| . }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnEqual}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnNotEqual}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnLess}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnGreater}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnLessOrEqual}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center|radius=0 0 0 3px| {{Code|preset=1|OnGreaterOrEqual}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| . }} | ||
{{ | {{td|radius=0 0 3px 0}} | ||
}} | }} | ||
}} | }} | ||
Line 385: | Line 464: | ||
=== logic_relay === | === logic_relay === | ||
{{Table | {{Table | ||
| {{ | | {{tr| | ||
{{ | {{th|radius=3px 0 0 0| Inputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th|radius=0 3px 0 0| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|Trigger}}</s><br>{{Code|preset=1|Trigger1}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires the {{Code|preset=1|OnTrigger1}} event. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Trigger2}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires the {{Code|preset=1|OnTrigger2}} event. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Trigger3}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires the {{Code|preset=1|OnTrigger3}} event. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Trigger4}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires the {{Code|preset=1|OnTrigger4}} event. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{th| Outputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| <s>{{Code|preset=0|OnTrigger}}</s><br>{{Code|preset=1|OnTrigger1}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|Trigger1}} input. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnTrigger2}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|Trigger2}} input. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnTrigger3}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|Trigger3}} input. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center|radius=0 0 0 3px| {{Code|preset=1|OnTrigger4}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|Trigger3}} input. }} | ||
{{ | {{td|radius=0 0 3px 0}} | ||
}} | }} | ||
}} | }} | ||
Line 457: | Line 536: | ||
== Math Entities == | |||
=== math_calculator === | === math_calculator === | ||
<p style="opacity:.6; margin-top:-8px">New entity.</p> | <p style="opacity:.6; margin-top:-8px">New entity.</p> | ||
{{Table | {{Table | ||
| {{ | | {{tr| | ||
{{ | {{th|radius=3px 0 0 0| Inputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th|radius=0 3px 0 0| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|GetValue}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Get calculator value. Fires the {{Code|preset=1|OnGetValue}} event. }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|GetParity}} }} | ||
{{ | {{td|align=center| void }} | ||
{{ | {{td| Get the parity of a calculator value. Fires {{Code|preset=1|OnValueEven}} if the number is even and {{Code|preset=1|OnValueOdd}} if it is odd. If the value is a {{Code|preset=1|float}}, the non-integer part of the value will be ignored. }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|RoundValue}} }} | ||
{{ | {{td|align=center| integer or void }} | ||
{{ | {{td| Rounds calculator value: {{Code|1=0.3 = 0}}, {{Code|1=0.8 = 1}}. You can also specify a number that will determine at what level to round the number. For example, if the calculator number is 256 and the input value is 2 (comparable to the number of zeros), then the number will be rounded up to 300. This also works with negative numbers: if your number is 0.18, and the input value is -1, then the result will be 0.2. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|SetValue}} }} | ||
{{ | {{td|align=center| string, float or void }} | ||
{{ | {{td| Sets the value of the calculator. }} | ||
{{ | {{td|rowspan=7|2=These Inputs support constants. For example, to set the value of the calculator to π (3.14159…), you can use {{Code|SetValue pi}}, or if you want to subtract e (2.71828…) from the calculator value, you can use {{Code|Subtract e}}. | ||
<table align="center" class="standard-table"><caption>Available constants</caption> | <table align="center" class="standard-table"><caption>Available constants</caption> | ||
<tr><th>Constant</th><th>{{int:listfiles_description}}</th><th>Value</th></tr> | <tr><th>Constant</th><th>{{int:listfiles_description}}</th><th>Value</th></tr> | ||
Line 506: | Line 586: | ||
</table>}} | </table>}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Add}} }} | ||
{{ | {{td|align=center| string, float or void }} | ||
{{ | {{td| Adds the entered value to the calculator. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Subtract}} }} | ||
{{ | {{td|align=center| string, float or void }} | ||
{{ | {{td| Subtracts the entered value from the calculator value. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Multiply}} }} | ||
{{ | {{td|align=center| string, float or void }} | ||
{{ | {{td| Multiplies the calculator value by the entered value. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Divide}} }} | ||
{{ | {{td|align=center| string, float or void }} | ||
{{ | {{td| Divides the calculator value by the entered value. Completely ignores the value 0. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Power}} }} | ||
{{ | {{td|align=center| string, float or void }} | ||
{{ | {{td| Raises the calculator value to the entered power. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|Modulo}} }} | ||
{{ | {{td|align=center| string, float or void }} | ||
{{ | {{td| Calculates the remainder of dividing the entered number by the current calculator value. Completely ignores the value 0. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{th| Outputs }} | ||
{{ | {{th| Type }} | ||
{{ | {{th| {{int:listfiles_description}} }} | ||
{{ | {{th| Notes }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnValueChanged}} }} | ||
{{ | {{td|align=center| float }} | ||
{{ | {{td| Fires when the calculator value has been changed. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnValueNotChanged}} }} | ||
{{ | {{td|align=center| float }} | ||
{{ | {{td| Fires when the calculator value has not been changed. This only happens if one of the Inputs that interacts with the calculator value has been used. Therefore, the {{Code|preset=1|GetValue}} and {{Code|preset=1|GetParity}} events do not fire this Output. }} | ||
{{ | {{td}} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnGetValue}} }} | ||
{{ | {{td|align=center| float }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|GetValue}} input. }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center| {{Code|preset=1|OnValueEven}} }} | ||
{{ | {{td|align=center| float }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|GetParity}} input if the value is even. }} | ||
{{ | {{td| “Read-only” event. }} | ||
}} | }} | ||
{{ | {{tr| | ||
{{ | {{td|align=center|radius=0 0 0 3px| {{Code|preset=1|OnValueOdd}} }} | ||
{{ | {{td|align=center| float }} | ||
{{ | {{td| Fires in response to {{Code|preset=1|GetParity}} input if the value is odd. }} | ||
{{ | {{td|radius=0 0 3px 0| “Read-only” event. }} | ||
}} | }} | ||
}} | }} | ||
Line 596: | Line 676: | ||
* [[env_beverage]] | * [[env_beverage]] | ||
* [[item_sodacan]] | * [[item_sodacan]] | ||
* [[math_colorblend]] | |||
* [[filter_base]] | * [[filter_base]] | ||
* [[filter_multi]] | * [[filter_multi]] | ||
Line 601: | Line 682: | ||
* [[point_servercommand]] | * [[point_servercommand]] | ||
* [[logic_lineto]] | * [[logic_lineto]] | ||
* [[game_end]] | |||
== Other == | == Other == |
Revision as of 03:44, 16 June 2023
SR SourceRenewed (working title) is a project based on the Source 2013 Singleplayer. Adds some new and useful things to the engine and improves the existing ones. However, unlike
Mapbase, this project is not meant to be fully backward compatible with any Source branch. Made by Max_34.
Changes in the common class of all entities
Parameters | Type | Description | Notes |
---|---|---|---|
Entity State | choice | Disabled or Enabled (by default). Whether the entity is enabled or disabled when spawning. | |
Inputs | Type | Description | Notes |
Enable | void | Enables an entity. | This entity state system is something new and has nothing to do with the deprecated "Start Disabled". For now, this only works with entities that have been reworked. [Todo] ☐ Figure out if this “Read-only” is worth it, or is it better to disable any I/O interaction when the entity is disabled. |
Toggle | void | Toggles the state of an entity between enabled and disabled. | |
Disable | void | Disables an entity. When an entity is disabled, it becomes “Read-only”. | |
SetGroup |
integer | Sets the group for the entity. By default, all entities are in group 0. | |
FireCustom1 |
void | Fires the OnCustom1 event if the entity is enabled. | |
FireCustom2 |
void | Fires the OnCustom2 event if the entity is enabled. | |
FireCustom3 |
void | Fires the OnCustom3 event if the entity is enabled. | |
FireCustom4 |
void | Fires the OnCustom4 event if the entity is enabled. | |
Outputs | Type | Description | Notes |
OnSpawn | void | Fired when the entity spawns. | [Todo] ☐ Make sure this event happens at the right time. |
OnKilled | void | Fired when the entity has been deleted. | |
OnCustom1 |
void | Fires in response to FireCustom1 input. | |
OnCustom2 |
void | Fires in response to FireCustom2 input. | |
OnCustom3 |
void | Fires in response to FireCustom3 input. | |
OnCustom4 |
void | Fires in response to FireCustom4 input. |
Env Entities
env_sound
Old name: ambient_generic

Todo: More documentation.
env_spark
Todo: More documentation.
Filter Entities

filter_class
Old name: filter_activator_class
filter_group
Old name: filter_activator_team
filter_name
Old name: filter_activator_name
Parameters | Type | Description | Notes |
---|---|---|---|
Filter | string | . | |
Filtering Type | choice | . | |
Inputs | Type | Description | Notes |
GetFilter | void | . | “Read-only” event. |
SetFilter | string | . | |
FilterActivator | void | . | |
FilterCaller | void | . | |
Outputs | Type | Description | Notes |
OnGetFilter | string | . | “Read-only” event. |
OnFail | void | . | |
OnPass | void | . |
Logic Entities
logic_auto
- Not edict anymore.
Todo: More documentation.
logic_autosave
Todo: More documentation.
logic_branch
Parameters | Type | Description | Notes |
---|---|---|---|
Initial value | float | Initial branch value. All negative numbers are false; all positive true; 0 depending on setting Treat 0 as. | |
Treat 0 as | choice | false (by default), indeterminate (for ternary mode) or true. | |
Inputs | Type | Description | Notes |
GetValue | void | . | “Read-only” event. |
Test | void | . | |
SetValue | void | . | |
SetValueTest | void | . | |
ToggleValue |
void | . | |
ToggleValueTest |
void | . | |
Outputs | Type | Description | Notes |
OnGetValue | float | . | “Read-only” event. |
OnFalse | void | . | |
OnIndeterminate | void | . | |
OnTrue | void | . |
logic_branch_manager
Old name: logic_branch_listener.

Todo: More documentation.
logic_case
Todo: More documentation.
logic_compare
Parameters | Type | Description | Notes |
---|---|---|---|
First value |
string | Initial first value. | |
Second value |
string | The value to compare against. | |
Inputs | Type | Description | Notes |
GetFirstValue | void | . | “Read-only” event. |
GetSecondValue | void | . | “Read-only” event. |
SetFirstValue |
string | . | |
SetSecondValue |
string | . | |
CompareInt | void | . | |
CompareFloat |
void | . | |
CompareString | void | . | |
Outputs | Type | Description | Notes |
OnGetFirstValue | string | . | “Read-only” event. |
OnGetSecondValue | string | . | “Read-only” event. |
OnEqual | void | . | |
OnNotEqual | void | . | |
OnLess | void | . | |
OnGreater | void | . | |
OnLessOrEqual | void | . | |
OnGreaterOrEqual | void | . |
logic_console
New entity.
Todo: More documentation.
logic_relay
Inputs | Type | Description | Notes |
---|---|---|---|
Trigger1 |
void | Fires the OnTrigger1 event. | |
Trigger2 | void | Fires the OnTrigger2 event. | |
Trigger3 | void | Fires the OnTrigger3 event. | |
Trigger4 | void | Fires the OnTrigger4 event. | |
Outputs | Type | Description | Notes |
OnTrigger1 |
void | Fires in response to Trigger1 input. | |
OnTrigger2 | void | Fires in response to Trigger2 input. | |
OnTrigger3 | void | Fires in response to Trigger3 input. | |
OnTrigger4 | void | Fires in response to Trigger3 input. |
logic_string
New entity.
Todo: More documentation.
logic_timer
Todo: More documentation.
Math Entities
math_calculator
New entity.
Inputs | Type | Description | Notes |
---|---|---|---|
GetValue | void | Get calculator value. Fires the OnGetValue event. | “Read-only” event. |
GetParity | void | Get the parity of a calculator value. Fires OnValueEven if the number is even and OnValueOdd if it is odd. If the value is a float, the non-integer part of the value will be ignored. | “Read-only” event. |
RoundValue | integer or void | Rounds calculator value: 0.3 = 0, 0.8 = 1. You can also specify a number that will determine at what level to round the number. For example, if the calculator number is 256 and the input value is 2 (comparable to the number of zeros), then the number will be rounded up to 300. This also works with negative numbers: if your number is 0.18, and the input value is -1, then the result will be 0.2. | |
SetValue | string, float or void | Sets the value of the calculator. | |
Add | string, float or void | Adds the entered value to the calculator. | |
Subtract | string, float or void | Subtracts the entered value from the calculator value. | |
Multiply | string, float or void | Multiplies the calculator value by the entered value. | |
Divide | string, float or void | Divides the calculator value by the entered value. Completely ignores the value 0. | |
Power | string, float or void | Raises the calculator value to the entered power. | |
Modulo | string, float or void | Calculates the remainder of dividing the entered number by the current calculator value. Completely ignores the value 0. | |
Outputs | Type | Description | Notes |
OnValueChanged | float | Fires when the calculator value has been changed. | |
OnValueNotChanged | float | Fires when the calculator value has not been changed. This only happens if one of the Inputs that interacts with the calculator value has been used. Therefore, the GetValue and GetParity events do not fire this Output. | |
OnGetValue | float | Fires in response to GetValue input. | “Read-only” event. |
OnValueEven | float | Fires in response to GetParity input if the value is even. | “Read-only” event. |
OnValueOdd | float | Fires in response to GetParity input if the value is odd. | “Read-only” event. |
math_color
New entity. Also combines the capabilities of math_colorblend.
Color constructor. Allows you to make color32 from separate integers. This color32 can be used as a whole or separately.
Todo: More documentation.
math_counter

Todo: More documentation.
math_remap
Todo: More documentation.
Deleted entities
- logic_active_autosave
- trigger_once
- multisource
- logic_multicompare
- env_beverage
- item_sodacan
- math_colorblend
- filter_base
- filter_multi
- point_clientcommand
- point_servercommand
- logic_lineto
- game_end
Other
- Minor optimization to reduce entdata usage.
- Added more support for converting from one value format to another.
- New Hammer (in development).