Don't Starve Revision History Viewer

Comparing Six Feet Under (Rev 86935) to All's Well That Maxwell (Rev 88237)

components/freezable.lua

54555657585960
end function Freezable:AddShatterFX(prefab, offset, followsymbol) table.insert(self.fxdata, {prefab=prefab, pt=offset, follow=followsymbol}) end function Freezable:SetShatterFXLevel(level, percent)
54555657585960
end function Freezable:AddShatterFX(prefab, offset, followsymbol) table.insert(self.fxdata, {prefab=prefab, x = offset.x, y=offset.y, z=offset.z, follow=followsymbol}) end function Freezable:SetShatterFXLevel(level, percent)
63646566676869
for k,v in pairs(self.fxchildren) do if v.components.shatterfx then v.components.shatterfx:SetLevel(level) v.components.shatterfx:SetPercentInLevel(percent or 1) end end end
636465666768
for k,v in pairs(self.fxchildren) do if v.components.shatterfx then v.components.shatterfx:SetLevel(level) end end end
74757677787980818283
if fx then if v.follow then local follower = fx.entity:AddFollower() follower:FollowSymbol(self.inst.GUID, v.follow, v.pt.x,v.pt.y,v.pt.z) else self.inst:AddChild(fx) fx.Transform:SetPosition(v.pt.x, v.pt.y, v.pt.z) end table.insert(self.fxchildren, fx) if fx.components.shatterfx then
73747576777879808182
if fx then if v.follow then local follower = fx.entity:AddFollower() follower:FollowSymbol(self.inst.GUID, v.follow, v.x,v.y,v.z) else self.inst:AddChild(fx) fx.Transform:SetPosition(v.x, v.y, v.z) end table.insert(self.fxchildren, fx) if fx.components.shatterfx then
92939495969798
end function Freezable:GetDebugString() return string.format("%s", self.state) end function Freezable:AddColdness(coldness, freezetime)
91929394959697
end function Freezable:GetDebugString() return string.format("%s: %d", self.state, self.coldness) end function Freezable:AddColdness(coldness, freezetime)
130131132133134135136137138139140
g = defaultColor.y+percent*frozenColor.y b = defaultColor.z+percent*frozenColor.z end if self.inst.components.highlight then self.inst.components.highlight:SetAddColour(Vector3(r, g, b) ) else self.inst.AnimState:SetAddColour(r, g, b, 0) end end end
129130131132133134135136137138139140
g = defaultColor.y+percent*frozenColor.y b = defaultColor.z+percent*frozenColor.z end if not self.inst.components.highlight then self.inst:AddComponent("highlight") end self.inst.components.highlight:SetAddColour(Vector3(r, g, b) ) end end
165166167168169170171172
function Freezable:Unfreeze() if (not self.inst.components.health or not self.inst.components.health:IsDead()) and self:IsFrozen() then self.inst:PushEvent("unfreeze") self.state = states.NORMAL self.coldness = 0
165166167168169170
function Freezable:Unfreeze() if (not self.inst.components.health or not self.inst.components.health:IsDead()) and self:IsFrozen() then self.state = states.NORMAL self.coldness = 0
178179180181182183
self.inst.brain:Start() end end end
176177178179180181182
self.inst.brain:Start() end self.inst:PushEvent("unfreeze") end end