mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-12 16:38:18 +01:00
Merge pull request #409 from ArchieBeepBoop/status_tab_patch
Round Time fix (Finally!) And more status tab optimizations
This commit is contained in:
@@ -59,26 +59,38 @@
|
||||
//...and display them.
|
||||
add_to_all_human_data_huds()
|
||||
|
||||
/var/tickrefreshThr2 = 20
|
||||
/var/tickrefresh2 = 0
|
||||
/var/list/sList2
|
||||
|
||||
/mob/living/carbon/human/Stat()
|
||||
..()
|
||||
|
||||
if(statpanel("Status"))
|
||||
stat(null, "Intent: [a_intent]")
|
||||
stat(null, "Move Mode: [m_intent]")
|
||||
if(statpanel("Status") && tickrefresh2 == 0)
|
||||
sList2 = list()
|
||||
sList2 += "Intent: [a_intent]"
|
||||
sList2 += "Move Mode: [m_intent]"
|
||||
if (internal)
|
||||
if (!internal.air_contents)
|
||||
qdel(internal)
|
||||
else
|
||||
stat("Internal Atmosphere Info", internal.name)
|
||||
stat("Tank Pressure", internal.air_contents.return_pressure())
|
||||
stat("Distribution Pressure", internal.distribute_pressure)
|
||||
|
||||
sList2 += "Internal Atmosphere Info: "+ "[internal.name]"
|
||||
sList2 += "Tank Pressure: "+ "[internal.air_contents.return_pressure()]"
|
||||
sList2 += "Distribution Pressure: "+ "[internal.distribute_pressure]"
|
||||
if(mind)
|
||||
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(changeling)
|
||||
stat("Chemical Storage", "[changeling.chem_charges]/[changeling.chem_storage]")
|
||||
stat("Absorbed DNA", changeling.absorbedcount)
|
||||
sList2 += "Chemical Storage: " + "[changeling.chem_charges]/[changeling.chem_storage]"
|
||||
sList2 += "Absorbed DNA: "+ "[changeling.absorbedcount]"
|
||||
tickrefresh2++
|
||||
stat(null, "[sList2.Join("\n\n")]")
|
||||
|
||||
else if(statpanel("Status") && tickrefresh2 != 0)
|
||||
if(tickrefresh2 >= tickrefreshThr2)
|
||||
tickrefresh2 = 0
|
||||
else
|
||||
tickrefresh2++
|
||||
stat(null, "[sList2.Join("\n\n")]")
|
||||
|
||||
//NINJACODE
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)) //Only display if actually a ninja.
|
||||
|
||||
+14
-19
@@ -1,4 +1,4 @@
|
||||
/var/tickrefresh = 0
|
||||
|
||||
|
||||
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
|
||||
GLOB.mob_list -= src
|
||||
@@ -530,7 +530,9 @@
|
||||
|
||||
/mob/proc/is_muzzled()
|
||||
return 0
|
||||
|
||||
|
||||
/var/tickrefreshThr = 20
|
||||
/var/tickrefresh = 0
|
||||
/var/list/sList
|
||||
/mob/Stat()
|
||||
..()
|
||||
@@ -538,29 +540,22 @@
|
||||
if(statpanel("Status") && tickrefresh == 0)
|
||||
sList = list()
|
||||
if (client)
|
||||
sList+= "Ping: [round(client.lastping, 1)]ms (Average: [round(client.avgping, 1)]ms)"
|
||||
sList+= "Map: [SSmapping.config?.map_name || "Loading..."]"
|
||||
var/datum/map_config/cached = SSmapping.next_map_config
|
||||
if(cached)
|
||||
sList+= "Next Map: [cached.map_name]"
|
||||
sList+= "Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]"
|
||||
sList+= "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]"
|
||||
sList+= "Round Time: [WORLDTIME2TEXT("hh:mm:ss")]"
|
||||
sList+= "Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss")]"
|
||||
//sList+= "Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)"
|
||||
if(SSshuttle.emergency)
|
||||
var/ETA = SSshuttle.emergency.getModeStr()
|
||||
if(ETA)
|
||||
sList+= "[ETA] [SSshuttle.emergency.getTimerStr()]"
|
||||
sList += "Ping: [round(client.lastping, 1)]ms (Average: [round(client.avgping, 1)]ms)"
|
||||
sList += "Map: [SSmapping.config?.map_name || "Loading..."]"
|
||||
sList += "Round ID: [GLOB.round_id || "NULL"]"
|
||||
sList += "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]"
|
||||
sList += "Round Time: [DisplayTimeText(world.time - SSticker.round_start_time, 1)]"
|
||||
sList += "Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss")]"
|
||||
sList += SSshuttle.emergency_shuttle_stat_text
|
||||
tickrefresh++
|
||||
stat(null, sList)
|
||||
stat(null, "[sList.Join("\n\n")]")
|
||||
|
||||
else if(statpanel("Status") && tickrefresh != 0)
|
||||
if(tickrefresh == 10)
|
||||
if(tickrefresh >= tickrefreshThr)
|
||||
tickrefresh = 0
|
||||
else
|
||||
tickrefresh++
|
||||
stat(null, sList)
|
||||
stat(null, "[sList.Join("\n\n")]")
|
||||
|
||||
if(client && client.holder)
|
||||
if(statpanel("MC"))
|
||||
|
||||
Reference in New Issue
Block a user