[TM First] The Paintening: Part 2 of ? - NanoPaint: The Modular Computer Paint App (and related modular computer changes) (#95213)

This commit is contained in:
Y0SH1M4S73R
2026-03-08 05:02:22 -04:00
committed by GitHub
parent 5515633706
commit 0208b29e74
55 changed files with 2466 additions and 386 deletions
@@ -711,6 +711,7 @@
active_program = program
program.alert_pending = FALSE
idle_threads.Remove(program)
program.on_made_active_program(user)
if(open_ui)
INVOKE_ASYNC(src, PROC_REF(update_tablet_open_uis), user)
update_appearance(UPDATE_ICON)
@@ -736,6 +737,7 @@
active_program = program
program.alert_pending = FALSE
program.on_made_active_program(user)
if(open_ui)
INVOKE_ASYNC(src, PROC_REF(update_tablet_open_uis), user)
update_appearance(UPDATE_ICON)
@@ -966,7 +968,9 @@
return ITEM_INTERACT_SUCCESS
/obj/item/modular_computer/proc/photo_act(mob/user, obj/item/photo/scanned_photo)
if(!store_file(new /datum/computer_file/picture(scanned_photo.picture), user))
var/datum/picture/source_picture = scanned_photo.picture
var/datum/computer_file/image/image_file = new /datum/computer_file/image(source_picture.picture_image, display_name = source_picture.picture_name, source_photo_or_painting = source_picture)
if(!store_file(image_file, user))
balloon_alert(user, "no space!")
return ITEM_INTERACT_BLOCKING
balloon_alert(user, "photo scanned")
@@ -88,6 +88,26 @@
return file
return null
/**
* find_file_by_full_name
*
* Will check all applications in a tablet for files and, if they have \
* the same filename AND extension, will return it.
* If a computer disk is passed instead, it will check the disk over the computer.
*/
/obj/item/modular_computer/proc/find_file_by_full_name(full_path, obj/item/disk/computer/target_disk)
if(!istext(full_path))
return null
if(isnull(target_disk))
for(var/datum/computer_file/file as anything in stored_files)
if("[file.filename].[file.filetype]" == full_path)
return file
else
for(var/datum/computer_file/file as anything in target_disk.stored_files)
if("[file.filename].[file.filetype]" == full_path)
return file
return null
/**
* find_file_by_uid
*