ID:153852
 
I was reviewing the source for Gargantos' Revival.. and I realized the location system is TERRIBLE. Currently this is how it is;

Each mob has a location var. When you travel somewhere, you enter your leaving message (Ex. "steps out of the room"), then the location you want to go (Ex. "the dark forest"). When you use say, only people with the exact same location can hear you. You can go anywhere, from anywhere. I'm thinking of using a regular MUD style room system.

If using a MUD style room system, I should also make the battle system automated. I'm wondering, does anyone have any ideas for the room system and battle system?

Thank you in advance.

-Rcet
Rcet wrote:
I was reviewing the source for Gargantos' Revival.. and I realized the location system is TERRIBLE. Currently this is how it is;

Each mob has a location var. When you travel somewhere, you enter your leaving message (Ex. "steps out of the room"), then the location you want to go (Ex. "the dark forest"). When you use say, only people with the exact same location can hear you. You can go anywhere, from anywhere. I'm thinking of using a regular MUD style room system.

If using a MUD style room system, I should also make the battle system automated. I'm wondering, does anyone have any ideas for the room system and battle system?

The location problems you describe sound like simple areas would solve them.
You can either create areas on your map, or do so on the fly:
var/area/A = new
// set name and such here
...
for(var/turf/T in room_turfs) // just any old list of turfs
A.contents+=T
Then you can add your Entered() and Exited() messages to the area instead of the turfs, and you can use the area contents for Say():
mob/verb/Say(msg as text)
if(!loc) return
if(mute || SpamCheck(msg)) return
var/area/A=loc.loc
A.contents << "<B>[name]:</B> [html_encode(msg)]"

Lummox JR