Skip to content

Commit 21e3885

Browse files
committed
Merge branch 'develop'
# Conflicts: # bitrock/ifml2.xml
2 parents 53dc023 + aff7823 commit 21e3885

File tree

8 files changed

+341
-182
lines changed

8 files changed

+341
-182
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<story xmlns="http://toysoft.narod.ru/IFML2Schema" id="story">
3+
<inheritedSystemProcedures/>
4+
<storyOptions>
5+
<startLocationOption showStartLocDesc="false"/>
6+
<startProcedureOption/>
7+
<storyDescription name="" description="" version="" author=""/>
8+
<globalVars>
9+
<var name="СекундПрошло" value="0"/>
10+
</globalVars>
11+
<systemCommandsDisableOption DisableHelp="false" DisableDebug="false"/>
12+
</storyOptions>
13+
<procedures>
14+
<procedure name="СброситьСекундомер">
15+
<procedureVariables/>
16+
<procedureBody>
17+
<var name="СекундПрошло" value="секунды"/>
18+
<showMessage beginWithCap="false" carriageReturn="true" message="Секундомер сброшен." type="text"/>
19+
</procedureBody>
20+
<parameters/>
21+
</procedure>
22+
<procedure name="СколькоСекунд">
23+
<procedureVariables/>
24+
<procedureBody>
25+
<return value="секунды - СекундПрошло"/>
26+
</procedureBody>
27+
<parameters/>
28+
</procedure>
29+
<procedure name="ВывестиСекунды">
30+
<procedureVariables/>
31+
<procedureBody>
32+
<runProcedure procedure="СколькоСекунд" returnToVar="сколько"/>
33+
<showMessage beginWithCap="false" carriageReturn="true" message="&quot;Прошло &quot; + сколько + &quot; секунд.&quot;" type="expression"/>
34+
</procedureBody>
35+
<parameters/>
36+
</procedure>
37+
</procedures>
38+
<libraries/>
39+
<dictionary/>
40+
<locations>
41+
<location id="КомнатаЛок" name="Комната">
42+
<hooks/>
43+
<roles/>
44+
<properties/>
45+
<words/>
46+
<description></description>
47+
<attributes/>
48+
</location>
49+
</locations>
50+
<items/>
51+
<actions>
52+
<action name="сколько" description="">
53+
<templates>
54+
<template>
55+
<literalElement>
56+
<synonym>сколько</synonym>
57+
</literalElement>
58+
</template>
59+
</templates>
60+
<procedureCall procedure="ВывестиСекунды"/>
61+
<restrictions/>
62+
</action>
63+
<action name="сбросить" description="">
64+
<templates>
65+
<template>
66+
<literalElement>
67+
<synonym>сбросить</synonym>
68+
</literalElement>
69+
</template>
70+
</templates>
71+
<procedureCall procedure="СброситьСекундомер"/>
72+
<restrictions/>
73+
</action>
74+
</actions>
75+
</story>

bitrock/ifml2.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<project>
22
<shortName>ifml2</shortName>
33
<fullName>IFML</fullName>
4-
<version>2016.3</version>
4+
<version>2016.4</version>
55
<readmeFile>../docs/notes.txt</readmeFile>
66
<defaultLanguage>ru</defaultLanguage>
77
<componentList>

docs/notes.txt

+7-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88
| * исправление |
99
| ! информация |
1010
===============================================================================================
11-
| Issue trackers: |
12-
| Use this: https://github.com/realsonic/ifml2/issues |
13-
| Deprecated: https://www.hostedredmine.com/projects/ifml2/issues |
14-
| Deprecated: http://ifml2.myjetbrains.com/youtrack |
11+
| Issue tracker: http://ifml2.myjetbrains.com/youtrack/issues |
1512
===============================================================================================
1613

14+
-----------------------------------------------------------------------------------------------
15+
Выпуск 2016/4
16+
-----------------------------------------------------------------------------------------------
17+
21.02.2016
18+
+ [Движок] Поддержка операции вычитания ("-") в выражениях.
19+
1720
-----------------------------------------------------------------------------------------------
1821
Выпуск 2016/3
1922
-----------------------------------------------------------------------------------------------

src/ifml2/engine/EngineVersion.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
public interface EngineVersion
44
{
5-
String VERSION = "Выпуск 2016/3";
5+
String VERSION = "Выпуск 2016/4";
66
}

src/ifml2/om/Location.java

