Changes? Yeah, it is based on the version I was using last time. I added iid property and a static counter itype_index in itype.h
[quote=“itype.h”]struct itype
{
static int itype_index;
int iid;
…
itype() {
iid = itype_index++;
…
itype(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2, phase_id pphase,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned ptechniques = 0) {
iid = itype_index++;[/quote]
[hr][hr]
I know, but there are many types other than items. It will be a war on many fronts if those unreleated types all use tile references.
I see even monsters have their unique integer id for the reason it will be easier to write AI code, items, on the other hands use string id which make them easier to mod I guess.
If all of them (terrain, field, traps, monsters, items, etc) are defined in json files and open to modders, it will be more reliable to add a tile entry to the json files. For now I just feel it is more practicable if tiles use a more independent module.