mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 05:51:56 +01:00
Lag War Day 5.5: are you serious dude (#21889)
we have a gorillion hard deletions and it turns out half of them are because we set the "ALWAYS HARD DELETE THIS" flag rather than just like. fixing the hard delete. cool
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
hard_drive.store_file(new /datum/computer_file/program/atmos_control(src))
|
||||
hard_drive.store_file(new /datum/computer_file/program/rcon_console(src))
|
||||
hard_drive.store_file(new /datum/computer_file/program/law_manager(src, computer_host))
|
||||
hard_drive.remove_file(hard_drive.find_file_by_name("clientmanager"))
|
||||
hard_drive.remove_file(hard_drive.find_file_by_name("clientmanager"), TRUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(register_chat)), 1 SECOND)
|
||||
|
||||
/obj/item/modular_computer/silicon/proc/register_chat()
|
||||
@@ -72,4 +72,4 @@
|
||||
hard_drive.store_file(new /datum/computer_file/program/filemanager(src))
|
||||
hard_drive.store_file(new /datum/computer_file/program/ntnetdownload(src))
|
||||
hard_drive.store_file(new /datum/computer_file/program/alarm_monitor/all(src))
|
||||
hard_drive.remove_file(hard_drive.find_file_by_name("clientmanager"))
|
||||
hard_drive.remove_file(hard_drive.find_file_by_name("clientmanager"), TRUE)
|
||||
|
||||
@@ -28,7 +28,7 @@ GLOBAL_VAR_INIT(file_uid, 0)
|
||||
if(!hard_drive)
|
||||
return ..()
|
||||
|
||||
hard_drive.remove_file(src)
|
||||
hard_drive.remove_file(src, TRUE)
|
||||
// hard_drive.hard_drive is the computer that has drive installed. If we are Destroy()ing program that's currently running kill it.
|
||||
if(hard_drive.parent_computer?.active_program == src)
|
||||
hard_drive.parent_computer.kill_program(TRUE)
|
||||
|
||||
@@ -100,12 +100,10 @@
|
||||
/**
|
||||
* Use this proc to remove files to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
|
||||
*/
|
||||
/obj/item/computer_hardware/hard_drive/proc/remove_file(var/datum/computer_file/F)
|
||||
if(!F || !istype(F))
|
||||
/obj/item/computer_hardware/hard_drive/proc/remove_file(var/datum/computer_file/F, force = FALSE)
|
||||
if(!F || !istype(F) || !stored_files)
|
||||
return FALSE
|
||||
if(!stored_files || read_only)
|
||||
return FALSE
|
||||
if(!check_functionality())
|
||||
if(!force && (read_only || !check_functionality()))
|
||||
return FALSE
|
||||
if(F in stored_files)
|
||||
stored_files -= F
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
max_capacity = 256
|
||||
origin_tech = list(TECH_DATA = 4)
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/portable/New()
|
||||
..()
|
||||
/obj/item/computer_hardware/hard_drive/portable/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/datum/computer_file/F in stored_files)
|
||||
remove_file(F, TRUE)
|
||||
stored_files = list()
|
||||
recalculate_size()
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
. = ..()
|
||||
add_programs()
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/portable/super/preset/all/Destroy()
|
||||
. = ..()
|
||||
GC_TEMPORARY_HARDDEL
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/portable/super/preset/all/proc/add_programs()
|
||||
for(var/F in typesof(/datum/computer_file/program))
|
||||
var/datum/computer_file/program/prog = new F("Compless")
|
||||
|
||||
Reference in New Issue
Block a user