Flags/banners with custom names and descriptions now keep these when hung up/deployed (#23012)

See title. Players have been able to assign a custom description to the
loadout flag/banner selection since forever, but it never persisted over
to actual 'hung up' flag object and was essentially erased if ever used.

<img width="777" height="600" alt="image"
src="https://github.com/user-attachments/assets/6b80b6f0-a120-4ba2-a46d-a680b7e5fff5"
/>

---------

Co-authored-by: Jaraci <mirandatrasen@nt.net>
This commit is contained in:
Jaraci
2026-08-10 00:36:56 +00:00
committed by GitHub
co-authored by Jaraci
parent 77019460cc
commit 4c18407831
2 changed files with 27 additions and 2 deletions
+14 -2
View File
@@ -171,7 +171,12 @@
if(isfloor(user.loc))
user.visible_message(SPAN_NOTICE("\The [user] deploys \the [src] on \the [get_turf(loc)]."), SPAN_NOTICE("You deploy \the [src] on \the [get_turf(loc)]."))
user.drop_from_inventory(src)
new flag_structure(user.loc, user.dir, deploy = TRUE, item_flag_path = flag_path)
var/obj/structure/sign/flag/F = new flag_structure(user.loc, user.dir, deploy = TRUE, item_flag_path = flag_path)
F.name = src.name
F.desc = src.desc
if(F.linked_flag)
F.linked_flag.name = src.name
F.linked_flag.desc = src.desc
qdel(src)
/obj/item/flag/afterattack(var/atom/A, var/mob/user, var/adjacent)
@@ -192,7 +197,12 @@
user.visible_message(SPAN_NOTICE("\The [user] fastens \the [src] to \the [A]."), SPAN_NOTICE("You fasten \the [src] to \the [A]."))
user.drop_from_inventory(src)
new flag_structure(user.loc, placement_dir, deploy = TRUE, item_flag_path = flag_path)
var/obj/structure/sign/flag/F = new flag_structure(user.loc, user.dir, deploy = TRUE, item_flag_path = flag_path)
F.name = src.name
F.desc = src.desc
if(F.linked_flag)
F.linked_flag.name = src.name
F.linked_flag.desc = src.desc
qdel(src)
@@ -222,6 +232,8 @@
else
user.visible_message(SPAN_NOTICE("\The [user] unfastens \the [src] and folds it back up."), SPAN_NOTICE("You unfasten \the [src] and fold it back up."))
var/obj/item/flag/F = new flag_item(get_turf(user))
F.name = src.name
F.desc = src.desc
user.put_in_hands(F)
else
user.visible_message(SPAN_NOTICE("\The [user] unfastens the tattered remnants of \the [src]."), SPAN_NOTICE("You unfasten the tattered remains of \the [src]."))