File: techs.macros

package info (click to toggle)
freeorion 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 194,940 kB
  • sloc: cpp: 186,508; python: 40,969; ansic: 1,164; xml: 719; makefile: 32; sh: 7
file content (26 lines) | stat: -rw-r--r-- 1,038 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

// In typical usage this is used as a plain macro, not a substitution macro; the substitution is instead done within the calling macro
EMPIRE_OWNED_SHIP_WITH_PART
'''
            And [
                Ship
                OwnedBy empire = Source.Owner
                DesignHasPart  name = "@1@"
            ]
'''

// For inclusion in a scope macro for an upgrade increase to a Max type meter (MaxCapacity or MaxSecondaryStat), and that scope 
// should have already limited scope to ships owned by an empire
// In most cases the substitution provided for @1@ may simply be "CurrentContent" (without the quote marks) but
// if providing an explicit tech name then include quotes with the substitution, 
// i.e., either use
// SHIP_PART_UPGRADE_RESUPPLY_CHECK("SOME_TECH")
// or
// SHIP_PART_UPGRADE_RESUPPLY_CHECK(CurrentContent)
SHIP_PART_UPGRADE_RESUPPLY_CHECK
'''
           ( LocalCandidate.LastTurnResupplied >= TurnTechResearched empire = LocalCandidate.Owner name = @1@ )
'''

ARBITRARY_BIG_NUMBER_FOR_METER_TOPUP
''' 1000000 '''