Skip to content

Commit

Permalink
Merge pull request #69 from dvir001/Vend-Change
Browse files Browse the repository at this point in the history
Vend change
  • Loading branch information
Cheackraze committed Jul 23, 2023
2 parents 41e4cbe + 71ab625 commit 12862c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Content.Server/VendingMachines/VendingMachineSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ private void OnVendingPrice(EntityUid uid, VendingMachineComponent component, re
continue;
}

price += entry.Amount * _pricing.GetEstimatedPrice(proto);
price += entry.Amount; //* _pricing.GetEstimatedPrice(proto); Removed this to make machine price without the items worth.
}

args.Price += price;
//args.Price += price; Removed this to also make the machine price without the amount of items worth.
}

protected override void OnComponentInit(EntityUid uid, VendingMachineComponent component, ComponentInit args)
Expand Down Expand Up @@ -421,10 +421,10 @@ public void EjectRandom(EntityUid uid, bool throwItem, bool forceEject = false,
var entry = GetEntry(uid, item.ID, item.Type, vendComponent);
if (entry != null)
entry.Amount--;
EjectItem(uid, vendComponent, forceEject);
//EjectItem(uid, vendComponent, forceEject); // Stop vending machine from giving free items
}
else
TryEjectVendorItem(uid, item.Type, item.ID, throwItem, 0, vendComponent);
//else
//TryEjectVendorItem(uid, item.Type, item.ID, throwItem, 0, vendComponent); // Stop vending machine from giving free items
}

private void EjectItem(EntityUid uid, VendingMachineComponent? vendComponent = null, bool forceEject = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
- type: SentienceTarget
flavorKind: station-event-random-sentience-flavor-mechanical
- type: StaticPrice
price: 100
price: 1000
- type: Appearance
- type: WiresVisuals
- type: MarketModifier
Expand Down

0 comments on commit 12862c2

Please sign in to comment.