From a59eaff87ec3ea8f08a09f489ba10d79138d157a Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 1 Aug 2020 21:01:48 -0700 Subject: [PATCH 1/5] fix --- code/datums/explosion.dm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index dc32902e5e..aa517eae6e 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -196,14 +196,12 @@ GLOBAL_LIST_EMPTY(explosions) //------- EX_ACT AND TURF FIRES ------- - if(T == epicenter) // Ensures explosives detonating from bags trigger other explosives in that bag - var/list/items = list() - for(var/I in T) - var/atom/A = I - if (!(A.flags_1 & PREVENT_CONTENTS_EXPLOSION_1)) //The atom/contents_explosion() proc returns null if the contents ex_acting has been handled by the atom, and TRUE if it hasn't. - items += A.GetAllContents() - for(var/O in items) - var/atom/A = O + if((T == epicenter) && !QDELETED(explosion_source) && (explosion_source.loc == T)) // Ensures explosives detonating from bags trigger other explosives in that bag + var/list/atoms = list() + for(var/atom/A in explosion_source.loc) + atoms += A + for(var/i in atoms) + var/atom/A = i if(!QDELETED(A)) A.ex_act(dist) From 97c8b756ada604113ceb3ef5671e80607cd022a8 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 1 Aug 2020 21:04:16 -0700 Subject: [PATCH 2/5] Update explosion.dm --- code/datums/explosion.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index aa517eae6e..f89d99263f 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -196,7 +196,7 @@ GLOBAL_LIST_EMPTY(explosions) //------- EX_ACT AND TURF FIRES ------- - if((T == epicenter) && !QDELETED(explosion_source) && (explosion_source.loc == T)) // Ensures explosives detonating from bags trigger other explosives in that bag + if((T == epicenter) && !QDELETED(explosion_source) && (get_turf(explosion_source) == T)) // Ensures explosives detonating from bags trigger other explosives in that bag var/list/atoms = list() for(var/atom/A in explosion_source.loc) atoms += A From fdbf488d693e7426608335683b6cafa5475e6d2c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 2 Aug 2020 00:29:47 -0700 Subject: [PATCH 3/5] Update explosion.dm --- code/datums/explosion.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index f89d99263f..197d5f4c7d 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -198,7 +198,8 @@ GLOBAL_LIST_EMPTY(explosions) if((T == epicenter) && !QDELETED(explosion_source) && (get_turf(explosion_source) == T)) // Ensures explosives detonating from bags trigger other explosives in that bag var/list/atoms = list() - for(var/atom/A in explosion_source.loc) + var/turf/T = get_turf(explosion_source) // yeah this is two get turfs but this should only happen once + for(var/atom/A in T) atoms += A for(var/i in atoms) var/atom/A = i From 591f824bdee00400a99b9c2a7a215389cb6d576d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 2 Aug 2020 00:32:58 -0700 Subject: [PATCH 4/5] Update explosion.dm --- code/datums/explosion.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index 197d5f4c7d..1003150945 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -198,8 +198,8 @@ GLOBAL_LIST_EMPTY(explosions) if((T == epicenter) && !QDELETED(explosion_source) && (get_turf(explosion_source) == T)) // Ensures explosives detonating from bags trigger other explosives in that bag var/list/atoms = list() - var/turf/T = get_turf(explosion_source) // yeah this is two get turfs but this should only happen once - for(var/atom/A in T) + var/turf/the_source_turf = get_turf(explosion_source) // yeah this is two get turfs but this should only happen once + for(var/atom/A in the_source_turf) atoms += A for(var/i in atoms) var/atom/A = i From 75641d922e706930060ef03a45cb70a0ad2d85ef Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 3 Aug 2020 13:02:25 -0700 Subject: [PATCH 5/5] this'll probably be better --- code/datums/explosion.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index 1003150945..dc9569a4d5 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -196,10 +196,9 @@ GLOBAL_LIST_EMPTY(explosions) //------- EX_ACT AND TURF FIRES ------- - if((T == epicenter) && !QDELETED(explosion_source) && (get_turf(explosion_source) == T)) // Ensures explosives detonating from bags trigger other explosives in that bag + if((T == epicenter) && !QDELETED(explosion_source) && ismovable(explosion_source) && (get_turf(explosion_source) == T)) // Ensures explosives detonating from bags trigger other explosives in that bag var/list/atoms = list() - var/turf/the_source_turf = get_turf(explosion_source) // yeah this is two get turfs but this should only happen once - for(var/atom/A in the_source_turf) + for(var/atom/A in explosion_source.loc) // the ismovableatom check 2 lines above makes sure we don't nuke an /area atoms += A for(var/i in atoms) var/atom/A = i