Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not Harms then
- Harms = {}
- Harms.PriorityList = {}
- table.insert(Harms.PriorityList, "First harmonic")
- table.insert(Harms.PriorityList, "Second harmonic")
- //..and so on..they will go up (or down) in this order.
- Harms.HarmList = {}
- //What we do now, is go through our priority list, and create a key/value pair for each of the
- //harmonics there
- for _, harmonic in ipairs(Harms.PriorityList)
- Harms.HarmList[harmonic] = false
- end
- end
- function Harms.SetHarmonic(isAlive)
- Harms.HarmList[harmonic] = isAlive
- end
- function Harms.isAlive(harmonic)
- return Harms.HarmList[harmonic]
- end
- function Harms.GetNext(doIfNotThis)
- for _, harm in ipairs(Harms.PriorityList)
- if Harms.HarmList[harmonic] == doIfNotThis then
- return harmonic
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement