Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks and improvments to SSblackbox logging #3561

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#define RADIO_KEY_CENTCOM "e"
#define RADIO_TOKEN_CENTCOM ":e"

//WS Begin - SGR, Overmaps
#define RADIO_CHANNEL_SOLGOV "SolGov"
#define RADIO_KEY_SOLGOV "s"
#define RADIO_TOKEN_SOLGOV ":s"
Expand All @@ -48,18 +47,11 @@
#define RADIO_TOKEN_PIRATE ":y"

#define RADIO_CHANNEL_WIDEBAND "Wideband"
//WS End

Sun-Soaked marked this conversation as resolved.
Show resolved Hide resolved
#define RADIO_CHANNEL_CTF_RED "Red Team"
#define RADIO_CHANNEL_CTF_BLUE "Blue Team"


#define MIN_FREE_FREQ 1201 // -------------------------------------------------
// Frequencies are always odd numbers and range from 1201 to 1599.

#define FREQ_SYNDICATE 1213 // Nuke op comms frequency, dark brown
#define FREQ_CTF_RED 1215 // CTF red team comms frequency, red
#define FREQ_CTF_BLUE 1217 // CTF blue team comms frequency, blue
#define FREQ_CENTCOM 1337 // CentCom comms frequency, gray
#define FREQ_SOLGOV 1345 // SolGov comms frequency, dark blue WS ADDITION
#define FREQ_INTEQ 1347 // Inteq comms frequency, light brown
Expand Down Expand Up @@ -91,7 +83,7 @@

#define MAX_FREQ 1489 // ------------------------------------------------------

#define FREQ_WIDEBAND 1501 // Subspace/shuttle comms frequency, dark blue WS ADDITION
#define FREQ_WIDEBAND 1501 // sector wide communication

#define MAX_FREE_FREQ 1599 // -------------------------------------------------

Expand Down
4 changes: 0 additions & 4 deletions code/controllers/subsystem/blackbox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,6 @@ SUBSYSTEM_DEF(blackbox)
record_feedback("tally", "radio_usage", 1, "solgov") //WS Edit - SolGov Rep
if(FREQ_AI_PRIVATE)
record_feedback("tally", "radio_usage", 1, "ai private")
if(FREQ_CTF_RED)
record_feedback("tally", "radio_usage", 1, "CTF red team")
if(FREQ_CTF_BLUE)
record_feedback("tally", "radio_usage", 1, "CTF blue team")
else
record_feedback("tally", "radio_usage", 1, "other")

Expand Down
12 changes: 4 additions & 8 deletions code/game/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,34 +94,30 @@ GLOBAL_LIST_INIT(radiochannels, list(
RADIO_CHANNEL_COMMON = FREQ_COMMON,
RADIO_CHANNEL_COMMAND = FREQ_COMMAND,
RADIO_CHANNEL_CENTCOM = FREQ_CENTCOM,
RADIO_CHANNEL_SOLGOV = FREQ_SOLGOV, //WS Edit - SolGov Rep
RADIO_CHANNEL_WIDEBAND = FREQ_WIDEBAND, //WS Edit - Overmap
RADIO_CHANNEL_SOLGOV = FREQ_SOLGOV,
RADIO_CHANNEL_WIDEBAND = FREQ_WIDEBAND,
RADIO_CHANNEL_SYNDICATE = FREQ_SYNDICATE,
RADIO_CHANNEL_NANOTRASEN = FREQ_NANOTRASEN,
RADIO_CHANNEL_MINUTEMEN = FREQ_MINUTEMEN,
RADIO_CHANNEL_PGF = FREQ_PGF,
RADIO_CHANNEL_INTEQ = FREQ_INTEQ,
RADIO_CHANNEL_PIRATE = FREQ_PIRATE,
RADIO_CHANNEL_AI_PRIVATE = FREQ_AI_PRIVATE,
RADIO_CHANNEL_CTF_RED = FREQ_CTF_RED,
RADIO_CHANNEL_CTF_BLUE = FREQ_CTF_BLUE
))