+16-93
Original file line numberDiff line numberDiff line change
@@ -16,100 +16,23 @@
1616
@XmlTransient
1717
public class Location extends IFMLObject implements Cloneable
1818
{
19-
protected HashMap<ExitDirection, Location> exits = new HashMap<ExitDirection, Location>();
20-
protected List<Item> items = new ArrayList<Item>();
19+
protected HashMap<ExitDirection, Location> exits = new HashMap<>();
20+
protected List<Item> items = new ArrayList<>();
2121
private HashMap<String, Callable<? extends Value>> LOCATION_SYMBOLS = new HashMap<String, Callable<? extends Value>>()
2222
{
2323
{
24-
put("север", new Callable<Value>()
25-
{
26-
@Override
27-
public Value call() throws Exception
28-
{
29-
return getObjectValue(ExitDirection.NORTH);
30-
}
31-
});
32-
put("северовосток", new Callable<Value>()
33-
{
34-
@Override
35-
public Value call() throws Exception
36-
{
37-
return getObjectValue(ExitDirection.NORTH_EAST);
38-
}
39-
});
40-
put("восток", new Callable<Value>()
41-
{
42-
@Override
43-
public Value call() throws Exception
44-
{
45-
return getObjectValue(ExitDirection.EAST);
46-
}
47-
});
48-
put("юговосток", new Callable<Value>()
49-
{
50-
@Override
51-
public Value call() throws Exception
52-
{
53-
return getObjectValue(ExitDirection.SOUTH_EAST);
54-
}
55-
});
56-
put("юг", new Callable<Value>()
57-
{
58-
@Override
59-
public Value call() throws Exception
60-
{
61-
return getObjectValue(ExitDirection.SOUTH);
62-
}
63-
});
64-
put("югозапад", new Callable<Value>()
65-
{
66-
@Override
67-
public Value call() throws Exception
68-
{
69-
return getObjectValue(ExitDirection.SOUTH_WEST);
70-
}
71-
});
72-
put("запад", new Callable<Value>()
73-
{
74-
@Override
75-
public Value call() throws Exception
76-
{
77-
return getObjectValue(ExitDirection.WEST);
78-
}
79-
});
80-
put("северозапад", new Callable<Value>()
81-
{
82-
@Override
83-
public Value call() throws Exception
84-
{
85-
return getObjectValue(ExitDirection.NORTH_WEST);
86-
}
87-
});
88-
put("верх", new Callable<Value>()
89-
{
90-
@Override
91-
public Value call() throws Exception
92-
{
93-
return getObjectValue(ExitDirection.UP);
94-
}
95-
});
96-
put("низ", new Callable<Value>()
97-
{
98-
@Override
99-
public Value call() throws Exception
100-
{
101-
return getObjectValue(ExitDirection.DOWN);
102-
}
103-
});
104-
105-
put("предметы", new Callable<Value>()
106-
{
107-
@Override
108-
public Value call() throws Exception
109-
{
110-
return new CollectionValue(items);
111-
}
112-
});
24+
put("север", (Callable<Value>) () -> getObjectValue(ExitDirection.NORTH));
25+
put("северовосток", (Callable<Value>) () -> getObjectValue(ExitDirection.NORTH_EAST));
26+
put("восток", (Callable<Value>) () -> getObjectValue(ExitDirection.EAST));
27+
put("юговосток", (Callable<Value>) () -> getObjectValue(ExitDirection.SOUTH_EAST));
28+
put("юг", (Callable<Value>) () -> getObjectValue(ExitDirection.SOUTH));
29+
put("югозапад", (Callable<Value>) () -> getObjectValue(ExitDirection.SOUTH_WEST));
30+
put("запад", (Callable<Value>) () -> getObjectValue(ExitDirection.WEST));
31+
put("северозапад", (Callable<Value>) () -> getObjectValue(ExitDirection.NORTH_WEST));
32+
put("верх", (Callable<Value>) () -> getObjectValue(ExitDirection.UP));
33+
put("низ", (Callable<Value>) () -> getObjectValue(ExitDirection.DOWN));
34+
35+
put("предметы", (Callable<Value>) () -> new CollectionValue(items));
11336
}
11437

11538
@NotNull
@@ -134,8 +57,8 @@ public Location clone() throws CloneNotSupportedException
13457

13558
private void copyFieldsTo(Location location)
13659
{
137-
location.exits = new HashMap<ExitDirection, Location>(exits);
138-
location.items = new ArrayList<Item>(items);
60+
location.exits = new HashMap<>(exits);
61+
location.items = new ArrayList<>(items);
13962
}
14063

14164
public Location getExit(ExitDirection exitDirection)

0 commit comments

Comments
 (0)