Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyCommandCenter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dawid Lukasz Abucewicz
PyCommandCenter
Commits
e6d8f4f8
Commit
e6d8f4f8
authored
6 years ago
by
David Bergström
Browse files
Options
Downloads
Patches
Plain Diff
Always use the prefix is_ for boolean methods
parent
7abf8c26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python-api-src/lib_base_location.cpp
+1
-1
1 addition, 1 deletion
python-api-src/lib_base_location.cpp
python-api-src/lib_unit.cpp
+11
-11
11 additions, 11 deletions
python-api-src/lib_unit.cpp
with
12 additions
and
12 deletions
python-api-src/lib_base_location.cpp
+
1
−
1
View file @
e6d8f4f8
...
...
@@ -7,7 +7,7 @@ void define_base_location(py::module & m)
py
::
class_
<
BaseLocation
>
(
m
,
"BaseLocation"
)
.
def_property_readonly
(
"geysers"
,
&
BaseLocation
::
getGeysers
)
.
def_property_readonly
(
"minerals"
,
&
BaseLocation
::
getMinerals
)
.
def_property_readonly
(
"start_location"
,
&
BaseLocation
::
isStartLocation
)
.
def_property_readonly
(
"
is_
start_location"
,
&
BaseLocation
::
isStartLocation
)
.
def_property_readonly
(
"depot_position"
,
&
BaseLocation
::
getDepotPosition
)
.
def_property_readonly
(
"position"
,
&
BaseLocation
::
getPosition
)
.
def
(
"get_ground_distance"
,
py
::
overload_cast
<
const
CCPosition
&>
(
&
BaseLocation
::
getGroundDistance
,
py
::
const_
))
...
...
This diff is collapsed.
Click to expand it.
python-api-src/lib_unit.cpp
+
11
−
11
View file @
e6d8f4f8
...
...
@@ -15,17 +15,17 @@ void define_unit(py::module & m)
.
def_property_readonly
(
"id"
,
&
Unit
::
getID
)
.
def_property_readonly
(
"build_percentage"
,
&
Unit
::
getBuildPercentage
)
.
def_property_readonly
(
"weapon_cooldown"
,
&
Unit
::
getWeaponCooldown
)
.
def_property_readonly
(
"completed"
,
&
Unit
::
isCompleted
)
.
def_property_readonly
(
"being_constructed"
,
&
Unit
::
isBeingConstructed
)
.
def_property_readonly
(
"cloaked"
,
&
Unit
::
isCloaked
)
.
def_property_readonly
(
"flying"
,
&
Unit
::
isFlying
)
.
def_property_readonly
(
"alive"
,
&
Unit
::
isAlive
)
.
def_property_readonly
(
"powered"
,
&
Unit
::
isPowered
)
.
def_property_readonly
(
"idle"
,
&
Unit
::
isIdle
)
.
def_property_readonly
(
"burrowed"
,
&
Unit
::
isBurrowed
)
.
def_property_readonly
(
"valid"
,
&
Unit
::
isValid
)
.
def_property_readonly
(
"training"
,
&
Unit
::
isTraining
)
.
def_property_readonly
(
"constructing"
,
&
Unit
::
isConstructing
)
.
def_property_readonly
(
"
is_
completed"
,
&
Unit
::
isCompleted
)
.
def_property_readonly
(
"
is_
being_constructed"
,
&
Unit
::
isBeingConstructed
)
.
def_property_readonly
(
"
is_
cloaked"
,
&
Unit
::
isCloaked
)
.
def_property_readonly
(
"
is_
flying"
,
&
Unit
::
isFlying
)
.
def_property_readonly
(
"
is_
alive"
,
&
Unit
::
isAlive
)
.
def_property_readonly
(
"
is_
powered"
,
&
Unit
::
isPowered
)
.
def_property_readonly
(
"
is_
idle"
,
&
Unit
::
isIdle
)
.
def_property_readonly
(
"
is_
burrowed"
,
&
Unit
::
isBurrowed
)
.
def_property_readonly
(
"
is_
valid"
,
&
Unit
::
isValid
)
.
def_property_readonly
(
"
is_
training"
,
&
Unit
::
isTraining
)
.
def_property_readonly
(
"
is_
constructing"
,
&
Unit
::
isConstructing
)
.
def
(
"stop"
,
&
Unit
::
stop
)
.
def
(
"attack_unit"
,
&
Unit
::
attackUnit
)
.
def
(
"attack_move"
,
&
Unit
::
attackMove
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment