feat: add persistent storage

This commit is contained in:
Anna 2021-03-06 20:19:39 -05:00
parent 8b25c4fd9c
commit 19475c6573
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
namespace DalamudPython {
@ -17,6 +16,7 @@ namespace DalamudPython {
private Plugin Plugin { get; }
private string? Script { get; set; }
private Dictionary<object, object> Store { get; } = new();
public Commands(Plugin plugin) {
this.Plugin = plugin;
@ -67,6 +67,7 @@ namespace DalamudPython {
private void Execute(string script, bool print) {
var scope = this.Plugin.Engine.CreateScope();
scope.SetVariable("interface", this.Plugin.Interface);
scope.SetVariable("store", this.Store);
var fullScript = $@"import clr
from Dalamud import *
from Dalamud.Plugin import *