Add option to "lock" buildings #763

This commit is contained in:
Daniël van Noord
2021-07-05 16:02:29 +02:00
parent 3ac2c75b6f
commit 094b153f7e
5 changed files with 35 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
/**
* This function toggle the locked state of a building
* @param {number} index Index of the row to change
*/
export default function ToggleBuildingLock(index) {
if (l(`productLock${index}`).innerHTML === 'Unlocked') {
l(`productLock${index}`).innerHTML = 'Locked';
l(`row${index}`).children[3].style.pointerEvents = 'none';
} else {
l(`productLock${index}`).innerHTML = 'Unlocked';
l(`row${index}`).children[3].style.pointerEvents = 'auto';
}
}