private void OnCopySettings(object data)
    {
        GameObject   gameObject = (GameObject)data;
        MassageTable component  = gameObject.GetComponent <MassageTable>();

        if ((Object)component != (Object)null)
        {
            ActivateValue   = component.ActivateValue;
            DeactivateValue = component.DeactivateValue;
        }
    }
Exemplo n.º 2
0
            public override void AddInteractions(InteractionObjectPair iop, Sim actor, MassageTable target, List <InteractionObjectPair> results)
            {
                try
                {
                    if (!actor.SimDescription.IsFrankenstein)
                    {
                        string[] givePath = new string[] { MassageTable.LocalizeString("GiveMassage", new object[0x0]) + Localization.Ellipsis };
                        string[] getPath  = new string[] { MassageTable.LocalizeString("GetMassage", new object[0x0]) + Localization.Ellipsis };

                        foreach (MassageTable.MassageInfo info in MassageTable.MassageInfos)
                        {
                            bool flag  = true;
                            bool flag2 = true;
                            if (info.mType == MassageTable.MassageType.Romantic)
                            {
                                if (actor.TraitManager.HasElement(TraitNames.Flirty))
                                {
                                    flag = false;
                                }
                            }
                            else if (info.mType == MassageTable.MassageType.AmazingRomantic)
                            {
                                flag2 = false;
                                if (!actor.TraitManager.HasElement(TraitNames.Flirty))
                                {
                                    flag = false;
                                }
                            }

                            if (flag)
                            {
                                results.Add(new InteractionObjectPair(new Definition(false, info, givePath), target));
                            }

                            if (flag2)
                            {
                                results.Add(new InteractionObjectPair(new Definition(true, info, getPath), target));
                            }
                        }
                    }
                }
                catch (ResetException)
                {
                    throw;
                }
                catch (Exception e)
                {
                    Common.Exception(actor, target, e);
                }
            }
Exemplo n.º 3
0
        public override bool Run()
        {
            try
            {
                if (!Actor.RouteToSlot(Target, Slot.RoutingSlot_1))
                {
                    return(false);
                }
                Actor.ClearExitReasons();
                if (!StartSync(false))
                {
                    return(false);
                }

                // Custom
                ChangeSimToTowelOutfit(Actor, ((mMassInfo.mType == MassageTable.MassageType.Romantic) || (mMassInfo.mType == MassageTable.MassageType.AmazingRomantic)));

                Actor.LoopIdle();
                Actor.SynchronizationLevel = Sim.SyncLevel.Routed;
                Actor.ClearExitReasons();
                if (!Actor.WaitForSynchronizationLevelWithSim(mMasseuse, Sim.SyncLevel.Routed, 60f))
                {
                    return(false);
                }

                StandardEntry();
                BeginCommodityUpdates();
                WaitForMasterInteractionToFinish();
                EndCommodityUpdates(true);
                StandardExit();
                WaitForSyncComplete();
                MassageTable.ChangeSimToEverydayOutfit(Actor);
                return(true);
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, e);
                return(false);
            }
        }
    public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
    {
        go.AddOrGet <LoopingSounds>();
        go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.MassageTable, false);
        MassageTable massageTable = go.AddOrGet <MassageTable>();

        massageTable.overrideAnims = new KAnimFile[1]
        {
            Assets.GetAnim("anim_interacts_masseur_kanim")
        };
        massageTable.stressModificationValue     = -30f;
        massageTable.roomStressModificationValue = -60f;
        massageTable.workLayer = Grid.SceneLayer.BuildingFront;
        Ownable ownable = go.AddOrGet <Ownable>();

        ownable.slotID      = Db.Get().AssignableSlots.MassageTable.Id;
        ownable.canBePublic = true;
        RoomTracker roomTracker = go.AddOrGet <RoomTracker>();

        roomTracker.requiredRoomType = Db.Get().RoomTypes.MassageClinic.Id;
        roomTracker.requirement      = RoomTracker.Requirement.Recommended;
    }