Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vend change #69

Merged
merged 3 commits into from
Jul 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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