equal
deleted
inserted
replaced
533 SB(object.callback_param2, 24, 8, again); |
533 SB(object.callback_param2, 24, 8, again); |
534 } |
534 } |
535 |
535 |
536 InvalidateWindow(WC_INDUSTRY_VIEW, ind->index); |
536 InvalidateWindow(WC_INDUSTRY_VIEW, ind->index); |
537 } |
537 } |
538 |
|
539 void DoTriggerIndustry(Industry *ind, IndustryTileTrigger trigger) |
|
540 { |
|
541 ResolverObject object; |
|
542 |
|
543 NewIndustryResolver(&object, ind->xy, ind); |
|
544 object.callback = CBID_RANDOM_TRIGGER; |
|
545 object.trigger = trigger; |
|
546 |
|
547 const SpriteGroup *group = Resolve(GetIndustrySpec(ind->type)->grf_prop.spritegroup, &object); |
|
548 if (group == NULL) return; |
|
549 |
|
550 byte new_random_bits = Random(); |
|
551 ind->random &= ~object.reseed; |
|
552 ind->random |= new_random_bits & object.reseed; |
|
553 } |
|