[MIRROR] Bitrunning: Avatars get silly hacker names (#28385)

* Bitrunning: Avatars get silly hacker names (#84279)

## About The Pull Request
Bit avatars now get corny names while spawning in to the virtual domain.
You can change your alias in prefs or have it randomized for s0meth1ng
1337.

Added sechud icons (and thereby orbit ui icons) for bit avatars since
"Cyb3rHaxx0r" might be confusing to find in the living players section.
## Why It's Good For The Game
This was done as a request and after discussion in the code channel.
A little bit of character persistence across simulations.
## Changelog
🆑
add: Bitrunning: You can now choose your hacker alias in prefs.
add: Bit avatars get orbit icons.
/🆑

* Bitrunning: Avatars get silly hacker names

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-06-25 16:25:05 +05:30
committed by GitHub
co-authored by Jeremiah
parent a5d002f56a
commit cf81bd3359
9 changed files with 85 additions and 5 deletions
+1
View File
@@ -93,6 +93,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"
+1
View File
@@ -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"))
+1
View File
@@ -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
@@ -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()
@@ -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
+12
View File
@@ -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)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 10 KiB

+46
View File
@@ -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
@@ -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) {