1
0
forked from 0ad/0ad

RL: Update template paths & remove debug-print.

debug-print was removed in 992d740a58, templates were changed in
b57abe806c

Patch by: irishninja
Differential Revision: https://code.wildfiregames.com/D3502
This was SVN commit r24816.
This commit is contained in:
wraitii 2021-02-01 14:53:40 +00:00
parent f76f557d5c
commit 42b068d9c9
3 changed files with 4 additions and 15 deletions

View File

@ -45,7 +45,7 @@ nearby_tree = closest(state.units(owner=0, type='tree'), center(citizen_soldiers
collect_wood = zero_ad.actions.gather(citizen_soldiers, nearby_tree)
female_citizens = state.units(owner=1, type='female_citizen')
house_tpl = 'structures/spart_house'
house_tpl = 'structures/spart/house'
x = 680
z = 640
build_house = zero_ad.actions.construct(female_citizens, house_tpl, x, z, autocontinue=True)
@ -65,7 +65,7 @@ print(female_citizen.data)
# Units can be built using the "train action"
civic_center = state.units(owner=1, type="civil_centre")[0]
spearman_type = 'units/spart_infantry_spearman_b'
spearman_type = 'units/spart/infantry_spearman_b'
train_spearmen = zero_ad.actions.train([civic_center], spearman_type)
state = game.step([train_spearmen])

View File

@ -29,7 +29,7 @@ def closest(units, position):
def test_construct():
state = game.reset(config)
female_citizens = state.units(owner=1, type='female_citizen')
house_tpl = 'structures/spart_house'
house_tpl = 'structures/spart/house'
house_count = len(state.units(owner=1, type=house_tpl))
x = 680
z = 640
@ -53,7 +53,7 @@ def test_gather():
def test_train():
state = game.reset(config)
civic_centers = state.units(owner=1, type="civil_centre")
spearman_type = 'units/spart_infantry_spearman_b'
spearman_type = 'units/spart/infantry_spearman_b'
spearman_count = len(state.units(owner=1, type=spearman_type))
train_spearmen = zero_ad.actions.train(civic_centers, spearman_type)
@ -89,11 +89,6 @@ def test_attack():
while state.unit(target.id()).health() >= initial_health:
state = game.step()
def test_debug_print():
state = game.reset(config)
debug_print = zero_ad.actions.debug_print('hello world!!')
state = game.step([debug_print])
def test_chat():
state = game.reset(config)
chat = zero_ad.actions.chat('hello world!!')

View File

@ -30,12 +30,6 @@ def train(entities, unit_type, count=1):
'count': count,
}
def debug_print(message):
return {
'type': 'debug-print',
'message': message
}
def chat(message):
return {
'type': 'aichat',