Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Aelto/tw3-random-encounters-reworked
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c6020d23426faba22c7276b00776a226c93e4e88
Choose a base ref
..
head repository: Aelto/tw3-random-encounters-reworked
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6bde5e0cd71502cda8c73bb4c94ed062244c3d20
Choose a head ref
244 changes: 0 additions & 244 deletions src/contract/contract.wss

This file was deleted.

7 changes: 1 addition & 6 deletions src/contract/contract_manager.wss
Original file line number Diff line number Diff line change
@@ -46,10 +46,6 @@ statemachine class RER_ContractManager {
return this.master.storages.contract.has_ongoing_contract;
}

public function isPlayerInContract(): bool {
return this.GetCurrentStateName() == 'Processing';
}

public function endOngoingContract() {
this.master.storages.contract.has_ongoing_contract = false;
this.master.storages.contract.save();
@@ -82,8 +78,7 @@ statemachine class RER_ContractManager {
var strength: float = bestiary_entry.ecosystem_delay_multiplier;
var enemy_count: int = bestiary_entry.getSpawnCount(this.master);

var crowns_amount_settings: float =
(master.settings.crowns_amounts_by_encounter[EncounterType_CONTRACT] / 100.0)
var crowns_amount_settings: float = master.settings.crowns_amounts_by_encounter[EncounterType_CONTRACT]
* bestiary_entry.crowns_percentage
* RandRangeF(1.2, 0.8);

44 changes: 2 additions & 42 deletions src/contract/states/dialog_choice.wss
Original file line number Diff line number Diff line change
@@ -48,8 +48,7 @@ state DialogChoice in RER_ContractManager {

private latent function DialogChoice_prepareAndDisplayDialogChoices() {
var playtime: int = GameTimeHours(theGame.CalculateTimePlayed());
var level: int = RER_getPlayerLevel();
var contracts_count: int = Min(7, level / 10) + 1;
var contracts_count: int = Min(3, playtime / 20) + 1;

var noticeboard: W3NoticeBoard = parent.getNearbyNoticeboard();
var contracts: array<RER_Contract>;
@@ -144,7 +143,7 @@ state DialogChoice in RER_ContractManager {
theSound.SoundEvent("gui_ingame_quest_active");
this.camera.Stop();

this.displayBookForContract(selected_contract, parent.master.bestiary);
NHUD(GetLocStringByKey("rer_contract_started"));

parent.startContract(selected_contract);
return;
@@ -154,43 +153,4 @@ state DialogChoice in RER_ContractManager {

NDEBUG("RER ERROR: Unable to get creature_type from dialogue choices");
}

private function displayBookForContract(contract: RER_Contract, bestiary: RER_Bestiary) {
var species_list: array<CreatureType>;

var message: string = "Main targets:<br/>";
species_list = contract.speciesList();
for species: CreatureType in species_list {
message += " - " + getCreatureNameFromCreatureType(
bestiary,
species
) + "<br/>";
}

message += "<br/><br/>";
message += "Secondary targets:";
message += "<br/>";
species_list = contract.secondarySpeciesList();
for species: CreatureType in species_list {
message += " - " + getCreatureNameFromCreatureType(
bestiary,
species
) + "<br/>";
}

species_list = contract.opportunisticSpeciesList();
if (species_list.Size() > 0) {
message += "<br/><br/>";
message += "Opportunistic species from the region:";
message += "<br/>";
for species: CreatureType in species_list {
message += " - " + getCreatureNameFromCreatureType(
bestiary,
species
) + "<br/>";
}
}

RER_openPopup(GetLocStringByKey('rer_contract'), message);
}
}
42 changes: 42 additions & 0 deletions src/contract/states/difficulty_selection.wss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

// state DifficultySelection in RER_ContractManager {

// event OnEnterState(previous_state_name: name) {
// super.OnEnterState(previous_state_name);
// NLOG("RER_ContractManager - state DifficultySelection");

// this.DifficultySelection_main();
// }

// entry function DifficultySelection_main() {
// this.DifficultySelection_displayDifficultyHaggleModule();
// }

// private function DifficultySelection_displayDifficultyHaggleModule() {
// var noticeboard_identifier: RER_NoticeboardIdentifier;
// var haggle_module_dialog: RER_ContractModuleDialog;

// theGame.CloseMenu('NoticeBoardMenu');
// theInput.SetContext(thePlayer.GetExplorationInputContext());
// theGame.SetIsDialogOrCutscenePlaying(false);
// theGame.GetGuiManager().RequestMouseCursor(false);

// noticeboard_identifier = parent.getUniqueIdFromNoticeboard(parent.getNearbyNoticeboard());

// if (!parent.canSelectContractDifficulty()) {
// // the player cannot select the difficulty, go straight to the next state.
// parent.contractHaggleDifficultySelected(
// RER_ContractDifficultyLevel(
// parent.getMaximumDifficultyForReputation(
// RER_getContractReputationFactValue()
// )
// )
// );

// return;
// }

// haggle_module_dialog = new RER_ContractModuleDialog in parent;
// haggle_module_dialog.openDifficultySelectorWindow(parent, noticeboard_identifier);
// }
// }
Loading