Advertisement
mikebald

Minecolonies Base

Mar 15th, 2023
662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  -- Startup Stuff
  2. m = peripheral.wrap("top")
  3. m.setTextScale(1.0 )
  4. -- End Startup Stuff
  5.  
  6. local WorkingStatus = {
  7.     ["Working"] = "Working",
  8.     ["Farming"] = "Working",
  9.     ["Delivering"] = "Working",
  10.     ["Mining"] = "Working",
  11.     ["Composting"] = "Working",
  12.     ["Searching for trees"] = "Working"
  13. }
  14.  
  15. local JobColor = {
  16.     ["Knight"] = colors.magenta,
  17.     ["Courier"] = colors.yellow,
  18.     ["Archer"] = colors.pink,
  19.     ["Builder"] = colors.brown,
  20.     ["Druid"] = colors.lime,
  21.     ["Enchanter"] = colors.purple,
  22.     ["Farmer"] = colors.cyan,
  23.     ["Student"] = colors.orange,
  24.     ["Researcher"] = colors.lightBlue        
  25. }
  26.  
  27. function SortJob(a, b)
  28.     if (a == nil or a["job"] == nil) return false
  29.     if (b == nil or b["job"] == nil) return false
  30.     return a["job"] < b["job"]
  31. end
  32.  
  33. function FirstName(name)
  34.     returnStr = ""
  35.     for i=1, #name do
  36.         local char = string.sub(name, i, i)
  37.         if (char == " " or i == 9) then
  38.             return returnStr
  39.         end
  40.         returnStr = returnStr .. char
  41.     end
  42.     return returnStr
  43. end
  44.  
  45. function Round(num)
  46.     local mult = 10 -- # of places
  47.     return math.floor(num* mult + 0.5) / mult
  48. end
  49.  
  50. --while true do
  51.     ShowCitizens()
  52.     sleep(5)
  53. --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement