|
776 | 776 | if(!hud || !show_static) |
777 | 777 | maptext = null |
778 | 778 | return |
| 779 | + |
| 780 | + var/round_started = SSticker.HasRoundStarted() |
779 | 781 | if(!MC_RUNNING()) |
780 | | - maptext = MAPTEXT("<span style='text-align: center; vertical-align: middle'>Loading...</span>") |
| 782 | + maptext = MAPTEXT("<span style='text-align: center; vertical-align: middle'>[(round_started ? null : "[time_remaining_str()]<br />")]Loading...</span>") |
781 | 783 | return |
782 | 784 | if(SSticker.IsPostgame()) |
783 | 785 | maptext = MAPTEXT("<span style='text-align: center; vertical-align: middle'>Game ended, <br /> \ |
784 | 786 | restart soon</span>") |
785 | 787 | return |
786 | 788 |
|
787 | 789 | var/new_maptext |
788 | | - var/round_started = SSticker.HasRoundStarted() |
789 | 790 | if(round_started) |
790 | 791 | new_maptext = "<span style='text-align: center; vertical-align: middle'>[SSmapping.current_map.map_name]<br /> \ |
791 | 792 | [LAZYLEN(GLOB.clients)] player\s online<br /> \ |
792 | 793 | [ROUND_TIME()] in<br />" |
793 | 794 | new_maptext += "</span>" |
794 | 795 | else |
795 | | - var/time_remaining = SSticker.GetTimeLeft() |
796 | | - if(time_remaining > 0) |
797 | | - time_remaining = "[round(time_remaining/10)]s" |
798 | | - else if(time_remaining == -10) |
799 | | - time_remaining = "DELAYED" |
800 | | - else |
801 | | - time_remaining = "SOON" |
802 | 796 |
|
803 | 797 | if(hud.mymob.client?.holder) |
804 | | - new_maptext = "<span style='text-align: center; vertical-align: middle'>Starting in [time_remaining]<br /> \ |
| 798 | + new_maptext = "<span style='text-align: center; vertical-align: middle'>[time_remaining_str()]<br /> \ |
805 | 799 | [LAZYLEN(GLOB.clients)] player\s<br /> \ |
806 | 800 | [SSticker.totalPlayersReady] players ready<br /> \ |
807 | 801 | [SSticker.total_admins_ready] / [length(GLOB.admins)] admins ready</span>" |
808 | 802 | else |
809 | | - new_maptext = "<span style='text-align: center; vertical-align: middle; font-size: 18px'>[time_remaining]</span><br /> \ |
| 803 | + new_maptext = "<span style='text-align: center; vertical-align: middle; font-size: 18px'>[time_remaining_str()]</span><br /> \ |
810 | 804 | <span style='text-align: center; vertical-align: middle'>[LAZYLEN(GLOB.clients)] player\s</span>" |
811 | 805 |
|
812 | 806 | maptext = MAPTEXT(new_maptext) |
813 | 807 |
|
| 808 | +/atom/movable/screen/lobby/new_player_info/proc/time_remaining_str() |
| 809 | + var/time_remaining = SSticker.GetTimeLeft() |
| 810 | + if(time_remaining > 0) |
| 811 | + time_remaining = "[round(time_remaining/10)]s" |
| 812 | + else if(time_remaining == -10) |
| 813 | + time_remaining = "DELAYED" |
| 814 | + else |
| 815 | + time_remaining = "SOON" |
| 816 | + |
| 817 | + return "Starting in [time_remaining]" |
| 818 | + |
814 | 819 | #undef OVERLAY_X_DIFF |
815 | 820 | #undef OVERLAY_Y_DIFF |
816 | 821 |
|
|
0 commit comments