Difference between revisions of "User:Rasikko"
no edit summary
imported>Scrivener07 |
imported>Scrivener07 |
||
Line 61: | Line 61: | ||
</source> | </source> | ||
<br> | <br> | ||
<source lang="papyrus"> | |||
; Functions for returning units of time since 10.28.2287 | |||
; 30.416667 is used because Fallout 4 does not have leap years and thus | |||
; always has common years(365 days). | |||
Float Function GetMonthsPassed(Float afDaysPassed) Global | |||
; Returns the number of month passed since game start. | |||
return afDaysPassed / 30.416667 | |||
EndFunction | |||
Float Function GetWeeksPassed(Float afDaysPassed) Global | |||
; Returns the number of weeks passed since game start. | |||
return afDaysPassed / 7 | |||
EndFunction | |||
Float Function GetTotalHoursPassed(Float afDaysPassed) Global | |||
; Returns the total number of hours passed since game start. | |||
return afDaysPassed * 24.0 | |||
EndFunction | |||
Float Function GetTotalMinutesPassed(Float afDaysPassed) Global | |||
; Returns the total number of minutes passed since game start. | |||
return afDaysPassed * 24.0 * 60.0 | |||
EndFunction | |||
Float Function GetTotalSecondsPassed(Float afDaysPassed) Global | |||
; Returns the total number of seconds passed since game start. | |||
return afDaysPassed * 24.0 * 60 * 60.0 | |||
EndFunction | |||
</source> |