From 34721a55bf4bf6a06c224f58313f6bf9cd9de4a7 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Wed, 15 Feb 2023 13:44:28 +0100 Subject: [PATCH 1/4] Add Coalesce to byond Add Coalesce to byond Now on a branch that didnt randomly explode --- modular_chomp/code/coalesce_ch.dm | 5 +++++ vorestation.dme | 1 + 2 files changed, 6 insertions(+) create mode 100644 modular_chomp/code/coalesce_ch.dm diff --git a/modular_chomp/code/coalesce_ch.dm b/modular_chomp/code/coalesce_ch.dm new file mode 100644 index 0000000000..63b1fa73fd --- /dev/null +++ b/modular_chomp/code/coalesce_ch.dm @@ -0,0 +1,5 @@ +/proc/coalesce(var/args/...) + for (var/arg in args) + if (arg) + return arg + return null \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index 92df4e47d1..6a5d204e80 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -4516,6 +4516,7 @@ #include "maps\submaps\surface_submaps\wilderness\wilderness.dm" #include "maps\submaps\surface_submaps\wilderness\wilderness_areas.dm" #include "maps\~map_system\maps.dm" +#include "modular_chomp\code\coalesce_ch.dm" #include "modular_chomp\code\global.dm" #include "modular_chomp\code\ATMOSPHERICS\atmospherics.dm" #include "modular_chomp\code\datums\autolathe\arms.dm" From 765c999d8b3380f18331795e6f306e9f7453a630 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Wed, 15 Feb 2023 14:23:36 +0100 Subject: [PATCH 2/4] Trying to placate dreamchecker not sure if syntax was really wrong but --- modular_chomp/code/coalesce_ch.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_chomp/code/coalesce_ch.dm b/modular_chomp/code/coalesce_ch.dm index 63b1fa73fd..847397e782 100644 --- a/modular_chomp/code/coalesce_ch.dm +++ b/modular_chomp/code/coalesce_ch.dm @@ -1,4 +1,4 @@ -/proc/coalesce(var/args/...) +/proc/coalesce(args...) for (var/arg in args) if (arg) return arg From 0dd5640739ec4698f93f0108a2bb746d1842c907 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Wed, 15 Feb 2023 14:40:28 +0100 Subject: [PATCH 3/4] Should be fine now? --- modular_chomp/code/coalesce_ch.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_chomp/code/coalesce_ch.dm b/modular_chomp/code/coalesce_ch.dm index 847397e782..cf0d14d3f8 100644 --- a/modular_chomp/code/coalesce_ch.dm +++ b/modular_chomp/code/coalesce_ch.dm @@ -1,4 +1,4 @@ -/proc/coalesce(args...) +/proc/coalesce(...) for (var/arg in args) if (arg) return arg From d3c8fe67758bbd9b6f91b6101cbd177b65a48753 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Wed, 15 Feb 2023 17:18:30 +0100 Subject: [PATCH 4/4] Tabbing indents --- modular_chomp/code/coalesce_ch.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modular_chomp/code/coalesce_ch.dm b/modular_chomp/code/coalesce_ch.dm index cf0d14d3f8..837dcf03f2 100644 --- a/modular_chomp/code/coalesce_ch.dm +++ b/modular_chomp/code/coalesce_ch.dm @@ -1,5 +1,5 @@ /proc/coalesce(...) - for (var/arg in args) - if (arg) - return arg - return null \ No newline at end of file + for (var/arg in args) + if (arg) + return arg + return null \ No newline at end of file