GLOBAL_LIST_INIT(reverseradiochannels, list(
"[FREQ_COMMON]" = RADIO_CHANNEL_COMMON,
"[FREQ_COMMAND]" = RADIO_CHANNEL_COMMAND,
"[FREQ_CENTCOM]" = RADIO_CHANNEL_CENTCOM,
"[FREQ_SOLGOV]" = RADIO_CHANNEL_SOLGOV, //WS Edit - SolGov Rep
"[FREQ_WIDEBAND]" = RADIO_CHANNEL_WIDEBAND, //WS Edit - SolGov Rep
"[FREQ_SOLGOV]" = RADIO_CHANNEL_SOLGOV,
"[FREQ_WIDEBAND]" = RADIO_CHANNEL_WIDEBAND,
"[FREQ_SYNDICATE]" = RADIO_CHANNEL_SYNDICATE,
"[FREQ_NANOTRASEN]" = RADIO_CHANNEL_NANOTRASEN,
"[FREQ_MINUTEMEN]" = RADIO_CHANNEL_MINUTEMEN,
"[FREQ_PGF]" = RADIO_CHANNEL_PGF,
"[FREQ_INTEQ]" = RADIO_CHANNEL_INTEQ,
"[FREQ_PIRATE]" = RADIO_CHANNEL_PIRATE,
"[FREQ_AI_PRIVATE]" = RADIO_CHANNEL_AI_PRIVATE,
"[FREQ_CTF_RED]" = RADIO_CHANNEL_CTF_RED,
"[FREQ_CTF_BLUE]" = RADIO_CHANNEL_CTF_BLUE
))

/datum/radio_frequency
Expand Down
11 changes: 6 additions & 5 deletions code/game/machinery/autolathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,15 @@
materials.use_materials(materials_used)

if(is_stack)
var/obj/item/stack/N = new being_built.build_path(A, multiplier, FALSE)
N.update_appearance()
N.autolathe_crafted(src)
var/obj/item/stack/new_item = new being_built.build_path(A, multiplier, FALSE)
new_item.update_appearance()
new_item.autolathe_crafted(src)
SSblackbox.record_feedback("nested tally", "item_printed", 1, list("[type]", "[new_item.type]"))
else
for(var/i=1, i<=multiplier, i++)
var/obj/item/new_item = new being_built.build_path(A)
new_item.autolathe_crafted(src)

SSblackbox.record_feedback("nested tally", "item_printed", 1, list("[type]", "[new_item.type]"))
if(length(picked_materials))
new_item.set_custom_materials(picked_materials, 1 / multiplier) //Ensure we get the non multiplied amount
for(var/x in picked_materials)
Expand Down Expand Up @@ -446,5 +447,5 @@

//Called when the object is constructed by an autolathe
//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes
/obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A)
/obj/item/proc/autolathe_crafted(obj/machinery/autolathe/lathe)
return
2 changes: 0 additions & 2 deletions code/game/machinery/teambuilder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@
desc = "A machine that, when passed, colors you based on the color of your team. Go red team!"
color = "#ff0000"
team_color = "#ff0000"
team_radio = FREQ_CTF_RED

/obj/machinery/teambuilder/blue
name = "Teambuilding Machine (Blue)"
desc = "A machine that, when passed, colors you based on the color of your team. Go blue team!"
color = "#0000ff"
team_color = "#0000ff"
team_radio = FREQ_CTF_BLUE
7 changes: 2 additions & 5 deletions code/game/objects/effects/decals/cleanable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@
AddElement(/datum/element/connect_loc, loc_connections)
AddElement(/datum/element/beauty, beauty)

SSblackbox.record_feedback("tally", "station_mess_created", 1, name)

/obj/effect/decal/cleanable/Destroy()
SSblackbox.record_feedback("tally", "station_mess_destroyed", 1, name)
return ..()
if(!mapload)
SSblackbox.record_feedback("tally", "station_mess_created", 1, name)

/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
if(mergeable_decal)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
var/datum/signal/subspace/vocal/signal = new(src, freq, speaker, language, message, spans, message_mods)

// Independent radios, on the CentCom frequency, reach all independent radios
if (independent && (freq == FREQ_CENTCOM || freq == FREQ_WIDEBAND || freq == FREQ_CTF_RED || freq == FREQ_CTF_BLUE)) //WS Edit - SolGov Rep
if (independent && (freq == FREQ_CENTCOM || freq == FREQ_WIDEBAND)) //WS Edit - SolGov Rep
signal.data["compression"] = 0
signal.transmission_method = TRANSMISSION_SUPERSPACE
signal.map_zones = list(0) // reaches all Z-levels
Expand Down
9 changes: 3 additions & 6 deletions code/game/objects/items/stacks/sheets/glass.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
var/obj/item/stack/sheet/weld_material = /obj/item/stack/sheet/glass
embedding = list("embed_chance" = 65)

