From b76d4d7c12286926013fb01a38f23bbf98953f7c Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Sun, 2 Feb 2025 12:55:19 -0700 Subject: [PATCH] [MIRROR] Size Changing Apparel Adjusments & Runtime fixes (#10053) Co-authored-by: Cameron Lennox Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- .../machinery/telecomms/telecomunications.dm | 2 + .../weapons/circuitboards/circuitboard.dm | 4 ++ .../clothing/under/miscellaneous_vr.dm | 41 +++++++++---------- code/modules/projectiles/projectile.dm | 3 ++ 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 309dbb5806..09e18dc2cd 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -214,6 +214,8 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() ..() /obj/machinery/telecomms/proc/checkheat() + if(QDELETED(src)) + return // Checks heat from the environment and applies any integrity damage var/datum/gas_mixture/environment = loc.return_air() var/damage_chance = 0 // Percent based chance of applying 1 integrity damage this tick diff --git a/code/game/objects/items/weapons/circuitboards/circuitboard.dm b/code/game/objects/items/weapons/circuitboards/circuitboard.dm index c41184deb5..ba7450b67f 100644 --- a/code/game/objects/items/weapons/circuitboards/circuitboard.dm +++ b/code/game/objects/items/weapons/circuitboards/circuitboard.dm @@ -18,6 +18,10 @@ drop_sound = 'sound/items/drop/device.ogg' pickup_sound = 'sound/items/pickup/device.ogg' +/obj/item/circuitboard/Destroy() + QDEL_NULL(board_type) + return ..() + //Called when the circuitboard is used to contruct a new machine. /obj/item/circuitboard/proc/construct(var/obj/machinery/M) if(istype(M, build_path)) diff --git a/code/modules/clothing/under/miscellaneous_vr.dm b/code/modules/clothing/under/miscellaneous_vr.dm index 05c97578b8..e59914e207 100644 --- a/code/modules/clothing/under/miscellaneous_vr.dm +++ b/code/modules/clothing/under/miscellaneous_vr.dm @@ -78,9 +78,9 @@ var/new_size if(H.has_large_resize_bounds()) - new_size = tgui_input_number(H, "Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM_DORMS * 100, RESIZE_MINIMUM_DORMS * 100) + new_size = tgui_input_number(H, "Put the desired size ([RESIZE_MINIMUM * 100]-[RESIZE_MAXIMUM * 100]%), or ([RESIZE_MINIMUM_DORMS * 100]-[RESIZE_MAXIMUM_DORMS * 100]%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM_DORMS * 100, RESIZE_MINIMUM_DORMS * 100) else - new_size = tgui_input_number(H, "Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM * 100, RESIZE_MINIMUM * 100) + new_size = tgui_input_number(H, "Put the desired size ([RESIZE_MINIMUM * 100]-[RESIZE_MAXIMUM * 100]%), or ([RESIZE_MINIMUM_DORMS * 100]-[RESIZE_MAXIMUM_DORMS * 100]%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM * 100, RESIZE_MINIMUM * 100) if(!new_size) return //cancelled @@ -102,14 +102,11 @@ to_chat(H,span_notice("The safety features of the uniform prevent you from choosing this size.")) return - else if(new_size) - if(new_size != H.size_multiplier) - if(!original_size) - original_size = H.size_multiplier - H.resize(new_size/100, uncapped = H.has_large_resize_bounds(), ignore_prefs = TRUE) // Ignores prefs because you can only resize yourself - H.visible_message(span_warning("The space around [H] distorts as they change size!"),span_notice("The space around you distorts as you change size!")) - else //They chose their current size. - return + if(new_size != H.size_multiplier) + if(!original_size) + original_size = H.size_multiplier + H.resize(new_size/100, uncapped = H.has_large_resize_bounds(), ignore_prefs = TRUE) // Ignores prefs because you can only resize yourself + H.visible_message(span_warning("The space around [H] distorts as they change size!"),span_notice("The space around you distorts as you change size!")) /obj/item/clothing/under/hyperfiber/bluespace/mob_can_unequip(mob/M, slot, disable_warning = 0) . = ..() @@ -227,7 +224,12 @@ to_chat(H, span_warning("You must be WEARING the bracelet and have it uncovered to change your size.")) return - var/new_size = tgui_input_number(user, "Put the desired size you wish to be while wearing the bracelet ([RESIZE_MINIMUM*100]-[RESIZE_MAXIMUM*100]%).", "Set Size", H.size_multiplier*100, RESIZE_MAXIMUM*100, RESIZE_MINIMUM*100) + var/new_size + if(H.has_large_resize_bounds()) + new_size = tgui_input_number(H, "Put the desired size ([RESIZE_MINIMUM * 100]-[RESIZE_MAXIMUM * 100]%), or ([RESIZE_MINIMUM_DORMS * 100]-[RESIZE_MAXIMUM_DORMS * 100]%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM_DORMS * 100, RESIZE_MINIMUM_DORMS * 100) + else + new_size = tgui_input_number(H, "Put the desired size ([RESIZE_MINIMUM * 100]-[RESIZE_MAXIMUM * 100]%), or ([RESIZE_MINIMUM_DORMS * 100]-[RESIZE_MAXIMUM_DORMS * 100]%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM * 100, RESIZE_MINIMUM * 100) + if(!new_size) return @@ -245,16 +247,13 @@ H.update_icons() //Just want the matrix transform return - if(new_size) - if(new_size != H.size_multiplier) - if(!original_size) - original_size = H.size_multiplier - H.resize(new_size/100, ignore_prefs = TRUE) // Ignores prefs because you can only resize yourself - H.visible_message(span_notice("The space around [H] distorts as they change size!"), span_notice("The space around you distorts as you change size!")) - target_size = new_size/100 - last_activated = world.time - else //They chose their current size. - return + if(new_size != H.size_multiplier) + if(!original_size) + original_size = H.size_multiplier + H.resize(new_size/100, ignore_prefs = TRUE) // Ignores prefs because you can only resize yourself + H.visible_message(span_notice("The space around [H] distorts as they change size!"), span_notice("The space around you distorts as you change size!")) + target_size = new_size/100 + last_activated = world.time //Same as Nanotrasen Security Uniforms diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 4ad7341319..bb4e7e7fd4 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -336,6 +336,9 @@ if(isnum(angle)) setAngle(angle) starting = get_turf(src) + if(!starting) + qdel(src) + return if(isnull(Angle)) //Try to resolve through offsets if there's no angle set. if(isnull(xo) || isnull(yo)) stack_trace("WARNING: Projectile [type] deleted due to being unable to resolve a target after angle was null!")