public override bool Run() { bool success = base.Run(); WorldType type = GameUtils.GetCurrentWorldType(); bool processPurchase = success; //Don't process for the cashier if (!CommonMethods.IsSociable(base.Actor)) { processPurchase = false; } //Pay the lot owner if (processPurchase && success && base.Actor.IsHoldingAnything()) { int price = AddMenuItem.ReturnCoffeePrice(); //No lot owners abroad if (type != WorldType.Vacation) { CommonMethods.PayLotOwner(base.Actor, base.Target.LotCurrent, price); } householdFunds = 0; //if this happened through "Call for meal" //Removing the price from the active buying Sim needs to be done manually base.Actor.ModifyFunds(-price); } return(success); }
public override bool Run() { bool success = base.Run(); //Pay lot owner WorldType type = GameUtils.GetCurrentWorldType(); if (type != WorldType.Vacation) { bool processPurchase = success; //Don't process for the cashier if (!CommonMethods.IsSociable(base.Actor)) { processPurchase = false; } //Pay the lot owner if (processPurchase) { int price = (int)((householdFunds - base.Actor.Household.FamilyFunds) * (new decimal(AddMenuItem.ReturnProfit()) / 100)); if (price <= 0) { price = 5; } CommonMethods.PayLotOwner(base.Actor, base.Target.LotCurrent, price); householdFunds = 0; } } return(success); }
// Methods public override void PopulatePieMenuPicker(ref InteractionInstanceParameters parameters, out List <ObjectPicker.TabInfo> listObjs, out List <ObjectPicker.HeaderInfo> headers, out int NumSelectableRows) { NumSelectableRows = 4; Sim actor = parameters.Actor as Sim; List <Sim> sims = new List <Sim>(); foreach (Sim sim in parameters.Target.LotCurrent.GetSims()) { if (sim.SimDescription.TeenOrAbove || CommonMethods.IsSociable(sim)) { sims.Add(sim); } } base.PopulateSimPicker(ref parameters, out listObjs, out headers, sims, true); }
public override bool Run() { StyledNotification.Show(new StyledNotification.Format("RUN", StyledNotification.NotificationStyle.kGameMessageNegative)); bool success = base.Run(); WorldType type = GameUtils.GetCurrentWorldType(); bool processPurchase = success; //Don't process for the cashier if (!CommonMethods.IsSociable(base.Actor)) { processPurchase = false; } StyledNotification.Show(new StyledNotification.Format("After run", StyledNotification.NotificationStyle.kGameMessageNegative)); //Pay the lot owner if (processPurchase && success) { int price = (int)((householdFunds - base.Actor.Household.FamilyFunds) * (new decimal(AddMenuItem.ReturnProfit()) / 100)); if (price <= 0) { price = 5; } StyledNotification.Show(new StyledNotification.Format(base.Actor.Name, StyledNotification.NotificationStyle.kGameMessageNegative)); //No lot owners abroad if (type != WorldType.Vacation) { CommonMethods.PayLotOwner(base.Actor, base.Target.LotCurrent, price); } householdFunds = 0; //if this happened through "Call for meal" //Removing the price from the active buying Sim needs to be done manually if (base.Autonomous) { base.Actor.ModifyFunds(-price); } } return(success); }