From edc335ffe59f10810f9185b9a8a00e07f6902511 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Sat, 20 Jul 2024 20:06:06 -0700 Subject: [PATCH 01/12] Fixes lifeboat launch console being slashable / acidable (#6763) # About the pull request Lifeboat launch console is clearly meant to not be slashable / acidable (especially since it already has breakable=false flag and the lifepods are already properly flagged unacidable / unslashable. This fixes the problem. # Explain why it's good for the game Fixes a bug. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: lifeboat launch console is no longer slashable / acidable /:cl: --- code/modules/shuttle/computer.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 00dcd987f089..a8ca94ba0aa5 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -364,9 +364,14 @@ icon_state = "terminal" req_access = list() breakable = FALSE + unslashable = TRUE + unacidable = TRUE ///If true, the lifeboat is in the process of launching, and so the code will not allow another launch. var/launch_initiated = FALSE +/obj/structure/machinery/computer/shuttle/lifeboat/ex_act(severity) + return + /obj/structure/machinery/computer/shuttle/lifeboat/attack_hand(mob/user) . = ..() var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = SSshuttle.getShuttle(shuttleId) From d9596cc8ef541b530752508ca56dc8c5ce7154b0 Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Sun, 21 Jul 2024 04:11:26 +0100 Subject: [PATCH 02/12] Automatic changelog for PR #6763 [ci skip] --- html/changelogs/AutoChangeLog-pr-6763.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-6763.yml diff --git a/html/changelogs/AutoChangeLog-pr-6763.yml b/html/changelogs/AutoChangeLog-pr-6763.yml new file mode 100644 index 000000000000..f5189e8d7550 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6763.yml @@ -0,0 +1,4 @@ +author: "zzzmike" +delete-after: True +changes: + - bugfix: "lifeboat launch console is no longer slashable / acidable" \ No newline at end of file From 5bc7388ef8d7e5fcad724223aa5b687c2b139bd2 Mon Sep 17 00:00:00 2001 From: Crystalic <39885003+blackcrystall@users.noreply.github.com> Date: Sun, 21 Jul 2024 08:29:31 +0500 Subject: [PATCH 03/12] Port WHO to TGUI (#6583) # About the pull request Just QoL # Explain why it's good for the game Argghhh. just TGUI new panel? No benefits on round, but for visual and maybe a little bit server, because it don't generate every time for you who list # Changelog :cl: Blackcrystalic qol: port who/staffwho to TGUI /:cl: --------- Co-authored-by: Deleted user --- code/__DEFINES/subsystems.dm | 1 + code/controllers/subsystem/who.dm | 312 +++++++++++++++++++++ code/game/verbs/who.dm | 209 -------------- colonialmarines.dme | 2 +- tgui/packages/tgui/interfaces/StaffWho.jsx | 78 ++++++ tgui/packages/tgui/interfaces/Who.jsx | 189 +++++++++++++ 6 files changed, 581 insertions(+), 210 deletions(-) create mode 100644 code/controllers/subsystem/who.dm delete mode 100644 code/game/verbs/who.dm create mode 100644 tgui/packages/tgui/interfaces/StaffWho.jsx create mode 100644 tgui/packages/tgui/interfaces/Who.jsx diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 47aa0e732c76..88496c79d630 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -123,6 +123,7 @@ #define SS_INIT_NIGHTMARE 21.5 #define SS_INIT_TIMETRACK 21.1 #define SS_INIT_HUMANS 21 +#define SS_INIT_WHO 20 #define SS_INIT_POWER 19 #define SS_INIT_INFLUXMCSTATS 12 #define SS_INIT_INFLUXSTATS 11 diff --git a/code/controllers/subsystem/who.dm b/code/controllers/subsystem/who.dm new file mode 100644 index 000000000000..43ecbb435587 --- /dev/null +++ b/code/controllers/subsystem/who.dm @@ -0,0 +1,312 @@ +SUBSYSTEM_DEF(who) + name = "Who" + flags = SS_BACKGROUND + runlevels = RUNLEVELS_DEFAULT|RUNLEVEL_LOBBY + init_order = SS_INIT_WHO + wait = 5 SECONDS + + var/datum/player_list/who = new + var/datum/player_list/staff/staff_who = new + +/datum/controller/subsystem/who/Initialize() + who.update_data() + staff_who.update_data() + return SS_INIT_SUCCESS + +/datum/controller/subsystem/who/fire(resumed = TRUE) + who.update_data() + staff_who.update_data() + +//datum +/datum/player_list + var/tgui_name = "Who" + var/tgui_interface_name = "Who" + var/list/mobs_ckey = list() + var/list/list_data = list() + +/datum/player_list/proc/update_data() + var/list/new_list_data = list() + var/list/new_mobs_ckey = list() + var/list/additional_data = list( + "lobby" = 0, + "admin_observers" = 0, + "observers" = 0, + "yautja" = 0, + "infected_preds" = 0, + "humans" = 0, + "infected_humans" = 0, + "uscm" = 0, + "uscm_marines" = 0, + ) + new_list_data["additional_info"] = list() + var/list/counted_factions = list() + for(var/client/client as anything in sortTim(GLOB.clients, GLOBAL_PROC_REF(cmp_ckey_asc))) + CHECK_TICK + new_list_data["all_clients"]++ + var/list/client_payload = list() + client_payload["ckey"] = "[client.key]" + client_payload["text"] = "[client.key]" + client_payload["ckey_color"] = "white" + var/mob/client_mob = client.mob + new_mobs_ckey[client.key] = client_mob + if(client_mob) + if(istype(client_mob, /mob/new_player)) + client_payload["text"] += " - in Lobby" + additional_data["lobby"]++ + + else if(isobserver(client_mob)) + client_payload["text"] += " - Playing as [client_mob.real_name]" + if(CLIENT_IS_STAFF(client)) + additional_data["admin_observers"]++ + else + additional_data["observers"]++ + + var/mob/dead/observer/observer = client_mob + if(observer.started_as_observer) + client_payload["color"] += "#ce89cd" + client_payload["text"] += " - Spectating" + else + client_payload["color"] += "#A000D0" + client_payload["text"] += " - DEAD" + + else + client_payload["text"] += " - Playing as [client_mob.real_name]" + + switch(client_mob.stat) + if(UNCONSCIOUS) + client_payload["color"] += "#B0B0B0" + client_payload["text"] += " - Unconscious" + if(DEAD) + client_payload["color"] += "#A000D0" + client_payload["text"] += " - DEAD" + + if(client_mob.stat != DEAD) + if(isxeno(client_mob)) + client_payload["color"] += "#ec3535" + client_payload["text"] += " - Xenomorph" + + else if(ishuman(client_mob)) + if(client_mob.faction == FACTION_ZOMBIE) + counted_factions[FACTION_ZOMBIE]++ + client_payload["color"] += "#2DACB1" + client_payload["text"] += " - Zombie" + else if(client_mob.faction == FACTION_YAUTJA) + client_payload["color"] += "#7ABA19" + client_payload["text"] += " - Yautja" + additional_data["yautja"]++ + if(client_mob.status_flags & XENO_HOST) + additional_data["infected_preds"]++ + else + additional_data["humans"]++ + if(client_mob.status_flags & XENO_HOST) + additional_data["infected_humans"]++ + if(client_mob.faction == FACTION_MARINE) + additional_data["uscm"]++ + if(client_mob.job in (GLOB.ROLES_MARINES)) + additional_data["uscm_marines"]++ + else + counted_factions[client_mob.faction]++ + + new_list_data["total_players"] += list(client_payload) + + new_list_data["additional_info"] += list(list( + "content" = "In Lobby: [additional_data["lobby"]]", + "color" = "#777", + "text" = "Player in lobby", + )) + + new_list_data["additional_info"] += list(list( + "content" = "Spectating Players: [additional_data["observers"]]", + "color" = "#777", + "text" = "Spectating players", + )) + + new_list_data["additional_info"] += list(list( + "content" = "Spectating Admins: [additional_data["admin_observers"]]", + "color" = "#777", + "text" = "Spectating administrators", + )) + + new_list_data["additional_info"] += list(list( + "content" = "Humans: [additional_data["humans"]]", + "color" = "#2C7EFF", + "text" = "Players playing as Human", + )) + + new_list_data["additional_info"] += list(list( + "content" = "Infected Humans: [additional_data["infected_humans"]]", + "color" = "#ec3535", + "text" = "Players playing as Infected Human", + )) + + new_list_data["additional_info"] += list(list( + "content" = "[MAIN_SHIP_NAME] Personnel: [additional_data["uscm"]]", + "color" = "#5442bd", + "text" = "Players playing as [MAIN_SHIP_NAME] Personnel", + )) + + new_list_data["additional_info"] += list(list( + "content" = "Marines: [additional_data["uscm_marines"]]", + "color" = "#5442bd", + "text" = "Players playing as Marines", + )) + + new_list_data["additional_info"] += list(list( + "content" = "Yautjas: [additional_data["yautja"]]", + "color" = "#7ABA19", + "text" = "Players playing as Yautja", + )) + + new_list_data["additional_info"] += list(list( + "content" = "Infected Predators: [additional_data["infected_preds"]]", + "color" = "#7ABA19", + "text" = "Players playing as Infected Yautja", + )) + + for(var/i in 1 to length(counted_factions)) + if(counted_factions[counted_factions[i]]) + new_list_data["factions"] += list(list( + "content" = "[counted_factions[i]]: [counted_factions[counted_factions[i]]]", + "color" = "#2C7EFF", + "text" = "Other", + )) + if(counted_factions[FACTION_NEUTRAL]) + new_list_data["factions"] += list(list( + "content" = "[FACTION_NEUTRAL] Humans: [counted_factions[FACTION_NEUTRAL]]", + "color" = "#688944", + "text" = "Neutrals", + )) + + for(var/faction_to_get in ALL_XENO_HIVES) + var/datum/hive_status/hive = GLOB.hive_datum[faction_to_get] + if(hive && length(hive.totalXenos)) + new_list_data["xenomorphs"] += list(list( + "content" = "[hive.name]: [length(hive.totalXenos)]", + "color" = hive.color ? hive.color : "#8200FF", + "text" = "Queen: [hive.living_xeno_queen ? "Alive" : "Dead"]", + )) + + list_data = new_list_data + mobs_ckey = new_mobs_ckey + +/datum/player_list/tgui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, tgui_name, tgui_interface_name) + ui.open() + ui.set_autoupdate(TRUE) + +/datum/player_list/ui_data(mob/user) + . = list_data + +/datum/player_list/ui_static_data(mob/user) + . = list() + + .["admin"] = CLIENT_IS_STAFF(user.client) + +/datum/player_list/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + + switch(action) + if("get_player_panel") + if(mobs_ckey[params["ckey"]]) + GLOB.admin_datums[usr.client.ckey].show_player_panel(mobs_ckey[params["ckey"]]) + +/datum/player_list/ui_status(mob/user, datum/ui_state/state) + return UI_INTERACTIVE + + +/datum/player_list/staff + tgui_name = "StaffWho" + tgui_interface_name = "Staff Who" + + var/list/category_colors = list( + "Management" = "purple", + "Maintainers" = "blue", + "Administrators" = "red", + "Moderators" = "orange", + "Mentors" = "green" + ) + +/datum/player_list/staff/update_data() + var/list/new_list_data = list() + mobs_ckey = list() + + var/list/listings + var/list/mappings + if(CONFIG_GET(flag/show_manager)) + LAZYSET(mappings, "Management", R_PERMISSIONS) + if(CONFIG_GET(flag/show_devs)) + LAZYSET(mappings, "Maintainers", R_PROFILER) + LAZYSET(mappings, "Administrators", R_ADMIN) + if(CONFIG_GET(flag/show_mods)) + LAZYSET(mappings, "Moderators", R_MOD && R_BAN) + if(CONFIG_GET(flag/show_mentors)) + LAZYSET(mappings, "Mentors", R_MENTOR) + + for(var/category in mappings) + LAZYSET(listings, category, list()) + + for(var/client/client as anything in GLOB.admins) + if(client.admin_holder?.fakekey && !CLIENT_IS_STAFF(client)) + continue + + for(var/category in mappings) + if(CLIENT_HAS_RIGHTS(client, mappings[category])) + LAZYADD(listings[category], client) + break + + for(var/category in listings) + var/list/admins = list() + for(var/client/entry as anything in listings[category]) + var/list/admin = list() + var/rank = entry.admin_holder.rank + if(entry.admin_holder.extra_titles?.len) + for(var/srank in entry.admin_holder.extra_titles) + rank += " & [srank]" + + admin["content"] = "[entry.key] ([rank])" + admin["text"] = "" + + if(entry.admin_holder?.fakekey) + admin["text"] += " (HIDDEN)" + + if(istype(entry.mob, /mob/dead/observer)) + admin["color"] = "#808080" + admin["text"] += " Spectating" + + else if(istype(entry.mob, /mob/new_player)) + admin["color"] = "#688944" + admin["text"] += " in Lobby" + else + admin["color"] = "#688944" + admin["text"] += " Playing" + + if(entry.is_afk()) + admin["color"] = "#A040D0" + admin["text"] += " (AFK)" + + admins += list(admin) + + new_list_data["administrators"] += list(list( + "category" = category, + "category_color" = category_colors[category], + "category_administrators" = length(listings[category]), + "admins" = admins, + )) + + list_data = new_list_data + +/mob/verb/who() + set category = "OOC" + set name = "Who" + + SSwho.who.tgui_interact(src) + +/mob/verb/staffwho() + set category = "Admin" + set name = "StaffWho" + + SSwho.staff_who.tgui_interact(src) diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm deleted file mode 100644 index 3a9274dbec62..000000000000 --- a/code/game/verbs/who.dm +++ /dev/null @@ -1,209 +0,0 @@ -/client/verb/who()//likely don't touch any... this is easy can die. (:troll_fale:) - set name = "Who" - set category = "OOC" - - var/list/counted_humanoids = list( - "Observers" = 0, - "Admin observers" = 0, - "Humans" = 0, - "Infected humans" = 0, - FACTION_MARINE = 0, - "USCM Marines" = 0, - "Lobby" = 0, - - FACTION_YAUTJA = 0, - "Infected preds" = 0, - - FACTION_PMC = 0, - FACTION_CLF = 0, - FACTION_UPP = 0, - FACTION_TWE = 0, - FACTION_FREELANCER = 0, - FACTION_SURVIVOR = 0, - FACTION_WY_DEATHSQUAD = 0, - FACTION_COLONIST = 0, - FACTION_MERCENARY = 0, - FACTION_DUTCH = 0, - FACTION_HEFA = 0, - FACTION_GLADIATOR = 0, - FACTION_PIRATE = 0, - FACTION_PIZZA = 0, - FACTION_SOUTO = 0, - - FACTION_NEUTRAL = 0, - - FACTION_ZOMBIE = 0 - ) - - var/list/counted_xenos = list() - - var/players = length(GLOB.clients) - - var/dat = "Current Players:
" - var/list/Lines = list() - if(admin_holder && ((R_ADMIN & admin_holder.rights) || (R_MOD & admin_holder.rights))) - for(var/client/C in GLOB.clients) - if(!CLIENT_HAS_RIGHTS(src, R_STEALTH) && (CLIENT_IS_STEALTHED(C))) - continue - var/entry = "[C.key]" - if(C.mob) //Juuuust in case - if(istype(C.mob, /mob/new_player)) - entry += " - In Lobby" - counted_humanoids["Lobby"]++ - else - entry += " - Playing as [C.mob.real_name]" - - if(isobserver(C.mob)) - counted_humanoids["Observers"]++ - if(C.admin_holder?.rights & R_MOD) - counted_humanoids["Admin observers"]++ - counted_humanoids["Observers"]-- - var/mob/dead/observer/O = C.mob - if(O.started_as_observer) - entry += " - Observing" - else - entry += " - DEAD" - else - switch(C.mob.stat) - if(UNCONSCIOUS) - entry += " - Unconscious" - if(DEAD) - entry += " - DEAD" - - if(C.mob && C.mob.stat != DEAD) - if(ishuman(C.mob)) - if(C.mob.faction == FACTION_ZOMBIE) - counted_humanoids[FACTION_ZOMBIE]++ - entry += " - Zombie" - else if(C.mob.faction == FACTION_YAUTJA) - counted_humanoids[FACTION_YAUTJA]++ - entry += " - Predator" - if(C.mob.status_flags & XENO_HOST) - counted_humanoids["Infected preds"]++ - else - counted_humanoids["Humans"]++ - if(C.mob.status_flags & XENO_HOST) - counted_humanoids["Infected humans"]++ - if(C.mob.faction == FACTION_MARINE) - counted_humanoids[FACTION_MARINE]++ - if(C.mob.job in (GLOB.ROLES_MARINES)) - counted_humanoids["USCM Marines"]++ - else - counted_humanoids[C.mob.faction]++ - else if(isxeno(C.mob)) - var/mob/living/carbon/xenomorph/X = C.mob - counted_xenos[X.hivenumber]++ - if(X.faction == FACTION_PREDALIEN) - counted_xenos[FACTION_PREDALIEN]++ - entry += " - Xenomorph" - entry += " (?)" - Lines += entry - - for(var/line in sortList(Lines)) - dat += "[line]
" - dat += "Total Players: [players]" - dat += "
In Lobby: [counted_humanoids["Lobby"]]" - dat += "
Observers: [counted_humanoids["Observers"]] players and [counted_humanoids["Admin observers"]] staff members" - dat += "
Humans: [counted_humanoids["Humans"]] (Infected: [counted_humanoids["Infected humans"]])" - if(counted_humanoids[FACTION_MARINE]) - dat += "
USCM personnel: [counted_humanoids[FACTION_MARINE]] (Marines: [counted_humanoids["USCM Marines"]])" - if(counted_humanoids[FACTION_YAUTJA]) - dat += "
Predators: [counted_humanoids[FACTION_YAUTJA]] [counted_humanoids["Infected preds"] ? "(Infected: [counted_humanoids["Infected preds"]])" : ""]" - if(counted_humanoids[FACTION_ZOMBIE]) - dat += "
Zombies: [counted_humanoids[FACTION_ZOMBIE]]" - - var/show_fact = TRUE - for(var/i in 10 to LAZYLEN(counted_humanoids) - 2) - if(counted_humanoids[counted_humanoids[i]]) - if(show_fact) - dat += "

Other factions:" - show_fact = FALSE - dat += "
[counted_humanoids[i]]: [counted_humanoids[counted_humanoids[i]]]" - if(counted_humanoids[FACTION_NEUTRAL]) - dat += "
[FACTION_NEUTRAL] Humans: [counted_humanoids[FACTION_NEUTRAL]]" - - show_fact = TRUE - var/datum/hive_status/hive - for(var/hivenumber in counted_xenos) - // Print predalien counts last - if(hivenumber == FACTION_PREDALIEN) - continue - if(show_fact) - dat += "

Xenomorphs:" - show_fact = FALSE - hive = GLOB.hive_datum[hivenumber] - if(hive) - dat += "
[hive.name]: [counted_xenos[hivenumber]] (Queen: [hive.living_xeno_queen ? "Alive" : "Dead"])" - else - dat += "
Error: no hive datum detected for [hivenumber]." - hive = null - if(counted_xenos[FACTION_PREDALIEN]) - dat += "
Predaliens: [counted_xenos[FACTION_PREDALIEN]]" - - else - for(var/client/C in GLOB.clients) - if((C.admin_holder && C.admin_holder.fakekey) || (CLIENT_IS_STEALTHED(C))) - continue - - Lines += C.key - for(var/line in sortList(Lines)) - dat += "[line]
" - dat += "Total Players: [players]
" - - dat += "" - show_browser(usr, dat, "Who", "who", "size=600x800") - - -/client/verb/staffwho() - set name = "Staffwho" - set category = "Admin" - - var/dat = "" - var/list/mappings - if(CONFIG_GET(flag/show_manager)) - LAZYSET(mappings, "Management", R_PERMISSIONS) - if(CONFIG_GET(flag/show_devs)) - LAZYSET(mappings, "Maintainers", R_PROFILER) - LAZYSET(mappings, "Admins", R_ADMIN) - if(CONFIG_GET(flag/show_mods)) - LAZYSET(mappings, "Moderators", R_MOD) - if(CONFIG_GET(flag/show_mentors)) - LAZYSET(mappings, "Mentors", R_MENTOR) - - var/list/listings - for(var/category in mappings) - LAZYSET(listings, category, list()) - - for(var/client/C in GLOB.admins) - if(CLIENT_IS_STEALTHED(C) && !CLIENT_HAS_RIGHTS(src, R_STEALTH)) - continue - if(C.admin_holder?.fakekey && !CLIENT_IS_STAFF(src)) - continue - for(var/category in mappings) - if(CLIENT_HAS_RIGHTS(C, mappings[category])) - LAZYADD(listings[category], C) - break - - for(var/category in listings) - dat += "
Current [category] ([length(listings[category])]):
\n" - for(var/client/entry in listings[category]) - dat += "\t[entry.key] is \a [entry.admin_holder.rank]" - if(LAZYLEN(entry.admin_holder.extra_titles)) - for(var/srank in entry.admin_holder.extra_titles) - dat += " & [srank]" - if(CLIENT_IS_STAFF(src)) - if(CLIENT_IS_STEALTHED(entry)) - dat += " (STEALTHED)" - else if(entry.admin_holder?.fakekey) - dat += " (HIDDEN)" - if(istype(entry.mob, /mob/dead/observer)) - dat += " - Observing" - else if(istype(entry.mob, /mob/new_player)) - dat += " - Lobby" - else - dat += " - Playing" - if(entry.is_afk()) - dat += " (AFK)" - dat += "
" - dat += "" - show_browser(usr, dat, "Staffwho", "staffwho", "size=600x800") diff --git a/colonialmarines.dme b/colonialmarines.dme index c7d4a8957987..7915adce0587 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -311,6 +311,7 @@ #include "code\controllers\subsystem\tracking.dm" #include "code\controllers\subsystem\vote.dm" #include "code\controllers\subsystem\weather.dm" +#include "code\controllers\subsystem\who.dm" #include "code\controllers\subsystem\x_evolution.dm" #include "code\controllers\subsystem\xeno.dm" #include "code\controllers\subsystem\init\landmarks.dm" @@ -1407,7 +1408,6 @@ #include "code\game\verbs\ooc.dm" #include "code\game\verbs\preferences.dm" #include "code\game\verbs\records.dm" -#include "code\game\verbs\who.dm" #include "code\modules\trigger.dm" #include "code\modules\admin\admin.dm" #include "code\modules\admin\admin_ranks.dm" diff --git a/tgui/packages/tgui/interfaces/StaffWho.jsx b/tgui/packages/tgui/interfaces/StaffWho.jsx new file mode 100644 index 000000000000..1ce71c9b5001 --- /dev/null +++ b/tgui/packages/tgui/interfaces/StaffWho.jsx @@ -0,0 +1,78 @@ +import { useBackend } from '../backend'; +import { Button, Collapsible, Stack } from '../components'; +import { Window } from '../layouts'; + +export const StaffWho = (props, context) => { + const { data } = useBackend(context); + const { admin, administrators } = data; + + return ( + + + {administrators !== undefined ? ( + + + {administrators.map((x, index) => ( + + {x.admins.map((x, index) => ( + + ))} + + ))} + + + ) : null} + + + ); +}; + +const StaffWhoCollapsible = (props, context) => { + const { title, color, children } = props; + return ( + + {children} + + ); +}; + +const GetAdminInfo = (props, context) => { + const { admin, content, color, text } = props; + return admin ? ( + + ) : ( + + ); +}; diff --git a/tgui/packages/tgui/interfaces/Who.jsx b/tgui/packages/tgui/interfaces/Who.jsx new file mode 100644 index 000000000000..dccf3d1e39f0 --- /dev/null +++ b/tgui/packages/tgui/interfaces/Who.jsx @@ -0,0 +1,189 @@ +import { useBackend, useLocalState } from '../backend'; +import { + Box, + Button, + Collapsible, + Icon, + Input, + Section, + Stack, +} from '../components'; +import { Window } from '../layouts'; + +export const Who = (props, context) => { + const { act, data } = useBackend(context); + const { + admin, + all_clients, + total_players = [], + additional_info = [], + factions = [], + xenomorphs = [], + } = data; + + const [searchQuery, setSearchQuery] = useLocalState('searchQuery', ''); + + const searchPlayers = () => + total_players.filter((player) => isMatch(player, searchQuery)); + + const filteredTotalPlayers = searchPlayers(); + + return ( + + + + +
+ + + + + + + act('get_player_panel', { + ckey: searchPlayers()?.[0].ckey, + }) + } + onInput={(e) => setSearchQuery(e.target.value)} + placeholder="Search..." + value={searchQuery} + /> + + +
+
+ +
+ + {filteredTotalPlayers.length ? ( + + {filteredTotalPlayers.map((x) => ( + + ))} + + ) : null} + +
+ {admin !== 0 ? ( +
+ + + {additional_info.length + ? additional_info.map((x, index) => ( + + )) + : null} + {factions.length + ? factions.map((x, index) => ( + + )) + : null} + {xenomorphs.length + ? xenomorphs.map((x, index) => ( + + )) + : null} + + +
+ ) : null} +
+
+
+
+ ); +}; + +const WhoCollapsible = (props, context) => { + const { title, color, children } = props; + return ( + + {children} + + ); +}; + +const GetAddInfo = (props, context) => { + const { act } = useBackend(context); + const { content, color, text } = props; + + return ( + + ); +}; + +const GetPlayerInfo = (props, context) => { + const { act } = useBackend(context); + const { + admin, + player: { ckey, ckey_color, color, text }, + } = props; + return admin !== 0 ? ( + + ) : ( + + ); +}; + +const isMatch = (player, searchQuery) => { + if (!searchQuery) { + return true; + } + + return ( + player.ckey.toLowerCase().includes(searchQuery?.toLowerCase()) || false + ); +}; From d4dcf8a54cac716ee252b5847748fab5cf74e78c Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Sun, 21 Jul 2024 04:35:07 +0100 Subject: [PATCH 04/12] Automatic changelog for PR #6583 [ci skip] --- html/changelogs/AutoChangeLog-pr-6583.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-6583.yml diff --git a/html/changelogs/AutoChangeLog-pr-6583.yml b/html/changelogs/AutoChangeLog-pr-6583.yml new file mode 100644 index 000000000000..2ace6d57de99 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6583.yml @@ -0,0 +1,4 @@ +author: "Blackcrystalic" +delete-after: True +changes: + - qol: "port who/staffwho to TGUI" \ No newline at end of file From c8efd819655ede7cd3bf5b003c395be2813df882 Mon Sep 17 00:00:00 2001 From: Crystalic <39885003+blackcrystall@users.noreply.github.com> Date: Sun, 21 Jul 2024 09:21:59 +0500 Subject: [PATCH 05/12] Queen Maturity Timer (#6585) # About the pull request I don't remember very good, but in game still exist forever at 1m timer of queen maturity, now it's viewing seconds too and stop showing it'self when you reach mature stage on queen # Changelog :cl: BlackCrystalic fix: Queen maturity timer /:cl: --------- Co-authored-by: Deleted user --- code/modules/mob/living/carbon/xenomorph/castes/Queen.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index a66903a938c5..5b9c410e235a 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -468,6 +468,9 @@ /mob/living/carbon/xenomorph/queen/proc/make_combat_effective() queen_aged = TRUE + if(queen_age_timer_id != TIMER_ID_NULL) + deltimer(queen_age_timer_id) + queen_age_timer_id = TIMER_ID_NULL give_combat_abilities() recalculate_actions() @@ -545,9 +548,8 @@ . += "Pooled Larvae: [stored_larvae]" . += "Leaders: [xeno_leader_num] / [hive?.queen_leader_limit]" - if(queen_age_timer_id != TIMER_ID_NULL) - var/time_left = time2text(timeleft(queen_age_timer_id) + 1 MINUTES, "mm") // We add a minute so that it basically ceilings the value. - . += "Maturity: [time_left == 1? "[time_left] minute" : "[time_left] minutes"] remaining" + if(!queen_aged && queen_age_timer_id != TIMER_ID_NULL) + . += "Maturity: [time2text(timeleft(queen_age_timer_id), "mm:ss")] remaining" /mob/living/carbon/xenomorph/queen/proc/set_orders() set category = "Alien" From 3a27885127319130657d14f5bc4e819d43aad8b9 Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Sun, 21 Jul 2024 05:29:43 +0100 Subject: [PATCH 06/12] Automatic changelog for PR #6585 [ci skip] --- html/changelogs/AutoChangeLog-pr-6585.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-6585.yml diff --git a/html/changelogs/AutoChangeLog-pr-6585.yml b/html/changelogs/AutoChangeLog-pr-6585.yml new file mode 100644 index 000000000000..c800ca05db37 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6585.yml @@ -0,0 +1,4 @@ +author: "BlackCrystalic" +delete-after: True +changes: + - bugfix: "Queen maturity timer" \ No newline at end of file From e0c2f6e815c03912ccf00f553cb5e0aa3a3387ea Mon Sep 17 00:00:00 2001 From: ThePiachu Date: Sat, 20 Jul 2024 21:47:09 -0700 Subject: [PATCH 07/12] Made big XM88 boxes behave like other handful boxes (#6693) # About the pull request Recently Blundir mentioned the XM88 boxes don't behave like the shotgun handful boxes for the purpose of restocking them in Requisitions. It was due to them referencing the handful ammo rather than the box of ammo. I made them consistent with how the shotgun ammo boxes are handled. Tested and the boxes behave properly. # Explain why it's good for the game More uniform code is good. Plus with this change the XM88 ammo can be almost added to Requisitions vendors if needed (can't do it without re-balancing the ammo boxes though since they are 90 vs 300 ammo pieces, so they don't divide neatly. Will probably need to lower the big box to 270 and then everything will work well). # Testing Photographs and Procedure Spawn the XM88 `/obj/item/ammo_box/magazine/lever_action/xm88 ` and `/obj/item/ammo_magazine/lever_action/xm88` and make sure they behave as expected.
Screenshots & Videos NA
# Changelog :cl: ThePiachu refactor: Made XM88 box code more uniform with other handful boxes. /:cl: --- code/modules/projectiles/ammunition.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 0e0fccf027db..5db904869973 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -365,7 +365,7 @@ Turn() or Shift() as there is virtually no overhead. ~N overlay_ammo_type = "_blank" overlay_gun_type = "_458" overlay_content = "_458" - magazine_type = /obj/item/ammo_magazine/handful/lever_action/xm88 + magazine_type = /obj/item/ammo_magazine/lever_action/xm88 /obj/item/ammo_box/magazine/lever_action/xm88/empty empty = TRUE From 10f073aa7dc277605be59d6f7aca191287826c8c Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Sun, 21 Jul 2024 05:52:38 +0100 Subject: [PATCH 08/12] Automatic changelog for PR #6693 [ci skip] --- html/changelogs/AutoChangeLog-pr-6693.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-6693.yml diff --git a/html/changelogs/AutoChangeLog-pr-6693.yml b/html/changelogs/AutoChangeLog-pr-6693.yml new file mode 100644 index 000000000000..69d39631b379 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6693.yml @@ -0,0 +1,4 @@ +author: "ThePiachu" +delete-after: True +changes: + - refactor: "Made XM88 box code more uniform with other handful boxes." \ No newline at end of file From a3ed0fe372333a4ec77121d7ac8a25dbe47d4b5d Mon Sep 17 00:00:00 2001 From: Changelogs Date: Mon, 22 Jul 2024 01:21:03 +0000 Subject: [PATCH 09/12] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-6583.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6585.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6693.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6763.yml | 4 ---- html/changelogs/archive/2024-07.yml | 9 +++++++++ 5 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-6583.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6585.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6693.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6763.yml diff --git a/html/changelogs/AutoChangeLog-pr-6583.yml b/html/changelogs/AutoChangeLog-pr-6583.yml deleted file mode 100644 index 2ace6d57de99..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6583.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Blackcrystalic" -delete-after: True -changes: - - qol: "port who/staffwho to TGUI" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6585.yml b/html/changelogs/AutoChangeLog-pr-6585.yml deleted file mode 100644 index c800ca05db37..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6585.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "BlackCrystalic" -delete-after: True -changes: - - bugfix: "Queen maturity timer" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6693.yml b/html/changelogs/AutoChangeLog-pr-6693.yml deleted file mode 100644 index 69d39631b379..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6693.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "ThePiachu" -delete-after: True -changes: - - refactor: "Made XM88 box code more uniform with other handful boxes." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6763.yml b/html/changelogs/AutoChangeLog-pr-6763.yml deleted file mode 100644 index f5189e8d7550..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6763.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "zzzmike" -delete-after: True -changes: - - bugfix: "lifeboat launch console is no longer slashable / acidable" \ No newline at end of file diff --git a/html/changelogs/archive/2024-07.yml b/html/changelogs/archive/2024-07.yml index 5b2844998cbc..fb9fe07d98e1 100644 --- a/html/changelogs/archive/2024-07.yml +++ b/html/changelogs/archive/2024-07.yml @@ -210,3 +210,12 @@ cuberound: - rscdel: removes trade destinations (they were never used) - balance: m56 cupola uses m56d ammo rather then standard sg ammo +2024-07-22: + BlackCrystalic: + - bugfix: Queen maturity timer + Blackcrystalic: + - qol: port who/staffwho to TGUI + ThePiachu: + - refactor: Made XM88 box code more uniform with other handful boxes. + zzzmike: + - bugfix: lifeboat launch console is no longer slashable / acidable From 4dd2902e739c1ecad1d83f869629fd0ebfab96d9 Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:50:00 +0200 Subject: [PATCH 10/12] water particle code cleanup (#6721) # About the pull request removes todo that does not need to be done and renames var # Explain why it's good for the game eh just a bit cleaner code # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: code: cleans up water particle code /:cl: --------- Co-authored-by: vincibrv --- .../effects/effect_system/particle_effects.dm | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/code/game/objects/effects/effect_system/particle_effects.dm b/code/game/objects/effects/effect_system/particle_effects.dm index 972d242bf359..9440c16f2d4e 100644 --- a/code/game/objects/effects/effect_system/particle_effects.dm +++ b/code/game/objects/effects/effect_system/particle_effects.dm @@ -8,10 +8,10 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT unacidable = TRUE // So effect are not targeted by alien acid. -/obj/effect/particle_effect/initialize_pass_flags(datum/pass_flags_container/PF) +/obj/effect/particle_effect/initialize_pass_flags(datum/pass_flags_container/pass_flags) ..() - if (PF) - PF.flags_pass = PASS_OVER|PASS_AROUND|PASS_UNDER|PASS_THROUGH|PASS_MOB_THRU + if (pass_flags) + pass_flags.flags_pass = PASS_OVER|PASS_AROUND|PASS_UNDER|PASS_THROUGH|PASS_MOB_THRU //Water @@ -22,17 +22,14 @@ var/life = 15 mouse_opacity = MOUSE_OPACITY_TRANSPARENT -/obj/effect/particle_effect/water/initialize_pass_flags(datum/pass_flags_container/PF) +/obj/effect/particle_effect/water/initialize_pass_flags(datum/pass_flags_container/pass_flags) ..() - if (PF) - PF.flags_pass = PASS_THROUGH|PASS_OVER|PASS_MOB_THRU|PASS_UNDER + if (pass_flags) + pass_flags.flags_pass = PASS_THROUGH|PASS_OVER|PASS_MOB_THRU|PASS_UNDER /obj/effect/particle_effect/water/Move(turf/newloc) - //var/turf/T = src.loc - //if (istype(T, /turf)) - // T.firelevel = 0 //TODO: FIX - if (--src.life < 1) - //SN src = null + life -= 1 + if (life < 1) qdel(src) if(newloc.density) return 0 From 50767845e199f04b0c16c68413b67ae7726fa5e3 Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Tue, 23 Jul 2024 00:55:15 +0100 Subject: [PATCH 11/12] Automatic changelog for PR #6721 [ci skip] --- html/changelogs/AutoChangeLog-pr-6721.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-6721.yml diff --git a/html/changelogs/AutoChangeLog-pr-6721.yml b/html/changelogs/AutoChangeLog-pr-6721.yml new file mode 100644 index 000000000000..e5009fff7018 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6721.yml @@ -0,0 +1,4 @@ +author: "cuberound" +delete-after: True +changes: + - code_imp: "cleans up water particle code" \ No newline at end of file From dfc7c717ff73b0414c41603c57656a6767eda884 Mon Sep 17 00:00:00 2001 From: Changelogs Date: Tue, 23 Jul 2024 01:18:46 +0000 Subject: [PATCH 12/12] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-6721.yml | 4 ---- html/changelogs/archive/2024-07.yml | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-6721.yml diff --git a/html/changelogs/AutoChangeLog-pr-6721.yml b/html/changelogs/AutoChangeLog-pr-6721.yml deleted file mode 100644 index e5009fff7018..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6721.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "cuberound" -delete-after: True -changes: - - code_imp: "cleans up water particle code" \ No newline at end of file diff --git a/html/changelogs/archive/2024-07.yml b/html/changelogs/archive/2024-07.yml index fb9fe07d98e1..32e6ff4372d9 100644 --- a/html/changelogs/archive/2024-07.yml +++ b/html/changelogs/archive/2024-07.yml @@ -219,3 +219,6 @@ - refactor: Made XM88 box code more uniform with other handful boxes. zzzmike: - bugfix: lifeboat launch console is no longer slashable / acidable +2024-07-23: + cuberound: + - code_imp: cleans up water particle code