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

More wreck edits #2567

Merged
merged 7 commits into from
Dec 14, 2024
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
2 changes: 1 addition & 1 deletion Content.Shared/EntityTable/EntitySelectors/EntSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected override IEnumerable<EntProtoId> GetSpawnsImplementation(System.Random
IEntityManager entMan,
IPrototypeManager proto)
{
var num = (int) Math.Round(Amount.Get(rand, entMan, proto));
var num = (int) Math.Floor(Amount.Get(rand, entMan, proto)); // Frontier: Round<Floor
for (var i = 0; i < num; i++)
{
yield return Id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public IEnumerable<EntProtoId> GetSpawns(System.Random rand,
IEntityManager entMan,
IPrototypeManager proto)
{
var rolls = Rolls.Get(rand, entMan, proto);
var rolls = Math.Floor(Rolls.Get(rand, entMan, proto)); // Frontier: add Math.Floor
for (var i = 0; i < rolls; i++)
{
if (!rand.Prob(Prob))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ namespace Content.Shared.EntityTable.ValueSelector;
/// <summary>
/// Gives a value between the two numbers specified, inclusive.
/// </summary>
/// <remarks>
/// Frontier: output must be floored to have this behaviour
/// </remarks>
public sealed partial class RangeNumberSelector : NumberSelector
{
[DataField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
weight: 0.5
amount: !type:RangeNumberSelector
range: 1, 3
- id: CrayonBox # Frontier
weight: 0.01 # Frontier
- id: CrayonMagic # Frontier
weight: 0.0001 # Frontier

- type: entityTable
id: SalvageScrapHighValue
Expand Down Expand Up @@ -187,6 +191,11 @@
- id: FlashlightLantern
- id: FireExtinguisher
- id: SurvivalKnife
- !type:GroupSelector # Frontier
children: # Frontier
- id: BoxInflatable # Frontier
- id: BoxLighttube # Frontier
- id: BoxLightbulb # Frontier

- type: entityTable
id: SalvageEquipmentUncommon
Expand Down
Loading
Loading