Permalink
Browse files

Fix: [Image] Added missing channel image penalty for infomercials bas…

…ed on advertisements. Report: Gast2
  • Loading branch information...
GWRon committed Oct 24, 2017
1 parent 320922f commit fcd17716d3a4b9dd4305d80d9b8ab567a021ede2
Showing with 12 additions and 5 deletions.
  1. +7 −2 source/game.broadcastmaterial.advertisement.bmx
  2. +5 −3 source/game.broadcastmaterial.programme.bmx
@@ -125,7 +125,6 @@ Type TAdvertisement Extends TBroadcastMaterialDefaultImpl {_exposeToLua="selecte
'inform contract that it got broadcasted by a player
contract.doFinishBroadcast(owner, usedAsType)
if usedAsType = TVTBroadcastMaterialType.PROGRAMME
FinishBroadcastingAsProgramme(day, hour, minute, audienceData)
' GetBroadcastInformationProvider().SetInfomercialAired(licence.owner, GetBroadcastInformationProvider().GetInfomercialAired(licence.owner) + 1, GetWorldTime.MakeTime(0,day,hour,minute) )
@@ -165,8 +164,14 @@ Type TAdvertisement Extends TBroadcastMaterialDefaultImpl {_exposeToLua="selecte
'adjust topicality relative to possible audience
contract.base.CutInfomercialTopicality(GetInfomercialTopicalityCutModifier( audienceResult.GetWholeMarketAudienceQuotePercentage()))
contract.base.SetTimesBroadcastedAsInfomercial( contract.base.GetTimesBroadcastedAsInfomercial(owner) + 1, owner )
'=== ADJUST CHANNEL IMAGE ===
'Image-Penalty
'-1 = for both genders
TLogger.Log("ChangePublicImage()", "Player #"+owner+": image change for infomercial.", LOG_DEBUG)
Local penalty:TAudience = new TAudience.Init(-1, -0.25, -0.25, -0.15, -0.35, -0.15, -0.55, -0.15)
GetPublicImage(owner).ChangeImage(penalty)
End Method
@@ -275,16 +275,18 @@ Type TProgramme Extends TBroadcastMaterialDefaultImpl {_exposeToLua="selected"}
'=== ADJUST CHANNEL IMAGE ===
'Image-Penalty
If data.IsPaid()
TLogger.Log("ChangePublicImage()", "Player #"+owner+": image change for paid programme.", LOG_DEBUG)
'-1 = for both genders
Local penalty:TAudience = new TAudience.Init(-1, -0.25, -0.25, -0.15, -0.35, -0.15, -0.55, -0.15)
penalty.MultiplyFloat(data.blocks)
GetPublicImage(owner).ChangeImage(penalty)
'print "DW Strafe: " + penalty.ToString()
ElseIf data.IsTrash()
TLogger.Log("TAdvertisement.FinishBroadcastingAsProgramme", "Player #"+owner+": image change for paid programme: " + penalty.ToString(), LOG_DEBUG)
endif
If data.IsTrash()
TLogger.Log("ChangePublicImage()", "Player #"+owner+": image change for trash programme.", LOG_DEBUG)
Local penalty:TAudience = new TAudience.Init(-1, 0, 0, +0.2, -0.2, +0.2, -0.5, -0.1)
penalty.MultiplyFloat(data.blocks)
GetPublicImage(owner).ChangeImage(penalty)
'print "Trash Strafe: " + penalty.ToString()
End If

0 comments on commit fcd1771

Please sign in to comment.