payday frakgeld geht brrrrr
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -82,6 +82,12 @@ export default function (globalData: IGlobalData) {
|
|||||||
item.SetRightLabel("~g~+ $" + moneyFormat(p.financialHelp));
|
item.SetRightLabel("~g~+ $" + moneyFormat(p.financialHelp));
|
||||||
paycheckMenu.AddItem(item);
|
paycheckMenu.AddItem(item);
|
||||||
|
|
||||||
|
if (p.factionMoney) {
|
||||||
|
item = new UIMenuItem("Fraktionsgeld");
|
||||||
|
item.SetRightLabel("~g~+ $" + moneyFormat(p.factionMoney));
|
||||||
|
paycheckMenu.AddItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
item = new UIMenuItem("Fahrzeugsteuer");
|
item = new UIMenuItem("Fahrzeugsteuer");
|
||||||
item.SetRightLabel("~r~- $" + moneyFormat(p.vehicleTaxation));
|
item.SetRightLabel("~r~- $" + moneyFormat(p.vehicleTaxation));
|
||||||
paycheckMenu.AddItem(item);
|
paycheckMenu.AddItem(item);
|
||||||
@@ -106,8 +112,7 @@ export default function (globalData: IGlobalData) {
|
|||||||
menu.BindMenuToItem(paycheckMenu, paycheckItem);
|
menu.BindMenuToItem(paycheckMenu, paycheckItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ticket_boolean == true)
|
if (ticket_boolean == true) {
|
||||||
{
|
|
||||||
menu.AddItem(ticketItem);
|
menu.AddItem(ticketItem);
|
||||||
menu.BindMenuToItem(getTicketMenu(ticket_amount, menu), ticketItem);
|
menu.BindMenuToItem(getTicketMenu(ticket_amount, menu), ticketItem);
|
||||||
}
|
}
|
||||||
|
|||||||
1
ReallifeGamemode.Client/global.d.ts
vendored
1
ReallifeGamemode.Client/global.d.ts
vendored
@@ -35,6 +35,7 @@ declare type Paycheck = {
|
|||||||
amount: number;
|
amount: number;
|
||||||
rentalFees: number;
|
rentalFees: number;
|
||||||
healthInsurance: number;
|
healthInsurance: number;
|
||||||
|
factionMoney: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare type Licenses = {
|
declare type Licenses = {
|
||||||
|
|||||||
@@ -81,9 +81,17 @@ namespace ReallifeGamemode.Server.Finance
|
|||||||
|
|
||||||
int healthInsurance = (int)(user.BankAccount.Balance * 0.001);
|
int healthInsurance = (int)(user.BankAccount.Balance * 0.001);
|
||||||
|
|
||||||
int amount = wage - (int)(wage * financialInterest) - vehicleTaxation - (int)propertyTax + (int)financialHelp - rentalFees - healthInsurance;
|
|
||||||
|
|
||||||
Paycheck paycheck = new Paycheck(financialHelp, financialInterest, vehicleTaxation, propertyTax, wage, amount, rentalFees, healthInsurance);
|
int? factionMoney = null;
|
||||||
|
|
||||||
|
if (user.Faction != null && user.FactionRank != null)
|
||||||
|
{
|
||||||
|
factionMoney = user.FactionRank.Order * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
int amount = wage - (int)(wage * financialInterest) - vehicleTaxation - (int)propertyTax + (int)financialHelp - rentalFees - healthInsurance + (factionMoney ?? 0);
|
||||||
|
|
||||||
|
Paycheck paycheck = new Paycheck(financialHelp, financialInterest, vehicleTaxation, propertyTax, wage, amount, rentalFees, healthInsurance, factionMoney);
|
||||||
Paychecks[user.Id] = paycheck;
|
Paychecks[user.Id] = paycheck;
|
||||||
ReleasePayDay(client, paycheck);
|
ReleasePayDay(client, paycheck);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,10 @@ namespace ReallifeGamemode.Server.Finance
|
|||||||
[JsonProperty("healthInsurance")]
|
[JsonProperty("healthInsurance")]
|
||||||
public int HealthInsurance { get; set; } = 0;
|
public int HealthInsurance { get; set; } = 0;
|
||||||
|
|
||||||
public Paycheck(float FinancialHelp, float FinancialInterest, int VehicleTaxation, float PropertyTaxation, int Wage, int Amount, int RentalFees, int HealthInsurance)
|
[JsonProperty("factionMoney")]
|
||||||
|
public int? FactionMoney { get; set; } = 0;
|
||||||
|
|
||||||
|
public Paycheck(float FinancialHelp, float FinancialInterest, int VehicleTaxation, float PropertyTaxation, int Wage, int Amount, int RentalFees, int HealthInsurance, int? FactionMoney)
|
||||||
{
|
{
|
||||||
this.FinancialHelp = FinancialHelp;
|
this.FinancialHelp = FinancialHelp;
|
||||||
this.FinancialInterest = FinancialInterest;
|
this.FinancialInterest = FinancialInterest;
|
||||||
@@ -47,6 +50,7 @@ namespace ReallifeGamemode.Server.Finance
|
|||||||
this.Amount = Amount;
|
this.Amount = Amount;
|
||||||
this.RentalFees = RentalFees;
|
this.RentalFees = RentalFees;
|
||||||
this.HealthInsurance = HealthInsurance;
|
this.HealthInsurance = HealthInsurance;
|
||||||
|
this.FactionMoney = FactionMoney;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user