chore(octoplushy): Port to v3 stage 2
This commit is contained in:
parent
7ffba2f81d
commit
f3313cdb57
3 changed files with 25 additions and 19 deletions
|
@ -1,7 +1,8 @@
|
|||
import { headSection1, headSection2 } from './head.mjs'
|
||||
|
||||
function octoplushyArmSection(partNumber, part) {
|
||||
const {
|
||||
function octoplushyArmSection(
|
||||
partNumber,
|
||||
{
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
|
@ -15,8 +16,9 @@ function octoplushyArmSection(partNumber, part) {
|
|||
macro,
|
||||
utils,
|
||||
store,
|
||||
} = part.shorthand()
|
||||
|
||||
part,
|
||||
}
|
||||
) {
|
||||
if (partNumber > (options.type == 'squid' ? 1 : 0)) {
|
||||
return part
|
||||
}
|
||||
|
@ -315,10 +317,10 @@ function octoplushyArmSection(partNumber, part) {
|
|||
export const armSection1 = {
|
||||
name: 'octoplushy.armSection1',
|
||||
after: headSection1,
|
||||
draft: (part) => octoplushyArmSection(0, part),
|
||||
draft: (params) => octoplushyArmSection(0, params),
|
||||
}
|
||||
export const armSection2 = {
|
||||
name: 'octoplushy.armSection2',
|
||||
after: headSection2,
|
||||
draft: (part) => octoplushyArmSection(1, part),
|
||||
draft: (params) => octoplushyArmSection(1, params),
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { headSection1 } from './head.mjs'
|
||||
|
||||
function octoplushyEye(partNumber, part) {
|
||||
const {
|
||||
function octoplushyEye(
|
||||
partNumber,
|
||||
{
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
|
@ -14,8 +15,9 @@ function octoplushyEye(partNumber, part) {
|
|||
paperless,
|
||||
macro,
|
||||
store,
|
||||
} = part.shorthand()
|
||||
|
||||
part,
|
||||
}
|
||||
) {
|
||||
if (options.type != 'squid' && options.type != 'octopus') {
|
||||
return part
|
||||
}
|
||||
|
@ -133,15 +135,15 @@ function octoplushyEye(partNumber, part) {
|
|||
export const eye1 = {
|
||||
name: 'octoplushy.eye1',
|
||||
after: headSection1,
|
||||
draft: (part) => octoplushyEye(0, part),
|
||||
draft: (params) => octoplushyEye(0, params),
|
||||
}
|
||||
export const eye2 = {
|
||||
name: 'octoplushy.eye2',
|
||||
after: headSection1,
|
||||
draft: (part) => octoplushyEye(1, part),
|
||||
draft: (params) => octoplushyEye(1, params),
|
||||
}
|
||||
export const eye3 = {
|
||||
name: 'octoplushy.eye3',
|
||||
after: headSection1,
|
||||
draft: (part) => octoplushyEye(2, part),
|
||||
draft: (params) => octoplushyEye(2, params),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
function octoplushyHeadSection(partNumber, part) {
|
||||
const {
|
||||
function octoplushyHeadSection(
|
||||
partNumber,
|
||||
{
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
|
@ -13,8 +14,9 @@ function octoplushyHeadSection(partNumber, part) {
|
|||
macro,
|
||||
utils,
|
||||
store,
|
||||
} = part.shorthand()
|
||||
|
||||
part,
|
||||
}
|
||||
) {
|
||||
if (partNumber > (options.type == 'squid' ? 1 : 0)) {
|
||||
return part
|
||||
}
|
||||
|
@ -630,10 +632,10 @@ const options = {
|
|||
export const headSection1 = {
|
||||
name: 'octoplushy.headSection1',
|
||||
options,
|
||||
draft: (part) => octoplushyHeadSection(0, part),
|
||||
draft: (params) => octoplushyHeadSection(0, params),
|
||||
}
|
||||
export const headSection2 = {
|
||||
name: 'octoplushy.headSection2',
|
||||
options,
|
||||
draft: (part) => octoplushyHeadSection(1, part),
|
||||
draft: (params) => octoplushyHeadSection(1, params),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue