[MIRROR] Browser Status Panel (#548)

* Browser Status Panel (#53112)

* Browser Status Panel

Co-authored-by: Couls <coul422@gmail.com>
This commit is contained in:
SkyratBot
2020-08-29 20:26:27 +01:00
committed by GitHub
co-authored by Couls
parent bc62cc98f3
commit 1c1ce7b055
79 changed files with 1584 additions and 475 deletions
+11 -13
View File
@@ -18,7 +18,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
prepare_huds()
if(length(CONFIG_GET(keyed_list/cross_server)))
verbs += /mob/dead/proc/server_hop
add_verb(src, /mob/dead/proc/server_hop)
set_focus(src)
return INITIALIZE_HINT_NORMAL
@@ -43,27 +43,25 @@ INITIALIZE_IMMEDIATE(/mob/dead)
loc = destination
Moved(oldloc, NONE, TRUE)
/mob/dead/Stat()
..()
if(!statpanel("Status"))
return
stat(null, "Game Mode: [SSticker.hide_mode ? "Secret" : "[GLOB.master_mode]"]")
/mob/dead/get_status_tab_items()
. = ..()
. += ""
. += "Game Mode: [SSticker.hide_mode ? "Secret" : "[GLOB.master_mode]"]"
if(SSticker.HasRoundStarted())
return
var/time_remaining = SSticker.GetTimeLeft()
if(time_remaining > 0)
stat(null, "Time To Start: [round(time_remaining/10)]s")
. += "Time To Start: [round(time_remaining/10)]s"
else if(time_remaining == -10)
stat(null, "Time To Start: DELAYED")
. += "Time To Start: DELAYED"
else
stat(null, "Time To Start: SOON")
. += "Time To Start: SOON"
stat(null, "Players: [SSticker.totalPlayers]")
. += "Players: [SSticker.totalPlayers]"
if(client.holder)
stat(null, "Players Ready: [SSticker.totalPlayersReady]")
. += "Players Ready: [SSticker.totalPlayersReady]"
/mob/dead/proc/server_hop()
set category = "OOC"
@@ -76,7 +74,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
var/pick
switch(csa.len)
if(0)
verbs -= /mob/dead/proc/server_hop
remove_verb(src, /mob/dead/proc/server_hop)
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
if(1)
pick = csa[1]
@@ -233,6 +233,7 @@
if(observer.client && observer.client.prefs)
observer.real_name = observer.client.prefs.real_name
observer.name = observer.real_name
observer.client.init_verbs()
observer.update_icon()
observer.stop_sound_channel(CHANNEL_LOBBYMUSIC)
QDEL_NULL(mind)
@@ -324,7 +325,7 @@
character.update_parallax_teleport()
SSticker.minds += character.mind
character.client.init_verbs() // init verbs for the late join
var/mob/living/carbon/human/humanc
if(ishuman(character))
humanc = character //Let's retypecast the var to be human,
@@ -455,7 +456,7 @@
mind.original_character = H
H.name = real_name
client.init_verbs()
. = H
new_character = .
if(transfer_after)
+10 -8
View File
@@ -65,10 +65,10 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
/mob/dead/observer/Initialize()
set_invisibility(GLOB.observer_default_invisibility)
verbs += list(
add_verb(src, list(
/mob/dead/observer/proc/dead_tele,
/mob/dead/observer/proc/open_spawners_menu,
/mob/dead/observer/proc/tray_view)
/mob/dead/observer/proc/tray_view))
if(icon_state in GLOB.ghost_forms_with_directions_list)
ghostimage_default = image(src.icon,src,src.icon_state + "_nodir")
@@ -129,8 +129,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
real_name = name
if(!fun_verbs)
verbs -= /mob/dead/observer/verb/boo
verbs -= /mob/dead/observer/verb/possess
remove_verb(src, /mob/dead/observer/verb/boo)
remove_verb(src, /mob/dead/observer/verb/possess)
animate(src, pixel_y = 2, time = 10, loop = -1)
@@ -280,6 +280,7 @@ Works together with spawning an observer, noted above.
SStgui.on_transfer(src, ghost) // Transfer NanoUIs.
ghost.can_reenter_corpse = can_reenter_corpse
ghost.key = key
ghost.client.init_verbs()
if(!can_reenter_corpse) // Disassociates observer mind from the body mind
ghost.mind = null
return ghost
@@ -357,6 +358,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
client.view_size.setDefault(getScreenSize(client.prefs.widescreenpref))//Let's reset so people can't become allseeing gods
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
mind.current.key = key
mind.current.client.init_verbs()
return TRUE
/mob/dead/observer/verb/stay_dead()
@@ -815,11 +817,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
ghostimage_simple.icon_state = icon_state
if(NAMEOF(src, fun_verbs))
if(fun_verbs)
verbs += /mob/dead/observer/verb/boo
verbs += /mob/dead/observer/verb/possess
add_verb(src, /mob/dead/observer/verb/boo)
add_verb(src, /mob/dead/observer/verb/possess)
else
verbs -= /mob/dead/observer/verb/boo
verbs -= /mob/dead/observer/verb/possess
remove_verb(src, /mob/dead/observer/verb/boo)
remove_verb(src, /mob/dead/observer/verb/possess)
/mob/dead/observer/reset_perspective(atom/A)
if(client)
@@ -26,8 +26,8 @@
var/static/regex/alien_name_regex = new("alien (larva|sentinel|drone|hunter|praetorian|queen)( \\(\\d+\\))?")
/mob/living/carbon/alien/Initialize()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
add_verb(src, /mob/living/proc/mob_sleep)
add_verb(src, /mob/living/proc/lay_down)
create_bodyparts() //initialize bodyparts
@@ -74,11 +74,9 @@
/mob/living/carbon/alien/IsAdvancedToolUser()
return has_fine_manipulation
/mob/living/carbon/alien/Stat()
..()
if(statpanel("Status"))
stat(null, "Intent: [a_intent]")
/mob/living/carbon/alien/get_status_tab_items()
. = ..()
. += "Intent: [a_intent]"
/mob/living/carbon/alien/getTrail()
if(getBruteLoss() < 200)
@@ -149,10 +149,10 @@ Doesn't work on other aliens/AI.*/
action_icon_state = "alien_acid"
/obj/effect/proc_holder/alien/acid/on_gain(mob/living/carbon/user)
user.verbs.Add(/mob/living/carbon/proc/corrosive_acid)
add_verb(user, /mob/living/carbon/proc/corrosive_acid)
/obj/effect/proc_holder/alien/acid/on_lose(mob/living/carbon/user)
user.verbs.Remove(/mob/living/carbon/proc/corrosive_acid)
remove_verb(user, /mob/living/carbon/proc/corrosive_acid)
/obj/effect/proc_holder/alien/acid/proc/corrode(atom/target,mob/living/carbon/user = usr)
if(target in oview(1,user))
@@ -40,10 +40,9 @@
..()
//This needs to be fixed
/mob/living/carbon/alien/larva/Stat()
..()
if(statpanel("Status"))
stat(null, "Progress: [amount_grown]/[max_grown]")
/mob/living/carbon/alien/larva/get_status_tab_items()
. = ..()
. += "Progress: [amount_grown]/[max_grown]"
/mob/living/carbon/alien/larva/Login()
. = ..()
+10 -9
View File
@@ -441,16 +441,17 @@
var/turf/target = get_turf(loc)
I.safe_throw_at(target,I.throw_range,I.throw_speed,src, force = move_force)
/mob/living/carbon/Stat()
..()
if(statpanel("Status"))
var/obj/item/organ/alien/plasmavessel/vessel = getorgan(/obj/item/organ/alien/plasmavessel)
if(vessel)
stat(null, "Plasma Stored: [vessel.storedPlasma]/[vessel.max_plasma]")
if(locate(/obj/item/assembly/health) in src)
stat(null, "Health: [health]")
/mob/living/carbon/get_status_tab_items()
. = ..()
var/obj/item/organ/alien/plasmavessel/vessel = getorgan(/obj/item/organ/alien/plasmavessel)
if(vessel)
. += "Plasma Stored: [vessel.storedPlasma]/[vessel.max_plasma]"
if(locate(/obj/item/assembly/health) in src)
. += "Health: [health]"
add_abilities_to_panel()
/mob/living/carbon/get_proc_holders()
. = ..()
. += add_abilities_to_panel()
/mob/living/carbon/attack_ui(slot)
if(!has_hand_for_held_index(active_hand_index))
+47 -50
View File
@@ -1,6 +1,6 @@
/mob/living/carbon/human/Initialize()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
add_verb(src, /mob/living/proc/mob_sleep)
add_verb(src, /mob/living/proc/lay_down)
icon_state = "" //Remove the inherent human icon that is visible on the map editor. We're rendering ourselves limb by limb, having it still be there results in a bug where the basic human icon appears below as south in all directions and generally looks nasty.
@@ -53,58 +53,55 @@
//...and display them.
add_to_all_human_data_huds()
/mob/living/carbon/human/Stat()
..()
if(statpanel("Status"))
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if (internal)
if (!internal.air_contents)
qdel(internal)
else
stat(null, "Internal Atmosphere Info: [internal.name]")
stat(null, "Tank Pressure: [internal.air_contents.return_pressure()]")
stat(null, "Distribution Pressure: [internal.distribute_pressure]")
if(istype(wear_suit, /obj/item/clothing/suit/space))
var/obj/item/clothing/suit/space/S = wear_suit
stat(null, "Thermal Regulator: [S.thermal_on ? "on" : "off"]")
stat(null, "Cell Charge: [S.cell ? "[round(S.cell.percent(), 0.1)]%" : "!invalid!"]")
if(mind)
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
stat(null, "Chemical Storage: [changeling.chem_charges]/[changeling.chem_storage]")
stat(null, "Absorbed DNA: [changeling.absorbedcount]")
/mob/living/carbon/human/get_status_tab_items()
. = ..()
. += "Intent: [a_intent]"
. += "Move Mode: [m_intent]"
if (internal)
if (!internal.air_contents)
qdel(internal)
else
. += ""
. += "Internal Atmosphere Info: [internal.name]"
. += "Tank Pressure: [internal.air_contents.return_pressure()]"
. += "Distribution Pressure: [internal.distribute_pressure]"
if(istype(wear_suit, /obj/item/clothing/suit/space))
var/obj/item/clothing/suit/space/S = wear_suit
. += "Thermal Regulator: [S.thermal_on ? "on" : "off"]"
. += "Cell Charge: [S.cell ? "[round(S.cell.percent(), 0.1)]%" : "!invalid!"]"
if(mind)
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
. += ""
. += "Chemical Storage: [changeling.chem_charges]/[changeling.chem_storage]"
. += "Absorbed DNA: [changeling.absorbedcount]"
//NINJACODE
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)) //Only display if actually a ninja.
var/obj/item/clothing/suit/space/space_ninja/SN = wear_suit
if(statpanel("SpiderOS"))
stat("SpiderOS Status:","[SN.s_initialized ? "Initialized" : "Disabled"]")
stat("Current Time:", "[station_time_timestamp()]")
if(SN.s_initialized)
//Suit gear
stat("Energy Charge:", "[round(SN.cell.charge/100)]%")
stat("Smoke Bombs:", "\Roman [SN.s_bombs]")
//Ninja status
stat("Fingerprints:", "[md5(dna.uni_identity)]")
stat("Unique Identity:", "[dna.unique_enzymes]")
stat("Overall Status:", "[stat > 1 ? "dead" : "[health]% healthy"]")
stat("Nutrition Status:", "[nutrition]")
stat("Oxygen Loss:", "[getOxyLoss()]")
stat("Toxin Levels:", "[getToxLoss()]")
stat("Burn Severity:", "[getFireLoss()]")
stat("Brute Trauma:", "[getBruteLoss()]")
stat("Radiation Levels:","[radiation] rad")
stat("Body Temperature:","[bodytemperature-T0C] degrees C ([bodytemperature*1.8-459.67] degrees F)")
. += "SpiderOS Status: [SN.s_initialized ? "Initialized" : "Disabled"]"
. += "Current Time: [station_time_timestamp()]"
if(SN.s_initialized)
//Suit gear
. += "Energy Charge: [round(SN.cell.charge/100)]%"
. += "Smoke Bombs: \Roman [SN.s_bombs]"
//Ninja status
. += "Fingerprints: [md5(dna.uni_identity)]"
. += "Unique Identity: [dna.unique_enzymes]"
. += "Overall Status: [stat > 1 ? "dead" : "[health]% healthy"]"
. += "Nutrition Status: [nutrition]"
. += "Oxygen Loss: [getOxyLoss()]"
. += "Toxin Levels: [getToxLoss()]"
. += "Burn Severity: [getFireLoss()]"
. += "Brute Trauma: [getBruteLoss()]"
. += "Radiation Levels: [radiation] rad"
. += "Body Temperature: [bodytemperature-T0C] degrees C ([bodytemperature*1.8-459.67] degrees F)"
//Diseases
if(diseases.len)
stat("Viruses:", null)
for(var/thing in diseases)
var/datum/disease/D = thing
stat("*", "[D.name], Type: [D.spread_text], Stage: [D.stage]/[D.max_stages], Possible Cure: [D.cure_text]")
//Diseases
if(length(diseases))
. += "Viruses:"
for(var/thing in diseases)
var/datum/disease/D = thing
. += "* [D.name], Type: [D.spread_text], Stage: [D.stage]/[D.max_stages], Possible Cure: [D.cure_text]"
/mob/living/carbon/human/show_inv(mob/user)
@@ -121,13 +121,11 @@
#undef VAMP_DRAIN_AMOUNT
/mob/living/carbon/Stat()
..()
if(statpanel("Status"))
var/obj/item/organ/heart/vampire/darkheart = getorgan(/obj/item/organ/heart/vampire)
if(darkheart)
stat(null, "<span class='notice'>Current blood level: [blood_volume]/[BLOOD_VOLUME_MAXIMUM].</span>")
return 1
/mob/living/carbon/get_status_tab_items()
. = ..()
var/obj/item/organ/heart/vampire/darkheart = getorgan(/obj/item/organ/heart/vampire)
if(darkheart)
. += "<span class='notice'>Current blood level: [blood_volume]/[BLOOD_VOLUME_MAXIMUM].</span>"
/obj/item/organ/heart/vampire
+12 -12
View File
@@ -25,8 +25,8 @@
hud_type = /datum/hud/monkey
/mob/living/carbon/monkey/Initialize(mapload, cubespawned=FALSE, mob/spawner)
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
add_verb(src, /mob/living/proc/mob_sleep)
add_verb(src, /mob/living/proc/lay_down)
if(unique_name) //used to exclude pun pun
gender = pick(MALE, FEMALE)
@@ -93,16 +93,16 @@
slow += ((283.222 - bodytemperature) / 10) * 1.75
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/monkey_temperature_speedmod, TRUE, slow)
/mob/living/carbon/monkey/Stat()
..()
if(statpanel("Status"))
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if(client && 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)
/mob/living/carbon/monkey/get_status_tab_items()
. = ..()
. += "Intent: [a_intent]"
. += "Move Mode: [m_intent]"
if(client && mind)
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
. += ""
. += "Chemical Storage: [changeling.chem_charges]/[changeling.chem_storage]"
. += "Absorbed DNA: [changeling.absorbedcount]"
/mob/living/carbon/monkey/verb/removeinternal()
set name = "Remove Internals"
+3 -1
View File
@@ -1274,8 +1274,10 @@
A.action.Remove(src)
/mob/living/proc/add_abilities_to_panel()
var/list/L = list()
for(var/obj/effect/proc_holder/A in abilities)
statpanel("[A.panel]",A.get_panel_text(),A)
L[++L.len] = list("[A.panel]",A.get_panel_text(),A.name,"[REF(A)]")
return L
/mob/living/lingcheck()
if(mind)
+25 -25
View File
@@ -145,7 +145,7 @@
spark_system.set_up(5, 0, src)
spark_system.attach(src)
verbs += /mob/living/silicon/ai/proc/show_laws_verb
add_verb(src, /mob/living/silicon/ai/proc/show_laws_verb)
aiPDA = new/obj/item/pda/ai(src)
aiPDA.owner = real_name
@@ -158,10 +158,10 @@
deploy_action.Grant(src)
if(isturf(loc))
verbs.Add(/mob/living/silicon/ai/proc/ai_network_change, \
add_verb(src, list(/mob/living/silicon/ai/proc/ai_network_change, \
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
/mob/living/silicon/ai/proc/botcall, /mob/living/silicon/ai/proc/control_integrated_radio, \
/mob/living/silicon/ai/proc/set_automatic_say_channel)
/mob/living/silicon/ai/proc/set_automatic_say_channel))
GLOB.ai_list += src
GLOB.shuttle_caller_list += src
@@ -240,28 +240,28 @@
display_icon_override = ai_core_icon
set_core_display_icon(ai_core_icon)
/mob/living/silicon/ai/Stat()
..()
if(statpanel("Status"))
if(!stat)
stat(null, text("System integrity: [(health+100)/2]%"))
if(isturf(loc)) //only show if we're "in" a core
stat(null, text("Backup Power: [battery/2]%"))
stat(null, text("Connected cyborgs: [connected_robots.len]"))
for(var/mob/living/silicon/robot/R in connected_robots)
var/robot_status = "Nominal"
if(R.shell)
robot_status = "AI SHELL"
else if(R.stat || !R.client)
robot_status = "OFFLINE"
else if(!R.cell || R.cell.charge <= 0)
robot_status = "DEPOWERED"
//Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies!
stat(null, text("[R.name] | S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "Empty"] | \
Module: [R.designation] | Loc: [get_area_name(R, TRUE)] | Status: [robot_status]"))
stat(null, text("AI shell beacons detected: [LAZYLEN(GLOB.available_ai_shells)]")) //Count of total AI shells
else
stat(null, text("Systems nonfunctional"))
/mob/living/silicon/ai/get_status_tab_items()
. = ..()
if(stat != CONSCIOUS)
. += text("Systems nonfunctional")
return
. += text("System integrity: [(health + 100) * 0.5]%")
if(isturf(loc)) //only show if we're "in" a core
. += text("Backup Power: [battery * 0.5]%")
. += text("Connected cyborgs: [length(connected_robots)]")
for(var/r in connected_robots)
var/mob/living/silicon/robot/connected_robot = r
var/robot_status = "Nominal"
if(connected_robot.shell)
robot_status = "AI SHELL"
else if(connected_robot.stat != CONSCIOUS || !connected_robot.client)
robot_status = "OFFLINE"
else if(!connected_robot.cell || connected_robot.cell.charge <= 0)
robot_status = "DEPOWERED"
//Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies!
. += text("[connected_robot.name] | S.Integrity: [connected_robot.health]% | Cell: [connected_robot.cell ? "[connected_robot.cell.charge]/[connected_robot.cell.maxcharge]" : "Empty"] | \
Module: [connected_robot.designation] | Loc: [get_area_name(connected_robot, TRUE)] | Status: [robot_status]")
. += text("AI shell beacons detected: [LAZYLEN(GLOB.available_ai_shells)]") //Count of total AI shells
/mob/living/silicon/ai/proc/ai_alerts()
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
+6 -7
View File
@@ -193,13 +193,12 @@
else
client.eye = card
/mob/living/silicon/pai/Stat()
..()
if(statpanel("Status"))
if(!stat)
stat(null, text("Emitter Integrity: [emitterhealth * (100/emittermaxhealth)]"))
else
stat(null, text("Systems nonfunctional"))
/mob/living/silicon/pai/get_status_tab_items()
. += ..()
if(!stat)
. += text("Emitter Integrity: [emitterhealth * (100/emittermaxhealth)]")
else
. += text("Systems nonfunctional")
/mob/living/silicon/pai/restrained(ignore_grab)
. = FALSE
+12 -12
View File
@@ -309,19 +309,19 @@
if(thruster_button)
thruster_button.icon_state = "ionpulse[ionpulse_on]"
/mob/living/silicon/robot/Stat()
..()
if(statpanel("Status"))
if(cell)
stat("Charge Left:", "[cell.charge]/[cell.maxcharge]")
else
stat(null, text("No Cell Inserted!"))
/mob/living/silicon/robot/get_status_tab_items()
. = ..()
. += ""
if(cell)
. += "Charge Left: [cell.charge]/[cell.maxcharge]"
else
. += text("No Cell Inserted!")
if(module)
for(var/datum/robot_energy_storage/st in module.storages)
stat("[st.name]:", "[st.energy]/[st.max_energy]")
if(connected_ai)
stat("Master AI:", connected_ai.name)
if(module)
for(var/datum/robot_energy_storage/st in module.storages)
. += "[st.name]: [st.energy]/[st.max_energy]"
if(connected_ai)
. += "Master AI: [connected_ai.name]"
/mob/living/silicon/robot/restrained(ignore_grab)
. = 0
@@ -503,15 +503,15 @@
update_icon()
/mob/living/simple_animal/bot/mulebot/Stat()
..()
if(statpanel("Status"))
if(cell)
stat("Charge Left:", "[cell.charge]/[cell.maxcharge]")
else
stat(null, text("No Cell Inserted!"))
if(load)
stat("Current Load:", get_load_name())
/mob/living/simple_animal/bot/mulebot/get_status_tab_items()
. = ..()
if(cell)
. += "Charge Left: [cell.charge]/[cell.maxcharge]"
else
. += text("No Cell Inserted!")
if(load)
. += "Current Load: [get_load_name()]"
/mob/living/simple_animal/bot/mulebot/call_bot()
..()
@@ -45,7 +45,7 @@
/mob/living/simple_animal/pet/cat/Initialize()
. = ..()
verbs += /mob/living/proc/lay_down
add_verb(src, /mob/living/proc/lay_down)
add_cell_sample()
/mob/living/simple_animal/pet/cat/add_cell_sample()
@@ -193,18 +193,17 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
qdel(src)
snapback()
/mob/living/simple_animal/hostile/guardian/Stat()
..()
if(statpanel("Status"))
if(summoner)
var/resulthealth
if(iscarbon(summoner))
resulthealth = round((abs(HEALTH_THRESHOLD_DEAD - summoner.health) / abs(HEALTH_THRESHOLD_DEAD - summoner.maxHealth)) * 100)
else
resulthealth = round((summoner.health / summoner.maxHealth) * 100, 0.5)
stat(null, "Summoner Health: [resulthealth]%")
if(cooldown >= world.time)
stat(null, "Manifest/Recall Cooldown Remaining: [DisplayTimeText(cooldown - world.time)]")
/mob/living/simple_animal/hostile/guardian/get_status_tab_items()
. += ..()
if(summoner)
var/resulthealth
if(iscarbon(summoner))
resulthealth = round((abs(HEALTH_THRESHOLD_DEAD - summoner.health) / abs(HEALTH_THRESHOLD_DEAD - summoner.maxHealth)) * 100)
else
resulthealth = round((summoner.health / summoner.maxHealth) * 100, 0.5)
. += "Summoner Health: [resulthealth]%"
if(cooldown >= world.time)
. += "Manifest/Recall Cooldown Remaining: [DisplayTimeText(cooldown - world.time)]"
/mob/living/simple_animal/hostile/guardian/Move() //Returns to summoner if they move out of range
. = ..()
@@ -481,13 +480,13 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
to_chat(src, "<span class='holoparasite'><font color=\"[G.guardiancolor]\"><b>[G.real_name]</b></font> has appeared!</span>")
guardians -= G
if(!guardians.len)
verbs -= /mob/living/proc/guardian_reset
remove_verb(src, /mob/living/proc/guardian_reset)
else
to_chat(src, "<span class='holoparasite'>There were no ghosts willing to take control of <font color=\"[G.guardiancolor]\"><b>[G.real_name]</b></font>. Looks like you're stuck with it for now.</span>")
else
to_chat(src, "<span class='holoparasite'>You decide not to reset [guardians.len > 1 ? "any of your guardians":"your guardian"].</span>")
else
verbs -= /mob/living/proc/guardian_reset
remove_verb(src, /mob/living/proc/guardian_reset)
////////parasite tracking/finding procs
@@ -618,9 +617,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
if("miner")
to_chat(user, "[G.miner_fluff_string]")
to_chat(user, "<span class='holoparasite'><b>[G.real_name]</b> has appeared!</span>")
user.verbs += /mob/living/proc/guardian_comm
user.verbs += /mob/living/proc/guardian_recall
user.verbs += /mob/living/proc/guardian_reset
add_verb(user, list(/mob/living/proc/guardian_comm, \
/mob/living/proc/guardian_recall, \
/mob/living/proc/guardian_reset))
/obj/item/guardiancreator/choose
random = FALSE
@@ -27,11 +27,10 @@
if(loc == summoner && toggle)
ToggleMode(0)
/mob/living/simple_animal/hostile/guardian/assassin/Stat()
..()
if(statpanel("Status"))
if(stealthcooldown >= world.time)
stat(null, "Stealth Cooldown Remaining: [DisplayTimeText(stealthcooldown - world.time)]")
/mob/living/simple_animal/hostile/guardian/assassin/get_status_tab_items()
. = ..()
if(stealthcooldown >= world.time)
. += "Stealth Cooldown Remaining: [DisplayTimeText(stealthcooldown - world.time)]"
/mob/living/simple_animal/hostile/guardian/assassin/AttackingTarget()
. = ..()
@@ -18,11 +18,10 @@
var/bomb_cooldown = 0
var/static/list/boom_signals = list(COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_BUMPED, COMSIG_ATOM_ATTACK_HAND)
/mob/living/simple_animal/hostile/guardian/bomb/Stat()
..()
if(statpanel("Status"))
if(bomb_cooldown >= world.time)
stat(null, "Bomb Cooldown Remaining: [DisplayTimeText(bomb_cooldown - world.time)]")
/mob/living/simple_animal/hostile/guardian/bomb/get_status_tab_items()
. = ..()
if(bomb_cooldown >= world.time)
. += "Bomb Cooldown Remaining: [DisplayTimeText(bomb_cooldown - world.time)]"
/mob/living/simple_animal/hostile/guardian/bomb/AttackingTarget()
. = ..()
@@ -22,11 +22,10 @@
var/datum/atom_hud/medsensor = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medsensor.add_hud_to(src)
/mob/living/simple_animal/hostile/guardian/healer/Stat()
..()
if(statpanel("Status"))
if(beacon_cooldown >= world.time)
stat(null, "Beacon Cooldown Remaining: [DisplayTimeText(beacon_cooldown - world.time)]")
/mob/living/simple_animal/hostile/guardian/healer/get_status_tab_items()
. = ..()
if(beacon_cooldown >= world.time)
. += "Beacon Cooldown Remaining: [DisplayTimeText(beacon_cooldown - world.time)]"
/mob/living/simple_animal/hostile/guardian/healer/AttackingTarget()
. = ..()
@@ -128,7 +128,7 @@
/mob/living/simple_animal/hostile/jungle/leaper/Initialize()
. = ..()
verbs -= /mob/living/verb/pulled
remove_verb(src, /mob/living/verb/pulled)
/mob/living/simple_animal/hostile/jungle/leaper/CtrlClickOn(atom/A)
face_atom(A)
@@ -691,8 +691,8 @@ Difficulty: Very Hard
/mob/living/simple_animal/hostile/lightgeist/Initialize()
. = ..()
verbs -= /mob/living/verb/pulled
verbs -= /mob/verb/me_verb
remove_verb(src, /mob/living/verb/pulled)
remove_verb(src, /mob/verb/me_verb)
var/datum/atom_hud/medsensor = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medsensor.add_hud_to(src)
@@ -781,7 +781,7 @@ Difficulty: Very Hard
L.mind.transfer_to(holder_animal)
var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession
holder_animal.mind.AddSpell(P)
holder_animal.verbs -= /mob/living/verb/pulled
remove_verb(holder_animal, /mob/living/verb/pulled)
/obj/structure/closet/stasis/dump_contents(kill = 1)
STOP_PROCESSING(SSobj, src)
@@ -114,12 +114,12 @@
parrot_sleep_dur = parrot_sleep_max //In case someone decides to change the max without changing the duration var
verbs.Add(/mob/living/simple_animal/parrot/proc/steal_from_ground, \
add_verb(src, list(/mob/living/simple_animal/parrot/proc/steal_from_ground, \
/mob/living/simple_animal/parrot/proc/steal_from_mob, \
/mob/living/simple_animal/parrot/verb/drop_held_item_player, \
/mob/living/simple_animal/parrot/proc/perch_player, \
/mob/living/simple_animal/parrot/proc/toggle_mode,
/mob/living/simple_animal/parrot/proc/perch_mob_player)
/mob/living/simple_animal/parrot/proc/perch_mob_player))
/mob/living/simple_animal/parrot/examine(mob/user)
@@ -141,11 +141,11 @@
..(gibbed)
/mob/living/simple_animal/parrot/Stat()
..()
if(statpanel("Status"))
stat("Held Item", held_item)
stat("Mode",a_intent)
/mob/living/simple_animal/parrot/get_status_tab_items()
. = ..()
. += ""
. += "Held Item: [held_item]"
. += "Mode: [a_intent]"
/mob/living/simple_animal/parrot/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, list/message_mods = list())
. = ..()
@@ -403,11 +403,10 @@
remove_movespeed_modifier(/datum/movespeed_modifier/simplemob_varspeed)
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/simplemob_varspeed, multiplicative_slowdown = speed)
/mob/living/simple_animal/Stat()
..()
if(statpanel("Status"))
stat(null, "Health: [round((health / maxHealth) * 100)]%")
return 1
/mob/living/simple_animal/get_status_tab_items()
. = ..()
. += ""
. += "Health: [round((health / maxHealth) * 100)]%"
/mob/living/simple_animal/proc/drop_loot()
if(loot.len)
@@ -201,25 +201,21 @@
/mob/living/simple_animal/slime/Process_Spacemove(movement_dir = 0)
return 2
/mob/living/simple_animal/slime/Stat()
/mob/living/simple_animal/slime/get_status_tab_items()
. = ..()
if(!.)
return
if(!docile)
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
. += "Nutrition: [nutrition]/[get_max_nutrition()]"
if(amount_grown >= SLIME_EVOLUTION_THRESHOLD)
if(is_adult)
stat(null, "You can reproduce!")
. += "You can reproduce!"
else
stat(null, "You can evolve!")
. += "You can evolve!"
switch(stat)
if(HARD_CRIT, UNCONSCIOUS)
stat(null,"You are knocked out by high levels of BZ!")
. += "You are knocked out by high levels of BZ!"
else
stat(null,"Power Level: [powerlevel]")
. += "Power Level: [powerlevel]"
/mob/living/simple_animal/slime/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
+16 -91
View File
@@ -808,111 +808,34 @@
/mob/proc/is_muzzled()
return 0
/**
* Output an update to the stat panel for the client
*
* calculates client ping, round id, server time, time dilation and other data about the round
* and puts it in the mob status panel on a regular loop
*/
/mob/Stat()
..()
if(statpanel("Status"))
if (client)
stat(null, "Ping: [round(client.lastping, 1)]ms (Average: [round(client.avgping, 1)]ms)")
stat(null, "Map: [SSmapping.config?.map_name || "Loading..."]")
var/datum/map_config/cached = SSmapping.next_map_config
if(cached)
stat(null, "Next Map: [cached.map_name]")
stat(null, "Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]")
stat(null, "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]")
if (SSticker.round_start_time)
var/round_time = world.time - SSticker.round_start_time
if(round_time > MIDNIGHT_ROLLOVER)
stat(null, "Round Time: [round(round_time/MIDNIGHT_ROLLOVER)]:[gameTimestamp("hh:mm:ss", round_time)]")
else
stat(null, "Round Time: [gameTimestamp("hh:mm:ss", round_time)]")
else
stat(null, "Lobby Time: [gameTimestamp("hh:mm:ss", 0)]")
stat(null, "Station Time: [station_time_timestamp()]")
stat(null, "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)
stat(null, "[ETA] [SSshuttle.emergency.getTimerStr()]")
if(client && client.holder)
if(statpanel("MC"))
var/turf/T = get_turf(client.eye)
stat("Location:", COORD(T))
stat("CPU:", "[world.cpu]")
stat("Instances:", "[num2text(world.contents.len, 10)]")
stat("World Time:", "[world.time]")
GLOB.stat_entry()
config.stat_entry()
stat(null)
if(Master)
Master.stat_entry()
else
stat("Master Controller:", "ERROR")
if(Failsafe)
Failsafe.stat_entry()
else
stat("Failsafe Controller:", "ERROR")
if(Master)
stat(null)
for(var/datum/controller/subsystem/SS in Master.subsystems)
SS.stat_entry()
GLOB.cameranet.stat_entry()
if(statpanel("Tickets"))
GLOB.ahelp_tickets.stat_entry()
if(length(GLOB.sdql2_queries))
if(statpanel("SDQL2"))
stat("Access Global SDQL2 List", GLOB.sdql2_vv_statobj)
for(var/i in GLOB.sdql2_queries)
var/datum/sdql2_query/Q = i
Q.generate_stat()
if(listed_turf && client)
if(!TurfAdjacent(listed_turf))
listed_turf = null
else
statpanel(listed_turf.name, null, listed_turf)
var/list/overrides = list()
for(var/image/I in client.images)
if(I.loc && I.loc.loc == listed_turf && I.override)
overrides += I.loc
for(var/atom/A in listed_turf)
if(!A.mouse_opacity)
continue
if(A.invisibility > see_invisible)
continue
if(overrides.len && (A in overrides))
continue
if(A.IsObscured())
continue
statpanel(listed_turf.name, null, A)
/// Adds this list to the output to the stat browser
/mob/proc/get_status_tab_items()
. = list()
/// Gets all relevant proc holders for the browser statpenl
/mob/proc/get_proc_holders()
. = list()
if(mind)
add_spells_to_statpanel(mind.spell_list)
add_spells_to_statpanel(mob_spell_list)
. += get_spells_for_statpanel(mind.spell_list)
. += get_spells_for_statpanel(mob_spell_list)
/**
* Convert a list of spells into a displyable list for the statpanel
*
* Shows charge and other important info
*/
/mob/proc/add_spells_to_statpanel(list/spells)
/mob/proc/get_spells_for_statpanel(list/spells)
var/list/L = list()
for(var/obj/effect/proc_holder/spell/S in spells)
if(S.can_be_cast_by(src))
switch(S.charge_type)
if("recharge")
statpanel("[S.panel]","[S.charge_counter/10.0]/[S.charge_max/10]",S)
L[++L.len] = list("[S.panel]", "[S.charge_counter/10.0]/[S.charge_max/10]", S.name, REF(S))
if("charges")
statpanel("[S.panel]","[S.charge_counter]/[S.charge_max]",S)
L[++L.len] = list("[S.panel]", "[S.charge_counter]/[S.charge_max]", S.name, REF(S))
if("holdervar")
statpanel("[S.panel]","[S.holder_var_type] [S.holder_var_amount]",S)
L[++L.len] = list("[S.panel]", "[S.holder_var_type] [S.holder_var_amount]", S.name, REF(S))
return L
#define MOB_FACE_DIRECTION_DELAY 1
@@ -1033,6 +956,8 @@
if(istype(S, spell))
LAZYREMOVE(mob_spell_list, S)
qdel(S)
if(client)
client << output(null, "statbrowser:check_spells")
///Return any anti magic atom on this mob that matches the magic type
/mob/proc/anti_magic_check(magic = TRUE, holy = FALSE, tinfoil = FALSE, chargecost = 1, self = FALSE)