Revert mod

This commit is contained in:
2021-10-12 06:31:39 +11:00
parent e1b0979e6c
commit 48913f8a83
5 changed files with 31 additions and 89 deletions

View File

@ -13,42 +13,11 @@
#Why yes all my code was formerly in one massive file called "script" thats 28k lines long, how could you tell?
#Licensed under the GNU AGPL v3, for more information check snootgame.xyz or the LICENSE file that should have came with this work.
init -3 python:
init -1 python:
# Modding Support variables
# All mod rpy files must run a small init python script
class ModLoader():
def __init__(self):
self.mod_dir = "mods/"
self.mod_menu_access = []
self.mod_id = -1
self.mod_variables = []
def add_mod(self, name, label):
#renpy.random.randint(a, b)
self.mod_menu_access += [{
'Name': name,
'Label': label
}]
self.mod_id += 1
self.mod_variables.append({})
return self.mod_id
# name, filename
def add_image(self, name, filename):
s = str(self.mod_id)+name
renpy.image(s, Image(filename))
self.mod_variables[self.mod_id][name] = s
print(self.mod_variables[self.mod_id])
def add_variable(self, name, default):
self.mod_variables[self.mod_id][name] = default
def get(self, _id):
return self.mod_variables[_id]
mod_loader = ModLoader()
mod_dir = "mods/";
mod_menu_access = [];
init python:
import random