Author Topic: RTB: Server Control Preferences  (Read 711 times)

Why doesn't this work?
Code: [Select]
if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
{
   if(!$RTB::RTBR_ServerControl_Hook)
      exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");

   //Build
   RTB_registerPref("Build On","Trust Levels","TrustLevel::BuildOn","list NONE 0 Build 1 Full 2","Server_TrustLevels",1,0,1);

   //Tools
   RTB_registerPref("Paint Bricks","Trust Levels","TrustLevel::Paint","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("FX Paint Bricks","Trust Levels","TrustLevel::FXPaint","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Print Bricks","Trust Levels","TrustLevel::Print","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Hammer Bricks","Trust Levels","TrustLevel::Hammer","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Wand Bricks","Trust Levels","TrustLevel::Wand","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);

   //Wrench
   RTB_registerPref("View Wrench Bricks","Trust Levels","TrustLevel::Wrench","list NONE 0 Build 1 Full 2","Server_TrustLevels",1,0,1);
   RTB_registerPref("Edit Wrench Collision","Trust Levels","TrustLevel::WrenchCollision","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Edit Wrench Rendering","Trust Levels","TrustLevel::WrenchRendering","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Edit Wrench Raycasting","Trust Levels","TrustLevel::WrenchRaycasting","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Edit Wrench Events","Trust Levels","TrustLevel::WrenchEvents","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);

   //Undo
   RTB_registerPref("Undo Bricks","Trust Levels","TrustLevel::UndoBrick","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Undo Paint","Trust Levels","TrustLevel::UndoPaint","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Undo FX Paint","Trust Levels","TrustLevel::UndoFXPaint","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Undo Print","Trust Levels","TrustLevel::UndoPrint","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);

   //Items
   RTB_registerPref("Pick Up Items","Trust Levels","TrustLevel::ItemPickup","list NONE 0 Build 1 Full 2","Server_TrustLevels",1,0,1);

   //Vehicles
   RTB_registerPref("Drive Vehicle","Trust Levels","TrustLevel::DriveVehicle","list NONE 0 Build 1 Full 2","Server_TrustLevels",2,0,1);
   RTB_registerPref("Ride Vehicle","Trust Levels","TrustLevel::RideVehicle","list NONE 0 Build 1 Full 2","Server_TrustLevels",1,0,1);
   RTB_registerPref("Push Vehicle","Trust Levels","TrustLevel::VehicleTurnover","list NONE 0 Build 1 Full 2","Server_TrustLevels",1,0,1);
}
else
{
   error("Server_TrustLevels: Required mod System_ReturnToBlockland not found!");
}

They show up in the menu just fine, but updating the preferences does nothing - it doesn't show the "had updated..." part.



I set it so you have to the the host to change it (it's a single player server) - would that affect it?
« Last Edit: November 03, 2008, 04:58:47 PM by Space Guy »

I can't find that window :S

But if you suspect it's the Host thats affecting it, why not just change it back to the default and try it again?
If it still doesn't work, then you know it's probably something else.

That does appear to be a bug. I'll take a look and add it to the patch.