Skip to content

Commit

Permalink
fixed crash incidence
Browse files Browse the repository at this point in the history
  • Loading branch information
musurca committed Mar 9, 2022
1 parent d49c392 commit f2a4291
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Fatigue modeling for *Command: Modern Operations*
Using the *Fatigue Avoidance Scheduling Tool* (available from the Special Actions menu), you can monitor the effectiveness of your pilots, and attempt to stand down particularly exhausted pilots for rest.

### How do I add it to my scenario?
1) Download the [latest release](https://github.com/musurca/SANDMAN/releases/download/v0.2.0/SANDMAN_v0.2.0.zip).
1) Download the [latest release](https://github.com/musurca/SANDMAN/releases).
2) Open your scenario in the Scenario Editor.
2) Go to Editor -> Lua Script Console
3) Paste the contents of the file `sandman_min.lua` into the white box, then click **Run**.
Expand Down Expand Up @@ -50,6 +50,9 @@ This will produce compiled but unminified Lua code in `debug/sandman_debug.lua`.
**SANDMAN** works by injecting its own code into a *CMO* LuaScript event action which is executed upon every scenario load. The build process converts the **SANDMAN** source into a minified, escaped string which is then re-embedded into its own code.

### Version History
v0.2.1 (3/8/2022):
* fixed: much higher than intended crash incidence

v0.2.0 (3/6/2022):
* added: reserve crews
* added: reserve display and replacement thresholds
Expand Down
4 changes: 2 additions & 2 deletions src/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function Sandman_InputSides()
if use_defaults == true then
min_hrs[k] = DEFAULT_MIN_HOURS_AWAKE
max_hrs[k] = DEFAULT_MAX_HOURS_AWAKE
crash_incid[k] = DEFAULT_CRASH_INCIDENCE
crash_incid[k] = DEFAULT_CRASH_INCIDENCE/100000
else
local min_hrs_awake, max_hrs_awake, crash_rate
repeat
Expand Down Expand Up @@ -109,7 +109,7 @@ function Sandman_InputSides()
sides_enabled[k] = 0
min_hrs[k] = DEFAULT_MIN_HOURS_AWAKE
max_hrs[k] = DEFAULT_MAX_HOURS_AWAKE
crash_incid[k] = DEFAULT_CRASH_INCIDENCE
crash_incid[k] = DEFAULT_CRASH_INCIDENCE/100000
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/wizard.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SANDMAN_VERSION = "0.2.0"
SANDMAN_VERSION = "0.2.1"

function Sandman_Wizard()
local result = Input_YesNo("Thanks for using SANDMAN v"..SANDMAN_VERSION..", the fatigue modeling system for CMO.\n\nHave you saved a backup of this scenario?")
Expand Down
2 changes: 1 addition & 1 deletion src/xx_comments.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--[[
---------------------------------------------------------------------------------
SANDMAN v0.2.0 by Nicholas Musurca ([email protected])
SANDMAN v0.2.1 by Nicholas Musurca ([email protected])
Licensed under GNU GPLv3. (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
---------------------------------------------------------------------------------
Expand Down

0 comments on commit f2a4291

Please sign in to comment.