From ff6cc1a77792944cca7c3ac5c06c03521f64b82e Mon Sep 17 00:00:00 2001 From: Misa Date: Wed, 27 May 2020 00:03:02 -0700 Subject: [PATCH] De-duplicate say/reply line adding code I found it patently ridiculous that `i++; add(customscript[i]);` was copy-pasted four separate times. Well, at least it's only copy-pasted twice now. --- desktop_version/src/Script.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index 6a1f524c..ffd23668 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -3792,11 +3792,8 @@ void scriptclass::loadcustom(std::string t) break; } int ti=atoi(words[1].c_str()); - if(ti>=0 && ti<=50){ - for(int ti2=0; ti2=0 && ti<=50 ? ti : 1; + for(int ti2=0; ti2=0 && ti<=50){ - for(int ti2=0; ti2=0 && ti<=50 ? ti : 1; + for(int ti2=0; ti2