Skip to content

Commit

Permalink
admin: some admin tweaks part 2 (ss220-space#6401)
Browse files Browse the repository at this point in the history
* admin: some admin tweaks part 2

* fix

* правки перевода и логов

* error fixes

* Update code/__DEFINES/span.dm

Co-authored-by: BeebBeebBoob <[email protected]>

* log_and_message_admins fix

* fix

* fix conflicts

* правки перевода

* Update code/game/machinery/computer/communications.dm

Co-authored-by: BeebBeebBoob <[email protected]>

* Update code/game/machinery/computer/communications.dm

Co-authored-by: BeebBeebBoob <[email protected]>

* Update code/modules/admin/verbs/asays.dm

Co-authored-by: BeebBeebBoob <[email protected]>

* asays

---------

Co-authored-by: BeebBeebBoob <[email protected]>
  • Loading branch information
2 people authored and Ssheya committed Jan 25, 2025
1 parent 9806983 commit ed467c9
Show file tree
Hide file tree
Showing 51 changed files with 1,917 additions and 572 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define GAMEMODE_IS_REVOLUTION (SSticker && istype(SSticker.mode, /datum/game_mode/revolution))
#define GAMEMODE_IS_WIZARD (SSticker && istype(SSticker.mode, /datum/game_mode/wizard))
#define GAMEMODE_IS_RAGIN_MAGES (SSticker && istype(SSticker.mode, /datum/game_mode/wizard/raginmages))
#define GAMEMODE_IS_METEOR (SSticker && istype(SSticker.mode, /datum/game_mode/meteor))

// special roles
// Distinct from the ROLE_X defines because some antags have multiple special roles but only one ban type
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@

#define is_internal_organ(A) istype(A, /obj/item/organ/internal)

#define is_organ(A) istype((A), /obj/item/organ)

GLOBAL_LIST_INIT(pointed_types, typecacheof(list(
/obj/item/pen,
/obj/item/screwdriver,
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/machines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
#define LOGIN_TYPE_ROBOT 3
#define LOGIN_TYPE_ADMIN 4

#define NUKE_STATUS_INTACT 0
#define NUKE_CORE_MISSING 1
#define NUKE_MISSING 2

// Bitflags for a machine's preferences on when it should start processing. For use with machinery's `processing_flags` var.
/// Indicates the machine will automatically start processing right after it's `Initialize()` is ran.
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
//#define span_drone(str) ("<span class='drone'>" + str + "</span>")
#define span_engradio(str) ("<span class='engradio'>" + str + "</span>")
//#define span_extremelybig(str) ("<span class='extremelybig'>" + str + "</span>")
#define span_game_emote(str) ("<span class='game emote'>" + str + "</span>")
#define span_ghostalert(str) ("<span class='ghostalert'>" + str + "</span>")
#define span_green(str) ("<span class='green'>" + str + "</span>")
#define span_greenannounce(str) ("<span class='greenannounce'>" + str + "</span>")
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,5 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NO_VOCAL_CORDS "no_vocal_cords"

#define TRAIT_BLOB_ZOMBIFIED "blob_zombified"

#define TRAIT_BEING_OFFERED "offered"
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/sources.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,5 @@
#define WET_TRAIT "wet"

#define BLOB_ZOMBIE_TRAIT "blob_zombie_trait"

#define ADMIN_OFFER_TRAIT "admin_offer"
3 changes: 3 additions & 0 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@
text = replacetext(text, "\[/i\]", "</I>")
text = replacetext(text, "\[u\]", "<U>")
text = replacetext(text, "\[/u\]", "</U>")
if(check_rights(R_EVENT))
text = replacetext(text, "\[signfont\]", "<font face=\"[signfont]\"><i>")
text = replacetext(text, "\[/signfont\]", "</i></font>")
if(sign)
text = replacetext(text, "\[sign\]", "<font face=\"[signfont]\"><i>[user ? user.real_name : "Anonymous"]</i></font>")
if(fields)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/game_modes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ GLOBAL_LIST(antag_paradise_weights)
/// Weights for all special antags in ANTAG-PARADISE gamemode.
GLOBAL_LIST(antag_paradise_special_weights)

GLOBAL_VAR_INIT(gamma_ship_location, 1) // 0 = station , 1 = space
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_ACID_PROTECTED" = TRAIT_ACID_PROTECTED,
"TRAIT_AI_UNTRACKABLE" = TRAIT_AI_UNTRACKABLE,
"TRAIT_BADASS" = TRAIT_BADASS,
"TRAIT_BEING_OFFERED" = TRAIT_BEING_OFFERED,
"TRAIT_BLIND" = TRAIT_BLIND,
"TRAIT_BLOB_ALLY" = TRAIT_BLOB_ALLY,
"TRAIT_BLOODCRAWL" = TRAIT_BLOODCRAWL,
Expand Down
7 changes: 7 additions & 0 deletions code/controllers/globals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
return ..()

/datum/controller/global_vars/can_vv_get(var_name)
var/static/list/protected_vars = list(
"asays", "admin_log", "logging", "open_logging_views"
)

if(!check_rights(R_ADMIN, FALSE, src) && (var_name in protected_vars))
return FALSE

if(gvars_datum_protected_varlist[var_name])
return FALSE
return ..()
Expand Down
8 changes: 8 additions & 0 deletions code/controllers/subsystem/tickets/tickets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -620,5 +620,13 @@ UI STUFF
else
message_staff("<span class='admin_channel'>[usr.client] / ([usr]) снят с тикета [ticket_name] номер [index]</span>", TICKET_STAFF_MESSAGE_ADMIN_CHANNEL)

/datum/controller/subsystem/tickets/can_vv_get(var_name)
var/static/list/protected_vars = list(
"allTickets"
)
if(!check_rights(R_ADMIN, FALSE, src) && (var_name in protected_vars))
return FALSE
return TRUE

#undef TICKET_STAFF_MESSAGE_ADMIN_CHANNEL
#undef TICKET_STAFF_MESSAGE_PREFIX
15 changes: 15 additions & 0 deletions code/datums/datumvars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@
/datum/proc/can_vv_get(var_name)
return TRUE

/mob/can_vv_get(var_name)
var/static/list/protected_vars = list(
"lastKnownIP", "computer_id", "attack_log_old"
)
if(!check_rights(R_ADMIN, FALSE, src) && (var_name in protected_vars))
return FALSE
return TRUE

/client/can_vv_get(var_name)
var/static/list/protected_vars = list(
"address", "chatOutput", "computer_id", "connection", "jbh", "pm_tracker", "related_accounts_cid", "related_accounts_ip", "watchlisted"
)
if(!check_rights(R_ADMIN, FALSE, mob) && (var_name in protected_vars))
return FALSE
return TRUE

/// Called when a var is edited with the new value to change to
/datum/proc/vv_edit_var(var_name, var_value)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/emote/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
* * user - The user of the emote.
* * text - The text of the emote.
*/
/datum/emote/proc/runechat_emote(mob/user, text)
/proc/runechat_emote(atom/user, text)
var/list/can_see = get_mobs_in_view(1, user) //Allows silicon & mmi mobs carried around to see the emotes of the person carrying them around.
can_see |= viewers(user, null)
for(var/mob/viewer in can_see)
Expand Down
27 changes: 27 additions & 0 deletions code/datums/outfits/outfit_admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,33 @@
if(special_icon)
I.icon_state = special_icon

/datum/outfit/admin/observer
name = "Наблюдатель"

uniform = /obj/item/clothing/under/color/random
back = /obj/item/storage/backpack/satchel
shoes = /obj/item/clothing/shoes/black
box = /obj/item/storage/box/survival
backpack_contents = list(
/obj/item/implanter/dust = 1
)

/datum/outfit/admin/observer/plasmaman
name = "Наблюдатель (Плазмамен)"

uniform = /obj/item/clothing/under/plasmaman
head = /obj/item/clothing/head/helmet/space/plasmaman
mask = /obj/item/clothing/mask/breath
belt = /obj/item/tank/internals/plasmaman/belt/full
box = /obj/item/storage/box/survival_plasmaman

/datum/outfit/admin/observer/vox
name = "Наблюдатель (Вокс)"

mask = /obj/item/clothing/mask/breath/vox
belt = /obj/item/tank/internals/emergency_oxygen/double/vox
box = /obj/item/storage/box/survival_vox

/datum/outfit/admin/syndicate
name = "Syndicate Agent"

Expand Down
Loading

0 comments on commit ed467c9

Please sign in to comment.