/obj/item/shard/Initialize()
/obj/item/shard/Initialize(mapload)
. = ..()
AddComponent(/datum/component/caltrop, force)
AddComponent(/datum/component/butchering, 150, 65)
Expand All @@ -300,17 +300,14 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
if (icon_prefix)
icon_state = "[icon_prefix][icon_state]"

SSblackbox.record_feedback("tally", "station_mess_created", 1, name)
if(!mapload)
SSblackbox.record_feedback("tally", "station_mess_created", 1, name)

var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/item/shard/Destroy()
. = ..()
SSblackbox.record_feedback("tally", "station_mess_destroyed", 1, name)

/obj/item/shard/afterattack(atom/A as mob|obj, mob/user, proximity)
. = ..()
if(!proximity || !(src in user))
Expand Down
7 changes: 2 additions & 5 deletions code/game/objects/items/trash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
resistance_flags = FLAMMABLE

/obj/item/trash/Initialize(mapload)
SSblackbox.record_feedback("tally", "station_mess_created", 1, name)
return ..()

/obj/item/trash/Destroy()
SSblackbox.record_feedback("tally", "station_mess_destroyed", 1, name)
if(!mapload)
SSblackbox.record_feedback("tally", "station_mess_created", 1, name)
return ..()

/obj/item/trash/raisins
Expand Down
6 changes: 2 additions & 4 deletions code/game/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ GLOBAL_LIST_INIT(freqtospan, list(
"[FREQ_AI_PRIVATE]" = "aiprivradio",
"[FREQ_SYNDICATE]" = "syndradio",
"[FREQ_CENTCOM]" = "centcomradio",
"[FREQ_SOLGOV]" = "solgovradio", //WS Edit - SolGov Rep
"[FREQ_WIDEBAND]" = "widebandradio", //WS Edit - Overmaps
"[FREQ_CTF_RED]" = "redteamradio",
"[FREQ_CTF_BLUE]" = "blueteamradio"
"[FREQ_SOLGOV]" = "solgovradio",
"[FREQ_WIDEBAND]" = "widebandradio",
))

GLOBAL_LIST_INIT(freqcolor, list())
Expand Down
3 changes: 2 additions & 1 deletion code/game/turfs/closed/minerals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@
visible_message(span_warning("The ore was completely ruined!"))
else
new mineralType(src, mineralAmt)
SSblackbox.record_feedback("tally", "ore_mined", mineralAmt, mineralType)
if(ishuman(user))
SSblackbox.record_feedback("tally", "ore_mined", mineralAmt, mineralType)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(give_exp)
Expand Down
2 changes: 0 additions & 2 deletions code/modules/awaymissions/capture_the_flag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -578,15 +578,13 @@
/datum/outfit/ctf/red/post_equip(mob/living/carbon/human/H)
..()
var/obj/item/radio/R = H.ears
R.set_frequency(FREQ_CTF_RED)
R.freqlock = TRUE
R.independent = TRUE
H.dna.species.stunmod = 0

/datum/outfit/ctf/blue/post_equip(mob/living/carbon/human/H)
..()
var/obj/item/radio/R = H.ears
R.set_frequency(FREQ_CTF_BLUE)
R.freqlock = TRUE
R.independent = TRUE
H.dna.species.stunmod = 0
Expand Down
43 changes: 29 additions & 14 deletions code/modules/faction/faction_datum.dm
Original file line number Diff line number Diff line change
@@ -1,62 +1,77 @@
/datum/faction
var/name
/// Primarly to be used for backend stuff.
var/short_name
var/parent_faction
/// List of prefixes that ships of this faction uses
var/list/prefixes

/datum/faction/New()
if(!short_name)
short_name = name

/datum/faction/syndicate
name = FACTION_SYNDICATE
parent_faction = /datum/faction/syndicate
prefixes = list("SEV", "SSV")
prefixes = PREFIX_SYNDICATE

/datum/faction/syndicate/ngr
name = FACTION_NGR
prefixes = list("NGRV")
short_name = "NGR"
prefixes = PREFIX_NGR

/datum/faction/syndicate/cybersun
name = FACTION_CYBERSUN
prefixes = list("CSSV")
prefixes = PREFIX_CYBERSUN

