Game.Simulation.IServiceFeeSystem
Assembly: Assembly-CSharp (game code)
Namespace: Game.Simulation
Type: interface
Base: none (interface)
Summary:
IServiceFeeSystem defines methods for querying service fees and estimating service-fee-derived income for a given player context. Implementations compute and return a Unity.Mathematics.int3 describing service fees (three-component integer vector) and an integer income estimate for a provided fee value. The PlayerResource parameter (from Game.City) supplies the player-specific data needed for calculations; exact interpretation of the int3 components depends on the concrete implementation.
Fields
- None
No fields are defined on this interface. Implementing types may have internal fields.
Properties
- None
No properties are defined on this interface.
Constructors
- Not applicable
Interfaces do not define constructors. Concrete implementations must supply any required construction.
Methods
-
int3 GetServiceFees(PlayerResource resource)
Returns a Unity.Mathematics.int3 containing the service fee values computed for the provided PlayerResource. The meaning of each of the three components is implementation-specific (e.g., different service categories). Use the PlayerResource to factor in player state, policies, modifiers, or other relevant data. -
int GetServiceFeeIncomeEstimate(PlayerResource resource, float fee)
Returns an estimated income (integer) that would be generated for the given PlayerResource when applying the specified fee value. The fee parameter is a float (interpretation—absolute amount, percentage, etc.—depends on implementation). Implementations should use player data to estimate number of payers, modifiers, and other influences on revenue.
Usage Example
// Example: calling the system (usage from a mod/system that has access to an IServiceFeeSystem instance)
IServiceFeeSystem feeSystem = /* obtain reference from game/service locator */;
PlayerResource playerResource = /* obtain player resource for which to query fees */;
int3 fees = feeSystem.GetServiceFees(playerResource);
int estimated = feeSystem.GetServiceFeeIncomeEstimate(playerResource, 2.5f);
// Example: minimal implementation skeleton
public class SimpleServiceFeeSystem : IServiceFeeSystem
{
public int3 GetServiceFees(PlayerResource resource)
{
// Example placeholder values. Replace with real logic using `resource`.
return new int3(10, 20, 30);
}
public int GetServiceFeeIncomeEstimate(PlayerResource resource, float fee)
{
// Simplified estimate: implementations should use actual population/customers and modifiers.
int simulatedPayers = 100; // placeholder
return (int)(simulatedPayers * fee);
}
}
Notes:
- The concrete semantics (what each int3 component represents, how fee
is interpreted) depend on the game's implementation. Consult the specific implementation or game code paths that query this interface to understand exact behavior when modding.