From 06d40293b1fc27c2342fcf5f205babc2bb4860d0 Mon Sep 17 00:00:00 2001 From: Bukz Date: Sat, 16 Apr 2011 11:24:11 +0000 Subject: [PATCH] pasteent fix, new editing binds, etc. git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6252 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/menus_edit.cfg | 15 +++++++++++---- config/on_quit.cfg | 1 + config/resetbinds.cfg | 4 ++-- config/scripts.cfg | 6 +++++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/config/menus_edit.cfg b/config/menus_edit.cfg index df6a1a4b..ae31a72b 100644 --- a/config/menus_edit.cfg +++ b/config/menus_edit.cfg @@ -11,6 +11,8 @@ menuitem "Map operations..." [ showmenu "Map operations" ] menuitem "Bots..." [ showmenu "Creating bot waypoints" ] menuitem "Help?" [ echo (c 2)Please read the AssaultCube README which has a detailed guide on mapediting... ] +tmp_cradius = 12 + //Lighting menu. newmenu "Lighting" @@ -18,6 +20,11 @@ menuitem "Add white lights " [ showmenu "White light" ] menuitem "Add coloured lights " [ showmenu "Coloured light" ] menuitem "" -1 menuitemcheckbox "Enable fullbright: " "$fullbright" [ fullbright $arg1 ] +menuitem "" -1 +menuitem "Random coloured light: " +menuitemtextinput "Radius: " "$tmp_cradius" [ tmp_cradius = $arg1 ] 2 +menuitem "Place random light..." [ gencl $tmp_cradius ] +menuitem "Update random light..." [ gencl ] wlight = 1; wlight1 = 1 @@ -32,11 +39,11 @@ clight = 1; clight1 = 1; clight2 = 1; clight3 = 1 newmenu "Coloured light" -menuitemslider "Light radius: " 1 32 "$clight" 1 "" [ alias clight $arg1 ] +menuitemslider "Light radius: " 1 32 "$clight" 1 "" [ clight = $arg1 ] menuitem "" -1 -menuitemslider "Red light: " 1 255 "$clight1" 5 "" [ alias clight1 $arg1 ] -menuitemslider "Green light: " 1 255 "$clight2" 5 "" [ alias clight2 $arg1 ] -menuitemslider "Blue light: " 1 255 "$clight3" 5 "" [ alias clight3 $arg1 ] +menuitemslider "Red light: " 1 255 "$clight1" 5 "" [ clight1 = $arg1 ] +menuitemslider "Green light: " 1 255 "$clight2" 5 "" [ clight2 = $arg1 ] +menuitemslider "Blue light: " 1 255 "$clight3" 5 "" [ clight3 = $arg1 ] menuitem "" -1 menuitem " 2 [ OK ]" [ newent light $clight $clight1 $clight2 $clight3 ] diff --git a/config/on_quit.cfg b/config/on_quit.cfg index 8cc84d33..3a131915 100644 --- a/config/on_quit.cfg +++ b/config/on_quit.cfg @@ -19,6 +19,7 @@ on_quit_aliases = [ tmp_botmap tmp_botskill tmp_cl + tmp_cradius tmp_gamma_list tmp_hex tmp_mode diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index f8c937de..071740d9 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -27,7 +27,7 @@ bind ASTERISK "" bind PLUS "" // Directional equalizing - look up to level the ceiling selection, look down to level the floor selection bind COMMA [ if $old_editbinds [ equalize 0 ] [ if $editing [ if (= $flrceil 0) [ equalize 0 ] [ if (= $flrceil 2) [ equalize 2 ] ] ] ] ] -bind MINUS "" +bind MINUS [ if $editing [ copyent ] ] bind PERIOD [ if $old_editbinds [ equalize 2 ] ] bind SLASH "saycommand /" bind 0 "" @@ -43,7 +43,7 @@ bind 9 "vdelta 1" bind COLON "" bind SEMICOLON [ if $editing [ editent ] ] bind LESS "" -bind EQUALS "" +bind EQUALS [ if $editing [ pasteent ] ] bind GREATER "" bind QUESTION "" bind AT "" diff --git a/config/scripts.cfg b/config/scripts.cfg index 3e44107a..746dcd68 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -288,7 +288,11 @@ copyent = [ pasteent = [ if $editing [ if (&& (! (strcmp $cp_entbuf NULL)) (! (strcmp $cp_entstr NULL))) [ - newent (at $cp_entbuf 0) (at $cp_entbuf 1) (at $cp_entbuf 2) (at $cp_entbuf 3) (at $cp_entbuf 4) + if (strcmp (at $cp_entbuf 0) mapmodel) [ + newent (at $cp_entbuf 0) (at $cp_entbuf 2) (at $cp_entbuf 3) (at $cp_entbuf 4) + ] [ + newent (at $cp_entbuf 0) (at $cp_entbuf 1) (at $cp_entbuf 2) (at $cp_entbuf 3) (at $cp_entbuf 4) + ] echo (c 1)Note: (c 5)The previously copied entity: $cp_entstr - has been pasted. ] [ echo (c 3)Error: (c 5)pasteent requires an (c 1)initial (c 5)copyent to function. ] ]