diff --git a/code/datums/entities/player.dm b/code/datums/entities/player.dm
index 9b8f95938de6..ed97c4eafaae 100644
--- a/code/datums/entities/player.dm
+++ b/code/datums/entities/player.dm
@@ -105,6 +105,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
note.player_id = id
note.text = note_text
note.date = "[time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")]"
+ note.round_id = GLOB.round_id
note.is_confidential = is_confidential
note.note_category = note_category
note.is_ban = is_ban
diff --git a/code/datums/entities/player_note.dm b/code/datums/entities/player_note.dm
index f6662a153113..420bb5f0a470 100644
--- a/code/datums/entities/player_note.dm
+++ b/code/datums/entities/player_note.dm
@@ -1,8 +1,11 @@
+#define NOTE_ROUND_ID(note_entity) note_entity.round_id ? "(ID: [note_entity.round_id])" : ""
+
/datum/entity/player_note
var/player_id
var/admin_id
var/text
var/date
+ var/round_id
var/is_ban = FALSE
var/ban_time
var/is_confidential = FALSE
@@ -19,15 +22,16 @@ BSQL_PROTECT_DATUM(/datum/entity/player_note)
entity_type = /datum/entity/player_note
table_name = "player_notes"
field_types = list(
- "player_id"=DB_FIELDTYPE_BIGINT,
- "admin_id"=DB_FIELDTYPE_BIGINT,
- "text"=DB_FIELDTYPE_STRING_MAX,
- "date"=DB_FIELDTYPE_STRING_LARGE,
- "is_ban"=DB_FIELDTYPE_INT,
- "ban_time"=DB_FIELDTYPE_BIGINT,
- "is_confidential"=DB_FIELDTYPE_INT,
- "admin_rank"=DB_FIELDTYPE_STRING_MEDIUM,
- "note_category" =DB_FIELDTYPE_INT,
+ "player_id" = DB_FIELDTYPE_BIGINT,
+ "admin_id" = DB_FIELDTYPE_BIGINT,
+ "text" = DB_FIELDTYPE_STRING_MAX,
+ "date" = DB_FIELDTYPE_STRING_LARGE,
+ "round_id" = DB_FIELDTYPE_BIGINT,
+ "is_ban" = DB_FIELDTYPE_INT,
+ "ban_time" = DB_FIELDTYPE_BIGINT,
+ "is_confidential" = DB_FIELDTYPE_INT,
+ "admin_rank" = DB_FIELDTYPE_STRING_MEDIUM,
+ "note_category" = DB_FIELDTYPE_INT,
)
/datum/entity_meta/player_note/on_read(datum/entity/player_note/note)
@@ -64,6 +68,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player_note)
var/is_ban
var/admin_ckey
var/date
+ var/round_id
var/ban_time
var/is_confidential
var/admin_rank
@@ -79,6 +84,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player_note)
"is_ban",
"admin_ckey" = "admin.ckey",
"date",
+ "round_id",
"ban_time",
"is_confidential",
"admin_rank",
@@ -88,4 +94,4 @@ BSQL_PROTECT_DATUM(/datum/entity/player_note)
/// Returns all notes associated with a CKEY, structured as a list of strings.
/proc/get_all_notes(player_ckey)
for(var/datum/view_record/note_view/note in DB_VIEW(/datum/view_record/note_view, DB_COMP("player_ckey", DB_EQUALS, player_ckey)))
- LAZYADDASSOC(., "[note.note_category]", "\"[note.text]\", by [note.admin_ckey] ([note.admin_rank]) on [note.date]")
+ LAZYADDASSOC(., "[note.note_category]", "\"[note.text]\", by [note.admin_ckey] ([note.admin_rank]) on [note.date] ([note.round_id])")
diff --git a/code/game/verbs/records.dm b/code/game/verbs/records.dm
index 56a440e3558c..f09de72da2e6 100644
--- a/code/game/verbs/records.dm
+++ b/code/game/verbs/records.dm
@@ -53,7 +53,7 @@
if(NOTE_YAUTJA)
color = "#114e11"
- dat += "[N.text] by [admin_ckey] ([N.admin_rank]) on [N.date] "
+ dat += "[N.text] by [admin_ckey] ([N.admin_rank]) on [N.date] [NOTE_ROUND_ID(N)] "
dat += "
"
dat += "
"
@@ -168,7 +168,7 @@
continue
var/admin_ckey = N.admin_ckey
- dat += "[N.text] by [admin_ckey] ([N.admin_rank]) on [N.date] "
+ dat += "[N.text] by [admin_ckey] ([N.admin_rank]) on [N.date] [NOTE_ROUND_ID(N)] "
///Can remove notes from anyone other than yourself, unless you're the host. So long as you have deletion access anyway.
if((can_del && target != get_player_from_key(key)) || ishost(usr))
dat += "Remove"
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 5f24f71c8a50..2c749df71bb7 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -89,7 +89,7 @@
if(N.is_ban)
var/time_d = N.ban_time ? "Banned for [N.ban_time] minutes | " : ""
color = "#880000" //Removed confidential check because we can't make confidential bans
- dat += "[time_d][N.text] by [admin_ckey] ([N.admin_rank])[confidential_text] on [N.date] "
+ dat += "[time_d][N.text] by [admin_ckey] ([N.admin_rank])[confidential_text] on [N.date] [NOTE_ROUND_ID(N)] "
else
if(N.is_confidential)
color = "#AA0055"
@@ -102,7 +102,7 @@
else if(N.note_category == NOTE_YAUTJA)
color = "#114e11"
- dat += "[N.text] by [admin_ckey] ([N.admin_rank])[confidential_text] on [N.date] "
+ dat += "[N.text] by [admin_ckey] ([N.admin_rank])[confidential_text] on [N.date] [NOTE_ROUND_ID(N)] "
if(admin_ckey == usr.ckey || admin_ckey == "Adminbot" || ishost(usr))
dat += "Remove"
diff --git a/code/modules/admin/tabs/admin_tab.dm b/code/modules/admin/tabs/admin_tab.dm
index 5a98faa6ddaa..a2f3bd42df5f 100644
--- a/code/modules/admin/tabs/admin_tab.dm
+++ b/code/modules/admin/tabs/admin_tab.dm
@@ -169,12 +169,12 @@
if(N.is_ban)
var/ban_text = N.ban_time ? "Banned for [N.ban_time] | " : ""
color = "#880000"
- dat += "[ban_text][N.text] by [admin_ckey] ([N.admin_rank])[confidential_text] on [N.date] "
+ dat += "[ban_text][N.text] by [admin_ckey] ([N.admin_rank])[confidential_text] on [N.date] [NOTE_ROUND_ID(N)] "
else
if(N.is_confidential)
color = "#AA0055"
- dat += "[N.text] by [admin_ckey] ([N.admin_rank])[confidential_text] on [N.date] "
+ dat += "[N.text] by [admin_ckey] ([N.admin_rank])[confidential_text] on [N.date] [NOTE_ROUND_ID(N)] "
dat += "
"
dat += "
"