Author Topic: Disable mapping by room  (Read 1905 times)

Offline hells

  • Acquaintance
  • *
  • Posts: 11
    • View Profile
Disable mapping by room
« on: March 17, 2012, 06:27:53 am »
I wanted to disable mapping in a few rooms that were covered in mist. I made a couple small changes to do this.


line 63:
Code: [Select]
            if(this_object()->GetProperty("minimapping") && !env->GetProperty("disablemapping")){
                desc += simple_map(env)+"\n";

line 87:
Code: [Select]
        if(i == VISION_CLEAR || i == VISION_LIGHT || i == VISION_DIM){
            desc = env->GetShort();
            if(this_object()->GetProperty("minimapping") && !env->GetProperty("disablemapping"))
                    desc += simple_map(env)+"\n";

This checks a property "disablemapping" to see if it is set to 1. If it is it will disable minimapping for each room it is set. The wizmapping is not affected.


line 12:

Code: [Select]
    if(!creatorp(this_player()) && environment(this_player())->GetProperty("disablemapping")) {
        write("You are unable to see your map.");
    } else {
        ret = MAP_D->GetMap(environment(this_player()), i, 1);

This code will disable viewing maps if you are not a creator and display a message.

This isn't much but I figured it might be helpful if you want to disable viewing of maps for a specific area. Perhaps a one room building or similar since there would be not much value in mapping in those cases.
« Last Edit: March 17, 2012, 06:30:37 am by hells »