Releases: TIMONz1535/map_logic_controller
Releases · TIMONz1535/map_logic_controller
Workshop Release v3.0
Breaking changes
- Console command
map_logic_resetrenamed tomap_logic_reload. - Output callback arguments now is
(ent, activator, caller, value)instead of(ent, activator, value). You need to check the last argument.
New features
- Added methods Entity.AddOutput Entity.RemoveOutput Entity.GetOutputs with
delayandmax times to firesupport. - The controller is respawned by
PostCleanupMap. - Added helper function
controller:TimerCreatesimilarlycontroller:TimerSimple. This repeats the behavior and arguments from the timer library, but checks the validity of thecontrollerbefore callback. - controller:GetMetaTarget(name|ent|entities) now accepts a list of entities. For example
controller:GetMetaTarget(ents.FindByName("cave_antlion*")). - Added method MetaTarget:IsValid() that returns
trueif at least one nested entity is valid and the controller is valid. This allows you some cases such asSafeRemoveEntity(target)andIsValid(target). However, callingtarget:Remove()actually also checks the validity, and will not cause an error.
Fixes
- Improve the controller design imperfection. Now you can create any output for any entity, even those that incorrectly set the activator and caller values in engine. For example, you can now use
OnLockedUseonfunc_door. - Fixed a script error when creating a MetaTarget after
OnMapLogicInitializedby passing the entity directly.
Workshop Release v2.0
The major refactored version for the Workshop. This is still compatible with old scripts, but their functions need to be placed inside the hook.
Internal Release v1.0
The vanilla version with some hard-coding that has been used on the my server since 31 December 2019 - the rp_pb_industrial17_v2 map release. Still working.