mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
Upload
This commit is contained in:
46
lua/entities/logic_weather_off_relay.lua
Normal file
46
lua/entities/logic_weather_off_relay.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
--[[-------------------------------------------------------------------------
|
||||
A weather relay
|
||||
---------------------------------------------------------------------------]]
|
||||
ENT.Type = "point"
|
||||
ENT.Base = "base_point"
|
||||
|
||||
ENT.PrintName = "logic_weather_off_relay"
|
||||
ENT.Author = "Nak"
|
||||
ENT.Information = "Gets fired when weather turned off"
|
||||
ENT.Category = "StormFox2"
|
||||
|
||||
ENT.Editable = false
|
||||
ENT.Spawnable = false
|
||||
ENT.AdminOnly = false
|
||||
|
||||
function ENT:Initialize()
|
||||
self.triggered = false
|
||||
end
|
||||
|
||||
function ENT:GetRequiredWeather()
|
||||
return self.weather_type
|
||||
end
|
||||
|
||||
function ENT:Trigger()
|
||||
self:TriggerOutput("OnTrigger")
|
||||
end
|
||||
|
||||
function ENT:KeyValue( k, v )
|
||||
if k == "OnTrigger" then
|
||||
self:StoreOutput( k, v )
|
||||
elseif k == "weather_type" then
|
||||
self.weather_type = string.lower(v)
|
||||
elseif k == "weather_amount" then
|
||||
self.weather_amount = tonumber(v)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user