SHOW:
|
|
- or go back to the newest paste.
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 | - | function GetHappiness(happiness) |
22 | + | ["Farmer"] = colors.cyan, |
23 | ["Student"] = colors.orange, | |
24 | - | happiness = math.floor(happiness * mult + 0.5) / mult |
24 | + | ["Researcher"] = colors.lightBlue |
25 | - | if (happiness == 10.0) then |
25 | + | } |
26 | - | m.setTextColor(colors.green) |
26 | + | |
27 | - | else |
27 | + | |
28 | - | m.setTextColor(colors.pink) |
28 | + | if (a == nil or a["job"] == nil) return false |
29 | if (b == nil or b["job"] == nil) return false | |
30 | - | m.write(happiness) |
30 | + | |
31 | - | end |
31 | + | |
32 | ||
33 | - | function GetJobStatus(status) |
33 | + | |
34 | - | local statusText = { |
34 | + | |
35 | - | ["Working"] = "Working", |
35 | + | |
36 | - | ["Farming"] = "Working", |
36 | + | |
37 | - | ["Delivering"] = "Working", |
37 | + | |
38 | - | ["Mining"] = "Working", |
38 | + | |
39 | - | ["Composting"] = "Working", |
39 | + | |
40 | - | ["Searching for trees"] = "Working" |
40 | + | |
41 | - | } |
41 | + | |
42 | - | |
42 | + | |
43 | - | if (statusText[status] == nil) then |
43 | + | |
44 | - | m.setTextColor(colors.red) |
44 | + | |
45 | - | m.write(status) |
45 | + | function Round(num) |
46 | - | else |
46 | + | |
47 | - | m.setTextColor(colors.green) |
47 | + | return math.floor(num* mult + 0.5) / mult |
48 | - | m.write(statusText[status]) |
48 | + | |
49 | ||
50 | - | |
50 | + | --while true do |
51 | ShowCitizens() | |
52 | sleep(5) | |
53 | - | function SetJobColor(job) |
53 | + | --end |