world.aedit_hash = { "name" => :@name,
"description" => :@description,
"vnum" => :@vnum
}
world.oedit_hash = { "vnum" => :@vnum,
"name" => :@name,
"description" => :@description
}
hp4000 ap1350 mp2000>olcnew obj standard issue cloak
O-Edit
name: standard.issue.cloak
description:
vnum: shire/obj/standard.issue.cloak
hp4000 ap1350 mp2000>descr this is a standard cloak!
Set description to: this is a standard cloak!
hp4000 ap1350 mp2000>
O-edit
name: standard.issue.cloak
description: this is a standard cloak!
vnum: shire/obj/standard.issue.cloak
hp4000 ap1350 mp2000>done
Exited O-edit mode
hp4000 ap1350 mp2000>olcnew area midgaard
A-Edit
name: midgaard
description:
vnum: area/midgaard
hp4000 ap1350 mp2000>descr Diku standard Midgaard
Set description to: Diku standard Midgaard
hp4000 ap1350 mp2000>
A-Edit
name: midgaard
description: Diku standard Midgaard
vnum: area/midgaard
hp4000 ap1350 mp2000>save
midgaard Saved.
hp4000 ap1350 mp2000>
obj.is_a?(Type)
I came up with this in like 5 minutes, sometimes the best solution is the simplest:
So, you can create a editor mode for each object you want to edit.
This way, you can add as many fields as you want without having to add any code.
BTW, I Mixin the Olc module to my Descriptor class.