mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-22 04:12:29 +08:00
outside.js: Fix incorrect display of workers.
Fixed an issue where the workers view would break temporarily if all the villagers were killed.
This commit is contained in:
+5
-1
@@ -252,8 +252,12 @@ var Outside = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateWorkersView: function() {
|
updateWorkersView: function() {
|
||||||
if(State.outside.population == 0) return;
|
|
||||||
var workers = $('div#workers');
|
var workers = $('div#workers');
|
||||||
|
|
||||||
|
// If our population is 0 and we don't already have a workers view,
|
||||||
|
// there's nothing to do here.
|
||||||
|
if(!workers.length && State.outside.population == 0) return;
|
||||||
|
|
||||||
var needsAppend = false;
|
var needsAppend = false;
|
||||||
if(workers.length == 0) {
|
if(workers.length == 0) {
|
||||||
needsAppend = true;
|
needsAppend = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user