From 6e7a810c5df9a4d6658548bc75b065a7d671b756 Mon Sep 17 00:00:00 2001 From: hyyda Date: Fri, 10 Jan 2025 23:48:23 +0300 Subject: [PATCH 01/12] Update backpack.dm --- code/game/objects/items/weapons/storage/backpack.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 33306dd50afe..9954b77afc88 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -46,7 +46,8 @@ desc = "A backpack that opens into a localized pocket of Blue Space." origin_tech = "bluespace=4" icon_state = "holdingpack" - max_w_class = SIZE_NORMAL + w_class = SIZE_HUMAN + max_w_class = SIZE_HUMAN max_storage_space = 56 /obj/item/weapon/storage/backpack/holding/attackby(obj/item/I, mob/user, params) From afda9a8af8dbefc58bb26fc885c91f2b2c18626b Mon Sep 17 00:00:00 2001 From: hyyda Date: Sat, 11 Jan 2025 03:26:02 +0300 Subject: [PATCH 02/12] Update backpack.dm --- .../objects/items/weapons/storage/backpack.dm | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 9954b77afc88..e7f02000cd9f 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -58,10 +58,44 @@ if(istype(I, /obj/item/weapon/storage/backpack/holding) && !I.crit_fail) to_chat(user, "The Bluespace interfaces of the two devices conflict and malfunction.") qdel(I) + var/obj/effect/anomaly/grav/grav_anomaly = new /obj/effect/anomaly/grav(src.loc) + + to_chat(user, "A gravitational anomaly appears as the Bluespace interfaces destabilize!") + + grav_anomaly.anomalyEffect() + + START_PROCESSING(SSobj, grav_anomaly) + return return ..() +//Дальше костыли для движения аномалии, притягивания и отталкивания, если есть идеи как оптимизировать или это все вообще фигня по другому надо было сообщите + +/obj/effect/anomaly/grav/anomalyEffect() + boing = 1 + for(var/obj/O in orange(4, src)) + if(!O.anchored) + step_towards(O, src) + + for(var/mob/living/M in orange(4, src)) + step_towards(M, src) + + move_anomaly() + + while(TRUE) + sleep(20) + boing = 1 + for(var/obj/O in orange(4, src)) + if(!O.anchored) + step_towards(O, src) + for(var/mob/living/M in orange(4, src)) + step_towards(M, src) + sleep(50) + move_anomaly() + + return + /obj/item/weapon/storage/backpack/holding/proc/failcheck(mob/user) if (prob(src.reliability)) return 1 //No failure From ad941bcc09109cd0b6a0a264b3d6619e96a6d375 Mon Sep 17 00:00:00 2001 From: hyyda Date: Sat, 11 Jan 2025 23:04:05 +0300 Subject: [PATCH 03/12] Update backpack.dm --- .../objects/items/weapons/storage/backpack.dm | 73 +++++++++---------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index e7f02000cd9f..234fa02fa310 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -28,6 +28,9 @@ S.opened = !S.opened /obj/item/weapon/storage/backpack/attackby(obj/item/I, mob/user, params) + if(I == src) + to_chat(user, "Не получается.") + return if(length(use_sound)) playsound(src, pick(use_sound), VOL_EFFECTS_MASTER, null, FALSE, null, -5) return ..() @@ -46,55 +49,51 @@ desc = "A backpack that opens into a localized pocket of Blue Space." origin_tech = "bluespace=4" icon_state = "holdingpack" - w_class = SIZE_HUMAN - max_w_class = SIZE_HUMAN + max_w_class = SIZE_NORMAL max_storage_space = 56 + var/global/IsHoldingMalfunction = FALSE + /obj/item/weapon/storage/backpack/holding/attackby(obj/item/I, mob/user, params) + . = ..() + if(crit_fail) to_chat(user, "The Bluespace generator isn't working.") return - - if(istype(I, /obj/item/weapon/storage/backpack/holding) && !I.crit_fail) + if(istype(I, /obj/item/weapon/storage/backpack/holding) && !I.crit_fail && !(I == src)) to_chat(user, "The Bluespace interfaces of the two devices conflict and malfunction.") qdel(I) - var/obj/effect/anomaly/grav/grav_anomaly = new /obj/effect/anomaly/grav(src.loc) + if(!IsHoldingMalfunction) + Make_Anomaly(60 SECONDS, /obj/effect/anomaly/grav) + return . - to_chat(user, "A gravitational anomaly appears as the Bluespace interfaces destabilize!") - - grav_anomaly.anomalyEffect() - - START_PROCESSING(SSobj, grav_anomaly) +/obj/item/weapon/storage/backpack/holding/handle_item_insertion(obj/item/W, prevent_warning = FALSE, NoUpdate = FALSE) + . = ..() + if(W == src) + Destroy() // каким-то образом удаляет экшен меню при попытке воспроизвести баг и фиксит его + to_chat(usr, "The Bluespace interfaces of the two devices conflict and malfunction.") + Make_Anomaly(60 SECONDS, /obj/effect/anomaly/grav) return + if(istype(W, /obj/item/weapon/storage/backpack/holding/) && !IsHoldingMalfunction && !(W == src)) + to_chat(usr, "The Bluespace interfaces of the two devices conflict and malfunction.") + Make_Anomaly(60 SECONDS, /obj/effect/anomaly/grav) + return - return ..() - -//Дальше костыли для движения аномалии, притягивания и отталкивания, если есть идеи как оптимизировать или это все вообще фигня по другому надо было сообщите - -/obj/effect/anomaly/grav/anomalyEffect() - boing = 1 - for(var/obj/O in orange(4, src)) - if(!O.anchored) - step_towards(O, src) - - for(var/mob/living/M in orange(4, src)) - step_towards(M, src) - - move_anomaly() - - while(TRUE) - sleep(20) - boing = 1 - for(var/obj/O in orange(4, src)) - if(!O.anchored) - step_towards(O, src) - for(var/mob/living/M in orange(4, src)) - step_towards(M, src) - sleep(50) - move_anomaly() - - return +/obj/item/weapon/storage/backpack/holding/proc/Make_Anomaly(delay_time, current_anomaly) + var/turf/targloc = get_turf(src) + var/obj/effect/anomaly/anomaly = new current_anomaly(targloc) + IsHoldingMalfunction = TRUE + sleep(delay_time) + anomaly.Destroy() + Adjust_Malfunction_Global_Timer() + +/obj/item/weapon/storage/backpack/holding/proc/Adjust_Malfunction_Global_Timer() + var/timer = 30 MINUTES + for(timer) + timer -= 1 SECOND + if(!timer) + IsHoldingMalfunction = FALSE /obj/item/weapon/storage/backpack/holding/proc/failcheck(mob/user) if (prob(src.reliability)) From 7b044b530b69224b4677b6f0f1799c8590b2a986 Mon Sep 17 00:00:00 2001 From: hyyda Date: Sat, 11 Jan 2025 23:05:36 +0300 Subject: [PATCH 04/12] Update anomalies.dm --- code/game/objects/effects/anomalies.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index dbd45ed114a4..f1b7863b1ca4 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -85,11 +85,18 @@ warp = new(src) vis_contents += warp + START_PROCESSING(SSobj, src) + anomalyEffect() + /obj/effect/anomaly/grav/Destroy() vis_contents -= warp + STOP_PROCESSING(SSobj, src) QDEL_NULL(warp) return ..() +/obj/effect/anomaly/grav/process() // Спасибо ДаркВотеру + anomalyEffect() + /obj/effect/anomaly/grav/anomalyEffect() ..() From 52d1fd990168318a8fdfdf84a5ef4467f422428e Mon Sep 17 00:00:00 2001 From: hyyda Date: Sat, 11 Jan 2025 23:09:30 +0300 Subject: [PATCH 05/12] Update backpack.dm --- code/game/objects/items/weapons/storage/backpack.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 234fa02fa310..2e382877bf9c 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -71,8 +71,7 @@ . = ..() if(W == src) Destroy() // каким-то образом удаляет экшен меню при попытке воспроизвести баг и фиксит его - to_chat(usr, "The Bluespace interfaces of the two devices conflict and malfunction.") - Make_Anomaly(60 SECONDS, /obj/effect/anomaly/grav) + to_chat(usr, "Рюкзак засасывается сам в себя и исчезает.") return if(istype(W, /obj/item/weapon/storage/backpack/holding/) && !IsHoldingMalfunction && !(W == src)) From f0e0b0f02115421cc1b5f06916587c95bc76182b Mon Sep 17 00:00:00 2001 From: hyyda Date: Sat, 11 Jan 2025 23:35:33 +0300 Subject: [PATCH 06/12] Update backpack.dm --- code/game/objects/items/weapons/storage/backpack.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 2e382877bf9c..d0de076d4abf 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -64,7 +64,7 @@ to_chat(user, "The Bluespace interfaces of the two devices conflict and malfunction.") qdel(I) if(!IsHoldingMalfunction) - Make_Anomaly(60 SECONDS, /obj/effect/anomaly/grav) + Make_Anomaly(150 SECONDS, /obj/effect/anomaly/grav) return . /obj/item/weapon/storage/backpack/holding/handle_item_insertion(obj/item/W, prevent_warning = FALSE, NoUpdate = FALSE) @@ -72,11 +72,10 @@ if(W == src) Destroy() // каким-то образом удаляет экшен меню при попытке воспроизвести баг и фиксит его to_chat(usr, "Рюкзак засасывается сам в себя и исчезает.") - return if(istype(W, /obj/item/weapon/storage/backpack/holding/) && !IsHoldingMalfunction && !(W == src)) to_chat(usr, "The Bluespace interfaces of the two devices conflict and malfunction.") - Make_Anomaly(60 SECONDS, /obj/effect/anomaly/grav) + Make_Anomaly(150 SECONDS, /obj/effect/anomaly/grav) return /obj/item/weapon/storage/backpack/holding/proc/Make_Anomaly(delay_time, current_anomaly) From c8c09d5c2dde3e38e123dc62dd7b888f53c0850e Mon Sep 17 00:00:00 2001 From: hyyda Date: Sun, 12 Jan 2025 03:03:54 +0300 Subject: [PATCH 07/12] Update backpack.dm --- .../objects/items/weapons/storage/backpack.dm | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index d0de076d4abf..17f70dcf3f64 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -28,9 +28,6 @@ S.opened = !S.opened /obj/item/weapon/storage/backpack/attackby(obj/item/I, mob/user, params) - if(I == src) - to_chat(user, "Не получается.") - return if(length(use_sound)) playsound(src, pick(use_sound), VOL_EFFECTS_MASTER, null, FALSE, null, -5) return ..() @@ -52,46 +49,36 @@ max_w_class = SIZE_NORMAL max_storage_space = 56 - var/global/IsHoldingMalfunction = FALSE - /obj/item/weapon/storage/backpack/holding/attackby(obj/item/I, mob/user, params) - . = ..() - if(crit_fail) to_chat(user, "The Bluespace generator isn't working.") return + if(istype(I, /obj/item/weapon/storage/backpack/holding) && !I.crit_fail && !(I == src)) to_chat(user, "The Bluespace interfaces of the two devices conflict and malfunction.") qdel(I) - if(!IsHoldingMalfunction) - Make_Anomaly(150 SECONDS, /obj/effect/anomaly/grav) - return . + Make_Anomaly(150 SECONDS, /obj/effect/anomaly/bhole) + + return ..() /obj/item/weapon/storage/backpack/holding/handle_item_insertion(obj/item/W, prevent_warning = FALSE, NoUpdate = FALSE) . = ..() if(W == src) - Destroy() // каким-то образом удаляет экшен меню при попытке воспроизвести баг и фиксит его + Destroy(W) // in my opinion, it is most effective to remove an object with a total cut of its action menu, because in addition to this action, qdel occurs to_chat(usr, "Рюкзак засасывается сам в себя и исчезает.") - return - if(istype(W, /obj/item/weapon/storage/backpack/holding/) && !IsHoldingMalfunction && !(W == src)) + return FALSE + if(istype(W, /obj/item/weapon/storage/backpack/holding)) to_chat(usr, "The Bluespace interfaces of the two devices conflict and malfunction.") - Make_Anomaly(150 SECONDS, /obj/effect/anomaly/grav) - return + Make_Anomaly(150 SECONDS, /obj/effect/anomaly/bhole) + return FALSE + return TRUE /obj/item/weapon/storage/backpack/holding/proc/Make_Anomaly(delay_time, current_anomaly) var/turf/targloc = get_turf(src) var/obj/effect/anomaly/anomaly = new current_anomaly(targloc) - IsHoldingMalfunction = TRUE + anomaly.anomalyEffect() sleep(delay_time) - anomaly.Destroy() - Adjust_Malfunction_Global_Timer() - -/obj/item/weapon/storage/backpack/holding/proc/Adjust_Malfunction_Global_Timer() - var/timer = 30 MINUTES - for(timer) - timer -= 1 SECOND - if(!timer) - IsHoldingMalfunction = FALSE + qdel(anomaly) /obj/item/weapon/storage/backpack/holding/proc/failcheck(mob/user) if (prob(src.reliability)) From 851a1e6ef803c51b9759325ee011a047cde99e7f Mon Sep 17 00:00:00 2001 From: hyyda Date: Sun, 12 Jan 2025 03:08:46 +0300 Subject: [PATCH 08/12] Update backpack.dm --- code/game/objects/items/weapons/storage/backpack.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 17f70dcf3f64..67d8d00a2bab 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -78,7 +78,7 @@ var/obj/effect/anomaly/anomaly = new current_anomaly(targloc) anomaly.anomalyEffect() sleep(delay_time) - qdel(anomaly) + qdel(current_anomaly) /obj/item/weapon/storage/backpack/holding/proc/failcheck(mob/user) if (prob(src.reliability)) From b3a5bca8473e58b8425edd7fe57f119adc21c440 Mon Sep 17 00:00:00 2001 From: hyyda Date: Sun, 12 Jan 2025 03:11:12 +0300 Subject: [PATCH 09/12] Update anomalies.dm --- code/game/objects/effects/anomalies.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index f1b7863b1ca4..cf64d5722b95 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -182,6 +182,12 @@ /obj/effect/anomaly/bhole/atom_init() . = ..() aSignal.origin_tech = "materials=8;combat=4;engineering=4" + + START_PROCESSING(SSobj, src) + anomalyEffect() + +/obj/effect/anomaly/bhole/process() // Thanks to DarkWater + anomalyEffect() /obj/effect/anomaly/bhole/anomalyEffect() ..() From e573fb640cd3adf93a1e57d8b0bbd4598b598281 Mon Sep 17 00:00:00 2001 From: hyyda Date: Sun, 12 Jan 2025 03:15:20 +0300 Subject: [PATCH 10/12] Update anomalies.dm --- code/game/objects/effects/anomalies.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index cf64d5722b95..d926fed32002 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -94,7 +94,7 @@ QDEL_NULL(warp) return ..() -/obj/effect/anomaly/grav/process() // Спасибо ДаркВотеру +/obj/effect/anomaly/grav/process() // Thanks to DarkWater anomalyEffect() /obj/effect/anomaly/grav/anomalyEffect() From 31ad7eca115c132fc8d1b5b3324bd9a0a65a76ef Mon Sep 17 00:00:00 2001 From: hyyda Date: Sun, 12 Jan 2025 14:29:26 +0300 Subject: [PATCH 11/12] Update backpack.dm --- code/game/objects/items/weapons/storage/backpack.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 67d8d00a2bab..bd214130c7a6 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -57,7 +57,7 @@ if(istype(I, /obj/item/weapon/storage/backpack/holding) && !I.crit_fail && !(I == src)) to_chat(user, "The Bluespace interfaces of the two devices conflict and malfunction.") qdel(I) - Make_Anomaly(150 SECONDS, /obj/effect/anomaly/bhole) + Make_Anomaly(50 SECONDS, /obj/effect/anomaly/bhole) return ..() @@ -69,7 +69,6 @@ return FALSE if(istype(W, /obj/item/weapon/storage/backpack/holding)) to_chat(usr, "The Bluespace interfaces of the two devices conflict and malfunction.") - Make_Anomaly(150 SECONDS, /obj/effect/anomaly/bhole) return FALSE return TRUE @@ -78,8 +77,8 @@ var/obj/effect/anomaly/anomaly = new current_anomaly(targloc) anomaly.anomalyEffect() sleep(delay_time) - qdel(current_anomaly) - + anomaly.Destroy() + /obj/item/weapon/storage/backpack/holding/proc/failcheck(mob/user) if (prob(src.reliability)) return 1 //No failure From 66493c679b5d7864f3d6f77f55fc957599c8c1a6 Mon Sep 17 00:00:00 2001 From: hyyda Date: Sun, 12 Jan 2025 14:30:22 +0300 Subject: [PATCH 12/12] Update anomalies.dm --- code/game/objects/effects/anomalies.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index d926fed32002..38ce35ac0f72 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -182,12 +182,17 @@ /obj/effect/anomaly/bhole/atom_init() . = ..() aSignal.origin_tech = "materials=8;combat=4;engineering=4" - + START_PROCESSING(SSobj, src) anomalyEffect() /obj/effect/anomaly/bhole/process() // Thanks to DarkWater anomalyEffect() + +/obj/effect/anomaly/bhole/Destroy() + STOP_PROCESSING(SSobj, src) + anomalyNeutralize() + return ..() /obj/effect/anomaly/bhole/anomalyEffect() ..()