- printf de debug
This commit is contained in:
parent
74c9e8b795
commit
82dbdd696d
1 changed files with 0 additions and 6 deletions
|
@ -260,7 +260,6 @@ void update_worker(Game *game, Worker *worker){
|
||||||
mach[0]->storage[4]--;
|
mach[0]->storage[4]--;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf("Worker full, moving\n");
|
|
||||||
ai->status = S_Transporting;
|
ai->status = S_Transporting;
|
||||||
ai->dest = mach[1]->pos;
|
ai->dest = mach[1]->pos;
|
||||||
ai->going_to = 1;
|
ai->going_to = 1;
|
||||||
|
@ -283,7 +282,6 @@ void update_worker(Game *game, Worker *worker){
|
||||||
mach[1]->storage[localres]++;
|
mach[1]->storage[localres]++;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
printf("Worker empty, moving\n");
|
|
||||||
ai->status = S_Transporting;
|
ai->status = S_Transporting;
|
||||||
ai->dest = mach[0]->pos;
|
ai->dest = mach[0]->pos;
|
||||||
ai->going_to = 0;
|
ai->going_to = 0;
|
||||||
|
@ -313,8 +311,6 @@ void update_machine(Game *game, Machine *machine){
|
||||||
MachineDef *def = &machine_dict[machine->type];
|
MachineDef *def = &machine_dict[machine->type];
|
||||||
bool can_output = machine->assign_workers == def->workers_required;
|
bool can_output = machine->assign_workers == def->workers_required;
|
||||||
can_output = can_output && (machine->storage[4] <= 200);
|
can_output = can_output && (machine->storage[4] <= 200);
|
||||||
if(machine->storage[4] <= 200)
|
|
||||||
printf("%d : Output full\n", machine->id);
|
|
||||||
for(int i = 0; i < def->input_n; i++){
|
for(int i = 0; i < def->input_n; i++){
|
||||||
if(!machine->storage[i])
|
if(!machine->storage[i])
|
||||||
can_output = false;
|
can_output = false;
|
||||||
|
@ -324,8 +320,6 @@ void update_machine(Game *game, Machine *machine){
|
||||||
machine->storage[i]--;
|
machine->storage[i]--;
|
||||||
}
|
}
|
||||||
machine->storage[4]++;
|
machine->storage[4]++;
|
||||||
if(machine->type == MT_Furnace)
|
|
||||||
printf("Smelting...\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue