[SUGGESTION] Room constants

Started by Crimson Wizard, Mon 15/03/2010 21:27:23

Previous topic - Next topic

Crimson Wizard

I have a suggestion to make AGS create constants for rooms which would store room ID's, as it does for characters. I have a feeling it would be nicer to use them instead of plain numbers in such functions as ChangeRoom, or when checking character.Room property.

Pumaman

Yes, I agree. This is something I've been meaning to do for a long time, it will be added at some point.

monkey0506

If you're talking about the constants like EGO it's really just a macro definition..which you could do for yourself pretty easily such as:

Code: ags
#define HALLWAY 1
#define BEDROOM 2
#define KITCHEN 3
#define BATHROOM 4


I'm not entirely sure if that's what you meant though.

If it is, I'd actually just use an enumeration instead:

Code: ags
enum RoomName {
  eRoomHallway = 1,
  eRoomBedroom = 2,
  eRoomKitchen = 3,
  eRoomBathroom = 4
};

Crimson Wizard

#3
Hey monkey, are you kidding me? You seriously thought I woudn't guess that?  :P

To make it clear: ofcourse there's a lot of stuff that could be done by user. What I propose is to make user's life easier.

monkey0506

Well it's also the burden of the user to understand that suggestions must be prioritized. Something the user can simply and easily do themselves in literally about 5 seconds is not high-priority for implementation IMO. :P

subspark

Still, it's good to know it was already on CJ's to-do list. It will of course make a nice feature addition to AGS.
It makes sense to try and unify the way this kind of data is handled anyway.

Cheers,
Sparky.

monkey0506

I'm not saying it's a bad idea, I'm just saying there are a slew of other things which would be a load more useful, and thereby be a better usage of CJ's time overall.

Ultimately yes, it would be nice to get rid of all arbitrary numerical values in scripts, replacing them with meaningful entities instead. As I said though, I would rate it as a being very low priority.

Crimson Wizard

#7
Um, unfortunately I don't have a list of all suggestions in mind atm, and also it is not always obvious how much time this or that feature will take to be implemented; so I must disagree, I don't think user should prioritize suggestions, it's developer's work, and here I am simply throwing in proposal in the suggestions pool, without considering its priority or implementation date  ::)

But, actually I responded above mainly to imply that there's no need to explain those simple things to me.  ;)

subspark

Relax fellas. ;)  It's just a suggestion and it has already been agreed to. Let Chris handle it from here.
In the meantime Crimson, Monkey's suggestion is a good one. But your suggestion has a logical home inside AGS.

Share the love people :=

Cheers,
Sparky.

CShelton


Quote from: Crimson Wizard on Fri 19/03/2010 00:01:30
But, actually I responded above mainly to imply that there's no need to explain those simple things to me.  ;)

Please keep in mind that although you know all about constants and enums, the rest of us might not. I'm on both of your sides, arbitrary numbers should be done away with at some point, but I'm certainly happy to have workarounds posted until those changes are implemented.

Crimson Wizard

Okay, okay, I agree, sorry, I am being an arrogant asshole again  :)

SMF spam blocked by CleanTalk