Exemple #1
0
        static JapLowDinnerTable()
        {
            CommodityChange item = new CommodityChange((CommodityKind)286210343, 100f, true, 100f, OutputUpdateType.ImmediateDelta, false, false, UpdateAboveAndBelowZeroType.Either);

            try
            {
                InteractionTuning tuning = AutonomyTuning.GetTuning(typeof(JapLowDinnerTable.Eat.Definition).FullName, typeof(JapLowDinnerTable).FullName);
                tuning.mTradeoff.mOutputs.Add(item);
                tuning = AutonomyTuning.GetTuning(typeof(JapLowDinnerTable.ServeMeal.Definition).FullName, typeof(ServingContainerGroup).FullName);
                tuning.mTradeoff.mOutputs.Add(item);
            }
            catch (Exception ex)
            {
                JapLowDinnerTable.DebugMsg("InteractionTuning(s) not updated\n\n" + ex.StackTrace.Substring(0, JapLowDinnerTable.UMIN(750, ex.StackTrace.Length)));
            }
            JapLowDinnerTable.mSurfaceAddOn = new SurfaceAddOn();
            JapLowDinnerTable.mSurfaceAddOn.AddSurface("ContainmentSlot_0", 1f, SurfaceType.Eating, SurfaceHeight.CoffeeTable, CarrySystemPutDownRule.Default, null);
            World.OnWorldLoadFinishedEventHandler += JapLowDinnerTable.OnWorldLoadFinished;
        }
Exemple #2
0
                public override bool Test(Sim actor, ServingContainer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
                {
                    if (!target.HasFood)
                    {
                        return(false);
                    }
                    if (!JapLowDinnerTable.kServeOrEatSpoiledFood && target.IsSpoiled)
                    {
                        return(false);
                    }
                    if (JapLowDinnerTable.kOnlySimsWithJCTrait && !JapLowDinnerTable.HasJCTrait(actor))
                    {
                        return(false);
                    }
                    if (target.Parent is JapLowDinnerTable)
                    {
                        return(false);
                    }
                    if (JapLowDinnerTable.kOnlyRecipesThatUseFork && (target.CookingProcess == null || target.CookingProcess.Recipe == null || target.CookingProcess.Recipe.Utensil != "fork"))
                    {
                        return(false);
                    }
                    if (!JapLowDinnerTable.kServeOrEatBurntFood && target.CookingProcess != null && target.CookingProcess.FoodState == FoodCookState.Burnt)
                    {
                        return(false);
                    }
                    if (this.jt != null)
                    {
                        return(true);
                    }
                    JapLowDinnerTable japLowDinnerTable = JapLowDinnerTable.FindClosestFreeJPNTable(actor);

                    if (japLowDinnerTable != null)
                    {
                        this.jt = japLowDinnerTable;
                        return(true);
                    }
                    return(false);
                }
Exemple #3
0
 internal static bool FindClosestFreeSlot(Sim sim, JapLowDinnerTable table, out int slotIndex)
 {
     return(sim.RouteToSlotList(table, Slots.GetRoutingSlotNames(table.ObjectId), out slotIndex));
 }
Exemple #4
0
 public Definition(JapLowDinnerTable jt_param)
 {
     this.jt = jt_param;
 }