Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. function HTTPTextureReplacer:constructor(element, fileName, textureName, options, force)
  2. if not (fileName and fileName:len() > 0 and (fileName:find(HTTPTextureReplacer.BasePath) or fileName:find(HTTPTextureReplacer.ExternalPath))) then
  3. outputDebugString("Bad Argument @ HTTPTextureReplacer:constructor #2")
  4. outputDebugString(fileName)
  5. end
  6. TextureReplacer.constructor(self, element, textureName, options, force)
  7. self.m_PathType = 1
  8. if fileName:find(HTTPTextureReplacer.ExternalPath) then self.m_PathType = 2 end
  9. if self.m_PathType == 2 then
  10. self.m_FileName = fileName:gsub(HTTPTextureReplacer.ExternalPath, "")
  11. else
  12. self.m_FileName = fileName:gsub(HTTPTextureReplacer.BasePath, "")
  13. end
  14. self.m_PixelFileName = ("%s.pixels"):format(self.m_FileName)
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement