added highlighting to onLoad
This commit is contained in:
parent
83dd3ade5c
commit
98722d7135
@ -52,6 +52,8 @@ local colorsForClasses = {
|
||||
Survivor = Color.new(190 / 255, 30 / 255, 45 / 255)
|
||||
}
|
||||
|
||||
local highlightColor = { 0, 200 / 255, 200 / 255 }
|
||||
|
||||
function onSave()
|
||||
return JSON.encode({ class = class, symbol = symbol })
|
||||
end
|
||||
@ -63,6 +65,9 @@ function onLoad(savedData)
|
||||
|
||||
updateDisplay()
|
||||
addContextMenu()
|
||||
if self.hasTag("Temporary") then
|
||||
self.highlightOn(highlightColor)
|
||||
end
|
||||
|
||||
-- get random seed from Global so all are different
|
||||
math.randomseed(Global.call("getRandomSeed"))
|
||||
@ -274,7 +279,7 @@ end
|
||||
|
||||
function addTemporaryStatus()
|
||||
self.addTag("Temporary")
|
||||
self.highlightOn({0, 200/255, 200/255})
|
||||
self.highlightOn(highlightColor)
|
||||
end
|
||||
|
||||
function isClassName(str)
|
||||
|
Loading…
Reference in New Issue
Block a user