/datum/faction/syndicate/suns
name = FACTION_SUNS
prefixes = list("SUNS")
short_name = "SUNS"
prefixes = PREFIX_SUNS

/datum/faction/solgov
name = FACTION_SOLGOV
prefixes = list("SCSV")
prefixes = PREFIX_SOLGOV

/datum/faction/srm
name = FACTION_SRM
prefixes = list("SRSV")
short_name = "SRM"
prefixes = PREFIX_SRM

/datum/faction/inteq
name = FACTION_INTEQ
prefixes = list("IRMV")
short_name = "INTEQ"
prefixes = PREFIX_INTEQ

/datum/faction/clip
name = FACTION_CLIP
prefixes = list("CMSV", "CMGSV")
short_name = "CLIP"
prefixes = PREFIX_CLIP

/datum/faction/nt
name = FACTION_NT
short_name = "NT"
parent_faction = /datum/faction/nt
prefixes = list("NTSV")
prefixes = PREFIX_NT

/datum/faction/nt/ns_logi
name = FACTION_NS_LOGI
prefixes = list("NSSV")
prefixes = PREFIX_NS_LOGI

/datum/faction/nt/vigilitas
name = FACTION_VIGILITAS
prefixes = list("VISV")
prefixes = PREFIX_VIGILITAS

/datum/faction/frontier
name = FACTION_FRONTIER
prefixes = list("FFV")
prefixes = PREFIX_FRONTIER

/datum/faction/pgf
name = FACTION_PGF
prefixes = list("PGF", "PGFMC", "PGFN")
short_name = "PGF"
prefixes = PREFIX_PGF

/datum/faction/independent
name = FACTION_INDEPENDENT
prefixes = list("SV", "IMV", "ISV")
short_name = "Indie"
prefixes = PREFIX_INDEPENDENT
1 change: 1 addition & 0 deletions code/modules/mining/equipment/kinetic_crusher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
L.apply_status_effect(STATUS_EFFECT_CRUSHERMARK, hammer_synced)
var/target_turf = get_turf(target)
if(ismineralturf(target_turf))
SSblackbox.record_feedback("tally", "pick_used_mining", 1, src.type)
var/turf/closed/mineral/M = target_turf
new /obj/effect/temp_visual/kinetic_blast(M)
..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/dead/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@

log_manifest(character.mind.key, character.mind, character, TRUE)

SSblackbox.record_feedback("tally", "player_joined_faction", 1, ship.get_faction())
if(length(ship.job_slots) > 1 && ship.job_slots[1] == job) // if it's the "captain" equivalent job of the ship. checks to make sure it's not a one-job ship
minor_announce("[job.name] [character.real_name] on deck!", zlevel = ship.shuttle_port.virtual_z())
return TRUE
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/dead/new_player/ship_select.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
to_chat(spawnee, "<span class='danger'>There was an error loading the ship. Please contact admins!</span>")
spawnee.new_player_panel()
return
SSblackbox.record_feedback("tally", "ship_purchased", 1, template.name) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
SSblackbox.record_feedback("tally", "ship_purchased", 1, template.name)
SSblackbox.record_feedback("tally", "faction_ship_purchased", 1, template.faction_datum.name)
// Try to spawn as the first listed job in the job slots (usually captain)
// Playtime checks are overridden, to ensure the player gets to join the ship they spawned.
if(!spawnee.AttemptLateSpawn(target.job_slots[1], target, FALSE))
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/brain/brain_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@
if(resilience)
actual_trauma.resilience = resilience
. = actual_trauma
SSblackbox.record_feedback("tally", "traumas", 1, actual_trauma.type)
if(owner?.client)
SSblackbox.record_feedback("tally", "traumas", 1, actual_trauma.type)

//Add a random trauma of a certain subtype
/obj/item/organ/brain/proc/gain_trauma_type(brain_trauma_type = /datum/brain_trauma, resilience, natural_gain = FALSE)
Expand Down
3 changes: 0 additions & 3 deletions code/modules/projectiles/ammunition/_ammo_casing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,8 @@

/obj/item/ammo_casing/Destroy()
. = ..()

if(BB)
QDEL_NULL(BB)
else
SSblackbox.record_feedback("tally", "station_mess_destroyed", 1, name)

/obj/item/ammo_casing/update_icon_state()
icon_state = "[initial(icon_state)][BB ? (bullet_skin ? "-[bullet_skin]" : "") : "-empty"]"
Expand Down
Loading