From d436cf433dd913d94f88f00b60e46daa0900a9db Mon Sep 17 00:00:00 2001 From: tattle <66640614+dragomagol@users.noreply.github.com> Date: Tue, 26 Sep 2023 19:24:09 -0700 Subject: [PATCH] Gives maint drones random designations (#78573) ## About The Pull Request Right now, drone ghost spawners give all drones the name "drone." This makes it difficult to differentiate drones, both as a drone in drone chat and as a non-drone. This gives all drones a unique identifier like posibrains. Also changes a couple of 1s to TRUEs ## Why It's Good For The Game It's good to be able to identify drones, and for drones to be able to identify each other. ## Changelog :cl: Tattle qol: drones now have individual names, instead of just "drone" /:cl: Co-authored-by: tattle --- code/modules/mob/living/simple_animal/hostile/alien.dm | 4 ++-- .../living/simple_animal/hostile/constructs/constructs.dm | 2 +- code/modules/mob_spawn/ghost_roles/drone_roles.dm | 6 ++++++ tgstation.dme | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 code/modules/mob_spawn/ghost_roles/drone_roles.dm diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index b392417aab2..2d17820af0b 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -32,7 +32,7 @@ lighting_cutoff_red = 30 lighting_cutoff_green = 15 lighting_cutoff_blue = 50 - unique_name = 1 + unique_name = TRUE gold_core_spawnable = NO_SPAWN death_sound = 'sound/voice/hiss6.ogg' death_message = "lets out a waning guttural screech, green blood bubbling from its maw..." @@ -91,7 +91,7 @@ projectiletype = /obj/projectile/neurotoxin/damaging projectilesound = 'sound/weapons/pierce.ogg' status_flags = 0 - unique_name = 0 + unique_name = FALSE var/sterile = 1 var/plants_off = 0 var/egg_cooldown = 30 diff --git a/code/modules/mob/living/simple_animal/hostile/constructs/constructs.dm b/code/modules/mob/living/simple_animal/hostile/constructs/constructs.dm index 124b797d0da..23f7590dc8e 100644 --- a/code/modules/mob/living/simple_animal/hostile/constructs/constructs.dm +++ b/code/modules/mob/living/simple_animal/hostile/constructs/constructs.dm @@ -28,7 +28,7 @@ maxbodytemp = INFINITY faction = list(FACTION_CULT) pressure_resistance = 100 - unique_name = 1 + unique_name = TRUE AIStatus = AI_OFF //normal constructs don't have AI loot = list(/obj/item/ectoplasm) del_on_death = TRUE diff --git a/code/modules/mob_spawn/ghost_roles/drone_roles.dm b/code/modules/mob_spawn/ghost_roles/drone_roles.dm new file mode 100644 index 00000000000..b8a31a16b13 --- /dev/null +++ b/code/modules/mob_spawn/ghost_roles/drone_roles.dm @@ -0,0 +1,6 @@ +/obj/effect/mob_spawn/ghost_role/drone/name_mob(mob/living/spawned_mob, forced_name) + if(!forced_name) + var/designation = pick(GLOB.posibrain_names) + forced_name = "Drone ([designation]-[rand(100, 999)])" + + return ..() diff --git a/tgstation.dme b/tgstation.dme index 31e35da7321..408bd31b2d4 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4728,6 +4728,7 @@ #include "code\modules\mob_spawn\corpses\nonhuman_corpses.dm" #include "code\modules\mob_spawn\corpses\species_corpses.dm" #include "code\modules\mob_spawn\ghost_roles\away_roles.dm" +#include "code\modules\mob_spawn\ghost_roles\drone_roles.dm" #include "code\modules\mob_spawn\ghost_roles\fugitive_hunter_roles.dm" #include "code\modules\mob_spawn\ghost_roles\golem_roles.dm" #include "code\modules\mob_spawn\ghost_roles\mining_roles.dm"