Skip to content

Commit

Permalink
Add warning about rotated blueprints
Browse files Browse the repository at this point in the history
  • Loading branch information
joelverhagen committed Dec 31, 2023
1 parent 32d51b0 commit 1cc98b8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/vue/src/components/OilFieldPlanView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<a class="btn btn-link" :href="fbeUrl" target="_blank" rel="noopener noreferrer">View in FBE</a>
</div>
</div>
<div v-if="plan.data.summary.rotatedPumpjacks > 0" class="row g-2" role="alert">
<div class="col-12 alert alert-warning" role="alert">
<b>Rotation needed!</b> At least one pumpjack was rotated
from it's original position. Consider removing existing pumpjacks before placing the new blueprint.
</div>
</div>
<template v-if="allPlans.length > 0">
<table class="table">
<thead>
Expand Down
7 changes: 6 additions & 1 deletion src/vue/src/lib/FactorioToolsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,15 @@ export interface OilFieldPlanResponse {
/** A summary of the various oil field plans attempted. */
export interface OilFieldPlanSummary {
/**
* The number of pumpjacks removed to allow for electric poles. This is usually zero.
* The number of pumpjacks removed to allow for electric poles. This must be zero.
* @format int32
*/
missingPumpjacks: number;
/**
* The number of pumpjacks that were rotated from their original position.
* @format int32
*/
rotatedPumpjacks: number;
/** The set of plans which exactly the same and determined to be the best. */
selectedPlans: OilFieldPlan[];
/** The set of plans which are equivalent to the selected plans by ranking but not exactly the same. */
Expand Down
2 changes: 1 addition & 1 deletion src/vue/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// @import "~bootstrap/scss/breadcrumb";
// @import "~bootstrap/scss/pagination";
@import "~bootstrap/scss/badge";
// @import "~bootstrap/scss/alert";
@import "~bootstrap/scss/alert";
// @import "~bootstrap/scss/progress";
@import "~bootstrap/scss/list-group";
// @import "~bootstrap/scss/close";
Expand Down

0 comments on commit 1cc98b8

Please sign in to comment.