-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from SpontanCombust/next-gen-port
- Loading branch information
Showing
11 changed files
with
80 additions
and
79 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
Binary file modified
BIN
-24 Bytes
(100%)
modSettingsFramework/content/scripts/game/gui/commonMainMenuBase.ws
Binary file not shown.
Binary file modified
BIN
+72.4 KB
(160%)
modSettingsFramework/content/scripts/game/gui/main_menu/ingameMenu.ws
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-118 KB
samples/DifficultyMod/modSettingsFrameworkSampleDifficultyMod/content/scripts/game/r4Game.ws
Binary file not shown.
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
48 changes: 20 additions & 28 deletions
48
...Mod/modSettingsFrameworkSampleDifficultyMod/content/scripts/local/difficulty_mod_execs.ws
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 |
---|---|---|
@@ -1,61 +1,53 @@ | ||
exec function settings_difficulty_init() | ||
{ | ||
var game: CR4Game; | ||
|
||
game = theGame; | ||
if(!game.difficultySettings) { | ||
game.difficultySettings = new ModDifficultySettings in theGame; | ||
GetSettingsMasterRegistry().AddSettings(game.difficultySettings, 'DifficultySettings'); | ||
} | ||
} | ||
|
||
exec function settings_difficulty_easy() | ||
{ | ||
theGame.difficultySettings.general.Reset(0); | ||
GetModDifficultySettings().general.Reset(0); | ||
} | ||
|
||
exec function settings_difficulty_default() | ||
{ | ||
theGame.difficultySettings.general.ResetToDefault(); | ||
GetModDifficultySettings().general.ResetToDefault(); | ||
} | ||
|
||
exec function settings_difficulty_hard() | ||
{ | ||
var game: CR4Game; | ||
var settings : ModDifficultySettings; | ||
settings = GetModDifficultySettings(); | ||
|
||
game = theGame; | ||
game.difficultySettings.general.enabled = true; | ||
game.difficultySettings.general.healthMultip = 2.0; | ||
game.difficultySettings.general.dmgMultip = 2.0; | ||
settings.general.enabled = true; | ||
settings.general.healthMultip = 2.0; | ||
settings.general.dmgMultip = 2.0; | ||
|
||
game.difficultySettings.WriteSettings(); | ||
settings.WriteSettings(); | ||
} | ||
|
||
exec function settings_difficulty_toggle() | ||
{ | ||
var game: CR4Game; | ||
var settings : ModDifficultySettings; | ||
settings = GetModDifficultySettings(); | ||
|
||
game = theGame; | ||
game.difficultySettings.general.enabled = !game.difficultySettings.general.enabled; | ||
game.difficultySettings.WriteSettings(); | ||
settings.general.enabled = !settings.general.enabled; | ||
settings.WriteSettings(); | ||
} | ||
|
||
exec function settings_difficulty_read() | ||
{ | ||
theGame.difficultySettings.ReadSettings(); | ||
GetModDifficultySettings().ReadSettings(); | ||
} | ||
|
||
exec function settings_difficulty_write() | ||
{ | ||
theGame.difficultySettings.WriteSettings(); | ||
GetModDifficultySettings().WriteSettings(); | ||
} | ||
|
||
exec function settings_difficulty_log() | ||
{ | ||
var settings : ModDifficultySettings; | ||
settings = GetModDifficultySettings(); | ||
|
||
LogChannel('DifficultyMod', | ||
"Enabled: " + theGame.difficultySettings.general.enabled + ", " + | ||
"Health multiplier: " + theGame.difficultySettings.general.healthMultip + ", " + | ||
"Damage multiplier: " + theGame.difficultySettings.general.dmgMultip | ||
"Enabled: " + settings.general.enabled + ", " + | ||
"Health multiplier: " + settings.general.healthMultip + ", " + | ||
"Damage multiplier: " + settings.general.dmgMultip | ||
); | ||
} | ||
|
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