git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6175 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -2435,6 +2435,8 @@ Output:
|
||||
</arguments>
|
||||
</command>
|
||||
|
||||
|
||||
|
||||
<command name="equalize">
|
||||
<description>Levels the floor/ceiling of the selection.</description>
|
||||
<remarks>
|
||||
@@ -2558,6 +2560,19 @@ Output:
|
||||
<remark>hotkey v</remark>
|
||||
</remarks>
|
||||
</command>
|
||||
|
||||
<command name="countwalls">
|
||||
<description>Returns the number of solid walls contained into the current selection.</description>
|
||||
<arguments>
|
||||
<argument token="T" description="the integer of type of the walls you want to count" valueNotes=" 0 (solid), 1 (corner), 2 (floor heightfield), 3 (ceil heightfield), 4 (empty cube), 5 (semi solid)" />
|
||||
</arguments>
|
||||
<examples>
|
||||
<example>
|
||||
<code><![CDATA[echo (concat "The selection contains " (countwalls 0) "solid wall(s)")]]></code>
|
||||
<explanation>Output: The selection contains 3 solid wall(s)</explanation>
|
||||
</example>
|
||||
</examples>
|
||||
</command>
|
||||
|
||||
<command name="pasteent">
|
||||
<description>Pastes a previously copied entity.</description>
|
||||
|
||||
+18
-3
@@ -95,9 +95,9 @@ bool noselection()
|
||||
return !selset;
|
||||
}
|
||||
|
||||
#define EDITSEL if(noteditmode("EDITSEL") || noselection()) return;
|
||||
#define EDITSELMP if(noteditmode("EDITSELMP") || noselection() || multiplayer()) return;
|
||||
#define EDITMP if(noteditmode("EDITMP") || multiplayer()) return;
|
||||
#define EDITSEL if(noteditmode("EDITSEL") || noselection()) return
|
||||
#define EDITSELMP if(noteditmode("EDITSELMP") || noselection() || multiplayer()) return
|
||||
#define EDITMP if(noteditmode("EDITMP") || multiplayer()) return
|
||||
|
||||
void selectpos(int x, int y, int xs, int ys)
|
||||
{
|
||||
@@ -252,6 +252,20 @@ void paste()
|
||||
blockpaste(*copybuf);
|
||||
}
|
||||
|
||||
// Count the walls of type "type" contained in the current selection
|
||||
int countwalls(int type)
|
||||
{
|
||||
int counter = 0;
|
||||
EDITSELMP 0;
|
||||
if(type < 0 || type >= MAXTYPE)
|
||||
{
|
||||
conoutf("invalid type");
|
||||
return 0;
|
||||
}
|
||||
loopselxy(if(s->type==type) counter++)
|
||||
return counter;
|
||||
}
|
||||
|
||||
void tofronttex() // maintain most recently used of the texture lists when applying texture
|
||||
{
|
||||
loopi(3)
|
||||
@@ -595,3 +609,4 @@ COMMAND(perlin, ARG_3INT);
|
||||
COMMAND(movemap, ARG_3INT);
|
||||
COMMAND(selectionrotate, ARG_1INT);
|
||||
COMMAND(selectionflip, ARG_1STR);
|
||||
COMMAND(countwalls, ARG_1EXP);
|
||||
|
||||
Reference in New Issue
Block a user