From 00166f6d3d2e958150989703b4ba912f9dfae926 Mon Sep 17 00:00:00 2001
From: Map <mapmappening@gmail.com>
Date: Tue, 1 Oct 2024 17:16:18 -0500
Subject: [PATCH] move insult layers function into misc_definitions

---
 game/script.rpy               | 10 ----------
 game/src/misc_definitions.rpy | 11 +++++++++++
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/game/script.rpy b/game/script.rpy
index c7dee75..138b3bf 100644
--- a/game/script.rpy
+++ b/game/script.rpy
@@ -21,16 +21,6 @@ init -1 python:
     mod_menu_access = []
 
 init python:
-
-    import random
-    #function for insult layers
-    def showCG():
-        files = ["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9"]
-        length = len(files)
-        picked = random.randint(0,length - 1)
-        fileName = files[picked]
-        renpy.show(fileName, at_list=[randPosition])
-
     # extra music channel so we can do crossfade instead of fadeout followed by fadein
     # TODO: function for stopping both channels with optional fadeout so we don't have to keep track of which channel is playing
     renpy.music.register_channel("music1","music",True,tight=True)
diff --git a/game/src/misc_definitions.rpy b/game/src/misc_definitions.rpy
index ae273d5..5a8d843 100644
--- a/game/src/misc_definitions.rpy
+++ b/game/src/misc_definitions.rpy
@@ -1,3 +1,14 @@
+init python:
+    # function for insult layers
+    import random
+    def showCG():
+        files = ["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9"]
+        length = len(files)
+        picked = random.randint(0,length - 1)
+        fileName = files[picked]
+        renpy.show(fileName, at_list=[randPosition])
+
+
 transform randPosition:
     alpha 0.0
     xalign random.uniform(0.2,0.8)