-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
253 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
addons/overthrow_main/campaign/missions/Overthrow.Tanoa/UI/characterSheet.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
closedialog 0; | ||
createDialog "OT_dialog_char"; | ||
openMap false; | ||
|
||
disableSerialization; | ||
|
||
private _fitness = player getVariable ["OT_fitness",1]; | ||
|
||
private _ctrl = (findDisplay 8003) displayCtrl 1100; | ||
_ctrl ctrlSetStructuredText parseText format["<t size=""2"">Fitness</t><br/><t size=""1.1"">Level %1</t><br/><t size=""0.7"">Increases the distance you can sprint</t>",_fitness]; | ||
|
||
getFitnessPrice = { | ||
private _fitness = player getVariable ["OT_fitness",1]; | ||
private _price = 10; | ||
if(_fitness == 2) then { | ||
_price = 100; | ||
}; | ||
if(_fitness == 3) then { | ||
_price = 500; | ||
}; | ||
if(_fitness == 4) then { | ||
_price = 1000; | ||
}; | ||
_price; | ||
}; | ||
|
||
private _price = [] call getFitnessPrice; | ||
ctrlSetText [1600,format["Increase Level (-%1 Influence)",_price]]; | ||
|
||
if(_fitness == 5) then { | ||
ctrlShow [1600,false]; | ||
}; | ||
|
||
buyFitness = { | ||
disableSerialization; | ||
|
||
private _fitness = player getVariable ["OT_fitness",1]; | ||
private _price = [] call getFitnessPrice; | ||
private _inf = player getVariable ["influence",0]; | ||
|
||
if(_inf < _price) exitWith {"You do not have enough influence" call notify_minor}; | ||
|
||
_fitness = _fitness + 1; | ||
player setVariable ["OT_fitness",_fitness,true]; | ||
if(_fitness == 5) then { | ||
ctrlEnable [1600,false]; | ||
}; | ||
player setVariable ["influence",_inf - _price,true]; | ||
|
||
private _ctrl = (findDisplay 8003) displayCtrl 1100; | ||
_ctrl ctrlSetStructuredText parseText format["<t size=""2"">Fitness</t><br/><t size=""1.1"">Level %1</t><br/><t size=""0.7"">Increases the distance you can sprint</t>",_fitness]; | ||
_price = [] call getFitnessPrice; | ||
ctrlSetText [1600,format["Increase Level (-%1 Influence)",_price]]; | ||
|
||
if(_fitness == 5) then { | ||
ctrlShow [1600,false]; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.