3
3
<legend >Planner options</legend >
4
4
<div class =" form-check" >
5
5
<input type =" checkbox" class =" form-check-input" id =" use-underground-pipes" v-model =" useUndergroundPipes" >
6
- <label class =" form-check-label" for =" use-underground-pipes" >Use underground pipes</label >
6
+ <label class =" form-check-label" for =" use-underground-pipes" >
7
+ <AlgorithmStep v-bind =" Steps.UndergroundPipesStep" :show-as-option =" true" />
8
+ </label >
7
9
</div >
8
10
<div class =" form-check" >
9
11
<input type =" checkbox" class =" form-check-input" id =" optimize-pipes" v-model =" optimizePipes" >
10
- <label class =" form-check-label" for =" optimize-pipes" >Optimize pipes</label >
12
+ <label class =" form-check-label" for =" optimize-pipes" >
13
+ <AlgorithmStep v-bind =" Steps.OptimizeStep" :show-as-option =" true" />
14
+ </label >
11
15
</div >
12
16
<div class =" form-check" >
13
17
<input type =" checkbox" class =" form-check-input" id =" validate-solution" v-model =" validateSolution" >
26
30
<legend >Pipe strategies</legend >
27
31
<div class =" form-check" >
28
32
<input type =" checkbox" class =" form-check-input" id =" pipes-fbe-original" v-model =" pipeStrategyFbeOriginal" >
29
- <label class =" form-check-label" for =" pipes-fbe-original" >Teoxoy's FBE</ label > (< a
30
- href = " https://github.com/teoxoy/factorio-blueprint-editor/blob/0bec144b8989422f86bce8cea58ef49258c1a88d/packages/editor/src/core/generators/pipe.ts " >original
31
- source</ a >) without modifications
33
+ <label class =" form-check-label" for =" pipes-fbe-original" >
34
+ < AlgorithmStep v-bind = " Steps.PipeSteps.FbeOriginal " :show-as-option = " true " />
35
+ </ label >
32
36
</div >
33
37
<div class =" form-check" >
34
38
<input type =" checkbox" class =" form-check-input" id =" pipes-fbe" v-model =" pipeStrategyFbe" >
35
- <label class =" form-check-label" for =" pipes-fbe" >Teoxoy's FBE</label > with modifications
39
+ <label class =" form-check-label" for =" pipes-fbe" >
40
+ <AlgorithmStep v-bind =" Steps.PipeSteps.Fbe" :show-as-option =" true" />
41
+ </label >
36
42
</div >
37
43
<div class =" form-check" >
38
44
<input type =" checkbox" class =" form-check-input" id =" pipes-connected-centers-delaunay"
39
45
v-model =" pipeStrategyConnectedCentersDelaunay" >
40
- <label class =" form-check-label" for =" pipes-connected-centers-delaunay" >Connected centers via Delaunay
41
- triangulation</label >
46
+ <label class =" form-check-label" for =" pipes-connected-centers-delaunay" >
47
+ <AlgorithmStep v-bind =" Steps.PipeSteps.ConnectedCentersDelaunay" :show-as-option =" true" />
48
+ </label >
42
49
</div >
43
50
<div class =" form-check" >
44
51
<input type =" checkbox" class =" form-check-input" id =" pipes-connected-centers-delaunay-mst"
45
52
v-model =" pipeStrategyConnectedCentersDelaunayMst" >
46
- <label class =" form-check-label" for =" pipes-connected-centers-delaunay-mst" >Connected centers via Delaunay
47
- triangulation and Prim's MST</label >
53
+ <label class =" form-check-label" for =" pipes-connected-centers-delaunay-mst" >
54
+ <AlgorithmStep v-bind =" Steps.PipeSteps.ConnectedCentersDelaunayMst" :show-as-option =" true" />
55
+ </label >
48
56
</div >
49
57
<div class =" form-check" >
50
58
<input type =" checkbox" class =" form-check-input" id =" pipes-connected-centers-flute"
51
59
v-model =" pipeStrategyConnectedCentersFlute" >
52
- <label class =" form-check-label" for =" pipes-connected-centers-flute" >Connected centers via <a
53
- href =" https://home.engineering.iastate.edu/~cnchu/flute.html" >FLUTE</a ></label >
60
+ <label class =" form-check-label" for =" pipes-connected-centers-flute" >
61
+ <AlgorithmStep v-bind =" Steps.PipeSteps.ConnectedCentersFlute" :show-as-option =" true" />
62
+ </label >
54
63
</div >
55
64
</fieldset >
56
65
<fieldset class =" border p-3 mt-3" :disabled =" !addBeacons" >
60
69
</legend >
61
70
<div class =" form-check" >
62
71
<input type =" checkbox" class =" form-check-input" id =" beacons-fbe-original" v-model =" beaconStrategyFbeOriginal" >
63
- <label class =" form-check-label" for =" beacons-fbe-original" >Teoxoy's FBE</ label > (< a
64
- href = " https://github.com/teoxoy/factorio-blueprint-editor/blob/0bec144b8989422f86bce8cea58ef49258c1a88d/packages/editor/src/core/generators/beacon.ts " >original
65
- source</ a >) without modifications
72
+ <label class =" form-check-label" for =" beacons-fbe-original" >
73
+ < AlgorithmStep v-bind = " Steps.BeaconSteps.FbeOriginal " :show-as-option = " true " />
74
+ </ label >
66
75
</div >
67
76
<div class =" form-check" >
68
77
<input type =" checkbox" class =" form-check-input" id =" beacons-fbe" v-model =" beaconStrategyFbe" >
69
- <label class =" form-check-label" for =" beacons-fbe" >Teoxoy's FBE</label > with modifications
78
+ <label class =" form-check-label" for =" beacons-fbe" >
79
+ <AlgorithmStep v-bind =" Steps.BeaconSteps.Fbe" :show-as-option =" true" />
80
+ </label >
70
81
</div >
71
82
<div class =" form-check" >
72
83
<input type =" checkbox" class =" form-check-input" id =" beacons-snug" v-model =" beaconStrategySnug" >
73
- <label class =" form-check-label" for =" beacons-snug" >Snug</label >
84
+ <label class =" form-check-label" for =" beacons-snug" >
85
+ <AlgorithmStep v-bind =" Steps.BeaconSteps.Snug" :show-as-option =" true" />
86
+ </label >
74
87
</div >
75
88
</fieldset >
76
89
</fieldset >
@@ -82,6 +95,8 @@ import { storeToRefs } from 'pinia';
82
95
import { pick } from ' ../lib/helpers' ;
83
96
import { useAutoPlanStore } from ' ../stores/AutoPlanStore' ;
84
97
import { getDefaults , useOilFieldStore } from ' ../stores/OilFieldStore' ;
98
+ import { Steps } from ' ../lib/steps' ;
99
+ import AlgorithmStep from ' ./AlgorithmStep.vue' ;
85
100
86
101
export default {
87
102
props: {
@@ -93,7 +108,8 @@ export default {
93
108
data() {
94
109
return Object .assign (
95
110
storeToRefs (useAutoPlanStore ()),
96
- pick (storeToRefs (useOilFieldStore ()),
111
+ pick (
112
+ storeToRefs (useOilFieldStore ()),
97
113
' addBeacons' ,
98
114
' useUndergroundPipes' ,
99
115
' useStagingApi' ,
@@ -106,31 +122,34 @@ export default {
106
122
' pipeStrategyConnectedCentersFlute' ,
107
123
' beaconStrategyFbeOriginal' ,
108
124
' beaconStrategyFbe' ,
109
- ' beaconStrategySnug' ));
125
+ ' beaconStrategySnug' ), {
126
+ Steps: Steps
127
+ });
110
128
},
111
129
watch: {
112
130
showAdvancedOptions : function (newVal : boolean ) {
113
131
if (! newVal ) {
114
- this .reset ()
132
+ this .reset ();
115
133
}
116
134
}
117
135
},
118
136
methods: {
119
137
reset() {
120
- const defaults = getDefaults ()
121
- this .useUndergroundPipes = defaults .useUndergroundPipes
122
- this .useStagingApi = defaults .useStagingApi
123
- this .optimizePipes = defaults .optimizePipes
124
- this .validateSolution = defaults .validateSolution
125
- this .pipeStrategyFbeOriginal = defaults .pipeStrategyFbeOriginal
126
- this .pipeStrategyFbe = defaults .pipeStrategyFbe
127
- this .pipeStrategyConnectedCentersDelaunay = defaults .pipeStrategyConnectedCentersDelaunay
128
- this .pipeStrategyConnectedCentersDelaunayMst = defaults .pipeStrategyConnectedCentersDelaunayMst
129
- this .pipeStrategyConnectedCentersFlute = defaults .pipeStrategyConnectedCentersFlute
130
- this .beaconStrategyFbeOriginal = defaults .beaconStrategyFbeOriginal
131
- this .beaconStrategyFbe = defaults .beaconStrategyFbe
132
- this .beaconStrategySnug = defaults .beaconStrategySnug
138
+ const defaults = getDefaults ();
139
+ this .useUndergroundPipes = defaults .useUndergroundPipes ;
140
+ this .useStagingApi = defaults .useStagingApi ;
141
+ this .optimizePipes = defaults .optimizePipes ;
142
+ this .validateSolution = defaults .validateSolution ;
143
+ this .pipeStrategyFbeOriginal = defaults .pipeStrategyFbeOriginal ;
144
+ this .pipeStrategyFbe = defaults .pipeStrategyFbe ;
145
+ this .pipeStrategyConnectedCentersDelaunay = defaults .pipeStrategyConnectedCentersDelaunay ;
146
+ this .pipeStrategyConnectedCentersDelaunayMst = defaults .pipeStrategyConnectedCentersDelaunayMst ;
147
+ this .pipeStrategyConnectedCentersFlute = defaults .pipeStrategyConnectedCentersFlute ;
148
+ this .beaconStrategyFbeOriginal = defaults .beaconStrategyFbeOriginal ;
149
+ this .beaconStrategyFbe = defaults .beaconStrategyFbe ;
150
+ this .beaconStrategySnug = defaults .beaconStrategySnug ;
133
151
}
134
- }
152
+ },
153
+ components: { AlgorithmStep }
135
154
}
136
155
</script >
0 commit comments