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

[CompVehicleLauncher] Flying vehicles with zero cargo capacity should be over encumbered #189

Open
awgv opened this issue Aug 21, 2024 · 0 comments
Assignees
Labels
Enhancement Gameplay or code enhancement, not related to new ideas Idea Ideas and new concepts for the mod

Comments

@awgv
Copy link

awgv commented Aug 21, 2024

Hello,

It would be great to add an additional check to prevent vehicles with zero cargo capacity from being able to launch. This request comes from how VF separates cargo capacity and passengers—I ended up using cargo capacity as currency for upgrades; you can upgrade a vehicle with cargo capacity or increased passenger slots, but passenger upgrades decrease cargo capacity.

If I load anything into a vehicle with zero cargo capacity, a vehicle will become over encumbered, but if I load no cargo and some passengers, I’ll still be able to launch, which doesn’t make sense to me balance-wise. We could expose an XML property to allow controlling the behavior, but personally, I don’t see the use case where a vehicle can launch with zero cargo capacity.

float capacity = Vehicle.GetStatValue(VehicleStatDefOf.CargoCapacity);
if (MassUtility.InventoryMass(Vehicle) > capacity)
{
disableReason = "VF_CannotLaunchOverEncumbered".Translate(Vehicle.LabelShort);
}

@awgv awgv added Enhancement Gameplay or code enhancement, not related to new ideas Idea Ideas and new concepts for the mod labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Gameplay or code enhancement, not related to new ideas Idea Ideas and new concepts for the mod
Projects
None yet
Development

No branches or pull requests

2 participants