Merge branch 'master' into qteditor
Conflicts: planet/Objects.ocd/Structures.ocd/StoneDoor.ocd/SpinWheel.ocd/Script.c src/platform/C4WindowSDL.cpp src/script/C4AulParse.cpp src/script/C4Effect.cppqteditor
|
@ -124,7 +124,7 @@ if(MSVC)
|
|||
# Enable LTCG for release builds
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ob2 /GL")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /Ob2 /GL")
|
||||
add_linker_flags(optimized MODULES exe shared static FLAGS /LTCG)
|
||||
add_linker_flags(optimized MODULES exe shared static FLAGS "/LTCG:incremental")
|
||||
|
||||
# Activate edit-and-continue
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /ZI /Gy")
|
||||
|
@ -948,7 +948,7 @@ elseif(UPNP_STYLE STREQUAL "Win32")
|
|||
list(APPEND OC_SYSTEM_SOURCES
|
||||
src/network/C4Network2UPnPWin32.cpp
|
||||
)
|
||||
elseif(UPNP_STYLE STREQUAL "libupnp")
|
||||
elseif(UPNP_STYLE STREQUAL "miniupnpc")
|
||||
list(APPEND OC_SYSTEM_SOURCES
|
||||
src/network/C4Network2UPnPLinux.cpp
|
||||
)
|
||||
|
@ -1074,6 +1074,14 @@ src/platform/C4TimeMilliseconds.h
|
|||
src/zlib/gzio.c
|
||||
src/zlib/gzio.h
|
||||
src/zlib/zutil.h
|
||||
|
||||
# pcg is a header-only library which we're listing solely so MSVC shows
|
||||
# the sources in the solution explorer. We could use an INTERFACE library
|
||||
# but there is no point to that because we don't need it for non-IDE
|
||||
# generators and support on IDE-targetting generators is nonexistant.
|
||||
thirdparty/pcg/pcg_extras.hpp
|
||||
thirdparty/pcg/pcg_random.hpp
|
||||
thirdparty/pcg/pcg_uint128.hpp
|
||||
)
|
||||
|
||||
target_link_libraries(libmisc ${ZLIB_LIBRARIES})
|
||||
|
@ -1100,6 +1108,8 @@ src/lib/C4Real.h
|
|||
src/lib/C4Random.cpp
|
||||
src/lib/C4Random.h
|
||||
src/script/C4Aul.cpp
|
||||
src/script/C4AulCompiler.h
|
||||
src/script/C4AulCompiler.cpp
|
||||
src/script/C4AulDefFunc.h
|
||||
src/script/C4AulExec.cpp
|
||||
src/script/C4AulExec.h
|
||||
|
@ -1108,6 +1118,7 @@ src/script/C4AulFunc.h
|
|||
src/script/C4Aul.h
|
||||
src/script/C4AulLink.cpp
|
||||
src/script/C4AulParse.cpp
|
||||
src/script/C4AulParse.h
|
||||
src/script/C4AulScriptFunc.cpp
|
||||
src/script/C4AulScriptFunc.h
|
||||
src/script/C4Effect.cpp
|
||||
|
|
|
@ -31,22 +31,16 @@ if(WIN32)
|
|||
SET(UPNP_FOUND TRUE)
|
||||
SET(UPNP_STYLE "Win32")
|
||||
else()
|
||||
find_path(UPNP_INCLUDE_DIR NAMES upnp.h PATH_SUFFIXES upnp)
|
||||
set(UPNP_NAMES ${UPNP_NAMES} upnp)
|
||||
set(THREADUTIL_NAMES ${THREADUTIL_NAMES} threadutil)
|
||||
set(IXML_NAMES ${IXML_NAMES} ixml)
|
||||
find_path(UPNP_INCLUDE_DIR NAMES miniupnpc.h PATH_SUFFIXES miniupnpc)
|
||||
set(UPNP_NAMES ${UPNP_NAMES} miniupnpc)
|
||||
find_library(UPNP_LIBRARY NAMES ${UPNP_NAMES})
|
||||
find_library(THREADUTIL_LIBRARY NAMES ${THREADUTIL_NAMES})
|
||||
find_library(IXML_LIBRARY NAMES ${IXML_NAMES})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UPNP DEFAULT_MSG UPNP_LIBRARY THREADUTIL_LIBRARY IXML_LIBRARY UPNP_INCLUDE_DIR)
|
||||
|
||||
if(UPNP_FOUND)
|
||||
set(UPNP_LIBRARIES ${UPNP_LIBRARY} ${THREADUTIL_LIBRARY} ${IXML_LIBRARY})
|
||||
if(UPNP_LIBRARY)
|
||||
SET(UPNP_FOUND TRUE)
|
||||
set(UPNP_LIBRARIES ${UPNP_LIBRARY})
|
||||
set(UPNP_INCLUDE_DIR ${UPNP_INCLUDE_DIR})
|
||||
set(UPNP_STYLE "libupnp")
|
||||
set(UPNP_STYLE "miniupnpc")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(UPNP_LIBRARY IXML_LIBRARY UPNP_INCLUDE_DIR)
|
||||
mark_as_advanced(UPNP_LIBRARY UPNP_INCLUDE_DIR)
|
||||
|
|
|
@ -336,7 +336,7 @@
|
|||
</xsl:if>
|
||||
<xsl:if test="position() mod 2=0"><xsl:attribute name="class">dark</xsl:attribute></xsl:if>
|
||||
<xsl:for-each select="col|literal_col">
|
||||
<td><xsl:apply-templates select="@colspan|node()"/></td>
|
||||
<td><xsl:apply-templates select="@colspan|@id|node()"/></td>
|
||||
</xsl:for-each>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
|
|
10665
docs/de.po
|
@ -15,7 +15,7 @@ clonk.xsl also uses it to match the processing for it. -->
|
|||
<div id="nav_search">
|
||||
<form action="http://www.openclonk.org/header/search.php" id="nav_searchform" method="get" target="_top"><div>
|
||||
<input id="nav_searchInput" name="s" type="text" value="search" onfocus="if(this.value == 'search') { this.value = ''; }" onblur="if(this.value == '') { this.value = 'search'; }"/> in the
|
||||
<select name="p">
|
||||
<select value="docs" name="p">
|
||||
<option value="blog">blog</option>
|
||||
<option value="wiki">website</option>
|
||||
<option value="forum">forum</option>
|
||||
|
|
|
@ -131,14 +131,21 @@
|
|||
<![CDATA[
|
||||
(function() {
|
||||
function navigate(url) {
|
||||
var urlsplit = url.split("#");
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url.split("#")[0]);
|
||||
xhr.open('GET', urlsplit[0]);
|
||||
xhr.onreadystatechange = function (e) {
|
||||
if (xhr.readyState === 4) {
|
||||
var d = parent.document;
|
||||
var r = xhr.responseText;
|
||||
d.getElementById("content").innerHTML = r.split('<div id="content">')[1];
|
||||
d.title = r.slice(r.indexOf("<title>")+7, r.indexOf("</title>"));
|
||||
if (urlsplit.length > 1) {
|
||||
var scrolltarget = d.getElementById(urlsplit[1]);
|
||||
if (scrolltarget) {
|
||||
scrolltarget.scrollIntoView();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
<col>1 - 10. Determines search depth of the pathfinder algorithm (default 1). Warning: higher values may slow down the game. By setting this value you can also enable non-CrewMember objects to use pathfinding when executing commands.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>NoComponentMass</literal_col>
|
||||
<literal_col>NoMassFromContents</literal_col>
|
||||
<col>Integer</col>
|
||||
<col>0 or 1. If 1, the object's contents is not added to the object's total mass. This can be used to prevent small container objects from turning into killer throwing items.</col>
|
||||
</row>
|
||||
|
|
|
@ -28,7 +28,7 @@ Stand = {
|
|||
<row>
|
||||
<col><code>Prototype</code></col>
|
||||
<col>proplist</col>
|
||||
<col></col>
|
||||
<col>Deprecated. Use <funclink>SetPrototype</funclink> and <funclink>GetPrototype</funclink>.</col>
|
||||
</row>
|
||||
<row>
|
||||
<col><code>Name</code></col>
|
||||
|
@ -185,6 +185,11 @@ Stand = {
|
|||
<col>bool</col>
|
||||
<col>True or false. If true, <emlink href="definition/cnat.html">ContactCalls</emlink> are called in the object script.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>Components</literal_col>
|
||||
<col>array</col>
|
||||
<col>List of definitions and counts specifying the components of an object. Example: Components = {Rock = 1, Wood = 3};</col>
|
||||
</row>
|
||||
</table>
|
||||
</text>
|
||||
</part>
|
||||
|
|
|
@ -203,11 +203,6 @@
|
|||
<col>int cause</col>
|
||||
<col>When a line object is changed, that is when one of it vertices changed its position.</col>
|
||||
</row>
|
||||
<row id="BuildNeedsMaterial">
|
||||
<literal_col>BuildNeedsMaterial</literal_col>
|
||||
<col>id material_definition, int amount</col>
|
||||
<col>When the object is building another object and building material is required. The parameters are the type and amount of the first needed material. If this function returns <code>true</code>, no material message is displayed above the object.</col>
|
||||
</row>
|
||||
<row id="AttachTargetLost">
|
||||
<literal_col>AttachTargetLost</literal_col>
|
||||
<col></col>
|
||||
|
@ -343,6 +338,11 @@
|
|||
<col>int player, int new_team, int old_team</col>
|
||||
<col>Callback in game goal, rule, and environment objects and in the scenario script. Called when a player has successfully switch from old_team to new_team (see <funclink>SetPlayerTeam</funclink>).</col>
|
||||
</row>
|
||||
<row id="OnCompletionChange">
|
||||
<literal_col>OnCompletionChange</literal_col>
|
||||
<col>int old_con, int new_con</col>
|
||||
<col>Callback in when the completion of the object has changed (see <funclink>GetCon</funclink>, <funclink>DoCon</funclink> and <funclink>SetCon</funclink>).</col>
|
||||
</row>
|
||||
<row id="EditCursorSelection">
|
||||
<literal_col>EditCursorSelection</literal_col>
|
||||
<col></col>
|
||||
|
@ -358,7 +358,6 @@
|
|||
<col>int old_x, int old_y</col>
|
||||
<col>When object is moved in editor. Callback is also done when moved in non-network pause mode. old_x, old_y contains object position before movement.</col>
|
||||
</row>
|
||||
|
||||
<row id="SaveScenarioObject">
|
||||
<literal_col>SaveScenarioObject</literal_col>
|
||||
<col>proplist props</col>
|
||||
|
|
|
@ -51,7 +51,8 @@ func Destruction()
|
|||
<text>The magic spell object exists until the spell has ended and then makes the clonk visible again. Also, if the spell object is deleted for other reasons (e.g. a scenario section change), the clonk is made visible in the Destruction callback (if this wasn't so, the clonk would remain invisible for ever). Also there is a Timer (defined in the DefCore) called every second. Notice you couldn't just have a single timer call to mark the end of the spell because timer intervals are marked in the engine beginning with the start of the round and you wouldn't know at what point within an engine timer interval the spell would start.</text>
|
||||
<text>However, there are some problems with this implementation: for example, the magician can not cast a second invisibility spell while he's already invisible - the second spell would have practically no effect, because the end of the first spell would make the clonk visible again. The spell script would have to do some special handling for this case - but not only for multiple invisibility spells, but also for any other spell or script that might affect visibility or coloration of the clonk. Even if this spell would remember the previous value e.g. for coloration it could not handle a situation in which other scripts change the color of their own in the middle of the spell. The same problems occur when multiple scripts modify temporary clonk physcials such as jumping, walking speed, fight strength or visibility range, energy, magic energy etc. Using effects, these conflicts can be avoided.</text>
|
||||
<h id="Usage">Application</h>
|
||||
<text>Effects are created using <funclink>AddEffect</funclink> and removed with <funclink>RemoveEffect</funclink>. If an effect was successfully created, the callback Fx*Start is made (* is replaced with the effect name). Depending on the parameters, there can also be an Fx*Timer call for continuous activity such as casting sparks, adjusting energy etc. Finally, when the effect is deleted, the callback Fx*Stop is made. Now, the invisibility spell implemented using effects:</text>
|
||||
<text>Effects are created using <funclink>CreateEffect</funclink> and removed with <funclink>RemoveEffect</funclink>. If an effect was successfully created, the callback <emlink href="script/Effects.html#Construction">Construction</emlink> is made. Depending on the parameters, there can also be an <emlink href="script/Effects.html#TimerCallback">Timer</emlink> call for continuous activity such as casting sparks, adjusting energy etc. Finally, when the effect is deleted, the callback <emlink href="script/Effects.html#Destruction">Destruction</emlink> is made.</text>
|
||||
<text>Now, the invisibility spell implemented using effects:</text>
|
||||
<code>/* Invisibility spell with effect system */
|
||||
|
||||
// visibility - previous visibility
|
||||
|
@ -59,92 +60,86 @@ func Destruction()
|
|||
|
||||
func Activate(object caster, object caster2)
|
||||
{
|
||||
// get caster
|
||||
if (caster2) caster = caster2;
|
||||
// get caster
|
||||
if (caster2) caster = caster2;
|
||||
|
||||
// start effect
|
||||
<funclink>AddEffect</funclink>("InvisPSpell", caster, 200, 1111, nil, GetID());
|
||||
// done - the spell object is not needed anymore
|
||||
<funclink>RemoveObject</funclink>();
|
||||
return true;
|
||||
// start effect
|
||||
caster-><funclink>CreateEffect</funclink>(InvisPSpell, 200, 1111);
|
||||
// done - the spell object is not needed anymore
|
||||
<funclink>RemoveObject</funclink>();
|
||||
return true;
|
||||
}
|
||||
|
||||
func FxInvisPSpellStart(object target, proplist effect)
|
||||
{
|
||||
// Save the casters previous visibility
|
||||
effect.visibility = target.Visibility;
|
||||
effect.old_mod = target-><funclink>GetClrModulation</funclink>();
|
||||
// Make the caster invisible
|
||||
target.Visibility = <funclink>VIS_Owner</funclink> | <funclink>VIS_Allies</funclink> | <funclink>VIS_God</funclink>;
|
||||
// Semitransparent and slightly blue for owner and allies
|
||||
target->SetClrModulation(<funclink>ModulateColor</funclink>(effect.old_mod, RGBa(127,127,255,127)));
|
||||
// Fertig
|
||||
return true;
|
||||
}
|
||||
|
||||
func FxInvisPSpellStop(object target, proplist effect)
|
||||
{
|
||||
// restore previous values
|
||||
target-><funclink>SetClrModulation</funclink>(effect.old_mod);
|
||||
target.Visibility = effect.visibility;
|
||||
// done
|
||||
return true;
|
||||
local InvisPSpell = new Effect {
|
||||
Start = func() {
|
||||
// Save the casters previous visibility
|
||||
this.visibility = Target.Visibility;
|
||||
this.old_mod = Target-><funclink>GetClrModulation</funclink>();
|
||||
// Make the caster invisible
|
||||
Target.Visibility = <funclink>VIS_Owner</funclink> | <funclink>VIS_Allies</funclink> | <funclink>VIS_God</funclink>;
|
||||
// Semitransparent and slightly blue for owner and allies
|
||||
Target->SetClrModulation(<funclink>ModulateColor</funclink>(this.old_mod, RGBa(127,127,255,127)));
|
||||
},
|
||||
Stop = func() {
|
||||
// restore previous values
|
||||
Target-><funclink>SetClrModulation</funclink>(this.old_mod);
|
||||
Target.Visibility = this.visibility;
|
||||
}
|
||||
}</code>
|
||||
<text>In this case, the magic spell object only starts the effect, then deletes itself immediately. The engine ensures that there are no conflicts with multiple effects modifying the visibility: effects are stored in a stack which ensures that effects are always removed in the opposite order of their addition. For this, there are a couple of extra Start and Stop calls to be made which are explained in detail later.</text>
|
||||
<text>This effects does not have a timer function. It does, however, define a timer interval of 1111 which will invoke the standard timer function after 1111 frames which will delete the effect. Alternatively, you could define a timer function as such:</text>
|
||||
<code>func FxInvisPSpellTimer()
|
||||
<code>Timer = func()
|
||||
{
|
||||
// return value of -1 means that the effect should be removed
|
||||
return -1;
|
||||
// return value of -1 means that the effect should be removed
|
||||
return -1;
|
||||
}</code>
|
||||
<text>To store the previous status of the target object, properties of the effect are used. This is necessary because in this case the effect callbacks do not have any object script context. So you cannot access any object local variables in the effect callbacks - remember that the magic spell object which has created the effect is already deleted. If you require an object context in the effect callbacks you can specify one in <funclink>AddEffect</funclink>(). In that case, effect callbacks would be in object local context and the effect would automatically be deleted if the target object is destroyed.</text>
|
||||
<text>To store the previous status of the target object, properties of the effect are used. This way effects are independant of other objects and effects - remember that the magic spell object which has created the effect is already deleted. If you need to call functions in the context of the target object or other objects, use <code>-></code>.</text>
|
||||
<h id="Priorities">Priorities</h>
|
||||
<text>When creating an effect you always specify a priority value which determines the effect order. The engine ensures that effects with lower priority are added before effects with a higher priority - even if this means deleting an existing effect of higher priority. So if one effect colors the clonk green and another colors the clonk red, the result will be that of the effect with higher priority. If two effects have the same priority, the order is undefined. However, it is guaranteed that effects added later always notify the Fx*Effect callback of the same priority.</text>
|
||||
<text>In the case of the red and green color, one effect could also determine the previous coloring and then mix a result using ModulateColor. But priorities also have another function: an effect of higher priority can prevent the addition of other effects of lower priority. This is done through the Fx*Effect callback. If any existing effect reacts to this callback with the return value -1, the new effect is not added (the same applies to the Start callback of the effect itself). Here an example:</text>
|
||||
<text>When creating an effect you always specify a priority value which determines the effect order. The engine ensures that effects with lower priority are added before effects with a higher priority - even if this means deleting an existing effect of higher priority. So if one effect colors the clonk green and another colors the clonk red, the result will be that of the effect with higher priority. If two effects have the same priority, the order is undefined. However, it is guaranteed that effects added later always notify the <code>Effect</code> callback of the same priority.</text>
|
||||
<text>In the case of the red and green color, one effect could also determine the previous coloring and then mix a result using ModulateColor. But priorities also have another function: an effect of higher priority can prevent the addition of other effects of lower priority. This is done through the <code>Effect</code> callback. If any existing effect reacts to this callback with the return value -1, the new effect is not added (the same applies to the Start callback of the effect itself). Here an example:</text>
|
||||
<code>/* Spell of immunity against fire */
|
||||
|
||||
func Activate(object caster, object caster2)
|
||||
{
|
||||
// get caster
|
||||
if (caster2) caster = caster2;
|
||||
// get caster
|
||||
if (caster2) caster = caster2;
|
||||
|
||||
// start effect
|
||||
<funclink>AddEffect</funclink>("BanBurnPSpell", caster, 180, 1111, nil, GetID());
|
||||
// start effect
|
||||
caster-><funclink>CreateEffect</funclink>(BanBurnPSpell, 180, 1111);
|
||||
|
||||
// done - the spell object is not needed anymore
|
||||
<funclink>RemoveObject</funclink>();
|
||||
return true;
|
||||
// done - the spell object is not needed anymore
|
||||
<funclink>RemoveObject</funclink>();
|
||||
return true;
|
||||
}
|
||||
|
||||
func FxBanBurnPSpellStart(object target, proplist effect, bool temporary)
|
||||
{
|
||||
// On start of the effect: extinguish clonk
|
||||
if (!temporary) target-><funclink>Extinguish</funclink>();
|
||||
return true;
|
||||
}
|
||||
|
||||
func FxBanBurnPSpellEffect(string new_name)
|
||||
{
|
||||
// block fire
|
||||
if (<funclink>WildcardMatch</funclink>(new_name, "*Fire*")) return -1;
|
||||
// everything else is ok
|
||||
return 0;
|
||||
}</code>
|
||||
<text>This effect makes the clonk fire-proof for 30 seconds. The effect is implemented without any Timer or Stop callbacks as the complete functionality is achieved by simply blocking other effects which might have "Fire" as part of their name. This especially applies to the engine internal fire which has exactly the name "Fire". Of course, you could still add a Timer callback for graphic effects so the player can see that his clonk is immune. Also, you could create special visual effects when preventing incineration in FxBanBurnPSpellEffect. For the like:</text>
|
||||
local BanBurnPSpell = new Effect {
|
||||
Construction = func()
|
||||
{
|
||||
// On start of the effect: extinguish clonk
|
||||
Target-><funclink>Extinguish</funclink>();
|
||||
},
|
||||
Effect = func(string new_name)
|
||||
{
|
||||
// block fire
|
||||
if (<funclink>WildcardMatch</funclink>(new_name, "*Fire*")) return -1;
|
||||
// everything else is ok
|
||||
return 0;
|
||||
}
|
||||
};</code>
|
||||
<text>This effect makes the clonk fire-proof for 30 seconds. The effect is implemented without any Timer or Stop callbacks as the complete functionality is achieved by simply blocking other effects which might have "Fire" as part of their name. This especially applies to the engine internal fire which has exactly the name "Fire". Of course, you could still add a Timer callback for graphic effects so the player can see that his clonk is immune. Also, you could create special visual effects when preventing incineration in <code>Effect</code>. For the like:</text>
|
||||
<code>[...]
|
||||
|
||||
func FxBanBurnPSpellEffect(string new_name, object target, proplist effect, var1, var2, var3)
|
||||
Effect = func(string new_name, var1, var2, var3, var4)
|
||||
{
|
||||
// only handle fire
|
||||
if (!<funclink>WildcardMatch</funclink>(new_name, "*Fire*")) return 0;
|
||||
// with fire, the three extra parameters have the following meaning:
|
||||
// var1: caused_by - player that is responsible for the fire
|
||||
// var2: blasted - bool: if the fire has been created by an explosion
|
||||
// var3: burning_object - object: incineratable object
|
||||
// extinguish burning object
|
||||
if (var3 && <funclink>GetType</funclink>(var3) == <funclink>C4V_C4Object</funclink>) var3-><funclink>Extinguish</funclink>();
|
||||
// block fire
|
||||
return -1;
|
||||
// only handle fire
|
||||
if (!<funclink>WildcardMatch</funclink>(new_name, "*Fire*")) return 0;
|
||||
// with fire, the three extra parameters have the following meaning:
|
||||
// var1: caused_by - player that is responsible for the fire
|
||||
// var2: blasted - bool: if the fire has been created by an explosion
|
||||
// var3: burning_object - object: incineratable object
|
||||
// extinguish burning object
|
||||
if (var3 && <funclink>GetType</funclink>(var3) == <funclink>C4V_C4Object</funclink>) var3-><funclink>Extinguish</funclink>();
|
||||
// block fire
|
||||
return -1;
|
||||
}</code>
|
||||
<text>This would even delete all burning objects which would otherwise incinerate the target object. The type check for var3 avoids possible conflicts with other "Fire" effects that might have differing parameters. Obviously, conflict situations like this should be avoided at all cost.</text>
|
||||
<text>The following table contains general guidelines for priorities in effects of the original pack:</text>
|
||||
|
@ -210,44 +205,44 @@ func FxBanBurnPSpellEffect(string new_name, object target, proplist effect, var1
|
|||
|
||||
func Activate(object caster, object caster2)
|
||||
{
|
||||
// get caster
|
||||
if (caster2) caster = caster2;
|
||||
// get caster
|
||||
if (caster2) caster = caster2;
|
||||
|
||||
// start effect
|
||||
<funclink>AddEffect</funclink>("ReincarnationPSpell", caster, 180, 0, nil, GetID());
|
||||
|
||||
// done - the spell object is not needed anymore
|
||||
<funclink>RemoveObject</funclink>();
|
||||
return true;
|
||||
// start effect
|
||||
caster-><funclink>CreateEffect</funclink>(ReincarnationPSpell, 180, 0);
|
||||
|
||||
// done - the spell object is not needed anymore
|
||||
<funclink>RemoveObject</funclink>();
|
||||
return true;
|
||||
}
|
||||
|
||||
func FxReincarnationPSpellStart(object target, proplist effect, bool temporary)
|
||||
{
|
||||
// Only at the first start: message
|
||||
if (!temporary) target-><funclink>Message</funclink>("%s gets an extra life", target-><funclink>GetName</funclink>());
|
||||
return true;
|
||||
}
|
||||
local ReincarnationPSpell = new Effect {
|
||||
Construction = func() {
|
||||
// Only at the first start: message
|
||||
Target-><funclink>Message</funclink>("%s gets an extra life", Target-><funclink>GetName</funclink>());
|
||||
return true;
|
||||
},
|
||||
|
||||
func FxReincarnationPSpellStop(object target, proplist effect, int reason, bool temporary)
|
||||
{
|
||||
// only when the clonk died
|
||||
if (reason != 4) return true;
|
||||
|
||||
// the clonk has already been resurrected
|
||||
if (target-><funclink>GetAlive</funclink>()) return -1;
|
||||
// resurrect clonk
|
||||
target-><funclink>SetAlive</funclink>(true);
|
||||
// give energy
|
||||
target-><funclink>DoEnergy</funclink>(100);
|
||||
// message
|
||||
target-><funclink>Message</funclink>("%s has been resurrected.", target-><funclink>GetName</funclink>());
|
||||
func Stop(int reason, bool temporary) {
|
||||
// only when the clonk died
|
||||
if (reason != 4) return true;
|
||||
|
||||
// the clonk has already been resurrected
|
||||
if (Target-><funclink>GetAlive</funclink>()) return -1;
|
||||
// resurrect clonk
|
||||
Target-><funclink>SetAlive</funclink>(true);
|
||||
// give energy
|
||||
Target-><funclink>DoEnergy</funclink>(100);
|
||||
// message
|
||||
Target-><funclink>Message</funclink>("%s has been resurrected.", Target-><funclink>GetName</funclink>());
|
||||
|
||||
// remove
|
||||
return true;
|
||||
}</code>
|
||||
// remove
|
||||
return true;
|
||||
}
|
||||
};</code>
|
||||
<text>This effect reanimates the clonk as many times as he has cast the reanimation spell.</text>
|
||||
<h id="GlobalEffects">Global Effects</h>
|
||||
<text>Global effects are effects that are not bound to any target object. With global effects, too, priorities are observed and temporary Add/Remove calls might be necessary to ensure order. Simply imagine all global effects are attached to an imaginary object. Global effects are accessed whenever you specify <code>nil</code> for the target object.</text>
|
||||
<text>There are two global effect types: Scenerio effects and global effects. They are bound to the <code>Scenario</code> and <code>Global</code> proplists. With these effects, too, priorities are observed and temporary Add/Remove calls might be necessary to ensure order.</text>
|
||||
<text>This can be used to make changes to gravity, sky color, etc. Here's an example for a spell that temporarily reduces gravity and then resets the original value:</text>
|
||||
<code>/* Gravitation spell */
|
||||
|
||||
|
@ -333,34 +328,39 @@ func FxGravChangeUSpellAdd(object target, proplist effect, string new_name, int
|
|||
<table>
|
||||
<caption id="PropertiesTable">Effect Properties</caption>
|
||||
<rowh>
|
||||
<col>Data type</col>
|
||||
<col>Name</col>
|
||||
<col>Data type</col>
|
||||
<col>Description</col>
|
||||
</rowh>
|
||||
<row>
|
||||
<col>string</col>
|
||||
<col><code>Name</code></col>
|
||||
<col>string</col>
|
||||
<col>Can be changed.</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>int</col>
|
||||
<col><code>Priority</code></col>
|
||||
<col>int</col>
|
||||
<col>See <a href="Priorities">Priorities</a></col>
|
||||
</row>
|
||||
<row>
|
||||
<col>int</col>
|
||||
<col><code>Interval</code></col>
|
||||
<col>int</col>
|
||||
<col>Of the <a href="#TimerCallback">Timer callback</a>.</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>int</col>
|
||||
<col><code>Time</code></col>
|
||||
<col>int</col>
|
||||
<col>The age of the effect in frames, used for the <a href="#TimerCallback">Timer callback</a>. Can be changed.</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>proplist</col>
|
||||
<col><code>CommandTarget</code></col>
|
||||
<col>Either the command object or the command definition, depending on which is used.</col>
|
||||
<col>proplist</col>
|
||||
<col><code>nil</code> when created by <funclink>CreateEffect</funclink>, as the effect gets the callbacks itself. When created by <funclink>AddEffect</funclink> either the command object or the command definition, depending on which is used.</col>
|
||||
</row>
|
||||
<row>
|
||||
<col><code>Target</code></col>
|
||||
<col>proplist</col>
|
||||
<col>The object the effect belongs to, or the proplists <code>Scenario</code> or <code>Global</code> for scenario and global effects.</col>
|
||||
</row>
|
||||
</table>
|
||||
<h id="UserCallbacks">User Defined Properties</h>
|
||||
|
@ -488,19 +488,19 @@ global func FxExplodeOnDeathCurseStop(object target, proplist effect, int reason
|
|||
</row>
|
||||
</table>
|
||||
</text>
|
||||
<text>Warning: as function names may not be more than 100 characters in length (and you will lose oversight eventually), you should not stuff too much information into the effect name. Effect names are case sensitive. Also, you should avoid using any of these identifiers in your effect names if your effect doesn't have anything to do with them.</text>
|
||||
<text>Effect names are case sensitive. Also, you should avoid using any of these identifiers in your effect names if your effect doesn't have anything to do with them.</text>
|
||||
<h id="CBRef">Callback Reference</h>
|
||||
<part>
|
||||
<text>The following callbacks are made by the engine and should be implemented in your script according to necessity. * is to be replaced by your effect name.</text>
|
||||
<h>Fx*Start</h>
|
||||
<text><code>int Fx*Start (object target, proplist effect, int temporary, any var1, any var2, any var3, any var4);</code></text>
|
||||
<text>Called at the start of the effect. target is the target object of the effect. <code>effect</code> is the effect itself. <code>effect</code> can be used to manipulate the effect, for example with <code>effect.Interval=newinterval</code>.</text>
|
||||
<text>The following callbacks are made by the engine and should be implemented in your effect prototype as necessary.</text>
|
||||
<h>Start</h>
|
||||
<text><code>int Start (int temporary, any var1, any var2, any var3, any var4);</code></text>
|
||||
<text>Called at the start of the effect. <code>this</code> is the effect itself. It can be used to manipulate the effect, for example with <code>this.Interval=newinterval</code>.</text>
|
||||
<text>In normal operation the parameter temporary is 0. It is 1 if the effect is re-added after having been temporarily removed and 2 if the effect was temporarily removed and is now to be deleted (in this case a Remove call will follow).</text>
|
||||
<text>If temporary is 0, var1 to var4 are the additional parameters passed to <funclink>AddEffect</funclink>().</text>
|
||||
<text>If temporary is 0 and this callback returns -1 the effect is not created and the corrsponding <funclink>AddEffect</funclink>() call returns 0.</text>
|
||||
<h>Fx*Stop</h>
|
||||
<text><code>int Fx*Stop (object target, proplist effect, int reason, bool temporary);</code></text>
|
||||
<text>When the effect is temporarily or permanently removed. target again is the target object and <code>effect</code> the effect itself.</text>
|
||||
<text>If temporary is 0, var1 to var4 are the additional parameters passed to <funclink>CreateEffect</funclink>().</text>
|
||||
<text>If temporary is 0 and this callback returns -1 the effect is not created and the corrsponding <funclink>CreateEffect</funclink>() call returns <code>nil</code>.</text>
|
||||
<h>Stop</h>
|
||||
<text><code>int Stop (int reason, bool temporary);</code></text>
|
||||
<text>When the effect is temporarily or permanently removed. <code>this</code> is the effect itself.</text>
|
||||
<text>reason contains the cause of the removal and can be one of the following values:</text>
|
||||
<text>
|
||||
<table>
|
||||
|
@ -537,25 +537,33 @@ global func FxExplodeOnDeathCurseStop(object target, proplist effect, int reason
|
|||
</table>
|
||||
</text>
|
||||
<text>The effect can prevent removal by returning -1. This will not help, however, in temporary removals or if the target object has been deleted.</text>
|
||||
<h id="TimerCallback">Fx*Timer</h>
|
||||
<text><code>int Fx*Timer (object target, proplist effect, int time);</code></text>
|
||||
<text>Periodic timer call, if a timer interval has been specified at effect creation. target and <code>effect</code> as usual.</text>
|
||||
<h id="FxConstructionCallback">Construction</h>
|
||||
<text><code>int Construction (any var1, any var2, any var3, any var4);</code></text>
|
||||
<text>Called when the effect is first created, before it is started. The parameters <code>var1</code> to <code>var4</code> are passed through from <funclink>CreateEffect</funclink>.</text>
|
||||
<text>The return value is ignored.</text>
|
||||
<h id="FxDestructionCallback">Destruction</h>
|
||||
<text><code>nil Destruction (int reason);</code></text>
|
||||
<text>Callback when the effect is removed. <code>reason</code> is the same as in the preceding <code>Stop</code> call, see above.</text>
|
||||
<text>The return value is ignored.</text>
|
||||
<h id="TimerCallback">Timer</h>
|
||||
<text><code>int Timer (int time);</code></text>
|
||||
<text>Periodic timer call, if a timer interval has been specified at effect creation.</text>
|
||||
<text>time specifies how long the effect has now been active. This might alternatively be determined using effect.Time.</text>
|
||||
<text>If this function is not implemented or returns -1, the effect will be deleted after this call.</text>
|
||||
<h>Fx*Effect</h>
|
||||
<text><code>int Fx*Effect (string new_name, object target, proplist effect, any var1, any var2, any var3, any var4);</code></text>
|
||||
<text>A call to all effects of higher priority if a new effect is to be added to the same target object. new_name is the name of the new effect; <code>effect</code> is the effect being called.</text>
|
||||
<h>Effect</h>
|
||||
<text><code>int Effect (string new_name, any var1, any var2, any var3, any var4);</code></text>
|
||||
<text>A call to all effects of higher priority if a new effect is to be added to the same target object. new_name is the name of the new effect; <code>this</code> is the effect being called.</text>
|
||||
<text>Warning: the new effect is not yet properly initialized and should not be manipulated in any way. Especially the priority field might not yet have been set.</text>
|
||||
<text>This function can return -1 to reject the new effect. As the new effect might also be rejected by other effects, this callback should not try to add effects or similar (see gravitation spell). Generally you should not try to manipulate any effects during this callback.</text>
|
||||
<text>Return -2 or -3 to accept the new effect. As long as the new effect is not rejected by any other effect, the Fx*Add call is then made to the accepting effect, the new effect is not actually created, and the calling AddEffect function returns the effect index of the accepting effect. The return value -3 will also temporarily remove all higher prioriy effects just before the Fx*Add callback and re-add them later.</text>
|
||||
<text>var1 bis var4 are the parameters passed to <funclink>AddEffect</funclink>()</text>
|
||||
<h>Fx*Add</h>
|
||||
<text><code>int Fx*Add (object target, proplist effect, string new_name, int new_timer, any var1, any var2, any var3, any var4);</code></text>
|
||||
<text>Callback to the accepting effect if that has returned -2 or -3 to a prior Fx*Effect call. <code>effect</code> identifies the accepting effect to which the consequences of the new effect will be added; target is the target object (0 for global effects).</text>
|
||||
<text>Return -2 or -3 to accept the new effect. As long as the new effect is not rejected by any other effect, the <code>Add</code> call is then made to the accepting effect, the new effect is not actually created, and the calling <funclink>CreateEffect</funclink> function returns the accepting effect. The return value -3 will also temporarily remove all higher prioriy effects just before the <code>Add</code> callback and re-add them later.</text>
|
||||
<text>var1 bis var4 are the parameters passed to <funclink>CreateEffect</funclink>()</text>
|
||||
<h>Add</h>
|
||||
<text><code>int Add (string new_name, int new_timer, any var1, any var2, any var3, any var4);</code></text>
|
||||
<text>Callback to the accepting effect if that has returned -2 or -3 to a prior <code>Effect</code> call. <code>this</code> identifies the accepting effect to which the consequences of the new effect will be added.</text>
|
||||
<text>new_timer is the timer interval of the new effect; var1 to var4 are the parameters from AddEffect. Notice: in temporary calls, these parameters are not available - here they will be 0.</text>
|
||||
<text>If -1 is returned, the accepting effect is deleted also. Logically, the calling AddEffect function will then return -2.</text>
|
||||
<h>Fx*Damage</h>
|
||||
<text><code>int Fx*Damage (object target, proplist effect, int damage, int cause, int by_player);</code></text>
|
||||
<text>If -1 is returned, the accepting effect is deleted also. Logically, the calling <funclink>CreateEffect</funclink> function will then return <code>nil</code>.</text>
|
||||
<h>Damage</h>
|
||||
<text><code>int Damage (int damage, int cause, int by_player);</code></text>
|
||||
<text>Every effect receives this callback whenever the energy or damage value of the target object is to change. If the function is defined, it should then return the damage to be done to the target.</text>
|
||||
<text id="damagecause">This callback is made upon life energy changes in living beings and damage value changes in non-livings - but not vice versa. cause contains the value change and reason:</text>
|
||||
<text>
|
||||
|
@ -639,7 +647,7 @@ global func FxExplodeOnDeathCurseStop(object target, proplist effect, int reason
|
|||
<text>There are the following functions for manipulation of effects:</text>
|
||||
<text>
|
||||
<ul>
|
||||
<li><funclink>AddEffect</funclink>() - for effect creation</li>
|
||||
<li><funclink>CreateEffect</funclink>() - for effect creation</li>
|
||||
<li><funclink>RemoveEffect</funclink>() - for effect removal</li>
|
||||
<li><funclink>GetEffect</funclink>() - to search for effects</li>
|
||||
<li><funclink>GetEffectCount</funclink>() - for effect counting</li>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<title>AddEffect</title>
|
||||
<category>Effects</category>
|
||||
<version>5.1 OC</version>
|
||||
<deprecated />
|
||||
<syntax>
|
||||
<rtype>proplist</rtype>
|
||||
<params>
|
||||
|
@ -18,7 +19,7 @@
|
|||
<param>
|
||||
<type>object</type>
|
||||
<name>target</name>
|
||||
<desc>Target object for the effect. If <code>nil</code>, a global effect is created.</desc>
|
||||
<desc>Target object for the effect. If <code>nil</code>, <code>Global</code> is used, but the target parameter of the callbacks will get <code>nil</code>.</desc>
|
||||
<optional />
|
||||
</param>
|
||||
<param>
|
||||
|
@ -74,6 +75,7 @@
|
|||
<remark>For examples and more information see the <emlink href="script/Effects.html">effects documentation</emlink>.</remark>
|
||||
<related>
|
||||
<emlink href="script/Effects.html">Effects Documentation</emlink>
|
||||
<funclink>CreateEffect</funclink>
|
||||
<funclink>CheckEffect</funclink>
|
||||
<funclink>GetEffectCount</funclink>
|
||||
<funclink>EffectCall</funclink>
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<remark>For examples and more information see the <emlink href="script/Effects.html">effects documentation</emlink>.</remark>
|
||||
<related>
|
||||
<emlink href="script/Effects.html">Effects Documentation</emlink>
|
||||
<funclink>AddEffect</funclink>
|
||||
<funclink>CreateEffect</funclink>
|
||||
<funclink>GetEffectCount</funclink>
|
||||
<funclink>EffectCall</funclink>
|
||||
<funclink>GetEffect</funclink>
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!DOCTYPE funcs
|
||||
SYSTEM '../../../clonk.dtd'>
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>ComponentAll</title>
|
||||
<category>Objects</category>
|
||||
<subcat>Components</subcat>
|
||||
<version>5.1 OC</version>
|
||||
<syntax>
|
||||
<rtype>bool</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>id</type>
|
||||
<name>components</name>
|
||||
<desc>id of the expected component.</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Checks whether an object is composed of only one specified component type.</desc>
|
||||
<related><funclink>GetComponent</funclink></related>
|
||||
</func>
|
||||
<author>jwk</author><date>2002-04</date>
|
||||
</funcs>
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!DOCTYPE funcs
|
||||
SYSTEM '../../../clonk.dtd'>
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>ComposeContents</title>
|
||||
<category>Objects</category>
|
||||
<subcat>Creation</subcat>
|
||||
<version>5.1 OC</version>
|
||||
<syntax>
|
||||
<rtype>object</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>id</type>
|
||||
<name>object_id</name>
|
||||
<desc>Type of object to be created.</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Creates an object of the specified type in the contents of the calling object. The object is composed from components which must be available inside the object. Otherwise, a message is displayed listing missing components. This function causes the callback BuildNeedsMaterial which can be used to intercept the message and perform custom actions for acquiring the necessary material.</desc>
|
||||
</func>
|
||||
<author>springer</author><date>2002-04</date>
|
||||
</funcs>
|
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!DOCTYPE funcs
|
||||
SYSTEM '../../../clonk.dtd'>
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>CreateEffect</title>
|
||||
<category>Effects</category>
|
||||
<version>8.0 OC</version>
|
||||
<syntax>
|
||||
<rtype>proplist</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>proplist</type>
|
||||
<name>prototype</name>
|
||||
<desc>A proplist containing the callback functions for the new Effect. The name (<funclink>GetName</funclink>) of this proplist becomes the name of the effect.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>int</type>
|
||||
<name>priority</name>
|
||||
<desc>Effect priority. Must be greater than zero.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>int</type>
|
||||
<name>timer</name>
|
||||
<optional />
|
||||
<desc>Interval for the timer calls. With <code>nil</code>, no timer calls are made and the effect stays on permanently until it is deleted by other calls.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>any</type>
|
||||
<name>var1</name>
|
||||
<optional />
|
||||
<desc>First extra parameter to be passed to <code>Construction</code>, <code>Start</code> and <code>Effect</code> callbacks.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>any</type>
|
||||
<name>var2</name>
|
||||
<optional />
|
||||
<desc>Second extra parameter to be passed to <code>Construction</code>, <code>Start</code> and <code>Effect</code> callbacks.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>any</type>
|
||||
<name>var3</name>
|
||||
<optional />
|
||||
<desc>Third extra parameter to be passed to <code>Construction</code>, <code>Start</code> and <code>Effect</code> callbacks.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>any</type>
|
||||
<name>var4</name>
|
||||
<optional />
|
||||
<desc>Fourth extra parameter to be passed to <code>Construction</code>, <code>Start</code> and <code>Effect</code> callbacks.</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Creates an effect. Returns the effect if successful or <code>nil</code> if not (e.g. because the effect was rejected). If the effect was accepted by another effect which is deleting itself within the same call, the return value is probably <code>nil</code>. Effects can be created on objects, <code>Global</code> and <code>Scenario</code>. This is passed as the first parameter to the effect callbacks.
|
||||
</desc>
|
||||
<remark>For examples and more information see the <emlink href="script/Effects.html">effects documentation</emlink>.</remark>
|
||||
<related>
|
||||
<emlink href="script/Effects.html">Effects Documentation</emlink>
|
||||
<funclink>CheckEffect</funclink>
|
||||
<funclink>GetEffectCount</funclink>
|
||||
<funclink>EffectCall</funclink>
|
||||
<funclink>GetEffect</funclink>
|
||||
<funclink>RemoveEffect</funclink>
|
||||
</related>
|
||||
</func>
|
||||
<author>Sven2</author><date>2004-03</date>
|
||||
<author>Günther</author><date>2014</date>
|
||||
</funcs>
|
|
@ -37,32 +37,16 @@
|
|||
<col>0</col>
|
||||
<col>Nothing</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>C4MN_Extra_Components</col>
|
||||
<col>1</col>
|
||||
<col>Components</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>C4MN_Extra_Value</col>
|
||||
<col>2</col>
|
||||
<col>Value</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>C4MN_Extra_MagicValue</col>
|
||||
<col>3</col>
|
||||
<col>Value as magic value. extra_data is also displayed for comparison, e.g. "50/100".</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>C4MN_Extra_Info</col>
|
||||
<col>4</col>
|
||||
<col>Display object description immediately.</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>C4MN_Extra_ComponentsMagic</col>
|
||||
<col>5</col>
|
||||
<col>Display components and magic value.</col>
|
||||
<col></col>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
</desc>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<remark>For examples and more information see the <emlink href="script/Effects.html">effects documentation</emlink>.</remark>
|
||||
<related>
|
||||
<emlink href="script/Effects.html">Effects Documentation</emlink>
|
||||
<funclink>AddEffect</funclink>
|
||||
<funclink>CreateEffect</funclink>
|
||||
<funclink>CheckEffect</funclink>
|
||||
<funclink>GetEffectCount</funclink>
|
||||
<funclink>GetEffect</funclink>
|
||||
|
|
|
@ -23,26 +23,15 @@
|
|||
<desc>Index of the component to be returned. This parameter is ignored if component is specified. Returns the id of the indicated component which can then be used to determine the count in a subsequent call to GetComponent.</desc>
|
||||
<optional />
|
||||
</param>
|
||||
<param>
|
||||
<type>object</type>
|
||||
<name>obj</name>
|
||||
<desc>Object of which to determine components. Can be <code>nil</code> in local calls. If definition is specified, this parameter is ignored.</desc>
|
||||
<optional />
|
||||
</param>
|
||||
<param>
|
||||
<type>id</type>
|
||||
<name>definition</name>
|
||||
<desc>Definition of which to determine components. If <code>nil</code>, the specified object is checked instead.</desc>
|
||||
<optional />
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Used to determine object components.</desc>
|
||||
<remark>Also see <emlink href="definition/properties.html">Properties</emlink>.</remark>
|
||||
<examples>
|
||||
<example>
|
||||
<code>var i,cid,num;
|
||||
<funclink>while</funclink> (id = GetComponent(nil, i++, nil, <funclink>GetID</funclink>()))
|
||||
if ((num = GetComponent(id) - GetComponent(id, 0, nil, <funclink>GetID</funclink>())) > 0)
|
||||
<funclink>while</funclink> (id = <funclink>GetID</funclink>()->GetComponent(nil, i++))
|
||||
if ((num = GetComponent(id) - <funclink>GetID</funclink>()->GetComponent(id)) > 0)
|
||||
<funclink>while</funclink> (num--) <funclink>CreateObject</funclink>(id);</code>
|
||||
<text>Creates all components which are still missing in the calling object (e.g. in a construction site) in front of the object.</text>
|
||||
</example>
|
||||
|
|
|
@ -59,7 +59,7 @@ i = <funclink>GetEffectCount</funclink>();
|
|||
</examples>
|
||||
<related>
|
||||
<emlink href="script/Effects.html">Effects Documentation</emlink>
|
||||
<funclink>AddEffect</funclink>
|
||||
<funclink>CreateEffect</funclink>
|
||||
<funclink>CheckEffect</funclink>
|
||||
<funclink>GetEffectCount</funclink>
|
||||
<funclink>EffectCall</funclink>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<remark>For an example see <funclink>GetEffect</funclink>.</remark>
|
||||
<related>
|
||||
<emlink href="script/Effects.html">Effects Documentation</emlink>
|
||||
<funclink>AddEffect</funclink>
|
||||
<funclink>CreateEffect</funclink>
|
||||
<funclink>CheckEffect</funclink>
|
||||
<funclink>EffectCall</funclink>
|
||||
<funclink>GetEffect</funclink>
|
||||
|
|
|
@ -7,8 +7,26 @@
|
|||
<title>GetName</title>
|
||||
<category>Objects</category>
|
||||
<version>5.1 OC</version>
|
||||
<syntax><rtype>string</rtype></syntax>
|
||||
<desc>Returns the name of an object or of an object definition. If the object does not have a name of its own, the definition name is returned anyway.</desc>
|
||||
<syntax>
|
||||
<rtype>string</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>bool</type>
|
||||
<name>truename</name>
|
||||
<desc>Returns only the constant in which it was defined, ignoring the <code>Name</code> property.</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Returns the name of a proplist. This is either the contents of the <code>Name</code> property, or if that doesn't exist or the true name was requested, the name of the constant in which it was defined.</desc>
|
||||
<examples>
|
||||
<example>
|
||||
<code>
|
||||
static const Bee = { Buzz = func() {} };
|
||||
func Poke(proplist animal) {
|
||||
if (animal->GetName(true) == "Bee") animal->Buzz();
|
||||
}</code>
|
||||
</example>
|
||||
</examples>
|
||||
</func>
|
||||
<author>jwk</author><date>2002-06</date>
|
||||
<author>Günther</author><date>2014</date>
|
||||
</funcs>
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!DOCTYPE funcs
|
||||
SYSTEM '../../../clonk.dtd'>
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>GetNeededMatStr</title>
|
||||
<category>Objects</category>
|
||||
<subcat>Status</subcat>
|
||||
<version>5.1 OC</version>
|
||||
<syntax>
|
||||
<rtype>string</rtype>
|
||||
</syntax>
|
||||
<desc>Returns the still needed construction materials of an object.</desc>
|
||||
<related>
|
||||
<funclink>GetComponent</funclink>
|
||||
<funclink>GetCon</funclink>
|
||||
<funclink>ComponentAll</funclink>
|
||||
</related>
|
||||
</func>
|
||||
<author>wipfmetz</author><date>2002-08</date>
|
||||
</funcs>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!DOCTYPE funcs
|
||||
SYSTEM '../../../clonk.dtd'>
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>GetPrototype</title>
|
||||
<category>Objects</category>
|
||||
<subcat>Properties</subcat>
|
||||
<version>8.0 OC</version>
|
||||
<syntax>
|
||||
<rtype>nil</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>proplist</type>
|
||||
<name>obj</name>
|
||||
<desc>The Object whose prototype is returned. Can be <code>nil</code> in local calls.</desc>
|
||||
<optional />
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>When properties of a proplist are read and not set on that proplist, the property is looked up in the proplist's prototype(s). The immediate prototype is returned by this function.</desc>
|
||||
<related><funclink>SetPrototype</funclink></related>
|
||||
</func>
|
||||
<author>Günther</author><date>2016-04</date>
|
||||
</funcs>
|
|
@ -18,7 +18,6 @@
|
|||
<li>Will use modified jumping (also short jumps) even if the PathFinder value in DefCore is not set.</li>
|
||||
<li>Can be attacked via the Attack command.</li>
|
||||
<li>Failed commands will produce failure messages and xFailed calls in the command target.</li>
|
||||
<li>Will automatically add Acquire commands if a BUILD action requires material. BuildNeedsMaterial calls are not made.</li>
|
||||
<li>Right mouse clicks will show Context* script functions as menu entries if the controller is the owner.</li>
|
||||
<li>The object name is displayed if seen by another allied player and enabled in the options.</li>
|
||||
<li>The object can not be sold.</li>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<remark>See <funclink>GetEffect</funclink> for an example. Warning: if an effect is meant to delete itself using this function, only use effect, not name!</remark>
|
||||
<related>
|
||||
<emlink href="script/Effects.html">Effects Documentation</emlink>
|
||||
<funclink>AddEffect</funclink>
|
||||
<funclink>CreateEffect</funclink>
|
||||
<funclink>CheckEffect</funclink>
|
||||
<funclink>GetEffectCount</funclink>
|
||||
<funclink>EffectCall</funclink>
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Sets the component count of the calling object.</desc>
|
||||
<remark>Also see <emlink href="definition/defcore.html">DefCore</emlink>.</remark>
|
||||
<desc>Sets the component count of the calling object or definition.</desc>
|
||||
<remark>Also see <emlink href="definition/properties.html">Properties</emlink>.</remark>
|
||||
<related>
|
||||
<funclink>GetComponent</funclink>
|
||||
<funclink>Split2Components</funclink>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!DOCTYPE funcs
|
||||
SYSTEM '../../../clonk.dtd'>
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>SetPrototype</title>
|
||||
<category>Objects</category>
|
||||
<subcat>Properties</subcat>
|
||||
<version>8.0 OC</version>
|
||||
<syntax>
|
||||
<rtype>nil</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>proplist</type>
|
||||
<name>prototype</name>
|
||||
<desc>The new prototype.</desc>
|
||||
<optional />
|
||||
</param>
|
||||
<param>
|
||||
<type>proplist</type>
|
||||
<name>obj</name>
|
||||
<desc>Object to be changed. Can be <code>nil</code> in local calls.</desc>
|
||||
<optional />
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>This function changes the prototype of a proplist.
|
||||
When properties of a proplist are read and not set on that proplist, the property is looked up in the proplist's prototype(s).
|
||||
This can be used for inheritance.</desc>
|
||||
<related><funclink>GetPrototype</funclink></related>
|
||||
</func>
|
||||
<author>Günther</author><date>2016-04</date>
|
||||
</funcs>
|
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -6,6 +6,6 @@ Comment[de]=Ein actiongeladenes Taktikspiel.
|
|||
GenericName=Multiplayer action, tactics and skill game
|
||||
Icon=openclonk
|
||||
Exec=openclonk
|
||||
Categories=Game;ActionGame;
|
||||
Categories=Game;ActionGame;StrategyGame;ArcadeGame;
|
||||
StartupNotify=true
|
||||
MimeType=x-scheme-handler/clonk;
|
||||
|
|
|
@ -275,7 +275,7 @@ private func InitLorries()
|
|||
if (!Random(5))
|
||||
{
|
||||
var barrel = lorry->CreateContents(Barrel);
|
||||
barrel->SetFilled("Water", Barrel->BarrelMaxFillLevel());
|
||||
barrel->PutLiquid("Water", Barrel->GetLiquidContainerMaxFillLevel());
|
||||
}
|
||||
// Objects which are only in one eighth of the lorries.
|
||||
if (!Random(8))
|
||||
|
|
|
@ -7,17 +7,10 @@
|
|||
|
||||
static g_player_spawn_positions;
|
||||
static g_map_width;
|
||||
static g_no_map, g_seed;
|
||||
|
||||
// Called be the engine: draw the complete map here.
|
||||
public func InitializeMap(proplist map)
|
||||
{
|
||||
// Don't draw a map when switching to the empty scenario section.
|
||||
if (g_no_map) return true;
|
||||
// Reloading the scenario section also resets the RNG. Call Random() a few times to get a new map each round.
|
||||
var i = g_seed++;
|
||||
while (i--) Random(2);
|
||||
|
||||
// Map type 0: One big island; more small islands above
|
||||
// Map type 1: Only many small islands
|
||||
var t = SCENPAR_MapType;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Name=$MapType$
|
||||
Description=$DescMapType$
|
||||
ID=MapType
|
||||
Default=0
|
||||
Default=1
|
||||
|
||||
[Options]
|
||||
|
||||
|
@ -20,7 +20,7 @@ Default=0
|
|||
Name=$Weapons$
|
||||
Description=$DescWeapons$
|
||||
ID=Weapons
|
||||
Default=0
|
||||
Default=1
|
||||
|
||||
[Options]
|
||||
|
||||
|
@ -38,7 +38,7 @@ Default=0
|
|||
Name=$Rounds$
|
||||
Description=$DescRounds$
|
||||
ID=Rounds
|
||||
Default=1
|
||||
Default=7
|
||||
|
||||
[Options]
|
||||
|
||||
|
@ -61,3 +61,7 @@ Default=1
|
|||
[Option]
|
||||
Name=7
|
||||
Value=7
|
||||
|
||||
[Option]
|
||||
Name=11
|
||||
Value=11
|
||||
|
|
|
@ -21,8 +21,8 @@ func Initialize()
|
|||
func ResetRound()
|
||||
{
|
||||
// Retrieve all Clonks.
|
||||
var clonks = FindObjects(Find_OCF(OCF_CrewMember));
|
||||
for (var clonk in clonks)
|
||||
var clonks = [];
|
||||
for (var clonk in FindObjects(Find_OCF(OCF_CrewMember)))
|
||||
{
|
||||
var container = clonk->Contained();
|
||||
if (container)
|
||||
|
@ -30,12 +30,18 @@ func ResetRound()
|
|||
clonk->Exit();
|
||||
container->RemoveObject();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Players not waiting for a relaunch get a new Clonk to prevent
|
||||
// status effects from carrying over to the next round.
|
||||
var new_clonk = CreateObject(clonk->GetID(), 0, 0, clonk->GetOwner());
|
||||
new_clonk->GrabObjectInfo(clonk);
|
||||
clonk = new_clonk;
|
||||
}
|
||||
PushBack(clonks, clonk);
|
||||
clonk->SetObjectStatus(C4OS_INACTIVE);
|
||||
}
|
||||
// Clear and redraw the map.
|
||||
g_no_map = true;
|
||||
LoadScenarioSection("Empty");
|
||||
g_no_map = false;
|
||||
LoadScenarioSection("main");
|
||||
InitializeRound();
|
||||
// Re-enable the players.
|
||||
|
@ -208,7 +214,7 @@ func OnClonkDeath(object clonk)
|
|||
|
||||
// Check for victory after three seconds to allow stalemates.
|
||||
if (!g_gameover)
|
||||
g_check_victory_effect.Interval = 36 * 5;
|
||||
g_check_victory_effect.Interval = g_check_victory_effect.Time + 36 * 3;
|
||||
}
|
||||
|
||||
// Returns a list of colored player names, for example "Sven2, Maikel, Luchs"
|
||||
|
@ -252,7 +258,8 @@ global func FxCheckVictoryTimer(_, proplist effect)
|
|||
// Update the scoreboard.
|
||||
UpdateScoreboardWins(team);
|
||||
|
||||
if (--g_remaining_rounds > 0 || GetLeadingTeam() == nil)
|
||||
// The leading team has to win the last round.
|
||||
if (--g_remaining_rounds > 0 || GetLeadingTeam() != team)
|
||||
{
|
||||
var msg2 = CurrentRoundStr();
|
||||
Log(msg2);
|
||||
|
@ -277,8 +284,10 @@ global func CurrentRoundStr()
|
|||
return "$LastRound$";
|
||||
else if (g_remaining_rounds > 1)
|
||||
return Format("$RemainingRounds$", g_remaining_rounds);
|
||||
else
|
||||
else if (GetLeadingTeam() == nil)
|
||||
return "$Tiebreak$";
|
||||
else
|
||||
return "$BonusRound$";
|
||||
}
|
||||
|
||||
global func UpdateScoreboardWins(int team)
|
||||
|
|
|
@ -17,3 +17,4 @@ WinningTeam=Gewinner: %s
|
|||
RemainingRounds=Noch %d Runden.
|
||||
LastRound=Letzte Runde!
|
||||
Tiebreak=Entscheidende Runde!
|
||||
BonusRound=Bonusrunde!
|
||||
|
|
|
@ -17,3 +17,4 @@ WinningTeam=Winning team: %s
|
|||
RemainingRounds=%d rounds remaining.
|
||||
LastRound=Last round!
|
||||
Tiebreak=Tiebreak!
|
||||
BonusRound=Bonus round!
|
||||
|
|
|
@ -12,6 +12,5 @@ VertexCNAT=1,2,16
|
|||
VertexFriction=30,30,30
|
||||
Value=8
|
||||
Mass=12
|
||||
Components=Ice=2
|
||||
Rotate=1
|
||||
Picture=0,20,64,64
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
public func ControlUse(object pClonk)
|
||||
{
|
||||
Sound("Fire::Blast3");
|
||||
Sound("Fire::Blast3*");
|
||||
Exit(0,-GetY());
|
||||
AddEffect("ThunderStrike",nil,100,1,nil,this->GetID(),pClonk->GetOwner(),this->GetX()-5);
|
||||
RemoveObject();
|
||||
|
|
|
@ -5,5 +5,4 @@ Category=C4D_StaticBack
|
|||
Width=55
|
||||
Height=17
|
||||
Offset=-27,-8
|
||||
Mass=1000
|
||||
Components=GoldBar=20
|
||||
Mass=1000
|
|
@ -11,6 +11,5 @@ VertexY=-3,3
|
|||
VertexFriction=50,50
|
||||
Value=1
|
||||
Mass=2
|
||||
Components=Wood=1
|
||||
Rotate=1
|
||||
StretchGrowth=1
|
||||
|
|
|
@ -11,6 +11,5 @@ VertexY=-5,-4,-5,5,5
|
|||
VertexFriction=50,50,50,50,50
|
||||
Value=2
|
||||
Mass=6
|
||||
Components=Wood=1
|
||||
Rotate=1
|
||||
StretchGrowth=1
|
||||
|
|
|
@ -10,7 +10,6 @@ VertexX=0,0,0,0,0,0,0,0,0,0
|
|||
VertexY=40,38,30,20,10,0,-10,-20,-30,-35
|
||||
VertexCNAT=8,16,16,16,16,16,16,16,16,4
|
||||
VertexFriction=50,50,25,25,25,25,25,50,50,50
|
||||
Components=Wood=5
|
||||
Mass=120
|
||||
StretchGrowth=1
|
||||
Oversize=1
|
||||
|
|
|
@ -10,7 +10,6 @@ VertexX=0,0,0,0,0,0,0,0,0,0
|
|||
VertexY=40,38,30,20,10,0,-10,-20,-30,-35
|
||||
VertexCNAT=8,16,16,16,16,16,16,16,16,4
|
||||
VertexFriction=50,50,25,25,25,25,25,50,50,50
|
||||
Components=Wood=5
|
||||
Mass=150
|
||||
StretchGrowth=1
|
||||
Oversize=1
|
||||
|
|
|
@ -18,4 +18,5 @@ local Name = "$Name$";
|
|||
local Touchable = 0;
|
||||
local BlastIncinerate = 2;
|
||||
local ContactIncinerate = 6;
|
||||
local NoBurnDecay = 1;
|
||||
local NoBurnDecay = 1;
|
||||
local Components = {Wood = 5};
|
|
@ -10,7 +10,6 @@ VertexX=0,0,0,0,0
|
|||
VertexY=20,10,0,-10,-20
|
||||
VertexCNAT=8,16,16,16,4
|
||||
VertexFriction=50,25,25,25,50
|
||||
Components=Wood=5
|
||||
Mass=150
|
||||
StretchGrowth=1
|
||||
Oversize=1
|
||||
|
|
|
@ -10,7 +10,6 @@ VertexX=0,0,0,0,0
|
|||
VertexY=20,10,0,-10,-20
|
||||
VertexCNAT=8,16,16,16,4
|
||||
VertexFriction=50,25,25,25,50
|
||||
Components=Wood=4
|
||||
Mass=110
|
||||
StretchGrowth=1
|
||||
Oversize=1
|
||||
|
|
|
@ -18,4 +18,5 @@ local Name = "$Name$";
|
|||
local Touchable = 0;
|
||||
local BlastIncinerate = 2;
|
||||
local ContactIncinerate = 6;
|
||||
local NoBurnDecay = 1;
|
||||
local NoBurnDecay = 1;
|
||||
local Components = {Wood = 4};
|
|
@ -11,7 +11,6 @@ VertexY=1,-1,-1
|
|||
VertexFriction=20
|
||||
Value=1
|
||||
Mass=10
|
||||
Components=EnvPack_ManaAltar=1
|
||||
Projectile=1
|
||||
Rotate=1
|
||||
|
||||
|
|
|
@ -11,6 +11,5 @@ VertexY=0,0,0,6,6
|
|||
VertexFriction=100,100,100,100,100
|
||||
VertexCNAT=64,1,2,1,2
|
||||
SolidMask=0,0,20,20,0,0
|
||||
Components=Wood=4;
|
||||
Construction=1
|
||||
Mass=10
|
||||
|
|
|
@ -10,6 +10,5 @@ VertexX=-11,11,-11,11
|
|||
VertexY=-10,-10,58,58
|
||||
VertexFriction=50,50,100,100
|
||||
Mass=4500
|
||||
Components=Metal=2;Wood=4;
|
||||
Exclusive=1
|
||||
Construction=1
|
|
@ -1,19 +0,0 @@
|
|||
[DefCore]
|
||||
id=Moss
|
||||
Version=6,0
|
||||
Category=C4D_Object
|
||||
Width=8
|
||||
Height=8
|
||||
Offset=-4,-4
|
||||
Picture=0,0,64,64
|
||||
Vertices=3
|
||||
VertexX=0,2,-2
|
||||
VertexY=1,-1,-1
|
||||
VertexFriction=75,75
|
||||
Value=5
|
||||
Mass=5
|
||||
Components=Wood=2;
|
||||
Rotate=1
|
||||
Rotate=1
|
||||
Float=1
|
||||
Collectible=1
|
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 7.5 KiB |
|
@ -1,7 +0,0 @@
|
|||
[DefCore]
|
||||
id=Moss_Lichen
|
||||
Version=6,0
|
||||
Category=C4D_StaticBack | C4D_Object
|
||||
Width=20
|
||||
Height=20
|
||||
Offset=-10,-10
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 16 KiB |
|
@ -1,140 +0,0 @@
|
|||
/*-- Vine --*/
|
||||
|
||||
static const MOSS_MINDIST = 17;
|
||||
static const MOSS_MAXDIST = 20;
|
||||
static const MOSS_WATERMAXDIST = 17;
|
||||
static const MOSS_MINBURIED = 50;
|
||||
|
||||
|
||||
local size;
|
||||
local maxsize;
|
||||
local waterpos;
|
||||
local buriedtime;
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
this.Plane=301+Random(230);
|
||||
SetPosition(GetX(),GetY()+10);
|
||||
var graphic = Random(3);
|
||||
if(graphic)
|
||||
SetGraphics(Format("%d",graphic));
|
||||
size = 1;
|
||||
buriedtime = 0;
|
||||
waterpos = [0,0];
|
||||
SetObjDrawTransform(10,0,0,0,10);
|
||||
maxsize=150+Random(30);
|
||||
SetR(Random(360));
|
||||
SetClrModulation(RGBa(235+Random(20),235+Random(20),235+Random(20),255-Random(30)));
|
||||
AddEffect("MossGrow", this, 100, 20, this, this.ID);
|
||||
|
||||
}
|
||||
|
||||
func IsProjectileTarget(weapon){return weapon->GetID() == Sword;}
|
||||
public func CanBeHitByShockwaves() { return true; }
|
||||
public func Incineration()
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
public func Damage()
|
||||
{
|
||||
if (GetDamage() > (size/4)) Destroy();
|
||||
}
|
||||
|
||||
private func Destroy()
|
||||
{
|
||||
if(Random(maxsize+35)<size) CreateObjectAbove(Moss,0,0,-1);
|
||||
var particles =
|
||||
{
|
||||
Size = PV_Random(3, 7),
|
||||
Alpha = PV_KeyFrames(0, 0, 255, 900, 255, 1000, 0),
|
||||
ForceY = PV_Gravity(40),
|
||||
DampingX = 900, DampingY = 900,
|
||||
CollisionVertex = 750,
|
||||
OnCollision = PC_Stop(),
|
||||
Rotation = PV_Direction(PV_Random(900, 1100)),
|
||||
Phase = PV_Random(0, 1)
|
||||
};
|
||||
CreateParticle("Lichen", PV_Random(-5, 5), PV_Random(-5, 5), PV_Random(-30, 30), PV_Random(-30, 30), PV_Random(36, 36 * 4), particles, 40);
|
||||
RemoveObject();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected func Replicate()
|
||||
{
|
||||
|
||||
var x = RandomX(-MOSS_MAXDIST,MOSS_MAXDIST);
|
||||
var y = RandomX(-MOSS_MAXDIST,MOSS_MAXDIST);
|
||||
var i = 0;
|
||||
var good=false;
|
||||
while(i<10)
|
||||
{
|
||||
if(GetMaterial(x,y)!=Material("Earth") && GetMaterial(x,y)!=Material("Tunnel"))
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if(FindObject(Find_ID(Moss_Lichen),Find_Distance(MOSS_MINDIST,x,y)))
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if(Distance(0,0,x,y)>MOSS_MAXDIST)
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
good = true;
|
||||
break;
|
||||
}
|
||||
if(!good) return ;
|
||||
for(var i=2+Random(5); i>0; i--)
|
||||
if(ExtractLiquid(waterpos[0],waterpos[1]) != Material("Water")) return -1;
|
||||
CreateObjectAbove(Moss_Lichen,x,y,-1);
|
||||
buriedtime = -Random(MOSS_MINBURIED);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private func FxMossGrowTimer(target, effect, time)
|
||||
{
|
||||
if(GetMaterial() != Material("Earth") && GetMaterial() != Material("Tunnel"))
|
||||
{
|
||||
Destroy();
|
||||
return 1;
|
||||
}
|
||||
if(size < maxsize)
|
||||
size++;
|
||||
SetObjDrawTransform(10*size+1,0,0,0,10*size+1 );
|
||||
|
||||
if(GetMaterial(waterpos[0],waterpos[1]) != Material("Water"))
|
||||
{
|
||||
SearchWater();
|
||||
buriedtime = Min(buriedtime+1, MOSS_MINBURIED / 3 * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
buriedtime++;
|
||||
if(buriedtime>MOSS_MINBURIED)
|
||||
Replicate();
|
||||
}
|
||||
}
|
||||
|
||||
func SearchWater()
|
||||
{
|
||||
for(var i = 0; i < 5; i++)
|
||||
{
|
||||
waterpos[0] = RandomX(-MOSS_WATERMAXDIST,MOSS_WATERMAXDIST);
|
||||
waterpos[1] = RandomX(-MOSS_WATERMAXDIST,MOSS_WATERMAXDIST);
|
||||
if(GetMaterial(waterpos[0],waterpos[1]) == Material("Water"))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
local BlastIncinerate = 1;
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
/*-- Moss --*/
|
||||
|
||||
static const MOSS_MAXWETNESS = 30;
|
||||
static const MOSS_LICHENDELAY = 30;
|
||||
local wetness;
|
||||
local graphic;
|
||||
local lastpos;
|
||||
local still;
|
||||
func Initialize()
|
||||
{
|
||||
graphic = Random(3);
|
||||
if(graphic)
|
||||
SetGraphics(Format("%d",graphic));
|
||||
else SetGraphics();
|
||||
wetness = MOSS_MAXWETNESS;
|
||||
lastpos = CreateArray();
|
||||
AddEffect("MossMoisture",this,100,36,this,this.ID);
|
||||
still=0;
|
||||
}
|
||||
|
||||
|
||||
private func FxMossMoistureTimer(target, effect, time)
|
||||
{
|
||||
if(GetMaterial() == Material("Water"))
|
||||
{
|
||||
|
||||
if(wetness < MOSS_MAXWETNESS)
|
||||
{
|
||||
wetness = MOSS_MAXWETNESS;
|
||||
if(graphic)
|
||||
SetGraphics(Format("%d",graphic));
|
||||
SetGraphics();
|
||||
}
|
||||
if([GetX(),GetY()]==lastpos)
|
||||
still++;
|
||||
else
|
||||
still=0;
|
||||
if(still>MOSS_LICHENDELAY)
|
||||
TryToLichen();
|
||||
lastpos=[GetX(),GetY()];
|
||||
}
|
||||
|
||||
else if(!Contained() && !GBackSolid() && !GBackLiquid())
|
||||
if(wetness)
|
||||
{
|
||||
wetness--;
|
||||
if(wetness == 0)
|
||||
{
|
||||
if(graphic)
|
||||
SetGraphics(Format("%dDry",graphic));
|
||||
else SetGraphics("Dry");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected func TryToLichen()
|
||||
{
|
||||
|
||||
var x = RandomX(-MOSS_MAXDIST,MOSS_MAXDIST);
|
||||
var y = RandomX(-MOSS_MAXDIST,MOSS_MAXDIST);
|
||||
var i = 0;
|
||||
var good=false;
|
||||
while(i<10)
|
||||
{
|
||||
if(GetMaterial(x,y)!=Material("Earth") && GetMaterial(x,y)!=Material("Tunnel"))
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if(FindObject(Find_ID(Moss_Lichen),Find_Distance(MOSS_MINDIST,x,y)))
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if(Distance(0,0,x,y)>MOSS_MAXDIST)
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
good = true;
|
||||
break;
|
||||
}
|
||||
if(!good) return ;
|
||||
|
||||
CreateObjectAbove(Moss_Lichen,x,y,-1);
|
||||
still = -MOSS_LICHENDELAY-Random(MOSS_LICHENDELAY);
|
||||
|
||||
}
|
||||
|
||||
local Collectible = 1;
|
||||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
local BlastIncinerate = 1;
|
||||
local ContactIncinerate = 1;
|
|
@ -1,2 +0,0 @@
|
|||
Name=Moos
|
||||
Description=Moos wächst unterirdisch nahe des Wassers. Zum kultivieren ins Wasser nahe Erde legen. Zum trocknen kontakt mit Wasser vermeiden. Kultivieren und trocknen dauern seine Zeit.
|
|
@ -1,2 +0,0 @@
|
|||
Name=Moss
|
||||
Description=Moss grows close to subterraen ponds. Place in water next to earth to cultivate. To dry, put anywhere but water. Cultivation and drying take some time.
|
|
@ -11,5 +11,4 @@ VertexY=1,-1,-1
|
|||
VertexFriction=50,50,50
|
||||
Value=10
|
||||
Mass=15
|
||||
Components=Metal=1
|
||||
Picture=0,6,64,64
|
||||
|
|
|
@ -11,6 +11,5 @@ VertexY=-9,0,12,12,12
|
|||
VertexFriction=50,50,100,100,100
|
||||
Value=40
|
||||
Mass=5
|
||||
#Components=Metal=1
|
||||
Exclusive=1
|
||||
Construction=1
|
|
@ -11,5 +11,4 @@ VertexY=-6,-5,-5,7,7
|
|||
VertexCNAT=5,6,9,10
|
||||
VertexFriction=50,80,80,30,30
|
||||
Value=20
|
||||
Mass=150
|
||||
Components=Metal=1
|
||||
Mass=150
|
|
@ -12,7 +12,6 @@ VertexCNAT=5,6,9,10
|
|||
VertexFriction=80,80,10,10
|
||||
Value=20
|
||||
Mass=75
|
||||
Components=Metal=2;Wood=1;
|
||||
Collection=-12,-8,24,10
|
||||
GrabPutGet=C4D_GrabGet|C4D_GrabPut
|
||||
Rotate=30
|
||||
|
|
|
@ -11,6 +11,5 @@ VertexY=-2,2
|
|||
VertexFriction=25,25
|
||||
Timer=1
|
||||
TimerCall=WatchUpdate
|
||||
Components=Metal=1;
|
||||
Value=6
|
||||
Mass=3
|
||||
|
|
|
@ -20,6 +20,9 @@ uniform sampler1D matMapTex;
|
|||
uniform float materialDepth;
|
||||
uniform vec2 materialSize;
|
||||
|
||||
// for SetMatAdjust
|
||||
uniform vec4 clrMod;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
// Expected parameters for the scaler
|
||||
|
@ -154,4 +157,6 @@ slice(color) {
|
|||
slice(color+10) {
|
||||
// Mix second color into main color according to scaler
|
||||
fragColor = mix(color2, fragColor, scalerPx.r);
|
||||
// Apply modulation
|
||||
fragColor *= clrMod;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,11 @@ uniform mat3x4 bones[MAX_BONE_COUNT];
|
|||
// For more performance, this should be set by the engine, and this shader
|
||||
// should be compiled three times: with BONE_COUNT set to 0, 4, and 8,
|
||||
// respectively. (Or we could split it even further.)
|
||||
#ifndef OC_WA_FORCE_SOFTWARE_TRANSFORM
|
||||
#define BONE_COUNT 8
|
||||
#else
|
||||
#define BONE_COUNT 0
|
||||
#endif
|
||||
|
||||
in vec4 oc_BoneIndices0;
|
||||
in vec4 oc_BoneWeights0;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
[Material]
|
||||
Name=Oil
|
||||
Density=25
|
||||
Instable=1
|
||||
MaxAirSpeed=25
|
||||
MaxSlide=10000
|
||||
WindDrift=30
|
||||
Inflammable=1
|
||||
Placement=10
|
||||
TextureOverlay=oil
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
19=DuroLava-lava_red
|
||||
20=Water-water
|
||||
#21=Oil-oil
|
||||
21=Oil-oil
|
||||
22=Acid-acid
|
||||
23=Lava-lava_red
|
||||
25=Water-water
|
||||
|
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 251 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 251 KiB |
After Width: | Height: | Size: 9.4 KiB |
|
@ -11,7 +11,6 @@ VertexY=0
|
|||
VertexFriction=100
|
||||
Value=50
|
||||
Mass=50
|
||||
Components=Metal=2
|
||||
Picture=0,0,32,32
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
|
|
|
@ -42,9 +42,9 @@ public func GetDescription(int plr)
|
|||
{
|
||||
var message;
|
||||
if (IsFulfilled())
|
||||
message = "$MsgGoalFulfilled$";
|
||||
message = Format("$MsgGoalFulfilled$", victim_name);
|
||||
else
|
||||
message = "$MsgGoalUnFulfilled$";
|
||||
message = Format("$MsgGoalUnFulfilled$", victim_name);
|
||||
return message;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,5 @@ VertexX=-5,12
|
|||
VertexY=32,32
|
||||
VertexFriction=100,100
|
||||
Mass=300
|
||||
Components=Rock=10;Metal=5;
|
||||
Rotate=0
|
||||
|
||||
|
|
|
@ -10,5 +10,4 @@ VertexX=-6,-4,0,6,8,2,-2
|
|||
VertexY=0,-7,-8,-8,0,8,6
|
||||
VertexFriction=50,50,50,50,50,50,50
|
||||
Mass=150
|
||||
Components=Rock=3;Metal=1;
|
||||
Rotate=1
|
||||
|
|
|
@ -10,6 +10,5 @@ VertexX=-40,40
|
|||
VertexY=34,34
|
||||
VertexFriction=100,100
|
||||
Mass=300
|
||||
Components=Ruby=6;Amethyst=6;Metal=6;
|
||||
Rotate=0
|
||||
Construction=1
|
||||
|
|
|
@ -18,7 +18,7 @@ public func SetConstructionSiteOverlay(object site, int dir, object stick, objec
|
|||
// Play component-specific sound for adding stuff to the site
|
||||
if (component_obj && !component_obj->GetDefFragile()) component_obj->~Hit();
|
||||
// Construction site graphics by provided metal
|
||||
var metal_completion = site->ContentsCount(Metal) * 3 / Max(GetComponent(Metal, nil, nil, this), 1);
|
||||
var metal_completion = site->ContentsCount(Metal) * 3 / Max(GetComponent(Metal, nil), 1);
|
||||
site->SetGraphics(["Site0", "Site1", "Site2", nil][metal_completion], CrystalCommunicator, 1, GFXOV_MODE_Base);
|
||||
site->SetGraphics(nil, nil, 2);
|
||||
// Add graphics of contained gems
|
||||
|
@ -355,3 +355,4 @@ local Name = "$Name$";
|
|||
local Description = "$Description$";
|
||||
local Touchable = 0;
|
||||
local Plane = 280;
|
||||
local Components = {Ruby = 6, Amethyst = 6, Metal = 6};
|
||||
|
|
|
@ -80,7 +80,7 @@ global func FxIntIntroStart(object target, proplist effect)
|
|||
|
||||
effect.Dialog = effect.Sister->SetDialogue("Sister");
|
||||
effect.Rock = effect.Sister->CreateContents(Rock);
|
||||
effect.Rock->SetObjectLayer(0);
|
||||
effect.Rock->SetObjectLayer(nil);
|
||||
effect.Players = [];
|
||||
}
|
||||
|
||||
|
|
|
@ -10,5 +10,4 @@ VertexX=-2,3,2,-3
|
|||
VertexY=-2,1,2,-1
|
||||
Value=15
|
||||
Mass=4
|
||||
Components=Metal=1
|
||||
Rotate=1
|
||||
|
|
|
@ -166,10 +166,10 @@ func Attack_8()
|
|||
npc.ActMap = Clonk.ActMap;
|
||||
npc->SetAction("Walk");
|
||||
}
|
||||
npc_newton->SetCommand("MoveTo", 0, 422, 342);
|
||||
npc_lara->SetCommand("MoveTo", 0, 455, 358);
|
||||
npc_lisa->SetCommand("MoveTo", 0, 474, 358);
|
||||
npc_woody->SetCommand("MoveTo", 0, 493, 358);
|
||||
npc_newton->SetCommand("MoveTo", nil, 422, 342);
|
||||
npc_lara->SetCommand("MoveTo", nil, 455, 358);
|
||||
npc_lisa->SetCommand("MoveTo", nil, 474, 358);
|
||||
npc_woody->SetCommand("MoveTo", nil, 493, 358);
|
||||
return ScheduleNext(150);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,5 @@ VertexX=-22,-22,0,0,20,20
|
|||
VertexY=7,-7,7,-7,-8,1
|
||||
VertexFriction=30,60,30,60,60,30
|
||||
Mass=100
|
||||
Components=Wood=3;Metal=2;
|
||||
Rotate=1
|
||||
Float=1
|
||||
|
|
|
@ -11,6 +11,5 @@ VertexY=14,14
|
|||
VertexFriction=100,100
|
||||
Value=200
|
||||
Mass=4000
|
||||
Components=Airplane_Propeller=1;Airplane_Chassis=1;Airplane_Skids=1;Airplane_Engine=1;Airplane_Wings=1;
|
||||
Construction=0
|
||||
Rotate=0
|
||||
|
|
|
@ -10,6 +10,5 @@ VertexX=-3,-3,5,5
|
|||
VertexY=-3,3,-3,3
|
||||
VertexFriction=60,60,60,60
|
||||
Mass=20
|
||||
Components=Metal=10;
|
||||
Rotate=1
|
||||
Float=1
|
||||
|
|
|
@ -24,3 +24,4 @@ local Collectible = true;
|
|||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
local HitPoints = 20;
|
||||
local Components = {Metal = 10};
|
||||
|
|
|
@ -10,6 +10,5 @@ VertexX=-4,3,3
|
|||
VertexY=0,-4,4
|
||||
VertexFriction=60,60,60
|
||||
Mass=20
|
||||
Components=Wood=1;Metal=1;
|
||||
Rotate=1
|
||||
Float=1
|
||||
|
|
|
@ -11,7 +11,6 @@ VertexY=1,1,7,7
|
|||
VertexCNAT=5,6,9,10
|
||||
VertexFriction=80,80,10,10
|
||||
Mass=20
|
||||
Components=Metal=2;
|
||||
Rotate=1
|
||||
Float=0
|
||||
UprightAttach=8
|
|
@ -11,7 +11,6 @@ VertexY=-16,-16,16,16
|
|||
VertexCNAT=5,6,9,10
|
||||
VertexFriction=60,60,60,60
|
||||
Mass=50
|
||||
Components=Wood=2;Metal=1;
|
||||
Rotate=1
|
||||
Float=0
|
||||
UprightAttach=8
|
||||
|
|
|
@ -10,7 +10,6 @@ VertexX=-15,15,-15,15
|
|||
VertexY=-15,-15,15,15
|
||||
VertexFriction=50,50,100,100
|
||||
Mass=1000
|
||||
Components=Wood=1
|
||||
Exclusive=1
|
||||
Construction=1
|
||||
IncompleteActivity=1
|
|
@ -12,6 +12,8 @@ public func Construction()
|
|||
return _inherited(...);
|
||||
}
|
||||
|
||||
public func IsHammerBuildable() { return true; }
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
return _inherited(...);
|
||||
|
@ -243,3 +245,4 @@ local ContainBlast = true;
|
|||
local BlastIncinerate = 100;
|
||||
local HitPoints = 30;
|
||||
local Plane = 120;
|
||||
local Components = {Wood = 1};
|
||||
|
|
|
@ -7,4 +7,3 @@ Height=32
|
|||
Offset=0,0
|
||||
Vertices=1
|
||||
Mass=100
|
||||
Components=Wood=1
|
||||
|
|
|
@ -11,5 +11,4 @@ VertexY=0,-4,0,4
|
|||
VertexFriction=70,70,70,70
|
||||
Value=250
|
||||
Mass=16
|
||||
Components=Ruby=3;Amethyst=3
|
||||
Rotate=1
|
||||
|
|