Skip to content

Commit

Permalink
more track script cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jnackmclain committed Nov 3, 2024
1 parent 3db6ee1 commit 0046e2c
Show file tree
Hide file tree
Showing 12 changed files with 800 additions and 790 deletions.
14 changes: 4 additions & 10 deletions _ark/dx/overshell/dx_advanced_states.dta
Original file line number Diff line number Diff line change
Expand Up @@ -1334,13 +1334,7 @@
{set $crowd_meterpos_0 $dx_set_ui_pos_0}
{set $crowd_meterpos_1 $dx_set_ui_pos_1}
{set $crowd_meterpos_2 $dx_set_ui_pos_2}
{if
{&&
{|| {gamemode in_mode practice} {gamemode in_mode qp_practice}}
{exists beatmatch}
}
{coop_track_panel dx_set_crowd_meter_pos}
}
;this doesnt do anything
)
(scoreboard
{set $scoreboardpos_0 $dx_set_ui_pos_0}
Expand All @@ -1352,7 +1346,7 @@
{! {gamemode in_mode trainer}}
{exists beatmatch}
}
{coop_track_panel dx_set_scoreboard_pos}
{dx_set_scoreboard_pos}
}
)
(star_display
Expand All @@ -1365,7 +1359,7 @@
{! {gamemode in_mode trainer}}
{exists beatmatch}
}
{coop_track_panel dx_set_star_display_pos}
{dx_set_star_display_pos}
}
)
(solo_box
Expand All @@ -1378,7 +1372,7 @@
{! {gamemode in_mode trainer}}
{exists beatmatch}
}
{coop_track_panel dx_set_solo_box_pos}
{dx_set_solo_box_pos}
}
)
(highway_overdrive_text
Expand Down
64 changes: 1 addition & 63 deletions _ark/dx/track/beatmatch/dx_beatmatch_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -47,69 +47,7 @@
; }
;}
}
{func
dx_set_song_progress
{beatmatch foreach_active_player $player
{unless {== {$player instrument} vocals}
{if $dx_mtvup
{set_this {find_obj DX_GEMTRACKDIR band_power_meter}}
{set $curr_ms {beatmatch get_song_ms}}
{set $total_ms {{song_mgr get_meta_data {meta_performer song}} length_ms}}
{set $percent_complete {/ $curr_ms $total_ms}}
{tour_meter_wipe.anim set_frame $percent_complete}
}
}
}
}
{func
dx_fix_track_instrument_icon_pos
{set $active_insts 0}
{beatmatch foreach_active_player $player ;count total players first
{unless {== {$player instrument} vocals}
{set $active_insts {+ $active_insts 1}}
}
}
{beatmatch foreach_active_player $player
{unless {== {$player instrument} vocals}
{if $dx_mtvup
{set_this {find_obj DX_GEMTRACKDIR band_power_meter}}
{set $overdrive_inst_label {sprint "dx_track_label_instrument" {{$player get_user} get_slot_num} ".lbl"}}
{set $overdrive_streak_label {sprint "dx_track_label_streak" {{$player get_user} get_slot_num} ".lbl"}}
{$overdrive_inst_label set_token_fmt
{switch {$player instrument}
((guitar real_guitar) inst_icon_guitar)
((bass real_bass) inst_icon_bass)
((drum real_drum) inst_icon_drum)
((keys real_keys) inst_icon_keys)
}
}
{switch $active_insts
(1
{$overdrive_inst_label set_local_pos 10.21 -8.3 -0.18}
{$overdrive_streak_label set_local_pos 10.4 -9 -2.32}
{$overdrive_inst_label set alt_text_size 2.95}
)
(2
{$overdrive_inst_label set_local_pos 10.21 -8.3 -0.18}
{$overdrive_streak_label set_local_pos 10.4 -9 -2.32}
{$overdrive_inst_label set alt_text_size 2.95}
)
(3
{$overdrive_inst_label set_local_pos 10.27 -8.3 -0.36}
{$overdrive_streak_label set_local_pos 10.5 -9 -2.32}
{$overdrive_inst_label set alt_text_size 2.95}
)
(4
{$overdrive_inst_label set_local_pos 10.25 -9 -0.12}
{$overdrive_streak_label set_local_pos 10.5 -9 -2.32}
{$overdrive_inst_label set alt_text_size 3}
)
kDataUnhandled
}
}
}
}
}

{func
dx_mtv_time_remaining_handler ;using length_ms from song_mgr and dx_ms_to_time_str func
;{dx_log_writer beatmatch {sprint "func: dx_mtv_time_remaining_handler"}}
Expand Down
15 changes: 14 additions & 1 deletion _ark/dx/track/brutal/dx_brutal_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@
{dx_brutal_mode_rb4 $enabled}
}
}

{dx_brutal_mode_init
($enabled)
;not only inits brutal mode, but restores bottom_y for track when disabled
{beatmatch foreach_active_player $player
{if {!= {$player instrument} vocals}
{set_this {find_obj DX_GEMTRACKDIR player_feedback}}
{$this set_showing TRUE}
{if_else $enabled
{dx_brutal_mode $enabled} ;call it now to reset the values, even if bottom_y doesn't stick, the beat handler will set it once the first time it runs
{{find_obj DX_GEMTRACKDIR} set bottom_y -26}
}
}
}
}
{func dx_cook_crowd ;cook crowd rating for other funcs
($crowd_rating)
{* 1.25 {- $crowd_rating 0.2}} ;makes it 0.0-1.0
Expand Down
Loading

0 comments on commit 0046e2c

Please sign in to comment.