Beispiel #1
0
 public string GetDebugString()
 {
     return("ContainerFiller | ID=" + ID + " Name=" + name + " INGREDIENTTYPE=" + thistype + " Color =" + color + " OnConsumeEffect=" +
            onConsumeEffect.PrintString() + " POTENCY=" + potency + " POTION=" + potion + " INGREDIENT=" + ingredient +
            " Gridable=" + (!isGrindable() ? "false" : string.Format("true({0}[{1}])", onGrindProcess.name, onGrindProcess.ID)) +
            " Dryable=" + (!isDryable() ? "false" : string.Format("true({0}[{1}])", onDryProcess.name, onDryProcess.ID)));
 }
Beispiel #2
0
    bool DevCommandAddEffect(string[] parms)
    {
        if (parms.Length != 1)
        {
            DeveloperConsole.instance.writeError("Missing Effect ID or too many parameters.");
            return(false);
        }
        if (!Int32.TryParse(parms[0].Trim(), out int id))
        {
            DeveloperConsole.instance.writeError("Effect ID must be a number.");
            return(false);
        }

        SOEffect s = SOEffect.GetByID(id);

        if (s == null)
        {
            DeveloperConsole.instance.writeError("Unknown Effect ID " + id);
            return(false);
        }
        GameObject charo = gc.GetCharacter();

        if (charo == null)
        {
            DeveloperConsole.instance.writeError("Unable to get player.(1)");
            return(false);
        }
        IEffectable toEffect = charo.GetComponent <IEffectable>();

        if (toEffect == null)
        {
            DeveloperConsole.instance.writeError("Unable to get player.(2)");
            return(false);
        }

        s.onEffect(toEffect, 1);
        DeveloperConsole.instance.writeMessage("Applied effect " + s.PrintString() + " to player");
        return(true);
    }