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)
|
Survivor = Color.new(190 / 255, 30 / 255, 45 / 255)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local highlightColor = { 0, 200 / 255, 200 / 255 }
|
||||||
|
|
||||||
function onSave()
|
function onSave()
|
||||||
return JSON.encode({ class = class, symbol = symbol })
|
return JSON.encode({ class = class, symbol = symbol })
|
||||||
end
|
end
|
||||||
@ -63,6 +65,9 @@ function onLoad(savedData)
|
|||||||
|
|
||||||
updateDisplay()
|
updateDisplay()
|
||||||
addContextMenu()
|
addContextMenu()
|
||||||
|
if self.hasTag("Temporary") then
|
||||||
|
self.highlightOn(highlightColor)
|
||||||
|
end
|
||||||
|
|
||||||
-- get random seed from Global so all are different
|
-- get random seed from Global so all are different
|
||||||
math.randomseed(Global.call("getRandomSeed"))
|
math.randomseed(Global.call("getRandomSeed"))
|
||||||
@ -274,7 +279,7 @@ end
|
|||||||
|
|
||||||
function addTemporaryStatus()
|
function addTemporaryStatus()
|
||||||
self.addTag("Temporary")
|
self.addTag("Temporary")
|
||||||
self.highlightOn({0, 200/255, 200/255})
|
self.highlightOn(highlightColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
function isClassName(str)
|
function isClassName(str)
|
||||||
|
Loading…
Reference in New Issue
Block a user