using System.Collections.Generic; using TMPro; using UnityEngine; public class _O : MonoBehaviour { static string Unique_Name; static bool isExistinLibrary; static string Model; public static void Awake () { Unique_Name = Get.o2("CABCREATORpnl/INPUTS","ID").GetComponent().text; print("Unique_Name==== A "+Unique_Name); isExistinLibrary=UIT.Exist(Unique_Name ,Library.Cabinet); if(isExistinLibrary)Model=UIT.Value(Library.Cabinet,Unique_Name ,Header.Model); else Model=""; } //DICTIONARRY public static Dictionary Dictionary = new(){ { "FROM_FLOOR", new string[]{"Input", "Installation from floor","Installation depuis le sol","Instalación desde el suelo"} }, { "FROM_WALL", new string[]{"Input", "Installation from wall","Installation depuis le mur","Instalación desde la pared"} }, { "ALLOW_SINK", new string[]{"Switch", "Allow sink","Évier possible","Permitir fregadero"} }, { "KICK_HEIGHT", new string[]{"Input", "Kick height","Hauteur coup de pied","Altura de patada"} }, { "BACK_ANGLE_WIDE", new string[]{"Input", "Rear angled width","Largeur arrière en angle","Anchura angular trasera"} }, { "KICK_FRONT_RETRACTION", new string[]{"Input", "Kick front retraction","Rétarction avant coup de pied","Retracción frontal de patada"} }, { "KICK_LEFT_RETRACTION", new string[]{"Input", "Kick left retraction","Rétraction gauche coup de pied","Patada de retracción hacia la izquierda"} }, { "KICK_BACKLEFT_RETRACTION", new string[]{"Input", "Kick back left retraction","Rétraction arrière gauche coup de pied","Patada de retracción trasera izquierda"} }, { "KICK_RIGHT_RETRACTION", new string[]{"Input", "Kick right retraction","Rétraction droit coup de pied","Patada de retracción derecha"} }, { "KICK_BACKRIGHT_RETRACTION", new string[]{"Input", "Kick back right retraction","Rétraction arrière droit coup de pied","Patada de retracción trasera derecha"} }, { "KICK_BACK_RETRACTION", new string[]{"Input", "Kick back retraction","Rétraction arrière coup de pied","Retracción de retroceso"} }, { "LEGS_KICK", new string[]{"Drop", "Kicks and legs","Pattes et coup de pieds","Patadas y piernas",TRANS.This("O_Kick_Only")+"_"+TRANS.This("O_Legs_Only")+"_"+TRANS.This("O_Kicks_and_legs")+"_"+TRANS.This("O_Suspended")} }, { "FRONT_KICK", new string[]{"Switch", "Add front kick","Coup de pied avant","Añadir patada frontal"} }, { "LEFT_KICK", new string[]{"Switch", "Add left kick","Coup de pied gauche","Añadir patada izquierda"} }, { "BACKLEFT_KICK", new string[]{"Switch", "Add back left kick","Coup de pied arrière gauche","Patada trasera izquierda"} }, { "RIGHT_KICK", new string[]{"Switch", "Add right kick","Coup de pied droit","Añadir patada derecha"} }, { "BACKRIGHT_KICK", new string[]{"Switch", "Add back right kick","Coup de pied arrière droit","Patada trasera derecha"} }, { "BACK_KICK", new string[]{"Switch", "Add back kick","Coup de pied arrière","Añadir patada trasera"} }, { "ADD_LEGS", new string[]{"Switch", "Add legs","Ajouter des pattes","Agregar piernas"} }, { "COUNTER_HEIGHT", new string[]{"Input", "Counter height","Hauteur comptoir","Altura del mostrador"} }, { "COUNTER_FRONT_PROJECTION", new string[]{"Input", "Counter front projection","Projection avant comptoir","Proyección frontal del mostrador"} }, { "CAB_FROM_CEILING", new string[]{"Input", "Cabinet wall distance from ceiling","Cabinet mural distance du plafond","Distancia de la pared del gabinete al techo"} }, //FINISH { "FINISH_EX_LEFT", new string[]{"Switch", "Exterior left side","Cotés extérieur gauche","Lado exterior izquierdo"} }, { "FINISH_EX_RIGHT", new string[]{"Switch", "Exterior right side","Cotés extérieur droit","Lado derecho exterior"} }, { "FINISH_EX_BACK", new string[]{"Switch", "Exterior back side","Cotés extérieur arrière","Parte trasera exterior"} }, { "FINISH_EX_BACKLEFT", new string[]{"Switch", "Exterior left back side","Cotés extérieur gauche arrière","Parte trasera izquierda exterior"} }, { "FINISH_EX_BACKRIGHT", new string[]{"Switch", "Exterior right back side","Cotés extérieur droit arrière","Parte trasera derecha exterior"} }, { "FINISH_EX_UNDER", new string[]{"Switch", "Exterior under","Desous extérieur","Exterior bajo"} }, { "FINISH_EX_TOP", new string[]{"Switch", "Exterior top","Dessus extérieur","Tapa exterior"} }, { "FINISH_INT_LEFT", new string[]{"Switch", "Interior left side","Cotés intérieur gauche","Lado Inside izquierdo"} }, { "FINISH_INT_RIGHT", new string[]{"Switch", "Interior right side","Cotés intérieur droit","Lado derecho Inside"} }, { "FINISH_INT_BACK", new string[]{"Switch", "Interior back side","Cotés intérieur arrière","Parte trasera Inside"} }, { "FINISH_INT_BACKLEFT", new string[]{"Switch", "Interior left back side","Cotés intérieur gauche arrière","Parte trasera izquierda Inside"} }, { "FINISH_INT_BACKRIGHT", new string[]{"Switch", "Interior right back side","Cotés intérieur droit arrière","Parte trasera derecha Inside"} }, { "FINISH_INT_UNDER", new string[]{"Switch", "Interior under","Desous intérieur","Inside bajo"} }, { "FINISH_INT_TOP", new string[]{"Switch", "Interior top","Dessus intérieur","Tapa interior"} }, { "EDGE_FRONT", new string[]{"Switch", "Edge front","Rebord avant","Borde frontal"} }, { "EDGE_TOP", new string[]{"Switch", "Edge top","Rebord dessus","Borde superior"} }, { "EDGE_UNDER", new string[]{"Switch", "Edge under","Rebord dessous","Borde debajo"} }, { "EDGE_BACK", new string[]{"Switch", "Edge back","Rebord arrière","borde hacia atrás"} }, { "FINISH_SHELF", new string[]{"Switch", "Shelf","Étagère","Estante"} }, { "EDGE_SHELF", new string[]{"Switch", "Front shelf","Avant étagère","Estante frontal"} }, //PANEL { "LEFT_PANEL", new string[]{"Drop", "Left side panel","Panneau coté gauche","Panel lateral izquierdo",TRANS.This("O_Standard")+"_"+TRANS.This("O_Notch")+"_"+TRANS.This("O_Over")+"_"+TRANS.This("O_None")} }, { "RIGHT_PANEL", new string[]{"Drop", "Right side panel","Panneau coté droit","Panel lateral derecho",TRANS.This("O_Standard")+"_"+TRANS.This("O_Notch")+"_"+TRANS.This("O_Over")+"_"+TRANS.This("O_None")} }, { "BACKRIGHT_PANEL", new string[]{"Drop", "Back Right side panel","Panneau coté arrière droit","Panel lateral Atrás Derecha",TRANS.This("O_Standard")+"_"+TRANS.This("O_Notch")+"_"+TRANS.This("O_Over")+"_"+TRANS.This("O_None")} }, { "BACKLEFT_PANEL", new string[]{"Drop", "Back left side panel","Panneau coté arrière gauche","Panel lateral trasero izquierdo",TRANS.This("O_Standard")+"_"+TRANS.This("O_Notch")+"_"+TRANS.This("O_Over")+"_"+TRANS.This("O_None")} }, { "BACK_PANEL", new string[]{"Drop", "Back side panel","Panneau coté arrière","Panel lateral trasero",TRANS.This("O_Standard")+"_"+TRANS.This("O_Notch")+"_"+TRANS.This("O_Over")+"_"+TRANS.This("O_None")} }, { "UNDER_PANEL", new string[]{"Drop", "Under panel","Panneau dessous","Bajo panel",TRANS.This("O_Standard")} }, { "TOP_PANEL", new string[]{"Drop", "Top panel","Panneau dessus","Panel lateral trasero",TRANS.This("O_Stretchers")+"_"+TRANS.This("O_BackStretchers")+"_"+TRANS.This("O_Full")+"_"+TRANS.This("O_None")} }, { "GLASS_SHELF", new string[]{"Input", "All shelves glass","Tous les étagère ev verre","Todos los estantes de vidrio"} }, { "SHELF_QTY", new string[]{"Input", "Number of shelf","Nombre d'étagère","Nombre de etiquetas"} }, { "SHELF_BAY1", new string[]{"Input", "Shelf in bay 1","Étagère rangée 1","Estante en la bahía 1"} }, { "SHELF_BAY2", new string[]{"Input", "Shelf in bay 2","Étagère rangée 2","Estante en la bahía 2"} }, { "SHELF_BAY3", new string[]{"Input", "Shelf in bay 3","Étagère rangée 3","Estante en la bahía 3"} }, { "SHELF_BAY4", new string[]{"Input", "Shelf in bay 4","Étagère rangée 4","Estante en la bahía 4"} }, { "SHELF_BAY5", new string[]{"Input", "Shelf in bay 5","Étagère rangée 5","Estante en la bahía 5"} }, { "SHELF_BAY6", new string[]{"Input", "Shelf in bay 6","Étagère rangée 6","Estante en la bahía 6"} }, { "DRAWER_QTY", new string[]{"Input", "Number of drawer","Nombre de tiroir" ,"Nombre de cajones"} }, { "DRAWER_BAY1", new string[]{"Input", "Drawer in bay 1","Tiroir rangée 1","Cajón fila 1"} }, { "DRAWER_BAY2", new string[]{"Input", "Drawer in bay 2","Tiroir rangée 2","Cajón fila 2"} }, { "DRAWER_BAY3", new string[]{"Input", "Drawer in bay 3","Tiroir rangée 3","Cajón fila 3"} }, { "DRAWER_BAY4", new string[]{"Input", "Drawer in bay 4","Tiroir rangée 4","Cajón fila 4"} }, { "DRAWER_BAY5", new string[]{"Input", "Drawer in bay 5","Tiroir rangée 5","Cajón fila 5"} }, { "DRAWER_BAY6", new string[]{"Input", "Drawer in bay 6","Tiroir rangée 6","Cajón fila 6"} }, }; public static Dictionary List= new(){ {"ALLOW_SINK",GetAllowSink() }, {"KICK_HEIGHT" ,GetKickHeight() }, {"BACK_ANGLE_WIDE" ,GetBackAngleWide() }, {"KICK_FRONT_RETRACTION","2.0"}, {"KICK_LEFT_RETRACTION","0"}, {"KICK_BACKLEFT_RETRACTION","0"}, {"KICK_RIGHT_RETRACTION","0"}, {"KICK_BACKRIGHT_RETRACTION","0"}, {"KICK_BACK_RETRACTION","0"}, {"LEGS_KICK","2"}, {"FROM_FLOOR",GetFromFloor()}, {"FROM_WALL",GetFromWall()}, {"ADD_LEGS",GetAddLegs()}, {"FRONT_KICK","y"}, {"LEFT_KICK","n"}, {"BACKLEFT_KICK","n"}, {"RIGHT_KICK","n"}, {"BACKRIGHT_KICK","n"}, {"BACK_KICK","n"}, {"SUSPENDED","n"}, {"CAB_FROM_CEILING",_P.List["CAB_FROM_CEILING"]}, {"COUNTER_HEIGHT","1.25"}, {"COUNTER_FRONT_PROJECTION","1.75"}, { "FINISH_EX_LEFT" ,"n" }, { "FINISH_EX_RIGHT","n" }, { "FINISH_EX_BACKLEFT","n" }, { "FINISH_EX_BACKRIGHT","n" }, { "FINISH_EX_BACK","n" }, { "FINISH_EX_UNDER","n" }, { "FINISH_EX_TOP","n" }, { "FINISH_INT_LEFT" ,"n" }, { "FINISH_INT_RIGHT","n" }, { "FINISH_INT_BACKLEFT","n" }, { "FINISH_INT_BACKRIGHT","n" }, { "FINISH_INT_BACK","n" }, { "FINISH_INT_UNDER","n" }, { "FINISH_INT_TOP","n" }, { "EDGE_FRONT","n" }, { "EDGE_TOP","n" }, { "EDGE_UNDER","n" }, { "EDGE_BACK","n" }, { "EDGE_SHELF","n" }, { "FINISH_SHELF","n" }, {"LEFT_PANEL",GetSideModel("LEFT")}, {"RIGHT_PANEL",GetSideModel("RIGHT")}, {"BACKRIGHT_PANEL",GetSideModel("BACKRIGHT")}, {"BACKLEFT_PANEL",GetSideModel("BACKLEFT")}, {"BACK_PANEL",GetSideModel("BACK")}, {"UNDER_PANEL","0"}, {"TOP_PANEL",GetSideModel("TOP")}, {"GLASS_SHELF","n"}, {"SHELF_QTY","0"}, {"SHELF_BAY1","0"}, {"SHELF_BAY2","0"}, {"SHELF_BAY3","0"}, {"SHELF_BAY4","0"}, {"SHELF_BAY5","0"}, {"SHELF_BAY6","0"}, {"DRAWER_QTY","0"}, {"DRAWER_BAY1","0"}, {"DRAWER_BAY2","0"}, {"DRAWER_BAY3","0"}, {"DRAWER_BAY4","0"}, {"DRAWER_BAY5","0"}, {"DRAWER_BAY6","0"} }; public static string[] HEADER = new string[] { "GENERAL", "GÉNÉRAL", "GENERAL", "GLOBAL PANEL", "PANNEAU GLOBAL","PANEL MUNDIAL", "KICK", "COUP DE PIED","PATADA", "SIDE PANEL", "PANNEAU COTÉ","PANEL LATERAL", "RECOVER PANEL", "PANNEAU RECOUVREMENT","PANEL DE RECUPERACIÓN", "CABINET DIMENSIONS","DIMENSION CABINET","DIMENSIONES DEL GABINETE", "FEATURES","FONCTIONNALITÉS","CARACTERÍSTICAS", "TOP COUNTER","COMPTOIR","ENCIMERA", "FINISH PANEL","PANNEAU FINI","PANEL DE ACABADO", "SHELF","ÉTAGÈRE","ESTANTE", "SLIDING DRAWER","TIROIR COULISSANT","CAJÓN CORREDERO", "SIDE_PANEL","PANNEAU LATÉRAL","PANEL LATERAL", "FINISH EXTERIOR PANEL","FINITION PANNEAU EXTÉRIEUR","ACABADO DEL PANEL EXTERIOR", "FINISH INTERIOR PANEL","FINITION PANNEAU INTÉRIEUR","ACABADO DEL PANEL INTERIOR", "FINISH EDGES PANEL","FINITION PANNEAU DES BORDS ","PANEL DE BORDES DE ACABADO" }; //GET FROM RE-CABINET=================================================================GET FROM RE-CABINET// public static string GetAllowSink(){ Awake(); if(isExistinLibrary){ print("sink ===="+UIT.Value(Library.Cabinet,Unique_Name,Header.Sink)); return UIT.Value(Library.Cabinet,Unique_Name,Header.Sink); } return "n"; } public static string GetFromFloor(){ Awake(); if(isExistinLibrary){ return UIT.Value(Library.Cabinet,Unique_Name,Header.FF); } return "0"; } public static string GetFromWall(){ Awake(); if(isExistinLibrary){ return UIT.Value(Library.Cabinet,Unique_Name,Header.FW); } return "0"; } public static string GetKickHeight(){ Awake(); if(isExistinLibrary){ return UIT.Value(Library.Cabinet,Unique_Name,"K"); } return _G.caKH.ToString(); } public static string GetAddLegs(){ Awake(); if(isExistinLibrary){ string KickModel= UIT.Value(Library.Cabinet,Unique_Name,Header.K_Model); if(KickModel.IndexOf("LEGS")!=-1){return "y";}; return "n"; } return _G.caKH.ToString(); } public static string GetBackAngleWide(){ Awake(); if(isExistinLibrary){ return UIT.Value(Library.Cabinet,Unique_Name,Header.BA); } return "0"; } public static string GetSideModel(string Side){ //Notch_Std_Notch_None_None_Std_Stretch print("isExistinLibrary"+isExistinLibrary); print("Unique_Name==== "+Unique_Name); print("Side==== "+Side); Awake(); if(isExistinLibrary){ string SidePanelRecipe=UIT.Value(Library.Cabinet,Unique_Name,Header.Side_Panel); print("SidePanelRecipe==="+SidePanelRecipe); string[] SideRecipe=SidePanelRecipe.Split("_"); int Ind=0; if(Side=="TOP") { if(SideRecipe[6]=="Stretch")return "0"; else if(SideRecipe[6]=="BackStretch")return "1"; else if(SideRecipe[6]=="Full")return "2"; else if(SideRecipe[6]=="None")return "3"; } if(Model=="B1" || Model=="T1") { if(Side=="LEFT"){Ind=0;} if(Side=="BACK"){Ind=1; } if(Side=="RIGHT"){Ind=2; } } if(new List(){"B2","B3","B4","B5","B9","B10","B6","B7"}.Contains(Model)){ if(Side=="LEFT"){Ind=0;} if(Side=="BACKLEFT"){Ind=1; } if(Side=="BACKRIGHT"){Ind=2; } if(Side=="RIGHT"){Ind=3; } if(Side=="BACK"){Ind=4; } } print("Ind=== "+Ind); print("SideRecipe[Ind]=== "+SideRecipe[Ind]); if(SideRecipe[Ind]=="Std")return "0"; else if(SideRecipe[Ind]=="Notch")return "1"; else if(SideRecipe[Ind]=="Over")return "2"; else if(SideRecipe[Ind]=="None")return "3"; } return "0"; } }