obj
Crystal_Computer
icon='Crystal Computer.dmi'
density = 1
Click()
winshow(usr,"CraftTable",1)
verb
Creation()
set src in view(2)
set hidden = 1
winshow(usr,"CraftTable",0)
switch(input("What would you like to do?")in list("Create Storm Crystal","Create Scorch Crystal","Create Steam Crystal","Create Blaze Crystal","Create Healing Crystal","Create Ice Crystal","Create Demon's Eye Crystal",,"Create Banishing Crystal","Create Binding Crystal","Create Summoning Crystal","Cancel"))
if("Create Storm Crystal")
usr.CreateStorm()
if("Create Scorch Crystal")
usr.CreateScorch()
if("Create Steam Crystal")
usr.CreateSteam()
if("Create Blaze Crystal")
usr.CreateBlaze()
if("Create Healing Crystal")
usr.CreateHealing()
if("Create Ice Crystal")
usr.CreateIce()
if("Create Demon's Eye Crystal")
usr.CreateDemonEye()
mob
proc
CreateStorm()
if(locate(/obj/items/crystal/Wind_Crystal,usr.contents))
usr<< "You gently place the volatile wind crystal into the machine, a great burst of wind is shot out of the opening at to the right, causing your hair to blow backwards and your looser clothing to billow madly."
sleep(50)
if(!locate(/obj/items/crystal/Lightning_Crystal,usr.contents))
usr<<"Ha! I mean...Such a sad turn of events, you don't have the needed crystals...Maybe you should find the recipe for it first..."
if(locate(/obj/items/crystal/Lightning_Crystal,usr.contents))
usr<< "You stick the lightning crystal into the second receptacle, the machine begins to bounce and rock madly as an electrical surge bursts through it."
sleep(60)
usr<<"The sky begins to darken as storm clouds roll in. Lightning flashes and thunder rolls in. A powerful storm brews...The Storm Crystal has been created. It pops out of the machine and to the ground. Be careful with this..."
view()<<'thunder1.ogg'
view()<<"A storm has appeared over the surrounding area...."
for(var/obj/items/crystal/Wind_Crystal/A in usr.contents)
del A
for(var/obj/items/crystal/Lightning_Crystal/B in usr.contents)
del B
new /obj/items/crystal/Storm_Crystal
usr.contents+= new /obj/items/crystal/Storm_Crystal
else
usr<<"You are missing one or more crystals."
// This is the current Crystal Creation System, the rest of the procs have been completed
Problem description:
Bit of Background:
I've been working on creating a new fantasy game and whatnot, I've been attempting to learn DM for the past three years or so but I never really got -super- into it so It's been kind hard going but yeah or whatever. Barring that, I've been lately trying to get a crafting system together. In game I've created a system for putting multiple crystals together and making another, more powerful, crystal.
I'm currently using the same system for herblore and mining and tailoring as well but, my problem is, if you have multiples of an object in your inventory it will delete every single instance of it upon completion. I wanted it to not do this, obviously that's a bit of an issue.
I've tried a few things. The first being, making another window and adding grids into it. I did that successfully BUT my issue with that was, I couldn't get the MouseDrag() and MouseDrop() procs to work correctly because quite frankly I didn't understand how to use them.
So now I've moved on to attempting to make temporary lists upon the activation of the Crafting system BUT I cannot quite get that to work either. I don't want to use lists in order to do it, I'd much rather use a grid in a window but, as stated, I can't figure that out.
I've read through several tutorials and so far I haven't been able to understand them in the way that I really would like to.
So, my question is: How does one configure MouseDrag() and MouseDrop() to put an object within a grid on another window and How would you then check to see what's in the grid in order to activate the system.
I initially thought that I would need to move the object to a list and then have the list's contents output to the grid but I don't know how to do that.
Also try using src in mob/proc not usr.
[EDIT] You'll need to remove those for()'s as they loop through every single /obj/items/crystal/Lightning_Crystal/ in the user and that's why you are removing all of them.