| 
									
										
										
										
											2020-06-27 08:38:11 +00:00
										 |  |  | import { formatItemsPerSecond } from "../../core/utils"; | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  | import { enumDirection, Vector } from "../../core/vector"; | 
					
						
							| 
									
										
										
										
											2020-06-27 08:38:11 +00:00
										 |  |  | import { T } from "../../translations"; | 
					
						
							|  |  |  | import { ItemAcceptorComponent } from "../components/item_acceptor"; | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  | import { ItemEjectorComponent } from "../components/item_ejector"; | 
					
						
							| 
									
										
										
										
											2020-08-29 07:35:14 +00:00
										 |  |  | import { | 
					
						
							|  |  |  |     enumItemProcessorTypes, | 
					
						
							|  |  |  |     ItemProcessorComponent, | 
					
						
							|  |  |  |     enumItemProcessorRequirements, | 
					
						
							|  |  |  | } from "../components/item_processor"; | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  | import { Entity } from "../entity"; | 
					
						
							| 
									
										
										
										
											2020-06-27 08:38:11 +00:00
										 |  |  | import { defaultBuildingVariant, MetaBuilding } from "../meta_building"; | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  | import { GameRoot } from "../root"; | 
					
						
							| 
									
										
										
										
											2020-06-27 08:38:11 +00:00
										 |  |  | import { enumHubGoalRewards } from "../tutorial_goals"; | 
					
						
							| 
									
										
										
										
											2020-08-29 05:56:47 +00:00
										 |  |  | import { WiredPinsComponent, enumPinSlotType } from "../components/wired_pins"; | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | export class MetaPainterBuilding extends MetaBuilding { | 
					
						
							|  |  |  |     constructor() { | 
					
						
							|  |  |  |         super("painter"); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * @param {string} variant | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     getSilhouetteColor(variant) { | 
					
						
							|  |  |  |         return MetaPainterBuilding.silhouetteColors[variant](); | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * @param {GameRoot} root | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     getIsUnlocked(root) { | 
					
						
							|  |  |  |         return this.getAvailableVariants(root).length > 0; | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-17 13:32:19 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * @param {string} variant | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  |     getIsRemovable(variant) { | 
					
						
							|  |  |  |         return MetaPainterBuilding.isRemovable[variant](); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param {string} variant | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     getIsRotateable(variant) { | 
					
						
							|  |  |  |         return MetaPainterBuilding.isRotateable[variant](); | 
					
						
							| 
									
										
										
										
											2020-05-17 13:32:19 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-17 12:46:33 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * @param {GameRoot} root | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2020-05-16 20:45:40 +00:00
										 |  |  |     getAvailableVariants(root) { | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  |         const variants = MetaPainterBuilding.avaibleVariants; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         let available = []; | 
					
						
							|  |  |  |         for (const variant in variants) { | 
					
						
							|  |  |  |             if (variants[variant](root)) available.push(variant); | 
					
						
							| 
									
										
										
										
											2020-05-17 12:46:33 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         return available; | 
					
						
							| 
									
										
										
										
											2020-05-16 20:45:40 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  |     /** | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  |      * Returns the edit layer of the building | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  |      * @param {GameRoot} root | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  |      * @param {string} variant | 
					
						
							|  |  |  |      * @returns {Layer} | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  |      */ | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  |     getLayer(root, variant) { | 
					
						
							|  |  |  |         // @ts-ignore
 | 
					
						
							|  |  |  |         return MetaPainterBuilding.layerByVariant[variant](root); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param {string} variant | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     getDimensions(variant) { | 
					
						
							|  |  |  |         return MetaPainterBuilding.dimensions[variant](); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param {GameRoot} root | 
					
						
							|  |  |  |      * @param {string} variant | 
					
						
							|  |  |  |      * @returns {Array<[string, string]>} | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     getAdditionalStatistics(root, variant) { | 
					
						
							|  |  |  |         return MetaPainterBuilding.additionalStatistics[variant](root); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param {number} rotation | 
					
						
							|  |  |  |      * @param {number} rotationVariant | 
					
						
							|  |  |  |      * @param {string} variant | 
					
						
							|  |  |  |      * @param {Entity} entity | 
					
						
							|  |  |  |      * @returns {Array<number>|null} | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     getSpecialOverlayRenderMatrix(rotation, rotationVariant, variant, entity) { | 
					
						
							|  |  |  |         let matrices = MetaPainterBuilding.overlayMatrices[variant](entity, rotationVariant); | 
					
						
							|  |  |  |         return matrices ? matrices[rotation] : null; | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Creates the entity at the given location | 
					
						
							|  |  |  |      * @param {Entity} entity | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     setupEntityComponents(entity) { | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  |         MetaPainterBuilding.setupEntityComponents.forEach(func => func(entity)); | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-05-16 20:45:40 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param {Entity} entity | 
					
						
							| 
									
										
										
										
											2020-05-16 21:48:56 +00:00
										 |  |  |      * @param {number} rotationVariant | 
					
						
							| 
									
										
										
										
											2020-05-16 20:45:40 +00:00
										 |  |  |      * @param {string} variant | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2020-05-16 21:48:56 +00:00
										 |  |  |     updateVariants(entity, rotationVariant, variant) { | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  |         MetaPainterBuilding.componentVariations[variant](entity, rotationVariant); | 
					
						
							| 
									
										
										
										
											2020-05-16 20:45:40 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-05-09 14:45:23 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2021-02-26 14:20:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.setupEntityComponents = [ | 
					
						
							|  |  |  |     entity => entity.addComponent(new ItemProcessorComponent({})), | 
					
						
							|  |  |  |     entity => | 
					
						
							|  |  |  |     entity.addComponent( | 
					
						
							|  |  |  |         new ItemEjectorComponent({ | 
					
						
							|  |  |  |             slots: [{ pos: new Vector(1, 0), direction: enumDirection.right }], | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |     ), | 
					
						
							|  |  |  |     entity => | 
					
						
							|  |  |  |     entity.addComponent( | 
					
						
							|  |  |  |         new ItemAcceptorComponent({ | 
					
						
							|  |  |  |             slots: [{ | 
					
						
							|  |  |  |                     pos: new Vector(0, 0), | 
					
						
							|  |  |  |                     directions: [enumDirection.left], | 
					
						
							|  |  |  |                     filter: "shape", | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                     pos: new Vector(1, 0), | 
					
						
							|  |  |  |                     directions: [enumDirection.top], | 
					
						
							|  |  |  |                     filter: "color", | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |             ], | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |     ), | 
					
						
							|  |  |  | ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.variants = { | 
					
						
							|  |  |  |     mirrored: "mirrored", | 
					
						
							|  |  |  |     double: "double", | 
					
						
							|  |  |  |     quad: "quad", | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.silhouetteColors = { | 
					
						
							|  |  |  |     [defaultBuildingVariant]: () => "#cd9b7d", | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.mirrored]: () => "#cd9b7d", | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.double]: () => "#cd9b7d", | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.quad]: () => "#cd9b7d", | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.dimensions = { | 
					
						
							|  |  |  |     [defaultBuildingVariant]: () => new Vector(2, 1), | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.mirrored]: () => new Vector(2, 1), | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.double]: () => new Vector(2, 2), | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.quad]: () => new Vector(4, 1), | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.isRemovable = { | 
					
						
							|  |  |  |     [defaultBuildingVariant]: () => true, | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.mirrored]: () => true, | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.double]: () => true, | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.quad]: () => true, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.isRotateable = { | 
					
						
							|  |  |  |     [defaultBuildingVariant]: () => true, | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.mirrored]: () => true, | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.double]: () => true, | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.quad]: () => true, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.layerByVariant = { | 
					
						
							|  |  |  |     [defaultBuildingVariant]: root => "regular", | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.mirrored]: root => "regular", | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.double]: root => "regular", | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.quad]: root => "regular", | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.overlayMatrices = { | 
					
						
							|  |  |  |     [defaultBuildingVariant]: (entity, rotationVariant) => null, | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.mirrored]: (entity, rotationVariant) => null, | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.double]: (entity, rotationVariant) => null, | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.quad]: (entity, rotationVariant) => null, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.avaibleVariants = { | 
					
						
							|  |  |  |     [defaultBuildingVariant]: root => root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_painter), | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.mirrored]: root => | 
					
						
							|  |  |  |         root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_painter), | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.double]: root => | 
					
						
							|  |  |  |         root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_painter_double), | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.quad]: root => | 
					
						
							|  |  |  |         root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_wires_painter_and_levers), | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.additionalStatistics = { | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param {*} root | 
					
						
							|  |  |  |      * @returns {Array<[string, string]>} | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     [defaultBuildingVariant]: root => [ | 
					
						
							|  |  |  |         [ | 
					
						
							|  |  |  |             T.ingame.buildingPlacement.infoTexts.speed, | 
					
						
							|  |  |  |             formatItemsPerSecond(root.hubGoals.getProcessorBaseSpeed(enumItemProcessorTypes.painter)), | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param {*} root | 
					
						
							|  |  |  |      * @returns {Array<[string, string]>} | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.mirrored]: root => [ | 
					
						
							|  |  |  |         [ | 
					
						
							|  |  |  |             T.ingame.buildingPlacement.infoTexts.speed, | 
					
						
							|  |  |  |             formatItemsPerSecond(root.hubGoals.getProcessorBaseSpeed(enumItemProcessorTypes.painter)), | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param {*} root | 
					
						
							|  |  |  |      * @returns {Array<[string, string]>} | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.double]: root => [ | 
					
						
							|  |  |  |         [ | 
					
						
							|  |  |  |             T.ingame.buildingPlacement.infoTexts.speed, | 
					
						
							|  |  |  |             formatItemsPerSecond(root.hubGoals.getProcessorBaseSpeed(enumItemProcessorTypes.painterDouble)), | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param {*} root | 
					
						
							|  |  |  |      * @returns {Array<[string, string]>} | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.quad]: root => [ | 
					
						
							|  |  |  |         [ | 
					
						
							|  |  |  |             T.ingame.buildingPlacement.infoTexts.speed, | 
					
						
							|  |  |  |             formatItemsPerSecond(root.hubGoals.getProcessorBaseSpeed(enumItemProcessorTypes.painterQuad)), | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MetaPainterBuilding.componentVariations = { | 
					
						
							|  |  |  |     [defaultBuildingVariant]: (entity, rotationVariant) => { | 
					
						
							|  |  |  |         if (entity.components.WiredPins) { | 
					
						
							|  |  |  |             entity.removeComponent(WiredPinsComponent); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemAcceptor.setSlots([{ | 
					
						
							|  |  |  |                 pos: new Vector(0, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.left], | 
					
						
							|  |  |  |                 filter: "shape", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(1, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.top], | 
					
						
							|  |  |  |                 filter: "color", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |         ]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemEjector.setSlots([{ pos: new Vector(1, 0), direction: enumDirection.right }]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemProcessor.type = enumItemProcessorTypes.painter; | 
					
						
							|  |  |  |         entity.components.ItemProcessor.processingRequirement = null; | 
					
						
							|  |  |  |         entity.components.ItemProcessor.inputsPerCharge = 2; | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.mirrored]: (entity, rotationVariant) => { | 
					
						
							|  |  |  |         if (entity.components.WiredPins) { | 
					
						
							|  |  |  |             entity.removeComponent(WiredPinsComponent); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemAcceptor.setSlots([{ | 
					
						
							|  |  |  |                 pos: new Vector(0, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.left], | 
					
						
							|  |  |  |                 filter: "shape", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(1, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.bottom], | 
					
						
							|  |  |  |                 filter: "color", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |         ]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemEjector.setSlots([{ pos: new Vector(1, 0), direction: enumDirection.right }]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemProcessor.type = enumItemProcessorTypes.painter; | 
					
						
							|  |  |  |         entity.components.ItemProcessor.processingRequirement = null; | 
					
						
							|  |  |  |         entity.components.ItemProcessor.inputsPerCharge = 2; | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.double]: (entity, rotationVariant) => { | 
					
						
							|  |  |  |         if (entity.components.WiredPins) { | 
					
						
							|  |  |  |             entity.removeComponent(WiredPinsComponent); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemAcceptor.setSlots([{ | 
					
						
							|  |  |  |                 pos: new Vector(0, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.left], | 
					
						
							|  |  |  |                 filter: "shape", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(0, 1), | 
					
						
							|  |  |  |                 directions: [enumDirection.left], | 
					
						
							|  |  |  |                 filter: "shape", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(1, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.top], | 
					
						
							|  |  |  |                 filter: "color", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |         ]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemEjector.setSlots([{ pos: new Vector(1, 0), direction: enumDirection.right }]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemProcessor.type = enumItemProcessorTypes.painterDouble; | 
					
						
							|  |  |  |         entity.components.ItemProcessor.processingRequirement = null; | 
					
						
							|  |  |  |         entity.components.ItemProcessor.inputsPerCharge = 3; | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     [MetaPainterBuilding.variants.quad]: (entity, rotationVariant) => { | 
					
						
							|  |  |  |         if (!entity.components.WiredPins) { | 
					
						
							|  |  |  |             entity.addComponent(new WiredPinsComponent({ slots: [] })); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.WiredPins.setSlots([{ | 
					
						
							|  |  |  |                 pos: new Vector(0, 0), | 
					
						
							|  |  |  |                 direction: enumDirection.bottom, | 
					
						
							|  |  |  |                 type: enumPinSlotType.logicalAcceptor, | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(1, 0), | 
					
						
							|  |  |  |                 direction: enumDirection.bottom, | 
					
						
							|  |  |  |                 type: enumPinSlotType.logicalAcceptor, | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(2, 0), | 
					
						
							|  |  |  |                 direction: enumDirection.bottom, | 
					
						
							|  |  |  |                 type: enumPinSlotType.logicalAcceptor, | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(3, 0), | 
					
						
							|  |  |  |                 direction: enumDirection.bottom, | 
					
						
							|  |  |  |                 type: enumPinSlotType.logicalAcceptor, | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |         ]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemAcceptor.setSlots([{ | 
					
						
							|  |  |  |                 pos: new Vector(0, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.left], | 
					
						
							|  |  |  |                 filter: "shape", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(0, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.bottom], | 
					
						
							|  |  |  |                 filter: "color", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(1, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.bottom], | 
					
						
							|  |  |  |                 filter: "color", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(2, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.bottom], | 
					
						
							|  |  |  |                 filter: "color", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 pos: new Vector(3, 0), | 
					
						
							|  |  |  |                 directions: [enumDirection.bottom], | 
					
						
							|  |  |  |                 filter: "color", | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |         ]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemEjector.setSlots([{ pos: new Vector(0, 0), direction: enumDirection.top }]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         entity.components.ItemProcessor.type = enumItemProcessorTypes.painterQuad; | 
					
						
							|  |  |  |         entity.components.ItemProcessor.processingRequirement = enumItemProcessorRequirements.painterQuad; | 
					
						
							|  |  |  |         entity.components.ItemProcessor.inputsPerCharge = 5; | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | }; |