Skip to content

Commit

Permalink
Fix: [Custom production] Remove scripts of movies after production fi…
Browse files Browse the repository at this point in the history
…nished (not just series). Report: DannyF
  • Loading branch information
GWRon committed May 26, 2017
1 parent 04d7e97 commit 7921cf4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions source/game.production.bmx
Expand Up @@ -531,17 +531,19 @@ endrem
'(parental script is already informed on creation of its licence)
productionConcept.script.FinishProduction(programmeLicence.GetGUID())

if owner
if owner and GetPlayerProgrammeCollection(owner)
'if the script does not allow further productions, it is finished
'and should be removed from the player
if productionConcept.script.HasParentScript() and productionConcept.script.GetParentScript().IsProduced()

'series: remove parent if it is finished now
if productionConcept.script.HasParentScript()
local parentScript:TScript = productionConcept.script.GetParentScript()
if GetPlayerProgrammeCollection(owner)
if parentScript.IsProduced()
GetPlayerProgrammeCollection(owner).RemoveScript(parentscript, False)
endif
else
'remove finished concepts
endif
'single scripts
GetPlayerProgrammeCollection(owner).RemoveScript(productionConcept.script, False)
endif

'=== 4. ADD TO PLAYER ===
Expand Down

0 comments on commit 7921cf4

Please sign in to comment.