mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 10:54:19 -04:00
Allow unique ruins stat gain notifications
This commit is contained in:
parent
3119bdb005
commit
072f08d440
@ -359,10 +359,15 @@ object UniqueTriggerActivation {
|
||||
|| unique.params[0].toIntOrNull() == null
|
||||
) return false
|
||||
|
||||
val stats = Stats().add(stat, unique.params[0].toFloat())
|
||||
val statAmount = unique.params[0].toInt()
|
||||
val stats = Stats().add(stat, statAmount.toFloat())
|
||||
civInfo.addStats(stats)
|
||||
|
||||
val notificationText = getNotificationText(notification, triggerNotificationText,
|
||||
val filledNotification = if(notification!=null && notification.hasPlaceholderParameters())
|
||||
notification.fillPlaceholders(statAmount.toString())
|
||||
else notification
|
||||
|
||||
val notificationText = getNotificationText(filledNotification, triggerNotificationText,
|
||||
"Gained [$stats]")
|
||||
?: return true
|
||||
|
||||
@ -383,7 +388,11 @@ object UniqueTriggerActivation {
|
||||
val stats = Stats().add(stat, finalStatAmount)
|
||||
civInfo.addStats(stats)
|
||||
|
||||
val notificationText = getNotificationText(notification, triggerNotificationText,
|
||||
val filledNotification = if (notification!=null && notification.hasPlaceholderParameters())
|
||||
notification.fillPlaceholders(finalStatAmount.toString())
|
||||
else notification
|
||||
|
||||
val notificationText = getNotificationText(filledNotification, triggerNotificationText,
|
||||
"Gained [$stats]")
|
||||
?: return true
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user