Skip to content

Instantly share code, notes, and snippets.

@asci
Created September 24, 2012 09:16
Show Gist options
  • Save asci/3775083 to your computer and use it in GitHub Desktop.
Save asci/3775083 to your computer and use it in GitHub Desktop.
check
private function isProductSlotModelChangeKeyProperties(model:ProductionSlotModel):Boolean {
var index: int = getSlotViewIndexBySlotModel(_slots, model);
var slot:* = _slots[index];
var result:Boolean = false;
if (model.locked){
if (model.ready_for_open){
result = slot is SerialProductionSlotViewLockedReady;
if (!result) return true;
} else {
result = slot is SerialProductionSlotViewLocked;
if (!result) return true;
}
} else if (model.item_id == -1 || (model.item_id > -1 && !model.production_time.is_enabled)){
result = slot is SerialProductionSlotViewNoTimer;
if (!result) return true;
} else {
result = slot is SerialProductionSlotViewWorking;
if (!result) return true;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment