Combine Monitor s2120 entity
Entity defined in plugin/entities/entities/cw_combineaccessmonitor
Part of Combine Devices
Shared definition of the cw_combineaccessmonitor entity of the Combine Devices plugin, an admin-only spawnable
entity named Combine Monitor s2120.
Sets up the networked strings for the three text lines and the access level, and the status int.
Summary
Methods
status).TRANSMIT_ALWAYS, so the monitor is networked to every client.Methods
ENT:CanTool(player, trace, tool)
server gamemodes/cwhl2rp/plugins/combinedevices/plugin/entities/entities/cw_combineaccessmonitor/init.lua:49Allows every tool on the monitor.
Parameters
- player
- trace
- tool
Returns
- Boolean Always
true
ENT:DrawTranslucent()
client gamemodes/cwhl2rp/plugins/combinedevices/plugin/entities/entities/cw_combineaccessmonitor/cl_init.lua:93Draws the monitor and its screen: the three text lines and access level, or a flashing error.
Nearby players also see random binary on the error screen. Destroyed monitors show no screen.
ENT:Initialize()
shared gamemodes/cwhl2rp/plugins/combinedevices/plugin/entities/entities/cw_combineaccessmonitor/init.lua:13On the server
Sets the small Combine monitor model and physics, with 1 health and the normal status.
On the client
Creates the render target and scanline material the monitor's screen is drawn with.
Defined in
ENT:OnTakeDamage(damageInfo)
server gamemodes/cwhl2rp/plugins/combinedevices/plugin/entities/entities/cw_combineaccessmonitor/init.lua:54Destroys the monitor's screen with sparks and broken glass once its health runs out.
Parameters
- damageInfo
ENT:SetStatus(int)
server gamemodes/cwhl2rp/plugins/combinedevices/plugin/entities/entities/cw_combineaccessmonitor/init.lua:42Sets the monitor's status in the networked int 5.
Parameters
- int Number 0 for normal, 1 for destroyed (screen off) or 2 for the flashing error screen
ENT:SetupDataTables()
shared gamemodes/cwhl2rp/plugins/combinedevices/plugin/entities/entities/cw_combineaccessmonitor/shared.lua:20Sets up the networked strings 0 to 2 (the three text lines), 3 (the access level) and int 5 (status).
The status is 0 for normal, 1 for destroyed and 2 for error.
ENT:UpdateTransmitState()
server gamemodes/cwhl2rp/plugins/combinedevices/plugin/entities/entities/cw_combineaccessmonitor/init.lua:35Returns TRANSMIT_ALWAYS, so the monitor is networked to every client.
Returns
- Number
TRANSMIT_ALWAYS