[os-devel] SF.net SVN: ospace:[333] branches/ospace_0.5/server/lib/ige/ospace/IPlanet. py
Brought to you by:
qark
|
From: <qa...@us...> - 2012-07-20 08:58:05
|
Revision: 333
http://ospace.svn.sourceforge.net/ospace/?rev=333&view=rev
Author: qark
Date: 2012-07-20 08:57:59 +0000 (Fri, 20 Jul 2012)
Log Message:
-----------
Buildings now remains switched on (fix for github issue #1)
Modified Paths:
--------------
branches/ospace_0.5/server/lib/ige/ospace/IPlanet.py
Modified: branches/ospace_0.5/server/lib/ige/ospace/IPlanet.py
===================================================================
--- branches/ospace_0.5/server/lib/ige/ospace/IPlanet.py 2012-07-19 21:14:40 UTC (rev 332)
+++ branches/ospace_0.5/server/lib/ige/ospace/IPlanet.py 2012-07-20 08:57:59 UTC (rev 333)
@@ -309,7 +309,7 @@
def processINITPhase(self, tran, obj, data):
# get rid of the NEW states
for struct in obj.slots:
- struct[STRUCT_IDX_STATUS] &= ~STRUCT_STATUS_NEW
+ struct[STRUCT_IDX_STATUS] &= STRUCT_STATUS_RESETFLGS
processINITPhase.public = 1
processINITPhase.accLevel = AL_ADMIN
@@ -377,6 +377,7 @@
# reset of "morale modifier by buildings" value
obj.moraleModifiers[1] = 0
for struct in obj.slots:
+ # skip structure if it was built this turn
if struct[STRUCT_IDX_STATUS] & STRUCT_STATUS_NEW:
continue
tech = Rules.techs[struct[STRUCT_IDX_TECHID]]
@@ -391,7 +392,6 @@
if obj.autoMinStor:
obj.minBio += tech.operBio * Rules.autoMinStorTurns
obj.minEn += tech.operEn * Rules.autoMinStorTurns
- struct[STRUCT_IDX_STATUS] &= STRUCT_STATUS_RESETFLGS
# each structure accomodate it's workers
obj.maxPop += tech.operWorkers
# produce/consume resources
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|