From b6417a1689b071bc6721dabe6536b2e6f4d7be4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Pomori=C5=A1ac?= Date: Sat, 20 Mar 2021 19:29:05 +0100 Subject: [PATCH] Fix for unremovable photos and default photo names if no photo name is provided (#15671) * Update photography.dm If no photo name is provided a default name will be assigned with an int incrementor which makes navigation through the photos a bit easier. * Update code/modules/paperwork/photography.dm Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Update code/modules/paperwork/photography.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/modules/paperwork/photography.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 465608481a5..a20f3989e43 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -167,6 +167,7 @@ var/icon_off = "camera_off" var/size = 3 var/see_ghosts = 0 //for the spoop of it + var/current_photo_num = 1 /obj/item/camera/spooky/CheckParts(list/parts_list) @@ -386,7 +387,10 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor var/datum/picture/P = new() if(istype(src,/obj/item/camera/digital)) P.fields["name"] = input(user,"Name photo:","photo") - P.name = P.fields["name"]//So the name is displayed on the print/delete list. + if(!P.fields["name"]) + P.fields["name"] = "Photo [current_photo_num]" + current_photo_num++ + P.name = P.fields["name"] //So the name is displayed on the print/delete list. else P.fields["name"] = "photo" P.fields["author"] = user