From: Mircea Kitsune Date: Thu, 27 Oct 2011 21:28:12 +0000 (+0300) Subject: Rename action_object commands to object_action, because that's more correct X-Git-Tag: xonotic-v0.6.0~35^2~18^2~97 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0a4fd5954dd34f07a5b4596b59d61be57c65c273;p=xonotic%2Fxonotic-data.pk3dir.git Rename action_object commands to object_action, because that's more correct --- diff --git a/qcsrc/menu/xonotic/dialog_sandboxtools.c b/qcsrc/menu/xonotic/dialog_sandboxtools.c index 3e6563cc4..bb14f4a1e 100644 --- a/qcsrc/menu/xonotic/dialog_sandboxtools.c +++ b/qcsrc/menu/xonotic/dialog_sandboxtools.c @@ -21,55 +21,55 @@ void XonoticSandboxToolsDialog_fill(entity me) box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved box.maxLength = -127; // negative means encoded length in bytes box.saveImmediately = 1; - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Spawn"), '0 0 0', "sandbox spawn_object $menu_sandbox_spawn_model", 0)); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Remove *"), '0 0 0', "sandbox remove_object", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Spawn"), '0 0 0', "sandbox object_spawn $menu_sandbox_spawn_model", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Remove *"), '0 0 0', "sandbox object_remove", 0)); me.TDempty(me, 0.1); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Copy *"), '0 0 0', "sandbox duplicate_object copy", 0)); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Paste"), '0 0 0', "sandbox duplicate_object paste", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Copy *"), '0 0 0', "sandbox object_duplicate copy", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Paste"), '0 0 0', "sandbox object_duplicate paste", 0)); me.TR(me); me.TD(me, 1, 0.25, e = makeXonoticTextLabel(0, _("Bone:"))); me.TD(me, 1, 1.5, box = makeXonoticInputBox(1, "menu_sandbox_attach_bone")); box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved box.maxLength = -127; // negative means encoded length in bytes box.saveImmediately = 1; - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set * as child"), '0 0 0', "sandbox attach_object get", 0)); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Attach to *"), '0 0 0', "sandbox attach_object set $menu_sandbox_edit_skin", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set * as child"), '0 0 0', "sandbox object_attach get", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Attach to *"), '0 0 0', "sandbox object_attach set $menu_sandbox_edit_skin", 0)); me.TDempty(me, 0.1); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Detach from *"), '0 0 0', "sandbox attach_object remove", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Detach from *"), '0 0 0', "sandbox object_attach remove", 0)); me.TR(me); me.TR(me); me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Visual object properties for *:"))); me.TR(me); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set skin:"), '0 0 0', "sandbox edit_object skin $menu_sandbox_edit_skin", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set skin:"), '0 0 0', "sandbox object_edit skin $menu_sandbox_edit_skin", 0)); me.TD(me, 1, 1.5, e = makeXonoticSlider(0, 99, 1, "menu_sandbox_edit_skin")); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set alpha:"), '0 0 0', "sandbox edit_object alpha $menu_sandbox_edit_alpha", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set alpha:"), '0 0 0', "sandbox object_edit alpha $menu_sandbox_edit_alpha", 0)); me.TD(me, 1, 1.5, e = makeXonoticSlider(0.1, 1, 0.05, "menu_sandbox_edit_alpha")); me.TR(me); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set color main:"), '0 0 0', "sandbox edit_object color_main \"$menu_sandbox_edit_color_main\"", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set color main:"), '0 0 0', "sandbox object_edit color_main \"$menu_sandbox_edit_color_main\"", 0)); me.TD(me, 2, 1.5, e = makeXonoticColorpickerString("menu_sandbox_edit_color_main", "menu_sandbox_edit_color_main")); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set color glow:"), '0 0 0', "sandbox edit_object color_glow \"$menu_sandbox_edit_color_glow\"", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set color glow:"), '0 0 0', "sandbox object_edit color_glow \"$menu_sandbox_edit_color_glow\"", 0)); me.TD(me, 2, 1.5, e = makeXonoticColorpickerString("menu_sandbox_edit_color_glow", "menu_sandbox_edit_color_glow")); me.TR(me); me.TR(me); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set frame:"), '0 0 0', "sandbox edit_object frame $menu_sandbox_edit_frame", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set frame:"), '0 0 0', "sandbox object_edit frame $menu_sandbox_edit_frame", 0)); me.TD(me, 1, 1.5, e = makeXonoticSlider(0, 99, 1, "menu_sandbox_edit_frame")); me.TR(me); me.TR(me); me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Physical object properties for *:"))); me.TR(me); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set material:"), '0 0 0', "sandbox edit_object material $menu_sandbox_edit_material", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set material:"), '0 0 0', "sandbox object_edit material $menu_sandbox_edit_material", 0)); me.TD(me, 1, 1.5, box = makeXonoticInputBox(1, "menu_sandbox_edit_material")); box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved box.maxLength = -127; // negative means encoded length in bytes box.saveImmediately = 1; - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set physics:"), '0 0 0', "sandbox edit_object physics $menu_sandbox_edit_physics", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set physics:"), '0 0 0', "sandbox object_edit physics $menu_sandbox_edit_physics", 0)); me.TD(me, 1, 0.5, e = makeXonoticRadioButton(1, "menu_sandbox_edit_physics", "0", _("Static"))); me.TD(me, 1, 0.5, e = makeXonoticRadioButton(1, "menu_sandbox_edit_physics", "1", _("Movable"))); me.TD(me, 1, 0.5, e = makeXonoticRadioButton(1, "menu_sandbox_edit_physics", "2", _("Physical"))); me.TR(me); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set scale:"), '0 0 0', "sandbox edit_object scale $menu_sandbox_edit_scale", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set scale:"), '0 0 0', "sandbox object_edit scale $menu_sandbox_edit_scale", 0)); me.TD(me, 1, 1.5, e = makeXonoticSlider(0.5, 2, 0.05, "menu_sandbox_edit_scale")); - me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set force:"), '0 0 0', "sandbox edit_object force $menu_sandbox_edit_force", 0)); + me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set force:"), '0 0 0', "sandbox object_edit force $menu_sandbox_edit_force", 0)); me.TD(me, 1, 1.5, e = makeXonoticSlider(0, 10, 0.5, "menu_sandbox_edit_force")); me.TR(me); me.TR(me); diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 82599aae3..4ae4b6f93 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -201,18 +201,18 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) // ---------------- COMMAND: HELP ---------------- case "help": print_to(self, "You can use the following sandbox commands:"); - print_to(self, "^7\"^2spawn_item ^3item^7\" spawns the specified item in front of the player. Only weapons are currently supported"); - print_to(self, "^7\"^2spawn_object ^3models/foo/bar.md3^7\" spawns a new object in front of the player, and gives it the specified model"); - print_to(self, "^7\"^2remove_object^7\" removes the object the player is looking at. Players can only remove their own objects"); - print_to(self, "^7\"^2duplicate_object ^3value^7\" duplicates the object. 'copy' copies the object, 'paste' puts it in front of the player"); - print_to(self, "^7\"^2claim_object^7\" sets the player as the owner of the object, if he has the right to edit it"); - print_to(self, "^7\"^2attach_object ^3property value^7\" attaches one object to another. Players can only attach their own objects"); - print_to(self, "^7Attachment properties for ^2attach_object^7:"); + print_to(self, "^7\"^2item_spawn ^3item^7\" spawns the specified item in front of the player. Only weapons are currently supported"); + print_to(self, "^7\"^2object_spawn ^3models/foo/bar.md3^7\" spawns a new object in front of the player, and gives it the specified model"); + print_to(self, "^7\"^2object_remove^7\" removes the object the player is looking at. Players can only remove their own objects"); + print_to(self, "^7\"^2object_duplicate ^3value^7\" duplicates the object. 'copy' copies the object, 'paste' puts it in front of the player"); + print_to(self, "^7\"^2object_claim^7\" sets the player as the owner of the object, if he has the right to edit it"); + print_to(self, "^7\"^2object_attach ^3property value^7\" attaches one object to another. Players can only attach their own objects"); + print_to(self, "^7Attachment properties for ^2object_attach^7:"); print_to(self, "^3get ^7- selects the object you are facing as the object to be attached"); print_to(self, "^3set value ^7- attaches the previously selected object to the object you are facing, on the specified bone"); print_to(self, "^3remove ^7- detaches all objects from the object you are facing"); - print_to(self, "^7\"^2edit_object ^3property value^7\" edits the given property of the object. Players can only edit their own objects"); - print_to(self, "^7Object properties for ^2edit_object^7:"); + print_to(self, "^7\"^2object_edit ^3property value^7\" edits the given property of the object. Players can only edit their own objects"); + print_to(self, "^7Object properties for ^2object_edit^7:"); print_to(self, "^3skin value ^7- changes the skin of the object"); print_to(self, "^3alpha value ^7- sets object transparency"); print_to(self, "^3colormod \"value_x value_y value_z\" ^7- main object color"); @@ -226,12 +226,12 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) return TRUE; // ---------------- COMMAND: SPAWN ITEM ---------------- - case "spawn_item": + case "item_spawn": // only weapons are currently supported if(cmd_argc < 3) { - print_to(self, "WARNING: Attempted to spawn an item without specifying its type. Please specify the name of your item after the 'spawn_item' command"); + print_to(self, "WARNING: Attempted to spawn an item without specifying its type. Please specify the name of your item after the 'item_spawn' command"); return TRUE; } @@ -255,7 +255,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) return TRUE; // ---------------- COMMAND: SPAWN OBJECT ---------------- - case "spawn_object": + case "object_spawn": if(object_count >= autocvar_g_sandbox_editor_maxobjects) { print_to(self, strcat("WARNING: Cannot spawn any more objects. Up to ^3", ftos(autocvar_g_sandbox_editor_maxobjects), " ^7objects may exist at a time")); @@ -263,7 +263,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) } if(cmd_argc < 3) { - print_to(self, "WARNING: Attempted to spawn an object without specifying a model. Please specify the path to your model file after the 'spawn_object' command"); + print_to(self, "WARNING: Attempted to spawn an object without specifying a model. Please specify the path to your model file after the 'object_spawn' command"); return TRUE; } else if not(fexists(argv(2))) @@ -281,7 +281,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) return TRUE; // ---------------- COMMAND: REMOVE OBJECT ---------------- - case "remove_object": + case "object_remove": e = sandbox_EditObject_Get(); if(e != world) { @@ -295,7 +295,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) return TRUE; // ---------------- COMMAND: DUPLICATE OBJECT ---------------- - case "duplicate_object": + case "object_duplicate": switch(argv(2)) { case "copy": @@ -337,7 +337,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) return TRUE; // ---------------- COMMAND: CLAIM OBJECT ---------------- - case "claim_object": + case "object_claim": if(self.crypto_idfp == "") { print_to(self, "WARNING: You do not have a player UID, and cannot claim objects"); @@ -361,7 +361,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) return TRUE; // ---------------- COMMAND: ATTACH OBJECT ---------------- - case "attach_object": + case "object_attach": switch(argv(2)) { case "get": @@ -408,7 +408,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) return TRUE; // ---------------- COMMAND: EDIT OBJECT ---------------- - case "edit_object": + case "object_edit": if(!argv(2)) { print_to(self, "WARNING: Too few parameters. You must specify a property to edit");