Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix: [Custom Production] Remove production concepts of episodes when …
…selling a non-completed series. Report: Gast2
  • Loading branch information
GWRon committed Nov 9, 2017
1 parent 786124d commit 546381e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion source/game.player.programmecollection.bmx
Expand Up @@ -667,6 +667,7 @@ Type TPlayerProgrammeCollection extends TOwnedGameObject {_exposeToLua="selected
EventManager.triggerEvent(TEventSimple.Create("programmecollection.removeScriptFromSuitcase", new TData.add("script", script), self))
EventManager.triggerEvent(TEventSimple.Create("programmecollection.moveScript", new TData.add("script", script), self))
endif

return TRUE
End Method

Expand Down Expand Up @@ -792,11 +793,20 @@ Type TPlayerProgrammeCollection extends TOwnedGameObject {_exposeToLua="selected
if pc.script = script then remove :+ [pc]
Next

'search for episodes
local removedSubs:int = 0
if script.GetSubScriptCount() > 0
for local subScript:TScript = Eachin script.subScripts
removedSubs :+ DestroyProductionConceptsByScript(subScript)
next
endif

'finally remove a potentially found concept
For local pc:TProductionConcept = EachIn remove
DestroyProductionConcept(pc)
Next

return remove.length
return remove.length + removedsubs
End Method


Expand Down

0 comments on commit 546381e

Please sign in to comment.