[REL, but lazy] show "build" events again

Discussion in 'Mod Discussions' started by cola_colin, March 1, 2014.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    PA v.62165!

    There is an error in the knockout bindings for created events, it prevents them from being visible.
    I am super lazy now and wont make this a pamm mod, it would be a shadow anyway.

    Download and unpack in \PA\media\ui\alpha\live_game
    overwrite the existing live_game zip

    @Uber:
    The issue here is that the binding for the alerts looks like this (it is twice in the file!, both are the same)

    Code:
                                          css: {
                                                div_unit_alert_commander: $data.watch_type === 1,
                                                div_animated_flash_red: $data.watch_type === 1,
                                                div_unit_alert_ready: $data.watch_type === 0,
                                                div_animated_flash_green: $data.watch_type === 0,
                                                div_unit_alert_death: $data.watch_type === 2,
                                                div_animated_flash_black: $data.watch_type === 2,
                                                div_unit_alert_ready: $data.watch_type === 3,
                                                div_animated_flash_green: $data.watch_type === 3,
                                          }">
    This does not work. For some reason it ignores the binding to === 0
    My fix does this instead:
    Code:
                                          css: {
                                                div_unit_alert_commander: $data.watch_type === 1,
                                                div_animated_flash_red: $data.watch_type === 1,
                                                div_unit_alert_ready: $data.watch_type === 0 || $data.watch_type === 3,
                                                div_animated_flash_green: $data.watch_type === 0 || $data.watch_type === 3,
                                                div_unit_alert_death: $data.watch_type === 2,
                                                div_animated_flash_black: $data.watch_type === 2,
                                          }">
    so only one line for that class with ||

    Attached Files:

    Last edited: March 2, 2014
  2. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    It ignores it because it's then completely overwritten a few lines later.

    Lets say $data.watch_type = 0.

    This becomes (taking out the other lines for now):

    div_unit_alert_ready: true,
    div_unit_alert_ready: false


    which naturally just takes the last value. This is definitely a bug.
  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Yeah I guessed that might be the case.
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Still is an issue in PA v.62165, I updated the OP with the most recent file.

Share This Page