diff --git a/code/__DEFINES/atom_hud.dm b/code/__DEFINES/atom_hud.dm index 7df79b7e57a..86de96f07a1 100644 --- a/code/__DEFINES/atom_hud.dm +++ b/code/__DEFINES/atom_hud.dm @@ -81,6 +81,7 @@ #define SECHUD_ASSISTANT "hudassistant" #define SECHUD_ATMOSPHERIC_TECHNICIAN "hudatmospherictechnician" #define SECHUD_BARTENDER "hudbartender" +#define SECHUD_BITAVATAR "hudbitavatar" #define SECHUD_BITRUNNER "hudbitrunner" #define SECHUD_BOTANIST "hudbotanist" #define SECHUD_BRIDGE_ASSISTANT "hudbridgeassistant" diff --git a/code/_globalvars/lists/names.dm b/code/_globalvars/lists/names.dm index 81fe08373b3..dce2dc69a50 100644 --- a/code/_globalvars/lists/names.dm +++ b/code/_globalvars/lists/names.dm @@ -24,6 +24,7 @@ GLOBAL_LIST_INIT(nightmare_names, world.file2list("strings/names/nightmare.txt") GLOBAL_LIST_INIT(megacarp_first_names, world.file2list("strings/names/megacarp1.txt")) GLOBAL_LIST_INIT(megacarp_last_names, world.file2list("strings/names/megacarp2.txt")) GLOBAL_LIST_INIT(cyberauth_names, world.file2list("strings/names/cyberauth.txt")) +GLOBAL_LIST_INIT(hacker_aliases, world.file2list("strings/names/hackers.txt")) GLOBAL_LIST_INIT(syndicate_monkey_names, world.file2list("strings/names/syndicate_monkey.txt")) GLOBAL_LIST_INIT(cargorilla_names, world.file2list("strings/names/cargorilla.txt")) GLOBAL_LIST_INIT(guardian_first_names, world.file2list("strings/names/guardian_descriptions.txt")) diff --git a/code/datums/id_trim/outfits.dm b/code/datums/id_trim/outfits.dm index 2e7aebff26a..a2944a469f4 100644 --- a/code/datums/id_trim/outfits.dm +++ b/code/datums/id_trim/outfits.dm @@ -62,6 +62,7 @@ trim_state = "trim_bitavatar" department_color = COLOR_BLACK subdepartment_color = COLOR_GREEN + sechud_icon_state = SECHUD_BITAVATAR /// Trim for cyber police in the Virtual Domain. /datum/id_trim/cyber_police diff --git a/code/modules/bitrunning/components/avatar_connection.dm b/code/modules/bitrunning/components/avatar_connection.dm index b533e2b5661..a92e8ef3d2e 100644 --- a/code/modules/bitrunning/components/avatar_connection.dm +++ b/code/modules/bitrunning/components/avatar_connection.dm @@ -60,9 +60,16 @@ var/datum/action/avatar_domain_info/action = new(help_datum) action.Grant(avatar) + var/client/our_client = old_body.client + var/alias = our_client?.prefs?.read_preference(/datum/preference/name/hacker_alias) || pick(GLOB.hacker_aliases) + + if(alias && avatar.real_name != alias) + avatar.fully_replace_character_name(avatar.real_name, alias) + avatar.playsound_local(avatar, 'sound/magic/blink.ogg', 25, TRUE) avatar.set_static_vision(2 SECONDS) - avatar.set_temp_blindness(1 SECONDS) + avatar.set_temp_blindness(1 SECONDS) // I'm in + /datum/component/avatar_connection/PostTransfer() var/obj/machinery/netpod/pod = netpod_ref?.resolve() @@ -74,6 +81,7 @@ pod.avatar_ref = WEAKREF(parent) + /datum/component/avatar_connection/RegisterWithParent() ADD_TRAIT(parent, TRAIT_TEMPORARY_BODY, REF(src)) /** @@ -87,6 +95,7 @@ RegisterSignal(parent, COMSIG_LIVING_DEATH, PROC_REF(on_sever_connection)) RegisterSignal(parent, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_linked_damage)) + /datum/component/avatar_connection/UnregisterFromParent() REMOVE_TRAIT(parent, TRAIT_TEMPORARY_BODY, REF(src)) UnregisterSignal(parent, list( @@ -98,6 +107,7 @@ COMSIG_MOB_APPLY_DAMAGE, )) + /// Disconnects the avatar and returns the mind to the old_body. /datum/component/avatar_connection/proc/full_avatar_disconnect(cause_damage = FALSE, datum/source) #ifndef UNIT_TESTS @@ -115,6 +125,7 @@ qdel(src) + /// Triggers whenever the server gets a loot crate pushed to goal area /datum/component/avatar_connection/proc/on_domain_completed(datum/source, atom/entered) SIGNAL_HANDLER @@ -127,6 +138,7 @@ new_master = entered, ) + /// Transfers damage from the avatar to the old_body /datum/component/avatar_connection/proc/on_linked_damage(datum/source, damage, damage_type, def_zone, blocked, ...) SIGNAL_HANDLER @@ -147,6 +159,7 @@ if(old_body.stat > SOFT_CRIT) // KO! full_avatar_disconnect(cause_damage = TRUE) + /// Handles minds being swapped around in subsequent avatars /datum/component/avatar_connection/proc/on_mind_transfer(datum/mind/source, mob/living/previous_body) SIGNAL_HANDLER @@ -157,6 +170,7 @@ source.current.TakeComponent(src) + /// Triggers when someone starts prying open our netpod /datum/component/avatar_connection/proc/on_netpod_crowbar(datum/source, mob/living/intruder) SIGNAL_HANDLER @@ -171,6 +185,7 @@ alert.name = "Netpod Breached" alert.desc = "Someone is prying open the netpod. Find an exit." + /// Triggers when the netpod is taking damage and is under 50% /datum/component/avatar_connection/proc/on_netpod_damaged(datum/source) SIGNAL_HANDLER @@ -184,24 +199,28 @@ alert.name = "Integrity Compromised" alert.desc = "The netpod is damaged. Find an exit." + //if your bitrunning avatar somehow manages to acquire and consume a red pill, they will be ejected from the Matrix /datum/component/avatar_connection/proc/disconnect_if_red_pill(datum/source, obj/item/reagent_containers/pill/pill, mob/feeder) SIGNAL_HANDLER if(pill.icon_state == "pill4") full_avatar_disconnect() + /// Triggers when a safe disconnect is called /datum/component/avatar_connection/proc/on_safe_disconnect(datum/source) SIGNAL_HANDLER full_avatar_disconnect() + /// Received message to sever connection /datum/component/avatar_connection/proc/on_sever_connection(datum/source) SIGNAL_HANDLER full_avatar_disconnect(cause_damage = TRUE, source = source) + /// Triggers when the server is shutting down /datum/component/avatar_connection/proc/on_shutting_down(datum/source, mob/living/hackerman) SIGNAL_HANDLER @@ -216,6 +235,7 @@ alert.name = "Domain Rebooting" alert.desc = "The domain is rebooting. Find an exit." + /// Triggers whenever an antag steps onto an exit turf and the server is emagged /datum/component/avatar_connection/proc/on_station_spawn(datum/source) SIGNAL_HANDLER @@ -230,6 +250,7 @@ alert.name = "Security Breach" alert.desc = "A hostile entity is breaching the safehouse. Find an exit." + /// Server has spawned a ghost role threat /datum/component/avatar_connection/proc/on_threat_created(datum/source) SIGNAL_HANDLER @@ -243,6 +264,7 @@ alert.name = "Threat Detected" alert.desc = "Data stream abnormalities present." + /// Returns the mind to the old body /datum/component/avatar_connection/proc/return_to_old_body() var/datum/mind/old_mind = old_mind_ref?.resolve() diff --git a/code/modules/bitrunning/server/obj_generation.dm b/code/modules/bitrunning/server/obj_generation.dm index e8dbd72228c..34a870a3426 100644 --- a/code/modules/bitrunning/server/obj_generation.dm +++ b/code/modules/bitrunning/server/obj_generation.dm @@ -76,9 +76,6 @@ var/obj/item/card/id/outfit_id = avatar.wear_id if(outfit_id) - outfit_id.assignment = "Bit Avatar" - outfit_id.registered_name = avatar.real_name - outfit_id.registered_account = new() outfit_id.registered_account.replaceable = FALSE diff --git a/code/modules/client/preferences/names.dm b/code/modules/client/preferences/names.dm index 9afc8da18c1..8456eb9a627 100644 --- a/code/modules/client/preferences/names.dm +++ b/code/modules/client/preferences/names.dm @@ -174,3 +174,15 @@ return TRUE return FALSE + + +/// The name to use while bitrunning +/datum/preference/name/hacker_alias + explanation = "Hacker alias" + group = "bitrunning" + savefile_key = "hacker_alias" + allow_numbers = TRUE + relevant_job = /datum/job/bitrunner + +/datum/preference/name/hacker_alias/create_default_value() + return pick(GLOB.hacker_aliases) diff --git a/icons/mob/huds/hud.dmi b/icons/mob/huds/hud.dmi index a3bbdf2ede0..086e886bab7 100644 Binary files a/icons/mob/huds/hud.dmi and b/icons/mob/huds/hud.dmi differ diff --git a/strings/names/hackers.txt b/strings/names/hackers.txt new file mode 100644 index 00000000000..e2722fb09fd --- /dev/null +++ b/strings/names/hackers.txt @@ -0,0 +1,46 @@ +Ne0Phyte +CipherX +Gh0stWire +L33tByt3 +Vortex9 +Syn4pse +DarkMatt3r +QuantumDr1ft +Crash0verr1de +Z3r0C00l +NyxShad0w +Gl1tchR3aper +CryptoWra1th +Raz0rEdge +VoidWalk3r +Neur0mancer +EchoH3xx +DataSt0rm +CyberS1ren +Rogu3Protocol +Nexu5Prim3 +CircuitBr3aker +EnigmaPulse +PhantomBit +FluxC4pac1tor +OmegaC0dec +Ne0nRon1n +Senpa1Sw1pe +MechaM0chii +SakuraSn1per +WaifuWarri0r +KatanaKid99 +xXDarkL0rd69Xx +H4xx0rNinja +CyberNinja1337 +Ub3r1337Sk1llz +PhrEaK420 +IRCWizard69 +EliteWar3zKing +Y2KPwn3r +BBSPh34r +BlackWill0w69 +2038Pr0blem +Sp4ceW1nd +B0bbyT4bles +C0deInjector diff --git a/tgui/packages/tgui/interfaces/Orbit/OrbitContent.tsx b/tgui/packages/tgui/interfaces/Orbit/OrbitContent.tsx index 91502644faa..24aab8eba74 100644 --- a/tgui/packages/tgui/interfaces/Orbit/OrbitContent.tsx +++ b/tgui/packages/tgui/interfaces/Orbit/OrbitContent.tsx @@ -15,7 +15,7 @@ type ContentSection = { /** * The primary content display for points of interest. - * Renders a scrollable section replete collapsibles for each + * Renders a scrollable section replete with collapsibles for each * observable group. */ export function OrbitContent(props) {