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
Axel Gard
PyCommandCenter
Commits
69f72c6f
Commit
69f72c6f
authored
5 years ago
by
David Bergström
Browse files
Options
Downloads
Patches
Plain Diff
Correct some whitespace errors
parent
1fc8bfaa
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
python-api-src/library.cpp
+0
-6
0 additions, 6 deletions
python-api-src/library.cpp
src/TechTree.cpp
+2
-2
2 additions, 2 deletions
src/TechTree.cpp
src/TechTreeImproved.cpp
+1
-1
1 addition, 1 deletion
src/TechTreeImproved.cpp
src/TechTreeImproved.h
+2
-2
2 additions, 2 deletions
src/TechTreeImproved.h
with
5 additions
and
11 deletions
python-api-src/library.cpp
+
0
−
6
View file @
69f72c6f
...
@@ -39,23 +39,17 @@ PYBIND11_MODULE(library, m)
...
@@ -39,23 +39,17 @@ PYBIND11_MODULE(library, m)
m
.
attr
(
"PLAYER_NEUTRAL"
)
=
py
::
int_
((
int
)
Players
::
Neutral
);
m
.
attr
(
"PLAYER_NEUTRAL"
)
=
py
::
int_
((
int
)
Players
::
Neutral
);
m
.
attr
(
"PLAYER_ALLY"
)
=
py
::
int_
((
int
)
Players
::
Ally
);
m
.
attr
(
"PLAYER_ALLY"
)
=
py
::
int_
((
int
)
Players
::
Ally
);
/*
TODO: BuffID is not defined, defined as following by Blizzard:
typedef SC2Type<BUFF_ID> BuffID;
*/
py
::
class_
<
sc2
::
BuffID
>
(
m
,
"BuffID"
)
py
::
class_
<
sc2
::
BuffID
>
(
m
,
"BuffID"
)
.
def
(
py
::
init
<
sc2
::
BUFF_ID
>
());
.
def
(
py
::
init
<
sc2
::
BUFF_ID
>
());
py
::
implicitly_convertible
<
sc2
::
BUFF_ID
,
sc2
::
BuffID
>
();
py
::
implicitly_convertible
<
sc2
::
BUFF_ID
,
sc2
::
BuffID
>
();
py
::
class_
<
sc2
::
UnitTypeID
>
(
m
,
"UnitTypeID"
)
py
::
class_
<
sc2
::
UnitTypeID
>
(
m
,
"UnitTypeID"
)
.
def
(
py
::
init
<
sc2
::
UNIT_TYPEID
>
())
.
def
(
py
::
init
<
sc2
::
UNIT_TYPEID
>
())
.
def
(
"__eq__"
,
[](
const
sc2
::
UnitTypeID
&
value
,
sc2
::
UNIT_TYPEID
&
value2
)
{
return
value
==
value2
;
});
.
def
(
"__eq__"
,
[](
const
sc2
::
UnitTypeID
&
value
,
sc2
::
UNIT_TYPEID
&
value2
)
{
return
value
==
value2
;
});
py
::
implicitly_convertible
<
sc2
::
UNIT_TYPEID
,
sc2
::
UnitTypeID
>
();
py
::
implicitly_convertible
<
sc2
::
UNIT_TYPEID
,
sc2
::
UnitTypeID
>
();
py
::
class_
<
sc2
::
UpgradeID
>
(
m
,
"UpgradeID"
)
py
::
class_
<
sc2
::
UpgradeID
>
(
m
,
"UpgradeID"
)
.
def
(
py
::
init
<
sc2
::
UPGRADE_ID
>
());
.
def
(
py
::
init
<
sc2
::
UPGRADE_ID
>
());
...
...
This diff is collapsed.
Click to expand it.
src/TechTree.cpp
+
2
−
2
View file @
69f72c6f
...
@@ -48,7 +48,7 @@ void TechTree::onStart()
...
@@ -48,7 +48,7 @@ void TechTree::onStart()
data
.
requiredUnits
.
clear
();
data
.
requiredUnits
.
clear
();
data
.
requiredUpgrades
.
clear
();
data
.
requiredUpgrades
.
clear
();
updated
.
insert
(
description
.
result_type
);
updated
.
insert
(
description
.
result_type
);
data
.
buildTime
=
description
.
buildTime
;
// The time in seconds it takes to create the unit
data
.
buildTime
=
description
.
buildTime
;
// The time in seconds it takes to create the unit
data
.
buildAbility
=
sc2
::
ABILITY_ID
::
INVALID
;
data
.
buildAbility
=
sc2
::
ABILITY_ID
::
INVALID
;
}
}
...
@@ -383,4 +383,4 @@ const TypeData & TechTree::getData(const MetaType & type) const
...
@@ -383,4 +383,4 @@ const TypeData & TechTree::getData(const MetaType & type) const
BOT_ASSERT
(
false
,
"Can't getData this type: %s"
,
type
.
getName
().
c_str
());
BOT_ASSERT
(
false
,
"Can't getData this type: %s"
,
type
.
getName
().
c_str
());
return
m_unitTypeData
.
begin
()
->
second
;
return
m_unitTypeData
.
begin
()
->
second
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/TechTreeImproved.cpp
+
1
−
1
View file @
69f72c6f
...
@@ -116,7 +116,7 @@ void parse_build_description(BuildDescription & description, json & build_item)
...
@@ -116,7 +116,7 @@ void parse_build_description(BuildDescription & description, json & build_item)
{
{
description
.
result_type
=
static_cast
<
sc2
::
UNIT_TYPEID
>
(
build_item
[
"unit"
]);
description
.
result_type
=
static_cast
<
sc2
::
UNIT_TYPEID
>
(
build_item
[
"unit"
]);
description
.
build_ability
=
static_cast
<
sc2
::
ABILITY_ID
>
(
build_item
[
"ability"
]);
description
.
build_ability
=
static_cast
<
sc2
::
ABILITY_ID
>
(
build_item
[
"ability"
]);
description
.
buildTime
=
static_cast
<
int
>
(
build_item
[
"time"
]);
// The time in seconds it takes to create the unit parsed from the json file
description
.
buildTime
=
static_cast
<
int
>
(
build_item
[
"time"
]);
// The time in seconds it takes to create the unit parsed from the json file
if
(
build_item
.
find
(
"requires"
)
!=
build_item
.
end
())
if
(
build_item
.
find
(
"requires"
)
!=
build_item
.
end
())
{
{
...
...
This diff is collapsed.
Click to expand it.
src/TechTreeImproved.h
+
2
−
2
View file @
69f72c6f
...
@@ -18,7 +18,7 @@ struct BuildDescription
...
@@ -18,7 +18,7 @@ struct BuildDescription
std
::
vector
<
sc2
::
UNIT_TYPEID
>
buildings_needed
;
std
::
vector
<
sc2
::
UNIT_TYPEID
>
buildings_needed
;
std
::
vector
<
sc2
::
UNIT_TYPEID
>
addons_needed
;
std
::
vector
<
sc2
::
UNIT_TYPEID
>
addons_needed
;
std
::
vector
<
sc2
::
UPGRADE_ID
>
upgrades_needed
;
std
::
vector
<
sc2
::
UPGRADE_ID
>
upgrades_needed
;
int
buildTime
;
// The time in seconds it takes to create the unit
int
buildTime
;
// The time in seconds it takes to create the unit
};
};
struct
ResearchDescription
struct
ResearchDescription
...
@@ -53,4 +53,4 @@ public:
...
@@ -53,4 +53,4 @@ public:
const
std
::
vector
<
BuildDescription
>
&
BuildDescriptions
()
const
{
return
build_descriptions
;
}
const
std
::
vector
<
BuildDescription
>
&
BuildDescriptions
()
const
{
return
build_descriptions
;
}
const
std
::
vector
<
ResearchDescription
>
&
ResearchDescriptions
()
const
{
return
research_descriptions
;
}
const
std
::
vector
<
ResearchDescription
>
&
ResearchDescriptions
()
const
{
return
research_descriptions
;
}
};
};
\ No newline at end of file
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