User:PROXiCiDE/TimeUtil
< User:PROXiCiDE
Jump to navigation
Jump to search
Revision as of 13:32, 22 April 2013 by imported>PROXiCiDE (Created page with "<source lang = papyrus> ;================================================================================= ; Properties ;======================================================...")
;=================================================================================
; Properties
;=================================================================================
GlobalVariable Property GameHour Auto
GlobalVariable Property GameDay Auto
GlobalVariable Property GameMonth Auto
GlobalVariable Property GameYear Auto
GlobalVariable Property GameDaysPassed Auto
;=================================================================================
; Time / Date Functions
;=================================================================================
Float Function GetGameHour()
Return GameHour.GetValue()
EndFunction
Float Function GetGameDay()
Return GameDay.GetValue()
EndFunction
Float Function GetGameMonth()
Return GameMonth.GetValue()
EndFunction
Float Function GetGameYear()
Return GameYear.GetValue()
EndFunction
Float Function GetGameDaysPassed()
Return GameDaysPassed.GetValue()
EndFunction
Bool Function IsMorning()
If GetGameHour() >= 6 && GetGameHour() < 12
Return True
EndIf
Return False
EndFunction
Bool Function IsAfternoon()
If GetGameHour() >= 12 && GetGameHour() < 18
Return True
EndIf
Return False
EndFunction
Bool Function IsEvening()
If GetGameHour() >= 18 && GetGameHour() < 24
Return True
EndIf
Return False
EndFunction
Bool Function IsEarlyMorning()
If GetGameHour() >= 0 && GetGameHour() < 6
Return True
EndIf
Return False
EndFunction
Bool Function IsNightTime()
Return IsEarlyMorning() || IsEvening()
EndFunction
Bool Function IsDayTime()
Return IsMorning() || IsAfternoon()
EndFunction