mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
@@ -1014,6 +1014,10 @@ function ENT:UpdateWagonNumber()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local controller = {
|
||||||
|
0,0.1,0.2,0.44,0.665,0.76,0.855
|
||||||
|
}
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
function ENT:Think()
|
function ENT:Think()
|
||||||
self.BaseClass.Think(self)
|
self.BaseClass.Think(self)
|
||||||
@@ -1103,7 +1107,7 @@ function ENT:Think()
|
|||||||
|
|
||||||
-- Simulate pressure gauges getting stuck a little
|
-- Simulate pressure gauges getting stuck a little
|
||||||
self:Animate("brake",1-self:GetPackedRatio("CranePosition"),0.00, 0.48, 256,24)
|
self:Animate("brake",1-self:GetPackedRatio("CranePosition"),0.00, 0.48, 256,24)
|
||||||
self:Animate("controller",self:GetPackedRatio("ControllerPosition"),0.148, 0.333, 2,false)
|
self:Animate("controller",controller[self:GetNW2Int("ControllerPosition",0)+1],0.148, 0.333, 2,false)
|
||||||
self:Animate("reverser",self:GetPackedRatio("ReverserPosition"),0.6, 0.4, 4,false)
|
self:Animate("reverser",self:GetPackedRatio("ReverserPosition"),0.6, 0.4, 4,false)
|
||||||
self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.62,0.495,45,3)
|
self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.62,0.495,45,3)
|
||||||
self:Animate("rcureverser",self:GetPackedBool("RCUPosition") and 1 or 0,0,0.5,3,false)
|
self:Animate("rcureverser",self:GetPackedBool("RCUPosition") and 1 or 0,0,0.5,3,false)
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ function ENT:Think()
|
|||||||
-- Feed packed floats
|
-- Feed packed floats
|
||||||
self:SetNW2Int("WrenchMode",self.KVWrenchMode)
|
self:SetNW2Int("WrenchMode",self.KVWrenchMode)
|
||||||
self:SetPackedRatio("CranePosition", 1-Pneumatic.DriverValvePosition/7)
|
self:SetPackedRatio("CranePosition", 1-Pneumatic.DriverValvePosition/7)
|
||||||
self:SetPackedRatio("ControllerPosition", (self.KV.ControllerPosition+3)/7)
|
self:SetNW2Int("ControllerPosition", self.KV.ControllerPosition+3)
|
||||||
self:SetPackedRatio("ReverserPosition", 1-(self.KV.ReverserPosition+1)/2)
|
self:SetPackedRatio("ReverserPosition", 1-(self.KV.ReverserPosition+1)/2)
|
||||||
self:SetPackedBool("RCUPosition", self.KV.RCU > 0)
|
self:SetPackedBool("RCUPosition", self.KV.RCU > 0)
|
||||||
self:SetPackedRatio("BLPressure", Pneumatic.ReservoirPressure/16.0)
|
self:SetPackedRatio("BLPressure", Pneumatic.ReservoirPressure/16.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user