Permalink
Browse files

Fix: Drehbuchhaendler erneuert nun die Angebote (teilweise) im Rhythm…

…us von 5 Stunden. Report: Tariel
  • Loading branch information...
GWRon committed Sep 5, 2016
1 parent 2d02df6 commit 425dc5cc21f53ed7d79c672fa9a882aa2906b472
Showing with 21 additions and 0 deletions.
  1. +8 −0 source/game.game.base.bmx
  2. +13 −0 source/main.bmx
@@ -41,6 +41,11 @@ Type TGameBase {_exposeToLua="selected"}
'minutes till movie agency gets refilled again
Field refillMovieAgencyTime:Int = 180
'refill script agency every X Minutes
Field refillScriptAgencyTimer:Int = -1
'minutes till script agency gets refilled again
Field refillScriptAgencyTime:Int = -1
'refill ad agency every X Minutes
Field refillAdAgencyTimer:Int = 240
'minutes till ad agency gets refilled again
@@ -110,6 +115,9 @@ Type TGameBase {_exposeToLua="selected"}
refillMovieAgencyTimer = 180
refillMovieAgencyTime = 180
refillScriptAgencyTimer = 300
refillScriptAgencyTime = 300
refillAdAgencyTimer = 240
refillAdAgencyTime = 240
View
@@ -4365,6 +4365,7 @@ Type GameEvents
'countdown for the refillers
GetGame().refillMovieAgencyTime :-1
GetGame().refillAdAgencyTime :-1
GetGame().refillScriptAgencyTime :-1
'refill if needed
If GetGame().refillMovieAgencyTime <= 0
'delay if there is one in this room
@@ -4378,6 +4379,18 @@ Type GameEvents
RoomHandler_movieagency.GetInstance().ReFillBlocks(True, 0.5)
EndIf
EndIf
If GetGame().refillScriptAgencyTime <= 0
'delay if there is one in this room
If GetRoomCollection().GetFirstByDetails("scriptagency").hasOccupant()
GetGame().refillScriptAgencyTime :+ 15
Else
'reset but with a bit randomness
GetGame().refillScriptAgencyTime = GetGame().refillScriptAgencyTimer + randrange(0,20)-10
TLogger.Log("GameEvents.OnMinute", "partly refilling scriptagency", LOG_DEBUG)
RoomHandler_scriptagency.GetInstance().ReFillBlocks(True, 0.65)
EndIf
EndIf
If GetGame().refillAdAgencyTime <= 0
'delay if there is one in this room
If GetRoomCollection().GetFirstByDetails("adagency").hasOccupant()

0 comments on commit 425dc5c

Please sign in to comment.