Command
newroom
format = "'new'; anything; anything"
Process(mob/user, Type, Name)
if(Type == "mob")
var/mobile/M = new(Name,"Null")
user << "Mob [M.number] Created:[Name]"
M.loc = user.loc
if(Type == "room")
var/room/R = new(Name,"Null")
user << "Room [R.number] Created:[Name]"
redit
format = "'redit'; anything; anything; anything"
Process(mob/user, Type, Name, NewName)
Type = text2num(Type)
EditRoomName(Type, Name, NewName)
This is my creating and editing commands.
GetRoomByName(RoomName)
for(var/room/R in rooms)
if(cmptext(R.name, RoomName))
return R
EditRoomName(Type, Name, NewName) // ID needs to be a number
var/room/R = GetRoomByName(Name) // find the room
switch(Type)
if(1)
if(R) R.name = NewName
if(2)
if(R) R.desc = NewName
This is my proc behind my creation and editing rooms.
room
var
name
desc
number
north
south
east
west
New(n,d)
name = n
desc = d
rooms += src
number = rooms.len
This is how I set my room up.
So I'm hoping this is enough infomation for someone to help me.