[Fix] Mission emp_collective00.lua is working again.

This commit is contained in:
Allanis 2013-08-26 15:23:27 +01:00
parent 4fa786ce21
commit 68a82bd3c9
3 changed files with 12 additions and 10 deletions

View File

@ -46,8 +46,8 @@
<unique>1</unique>
</flags>
<avail>
<cond>var.peek("es_cargo") == true and space.getSystem("NGC-7291"):jumpDist() &lt; 5 and player.getFaction("Empire") &gt; 5 and player.getRating() &gt; 10</cond>
<chance>60</chance>
<cond>var.peek("es_cargo") == true and space.getSystem("NGC-7291"):jumpDist() &lt; 5 and player.getFaction("Empire") &gt; 5 and player.getRating() &gt; 5</cond>
<chance>80</chance>
<location>Bar</location>
<faction>Empire</faction>
</avail>
@ -58,7 +58,7 @@
<unique>1</unique>
</flags>
<avail>
<cond>player.getFaction("Empire") > 30</cond>
<cond>player.getFaction("Empire") &gt; 5</cond>
<done>Collective Scouting</done>
<chance>100</chance>
<location>Bar</location>
@ -71,7 +71,7 @@
<unique>1</unique>
</flags>
<avail>
<cond>player.getFaction("Empire") > 30</cond>
<cond>player.getFaction("Empire") &gt; 5</cond>
<done>Collective Espionage 1</done>
<chance>100</chance>
<location>Bar</location>

View File

@ -63,11 +63,11 @@ function enter()
end
end
-- update mission.
-- Update mission.
if misn_stage == 0 and sys == misn_target then
misn.setDesc(string.format(misn_desc[2], misn_base:name() ,misn_base_sys:name()))
misn_stage = 1
misn.setMarker(misn_base_sys:name()) -- Now we mark return to base.
misn.setMarker(misn_base_sys) -- Now we mark return to base.
end
end

View File

@ -166,8 +166,7 @@ static int planetL_get(lua_State* L) {
/* Get a planet by name. */
else if(lua_isstring(L, 1)) {
i = faction_get((char*)lua_tostring(L, 1));
planets = space_getFactionPlanet(&nplanets, &i, 1);
rndplanet = (char*) lua_tostring(L, 1);
}
/* Get a planet from faction list. */
@ -295,12 +294,15 @@ int lua_issystem(lua_State* L, int ind) {
/* Get a system. */
static int systemL_get(lua_State* L) {
LLUA_MIN_ARGS(1);
LuaSystem sys;
LuaPlanet* p;
/* Get the current system with no parameters. */
if(lua_gettop(L) == 0) {
sys.s = cur_system;
}
/* Passing a string (systemname) */
if(lua_isstring(L, 1)) {
else if(lua_isstring(L, 1)) {
sys.s = system_get((char*)lua_tostring(L, 1));
}
/* Passing a planet */