mob/proc
custobj(var/objname)
custom_obj[objname]=new()
custom_obj[objname.icon]=input("What icon do you want?")as icon
custom_obj[objname.icon_state]=input("What icon state should it have?")
custom_obj[objname.name]=input("What do you want to name this object?")
custom_obj[objname.density]=input("What should the density be?") in list(0,1)
custom_obj[objname.opacity]=input("What should the opacity be?") in list(0,1)
objinit = 1
mob
var
custom_obj[obj/]
obj/selectedcustom
verb
Define_Custom_Object()
set category = "Build"
custobj(var/objnum = input("What is this object going to be called in the object list?"))
Custom_Object()
set category = "Build"
if(objinit == 0)
custobj(var/objnum = input("What is this object going to be called in the object list?"))
else
var/obj/o=new(src.loc)
o.name=selectedcustom.name
o.icon=selectedcustom.icon
o.icon_state=selectedcustom.icon_state
o.density=selectedcustom.density
o.opacity=selectedcustom.opacity
o.Owner=src.key
o.Move(src.loc)
Select_Custom_Object
set category = "Build"
selectedcustom = input("Which Object?") in list custom_object
Problem description:
I have no idea what I'm doing at this point. I'm trying to make a dynamic custom object system so a player can have any amount of custom objects as they please. Unfortunately, lists are being satanic to me and I have MORE than enough errors. If anyone cares to tackle this code monster I would appreciate it.
The immediate error i get is this : custom_object: expected end of statement
if I delete the Select custom object verb it tells me that None of the vars in the custom_object list have been initialized.
in custom_object
Not
in list custom_object