Merge lp:~widelands-dev/widelands/casern_workersqueue into lp:widelands
- casern_workersqueue
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 8248 | ||||
Proposed branch: | lp:~widelands-dev/widelands/casern_workersqueue | ||||
Merge into: | lp:widelands | ||||
Diff against target: |
6865 lines (+2412/-1160) 88 files modified
data/campaigns/bar01.wmf/scripting/secret_village.lua (+5/-5) data/campaigns/tutorial03_seafaring.wmf/scripting/helper_functions.lua (+2/-0) data/campaigns/tutorial03_seafaring.wmf/scripting/starting_conditions.lua (+2/-2) data/campaigns/tutorial04_economy.wmf/scripting/helper_functions.lua (+2/-0) data/campaigns/tutorial04_economy.wmf/scripting/starting_conditions.lua (+10/-10) data/maps/Trident_of_Fire.wmf/scripting/initial_conditions.lua (+3/-3) data/scripting/infrastructure.lua (+9/-4) data/tribes/atlanteans.lua (+1/-0) data/tribes/barbarians.lua (+1/-0) data/tribes/buildings/productionsites/atlanteans/barracks/helptexts.lua (+1/-1) data/tribes/buildings/productionsites/atlanteans/barracks/init.lua (+6/-3) data/tribes/buildings/productionsites/barbarians/barracks/helptexts.lua (+1/-1) data/tribes/buildings/productionsites/barbarians/barracks/init.lua (+6/-3) data/tribes/buildings/productionsites/empire/barracks/helptexts.lua (+1/-1) data/tribes/buildings/productionsites/empire/barracks/init.lua (+6/-3) data/tribes/empire.lua (+1/-0) data/tribes/init.lua (+3/-0) data/tribes/scripting/help/format_help.lua (+43/-22) data/tribes/scripting/help/ware_help.lua (+1/-1) data/tribes/scripting/help/worker_help.lua (+1/-1) data/tribes/scripting/starting_conditions/atlanteans/fortified_village.lua (+6/-6) data/tribes/scripting/starting_conditions/atlanteans/trading_outpost.lua (+3/-3) data/tribes/scripting/starting_conditions/barbarians/fortified_village.lua (+6/-6) data/tribes/scripting/starting_conditions/barbarians/trading_outpost.lua (+3/-3) data/tribes/scripting/starting_conditions/empire/fortified_village.lua (+6/-6) data/tribes/scripting/starting_conditions/empire/trading_outpost.lua (+3/-3) data/tribes/workers/atlanteans/recruit/helptexts.lua (+4/-0) data/tribes/workers/atlanteans/recruit/init.lua (+24/-0) data/tribes/workers/atlanteans/soldier/init.lua (+2/-6) data/tribes/workers/barbarians/recruit/helptexts.lua (+4/-0) data/tribes/workers/barbarians/recruit/init.lua (+25/-0) data/tribes/workers/barbarians/soldier/init.lua (+2/-5) data/tribes/workers/empire/recruit/helptexts.lua (+4/-0) data/tribes/workers/empire/recruit/init.lua (+25/-0) data/tribes/workers/empire/soldier/init.lua (+2/-6) src/ai/defaultai.cc (+5/-5) src/ai/defaultai_warfare.cc (+4/-4) src/economy/CMakeLists.txt (+4/-0) src/economy/expedition_bootstrap.cc (+6/-8) src/economy/expedition_bootstrap.h (+1/-1) src/economy/idleworkersupply.cc (+3/-1) src/economy/input_queue.cc (+183/-0) src/economy/input_queue.h (+268/-0) src/economy/request.cc (+8/-0) src/economy/request.h (+6/-0) src/economy/wares_queue.cc (+29/-160) src/economy/wares_queue.h (+20/-51) src/economy/workers_queue.cc (+196/-0) src/economy/workers_queue.h (+75/-0) src/logic/cmd_luacoroutine.cc (+1/-1) src/logic/game.cc (+6/-5) src/logic/game.h (+4/-1) src/logic/map_objects/immovable.h (+1/-1) src/logic/map_objects/tribes/building.cc (+15/-0) src/logic/map_objects/tribes/building.h (+8/-0) src/logic/map_objects/tribes/constructionsite.cc (+7/-9) src/logic/map_objects/tribes/constructionsite.h (+1/-1) src/logic/map_objects/tribes/dismantlesite.cc (+3/-3) src/logic/map_objects/tribes/production_program.cc (+142/-63) src/logic/map_objects/tribes/production_program.h (+8/-7) src/logic/map_objects/tribes/productionsite.cc (+61/-20) src/logic/map_objects/tribes/productionsite.h (+18/-6) src/logic/map_objects/tribes/soldier.cc (+2/-1) src/logic/map_objects/tribes/tribes.cc (+1/-1) src/logic/map_objects/tribes/warehouse.cc (+16/-8) src/logic/map_objects/tribes/warehouse.h (+17/-1) src/logic/playercommand.cc (+49/-26) src/logic/playercommand.h (+11/-6) src/logic/queue_cmd_factory.cc (+2/-2) src/logic/queue_cmd_ids.h (+1/-1) src/map_io/map_buildingdata_packet.cc (+31/-8) src/scripting/lua_map.cc (+314/-109) src/scripting/lua_map.h (+9/-8) src/website/map_object_info.cc (+4/-3) src/wui/CMakeLists.txt (+2/-2) src/wui/buildingwindow.cc (+2/-2) src/wui/constructionsitewindow.cc (+2/-2) src/wui/inputqueuedisplay.cc (+313/-0) src/wui/inputqueuedisplay.h (+93/-0) src/wui/portdockwaresdisplay.cc (+2/-2) src/wui/productionsitewindow.cc (+12/-5) src/wui/soldiercapacitycontrol.cc (+5/-4) src/wui/waresqueuedisplay.cc (+0/-299) src/wui/waresqueuedisplay.h (+0/-93) test/maps/lua_testsuite.wmf/scripting/productionsite.lua (+58/-58) test/maps/lua_testsuite.wmf/scripting/trainingsite.lua (+65/-65) test/maps/lua_testsuite.wmf/scripting/tribes_descriptions.lua (+3/-3) test/maps/plain.wmf/scripting/test_casern.lua (+91/-0) |
||||
To merge this branch: | bzr merge lp:~widelands-dev/widelands/casern_workersqueue | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Notabilis | Approve | ||
GunChleoc | Pending | ||
Review via email: mp+309763@code.launchpad.net |
Commit message
Description of the change
Implements a worker queue which allows production buildings to consume
workers as input.
Adds:
- Adds worker queue for production buildings.
- The "inputs" in the lua files for the buildings can now contains worker names and amounts.
- Production programs can consume workers from the queues.
Changes:
- The barracks-building (new in trunk) now requests and stores carriers required for recruiting.
- Soldiers can no longer be created in warehouses.
- Renamed the c-for-lua function {set,get,
- Modified the lua function prefilled_
- Affected scripts should be updated (but only some are tested).
bunnybot (widelandsofficial) wrote : | # |
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1565. State: failed. Details: https:/
Appveyor build 1404. State: success. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
I gave it a quick test - seems to be working :)
I am not sure about the user interface though - I have posted on the forum for user feedback:
https:/
Also, because we renamed a function in the Lua interface, the test suite is broken. Documentation on how to run the test suite:
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
('The read operation timed out',)
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1567. State: failed. Details: https:/
Appveyor build 1406. State: success. Details: https:/
Notabilis (notabilis27) wrote : | # |
Thanks Travis but I already knew that the test were broken. They should be fixed now.
However, I have a problem with the scripting documentation. What is the "HasWares" interface which is described in lua_map.cc? Is this something which really exists in the code or documentation-only to avoid writing the same stuff over and over again?
Either case, it does no longer really match the *_input methods of production sites. I was thinking about splitting it up into a HasWares interface for flags and warehouses and create a nearly identical interface HasInputs which is for production and training sites and also accepts workers as inputs.
SirVer (sirver) wrote : | # |
> Is this something which really exists in the code or documentation-only to avoid writing the same stuff over and over again?
The latter. I think it used to exist, but now it is just an interface without any code associated with it.
Splitting up sounds fine to me. I do not think we can give stability guarantees for the Lua interface at this point in time, so no need to try hard to keep it backwards compatible.
GunChleoc (gunchleoc) wrote : | # |
I think we should delete the documentation then - no need to have dead code documented, it is confusing.
SirVer (sirver) wrote : | # |
The documentation is not dead. Various classes implement this interface and refer to this as documentation.
We can delete this, but then we have to add the same documentation to all classes that implement the semantics. As long as they do not diverge, I think having them only documented once is preferable.
Or in other terms: the class exists for users, just not in the implementation- and that is an implementation detail.
> Am 08.11.2016 um 09:48 schrieb GunChleoc <email address hidden>:
>
> I think we should delete the documentation then - no need to have dead code documented, it is confusing.
> --
> https:/
> You are subscribed to branch lp:widelands.
Notabilis (notabilis27) wrote : | # |
I split up the documentation and updated some references. Now I am only wondering: Is there a script which extracts this documentation somewhere? I only found some generic documentation but no list of provided Lua classes or something like that.
What else is to do in this branch? Will the UI be reworked before a merge to trunk or merge first and do the update later?
GunChleoc (gunchleoc) wrote : | # |
First round of code review is done - see my last commit.
I will have to look into your economy questions - I'm not really familiar with the economy code myself yet.
Great contribution overall! I have mostly some minors nits and refactoring ideas - feel free to drop any of those if you don't agree or turn them into TODO comments if you think the changes would be too big for this branch.
GunChleoc (gunchleoc) wrote : | # |
Sorry, overlooked your comment - think now that the UI change should go in before the merge, because the code changes for that will be rather big, and we should get a superclass for wares and workers queues.
For the documentation, see
https:/
Best generate as HTML, so you won't need the website project to view.
Notabilis (notabilis27) wrote : | # |
Nooo, not the beer! I liked the beer! :(
But thanks for the review. The small stuff (renaming, etc.) is done, what is left are the bigger changes. Open problems in no particular order:
1) Making WorkersQueue more similar to WaresQueue and replacing the user interface should be no problem. I will try to share as much code as possible between the queues respectively the interfaces.
2) The problem with higher-ranking workers seems to be a bug (or inconsistency) in the code. While warehouses check for an exact match to fulfill the request, the IdleWorkerSupply uses can_act_as(). This explains the strange behavior I encountered. For normal (worker-)workers I would prefer the can_act_as() approach while barracks should match exactly. What do you think about a flag in the request which describes whether the worker has to match exactly? Or maybe expand the "Requirements" for requests (new RequireExactWorker class or so)?
3) In production_
4) What does "NOCOM" mean? I just can't figure it out. And what is the difference to "TODO"?
5) You increased the packet version for the serialization functions and they are now checking for a range. What is the idea behind it? Increase the number on every modification of the file but accept older versions until the method itself changes?
So much for now.
Thanks for the link to the documentation. I tried the parameter singlehtml before, seems that this does not include the code documentation. A full html worked fine.
GunChleoc (gunchleoc) wrote : | # |
Yep, I liked the beer too - it's a balancing thing tough.
2) A flag sounds good. The reason for the inconsistency is that until now, this was used to fill working positions, where allowing higher ranking workers is important.
3) It can be resolved like this:
bool found = false;
for (const WareAmount& input : inputs) {
if (input.first == ware_index) {
found = true;
break;
}
}
if (!found) {
throw GameDataError("%s is not declared as an input (\"%s=<count>\" was not "
}
We generally try to get away from using iterators unless they are necessary, because it makes the code easier to read. We could also get rid of having the loop twice:
WareWorker type = wwWARE;
Description
if (!tribes.
input_index = tribes.
if (!tribes.
throw GameDataError(
} else {
// It is a worker
type = wwWORKER;
}
}
// Now loop
4) NOCOM is short for "no commit" - all NOCOMs have to be removed before merging into trunk, either by fixing the issue or turning them into TODO comments. TODO comments have a uniform format ti make it easier to search for them:
// TODO(<nick>): Juicy comment
5) We are now saving things to the savegame that weren't there before. This will crash Widelands if we try to load the savegame with an older version. So, we use exceptions here to show a message to the user and abort loading the savegame. We got rid of compatibility code during the last release cycle, so old savegames won't load any more. We're providing compatibility again from now on though, so we check the range.
Notabilis (notabilis27) wrote : | # |
GunChleoc, can you take a look at you "versioning" changes in map_buildingdat
The problem is the line:
if (packet_version > 5) {
Since kCurrentPacketV
GunChleoc (gunchleoc) wrote : | # |
Oops - definitely needs increasing to 6.
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1597. State: errored. Details: https:/
Appveyor build 1435. State: success. Details: https:/
Notabilis (notabilis27) wrote : | # |
Thanks for the answers earlier. Wares- and WorkerQueues now have a common interface so they can be used interchangeable. Note that the code is not really tested yet.
Both are using the same gui class for display, list on the first tab. Support for priorities on the graphical worker queues is disabled currently, I have to look into it if that makes sense (and re-enable it when it does).
Since the classes are more or less the same now, it should be possible to replace the current Building:
Another, minor thing: I haven't looked into it, but when creating an expedition a builder is requested (at least, I assume he is). Now that we have worker queues: Should there be one for the builder in the tab of the port?
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1603. State: errored. Details: https:/
Appveyor build 1441. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1604. State: failed. Details: https:/
Appveyor build 1442. State: failed. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
I am always in favour of removing code duplication wherever possible, so please go ahead if you want. If it's older code, you can also do that in a follow-up branch to keep the current diff smaller.
Regarding the builder, we actually have an open bug for that, so yes, please :)
https:/
Maybe also in a follow-up branch?
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1608. State: failed. Details: https:/
Appveyor build 1446. State: success. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1611. State: passed. Details: https:/
Appveyor build 1449. State: success. Details: https:/
Notabilis (notabilis27) wrote : | # |
Replacing calls to WaresQueue with calls to the new InputQueue is done in another branch:
https:/
It can be merged either in this branch or into trunk after this branch is merged.
Adding a workersQueue for the builder on expeditions is not done yet. I plan to do so after the this branch and the refactoring branch are merged into trunk (don't like to create a branch for the bug in trunk which depends on other branches).
Review comments from the first review are done. Additionally, I created a regression test for the caserns, since it is the only building using the WorkersQueue currently.
In r7434 I fixed a bug which crashes scripts when they try to add a worker-worker to a building which already contains input-workers. Should have probably become an own branch, but the fix is small and I was lazy.
So as far as I am concerned: The branch(es) is(/are) ready for the next review.
Notabilis (notabilis27) wrote : | # |
Oh, forgot a comment: Priorities for WorkerQueues are and will stay disabled. I am not completely sure what priorities are doing, but they only seem to influence how likely it is that a carrier picks up a ware on a flag. Obviously, this does not make sense for workers.
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1645. State: failed. Details: https:/
Appveyor build 1483. State: success. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
('The read operation timed out',)
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1648. State: failed. Details: https:/
Appveyor build 1487. State: success. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
As far as I understand the log output of the failed tests and the Python script, widelands itself exits with a return code != 0 - maybe a new assert in the code itself somewhere is causing this, rather than the test code?
SirVer (sirver) wrote : | # |
Gun pinged me to take a look at this.
First impression: Looking over the travis output there is clearly a bug in the code somewhere. It is flaky as it sometimes succeeds and sometimes fails. There is no correlation to the compiler (gcc/clang both are flaky) or the type of build (debug/release).
It is always the new casern test that is failing - but always at the very end. The test runs to completion: "All Tests passed.", but then the game seems to crash. I'll bet it is a segfault, since there is no further output. If I should guess, I would say there is invalid memory or double free in the shutdown code somewhere, but I did not investigate the code yet.
Notabilis (notabilis27) wrote : | # |
Thank you both for looking at this. When looking sooner in the travis log I found these lines:
test/maps/
Running Widelands ... *** Error in `build/
FAIL
So you are right SirVer: A double free in any case. But I would guess some memory corruption, too, since it does not appear every time.
Through running the test a lot of times I was able to get the following backtrace. Seems like the CmdQueue has problems when cleaning up on program exit.
[...]
MO(7,barbarians
MO(2,barbarians
Thread 1 "widelands" received signal SIGSEGV, Segmentation fault.
0x00007ffff518b8c0 in _int_free (av=0x7ffff54acb00 <main_arena>, p=0x55555d89b6e0,
have_lock=0) at malloc.c:4049
4049 malloc.c: No such file or directory.
A debugging session is active.
Inferior 1 [process 6294] will be killed.
Quit anyway? (y or n) n
Not confirmed.
(gdb) bt
#0 0x00007ffff518b8c0 in _int_free (av=0x7ffff54acb00 <main_arena>, p=0x55555d89b6e0, have_lock=0) at malloc.c:4049
#1 0x0000555555ff2ec4 in __gnu_cxx:
#2 0x0000555555ff2828 in std::allocator_
#3 0x0000555555ff1efe in std::_Vector_
at /usr/include/
#4 0x0000555555ff19bd in std::_Vector_
at /usr/include/
#5 0x0000555555ff16b9 in std::vector<
at /usr/include/
#6 0x0000555555ff1658 in std::priority_
#7 0x0000555555ff30d1 in std::_Destroy<
#8 0x0000555555ff2c34 in std::_Destroy_
#9 0x0000555555ff21d7 in std::_Destroy<
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
('The read operation timed out',)
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1660. State: failed. Details: https:/
Appveyor build 1500. State: success. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1697. State: passed. Details: https:/
Appveyor build 1537. State: success. Details: https:/
Notabilis (notabilis27) wrote : | # |
Seems like the cleanup-bug is fixed. The problem was that the WorkersQueue was free-ing the stored workers on cleanup while the building was also free-ing them. The fix is to simply drop the pointers to the workers when removing the queue and let the building handle them.
However, I don't really like the fix. For one thing, I could not really figure out which methods are called at which time during cleanup. The code I looked at does not matches my observations while debugging. Most likely this is a misunderstanding by me and no bug in the code, though.
The more serious problem is the sporadic nature of the bug. Neither my understanding of the bug nor the fix are accounting for the fact that the bug only occurs sometimes. It could happen when some code (which one?) sets the to-be-freed pointers to some value (which and why?) that happens to be NULL most of the time. Not that this makes any sense for me. Another possibility could be a random order of cleanup on exit.
So while the bug seems to be fixed I don't understand it and there might be a memory leak present now.
GunChleoc (gunchleoc) wrote : | # |
This is WaresQueue does in the cleanup:
if (filled_ && owner_.
owner_
filled_ = 0;
etc...
I guess we should to the same for the workers queue now, since it's now more like the waresqueue and not like the soldercontrol?
Notabilis (notabilis27) wrote : | # |
Good question! In the case of workers, this is not required. Now that you are mentioning it I remembered (and testing confirmed) that this is dealt with somewhere else. When destroying a building (and its queues) wares are lost, so we have to remove them from the economy. On the other hand, workers become fugitives.
When destroying an unconnected (i.e. no streets) barracks the inventory statistics no longer show the workers of the barracks. When the fugitives find a connected street they are added again. I haven't looked in the code but I would guess they take care of that themselves.
While testing I noticed that the inventory statistics are listing no-cost workers while the warehouse statistics are not. Is this a bug or intentional behavior?
GunChleoc (gunchleoc) wrote : | # |
The reason that the warehouse statistics don't list them is that people might try to set a policy on them. Players might still be interested in the inventory though.
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1711. State: failed. Details: https:/
Appveyor build 1551. State: success. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
I have added a bunch of NOCOM comments to the code with some ideas.
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
('The read operation timed out',)
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1718. State: passed. Details: https:/
Appveyor build 1558. State: success. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
[Errno 104] Connection reset by peer
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1718. State: passed. Details: https:/
Appveyor build 1558. State: success. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
HTTP Error 500: Internal Server Error
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1718. State: passed. Details: https:/
Appveyor build 1558. State: success. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
('The read operation timed out',)
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1718. State: passed. Details: https:/
Appveyor build 1558. State: success. Details: https:/
Notabilis (notabilis27) wrote : | # |
Next round of code review fixes are done. Some bigger refactoring has been done in another branch:
https:/
Basically: "Using InputQueue instead of Wares-/WorkersQueue where it makes sense."
Also fixed/added some help texts and set the soldier quantity. What is left to do? I intend to add a builder-queue to expeditions in a further branch after this one has been merged.
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1803. State: failed. Details: https:/
Appveyor build 1641. State: success. Details: https:/
Tino (tino79) wrote : | # |
I did some play testing yesterday and everything seems to be working as intended.
Just noticed at some point, that the stopped Training Camp is constantly requesting soldiers, so because i had 2 slots opened, there was a constant walking of 2 soldiers between my headquarter and the camp.
Save Game: https:/
Notabilis (notabilis27) wrote : | # |
Hello Tino,
thanks for testing!
I can confirm the strange behavior in your save game as well as in an own test game. However, I could also create the effect in trunk so it is no bug of this branch. I opened a bug report for it, maybe you are able to add something about it:
GunChleoc (gunchleoc) wrote : | # |
Thanks for implementing this - all ready to go :)
@bunnybot merge
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
GunChleoc (gunchleoc) wrote : | # |
@bunnybot merge
Notabilis (notabilis27) wrote : | # |
Thanks for merging this, time to start propose merging the follow-up branches. ;)
However, your last merge with trunk (r7457) is broken. You removed the set_warehouse_
I am not quite sure how to fix this. Revert r7457 in this branch and merge with trunk again? Maybe even revert the merge of the casern branch into trunk before that?
Either way, I don't really know bzr so if there is someone who feels more qualified to fix this, go ahead (read as: bzr revert and operations on trunk intimidate me).
Notabilis (notabilis27) wrote : | # |
Okay, more or less my mistake, everything will be fine. The bug already was in trunk and not in this branch, see
GunChleoc (gunchleoc) wrote : | # |
Creating a new branch like we did when it has already landed in trunk is the way to go :)
The bug was created by me when I merged trunk into this branch and resolved a conflict.
Preview Diff
1 | === modified file 'data/campaigns/bar01.wmf/scripting/secret_village.lua' |
2 | --- data/campaigns/bar01.wmf/scripting/secret_village.lua 2016-12-29 10:31:07 +0000 |
3 | +++ data/campaigns/bar01.wmf/scripting/secret_village.lua 2017-01-21 14:37:18 +0000 |
4 | @@ -101,13 +101,13 @@ |
5 | {"barbarians_gamekeepers_hut", 56, 12}, |
6 | {"barbarians_farm", 56, 16}, |
7 | {"barbarians_well", 54, 18}, |
8 | - {"barbarians_bakery", 55, 20, wares = {wheat = 6, water = 6}}, |
9 | + {"barbarians_bakery", 55, 20, inputs = {wheat = 6, water = 6}}, |
10 | {"barbarians_lumberjacks_hut", 56, 21}, |
11 | {"barbarians_lumberjacks_hut", 55, 22}, |
12 | {"barbarians_lumberjacks_hut", 54, 24}, |
13 | {"barbarians_rangers_hut", 57, 24}, |
14 | {"barbarians_rangers_hut", 55, 25}, |
15 | - {"barbarians_wood_hardener", 54, 26, wares = {log = 8}}, |
16 | + {"barbarians_wood_hardener", 54, 26, inputs = {log = 8}}, |
17 | -- to make it more realistic |
18 | {"barbarians_warehouse", 53, 28, |
19 | wares = { |
20 | @@ -116,11 +116,11 @@ |
21 | meat = 30 |
22 | } |
23 | }, |
24 | - {"barbarians_inn", 55, 28, wares = {barbarians_bread = 4, meat = 4}}, |
25 | - {"barbarians_tavern", 57, 28, wares = {barbarians_bread = 4, meat = 4}}, |
26 | + {"barbarians_inn", 55, 28, inputs = {barbarians_bread = 4, meat = 4}}, |
27 | + {"barbarians_tavern", 57, 28, inputs = {barbarians_bread = 4, meat = 4}}, |
28 | {"barbarians_well", 52, 30}, |
29 | {"barbarians_farm", 54, 33}, |
30 | - {"barbarians_bakery", 51, 35, wares = {wheat = 6, water = 6}}, |
31 | + {"barbarians_bakery", 51, 35, inputs = {wheat = 6, water = 6}}, |
32 | {"barbarians_well", 52, 37} |
33 | ) |
34 | |
35 | |
36 | === modified file 'data/campaigns/tutorial03_seafaring.wmf/scripting/helper_functions.lua' |
37 | --- data/campaigns/tutorial03_seafaring.wmf/scripting/helper_functions.lua 2016-01-28 05:24:34 +0000 |
38 | +++ data/campaigns/tutorial03_seafaring.wmf/scripting/helper_functions.lua 2017-01-21 14:37:18 +0000 |
39 | @@ -23,5 +23,7 @@ |
40 | -- Fill with wares |
41 | if bdescr.wares then b:set_wares(bdescr.wares) |
42 | elseif b.valid_wares then b:set_wares(b.valid_wares) end |
43 | + if bdescr.inputs then b:set_inputs(bdescr.inputs) |
44 | + elseif b.valid_inputs then b:set_inputs(b.valid_inputs) end |
45 | end |
46 | end |
47 | |
48 | === modified file 'data/campaigns/tutorial03_seafaring.wmf/scripting/starting_conditions.lua' |
49 | --- data/campaigns/tutorial03_seafaring.wmf/scripting/starting_conditions.lua 2015-10-31 12:11:44 +0000 |
50 | +++ data/campaigns/tutorial03_seafaring.wmf/scripting/starting_conditions.lua 2017-01-21 14:37:18 +0000 |
51 | @@ -102,8 +102,8 @@ |
52 | {"atlanteans_horsefarm", 40, 55}, |
53 | {"atlanteans_spiderfarm", 37, 45}, |
54 | {"atlanteans_weaving_mill", 45, 45}, |
55 | - {"atlanteans_smelting_works", 35, 56, wares = {coal = 8, iron_ore = 8}}, -- no gold |
56 | - {"atlanteans_smelting_works", 35, 59, wares = {coal = 8, iron_ore = 8}}, |
57 | + {"atlanteans_smelting_works", 35, 56, inputs = {coal = 8, iron_ore = 8}}, -- no gold |
58 | + {"atlanteans_smelting_works", 35, 59, inputs = {coal = 8, iron_ore = 8}}, |
59 | {"atlanteans_toolsmithy", 41, 52}, |
60 | {"atlanteans_weaponsmithy", 37, 54}, |
61 | {"atlanteans_tower_small", 34, 63}, |
62 | |
63 | === modified file 'data/campaigns/tutorial04_economy.wmf/scripting/helper_functions.lua' |
64 | --- data/campaigns/tutorial04_economy.wmf/scripting/helper_functions.lua 2016-01-28 05:24:34 +0000 |
65 | +++ data/campaigns/tutorial04_economy.wmf/scripting/helper_functions.lua 2017-01-21 14:37:18 +0000 |
66 | @@ -24,5 +24,7 @@ |
67 | -- Fill with wares |
68 | if bdescr.wares then b:set_wares(bdescr.wares) |
69 | elseif b.valid_wares then b:set_wares(b.valid_wares) end |
70 | + if bdescr.inputs then b:set_inputs(bdescr.inputs) |
71 | + elseif b.valid_inputs then b:set_inputs(b.valid_inputs) end |
72 | end |
73 | end |
74 | |
75 | === modified file 'data/campaigns/tutorial04_economy.wmf/scripting/starting_conditions.lua' |
76 | --- data/campaigns/tutorial04_economy.wmf/scripting/starting_conditions.lua 2015-10-31 12:11:44 +0000 |
77 | +++ data/campaigns/tutorial04_economy.wmf/scripting/starting_conditions.lua 2017-01-21 14:37:18 +0000 |
78 | @@ -94,16 +94,16 @@ |
79 | {"empire_bakery",116,28}, |
80 | {"empire_bakery",115,32}, |
81 | {"empire_tavern",tavern_field.x,tavern_field.y}, -- (105,44), will be destroyed |
82 | - {"empire_coalmine",118,45, wares = {beer = 6}}, |
83 | - {"empire_coalmine",119,39, wares = {beer = 6}}, |
84 | - {"empire_ironmine",107,59, wares = {beer = 6}}, |
85 | - {"empire_marblemine",98,38, wares = {wine = 6}}, |
86 | - {"empire_marblemine",102,38, wares = {wine = 6}}, |
87 | - {"empire_smelting_works",110,38, wares = {}}, |
88 | - {"empire_smelting_works",111,43, wares = {}}, |
89 | - {"empire_toolsmithy",104,64, wares = {log = 8}}, |
90 | - {"empire_weaponsmithy",113,40, wares = {planks = 8}}, |
91 | - {"empire_armorsmithy",112,37, wares = {cloth = 8}}, |
92 | + {"empire_coalmine",118,45, inputs = {beer = 6}}, |
93 | + {"empire_coalmine",119,39, inputs = {beer = 6}}, |
94 | + {"empire_ironmine",107,59, inputs = {beer = 6}}, |
95 | + {"empire_marblemine",98,38, inputs = {wine = 6}}, |
96 | + {"empire_marblemine",102,38, inputs = {wine = 6}}, |
97 | + {"empire_smelting_works",110,38, inputs = {}}, |
98 | + {"empire_smelting_works",111,43, inputs = {}}, |
99 | + {"empire_toolsmithy",104,64, inputs = {log = 8}}, |
100 | + {"empire_weaponsmithy",113,40, inputs = {planks = 8}}, |
101 | + {"empire_armorsmithy",112,37, inputs = {cloth = 8}}, |
102 | {"empire_farm",105,70}, |
103 | {"empire_farm",101,71}, |
104 | {"empire_farm",99,77}, |
105 | |
106 | === modified file 'data/maps/Trident_of_Fire.wmf/scripting/initial_conditions.lua' |
107 | --- data/maps/Trident_of_Fire.wmf/scripting/initial_conditions.lua 2016-03-21 19:29:24 +0000 |
108 | +++ data/maps/Trident_of_Fire.wmf/scripting/initial_conditions.lua 2017-01-21 14:37:18 +0000 |
109 | @@ -149,7 +149,7 @@ |
110 | soldiers = { [{0,0,0,0}] = 45 }, |
111 | }, |
112 | { "barbarians_port", f_port.x, f_port.y}, |
113 | - { "barbarians_shipyard", f_shipyard.x, f_shipyard.y, wares = { |
114 | + { "barbarians_shipyard", f_shipyard.x, f_shipyard.y, inputs = { |
115 | blackwood = 10, |
116 | cloth = 4, |
117 | log = 2, |
118 | @@ -219,7 +219,7 @@ |
119 | }, |
120 | { "empire_port", f_port.x, f_port.y}, |
121 | { "empire_shipyard", f_shipyard.x, f_shipyard.y, |
122 | - wares = { |
123 | + inputs = { |
124 | cloth = 4, |
125 | log = 2, |
126 | planks = 10, |
127 | @@ -289,7 +289,7 @@ |
128 | soldiers = { [{0,0,0,0}] = 45 }, |
129 | }, |
130 | { "atlanteans_port", f_port.x, f_port.y}, |
131 | - { "atlanteans_shipyard", f_shipyard.x, f_shipyard.y, wares = { |
132 | + { "atlanteans_shipyard", f_shipyard.x, f_shipyard.y, inputs = { |
133 | planks = 10, |
134 | spidercloth = 4, |
135 | log = 2, |
136 | |
137 | === modified file 'data/scripting/infrastructure.lua' |
138 | --- data/scripting/infrastructure.lua 2016-03-01 09:31:36 +0000 |
139 | +++ data/scripting/infrastructure.lua 2017-01-21 14:37:18 +0000 |
140 | @@ -65,7 +65,7 @@ |
141 | -- prefilled_buildings(wl.Game().players[1], |
142 | -- {"sentry", 57, 9}, -- Sentry completely full with soldiers |
143 | -- {"sentry", 57, 9, soldier={[{0,0,0,0}]=1}}, -- Sentry with one soldier |
144 | --- {"bakery", 55, 20, wares = {wheat=6, water=6}}, -- bakery with wares and workers |
145 | +-- {"bakery", 55, 20, inputs = {wheat=6, water=6}}, -- bakery with wares and workers |
146 | -- {"well", 52, 30}, -- a well with workers |
147 | -- ) |
148 | -- |
149 | @@ -77,9 +77,13 @@ |
150 | -- |
151 | -- wares |
152 | -- A table of (name,count) as expected by |
153 | --- :meth:`wl.map.ProductionSite.set_wares`. This is valid for |
154 | --- :class:`wl.map.ProductionSite` and :class:`wl.map.Warehouse` and |
155 | --- ignored otherwise. |
156 | +-- :meth:`wl.map.Warehouse.set_wares`. This is valid for |
157 | +-- :class:`wl.map.Warehouse` and must not be used otherwise. |
158 | +-- inputs |
159 | +-- A table of (name,count) as expected by |
160 | +-- :meth:`wl.map.ProductionSite.set_inputs`. Inputs are wares or workers |
161 | +-- which are consumed by the building. This is valid for |
162 | +-- :class:`wl.map.ProductionSite` and must not be used otherwise. |
163 | -- soldiers |
164 | -- A table of (soldier_descr,count) as expected by |
165 | -- :meth:`wl.map.HasSoldiers.set_soldiers`. If this is nil, the site |
166 | @@ -107,6 +111,7 @@ |
167 | end |
168 | -- Fill with wares if this is requested |
169 | if bdescr.wares then b:set_wares(bdescr.wares) end |
170 | + if bdescr.inputs then b:set_inputs(bdescr.inputs) end |
171 | end |
172 | end |
173 | |
174 | |
175 | === modified file 'data/tribes/atlanteans.lua' |
176 | --- data/tribes/atlanteans.lua 2016-11-02 05:48:00 +0000 |
177 | +++ data/tribes/atlanteans.lua 2017-01-21 14:37:18 +0000 |
178 | @@ -185,6 +185,7 @@ |
179 | }, |
180 | { |
181 | -- Military |
182 | + "atlanteans_recruit", |
183 | "atlanteans_soldier", |
184 | "atlanteans_trainer", |
185 | "atlanteans_weaponsmith", |
186 | |
187 | === modified file 'data/tribes/barbarians.lua' |
188 | --- data/tribes/barbarians.lua 2016-02-06 10:31:42 +0000 |
189 | +++ data/tribes/barbarians.lua 2017-01-21 14:37:18 +0000 |
190 | @@ -135,6 +135,7 @@ |
191 | }, |
192 | { |
193 | -- Military |
194 | + "barbarians_recruit", |
195 | "barbarians_soldier", |
196 | "barbarians_trainer", |
197 | "barbarians_helmsmith", |
198 | |
199 | === modified file 'data/tribes/buildings/productionsites/atlanteans/barracks/helptexts.lua' |
200 | --- data/tribes/buildings/productionsites/atlanteans/barracks/helptexts.lua 2016-11-03 16:08:09 +0000 |
201 | +++ data/tribes/buildings/productionsites/atlanteans/barracks/helptexts.lua 2017-01-21 14:37:18 +0000 |
202 | @@ -13,7 +13,7 @@ |
203 | |
204 | function building_helptext_purpose() |
205 | -- #TRANSLATORS: Purpose helptext for a building |
206 | - return no_purpose_text_yet() |
207 | + return pgettext("atlanteans_building", "Equips recruits and trains them as soldiers.") |
208 | end |
209 | |
210 | function building_helptext_note() |
211 | |
212 | === modified file 'data/tribes/buildings/productionsites/atlanteans/barracks/init.lua' |
213 | --- data/tribes/buildings/productionsites/atlanteans/barracks/init.lua 2016-11-03 16:08:09 +0000 |
214 | +++ data/tribes/buildings/productionsites/atlanteans/barracks/init.lua 2017-01-21 14:37:18 +0000 |
215 | @@ -34,6 +34,9 @@ |
216 | }, |
217 | |
218 | aihints = { |
219 | + forced_after = 1000, |
220 | + very_weak_ai_limit = 1, |
221 | + weak_ai_limit = 3 |
222 | }, |
223 | |
224 | working_positions = { |
225 | @@ -42,7 +45,8 @@ |
226 | |
227 | inputs = { |
228 | { name = "tabard", amount = 8 }, |
229 | - { name = "trident_light", amount = 8 } |
230 | + { name = "trident_light", amount = 8 }, |
231 | + { name = "atlanteans_recruit", amount = 8 } |
232 | }, |
233 | outputs = { |
234 | "atlanteans_soldier", |
235 | @@ -51,12 +55,11 @@ |
236 | programs = { |
237 | work = { |
238 | -- TRANSLATORS: Completed/Skipped/Did not start recruiting soldier because ... |
239 | - -- TODO(GunChleoc): this should cost us a carrier as well, or maybe a recruit. |
240 | descname = _"recruiting soldier", |
241 | actions = { |
242 | "sleep=15000", |
243 | "return=skipped unless economy needs atlanteans_soldier", |
244 | - "consume=tabard trident_light", |
245 | + "consume=tabard trident_light atlanteans_recruit", |
246 | "animate=working 15000", |
247 | "recruit=atlanteans_soldier" |
248 | } |
249 | |
250 | === modified file 'data/tribes/buildings/productionsites/barbarians/barracks/helptexts.lua' |
251 | --- data/tribes/buildings/productionsites/barbarians/barracks/helptexts.lua 2016-11-03 16:08:09 +0000 |
252 | +++ data/tribes/buildings/productionsites/barbarians/barracks/helptexts.lua 2017-01-21 14:37:18 +0000 |
253 | @@ -13,7 +13,7 @@ |
254 | |
255 | function building_helptext_purpose() |
256 | -- #TRANSLATORS: Purpose helptext for a building |
257 | - return no_purpose_text_yet() |
258 | + return pgettext("barbarians_building", "Equips recruits and trains them as soldiers.") |
259 | end |
260 | |
261 | function building_helptext_note() |
262 | |
263 | === modified file 'data/tribes/buildings/productionsites/barbarians/barracks/init.lua' |
264 | --- data/tribes/buildings/productionsites/barbarians/barracks/init.lua 2016-11-03 16:08:09 +0000 |
265 | +++ data/tribes/buildings/productionsites/barbarians/barracks/init.lua 2017-01-21 14:37:18 +0000 |
266 | @@ -33,6 +33,9 @@ |
267 | }, |
268 | |
269 | aihints = { |
270 | + forced_after = 1000, |
271 | + very_weak_ai_limit = 1, |
272 | + weak_ai_limit = 3 |
273 | }, |
274 | |
275 | working_positions = { |
276 | @@ -40,7 +43,8 @@ |
277 | }, |
278 | |
279 | inputs = { |
280 | - { name = "ax", amount = 8 } |
281 | + { name = "ax", amount = 8 }, |
282 | + { name = "barbarians_recruit", amount = 8 } |
283 | }, |
284 | outputs = { |
285 | "barbarians_soldier", |
286 | @@ -50,11 +54,10 @@ |
287 | work = { |
288 | -- TRANSLATORS: Completed/Skipped/Did not start recruiting soldier because ... |
289 | descname = _"recruiting soldier", |
290 | - -- TODO(GunChleoc): this should cost us a carrier as well, or maybe a recruit. |
291 | actions = { |
292 | "sleep=15000", |
293 | "return=skipped unless economy needs barbarians_soldier", |
294 | - "consume=ax", |
295 | + "consume=ax barbarians_recruit", |
296 | "animate=working 15000", |
297 | "recruit=barbarians_soldier" |
298 | } |
299 | |
300 | === modified file 'data/tribes/buildings/productionsites/empire/barracks/helptexts.lua' |
301 | --- data/tribes/buildings/productionsites/empire/barracks/helptexts.lua 2016-11-03 16:08:09 +0000 |
302 | +++ data/tribes/buildings/productionsites/empire/barracks/helptexts.lua 2017-01-21 14:37:18 +0000 |
303 | @@ -13,7 +13,7 @@ |
304 | |
305 | function building_helptext_purpose() |
306 | -- #TRANSLATORS: Purpose helptext for a building |
307 | - return no_purpose_text_yet() |
308 | + return pgettext("empire_building", "Equips recruits and trains them as soldiers.") |
309 | end |
310 | |
311 | function building_helptext_note() |
312 | |
313 | === modified file 'data/tribes/buildings/productionsites/empire/barracks/init.lua' |
314 | --- data/tribes/buildings/productionsites/empire/barracks/init.lua 2016-11-03 16:08:09 +0000 |
315 | +++ data/tribes/buildings/productionsites/empire/barracks/init.lua 2017-01-21 14:37:18 +0000 |
316 | @@ -35,6 +35,9 @@ |
317 | }, |
318 | |
319 | aihints = { |
320 | + forced_after = 1000, |
321 | + very_weak_ai_limit = 1, |
322 | + weak_ai_limit = 3 |
323 | }, |
324 | |
325 | working_positions = { |
326 | @@ -43,7 +46,8 @@ |
327 | |
328 | inputs = { |
329 | { name = "armor_helmet", amount = 8 }, |
330 | - { name = "spear_wooden", amount = 8 } |
331 | + { name = "spear_wooden", amount = 8 }, |
332 | + { name = "empire_recruit", amount = 8 } |
333 | }, |
334 | outputs = { |
335 | "empire_soldier", |
336 | @@ -52,12 +56,11 @@ |
337 | programs = { |
338 | work = { |
339 | -- TRANSLATORS: Completed/Skipped/Did not start recruiting soldier because ... |
340 | - -- TODO(GunChleoc): this should cost us a carrier as well, or maybe a recruit. |
341 | descname = _"recruiting soldier", |
342 | actions = { |
343 | "sleep=15000", |
344 | "return=skipped unless economy needs empire_soldier", |
345 | - "consume=armor_helmet spear_wooden", |
346 | + "consume=armor_helmet spear_wooden empire_recruit", |
347 | "animate=working 15000", |
348 | "recruit=empire_soldier" |
349 | } |
350 | |
351 | === modified file 'data/tribes/empire.lua' |
352 | --- data/tribes/empire.lua 2016-02-06 10:31:42 +0000 |
353 | +++ data/tribes/empire.lua 2017-01-21 14:37:18 +0000 |
354 | @@ -141,6 +141,7 @@ |
355 | }, |
356 | { |
357 | -- Military |
358 | + "empire_recruit", |
359 | "empire_soldier", |
360 | "empire_trainer", |
361 | "empire_weaponsmith", |
362 | |
363 | === modified file 'data/tribes/init.lua' |
364 | --- data/tribes/init.lua 2016-10-18 09:48:36 +0000 |
365 | +++ data/tribes/init.lua 2017-01-21 14:37:18 +0000 |
366 | @@ -220,6 +220,7 @@ |
367 | include "tribes/workers/atlanteans/hunter/init.lua" |
368 | include "tribes/workers/atlanteans/miller/init.lua" |
369 | include "tribes/workers/atlanteans/miner/init.lua" |
370 | +include "tribes/workers/atlanteans/recruit/init.lua" |
371 | include "tribes/workers/atlanteans/sawyer/init.lua" |
372 | include "tribes/workers/atlanteans/scout/init.lua" |
373 | include "tribes/workers/atlanteans/shipwright/init.lua" |
374 | @@ -258,6 +259,7 @@ |
375 | include "tribes/workers/barbarians/miner/init.lua" |
376 | include "tribes/workers/barbarians/ox/init.lua" |
377 | include "tribes/workers/barbarians/ranger/init.lua" |
378 | +include "tribes/workers/barbarians/recruit/init.lua" |
379 | include "tribes/workers/barbarians/scout/init.lua" |
380 | include "tribes/workers/barbarians/shipwright/init.lua" |
381 | include "tribes/workers/barbarians/smelter/init.lua" |
382 | @@ -286,6 +288,7 @@ |
383 | include "tribes/workers/empire/miner_master/init.lua" |
384 | include "tribes/workers/empire/miner/init.lua" |
385 | include "tribes/workers/empire/pigbreeder/init.lua" |
386 | +include "tribes/workers/empire/recruit/init.lua" |
387 | include "tribes/workers/empire/scout/init.lua" |
388 | include "tribes/workers/empire/shepherd/init.lua" |
389 | include "tribes/workers/empire/shipwright/init.lua" |
390 | |
391 | === modified file 'data/tribes/scripting/help/format_help.lua' |
392 | --- data/tribes/scripting/help/format_help.lua 2016-09-21 08:41:51 +0000 |
393 | +++ data/tribes/scripting/help/format_help.lua 2017-01-21 14:37:18 +0000 |
394 | @@ -111,34 +111,44 @@ |
395 | |
396 | |
397 | -- RST |
398 | --- .. function:: help_consumed_wares(building, program_name) |
399 | --- |
400 | --- Returns information for which wares in which amounts are consumed by a produciton program. |
401 | --- |
402 | --- :arg tribe: The :class:`LuaBuildingDescription` for the building that runs the program |
403 | +-- .. function:: help_consumed_wares_workers(building, program_name) |
404 | +-- |
405 | +-- Returns information for which wares and workers in which amounts are consumed by a production program. |
406 | +-- |
407 | +-- :arg tribe: The :class:`LuaTribeDescription` for the tribe that consumes the ware |
408 | +-- :arg building: The :class:`LuaBuildingDescription` for the building that runs the program |
409 | -- :arg program_name: The name of the production program that the info is collected for |
410 | -- |
411 | -- :returns: A "Ware(s) consumed:" section with image_lines |
412 | -- |
413 | -function help_consumed_wares(building, program_name) |
414 | +function help_consumed_wares_workers(tribe, building, program_name) |
415 | local result = "" |
416 | - local consumed_wares_string = "" |
417 | - local consumed_wares_counter = 0 |
418 | - local consumed_wares = building:consumed_wares(program_name) |
419 | - for countlist, warelist in pairs(consumed_wares) do |
420 | - local consumed_warenames = {} |
421 | + local consumed_items_string = "" |
422 | + local consumed_items_counter = 0 |
423 | + local consumed_wares_workers = building:consumed_wares_workers(program_name) |
424 | + local consumes_wares = false |
425 | + local consumes_workers = false |
426 | + for countlist, itemlist in pairs(consumed_wares_workers) do |
427 | + local consumed_itemnames = {} |
428 | local consumed_images = {} |
429 | local consumed_amount = {} |
430 | local count = 1 |
431 | - for consumed_ware, amount in pairs(warelist) do |
432 | - local ware_description = wl.Game():get_ware_description(consumed_ware) |
433 | - consumed_warenames[count] = _"%1$dx %2$s":bformat(amount, ware_description.descname) |
434 | - consumed_images[count] = ware_description.icon_name |
435 | + for consumed_item, amount in pairs(itemlist) do |
436 | + local description |
437 | + if tribe:has_ware(consumed_item) then |
438 | + description = wl.Game():get_ware_description(consumed_item) |
439 | + consumes_wares = true |
440 | + else |
441 | + description = wl.Game():get_worker_description(consumed_item) |
442 | + consumes_workers = true |
443 | + end |
444 | + consumed_itemnames[count] = _"%1$dx %2$s":bformat(amount, description.descname) |
445 | + consumed_images[count] = description.icon_name |
446 | consumed_amount[count] = amount |
447 | count = count + 1 |
448 | - consumed_wares_counter = consumed_wares_counter + amount |
449 | + consumed_items_counter = consumed_items_counter + amount |
450 | end |
451 | - local text = localize_list(consumed_warenames, "or", "tribes_encyclopedia") |
452 | + local text = localize_list(consumed_itemnames, "or", "tribes_encyclopedia") |
453 | if (countlist > 1) then |
454 | text = _"%s and":bformat(text) |
455 | end |
456 | @@ -155,12 +165,23 @@ |
457 | image_counter = image_counter + 1 |
458 | end |
459 | end |
460 | - consumed_wares_string = image_line(images, 1, p(text)) .. consumed_wares_string |
461 | + consumed_items_string = image_line(images, 1, p(text)) .. consumed_items_string |
462 | end |
463 | - if (consumed_wares_counter > 0) then |
464 | - -- TRANSLATORS: Tribal Encyclopedia: Heading for wares consumed by a productionsite |
465 | - result = result .. rt(h3(ngettext("Ware consumed:", "Wares consumed:", consumed_wares_counter))) |
466 | - result = result .. consumed_wares_string |
467 | + if (consumed_items_counter > 0) then |
468 | + local consumed_header = "" |
469 | + if (consumes_workers) then |
470 | + if (consumes_wares) then |
471 | + -- TRANSLATORS: Tribal Encyclopedia: Heading for wares and workers consumed by a productionsite |
472 | + consumed_header = _("Wares and workers consumed:") |
473 | + else |
474 | + -- TRANSLATORS: Tribal Encyclopedia: Heading for workers consumed by a productionsite |
475 | + consumed_header = _("Workers consumed:") |
476 | + end |
477 | + else |
478 | + -- TRANSLATORS: Tribal Encyclopedia: Heading for wares consumed by a productionsite |
479 | + consumed_header = _("Wares consumed:") |
480 | + end |
481 | + result = result .. rt(h3(consumed_header)) .. consumed_items_string |
482 | end |
483 | return result |
484 | end |
485 | |
486 | === modified file 'data/tribes/scripting/help/ware_help.lua' |
487 | --- data/tribes/scripting/help/ware_help.lua 2016-09-21 08:41:51 +0000 |
488 | +++ data/tribes/scripting/help/ware_help.lua 2017-01-21 14:37:18 +0000 |
489 | @@ -90,7 +90,7 @@ |
490 | |
491 | -- Now collect the consumed wares for each filtered program and print the program info |
492 | for j, program_name in ipairs(producing_programs) do |
493 | - result = result .. help_consumed_wares(building, program_name) |
494 | + result = result .. help_consumed_wares_workers(tribe, building, program_name) |
495 | if (produced_wares_counters[program_name] > 0) then |
496 | result = result |
497 | -- TRANSLATORS: Ware Encyclopedia: Wares produced by a productionsite |
498 | |
499 | === modified file 'data/tribes/scripting/help/worker_help.lua' |
500 | --- data/tribes/scripting/help/worker_help.lua 2016-09-01 15:43:01 +0000 |
501 | +++ data/tribes/scripting/help/worker_help.lua 2017-01-21 14:37:18 +0000 |
502 | @@ -72,7 +72,7 @@ |
503 | |
504 | -- Now collect the consumed wares for each filtered program and print the program info |
505 | for j, program_name in ipairs(producing_programs) do |
506 | - result = result .. help_consumed_wares(building, program_name) |
507 | + result = result .. help_consumed_wares_workers(tribe, building, program_name) |
508 | if (recruited_workers_counters[program_name] > 0) then |
509 | result = result |
510 | -- TRANSLATORS: Worker Encyclopedia: Workers recruited by a productionsite |
511 | |
512 | === modified file 'data/tribes/scripting/starting_conditions/atlanteans/fortified_village.lua' |
513 | --- data/tribes/scripting/starting_conditions/atlanteans/fortified_village.lua 2016-09-20 17:01:35 +0000 |
514 | +++ data/tribes/scripting/starting_conditions/atlanteans/fortified_village.lua 2017-01-21 14:37:18 +0000 |
515 | @@ -75,7 +75,7 @@ |
516 | }) |
517 | |
518 | place_building_in_region(plr, "atlanteans_labyrinth", sf:region(11), { |
519 | - wares = { |
520 | + inputs = { |
521 | atlanteans_bread = 4, |
522 | smoked_fish = 3, |
523 | smoked_meat = 3, |
524 | @@ -83,21 +83,21 @@ |
525 | }) |
526 | |
527 | place_building_in_region(plr, "atlanteans_dungeon", sf:region(11), { |
528 | - wares = {atlanteans_bread = 4, smoked_fish = 3, smoked_meat = 3} |
529 | + inputs = {atlanteans_bread = 4, smoked_fish = 3, smoked_meat = 3} |
530 | }) |
531 | |
532 | place_building_in_region(plr, "atlanteans_armorsmithy", sf:region(11), { |
533 | - wares = { coal=4, gold =4 } |
534 | + inputs = { coal=4, gold =4 } |
535 | }) |
536 | place_building_in_region(plr, "atlanteans_toolsmithy", sf:region(11), { |
537 | - wares = { log = 6 } |
538 | + inputs = { log = 6 } |
539 | }) |
540 | place_building_in_region(plr, "atlanteans_weaponsmithy", sf:region(11), { |
541 | - wares = { coal = 8, iron = 8 } |
542 | + inputs = { coal = 8, iron = 8 } |
543 | }) |
544 | |
545 | place_building_in_region(plr, "atlanteans_sawmill", sf:region(11), { |
546 | - wares = { log = 1 } |
547 | + inputs = { log = 1 } |
548 | }) |
549 | end |
550 | } |
551 | |
552 | === modified file 'data/tribes/scripting/starting_conditions/atlanteans/trading_outpost.lua' |
553 | --- data/tribes/scripting/starting_conditions/atlanteans/trading_outpost.lua 2016-10-23 09:51:50 +0000 |
554 | +++ data/tribes/scripting/starting_conditions/atlanteans/trading_outpost.lua 2017-01-21 14:37:18 +0000 |
555 | @@ -84,7 +84,7 @@ |
556 | }) |
557 | |
558 | place_building_in_region(player, "atlanteans_toolsmithy", sf:region(11), { |
559 | - wares = { |
560 | + inputs = { |
561 | iron = 6, |
562 | log = 6, |
563 | spidercloth = 4 |
564 | @@ -92,13 +92,13 @@ |
565 | }) |
566 | |
567 | place_building_in_region(player, "atlanteans_sawmill", sf:region(11), { |
568 | - wares = { |
569 | + inputs = { |
570 | log = 8 |
571 | } |
572 | }) |
573 | |
574 | place_building_in_region(player, "atlanteans_hunters_house", sf:region(11), { |
575 | - wares = {} |
576 | + inputs = {} |
577 | }) |
578 | |
579 | place_building_in_region(player, "atlanteans_tower", sf:region(13), { |
580 | |
581 | === modified file 'data/tribes/scripting/starting_conditions/barbarians/fortified_village.lua' |
582 | --- data/tribes/scripting/starting_conditions/barbarians/fortified_village.lua 2016-09-20 17:01:35 +0000 |
583 | +++ data/tribes/scripting/starting_conditions/barbarians/fortified_village.lua 2017-01-21 14:37:18 +0000 |
584 | @@ -68,7 +68,7 @@ |
585 | }) |
586 | |
587 | place_building_in_region(plr, "barbarians_battlearena", sf:region(12), { |
588 | - wares = { |
589 | + inputs = { |
590 | barbarians_bread = 8, |
591 | fish = 6, |
592 | meat = 6, |
593 | @@ -78,19 +78,19 @@ |
594 | place_building_in_region(plr, "barbarians_trainingcamp", sf:region(12)) |
595 | |
596 | place_building_in_region(plr, "barbarians_helmsmithy", sf:region(12), { |
597 | - wares = { iron = 4, gold = 4 } |
598 | + inputs = { iron = 4, gold = 4 } |
599 | }) |
600 | place_building_in_region(plr, "barbarians_metal_workshop", sf:region(12), { |
601 | - wares = { iron = 8 }, |
602 | + inputs = { iron = 8 }, |
603 | }) |
604 | place_building_in_region(plr, "barbarians_ax_workshop", sf:region(12), { |
605 | - wares = { coal = 8 }, |
606 | + inputs = { coal = 8 }, |
607 | }) |
608 | place_building_in_region(plr, "barbarians_wood_hardener", sf:region(12), { |
609 | - wares = { log = 1 }, |
610 | + inputs = { log = 1 }, |
611 | }) |
612 | place_building_in_region(plr, "barbarians_lime_kiln", sf:region(12), { |
613 | - wares = { granite = 6, coal = 3 }, |
614 | + inputs = { granite = 6, coal = 3 }, |
615 | }) |
616 | end |
617 | } |
618 | |
619 | === modified file 'data/tribes/scripting/starting_conditions/barbarians/trading_outpost.lua' |
620 | --- data/tribes/scripting/starting_conditions/barbarians/trading_outpost.lua 2016-10-23 09:51:50 +0000 |
621 | +++ data/tribes/scripting/starting_conditions/barbarians/trading_outpost.lua 2017-01-21 14:37:18 +0000 |
622 | @@ -76,20 +76,20 @@ |
623 | }) |
624 | |
625 | place_building_in_region(player, "barbarians_metal_workshop", sf:region(11), { |
626 | - wares = { |
627 | + inputs = { |
628 | iron = 8, |
629 | log = 8 |
630 | } |
631 | }) |
632 | |
633 | place_building_in_region(player, "barbarians_wood_hardener", sf:region(11), { |
634 | - wares = { |
635 | + inputs = { |
636 | log = 8 |
637 | } |
638 | }) |
639 | |
640 | place_building_in_region(player, "barbarians_hunters_hut", sf:region(11), { |
641 | - wares = {} |
642 | + inputs = {} |
643 | }) |
644 | |
645 | place_building_in_region(player, "barbarians_tower", sf:region(13), { |
646 | |
647 | === modified file 'data/tribes/scripting/starting_conditions/empire/fortified_village.lua' |
648 | --- data/tribes/scripting/starting_conditions/empire/fortified_village.lua 2016-09-20 17:01:35 +0000 |
649 | +++ data/tribes/scripting/starting_conditions/empire/fortified_village.lua 2017-01-21 14:37:18 +0000 |
650 | @@ -74,7 +74,7 @@ |
651 | }) |
652 | |
653 | place_building_in_region(plr, "empire_colosseum", sf:region(11), { |
654 | - wares = { |
655 | + inputs = { |
656 | empire_bread = 8, |
657 | fish = 4, |
658 | meat = 4, |
659 | @@ -82,7 +82,7 @@ |
660 | }) |
661 | |
662 | place_building_in_region(plr, "empire_trainingcamp", sf:region(11), { |
663 | - wares = { |
664 | + inputs = { |
665 | fish = 2, |
666 | meat = 2, |
667 | armor_helmet = 2, |
668 | @@ -90,7 +90,7 @@ |
669 | }) |
670 | |
671 | place_building_in_region(plr, "empire_armorsmithy", sf:region(11), { |
672 | - wares = { |
673 | + inputs = { |
674 | gold = 4, |
675 | coal = 8, |
676 | cloth = 5, |
677 | @@ -98,20 +98,20 @@ |
678 | }) |
679 | |
680 | place_building_in_region(plr, "empire_toolsmithy", sf:region(11), { |
681 | - wares = { |
682 | + inputs = { |
683 | iron = 8, |
684 | } |
685 | }) |
686 | |
687 | place_building_in_region(plr, "empire_weaponsmithy", sf:region(11), { |
688 | - wares = { |
689 | + inputs = { |
690 | coal = 4, |
691 | planks = 8, |
692 | } |
693 | }) |
694 | |
695 | place_building_in_region(plr, "empire_sawmill", sf:region(11), { |
696 | - wares = { |
697 | + inputs = { |
698 | log = 1, |
699 | } |
700 | }) |
701 | |
702 | === modified file 'data/tribes/scripting/starting_conditions/empire/trading_outpost.lua' |
703 | --- data/tribes/scripting/starting_conditions/empire/trading_outpost.lua 2016-10-23 09:51:50 +0000 |
704 | +++ data/tribes/scripting/starting_conditions/empire/trading_outpost.lua 2017-01-21 14:37:18 +0000 |
705 | @@ -82,20 +82,20 @@ |
706 | }) |
707 | |
708 | place_building_in_region(player, "empire_toolsmithy", sf:region(11), { |
709 | - wares = { |
710 | + inputs = { |
711 | iron = 8, |
712 | log = 8 |
713 | } |
714 | }) |
715 | |
716 | place_building_in_region(player, "empire_sawmill", sf:region(11), { |
717 | - wares = { |
718 | + inputs = { |
719 | log = 8 |
720 | } |
721 | }) |
722 | |
723 | place_building_in_region(player, "empire_hunters_house", sf:region(11), { |
724 | - wares = {} |
725 | + inputs = {} |
726 | }) |
727 | |
728 | place_building_in_region(player, "empire_tower", sf:region(13), { |
729 | |
730 | === added directory 'data/tribes/workers/atlanteans/recruit' |
731 | === added file 'data/tribes/workers/atlanteans/recruit/helptexts.lua' |
732 | --- data/tribes/workers/atlanteans/recruit/helptexts.lua 1970-01-01 00:00:00 +0000 |
733 | +++ data/tribes/workers/atlanteans/recruit/helptexts.lua 2017-01-21 14:37:18 +0000 |
734 | @@ -0,0 +1,4 @@ |
735 | +function worker_helptext() |
736 | + -- TRANSLATORS: Helptext for a worker: Recruit |
737 | + return pgettext("atlanteans_worker", "Eager to become a soldier and defend your tribe!") |
738 | +end |
739 | |
740 | === added file 'data/tribes/workers/atlanteans/recruit/idle_00.png' |
741 | Binary files data/tribes/workers/atlanteans/recruit/idle_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_00.png 2017-01-21 14:37:18 +0000 differ |
742 | === added file 'data/tribes/workers/atlanteans/recruit/idle_00_pc.png' |
743 | Binary files data/tribes/workers/atlanteans/recruit/idle_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_00_pc.png 2017-01-21 14:37:18 +0000 differ |
744 | === added file 'data/tribes/workers/atlanteans/recruit/idle_01.png' |
745 | Binary files data/tribes/workers/atlanteans/recruit/idle_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_01.png 2017-01-21 14:37:18 +0000 differ |
746 | === added file 'data/tribes/workers/atlanteans/recruit/idle_01_pc.png' |
747 | Binary files data/tribes/workers/atlanteans/recruit/idle_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_01_pc.png 2017-01-21 14:37:18 +0000 differ |
748 | === added file 'data/tribes/workers/atlanteans/recruit/idle_02.png' |
749 | Binary files data/tribes/workers/atlanteans/recruit/idle_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_02.png 2017-01-21 14:37:18 +0000 differ |
750 | === added file 'data/tribes/workers/atlanteans/recruit/idle_02_pc.png' |
751 | Binary files data/tribes/workers/atlanteans/recruit/idle_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_02_pc.png 2017-01-21 14:37:18 +0000 differ |
752 | === added file 'data/tribes/workers/atlanteans/recruit/idle_03.png' |
753 | Binary files data/tribes/workers/atlanteans/recruit/idle_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_03.png 2017-01-21 14:37:18 +0000 differ |
754 | === added file 'data/tribes/workers/atlanteans/recruit/idle_03_pc.png' |
755 | Binary files data/tribes/workers/atlanteans/recruit/idle_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_03_pc.png 2017-01-21 14:37:18 +0000 differ |
756 | === added file 'data/tribes/workers/atlanteans/recruit/idle_04.png' |
757 | Binary files data/tribes/workers/atlanteans/recruit/idle_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_04.png 2017-01-21 14:37:18 +0000 differ |
758 | === added file 'data/tribes/workers/atlanteans/recruit/idle_04_pc.png' |
759 | Binary files data/tribes/workers/atlanteans/recruit/idle_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_04_pc.png 2017-01-21 14:37:18 +0000 differ |
760 | === added file 'data/tribes/workers/atlanteans/recruit/idle_05.png' |
761 | Binary files data/tribes/workers/atlanteans/recruit/idle_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_05.png 2017-01-21 14:37:18 +0000 differ |
762 | === added file 'data/tribes/workers/atlanteans/recruit/idle_05_pc.png' |
763 | Binary files data/tribes/workers/atlanteans/recruit/idle_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_05_pc.png 2017-01-21 14:37:18 +0000 differ |
764 | === added file 'data/tribes/workers/atlanteans/recruit/idle_06.png' |
765 | Binary files data/tribes/workers/atlanteans/recruit/idle_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_06.png 2017-01-21 14:37:18 +0000 differ |
766 | === added file 'data/tribes/workers/atlanteans/recruit/idle_06_pc.png' |
767 | Binary files data/tribes/workers/atlanteans/recruit/idle_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_06_pc.png 2017-01-21 14:37:18 +0000 differ |
768 | === added file 'data/tribes/workers/atlanteans/recruit/idle_07.png' |
769 | Binary files data/tribes/workers/atlanteans/recruit/idle_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_07.png 2017-01-21 14:37:18 +0000 differ |
770 | === added file 'data/tribes/workers/atlanteans/recruit/idle_07_pc.png' |
771 | Binary files data/tribes/workers/atlanteans/recruit/idle_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_07_pc.png 2017-01-21 14:37:18 +0000 differ |
772 | === added file 'data/tribes/workers/atlanteans/recruit/idle_08.png' |
773 | Binary files data/tribes/workers/atlanteans/recruit/idle_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_08.png 2017-01-21 14:37:18 +0000 differ |
774 | === added file 'data/tribes/workers/atlanteans/recruit/idle_08_pc.png' |
775 | Binary files data/tribes/workers/atlanteans/recruit/idle_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_08_pc.png 2017-01-21 14:37:18 +0000 differ |
776 | === added file 'data/tribes/workers/atlanteans/recruit/idle_09.png' |
777 | Binary files data/tribes/workers/atlanteans/recruit/idle_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_09.png 2017-01-21 14:37:18 +0000 differ |
778 | === added file 'data/tribes/workers/atlanteans/recruit/idle_09_pc.png' |
779 | Binary files data/tribes/workers/atlanteans/recruit/idle_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_09_pc.png 2017-01-21 14:37:18 +0000 differ |
780 | === added file 'data/tribes/workers/atlanteans/recruit/idle_10.png' |
781 | Binary files data/tribes/workers/atlanteans/recruit/idle_10.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_10.png 2017-01-21 14:37:18 +0000 differ |
782 | === added file 'data/tribes/workers/atlanteans/recruit/idle_10_pc.png' |
783 | Binary files data/tribes/workers/atlanteans/recruit/idle_10_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_10_pc.png 2017-01-21 14:37:18 +0000 differ |
784 | === added file 'data/tribes/workers/atlanteans/recruit/idle_11.png' |
785 | Binary files data/tribes/workers/atlanteans/recruit/idle_11.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_11.png 2017-01-21 14:37:18 +0000 differ |
786 | === added file 'data/tribes/workers/atlanteans/recruit/idle_11_pc.png' |
787 | Binary files data/tribes/workers/atlanteans/recruit/idle_11_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_11_pc.png 2017-01-21 14:37:18 +0000 differ |
788 | === added file 'data/tribes/workers/atlanteans/recruit/idle_12.png' |
789 | Binary files data/tribes/workers/atlanteans/recruit/idle_12.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_12.png 2017-01-21 14:37:18 +0000 differ |
790 | === added file 'data/tribes/workers/atlanteans/recruit/idle_12_pc.png' |
791 | Binary files data/tribes/workers/atlanteans/recruit/idle_12_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_12_pc.png 2017-01-21 14:37:18 +0000 differ |
792 | === added file 'data/tribes/workers/atlanteans/recruit/idle_13.png' |
793 | Binary files data/tribes/workers/atlanteans/recruit/idle_13.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_13.png 2017-01-21 14:37:18 +0000 differ |
794 | === added file 'data/tribes/workers/atlanteans/recruit/idle_13_pc.png' |
795 | Binary files data/tribes/workers/atlanteans/recruit/idle_13_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_13_pc.png 2017-01-21 14:37:18 +0000 differ |
796 | === added file 'data/tribes/workers/atlanteans/recruit/idle_14.png' |
797 | Binary files data/tribes/workers/atlanteans/recruit/idle_14.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_14.png 2017-01-21 14:37:18 +0000 differ |
798 | === added file 'data/tribes/workers/atlanteans/recruit/idle_14_pc.png' |
799 | Binary files data/tribes/workers/atlanteans/recruit/idle_14_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_14_pc.png 2017-01-21 14:37:18 +0000 differ |
800 | === added file 'data/tribes/workers/atlanteans/recruit/idle_15.png' |
801 | Binary files data/tribes/workers/atlanteans/recruit/idle_15.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_15.png 2017-01-21 14:37:18 +0000 differ |
802 | === added file 'data/tribes/workers/atlanteans/recruit/idle_15_pc.png' |
803 | Binary files data/tribes/workers/atlanteans/recruit/idle_15_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_15_pc.png 2017-01-21 14:37:18 +0000 differ |
804 | === added file 'data/tribes/workers/atlanteans/recruit/idle_16.png' |
805 | Binary files data/tribes/workers/atlanteans/recruit/idle_16.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_16.png 2017-01-21 14:37:18 +0000 differ |
806 | === added file 'data/tribes/workers/atlanteans/recruit/idle_16_pc.png' |
807 | Binary files data/tribes/workers/atlanteans/recruit/idle_16_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_16_pc.png 2017-01-21 14:37:18 +0000 differ |
808 | === added file 'data/tribes/workers/atlanteans/recruit/idle_17.png' |
809 | Binary files data/tribes/workers/atlanteans/recruit/idle_17.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_17.png 2017-01-21 14:37:18 +0000 differ |
810 | === added file 'data/tribes/workers/atlanteans/recruit/idle_17_pc.png' |
811 | Binary files data/tribes/workers/atlanteans/recruit/idle_17_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_17_pc.png 2017-01-21 14:37:18 +0000 differ |
812 | === added file 'data/tribes/workers/atlanteans/recruit/idle_18.png' |
813 | Binary files data/tribes/workers/atlanteans/recruit/idle_18.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_18.png 2017-01-21 14:37:18 +0000 differ |
814 | === added file 'data/tribes/workers/atlanteans/recruit/idle_18_pc.png' |
815 | Binary files data/tribes/workers/atlanteans/recruit/idle_18_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_18_pc.png 2017-01-21 14:37:18 +0000 differ |
816 | === added file 'data/tribes/workers/atlanteans/recruit/idle_19.png' |
817 | Binary files data/tribes/workers/atlanteans/recruit/idle_19.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_19.png 2017-01-21 14:37:18 +0000 differ |
818 | === added file 'data/tribes/workers/atlanteans/recruit/idle_19_pc.png' |
819 | Binary files data/tribes/workers/atlanteans/recruit/idle_19_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_19_pc.png 2017-01-21 14:37:18 +0000 differ |
820 | === added file 'data/tribes/workers/atlanteans/recruit/idle_20.png' |
821 | Binary files data/tribes/workers/atlanteans/recruit/idle_20.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_20.png 2017-01-21 14:37:18 +0000 differ |
822 | === added file 'data/tribes/workers/atlanteans/recruit/idle_20_pc.png' |
823 | Binary files data/tribes/workers/atlanteans/recruit/idle_20_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_20_pc.png 2017-01-21 14:37:18 +0000 differ |
824 | === added file 'data/tribes/workers/atlanteans/recruit/idle_21.png' |
825 | Binary files data/tribes/workers/atlanteans/recruit/idle_21.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_21.png 2017-01-21 14:37:18 +0000 differ |
826 | === added file 'data/tribes/workers/atlanteans/recruit/idle_21_pc.png' |
827 | Binary files data/tribes/workers/atlanteans/recruit/idle_21_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_21_pc.png 2017-01-21 14:37:18 +0000 differ |
828 | === added file 'data/tribes/workers/atlanteans/recruit/idle_22.png' |
829 | Binary files data/tribes/workers/atlanteans/recruit/idle_22.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_22.png 2017-01-21 14:37:18 +0000 differ |
830 | === added file 'data/tribes/workers/atlanteans/recruit/idle_22_pc.png' |
831 | Binary files data/tribes/workers/atlanteans/recruit/idle_22_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_22_pc.png 2017-01-21 14:37:18 +0000 differ |
832 | === added file 'data/tribes/workers/atlanteans/recruit/idle_23.png' |
833 | Binary files data/tribes/workers/atlanteans/recruit/idle_23.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_23.png 2017-01-21 14:37:18 +0000 differ |
834 | === added file 'data/tribes/workers/atlanteans/recruit/idle_23_pc.png' |
835 | Binary files data/tribes/workers/atlanteans/recruit/idle_23_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_23_pc.png 2017-01-21 14:37:18 +0000 differ |
836 | === added file 'data/tribes/workers/atlanteans/recruit/idle_24.png' |
837 | Binary files data/tribes/workers/atlanteans/recruit/idle_24.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_24.png 2017-01-21 14:37:18 +0000 differ |
838 | === added file 'data/tribes/workers/atlanteans/recruit/idle_24_pc.png' |
839 | Binary files data/tribes/workers/atlanteans/recruit/idle_24_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_24_pc.png 2017-01-21 14:37:18 +0000 differ |
840 | === added file 'data/tribes/workers/atlanteans/recruit/idle_25.png' |
841 | Binary files data/tribes/workers/atlanteans/recruit/idle_25.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_25.png 2017-01-21 14:37:18 +0000 differ |
842 | === added file 'data/tribes/workers/atlanteans/recruit/idle_25_pc.png' |
843 | Binary files data/tribes/workers/atlanteans/recruit/idle_25_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_25_pc.png 2017-01-21 14:37:18 +0000 differ |
844 | === added file 'data/tribes/workers/atlanteans/recruit/idle_26.png' |
845 | Binary files data/tribes/workers/atlanteans/recruit/idle_26.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_26.png 2017-01-21 14:37:18 +0000 differ |
846 | === added file 'data/tribes/workers/atlanteans/recruit/idle_26_pc.png' |
847 | Binary files data/tribes/workers/atlanteans/recruit/idle_26_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_26_pc.png 2017-01-21 14:37:18 +0000 differ |
848 | === added file 'data/tribes/workers/atlanteans/recruit/idle_27.png' |
849 | Binary files data/tribes/workers/atlanteans/recruit/idle_27.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_27.png 2017-01-21 14:37:18 +0000 differ |
850 | === added file 'data/tribes/workers/atlanteans/recruit/idle_27_pc.png' |
851 | Binary files data/tribes/workers/atlanteans/recruit/idle_27_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_27_pc.png 2017-01-21 14:37:18 +0000 differ |
852 | === added file 'data/tribes/workers/atlanteans/recruit/idle_28.png' |
853 | Binary files data/tribes/workers/atlanteans/recruit/idle_28.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_28.png 2017-01-21 14:37:18 +0000 differ |
854 | === added file 'data/tribes/workers/atlanteans/recruit/idle_28_pc.png' |
855 | Binary files data/tribes/workers/atlanteans/recruit/idle_28_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_28_pc.png 2017-01-21 14:37:18 +0000 differ |
856 | === added file 'data/tribes/workers/atlanteans/recruit/idle_29.png' |
857 | Binary files data/tribes/workers/atlanteans/recruit/idle_29.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_29.png 2017-01-21 14:37:18 +0000 differ |
858 | === added file 'data/tribes/workers/atlanteans/recruit/idle_29_pc.png' |
859 | Binary files data/tribes/workers/atlanteans/recruit/idle_29_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_29_pc.png 2017-01-21 14:37:18 +0000 differ |
860 | === added file 'data/tribes/workers/atlanteans/recruit/idle_30.png' |
861 | Binary files data/tribes/workers/atlanteans/recruit/idle_30.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_30.png 2017-01-21 14:37:18 +0000 differ |
862 | === added file 'data/tribes/workers/atlanteans/recruit/idle_30_pc.png' |
863 | Binary files data/tribes/workers/atlanteans/recruit/idle_30_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_30_pc.png 2017-01-21 14:37:18 +0000 differ |
864 | === added file 'data/tribes/workers/atlanteans/recruit/idle_31.png' |
865 | Binary files data/tribes/workers/atlanteans/recruit/idle_31.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_31.png 2017-01-21 14:37:18 +0000 differ |
866 | === added file 'data/tribes/workers/atlanteans/recruit/idle_31_pc.png' |
867 | Binary files data/tribes/workers/atlanteans/recruit/idle_31_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_31_pc.png 2017-01-21 14:37:18 +0000 differ |
868 | === added file 'data/tribes/workers/atlanteans/recruit/idle_32.png' |
869 | Binary files data/tribes/workers/atlanteans/recruit/idle_32.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_32.png 2017-01-21 14:37:18 +0000 differ |
870 | === added file 'data/tribes/workers/atlanteans/recruit/idle_32_pc.png' |
871 | Binary files data/tribes/workers/atlanteans/recruit/idle_32_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_32_pc.png 2017-01-21 14:37:18 +0000 differ |
872 | === added file 'data/tribes/workers/atlanteans/recruit/idle_33.png' |
873 | Binary files data/tribes/workers/atlanteans/recruit/idle_33.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_33.png 2017-01-21 14:37:18 +0000 differ |
874 | === added file 'data/tribes/workers/atlanteans/recruit/idle_33_pc.png' |
875 | Binary files data/tribes/workers/atlanteans/recruit/idle_33_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_33_pc.png 2017-01-21 14:37:18 +0000 differ |
876 | === added file 'data/tribes/workers/atlanteans/recruit/idle_34.png' |
877 | Binary files data/tribes/workers/atlanteans/recruit/idle_34.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_34.png 2017-01-21 14:37:18 +0000 differ |
878 | === added file 'data/tribes/workers/atlanteans/recruit/idle_34_pc.png' |
879 | Binary files data/tribes/workers/atlanteans/recruit/idle_34_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_34_pc.png 2017-01-21 14:37:18 +0000 differ |
880 | === added file 'data/tribes/workers/atlanteans/recruit/idle_35.png' |
881 | Binary files data/tribes/workers/atlanteans/recruit/idle_35.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_35.png 2017-01-21 14:37:18 +0000 differ |
882 | === added file 'data/tribes/workers/atlanteans/recruit/idle_35_pc.png' |
883 | Binary files data/tribes/workers/atlanteans/recruit/idle_35_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_35_pc.png 2017-01-21 14:37:18 +0000 differ |
884 | === added file 'data/tribes/workers/atlanteans/recruit/idle_36.png' |
885 | Binary files data/tribes/workers/atlanteans/recruit/idle_36.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_36.png 2017-01-21 14:37:18 +0000 differ |
886 | === added file 'data/tribes/workers/atlanteans/recruit/idle_36_pc.png' |
887 | Binary files data/tribes/workers/atlanteans/recruit/idle_36_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_36_pc.png 2017-01-21 14:37:18 +0000 differ |
888 | === added file 'data/tribes/workers/atlanteans/recruit/idle_37.png' |
889 | Binary files data/tribes/workers/atlanteans/recruit/idle_37.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_37.png 2017-01-21 14:37:18 +0000 differ |
890 | === added file 'data/tribes/workers/atlanteans/recruit/idle_37_pc.png' |
891 | Binary files data/tribes/workers/atlanteans/recruit/idle_37_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_37_pc.png 2017-01-21 14:37:18 +0000 differ |
892 | === added file 'data/tribes/workers/atlanteans/recruit/idle_38.png' |
893 | Binary files data/tribes/workers/atlanteans/recruit/idle_38.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_38.png 2017-01-21 14:37:18 +0000 differ |
894 | === added file 'data/tribes/workers/atlanteans/recruit/idle_38_pc.png' |
895 | Binary files data/tribes/workers/atlanteans/recruit/idle_38_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_38_pc.png 2017-01-21 14:37:18 +0000 differ |
896 | === added file 'data/tribes/workers/atlanteans/recruit/idle_39.png' |
897 | Binary files data/tribes/workers/atlanteans/recruit/idle_39.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_39.png 2017-01-21 14:37:18 +0000 differ |
898 | === added file 'data/tribes/workers/atlanteans/recruit/idle_39_pc.png' |
899 | Binary files data/tribes/workers/atlanteans/recruit/idle_39_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/idle_39_pc.png 2017-01-21 14:37:18 +0000 differ |
900 | === added file 'data/tribes/workers/atlanteans/recruit/init.lua' |
901 | --- data/tribes/workers/atlanteans/recruit/init.lua 1970-01-01 00:00:00 +0000 |
902 | +++ data/tribes/workers/atlanteans/recruit/init.lua 2017-01-21 14:37:18 +0000 |
903 | @@ -0,0 +1,24 @@ |
904 | +dirname = path.dirname(__file__) |
905 | + |
906 | +animations = { |
907 | + idle = { |
908 | + pictures = path.list_files(dirname .. "idle_??.png"), |
909 | + hotspot = { 10, 36 }, |
910 | + fps = 5 |
911 | + }, |
912 | +} |
913 | +add_worker_animations(animations, "walk", dirname, "walk", {20, 34}, 10) |
914 | + |
915 | +tribes:new_worker_type { |
916 | + msgctxt = "atlanteans_worker", |
917 | + name = "atlanteans_recruit", |
918 | + -- TRANSLATORS: This is a worker name used in lists of workers |
919 | + descname = pgettext("atlanteans_worker", "Recruit"), |
920 | + helptext_script = dirname .. "helptexts.lua", |
921 | + icon = dirname .. "menu.png", |
922 | + vision_range = 2, |
923 | + |
924 | + buildcost = {}, -- This will give the worker the property "buildable" |
925 | + |
926 | + animations = animations, |
927 | +} |
928 | |
929 | === added file 'data/tribes/workers/atlanteans/recruit/menu.png' |
930 | Binary files data/tribes/workers/atlanteans/recruit/menu.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/menu.png 2017-01-21 14:37:18 +0000 differ |
931 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_00.png' |
932 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_00.png 2017-01-21 14:37:18 +0000 differ |
933 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_00_pc.png' |
934 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_00_pc.png 2017-01-21 14:37:18 +0000 differ |
935 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_01.png' |
936 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_01.png 2017-01-21 14:37:18 +0000 differ |
937 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_01_pc.png' |
938 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_01_pc.png 2017-01-21 14:37:18 +0000 differ |
939 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_02.png' |
940 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_02.png 2017-01-21 14:37:18 +0000 differ |
941 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_02_pc.png' |
942 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_02_pc.png 2017-01-21 14:37:18 +0000 differ |
943 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_03.png' |
944 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_03.png 2017-01-21 14:37:18 +0000 differ |
945 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_03_pc.png' |
946 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_03_pc.png 2017-01-21 14:37:18 +0000 differ |
947 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_04.png' |
948 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_04.png 2017-01-21 14:37:18 +0000 differ |
949 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_04_pc.png' |
950 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_04_pc.png 2017-01-21 14:37:18 +0000 differ |
951 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_05.png' |
952 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_05.png 2017-01-21 14:37:18 +0000 differ |
953 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_05_pc.png' |
954 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_05_pc.png 2017-01-21 14:37:18 +0000 differ |
955 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_06.png' |
956 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_06.png 2017-01-21 14:37:18 +0000 differ |
957 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_06_pc.png' |
958 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_06_pc.png 2017-01-21 14:37:18 +0000 differ |
959 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_07.png' |
960 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_07.png 2017-01-21 14:37:18 +0000 differ |
961 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_07_pc.png' |
962 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_07_pc.png 2017-01-21 14:37:18 +0000 differ |
963 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_08.png' |
964 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_08.png 2017-01-21 14:37:18 +0000 differ |
965 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_08_pc.png' |
966 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_08_pc.png 2017-01-21 14:37:18 +0000 differ |
967 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_09.png' |
968 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_09.png 2017-01-21 14:37:18 +0000 differ |
969 | === added file 'data/tribes/workers/atlanteans/recruit/walk_e_09_pc.png' |
970 | Binary files data/tribes/workers/atlanteans/recruit/walk_e_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_e_09_pc.png 2017-01-21 14:37:18 +0000 differ |
971 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_00.png' |
972 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_00.png 2017-01-21 14:37:18 +0000 differ |
973 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_00_pc.png' |
974 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_00_pc.png 2017-01-21 14:37:18 +0000 differ |
975 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_01.png' |
976 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_01.png 2017-01-21 14:37:18 +0000 differ |
977 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_01_pc.png' |
978 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_01_pc.png 2017-01-21 14:37:18 +0000 differ |
979 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_02.png' |
980 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_02.png 2017-01-21 14:37:18 +0000 differ |
981 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_02_pc.png' |
982 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_02_pc.png 2017-01-21 14:37:18 +0000 differ |
983 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_03.png' |
984 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_03.png 2017-01-21 14:37:18 +0000 differ |
985 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_03_pc.png' |
986 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_03_pc.png 2017-01-21 14:37:18 +0000 differ |
987 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_04.png' |
988 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_04.png 2017-01-21 14:37:18 +0000 differ |
989 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_04_pc.png' |
990 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_04_pc.png 2017-01-21 14:37:18 +0000 differ |
991 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_05.png' |
992 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_05.png 2017-01-21 14:37:18 +0000 differ |
993 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_05_pc.png' |
994 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_05_pc.png 2017-01-21 14:37:18 +0000 differ |
995 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_06.png' |
996 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_06.png 2017-01-21 14:37:18 +0000 differ |
997 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_06_pc.png' |
998 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_06_pc.png 2017-01-21 14:37:18 +0000 differ |
999 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_07.png' |
1000 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_07.png 2017-01-21 14:37:18 +0000 differ |
1001 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_07_pc.png' |
1002 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1003 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_08.png' |
1004 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_08.png 2017-01-21 14:37:18 +0000 differ |
1005 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_08_pc.png' |
1006 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1007 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_09.png' |
1008 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_09.png 2017-01-21 14:37:18 +0000 differ |
1009 | === added file 'data/tribes/workers/atlanteans/recruit/walk_ne_09_pc.png' |
1010 | Binary files data/tribes/workers/atlanteans/recruit/walk_ne_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_ne_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1011 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_00.png' |
1012 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_00.png 2017-01-21 14:37:18 +0000 differ |
1013 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_00_pc.png' |
1014 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1015 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_01.png' |
1016 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_01.png 2017-01-21 14:37:18 +0000 differ |
1017 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_01_pc.png' |
1018 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1019 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_02.png' |
1020 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_02.png 2017-01-21 14:37:18 +0000 differ |
1021 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_02_pc.png' |
1022 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1023 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_03.png' |
1024 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_03.png 2017-01-21 14:37:18 +0000 differ |
1025 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_03_pc.png' |
1026 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1027 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_04.png' |
1028 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_04.png 2017-01-21 14:37:18 +0000 differ |
1029 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_04_pc.png' |
1030 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1031 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_05.png' |
1032 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_05.png 2017-01-21 14:37:18 +0000 differ |
1033 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_05_pc.png' |
1034 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1035 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_06.png' |
1036 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_06.png 2017-01-21 14:37:18 +0000 differ |
1037 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_06_pc.png' |
1038 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1039 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_07.png' |
1040 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_07.png 2017-01-21 14:37:18 +0000 differ |
1041 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_07_pc.png' |
1042 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1043 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_08.png' |
1044 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_08.png 2017-01-21 14:37:18 +0000 differ |
1045 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_08_pc.png' |
1046 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1047 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_09.png' |
1048 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_09.png 2017-01-21 14:37:18 +0000 differ |
1049 | === added file 'data/tribes/workers/atlanteans/recruit/walk_nw_09_pc.png' |
1050 | Binary files data/tribes/workers/atlanteans/recruit/walk_nw_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_nw_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1051 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_00.png' |
1052 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_00.png 2017-01-21 14:37:18 +0000 differ |
1053 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_00_pc.png' |
1054 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1055 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_01.png' |
1056 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_01.png 2017-01-21 14:37:18 +0000 differ |
1057 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_01_pc.png' |
1058 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1059 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_02.png' |
1060 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_02.png 2017-01-21 14:37:18 +0000 differ |
1061 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_02_pc.png' |
1062 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1063 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_03.png' |
1064 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_03.png 2017-01-21 14:37:18 +0000 differ |
1065 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_03_pc.png' |
1066 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1067 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_04.png' |
1068 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_04.png 2017-01-21 14:37:18 +0000 differ |
1069 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_04_pc.png' |
1070 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1071 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_05.png' |
1072 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_05.png 2017-01-21 14:37:18 +0000 differ |
1073 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_05_pc.png' |
1074 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1075 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_06.png' |
1076 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_06.png 2017-01-21 14:37:18 +0000 differ |
1077 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_06_pc.png' |
1078 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1079 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_07.png' |
1080 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_07.png 2017-01-21 14:37:18 +0000 differ |
1081 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_07_pc.png' |
1082 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1083 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_08.png' |
1084 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_08.png 2017-01-21 14:37:18 +0000 differ |
1085 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_08_pc.png' |
1086 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1087 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_09.png' |
1088 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_09.png 2017-01-21 14:37:18 +0000 differ |
1089 | === added file 'data/tribes/workers/atlanteans/recruit/walk_se_09_pc.png' |
1090 | Binary files data/tribes/workers/atlanteans/recruit/walk_se_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_se_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1091 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_00.png' |
1092 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_00.png 2017-01-21 14:37:18 +0000 differ |
1093 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_00_pc.png' |
1094 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1095 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_01.png' |
1096 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_01.png 2017-01-21 14:37:18 +0000 differ |
1097 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_01_pc.png' |
1098 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1099 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_02.png' |
1100 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_02.png 2017-01-21 14:37:18 +0000 differ |
1101 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_02_pc.png' |
1102 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1103 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_03.png' |
1104 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_03.png 2017-01-21 14:37:18 +0000 differ |
1105 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_03_pc.png' |
1106 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1107 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_04.png' |
1108 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_04.png 2017-01-21 14:37:18 +0000 differ |
1109 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_04_pc.png' |
1110 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1111 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_05.png' |
1112 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_05.png 2017-01-21 14:37:18 +0000 differ |
1113 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_05_pc.png' |
1114 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1115 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_06.png' |
1116 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_06.png 2017-01-21 14:37:18 +0000 differ |
1117 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_06_pc.png' |
1118 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1119 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_07.png' |
1120 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_07.png 2017-01-21 14:37:18 +0000 differ |
1121 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_07_pc.png' |
1122 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1123 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_08.png' |
1124 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_08.png 2017-01-21 14:37:18 +0000 differ |
1125 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_08_pc.png' |
1126 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1127 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_09.png' |
1128 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_09.png 2017-01-21 14:37:18 +0000 differ |
1129 | === added file 'data/tribes/workers/atlanteans/recruit/walk_sw_09_pc.png' |
1130 | Binary files data/tribes/workers/atlanteans/recruit/walk_sw_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_sw_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1131 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_00.png' |
1132 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_00.png 2017-01-21 14:37:18 +0000 differ |
1133 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_00_pc.png' |
1134 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1135 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_01.png' |
1136 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_01.png 2017-01-21 14:37:18 +0000 differ |
1137 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_01_pc.png' |
1138 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1139 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_02.png' |
1140 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_02.png 2017-01-21 14:37:18 +0000 differ |
1141 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_02_pc.png' |
1142 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1143 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_03.png' |
1144 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_03.png 2017-01-21 14:37:18 +0000 differ |
1145 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_03_pc.png' |
1146 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1147 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_04.png' |
1148 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_04.png 2017-01-21 14:37:18 +0000 differ |
1149 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_04_pc.png' |
1150 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1151 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_05.png' |
1152 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_05.png 2017-01-21 14:37:18 +0000 differ |
1153 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_05_pc.png' |
1154 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1155 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_06.png' |
1156 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_06.png 2017-01-21 14:37:18 +0000 differ |
1157 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_06_pc.png' |
1158 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1159 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_07.png' |
1160 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_07.png 2017-01-21 14:37:18 +0000 differ |
1161 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_07_pc.png' |
1162 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1163 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_08.png' |
1164 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_08.png 2017-01-21 14:37:18 +0000 differ |
1165 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_08_pc.png' |
1166 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1167 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_09.png' |
1168 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_09.png 2017-01-21 14:37:18 +0000 differ |
1169 | === added file 'data/tribes/workers/atlanteans/recruit/walk_w_09_pc.png' |
1170 | Binary files data/tribes/workers/atlanteans/recruit/walk_w_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/atlanteans/recruit/walk_w_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1171 | === modified file 'data/tribes/workers/atlanteans/soldier/init.lua' |
1172 | --- data/tribes/workers/atlanteans/soldier/init.lua 2016-09-27 06:30:47 +0000 |
1173 | +++ data/tribes/workers/atlanteans/soldier/init.lua 2017-01-21 14:37:18 +0000 |
1174 | @@ -69,14 +69,10 @@ |
1175 | icon = dirname .. "menu.png", |
1176 | vision_range = 2, |
1177 | |
1178 | - buildcost = { |
1179 | - atlanteans_carrier = 1, |
1180 | - tabard = 1, |
1181 | - trident_light = 1 |
1182 | - }, |
1183 | - |
1184 | animations = animations, |
1185 | |
1186 | + default_target_quantity = 10, |
1187 | + |
1188 | -- Battle attributes - initial values and per level increase |
1189 | health = { |
1190 | max_level = 1, |
1191 | |
1192 | === added directory 'data/tribes/workers/barbarians/recruit' |
1193 | === added file 'data/tribes/workers/barbarians/recruit/helptexts.lua' |
1194 | --- data/tribes/workers/barbarians/recruit/helptexts.lua 1970-01-01 00:00:00 +0000 |
1195 | +++ data/tribes/workers/barbarians/recruit/helptexts.lua 2017-01-21 14:37:18 +0000 |
1196 | @@ -0,0 +1,4 @@ |
1197 | +function worker_helptext() |
1198 | + -- TRANSLATORS: Helptext for a worker: Recruit |
1199 | + return pgettext("barbarians_worker", "Eager to become a soldier and defend your tribe!") |
1200 | +end |
1201 | |
1202 | === added file 'data/tribes/workers/barbarians/recruit/idle_00.png' |
1203 | Binary files data/tribes/workers/barbarians/recruit/idle_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_00.png 2017-01-21 14:37:18 +0000 differ |
1204 | === added file 'data/tribes/workers/barbarians/recruit/idle_00_pc.png' |
1205 | Binary files data/tribes/workers/barbarians/recruit/idle_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1206 | === added file 'data/tribes/workers/barbarians/recruit/idle_01.png' |
1207 | Binary files data/tribes/workers/barbarians/recruit/idle_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_01.png 2017-01-21 14:37:18 +0000 differ |
1208 | === added file 'data/tribes/workers/barbarians/recruit/idle_01_pc.png' |
1209 | Binary files data/tribes/workers/barbarians/recruit/idle_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1210 | === added file 'data/tribes/workers/barbarians/recruit/idle_02.png' |
1211 | Binary files data/tribes/workers/barbarians/recruit/idle_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_02.png 2017-01-21 14:37:18 +0000 differ |
1212 | === added file 'data/tribes/workers/barbarians/recruit/idle_02_pc.png' |
1213 | Binary files data/tribes/workers/barbarians/recruit/idle_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1214 | === added file 'data/tribes/workers/barbarians/recruit/idle_03.png' |
1215 | Binary files data/tribes/workers/barbarians/recruit/idle_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_03.png 2017-01-21 14:37:18 +0000 differ |
1216 | === added file 'data/tribes/workers/barbarians/recruit/idle_03_pc.png' |
1217 | Binary files data/tribes/workers/barbarians/recruit/idle_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1218 | === added file 'data/tribes/workers/barbarians/recruit/idle_04.png' |
1219 | Binary files data/tribes/workers/barbarians/recruit/idle_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_04.png 2017-01-21 14:37:18 +0000 differ |
1220 | === added file 'data/tribes/workers/barbarians/recruit/idle_04_pc.png' |
1221 | Binary files data/tribes/workers/barbarians/recruit/idle_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1222 | === added file 'data/tribes/workers/barbarians/recruit/idle_05.png' |
1223 | Binary files data/tribes/workers/barbarians/recruit/idle_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_05.png 2017-01-21 14:37:18 +0000 differ |
1224 | === added file 'data/tribes/workers/barbarians/recruit/idle_05_pc.png' |
1225 | Binary files data/tribes/workers/barbarians/recruit/idle_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1226 | === added file 'data/tribes/workers/barbarians/recruit/idle_06.png' |
1227 | Binary files data/tribes/workers/barbarians/recruit/idle_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_06.png 2017-01-21 14:37:18 +0000 differ |
1228 | === added file 'data/tribes/workers/barbarians/recruit/idle_06_pc.png' |
1229 | Binary files data/tribes/workers/barbarians/recruit/idle_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1230 | === added file 'data/tribes/workers/barbarians/recruit/idle_07.png' |
1231 | Binary files data/tribes/workers/barbarians/recruit/idle_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_07.png 2017-01-21 14:37:18 +0000 differ |
1232 | === added file 'data/tribes/workers/barbarians/recruit/idle_07_pc.png' |
1233 | Binary files data/tribes/workers/barbarians/recruit/idle_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1234 | === added file 'data/tribes/workers/barbarians/recruit/idle_08.png' |
1235 | Binary files data/tribes/workers/barbarians/recruit/idle_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_08.png 2017-01-21 14:37:18 +0000 differ |
1236 | === added file 'data/tribes/workers/barbarians/recruit/idle_08_pc.png' |
1237 | Binary files data/tribes/workers/barbarians/recruit/idle_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1238 | === added file 'data/tribes/workers/barbarians/recruit/idle_09.png' |
1239 | Binary files data/tribes/workers/barbarians/recruit/idle_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_09.png 2017-01-21 14:37:18 +0000 differ |
1240 | === added file 'data/tribes/workers/barbarians/recruit/idle_09_pc.png' |
1241 | Binary files data/tribes/workers/barbarians/recruit/idle_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1242 | === added file 'data/tribes/workers/barbarians/recruit/idle_10.png' |
1243 | Binary files data/tribes/workers/barbarians/recruit/idle_10.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_10.png 2017-01-21 14:37:18 +0000 differ |
1244 | === added file 'data/tribes/workers/barbarians/recruit/idle_10_pc.png' |
1245 | Binary files data/tribes/workers/barbarians/recruit/idle_10_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_10_pc.png 2017-01-21 14:37:18 +0000 differ |
1246 | === added file 'data/tribes/workers/barbarians/recruit/idle_11.png' |
1247 | Binary files data/tribes/workers/barbarians/recruit/idle_11.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_11.png 2017-01-21 14:37:18 +0000 differ |
1248 | === added file 'data/tribes/workers/barbarians/recruit/idle_11_pc.png' |
1249 | Binary files data/tribes/workers/barbarians/recruit/idle_11_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_11_pc.png 2017-01-21 14:37:18 +0000 differ |
1250 | === added file 'data/tribes/workers/barbarians/recruit/idle_12.png' |
1251 | Binary files data/tribes/workers/barbarians/recruit/idle_12.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_12.png 2017-01-21 14:37:18 +0000 differ |
1252 | === added file 'data/tribes/workers/barbarians/recruit/idle_12_pc.png' |
1253 | Binary files data/tribes/workers/barbarians/recruit/idle_12_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_12_pc.png 2017-01-21 14:37:18 +0000 differ |
1254 | === added file 'data/tribes/workers/barbarians/recruit/idle_13.png' |
1255 | Binary files data/tribes/workers/barbarians/recruit/idle_13.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_13.png 2017-01-21 14:37:18 +0000 differ |
1256 | === added file 'data/tribes/workers/barbarians/recruit/idle_13_pc.png' |
1257 | Binary files data/tribes/workers/barbarians/recruit/idle_13_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_13_pc.png 2017-01-21 14:37:18 +0000 differ |
1258 | === added file 'data/tribes/workers/barbarians/recruit/idle_14.png' |
1259 | Binary files data/tribes/workers/barbarians/recruit/idle_14.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_14.png 2017-01-21 14:37:18 +0000 differ |
1260 | === added file 'data/tribes/workers/barbarians/recruit/idle_14_pc.png' |
1261 | Binary files data/tribes/workers/barbarians/recruit/idle_14_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_14_pc.png 2017-01-21 14:37:18 +0000 differ |
1262 | === added file 'data/tribes/workers/barbarians/recruit/idle_15.png' |
1263 | Binary files data/tribes/workers/barbarians/recruit/idle_15.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_15.png 2017-01-21 14:37:18 +0000 differ |
1264 | === added file 'data/tribes/workers/barbarians/recruit/idle_15_pc.png' |
1265 | Binary files data/tribes/workers/barbarians/recruit/idle_15_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_15_pc.png 2017-01-21 14:37:18 +0000 differ |
1266 | === added file 'data/tribes/workers/barbarians/recruit/idle_16.png' |
1267 | Binary files data/tribes/workers/barbarians/recruit/idle_16.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_16.png 2017-01-21 14:37:18 +0000 differ |
1268 | === added file 'data/tribes/workers/barbarians/recruit/idle_16_pc.png' |
1269 | Binary files data/tribes/workers/barbarians/recruit/idle_16_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_16_pc.png 2017-01-21 14:37:18 +0000 differ |
1270 | === added file 'data/tribes/workers/barbarians/recruit/idle_17.png' |
1271 | Binary files data/tribes/workers/barbarians/recruit/idle_17.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_17.png 2017-01-21 14:37:18 +0000 differ |
1272 | === added file 'data/tribes/workers/barbarians/recruit/idle_17_pc.png' |
1273 | Binary files data/tribes/workers/barbarians/recruit/idle_17_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_17_pc.png 2017-01-21 14:37:18 +0000 differ |
1274 | === added file 'data/tribes/workers/barbarians/recruit/idle_18.png' |
1275 | Binary files data/tribes/workers/barbarians/recruit/idle_18.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_18.png 2017-01-21 14:37:18 +0000 differ |
1276 | === added file 'data/tribes/workers/barbarians/recruit/idle_18_pc.png' |
1277 | Binary files data/tribes/workers/barbarians/recruit/idle_18_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_18_pc.png 2017-01-21 14:37:18 +0000 differ |
1278 | === added file 'data/tribes/workers/barbarians/recruit/idle_19.png' |
1279 | Binary files data/tribes/workers/barbarians/recruit/idle_19.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_19.png 2017-01-21 14:37:18 +0000 differ |
1280 | === added file 'data/tribes/workers/barbarians/recruit/idle_19_pc.png' |
1281 | Binary files data/tribes/workers/barbarians/recruit/idle_19_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/idle_19_pc.png 2017-01-21 14:37:18 +0000 differ |
1282 | === added file 'data/tribes/workers/barbarians/recruit/init.lua' |
1283 | --- data/tribes/workers/barbarians/recruit/init.lua 1970-01-01 00:00:00 +0000 |
1284 | +++ data/tribes/workers/barbarians/recruit/init.lua 2017-01-21 14:37:18 +0000 |
1285 | @@ -0,0 +1,25 @@ |
1286 | +dirname = path.dirname(__file__) |
1287 | + |
1288 | +animations = { |
1289 | + idle = { |
1290 | + pictures = path.list_files(dirname .. "idle_??.png"), |
1291 | + hotspot = { 16, 31 }, |
1292 | + fps = 5 |
1293 | + } |
1294 | +} |
1295 | +add_worker_animations(animations, "walk", dirname, "walk", {16, 31}, 10) |
1296 | + |
1297 | + |
1298 | +tribes:new_worker_type { |
1299 | + msgctxt = "barbarians_worker", |
1300 | + name = "barbarians_recruit", |
1301 | + -- TRANSLATORS: This is a worker name used in lists of workers |
1302 | + descname = pgettext("barbarians_worker", "Recruit"), |
1303 | + helptext_script = dirname .. "helptexts.lua", |
1304 | + icon = dirname .. "menu.png", |
1305 | + vision_range = 2, |
1306 | + |
1307 | + buildcost = {}, -- This will give the worker the property "buildable" |
1308 | + |
1309 | + animations = animations, |
1310 | +} |
1311 | |
1312 | === added file 'data/tribes/workers/barbarians/recruit/menu.png' |
1313 | Binary files data/tribes/workers/barbarians/recruit/menu.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/menu.png 2017-01-21 14:37:18 +0000 differ |
1314 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_00.png' |
1315 | Binary files data/tribes/workers/barbarians/recruit/walk_e_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_00.png 2017-01-21 14:37:18 +0000 differ |
1316 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_00_pc.png' |
1317 | Binary files data/tribes/workers/barbarians/recruit/walk_e_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1318 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_01.png' |
1319 | Binary files data/tribes/workers/barbarians/recruit/walk_e_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_01.png 2017-01-21 14:37:18 +0000 differ |
1320 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_01_pc.png' |
1321 | Binary files data/tribes/workers/barbarians/recruit/walk_e_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1322 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_02.png' |
1323 | Binary files data/tribes/workers/barbarians/recruit/walk_e_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_02.png 2017-01-21 14:37:18 +0000 differ |
1324 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_02_pc.png' |
1325 | Binary files data/tribes/workers/barbarians/recruit/walk_e_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1326 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_03.png' |
1327 | Binary files data/tribes/workers/barbarians/recruit/walk_e_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_03.png 2017-01-21 14:37:18 +0000 differ |
1328 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_03_pc.png' |
1329 | Binary files data/tribes/workers/barbarians/recruit/walk_e_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1330 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_04.png' |
1331 | Binary files data/tribes/workers/barbarians/recruit/walk_e_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_04.png 2017-01-21 14:37:18 +0000 differ |
1332 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_04_pc.png' |
1333 | Binary files data/tribes/workers/barbarians/recruit/walk_e_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1334 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_05.png' |
1335 | Binary files data/tribes/workers/barbarians/recruit/walk_e_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_05.png 2017-01-21 14:37:18 +0000 differ |
1336 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_05_pc.png' |
1337 | Binary files data/tribes/workers/barbarians/recruit/walk_e_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1338 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_06.png' |
1339 | Binary files data/tribes/workers/barbarians/recruit/walk_e_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_06.png 2017-01-21 14:37:18 +0000 differ |
1340 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_06_pc.png' |
1341 | Binary files data/tribes/workers/barbarians/recruit/walk_e_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1342 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_07.png' |
1343 | Binary files data/tribes/workers/barbarians/recruit/walk_e_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_07.png 2017-01-21 14:37:18 +0000 differ |
1344 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_07_pc.png' |
1345 | Binary files data/tribes/workers/barbarians/recruit/walk_e_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1346 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_08.png' |
1347 | Binary files data/tribes/workers/barbarians/recruit/walk_e_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_08.png 2017-01-21 14:37:18 +0000 differ |
1348 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_08_pc.png' |
1349 | Binary files data/tribes/workers/barbarians/recruit/walk_e_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1350 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_09.png' |
1351 | Binary files data/tribes/workers/barbarians/recruit/walk_e_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_09.png 2017-01-21 14:37:18 +0000 differ |
1352 | === added file 'data/tribes/workers/barbarians/recruit/walk_e_09_pc.png' |
1353 | Binary files data/tribes/workers/barbarians/recruit/walk_e_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_e_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1354 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_00.png' |
1355 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_00.png 2017-01-21 14:37:18 +0000 differ |
1356 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_00_pc.png' |
1357 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1358 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_01.png' |
1359 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_01.png 2017-01-21 14:37:18 +0000 differ |
1360 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_01_pc.png' |
1361 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1362 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_02.png' |
1363 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_02.png 2017-01-21 14:37:18 +0000 differ |
1364 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_02_pc.png' |
1365 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1366 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_03.png' |
1367 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_03.png 2017-01-21 14:37:18 +0000 differ |
1368 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_03_pc.png' |
1369 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1370 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_04.png' |
1371 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_04.png 2017-01-21 14:37:18 +0000 differ |
1372 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_04_pc.png' |
1373 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1374 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_05.png' |
1375 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_05.png 2017-01-21 14:37:18 +0000 differ |
1376 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_05_pc.png' |
1377 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1378 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_06.png' |
1379 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_06.png 2017-01-21 14:37:18 +0000 differ |
1380 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_06_pc.png' |
1381 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1382 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_07.png' |
1383 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_07.png 2017-01-21 14:37:18 +0000 differ |
1384 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_07_pc.png' |
1385 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1386 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_08.png' |
1387 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_08.png 2017-01-21 14:37:18 +0000 differ |
1388 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_08_pc.png' |
1389 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1390 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_09.png' |
1391 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_09.png 2017-01-21 14:37:18 +0000 differ |
1392 | === added file 'data/tribes/workers/barbarians/recruit/walk_ne_09_pc.png' |
1393 | Binary files data/tribes/workers/barbarians/recruit/walk_ne_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_ne_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1394 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_00.png' |
1395 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_00.png 2017-01-21 14:37:18 +0000 differ |
1396 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_00_pc.png' |
1397 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1398 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_01.png' |
1399 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_01.png 2017-01-21 14:37:18 +0000 differ |
1400 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_01_pc.png' |
1401 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1402 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_02.png' |
1403 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_02.png 2017-01-21 14:37:18 +0000 differ |
1404 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_02_pc.png' |
1405 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1406 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_03.png' |
1407 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_03.png 2017-01-21 14:37:18 +0000 differ |
1408 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_03_pc.png' |
1409 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1410 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_04.png' |
1411 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_04.png 2017-01-21 14:37:18 +0000 differ |
1412 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_04_pc.png' |
1413 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1414 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_05.png' |
1415 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_05.png 2017-01-21 14:37:18 +0000 differ |
1416 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_05_pc.png' |
1417 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1418 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_06.png' |
1419 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_06.png 2017-01-21 14:37:18 +0000 differ |
1420 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_06_pc.png' |
1421 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1422 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_07.png' |
1423 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_07.png 2017-01-21 14:37:18 +0000 differ |
1424 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_07_pc.png' |
1425 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1426 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_08.png' |
1427 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_08.png 2017-01-21 14:37:18 +0000 differ |
1428 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_08_pc.png' |
1429 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1430 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_09.png' |
1431 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_09.png 2017-01-21 14:37:18 +0000 differ |
1432 | === added file 'data/tribes/workers/barbarians/recruit/walk_nw_09_pc.png' |
1433 | Binary files data/tribes/workers/barbarians/recruit/walk_nw_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_nw_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1434 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_00.png' |
1435 | Binary files data/tribes/workers/barbarians/recruit/walk_se_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_00.png 2017-01-21 14:37:18 +0000 differ |
1436 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_00_pc.png' |
1437 | Binary files data/tribes/workers/barbarians/recruit/walk_se_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1438 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_01.png' |
1439 | Binary files data/tribes/workers/barbarians/recruit/walk_se_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_01.png 2017-01-21 14:37:18 +0000 differ |
1440 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_01_pc.png' |
1441 | Binary files data/tribes/workers/barbarians/recruit/walk_se_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1442 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_02.png' |
1443 | Binary files data/tribes/workers/barbarians/recruit/walk_se_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_02.png 2017-01-21 14:37:18 +0000 differ |
1444 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_02_pc.png' |
1445 | Binary files data/tribes/workers/barbarians/recruit/walk_se_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1446 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_03.png' |
1447 | Binary files data/tribes/workers/barbarians/recruit/walk_se_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_03.png 2017-01-21 14:37:18 +0000 differ |
1448 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_03_pc.png' |
1449 | Binary files data/tribes/workers/barbarians/recruit/walk_se_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1450 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_04.png' |
1451 | Binary files data/tribes/workers/barbarians/recruit/walk_se_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_04.png 2017-01-21 14:37:18 +0000 differ |
1452 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_04_pc.png' |
1453 | Binary files data/tribes/workers/barbarians/recruit/walk_se_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1454 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_05.png' |
1455 | Binary files data/tribes/workers/barbarians/recruit/walk_se_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_05.png 2017-01-21 14:37:18 +0000 differ |
1456 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_05_pc.png' |
1457 | Binary files data/tribes/workers/barbarians/recruit/walk_se_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1458 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_06.png' |
1459 | Binary files data/tribes/workers/barbarians/recruit/walk_se_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_06.png 2017-01-21 14:37:18 +0000 differ |
1460 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_06_pc.png' |
1461 | Binary files data/tribes/workers/barbarians/recruit/walk_se_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1462 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_07.png' |
1463 | Binary files data/tribes/workers/barbarians/recruit/walk_se_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_07.png 2017-01-21 14:37:18 +0000 differ |
1464 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_07_pc.png' |
1465 | Binary files data/tribes/workers/barbarians/recruit/walk_se_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1466 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_08.png' |
1467 | Binary files data/tribes/workers/barbarians/recruit/walk_se_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_08.png 2017-01-21 14:37:18 +0000 differ |
1468 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_08_pc.png' |
1469 | Binary files data/tribes/workers/barbarians/recruit/walk_se_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1470 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_09.png' |
1471 | Binary files data/tribes/workers/barbarians/recruit/walk_se_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_09.png 2017-01-21 14:37:18 +0000 differ |
1472 | === added file 'data/tribes/workers/barbarians/recruit/walk_se_09_pc.png' |
1473 | Binary files data/tribes/workers/barbarians/recruit/walk_se_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_se_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1474 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_00.png' |
1475 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_00.png 2017-01-21 14:37:18 +0000 differ |
1476 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_00_pc.png' |
1477 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1478 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_01.png' |
1479 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_01.png 2017-01-21 14:37:18 +0000 differ |
1480 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_01_pc.png' |
1481 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1482 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_02.png' |
1483 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_02.png 2017-01-21 14:37:18 +0000 differ |
1484 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_02_pc.png' |
1485 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1486 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_03.png' |
1487 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_03.png 2017-01-21 14:37:18 +0000 differ |
1488 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_03_pc.png' |
1489 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1490 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_04.png' |
1491 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_04.png 2017-01-21 14:37:18 +0000 differ |
1492 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_04_pc.png' |
1493 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1494 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_05.png' |
1495 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_05.png 2017-01-21 14:37:18 +0000 differ |
1496 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_05_pc.png' |
1497 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1498 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_06.png' |
1499 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_06.png 2017-01-21 14:37:18 +0000 differ |
1500 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_06_pc.png' |
1501 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1502 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_07.png' |
1503 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_07.png 2017-01-21 14:37:18 +0000 differ |
1504 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_07_pc.png' |
1505 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1506 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_08.png' |
1507 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_08.png 2017-01-21 14:37:18 +0000 differ |
1508 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_08_pc.png' |
1509 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1510 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_09.png' |
1511 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_09.png 2017-01-21 14:37:18 +0000 differ |
1512 | === added file 'data/tribes/workers/barbarians/recruit/walk_sw_09_pc.png' |
1513 | Binary files data/tribes/workers/barbarians/recruit/walk_sw_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_sw_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1514 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_00.png' |
1515 | Binary files data/tribes/workers/barbarians/recruit/walk_w_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_00.png 2017-01-21 14:37:18 +0000 differ |
1516 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_00_pc.png' |
1517 | Binary files data/tribes/workers/barbarians/recruit/walk_w_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1518 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_01.png' |
1519 | Binary files data/tribes/workers/barbarians/recruit/walk_w_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_01.png 2017-01-21 14:37:18 +0000 differ |
1520 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_01_pc.png' |
1521 | Binary files data/tribes/workers/barbarians/recruit/walk_w_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1522 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_02.png' |
1523 | Binary files data/tribes/workers/barbarians/recruit/walk_w_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_02.png 2017-01-21 14:37:18 +0000 differ |
1524 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_02_pc.png' |
1525 | Binary files data/tribes/workers/barbarians/recruit/walk_w_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1526 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_03.png' |
1527 | Binary files data/tribes/workers/barbarians/recruit/walk_w_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_03.png 2017-01-21 14:37:18 +0000 differ |
1528 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_03_pc.png' |
1529 | Binary files data/tribes/workers/barbarians/recruit/walk_w_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1530 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_04.png' |
1531 | Binary files data/tribes/workers/barbarians/recruit/walk_w_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_04.png 2017-01-21 14:37:18 +0000 differ |
1532 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_04_pc.png' |
1533 | Binary files data/tribes/workers/barbarians/recruit/walk_w_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1534 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_05.png' |
1535 | Binary files data/tribes/workers/barbarians/recruit/walk_w_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_05.png 2017-01-21 14:37:18 +0000 differ |
1536 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_05_pc.png' |
1537 | Binary files data/tribes/workers/barbarians/recruit/walk_w_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1538 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_06.png' |
1539 | Binary files data/tribes/workers/barbarians/recruit/walk_w_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_06.png 2017-01-21 14:37:18 +0000 differ |
1540 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_06_pc.png' |
1541 | Binary files data/tribes/workers/barbarians/recruit/walk_w_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1542 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_07.png' |
1543 | Binary files data/tribes/workers/barbarians/recruit/walk_w_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_07.png 2017-01-21 14:37:18 +0000 differ |
1544 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_07_pc.png' |
1545 | Binary files data/tribes/workers/barbarians/recruit/walk_w_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1546 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_08.png' |
1547 | Binary files data/tribes/workers/barbarians/recruit/walk_w_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_08.png 2017-01-21 14:37:18 +0000 differ |
1548 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_08_pc.png' |
1549 | Binary files data/tribes/workers/barbarians/recruit/walk_w_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1550 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_09.png' |
1551 | Binary files data/tribes/workers/barbarians/recruit/walk_w_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_09.png 2017-01-21 14:37:18 +0000 differ |
1552 | === added file 'data/tribes/workers/barbarians/recruit/walk_w_09_pc.png' |
1553 | Binary files data/tribes/workers/barbarians/recruit/walk_w_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/barbarians/recruit/walk_w_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1554 | === modified file 'data/tribes/workers/barbarians/soldier/init.lua' |
1555 | --- data/tribes/workers/barbarians/soldier/init.lua 2016-09-27 06:30:47 +0000 |
1556 | +++ data/tribes/workers/barbarians/soldier/init.lua 2017-01-21 14:37:18 +0000 |
1557 | @@ -69,13 +69,10 @@ |
1558 | icon = dirname .. "menu.png", |
1559 | vision_range = 2, |
1560 | |
1561 | - buildcost = { |
1562 | - barbarians_carrier = 1, |
1563 | - ax = 1 |
1564 | - }, |
1565 | - |
1566 | animations = animations, |
1567 | |
1568 | + default_target_quantity = 10, |
1569 | + |
1570 | -- Battle attributes - initial values and per level increase |
1571 | health = { |
1572 | max_level = 3, |
1573 | |
1574 | === added directory 'data/tribes/workers/empire/recruit' |
1575 | === added file 'data/tribes/workers/empire/recruit/helptexts.lua' |
1576 | --- data/tribes/workers/empire/recruit/helptexts.lua 1970-01-01 00:00:00 +0000 |
1577 | +++ data/tribes/workers/empire/recruit/helptexts.lua 2017-01-21 14:37:18 +0000 |
1578 | @@ -0,0 +1,4 @@ |
1579 | +function worker_helptext() |
1580 | + -- TRANSLATORS: Helptext for a worker: Recruit |
1581 | + return pgettext("empire_worker", "Eager to become a soldier and defend your tribe!") |
1582 | +end |
1583 | |
1584 | === added file 'data/tribes/workers/empire/recruit/idle_00.png' |
1585 | Binary files data/tribes/workers/empire/recruit/idle_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_00.png 2017-01-21 14:37:18 +0000 differ |
1586 | === added file 'data/tribes/workers/empire/recruit/idle_00_pc.png' |
1587 | Binary files data/tribes/workers/empire/recruit/idle_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1588 | === added file 'data/tribes/workers/empire/recruit/idle_01.png' |
1589 | Binary files data/tribes/workers/empire/recruit/idle_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_01.png 2017-01-21 14:37:18 +0000 differ |
1590 | === added file 'data/tribes/workers/empire/recruit/idle_01_pc.png' |
1591 | Binary files data/tribes/workers/empire/recruit/idle_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1592 | === added file 'data/tribes/workers/empire/recruit/idle_02.png' |
1593 | Binary files data/tribes/workers/empire/recruit/idle_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_02.png 2017-01-21 14:37:18 +0000 differ |
1594 | === added file 'data/tribes/workers/empire/recruit/idle_02_pc.png' |
1595 | Binary files data/tribes/workers/empire/recruit/idle_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1596 | === added file 'data/tribes/workers/empire/recruit/idle_03.png' |
1597 | Binary files data/tribes/workers/empire/recruit/idle_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_03.png 2017-01-21 14:37:18 +0000 differ |
1598 | === added file 'data/tribes/workers/empire/recruit/idle_03_pc.png' |
1599 | Binary files data/tribes/workers/empire/recruit/idle_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1600 | === added file 'data/tribes/workers/empire/recruit/idle_04.png' |
1601 | Binary files data/tribes/workers/empire/recruit/idle_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_04.png 2017-01-21 14:37:18 +0000 differ |
1602 | === added file 'data/tribes/workers/empire/recruit/idle_04_pc.png' |
1603 | Binary files data/tribes/workers/empire/recruit/idle_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1604 | === added file 'data/tribes/workers/empire/recruit/idle_05.png' |
1605 | Binary files data/tribes/workers/empire/recruit/idle_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_05.png 2017-01-21 14:37:18 +0000 differ |
1606 | === added file 'data/tribes/workers/empire/recruit/idle_05_pc.png' |
1607 | Binary files data/tribes/workers/empire/recruit/idle_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1608 | === added file 'data/tribes/workers/empire/recruit/idle_06.png' |
1609 | Binary files data/tribes/workers/empire/recruit/idle_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_06.png 2017-01-21 14:37:18 +0000 differ |
1610 | === added file 'data/tribes/workers/empire/recruit/idle_06_pc.png' |
1611 | Binary files data/tribes/workers/empire/recruit/idle_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1612 | === added file 'data/tribes/workers/empire/recruit/idle_07.png' |
1613 | Binary files data/tribes/workers/empire/recruit/idle_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_07.png 2017-01-21 14:37:18 +0000 differ |
1614 | === added file 'data/tribes/workers/empire/recruit/idle_07_pc.png' |
1615 | Binary files data/tribes/workers/empire/recruit/idle_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1616 | === added file 'data/tribes/workers/empire/recruit/idle_08.png' |
1617 | Binary files data/tribes/workers/empire/recruit/idle_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_08.png 2017-01-21 14:37:18 +0000 differ |
1618 | === added file 'data/tribes/workers/empire/recruit/idle_08_pc.png' |
1619 | Binary files data/tribes/workers/empire/recruit/idle_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1620 | === added file 'data/tribes/workers/empire/recruit/idle_09.png' |
1621 | Binary files data/tribes/workers/empire/recruit/idle_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_09.png 2017-01-21 14:37:18 +0000 differ |
1622 | === added file 'data/tribes/workers/empire/recruit/idle_09_pc.png' |
1623 | Binary files data/tribes/workers/empire/recruit/idle_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1624 | === added file 'data/tribes/workers/empire/recruit/idle_10.png' |
1625 | Binary files data/tribes/workers/empire/recruit/idle_10.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_10.png 2017-01-21 14:37:18 +0000 differ |
1626 | === added file 'data/tribes/workers/empire/recruit/idle_10_pc.png' |
1627 | Binary files data/tribes/workers/empire/recruit/idle_10_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_10_pc.png 2017-01-21 14:37:18 +0000 differ |
1628 | === added file 'data/tribes/workers/empire/recruit/idle_11.png' |
1629 | Binary files data/tribes/workers/empire/recruit/idle_11.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_11.png 2017-01-21 14:37:18 +0000 differ |
1630 | === added file 'data/tribes/workers/empire/recruit/idle_11_pc.png' |
1631 | Binary files data/tribes/workers/empire/recruit/idle_11_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_11_pc.png 2017-01-21 14:37:18 +0000 differ |
1632 | === added file 'data/tribes/workers/empire/recruit/idle_12.png' |
1633 | Binary files data/tribes/workers/empire/recruit/idle_12.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_12.png 2017-01-21 14:37:18 +0000 differ |
1634 | === added file 'data/tribes/workers/empire/recruit/idle_12_pc.png' |
1635 | Binary files data/tribes/workers/empire/recruit/idle_12_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_12_pc.png 2017-01-21 14:37:18 +0000 differ |
1636 | === added file 'data/tribes/workers/empire/recruit/idle_13.png' |
1637 | Binary files data/tribes/workers/empire/recruit/idle_13.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_13.png 2017-01-21 14:37:18 +0000 differ |
1638 | === added file 'data/tribes/workers/empire/recruit/idle_13_pc.png' |
1639 | Binary files data/tribes/workers/empire/recruit/idle_13_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_13_pc.png 2017-01-21 14:37:18 +0000 differ |
1640 | === added file 'data/tribes/workers/empire/recruit/idle_14.png' |
1641 | Binary files data/tribes/workers/empire/recruit/idle_14.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_14.png 2017-01-21 14:37:18 +0000 differ |
1642 | === added file 'data/tribes/workers/empire/recruit/idle_14_pc.png' |
1643 | Binary files data/tribes/workers/empire/recruit/idle_14_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_14_pc.png 2017-01-21 14:37:18 +0000 differ |
1644 | === added file 'data/tribes/workers/empire/recruit/idle_15.png' |
1645 | Binary files data/tribes/workers/empire/recruit/idle_15.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_15.png 2017-01-21 14:37:18 +0000 differ |
1646 | === added file 'data/tribes/workers/empire/recruit/idle_15_pc.png' |
1647 | Binary files data/tribes/workers/empire/recruit/idle_15_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_15_pc.png 2017-01-21 14:37:18 +0000 differ |
1648 | === added file 'data/tribes/workers/empire/recruit/idle_16.png' |
1649 | Binary files data/tribes/workers/empire/recruit/idle_16.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_16.png 2017-01-21 14:37:18 +0000 differ |
1650 | === added file 'data/tribes/workers/empire/recruit/idle_16_pc.png' |
1651 | Binary files data/tribes/workers/empire/recruit/idle_16_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_16_pc.png 2017-01-21 14:37:18 +0000 differ |
1652 | === added file 'data/tribes/workers/empire/recruit/idle_17.png' |
1653 | Binary files data/tribes/workers/empire/recruit/idle_17.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_17.png 2017-01-21 14:37:18 +0000 differ |
1654 | === added file 'data/tribes/workers/empire/recruit/idle_17_pc.png' |
1655 | Binary files data/tribes/workers/empire/recruit/idle_17_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_17_pc.png 2017-01-21 14:37:18 +0000 differ |
1656 | === added file 'data/tribes/workers/empire/recruit/idle_18.png' |
1657 | Binary files data/tribes/workers/empire/recruit/idle_18.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_18.png 2017-01-21 14:37:18 +0000 differ |
1658 | === added file 'data/tribes/workers/empire/recruit/idle_18_pc.png' |
1659 | Binary files data/tribes/workers/empire/recruit/idle_18_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_18_pc.png 2017-01-21 14:37:18 +0000 differ |
1660 | === added file 'data/tribes/workers/empire/recruit/idle_19.png' |
1661 | Binary files data/tribes/workers/empire/recruit/idle_19.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_19.png 2017-01-21 14:37:18 +0000 differ |
1662 | === added file 'data/tribes/workers/empire/recruit/idle_19_pc.png' |
1663 | Binary files data/tribes/workers/empire/recruit/idle_19_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_19_pc.png 2017-01-21 14:37:18 +0000 differ |
1664 | === added file 'data/tribes/workers/empire/recruit/idle_20.png' |
1665 | Binary files data/tribes/workers/empire/recruit/idle_20.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_20.png 2017-01-21 14:37:18 +0000 differ |
1666 | === added file 'data/tribes/workers/empire/recruit/idle_20_pc.png' |
1667 | Binary files data/tribes/workers/empire/recruit/idle_20_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_20_pc.png 2017-01-21 14:37:18 +0000 differ |
1668 | === added file 'data/tribes/workers/empire/recruit/idle_21.png' |
1669 | Binary files data/tribes/workers/empire/recruit/idle_21.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_21.png 2017-01-21 14:37:18 +0000 differ |
1670 | === added file 'data/tribes/workers/empire/recruit/idle_21_pc.png' |
1671 | Binary files data/tribes/workers/empire/recruit/idle_21_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_21_pc.png 2017-01-21 14:37:18 +0000 differ |
1672 | === added file 'data/tribes/workers/empire/recruit/idle_22.png' |
1673 | Binary files data/tribes/workers/empire/recruit/idle_22.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_22.png 2017-01-21 14:37:18 +0000 differ |
1674 | === added file 'data/tribes/workers/empire/recruit/idle_22_pc.png' |
1675 | Binary files data/tribes/workers/empire/recruit/idle_22_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_22_pc.png 2017-01-21 14:37:18 +0000 differ |
1676 | === added file 'data/tribes/workers/empire/recruit/idle_23.png' |
1677 | Binary files data/tribes/workers/empire/recruit/idle_23.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_23.png 2017-01-21 14:37:18 +0000 differ |
1678 | === added file 'data/tribes/workers/empire/recruit/idle_23_pc.png' |
1679 | Binary files data/tribes/workers/empire/recruit/idle_23_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_23_pc.png 2017-01-21 14:37:18 +0000 differ |
1680 | === added file 'data/tribes/workers/empire/recruit/idle_24.png' |
1681 | Binary files data/tribes/workers/empire/recruit/idle_24.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_24.png 2017-01-21 14:37:18 +0000 differ |
1682 | === added file 'data/tribes/workers/empire/recruit/idle_24_pc.png' |
1683 | Binary files data/tribes/workers/empire/recruit/idle_24_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_24_pc.png 2017-01-21 14:37:18 +0000 differ |
1684 | === added file 'data/tribes/workers/empire/recruit/idle_25.png' |
1685 | Binary files data/tribes/workers/empire/recruit/idle_25.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_25.png 2017-01-21 14:37:18 +0000 differ |
1686 | === added file 'data/tribes/workers/empire/recruit/idle_25_pc.png' |
1687 | Binary files data/tribes/workers/empire/recruit/idle_25_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_25_pc.png 2017-01-21 14:37:18 +0000 differ |
1688 | === added file 'data/tribes/workers/empire/recruit/idle_26.png' |
1689 | Binary files data/tribes/workers/empire/recruit/idle_26.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_26.png 2017-01-21 14:37:18 +0000 differ |
1690 | === added file 'data/tribes/workers/empire/recruit/idle_26_pc.png' |
1691 | Binary files data/tribes/workers/empire/recruit/idle_26_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_26_pc.png 2017-01-21 14:37:18 +0000 differ |
1692 | === added file 'data/tribes/workers/empire/recruit/idle_27.png' |
1693 | Binary files data/tribes/workers/empire/recruit/idle_27.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_27.png 2017-01-21 14:37:18 +0000 differ |
1694 | === added file 'data/tribes/workers/empire/recruit/idle_27_pc.png' |
1695 | Binary files data/tribes/workers/empire/recruit/idle_27_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_27_pc.png 2017-01-21 14:37:18 +0000 differ |
1696 | === added file 'data/tribes/workers/empire/recruit/idle_28.png' |
1697 | Binary files data/tribes/workers/empire/recruit/idle_28.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_28.png 2017-01-21 14:37:18 +0000 differ |
1698 | === added file 'data/tribes/workers/empire/recruit/idle_28_pc.png' |
1699 | Binary files data/tribes/workers/empire/recruit/idle_28_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_28_pc.png 2017-01-21 14:37:18 +0000 differ |
1700 | === added file 'data/tribes/workers/empire/recruit/idle_29.png' |
1701 | Binary files data/tribes/workers/empire/recruit/idle_29.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_29.png 2017-01-21 14:37:18 +0000 differ |
1702 | === added file 'data/tribes/workers/empire/recruit/idle_29_pc.png' |
1703 | Binary files data/tribes/workers/empire/recruit/idle_29_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_29_pc.png 2017-01-21 14:37:18 +0000 differ |
1704 | === added file 'data/tribes/workers/empire/recruit/idle_30.png' |
1705 | Binary files data/tribes/workers/empire/recruit/idle_30.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_30.png 2017-01-21 14:37:18 +0000 differ |
1706 | === added file 'data/tribes/workers/empire/recruit/idle_30_pc.png' |
1707 | Binary files data/tribes/workers/empire/recruit/idle_30_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_30_pc.png 2017-01-21 14:37:18 +0000 differ |
1708 | === added file 'data/tribes/workers/empire/recruit/idle_31.png' |
1709 | Binary files data/tribes/workers/empire/recruit/idle_31.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_31.png 2017-01-21 14:37:18 +0000 differ |
1710 | === added file 'data/tribes/workers/empire/recruit/idle_31_pc.png' |
1711 | Binary files data/tribes/workers/empire/recruit/idle_31_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_31_pc.png 2017-01-21 14:37:18 +0000 differ |
1712 | === added file 'data/tribes/workers/empire/recruit/idle_32.png' |
1713 | Binary files data/tribes/workers/empire/recruit/idle_32.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_32.png 2017-01-21 14:37:18 +0000 differ |
1714 | === added file 'data/tribes/workers/empire/recruit/idle_32_pc.png' |
1715 | Binary files data/tribes/workers/empire/recruit/idle_32_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_32_pc.png 2017-01-21 14:37:18 +0000 differ |
1716 | === added file 'data/tribes/workers/empire/recruit/idle_33.png' |
1717 | Binary files data/tribes/workers/empire/recruit/idle_33.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_33.png 2017-01-21 14:37:18 +0000 differ |
1718 | === added file 'data/tribes/workers/empire/recruit/idle_33_pc.png' |
1719 | Binary files data/tribes/workers/empire/recruit/idle_33_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_33_pc.png 2017-01-21 14:37:18 +0000 differ |
1720 | === added file 'data/tribes/workers/empire/recruit/idle_34.png' |
1721 | Binary files data/tribes/workers/empire/recruit/idle_34.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_34.png 2017-01-21 14:37:18 +0000 differ |
1722 | === added file 'data/tribes/workers/empire/recruit/idle_34_pc.png' |
1723 | Binary files data/tribes/workers/empire/recruit/idle_34_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_34_pc.png 2017-01-21 14:37:18 +0000 differ |
1724 | === added file 'data/tribes/workers/empire/recruit/idle_35.png' |
1725 | Binary files data/tribes/workers/empire/recruit/idle_35.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_35.png 2017-01-21 14:37:18 +0000 differ |
1726 | === added file 'data/tribes/workers/empire/recruit/idle_35_pc.png' |
1727 | Binary files data/tribes/workers/empire/recruit/idle_35_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_35_pc.png 2017-01-21 14:37:18 +0000 differ |
1728 | === added file 'data/tribes/workers/empire/recruit/idle_36.png' |
1729 | Binary files data/tribes/workers/empire/recruit/idle_36.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_36.png 2017-01-21 14:37:18 +0000 differ |
1730 | === added file 'data/tribes/workers/empire/recruit/idle_36_pc.png' |
1731 | Binary files data/tribes/workers/empire/recruit/idle_36_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_36_pc.png 2017-01-21 14:37:18 +0000 differ |
1732 | === added file 'data/tribes/workers/empire/recruit/idle_37.png' |
1733 | Binary files data/tribes/workers/empire/recruit/idle_37.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_37.png 2017-01-21 14:37:18 +0000 differ |
1734 | === added file 'data/tribes/workers/empire/recruit/idle_37_pc.png' |
1735 | Binary files data/tribes/workers/empire/recruit/idle_37_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_37_pc.png 2017-01-21 14:37:18 +0000 differ |
1736 | === added file 'data/tribes/workers/empire/recruit/idle_38.png' |
1737 | Binary files data/tribes/workers/empire/recruit/idle_38.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_38.png 2017-01-21 14:37:18 +0000 differ |
1738 | === added file 'data/tribes/workers/empire/recruit/idle_38_pc.png' |
1739 | Binary files data/tribes/workers/empire/recruit/idle_38_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_38_pc.png 2017-01-21 14:37:18 +0000 differ |
1740 | === added file 'data/tribes/workers/empire/recruit/idle_39.png' |
1741 | Binary files data/tribes/workers/empire/recruit/idle_39.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_39.png 2017-01-21 14:37:18 +0000 differ |
1742 | === added file 'data/tribes/workers/empire/recruit/idle_39_pc.png' |
1743 | Binary files data/tribes/workers/empire/recruit/idle_39_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/idle_39_pc.png 2017-01-21 14:37:18 +0000 differ |
1744 | === added file 'data/tribes/workers/empire/recruit/init.lua' |
1745 | --- data/tribes/workers/empire/recruit/init.lua 1970-01-01 00:00:00 +0000 |
1746 | +++ data/tribes/workers/empire/recruit/init.lua 2017-01-21 14:37:18 +0000 |
1747 | @@ -0,0 +1,25 @@ |
1748 | +dirname = path.dirname(__file__) |
1749 | + |
1750 | +animations = { |
1751 | + idle = { |
1752 | + pictures = path.list_files(dirname .. "idle_??.png"), |
1753 | + hotspot = { 10, 36 }, |
1754 | + fps = 5 |
1755 | + }, |
1756 | +} |
1757 | +add_worker_animations(animations, "walk", dirname, "walk", {10, 36}, 10) |
1758 | + |
1759 | + |
1760 | +tribes:new_worker_type { |
1761 | + msgctxt = "empire_worker", |
1762 | + name = "empire_recruit", |
1763 | + -- TRANSLATORS: This is a worker name used in lists of workers |
1764 | + descname = pgettext("empire_worker", "Recruit"), |
1765 | + helptext_script = dirname .. "helptexts.lua", |
1766 | + icon = dirname .. "menu.png", |
1767 | + vision_range = 2, |
1768 | + |
1769 | + buildcost = {}, -- This will give the worker the property "buildable" |
1770 | + |
1771 | + animations = animations, |
1772 | +} |
1773 | |
1774 | === added file 'data/tribes/workers/empire/recruit/menu.png' |
1775 | Binary files data/tribes/workers/empire/recruit/menu.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/menu.png 2017-01-21 14:37:18 +0000 differ |
1776 | === added file 'data/tribes/workers/empire/recruit/walk_e_00.png' |
1777 | Binary files data/tribes/workers/empire/recruit/walk_e_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_00.png 2017-01-21 14:37:18 +0000 differ |
1778 | === added file 'data/tribes/workers/empire/recruit/walk_e_00_pc.png' |
1779 | Binary files data/tribes/workers/empire/recruit/walk_e_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1780 | === added file 'data/tribes/workers/empire/recruit/walk_e_01.png' |
1781 | Binary files data/tribes/workers/empire/recruit/walk_e_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_01.png 2017-01-21 14:37:18 +0000 differ |
1782 | === added file 'data/tribes/workers/empire/recruit/walk_e_01_pc.png' |
1783 | Binary files data/tribes/workers/empire/recruit/walk_e_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1784 | === added file 'data/tribes/workers/empire/recruit/walk_e_02.png' |
1785 | Binary files data/tribes/workers/empire/recruit/walk_e_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_02.png 2017-01-21 14:37:18 +0000 differ |
1786 | === added file 'data/tribes/workers/empire/recruit/walk_e_02_pc.png' |
1787 | Binary files data/tribes/workers/empire/recruit/walk_e_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1788 | === added file 'data/tribes/workers/empire/recruit/walk_e_03.png' |
1789 | Binary files data/tribes/workers/empire/recruit/walk_e_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_03.png 2017-01-21 14:37:18 +0000 differ |
1790 | === added file 'data/tribes/workers/empire/recruit/walk_e_03_pc.png' |
1791 | Binary files data/tribes/workers/empire/recruit/walk_e_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1792 | === added file 'data/tribes/workers/empire/recruit/walk_e_04.png' |
1793 | Binary files data/tribes/workers/empire/recruit/walk_e_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_04.png 2017-01-21 14:37:18 +0000 differ |
1794 | === added file 'data/tribes/workers/empire/recruit/walk_e_04_pc.png' |
1795 | Binary files data/tribes/workers/empire/recruit/walk_e_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1796 | === added file 'data/tribes/workers/empire/recruit/walk_e_05.png' |
1797 | Binary files data/tribes/workers/empire/recruit/walk_e_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_05.png 2017-01-21 14:37:18 +0000 differ |
1798 | === added file 'data/tribes/workers/empire/recruit/walk_e_05_pc.png' |
1799 | Binary files data/tribes/workers/empire/recruit/walk_e_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1800 | === added file 'data/tribes/workers/empire/recruit/walk_e_06.png' |
1801 | Binary files data/tribes/workers/empire/recruit/walk_e_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_06.png 2017-01-21 14:37:18 +0000 differ |
1802 | === added file 'data/tribes/workers/empire/recruit/walk_e_06_pc.png' |
1803 | Binary files data/tribes/workers/empire/recruit/walk_e_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1804 | === added file 'data/tribes/workers/empire/recruit/walk_e_07.png' |
1805 | Binary files data/tribes/workers/empire/recruit/walk_e_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_07.png 2017-01-21 14:37:18 +0000 differ |
1806 | === added file 'data/tribes/workers/empire/recruit/walk_e_07_pc.png' |
1807 | Binary files data/tribes/workers/empire/recruit/walk_e_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1808 | === added file 'data/tribes/workers/empire/recruit/walk_e_08.png' |
1809 | Binary files data/tribes/workers/empire/recruit/walk_e_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_08.png 2017-01-21 14:37:18 +0000 differ |
1810 | === added file 'data/tribes/workers/empire/recruit/walk_e_08_pc.png' |
1811 | Binary files data/tribes/workers/empire/recruit/walk_e_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1812 | === added file 'data/tribes/workers/empire/recruit/walk_e_09.png' |
1813 | Binary files data/tribes/workers/empire/recruit/walk_e_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_09.png 2017-01-21 14:37:18 +0000 differ |
1814 | === added file 'data/tribes/workers/empire/recruit/walk_e_09_pc.png' |
1815 | Binary files data/tribes/workers/empire/recruit/walk_e_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_e_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1816 | === added file 'data/tribes/workers/empire/recruit/walk_ne_00.png' |
1817 | Binary files data/tribes/workers/empire/recruit/walk_ne_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_00.png 2017-01-21 14:37:18 +0000 differ |
1818 | === added file 'data/tribes/workers/empire/recruit/walk_ne_00_pc.png' |
1819 | Binary files data/tribes/workers/empire/recruit/walk_ne_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1820 | === added file 'data/tribes/workers/empire/recruit/walk_ne_01.png' |
1821 | Binary files data/tribes/workers/empire/recruit/walk_ne_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_01.png 2017-01-21 14:37:18 +0000 differ |
1822 | === added file 'data/tribes/workers/empire/recruit/walk_ne_01_pc.png' |
1823 | Binary files data/tribes/workers/empire/recruit/walk_ne_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1824 | === added file 'data/tribes/workers/empire/recruit/walk_ne_02.png' |
1825 | Binary files data/tribes/workers/empire/recruit/walk_ne_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_02.png 2017-01-21 14:37:18 +0000 differ |
1826 | === added file 'data/tribes/workers/empire/recruit/walk_ne_02_pc.png' |
1827 | Binary files data/tribes/workers/empire/recruit/walk_ne_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1828 | === added file 'data/tribes/workers/empire/recruit/walk_ne_03.png' |
1829 | Binary files data/tribes/workers/empire/recruit/walk_ne_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_03.png 2017-01-21 14:37:18 +0000 differ |
1830 | === added file 'data/tribes/workers/empire/recruit/walk_ne_03_pc.png' |
1831 | Binary files data/tribes/workers/empire/recruit/walk_ne_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1832 | === added file 'data/tribes/workers/empire/recruit/walk_ne_04.png' |
1833 | Binary files data/tribes/workers/empire/recruit/walk_ne_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_04.png 2017-01-21 14:37:18 +0000 differ |
1834 | === added file 'data/tribes/workers/empire/recruit/walk_ne_04_pc.png' |
1835 | Binary files data/tribes/workers/empire/recruit/walk_ne_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1836 | === added file 'data/tribes/workers/empire/recruit/walk_ne_05.png' |
1837 | Binary files data/tribes/workers/empire/recruit/walk_ne_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_05.png 2017-01-21 14:37:18 +0000 differ |
1838 | === added file 'data/tribes/workers/empire/recruit/walk_ne_05_pc.png' |
1839 | Binary files data/tribes/workers/empire/recruit/walk_ne_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1840 | === added file 'data/tribes/workers/empire/recruit/walk_ne_06.png' |
1841 | Binary files data/tribes/workers/empire/recruit/walk_ne_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_06.png 2017-01-21 14:37:18 +0000 differ |
1842 | === added file 'data/tribes/workers/empire/recruit/walk_ne_06_pc.png' |
1843 | Binary files data/tribes/workers/empire/recruit/walk_ne_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1844 | === added file 'data/tribes/workers/empire/recruit/walk_ne_07.png' |
1845 | Binary files data/tribes/workers/empire/recruit/walk_ne_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_07.png 2017-01-21 14:37:18 +0000 differ |
1846 | === added file 'data/tribes/workers/empire/recruit/walk_ne_07_pc.png' |
1847 | Binary files data/tribes/workers/empire/recruit/walk_ne_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1848 | === added file 'data/tribes/workers/empire/recruit/walk_ne_08.png' |
1849 | Binary files data/tribes/workers/empire/recruit/walk_ne_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_08.png 2017-01-21 14:37:18 +0000 differ |
1850 | === added file 'data/tribes/workers/empire/recruit/walk_ne_08_pc.png' |
1851 | Binary files data/tribes/workers/empire/recruit/walk_ne_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1852 | === added file 'data/tribes/workers/empire/recruit/walk_ne_09.png' |
1853 | Binary files data/tribes/workers/empire/recruit/walk_ne_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_09.png 2017-01-21 14:37:18 +0000 differ |
1854 | === added file 'data/tribes/workers/empire/recruit/walk_ne_09_pc.png' |
1855 | Binary files data/tribes/workers/empire/recruit/walk_ne_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_ne_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1856 | === added file 'data/tribes/workers/empire/recruit/walk_nw_00.png' |
1857 | Binary files data/tribes/workers/empire/recruit/walk_nw_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_00.png 2017-01-21 14:37:18 +0000 differ |
1858 | === added file 'data/tribes/workers/empire/recruit/walk_nw_00_pc.png' |
1859 | Binary files data/tribes/workers/empire/recruit/walk_nw_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1860 | === added file 'data/tribes/workers/empire/recruit/walk_nw_01.png' |
1861 | Binary files data/tribes/workers/empire/recruit/walk_nw_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_01.png 2017-01-21 14:37:18 +0000 differ |
1862 | === added file 'data/tribes/workers/empire/recruit/walk_nw_01_pc.png' |
1863 | Binary files data/tribes/workers/empire/recruit/walk_nw_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1864 | === added file 'data/tribes/workers/empire/recruit/walk_nw_02.png' |
1865 | Binary files data/tribes/workers/empire/recruit/walk_nw_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_02.png 2017-01-21 14:37:18 +0000 differ |
1866 | === added file 'data/tribes/workers/empire/recruit/walk_nw_02_pc.png' |
1867 | Binary files data/tribes/workers/empire/recruit/walk_nw_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1868 | === added file 'data/tribes/workers/empire/recruit/walk_nw_03.png' |
1869 | Binary files data/tribes/workers/empire/recruit/walk_nw_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_03.png 2017-01-21 14:37:18 +0000 differ |
1870 | === added file 'data/tribes/workers/empire/recruit/walk_nw_03_pc.png' |
1871 | Binary files data/tribes/workers/empire/recruit/walk_nw_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1872 | === added file 'data/tribes/workers/empire/recruit/walk_nw_04.png' |
1873 | Binary files data/tribes/workers/empire/recruit/walk_nw_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_04.png 2017-01-21 14:37:18 +0000 differ |
1874 | === added file 'data/tribes/workers/empire/recruit/walk_nw_04_pc.png' |
1875 | Binary files data/tribes/workers/empire/recruit/walk_nw_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1876 | === added file 'data/tribes/workers/empire/recruit/walk_nw_05.png' |
1877 | Binary files data/tribes/workers/empire/recruit/walk_nw_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_05.png 2017-01-21 14:37:18 +0000 differ |
1878 | === added file 'data/tribes/workers/empire/recruit/walk_nw_05_pc.png' |
1879 | Binary files data/tribes/workers/empire/recruit/walk_nw_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1880 | === added file 'data/tribes/workers/empire/recruit/walk_nw_06.png' |
1881 | Binary files data/tribes/workers/empire/recruit/walk_nw_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_06.png 2017-01-21 14:37:18 +0000 differ |
1882 | === added file 'data/tribes/workers/empire/recruit/walk_nw_06_pc.png' |
1883 | Binary files data/tribes/workers/empire/recruit/walk_nw_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1884 | === added file 'data/tribes/workers/empire/recruit/walk_nw_07.png' |
1885 | Binary files data/tribes/workers/empire/recruit/walk_nw_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_07.png 2017-01-21 14:37:18 +0000 differ |
1886 | === added file 'data/tribes/workers/empire/recruit/walk_nw_07_pc.png' |
1887 | Binary files data/tribes/workers/empire/recruit/walk_nw_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1888 | === added file 'data/tribes/workers/empire/recruit/walk_nw_08.png' |
1889 | Binary files data/tribes/workers/empire/recruit/walk_nw_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_08.png 2017-01-21 14:37:18 +0000 differ |
1890 | === added file 'data/tribes/workers/empire/recruit/walk_nw_08_pc.png' |
1891 | Binary files data/tribes/workers/empire/recruit/walk_nw_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1892 | === added file 'data/tribes/workers/empire/recruit/walk_nw_09.png' |
1893 | Binary files data/tribes/workers/empire/recruit/walk_nw_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_09.png 2017-01-21 14:37:18 +0000 differ |
1894 | === added file 'data/tribes/workers/empire/recruit/walk_nw_09_pc.png' |
1895 | Binary files data/tribes/workers/empire/recruit/walk_nw_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_nw_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1896 | === added file 'data/tribes/workers/empire/recruit/walk_se_00.png' |
1897 | Binary files data/tribes/workers/empire/recruit/walk_se_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_00.png 2017-01-21 14:37:18 +0000 differ |
1898 | === added file 'data/tribes/workers/empire/recruit/walk_se_00_pc.png' |
1899 | Binary files data/tribes/workers/empire/recruit/walk_se_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1900 | === added file 'data/tribes/workers/empire/recruit/walk_se_01.png' |
1901 | Binary files data/tribes/workers/empire/recruit/walk_se_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_01.png 2017-01-21 14:37:18 +0000 differ |
1902 | === added file 'data/tribes/workers/empire/recruit/walk_se_01_pc.png' |
1903 | Binary files data/tribes/workers/empire/recruit/walk_se_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1904 | === added file 'data/tribes/workers/empire/recruit/walk_se_02.png' |
1905 | Binary files data/tribes/workers/empire/recruit/walk_se_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_02.png 2017-01-21 14:37:18 +0000 differ |
1906 | === added file 'data/tribes/workers/empire/recruit/walk_se_02_pc.png' |
1907 | Binary files data/tribes/workers/empire/recruit/walk_se_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1908 | === added file 'data/tribes/workers/empire/recruit/walk_se_03.png' |
1909 | Binary files data/tribes/workers/empire/recruit/walk_se_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_03.png 2017-01-21 14:37:18 +0000 differ |
1910 | === added file 'data/tribes/workers/empire/recruit/walk_se_03_pc.png' |
1911 | Binary files data/tribes/workers/empire/recruit/walk_se_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1912 | === added file 'data/tribes/workers/empire/recruit/walk_se_04.png' |
1913 | Binary files data/tribes/workers/empire/recruit/walk_se_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_04.png 2017-01-21 14:37:18 +0000 differ |
1914 | === added file 'data/tribes/workers/empire/recruit/walk_se_04_pc.png' |
1915 | Binary files data/tribes/workers/empire/recruit/walk_se_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1916 | === added file 'data/tribes/workers/empire/recruit/walk_se_05.png' |
1917 | Binary files data/tribes/workers/empire/recruit/walk_se_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_05.png 2017-01-21 14:37:18 +0000 differ |
1918 | === added file 'data/tribes/workers/empire/recruit/walk_se_05_pc.png' |
1919 | Binary files data/tribes/workers/empire/recruit/walk_se_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1920 | === added file 'data/tribes/workers/empire/recruit/walk_se_06.png' |
1921 | Binary files data/tribes/workers/empire/recruit/walk_se_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_06.png 2017-01-21 14:37:18 +0000 differ |
1922 | === added file 'data/tribes/workers/empire/recruit/walk_se_06_pc.png' |
1923 | Binary files data/tribes/workers/empire/recruit/walk_se_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1924 | === added file 'data/tribes/workers/empire/recruit/walk_se_07.png' |
1925 | Binary files data/tribes/workers/empire/recruit/walk_se_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_07.png 2017-01-21 14:37:18 +0000 differ |
1926 | === added file 'data/tribes/workers/empire/recruit/walk_se_07_pc.png' |
1927 | Binary files data/tribes/workers/empire/recruit/walk_se_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1928 | === added file 'data/tribes/workers/empire/recruit/walk_se_08.png' |
1929 | Binary files data/tribes/workers/empire/recruit/walk_se_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_08.png 2017-01-21 14:37:18 +0000 differ |
1930 | === added file 'data/tribes/workers/empire/recruit/walk_se_08_pc.png' |
1931 | Binary files data/tribes/workers/empire/recruit/walk_se_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1932 | === added file 'data/tribes/workers/empire/recruit/walk_se_09.png' |
1933 | Binary files data/tribes/workers/empire/recruit/walk_se_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_09.png 2017-01-21 14:37:18 +0000 differ |
1934 | === added file 'data/tribes/workers/empire/recruit/walk_se_09_pc.png' |
1935 | Binary files data/tribes/workers/empire/recruit/walk_se_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_se_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1936 | === added file 'data/tribes/workers/empire/recruit/walk_sw_00.png' |
1937 | Binary files data/tribes/workers/empire/recruit/walk_sw_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_00.png 2017-01-21 14:37:18 +0000 differ |
1938 | === added file 'data/tribes/workers/empire/recruit/walk_sw_00_pc.png' |
1939 | Binary files data/tribes/workers/empire/recruit/walk_sw_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1940 | === added file 'data/tribes/workers/empire/recruit/walk_sw_01.png' |
1941 | Binary files data/tribes/workers/empire/recruit/walk_sw_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_01.png 2017-01-21 14:37:18 +0000 differ |
1942 | === added file 'data/tribes/workers/empire/recruit/walk_sw_01_pc.png' |
1943 | Binary files data/tribes/workers/empire/recruit/walk_sw_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1944 | === added file 'data/tribes/workers/empire/recruit/walk_sw_02.png' |
1945 | Binary files data/tribes/workers/empire/recruit/walk_sw_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_02.png 2017-01-21 14:37:18 +0000 differ |
1946 | === added file 'data/tribes/workers/empire/recruit/walk_sw_02_pc.png' |
1947 | Binary files data/tribes/workers/empire/recruit/walk_sw_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1948 | === added file 'data/tribes/workers/empire/recruit/walk_sw_03.png' |
1949 | Binary files data/tribes/workers/empire/recruit/walk_sw_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_03.png 2017-01-21 14:37:18 +0000 differ |
1950 | === added file 'data/tribes/workers/empire/recruit/walk_sw_03_pc.png' |
1951 | Binary files data/tribes/workers/empire/recruit/walk_sw_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1952 | === added file 'data/tribes/workers/empire/recruit/walk_sw_04.png' |
1953 | Binary files data/tribes/workers/empire/recruit/walk_sw_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_04.png 2017-01-21 14:37:18 +0000 differ |
1954 | === added file 'data/tribes/workers/empire/recruit/walk_sw_04_pc.png' |
1955 | Binary files data/tribes/workers/empire/recruit/walk_sw_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1956 | === added file 'data/tribes/workers/empire/recruit/walk_sw_05.png' |
1957 | Binary files data/tribes/workers/empire/recruit/walk_sw_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_05.png 2017-01-21 14:37:18 +0000 differ |
1958 | === added file 'data/tribes/workers/empire/recruit/walk_sw_05_pc.png' |
1959 | Binary files data/tribes/workers/empire/recruit/walk_sw_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_05_pc.png 2017-01-21 14:37:18 +0000 differ |
1960 | === added file 'data/tribes/workers/empire/recruit/walk_sw_06.png' |
1961 | Binary files data/tribes/workers/empire/recruit/walk_sw_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_06.png 2017-01-21 14:37:18 +0000 differ |
1962 | === added file 'data/tribes/workers/empire/recruit/walk_sw_06_pc.png' |
1963 | Binary files data/tribes/workers/empire/recruit/walk_sw_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_06_pc.png 2017-01-21 14:37:18 +0000 differ |
1964 | === added file 'data/tribes/workers/empire/recruit/walk_sw_07.png' |
1965 | Binary files data/tribes/workers/empire/recruit/walk_sw_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_07.png 2017-01-21 14:37:18 +0000 differ |
1966 | === added file 'data/tribes/workers/empire/recruit/walk_sw_07_pc.png' |
1967 | Binary files data/tribes/workers/empire/recruit/walk_sw_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_07_pc.png 2017-01-21 14:37:18 +0000 differ |
1968 | === added file 'data/tribes/workers/empire/recruit/walk_sw_08.png' |
1969 | Binary files data/tribes/workers/empire/recruit/walk_sw_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_08.png 2017-01-21 14:37:18 +0000 differ |
1970 | === added file 'data/tribes/workers/empire/recruit/walk_sw_08_pc.png' |
1971 | Binary files data/tribes/workers/empire/recruit/walk_sw_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_08_pc.png 2017-01-21 14:37:18 +0000 differ |
1972 | === added file 'data/tribes/workers/empire/recruit/walk_sw_09.png' |
1973 | Binary files data/tribes/workers/empire/recruit/walk_sw_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_09.png 2017-01-21 14:37:18 +0000 differ |
1974 | === added file 'data/tribes/workers/empire/recruit/walk_sw_09_pc.png' |
1975 | Binary files data/tribes/workers/empire/recruit/walk_sw_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_sw_09_pc.png 2017-01-21 14:37:18 +0000 differ |
1976 | === added file 'data/tribes/workers/empire/recruit/walk_w_00.png' |
1977 | Binary files data/tribes/workers/empire/recruit/walk_w_00.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_00.png 2017-01-21 14:37:18 +0000 differ |
1978 | === added file 'data/tribes/workers/empire/recruit/walk_w_00_pc.png' |
1979 | Binary files data/tribes/workers/empire/recruit/walk_w_00_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_00_pc.png 2017-01-21 14:37:18 +0000 differ |
1980 | === added file 'data/tribes/workers/empire/recruit/walk_w_01.png' |
1981 | Binary files data/tribes/workers/empire/recruit/walk_w_01.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_01.png 2017-01-21 14:37:18 +0000 differ |
1982 | === added file 'data/tribes/workers/empire/recruit/walk_w_01_pc.png' |
1983 | Binary files data/tribes/workers/empire/recruit/walk_w_01_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_01_pc.png 2017-01-21 14:37:18 +0000 differ |
1984 | === added file 'data/tribes/workers/empire/recruit/walk_w_02.png' |
1985 | Binary files data/tribes/workers/empire/recruit/walk_w_02.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_02.png 2017-01-21 14:37:18 +0000 differ |
1986 | === added file 'data/tribes/workers/empire/recruit/walk_w_02_pc.png' |
1987 | Binary files data/tribes/workers/empire/recruit/walk_w_02_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_02_pc.png 2017-01-21 14:37:18 +0000 differ |
1988 | === added file 'data/tribes/workers/empire/recruit/walk_w_03.png' |
1989 | Binary files data/tribes/workers/empire/recruit/walk_w_03.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_03.png 2017-01-21 14:37:18 +0000 differ |
1990 | === added file 'data/tribes/workers/empire/recruit/walk_w_03_pc.png' |
1991 | Binary files data/tribes/workers/empire/recruit/walk_w_03_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_03_pc.png 2017-01-21 14:37:18 +0000 differ |
1992 | === added file 'data/tribes/workers/empire/recruit/walk_w_04.png' |
1993 | Binary files data/tribes/workers/empire/recruit/walk_w_04.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_04.png 2017-01-21 14:37:18 +0000 differ |
1994 | === added file 'data/tribes/workers/empire/recruit/walk_w_04_pc.png' |
1995 | Binary files data/tribes/workers/empire/recruit/walk_w_04_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_04_pc.png 2017-01-21 14:37:18 +0000 differ |
1996 | === added file 'data/tribes/workers/empire/recruit/walk_w_05.png' |
1997 | Binary files data/tribes/workers/empire/recruit/walk_w_05.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_05.png 2017-01-21 14:37:18 +0000 differ |
1998 | === added file 'data/tribes/workers/empire/recruit/walk_w_05_pc.png' |
1999 | Binary files data/tribes/workers/empire/recruit/walk_w_05_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_05_pc.png 2017-01-21 14:37:18 +0000 differ |
2000 | === added file 'data/tribes/workers/empire/recruit/walk_w_06.png' |
2001 | Binary files data/tribes/workers/empire/recruit/walk_w_06.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_06.png 2017-01-21 14:37:18 +0000 differ |
2002 | === added file 'data/tribes/workers/empire/recruit/walk_w_06_pc.png' |
2003 | Binary files data/tribes/workers/empire/recruit/walk_w_06_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_06_pc.png 2017-01-21 14:37:18 +0000 differ |
2004 | === added file 'data/tribes/workers/empire/recruit/walk_w_07.png' |
2005 | Binary files data/tribes/workers/empire/recruit/walk_w_07.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_07.png 2017-01-21 14:37:18 +0000 differ |
2006 | === added file 'data/tribes/workers/empire/recruit/walk_w_07_pc.png' |
2007 | Binary files data/tribes/workers/empire/recruit/walk_w_07_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_07_pc.png 2017-01-21 14:37:18 +0000 differ |
2008 | === added file 'data/tribes/workers/empire/recruit/walk_w_08.png' |
2009 | Binary files data/tribes/workers/empire/recruit/walk_w_08.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_08.png 2017-01-21 14:37:18 +0000 differ |
2010 | === added file 'data/tribes/workers/empire/recruit/walk_w_08_pc.png' |
2011 | Binary files data/tribes/workers/empire/recruit/walk_w_08_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_08_pc.png 2017-01-21 14:37:18 +0000 differ |
2012 | === added file 'data/tribes/workers/empire/recruit/walk_w_09.png' |
2013 | Binary files data/tribes/workers/empire/recruit/walk_w_09.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_09.png 2017-01-21 14:37:18 +0000 differ |
2014 | === added file 'data/tribes/workers/empire/recruit/walk_w_09_pc.png' |
2015 | Binary files data/tribes/workers/empire/recruit/walk_w_09_pc.png 1970-01-01 00:00:00 +0000 and data/tribes/workers/empire/recruit/walk_w_09_pc.png 2017-01-21 14:37:18 +0000 differ |
2016 | === modified file 'data/tribes/workers/empire/soldier/init.lua' |
2017 | --- data/tribes/workers/empire/soldier/init.lua 2016-09-27 06:30:47 +0000 |
2018 | +++ data/tribes/workers/empire/soldier/init.lua 2017-01-21 14:37:18 +0000 |
2019 | @@ -69,14 +69,10 @@ |
2020 | icon = dirname .. "menu.png", |
2021 | vision_range = 2, |
2022 | |
2023 | - buildcost = { |
2024 | - empire_carrier = 1, |
2025 | - armor_helmet = 1, |
2026 | - spear_wooden = 1 |
2027 | - }, |
2028 | - |
2029 | animations = animations, |
2030 | |
2031 | + default_target_quantity = 10, |
2032 | + |
2033 | -- Battle attributes - initial values and per level increase |
2034 | health = { |
2035 | max_level = 4, |
2036 | |
2037 | === modified file 'src/ai/defaultai.cc' |
2038 | --- src/ai/defaultai.cc 2016-12-08 17:27:00 +0000 |
2039 | +++ src/ai/defaultai.cc 2017-01-21 14:37:18 +0000 |
2040 | @@ -556,7 +556,7 @@ |
2041 | const ProductionSiteDescr& prod = dynamic_cast<const ProductionSiteDescr&>(bld); |
2042 | bo.type = bld.get_ismine() ? BuildingObserver::Type::kMine : |
2043 | BuildingObserver::Type::kProductionsite; |
2044 | - for (const auto& temp_input : prod.inputs()) { |
2045 | + for (const auto& temp_input : prod.input_wares()) { |
2046 | bo.inputs.push_back(temp_input.first); |
2047 | } |
2048 | for (const DescriptionIndex& temp_output : prod.output_ware_types()) { |
2049 | @@ -667,7 +667,7 @@ |
2050 | if (bld.type() == MapObjectType::TRAININGSITE) { |
2051 | bo.type = BuildingObserver::Type::kTrainingsite; |
2052 | const TrainingSiteDescr& train = dynamic_cast<const TrainingSiteDescr&>(bld); |
2053 | - for (const auto& temp_input : train.inputs()) { |
2054 | + for (const auto& temp_input : train.input_wares()) { |
2055 | bo.inputs.push_back(temp_input.first); |
2056 | |
2057 | // collecting subsitutes |
2058 | @@ -3120,8 +3120,8 @@ |
2059 | for (auto& queue : site.site->warequeues()) { |
2060 | if (queue->get_max_fill() == 0) { |
2061 | resetting_wares = true; |
2062 | - game().send_player_set_ware_max_fill( |
2063 | - *site.site, queue->get_ware(), queue->get_max_size()); |
2064 | + game().send_player_set_input_max_fill( |
2065 | + *site.site, queue->get_index(), wwWARE, queue->get_max_size()); |
2066 | } |
2067 | } |
2068 | if (resetting_wares) { |
2069 | @@ -3222,7 +3222,7 @@ |
2070 | |
2071 | // reducing input queues |
2072 | for (auto& queue : site.site->warequeues()) { |
2073 | - game().send_player_set_ware_max_fill(*site.site, queue->get_ware(), 0); |
2074 | + game().send_player_set_input_max_fill(*site.site, queue->get_index(), wwWARE, 0); |
2075 | } |
2076 | site.bo->construction_decision_time = gametime; |
2077 | en_bo.construction_decision_time = gametime; |
2078 | |
2079 | === modified file 'src/ai/defaultai_warfare.cc' |
2080 | --- src/ai/defaultai_warfare.cc 2016-12-08 08:49:14 +0000 |
2081 | +++ src/ai/defaultai_warfare.cc 2017-01-21 14:37:18 +0000 |
2082 | @@ -490,10 +490,10 @@ |
2083 | // now modifying max_fill of armors and weapons |
2084 | for (std::string pattern : armors_and_weapons) { |
2085 | |
2086 | - if (tribe_->get_ware_descr(warequeues1[i]->get_ware())->name().find(pattern) != |
2087 | + if (tribe_->get_ware_descr(warequeues1[i]->get_index())->name().find(pattern) != |
2088 | std::string::npos) { |
2089 | if (warequeues1[i]->get_max_fill() > 1) { |
2090 | - game().send_player_set_ware_max_fill(*ts, warequeues1[i]->get_ware(), 1); |
2091 | + game().send_player_set_input_max_fill(*ts, warequeues1[i]->get_index(), wwWARE, 1); |
2092 | continue; |
2093 | } |
2094 | } |
2095 | @@ -521,7 +521,7 @@ |
2096 | std::vector<WaresQueue*> const warequeues2 = tso.site->warequeues(); |
2097 | nr_warequeues = warequeues2.size(); |
2098 | for (size_t i = 0; i < nr_warequeues; ++i) { |
2099 | - if (tso.bo->substitute_inputs.count(warequeues2[i]->get_ware()) > 0) { |
2100 | + if (tso.bo->substitute_inputs.count(warequeues2[i]->get_index()) > 0) { |
2101 | filled += warequeues2[i]->get_filled(); |
2102 | } |
2103 | } |
2104 | @@ -531,7 +531,7 @@ |
2105 | |
2106 | // checking non subsitutes |
2107 | for (size_t i = 0; i < nr_warequeues; ++i) { |
2108 | - if (tso.bo->substitute_inputs.count(warequeues2[i]->get_ware()) == 0) { |
2109 | + if (tso.bo->substitute_inputs.count(warequeues2[i]->get_index()) == 0) { |
2110 | const uint32_t required_amount = |
2111 | (warequeues2[i]->get_max_fill() < 5) ? warequeues2[i]->get_max_fill() : 5; |
2112 | if (warequeues2[i]->get_filled() < required_amount) { |
2113 | |
2114 | === modified file 'src/economy/CMakeLists.txt' |
2115 | --- src/economy/CMakeLists.txt 2015-11-28 22:29:26 +0000 |
2116 | +++ src/economy/CMakeLists.txt 2017-01-21 14:37:18 +0000 |
2117 | @@ -40,8 +40,12 @@ |
2118 | ware_instance.cc |
2119 | ware_instance.h |
2120 | warehousesupply.h |
2121 | + input_queue.cc |
2122 | + input_queue.h |
2123 | wares_queue.cc |
2124 | wares_queue.h |
2125 | + workers_queue.cc |
2126 | + workers_queue.h |
2127 | DEPENDS |
2128 | base_exceptions |
2129 | base_log |
2130 | |
2131 | === modified file 'src/economy/expedition_bootstrap.cc' |
2132 | --- src/economy/expedition_bootstrap.cc 2016-08-04 15:49:05 +0000 |
2133 | +++ src/economy/expedition_bootstrap.cc 2017-01-21 14:37:18 +0000 |
2134 | @@ -70,10 +70,8 @@ |
2135 | } |
2136 | |
2137 | // static |
2138 | -void ExpeditionBootstrap::ware_callback(Game& game, |
2139 | - WaresQueue*, |
2140 | - DescriptionIndex, |
2141 | - void* const data) { |
2142 | +void ExpeditionBootstrap::ware_callback( |
2143 | + Game& game, InputQueue*, DescriptionIndex, Worker*, void* const data) { |
2144 | ExpeditionBootstrap* eb = static_cast<ExpeditionBootstrap*>(data); |
2145 | eb->is_ready(game); |
2146 | } |
2147 | @@ -147,7 +145,7 @@ |
2148 | // Put all wares from the WaresQueues back into the warehouse |
2149 | Warehouse* const warehouse = portdock_->get_warehouse(); |
2150 | for (std::unique_ptr<WaresQueue>& wq : wares_) { |
2151 | - warehouse->insert_wares(wq->get_ware(), wq->get_filled()); |
2152 | + warehouse->insert_wares(wq->get_index(), wq->get_filled()); |
2153 | wq->cleanup(); |
2154 | } |
2155 | wares_.clear(); |
2156 | @@ -180,7 +178,7 @@ |
2157 | |
2158 | WaresQueue& ExpeditionBootstrap::waresqueue(DescriptionIndex index) const { |
2159 | for (const std::unique_ptr<WaresQueue>& wq : wares_) { |
2160 | - if (wq->get_ware() == index) { |
2161 | + if (wq->get_index() == index) { |
2162 | return *wq.get(); |
2163 | } |
2164 | } |
2165 | @@ -224,7 +222,7 @@ |
2166 | std::vector<Worker*>* return_workers, |
2167 | std::vector<WareInstance*>* return_wares) { |
2168 | for (std::unique_ptr<WaresQueue>& wq : wares_) { |
2169 | - const DescriptionIndex ware_index = wq->get_ware(); |
2170 | + const DescriptionIndex ware_index = wq->get_index(); |
2171 | for (uint32_t j = 0; j < wq->get_filled(); ++j) { |
2172 | WareInstance* temp = new WareInstance(ware_index, tribe.get_ware_descr(ware_index)); |
2173 | temp->init(game); |
2174 | @@ -291,7 +289,7 @@ |
2175 | wq->read(fr, game, mol); |
2176 | wq->set_callback(ware_callback, this); |
2177 | |
2178 | - if (wq->get_ware() == INVALID_INDEX) { |
2179 | + if (wq->get_index() == INVALID_INDEX) { |
2180 | delete wq; |
2181 | } else { |
2182 | wares_.emplace_back(wq); |
2183 | |
2184 | === modified file 'src/economy/expedition_bootstrap.h' |
2185 | --- src/economy/expedition_bootstrap.h 2016-08-04 15:49:05 +0000 |
2186 | +++ src/economy/expedition_bootstrap.h 2017-01-21 14:37:18 +0000 |
2187 | @@ -84,7 +84,7 @@ |
2188 | |
2189 | // Handles arriving workers and wares. |
2190 | static void worker_callback(Game&, Request& r, DescriptionIndex, Worker*, PlayerImmovable&); |
2191 | - static void ware_callback(Game& game, WaresQueue*, DescriptionIndex, void* const data); |
2192 | + static void ware_callback(Game& game, InputQueue*, DescriptionIndex, Worker*, void* const data); |
2193 | void handle_worker_callback(Game&, Request&, Worker*); |
2194 | |
2195 | // Tests if all wares for the expedition have arrived. If so, informs the portdock. |
2196 | |
2197 | === modified file 'src/economy/idleworkersupply.cc' |
2198 | --- src/economy/idleworkersupply.cc 2016-08-04 15:49:05 +0000 |
2199 | +++ src/economy/idleworkersupply.cc 2017-01-21 14:37:18 +0000 |
2200 | @@ -87,7 +87,9 @@ |
2201 | |
2202 | uint32_t IdleWorkerSupply::nr_supplies(const Game&, const Request& req) const { |
2203 | assert(req.get_type() != wwWORKER || worker_.owner().tribe().has_worker(req.get_index())); |
2204 | - if (req.get_type() == wwWORKER && worker_.descr().can_act_as(req.get_index()) && |
2205 | + if (req.get_type() == wwWORKER && |
2206 | + (req.get_index() == worker_.descr().worker_index() || |
2207 | + (!req.get_exact_match() && worker_.descr().can_act_as(req.get_index()))) && |
2208 | req.get_requirements().check(worker_)) |
2209 | return 1; |
2210 | |
2211 | |
2212 | === added file 'src/economy/input_queue.cc' |
2213 | --- src/economy/input_queue.cc 1970-01-01 00:00:00 +0000 |
2214 | +++ src/economy/input_queue.cc 2017-01-21 14:37:18 +0000 |
2215 | @@ -0,0 +1,183 @@ |
2216 | +/* |
2217 | + * Copyright (C) 2004-2016 by the Widelands Development Team |
2218 | + * |
2219 | + * This program is free software; you can redistribute it and/or |
2220 | + * modify it under the terms of the GNU General Public License |
2221 | + * as published by the Free Software Foundation; either version 2 |
2222 | + * of the License, or (at your option) any later version. |
2223 | + * |
2224 | + * This program is distributed in the hope that it will be useful, |
2225 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2226 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2227 | + * GNU General Public License for more details. |
2228 | + * |
2229 | + * You should have received a copy of the GNU General Public License |
2230 | + * along with this program; if not, write to the Free Software |
2231 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
2232 | + * |
2233 | + */ |
2234 | + |
2235 | +#include "economy/input_queue.h" |
2236 | + |
2237 | +#include "base/wexception.h" |
2238 | +#include "economy/economy.h" |
2239 | +#include "economy/request.h" |
2240 | +#include "io/fileread.h" |
2241 | +#include "io/filewrite.h" |
2242 | +#include "logic/editor_game_base.h" |
2243 | +#include "logic/game.h" |
2244 | +#include "logic/map_objects/tribes/tribe_descr.h" |
2245 | +#include "logic/player.h" |
2246 | +#include "map_io/map_object_loader.h" |
2247 | +#include "map_io/map_object_saver.h" |
2248 | + |
2249 | +namespace Widelands { |
2250 | + |
2251 | +InputQueue::InputQueue(PlayerImmovable& init_owner, |
2252 | + DescriptionIndex const init_index, |
2253 | + uint8_t const init_max_size, |
2254 | + WareWorker const init_type) |
2255 | + : owner_(init_owner), |
2256 | + index_(init_index), |
2257 | + max_size_(init_max_size), |
2258 | + max_fill_(init_max_size), |
2259 | + type_(init_type), |
2260 | + consume_interval_(0), |
2261 | + request_(nullptr), |
2262 | + callback_fn_(nullptr), |
2263 | + callback_data_(nullptr) { |
2264 | +} |
2265 | + |
2266 | +void InputQueue::update() { |
2267 | + |
2268 | + assert(get_filled() <= max_size_); |
2269 | + assert(max_fill_ <= max_size_); |
2270 | + assert(index_ != INVALID_INDEX); |
2271 | + |
2272 | + if (get_filled() < max_fill_) { |
2273 | + if (!request_) { |
2274 | + request_.reset(new Request(owner_, index_, InputQueue::request_callback, type_)); |
2275 | + request_->set_exact_match(true); // Required for worker queues, ignored for wares anyway |
2276 | + } |
2277 | + |
2278 | + request_->set_count(max_fill_ - get_filled()); |
2279 | + request_->set_required_interval(consume_interval_); |
2280 | + } else { |
2281 | + request_.reset(); |
2282 | + } |
2283 | +} |
2284 | + |
2285 | +void InputQueue::request_callback(Game& game, |
2286 | + Request&, |
2287 | + DescriptionIndex const index, |
2288 | + Worker* const worker, |
2289 | + PlayerImmovable& target) { |
2290 | + |
2291 | + WareWorker type = wwWARE; |
2292 | + if (worker != nullptr) { |
2293 | + assert(index == worker->descr().worker_index()); |
2294 | + type = wwWORKER; |
2295 | + } |
2296 | + |
2297 | + InputQueue& iq = dynamic_cast<Building&>(target).inputqueue(index, type); |
2298 | + |
2299 | + iq.entered(index, worker); |
2300 | + |
2301 | + if (iq.callback_fn_) |
2302 | + (*iq.callback_fn_)(game, &iq, index, worker, iq.callback_data_); |
2303 | +} |
2304 | + |
2305 | +void InputQueue::set_callback(CallbackFn* const fn, void* const data) { |
2306 | + callback_fn_ = fn; |
2307 | + callback_data_ = data; |
2308 | +} |
2309 | + |
2310 | +void InputQueue::set_max_size(const Quantity size) { |
2311 | + Quantity old_size = max_size_; |
2312 | + max_size_ = size; |
2313 | + |
2314 | + // make sure that max fill is reduced as well if the max size is decreased |
2315 | + // because this is very likely what the user wanted to only consume so |
2316 | + // and so many wares in the first place. If it is increased, keep the |
2317 | + // max fill fill as it was |
2318 | + set_max_fill(std::min(max_fill_, max_fill_ - (old_size - max_size_))); |
2319 | + |
2320 | + // No update() since set_max_fill calls it anyway |
2321 | +} |
2322 | + |
2323 | +void InputQueue::set_max_fill(Quantity size) { |
2324 | + if (size > max_size_) |
2325 | + size = max_size_; |
2326 | + |
2327 | + max_fill_ = size; |
2328 | + |
2329 | + update(); |
2330 | +} |
2331 | + |
2332 | +void InputQueue::set_consume_interval(const uint32_t time) { |
2333 | + consume_interval_ = time; |
2334 | + |
2335 | + update(); |
2336 | +} |
2337 | + |
2338 | +constexpr uint16_t kCurrentPacketVersion = 1; |
2339 | + |
2340 | +void InputQueue::read(FileRead& fr, Game& game, MapObjectLoader& mol) { |
2341 | + |
2342 | + uint16_t const packet_version = fr.unsigned_16(); |
2343 | + try { |
2344 | + if (packet_version == kCurrentPacketVersion) { |
2345 | + if (fr.unsigned_8() == 0) { |
2346 | + assert(type_ == wwWARE); |
2347 | + index_ = owner().tribe().ware_index(fr.c_string()); |
2348 | + } else { |
2349 | + assert(type_ == wwWORKER); |
2350 | + index_ = owner().tribe().worker_index(fr.c_string()); |
2351 | + } |
2352 | + max_size_ = fr.unsigned_32(); |
2353 | + max_fill_ = fr.signed_32(); |
2354 | + consume_interval_ = fr.unsigned_32(); |
2355 | + if (fr.unsigned_8()) { |
2356 | + request_.reset(new Request(owner_, 0, InputQueue::request_callback, type_)); |
2357 | + request_->read(fr, game, mol); |
2358 | + } else { |
2359 | + request_.reset(); |
2360 | + } |
2361 | + |
2362 | + read_child(fr, game, mol); |
2363 | + |
2364 | + // Now Economy stuff. We have to add our filled items to the economy. |
2365 | + if (owner_.get_economy()) |
2366 | + add_to_economy(*owner_.get_economy()); |
2367 | + } else { |
2368 | + throw UnhandledVersionError("InputQueue", packet_version, kCurrentPacketVersion); |
2369 | + } |
2370 | + } catch (const GameDataError& e) { |
2371 | + throw GameDataError("inputqueue: %s", e.what()); |
2372 | + } |
2373 | +} |
2374 | + |
2375 | +void InputQueue::write(FileWrite& fw, Game& game, MapObjectSaver& mos) { |
2376 | + fw.unsigned_16(kCurrentPacketVersion); |
2377 | + |
2378 | + // Owner and callback is not saved, but this should be obvious on load. |
2379 | + if (type_ == wwWARE) { |
2380 | + fw.unsigned_8(0); |
2381 | + fw.c_string(owner().tribe().get_ware_descr(index_)->name().c_str()); |
2382 | + } else { |
2383 | + fw.unsigned_8(1); |
2384 | + fw.c_string(owner().tribe().get_worker_descr(index_)->name().c_str()); |
2385 | + } |
2386 | + fw.signed_32(max_size_); |
2387 | + fw.signed_32(max_fill_); |
2388 | + fw.signed_32(consume_interval_); |
2389 | + if (request_) { |
2390 | + fw.unsigned_8(1); |
2391 | + request_->write(fw, game, mos); |
2392 | + } else { |
2393 | + fw.unsigned_8(0); |
2394 | + } |
2395 | + |
2396 | + write_child(fw, game, mos); |
2397 | +} |
2398 | +} |
2399 | |
2400 | === added file 'src/economy/input_queue.h' |
2401 | --- src/economy/input_queue.h 1970-01-01 00:00:00 +0000 |
2402 | +++ src/economy/input_queue.h 2017-01-21 14:37:18 +0000 |
2403 | @@ -0,0 +1,268 @@ |
2404 | +/* |
2405 | + * Copyright (C) 2004-2016 by the Widelands Development Team |
2406 | + * |
2407 | + * This program is free software; you can redistribute it and/or |
2408 | + * modify it under the terms of the GNU General Public License |
2409 | + * as published by the Free Software Foundation; either version 2 |
2410 | + * of the License, or (at your option) any later version. |
2411 | + * |
2412 | + * This program is distributed in the hope that it will be useful, |
2413 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2414 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2415 | + * GNU General Public License for more details. |
2416 | + * |
2417 | + * You should have received a copy of the GNU General Public License |
2418 | + * along with this program; if not, write to the Free Software |
2419 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
2420 | + * |
2421 | + */ |
2422 | + |
2423 | +#ifndef WL_ECONOMY_INPUT_QUEUE_H |
2424 | +#define WL_ECONOMY_INPUT_QUEUE_H |
2425 | + |
2426 | +#include <memory> |
2427 | + |
2428 | +#include "logic/map_objects/immovable.h" |
2429 | +#include "logic/map_objects/tribes/wareworker.h" |
2430 | +#include "logic/widelands.h" |
2431 | + |
2432 | +namespace Widelands { |
2433 | + |
2434 | +class Economy; |
2435 | +class Game; |
2436 | +class MapObjectLoader; |
2437 | +struct MapObjectSaver; |
2438 | +class Player; |
2439 | +class Request; |
2440 | + |
2441 | +/** |
2442 | + * Base class for input queues of wares and workers. |
2443 | + * Mentioning "wares" in the following nearly always means "wares or workers". |
2444 | + */ |
2445 | +class InputQueue { |
2446 | +public: |
2447 | + /** |
2448 | + * Destructor. |
2449 | + * Does nothing currently. |
2450 | + */ |
2451 | + virtual ~InputQueue() { |
2452 | + } |
2453 | + |
2454 | + /** |
2455 | + * The declaration of a callback function which can be registered to get notified |
2456 | + * when wares or workers arrive at the building and should be added to the queue. |
2457 | + * @param game The game the queue is part of. |
2458 | + * @param q The \c InputQueue the ware or worker should be added to. |
2459 | + * @param ware The index of the ware which arrived, if the queue is a WaresQueue. |
2460 | + * @param worker The worker which arrived, if the queue is a WorkersQueue. |
2461 | + * @param data Unspecified data which has been given when calling set_callback(). |
2462 | + */ |
2463 | + using CallbackFn = |
2464 | + void(Game& g, InputQueue* q, DescriptionIndex ware, Worker* worker, void* data); |
2465 | + |
2466 | + /** |
2467 | + * Returns the index of the ware or worker which is handled by the queue. |
2468 | + * @return The DescriptionIndex of whatever is stored here. |
2469 | + */ |
2470 | + DescriptionIndex get_index() const { |
2471 | + return index_; |
2472 | + } |
2473 | + |
2474 | + /** |
2475 | + * Get the maximum amount of wares or workers which should be stored here. |
2476 | + * This is a value which can be influenced by the player with the provided buttons. |
2477 | + * @return The maximum number of wares or workers which should be here. |
2478 | + */ |
2479 | + Quantity get_max_fill() const { |
2480 | + return max_fill_; |
2481 | + } |
2482 | + |
2483 | + /** |
2484 | + * Whether wares or workers are stored in this queue. |
2485 | + * @return Whether wares or workers are stored in this queue. |
2486 | + */ |
2487 | + WareWorker get_type() const { |
2488 | + return type_; |
2489 | + } |
2490 | + |
2491 | + /** |
2492 | + * The maximum size of the queue as defined by the building. |
2493 | + * @return The maximum size. |
2494 | + */ |
2495 | + Quantity get_max_size() const { |
2496 | + return max_size_; |
2497 | + } |
2498 | + |
2499 | + /** |
2500 | + * The amount of wares or workers which are stored here currently. |
2501 | + * This might temporarily be larger than get_max_fill() but will |
2502 | + * be smaller than get_max_size(). |
2503 | + * @return The amount at this moment. |
2504 | + */ |
2505 | + virtual Quantity get_filled() const = 0; |
2506 | + |
2507 | + /** |
2508 | + * Clear the queue appropriately. |
2509 | + * Implementing classes should call update() at the end to remove the request. |
2510 | + */ |
2511 | + virtual void cleanup() = 0; |
2512 | + |
2513 | + /** |
2514 | + * Set the callback function that is called when an item has arrived. |
2515 | + * @param fn The function to call. |
2516 | + * @param data Unspecified data which will be passed on calls of \c fn. |
2517 | + */ |
2518 | + void set_callback(CallbackFn* fn, void* data); |
2519 | + |
2520 | + /** |
2521 | + * Remove the wares in this queue from the given economy (used in accounting). |
2522 | + * Implementing classes have to set the economy of the potential request. |
2523 | + * @param e The economy to remove the wares or workers from. |
2524 | + */ |
2525 | + virtual void remove_from_economy(Economy& e) = 0; |
2526 | + |
2527 | + /** |
2528 | + * Add the wares in this queue to the given economy (used in accounting). |
2529 | + * Implementing classes have to set the economy of the potential request. |
2530 | + * @param The economy to add the wares or workers to. |
2531 | + */ |
2532 | + virtual void add_to_economy(Economy& e) = 0; |
2533 | + |
2534 | + /** |
2535 | + * Change size of the queue. |
2536 | + * This influences how many wares can be in here at maximum. |
2537 | + * @param q The new maximum size. |
2538 | + */ |
2539 | + void set_max_size(Quantity q); |
2540 | + |
2541 | + /** |
2542 | + * Change the number of wares that should be available in this queue. |
2543 | + * |
2544 | + * This is similar as setting the maximum size, |
2545 | + * but if there are more wares than that in the queue, they will not get |
2546 | + * lost (the building should drop them). This is the method called when the player |
2547 | + * pressed the buttons in the gui. |
2548 | + * @param q The maximum number of wares which should be stored here. |
2549 | + */ |
2550 | + virtual void set_max_fill(Quantity q); |
2551 | + |
2552 | + /** |
2553 | + * Change fill status of the queue. This creates or removes wares as required. |
2554 | + * Note that the wares are created out of thin air and respectively are removed without |
2555 | + * dropping them on the street. |
2556 | + * @param q The number of wares which are stored here. |
2557 | + */ |
2558 | + virtual void set_filled(Quantity q) = 0; |
2559 | + |
2560 | + /** |
2561 | + * Set the time between consumption of items when the owning building |
2562 | + * is consuming at full speed. |
2563 | + * |
2564 | + * This interval is merely a hint for the Supply/Request balancing code. |
2565 | + * @param i The interval in ms. |
2566 | + */ |
2567 | + void set_consume_interval(uint32_t i); |
2568 | + |
2569 | + /** |
2570 | + * Returns the player owning the building containing this queue. |
2571 | + * @return A reference to the owning player. |
2572 | + */ |
2573 | + Player& owner() const { |
2574 | + return owner_.owner(); |
2575 | + } |
2576 | + |
2577 | + /** |
2578 | + * Overwrites the state of this class with the read data. |
2579 | + * @param fr A stream to read the data from. |
2580 | + * @param game The game this queue will be part of. |
2581 | + * @param mol The game/map loader that handles the lading. Required to pass to Request::read(). |
2582 | + */ |
2583 | + void read(FileRead& f, Game& g, MapObjectLoader& mol); |
2584 | + |
2585 | + /** |
2586 | + * Writes the state of this class. |
2587 | + * @param fw A stream to write the data to. |
2588 | + * @param game The game this queue is part of. |
2589 | + * @param mos The game/map saver that handles the saving. Required to pass to Request::write(). |
2590 | + */ |
2591 | + void write(FileWrite& w, Game& g, MapObjectSaver& s); |
2592 | + |
2593 | +protected: |
2594 | + /** |
2595 | + * Pre-initialize a InputQueue. |
2596 | + * @param owner The building the queue is part of. |
2597 | + * @param index The index of the ware or worker that will be stored. |
2598 | + * @param max_size The maximum amount that can be stored. |
2599 | + * @param type Whether wares or workers are stored in this queue. |
2600 | + */ |
2601 | + InputQueue(PlayerImmovable& owner, DescriptionIndex index, uint8_t max_size, WareWorker type); |
2602 | + |
2603 | + /** |
2604 | + * Called when an item arrives at the owning building. |
2605 | + * Most likely only one of \c i or \c w will be valid. |
2606 | + * @param g The game the queue is part of. |
2607 | + * @param r The request for the ware or worker. |
2608 | + * @param i The index of the arrived ware or worker. |
2609 | + * @param w The arrived worker or \c nullptr. |
2610 | + * @param b The building where the ware or worker arrived at. |
2611 | + */ |
2612 | + static void |
2613 | + request_callback(Game& g, Request& r, DescriptionIndex i, Worker* w, PlayerImmovable& b); |
2614 | + |
2615 | + /** |
2616 | + * Updates the request. |
2617 | + * You must call this after every call to set_*(). |
2618 | + */ |
2619 | + void update(); |
2620 | + |
2621 | + /** |
2622 | + * Called when an item arrives at the owning building. |
2623 | + * Most likely only one of \c i or \c w will be valid. |
2624 | + * @param index The index of the arrived ware in case of ware queues. |
2625 | + * Not sure about its value in worker queues. |
2626 | + * @param worker The arrived worker or \c nullptr. |
2627 | + */ |
2628 | + virtual void entered(DescriptionIndex index, Worker* worker) = 0; |
2629 | + |
2630 | + /** |
2631 | + * Overwrites the state of the subclass with the read data. |
2632 | + * @param fr A stream to read the data from. |
2633 | + * @param game The game this queue will be part of. |
2634 | + * @param mol The game/map loader that handles the loading. |
2635 | + */ |
2636 | + virtual void read_child(FileRead& f, Game& g, MapObjectLoader& mol) = 0; |
2637 | + |
2638 | + /** |
2639 | + * Writes the state of the subclass. |
2640 | + * @param fw A stream to write the data to. |
2641 | + * @param game The game this queue is part of. |
2642 | + * @param mos The game/map saver that handles the saving. |
2643 | + */ |
2644 | + virtual void write_child(FileWrite& w, Game& g, MapObjectSaver& s) = 0; |
2645 | + |
2646 | + /// The building this queue is part of. |
2647 | + PlayerImmovable& owner_; |
2648 | + /// ID of stored ware/worker. |
2649 | + DescriptionIndex index_; |
2650 | + /// The amount that will fit into the queue maximum. |
2651 | + Quantity max_size_; |
2652 | + /// The amount that should be ideally in this queue. |
2653 | + Quantity max_fill_; |
2654 | + |
2655 | + /// Whether wares or workers are stored in the queue. |
2656 | + const WareWorker type_; |
2657 | + |
2658 | + /// Time in ms between consumption at full speed. |
2659 | + uint32_t consume_interval_; |
2660 | + |
2661 | + /// The currently pending request. |
2662 | + std::unique_ptr<Request> request_; |
2663 | + |
2664 | + /// The function to call on fulfilled request. |
2665 | + CallbackFn* callback_fn_; |
2666 | + /// Unspecified data to pass to function. |
2667 | + void* callback_data_; |
2668 | +}; |
2669 | +} |
2670 | + |
2671 | +#endif // end of include guard: WL_ECONOMY_INPUT_QUEUE_H |
2672 | |
2673 | === modified file 'src/economy/request.cc' |
2674 | --- src/economy/request.cc 2016-08-04 15:49:05 +0000 |
2675 | +++ src/economy/request.cc 2017-01-21 14:37:18 +0000 |
2676 | @@ -60,6 +60,7 @@ |
2677 | economy_(init_target.get_economy()), |
2678 | index_(index), |
2679 | count_(1), |
2680 | + exact_match_(false), |
2681 | callbackfn_(cbfn), |
2682 | required_time_(init_target.owner().egbase().get_gametime()), |
2683 | required_interval_(0), |
2684 | @@ -349,6 +350,13 @@ |
2685 | } |
2686 | |
2687 | /** |
2688 | + * Sets whether a worker supply has to match exactly or if a can_act_as() comparison is good enough. |
2689 | + */ |
2690 | +void Request::set_exact_match(bool match) { |
2691 | + exact_match_ = match; |
2692 | +} |
2693 | + |
2694 | +/** |
2695 | * Change the time at which the first ware to be delivered is needed. |
2696 | * Default is the gametime of the Request creation. |
2697 | */ |
2698 | |
2699 | === modified file 'src/economy/request.h' |
2700 | --- src/economy/request.h 2016-08-04 15:49:05 +0000 |
2701 | +++ src/economy/request.h 2017-01-21 14:37:18 +0000 |
2702 | @@ -83,6 +83,9 @@ |
2703 | uint32_t get_open_count() const { |
2704 | return count_ - transfers_.size(); |
2705 | } |
2706 | + bool get_exact_match() const { |
2707 | + return exact_match_; |
2708 | + } |
2709 | bool is_open() const { |
2710 | return transfers_.size() < count_; |
2711 | } |
2712 | @@ -103,6 +106,7 @@ |
2713 | |
2714 | void set_economy(Economy*); |
2715 | void set_count(Quantity); |
2716 | + void set_exact_match(bool match); |
2717 | void set_required_time(int32_t time); |
2718 | void set_required_interval(int32_t interval); |
2719 | |
2720 | @@ -153,6 +157,8 @@ |
2721 | Economy* economy_; |
2722 | DescriptionIndex index_; // the index of the ware descr |
2723 | Quantity count_; // how many do we need in total |
2724 | + bool exact_match_; // Whether a worker supply has to match exactly |
2725 | + // or if a can_act_as() comparison is good enough |
2726 | |
2727 | CallbackFn callbackfn_; // called on request success |
2728 | |
2729 | |
2730 | === modified file 'src/economy/wares_queue.cc' |
2731 | --- src/economy/wares_queue.cc 2016-08-04 15:49:05 +0000 |
2732 | +++ src/economy/wares_queue.cc 2017-01-21 14:37:18 +0000 |
2733 | @@ -33,33 +33,19 @@ |
2734 | |
2735 | namespace Widelands { |
2736 | |
2737 | -/** |
2738 | - * Pre-initialize a WaresQueue |
2739 | -*/ |
2740 | WaresQueue::WaresQueue(PlayerImmovable& init_owner, |
2741 | DescriptionIndex const init_ware, |
2742 | uint8_t const init_max_size) |
2743 | - : owner_(init_owner), |
2744 | - ware_(init_ware), |
2745 | - max_size_(init_max_size), |
2746 | - max_fill_(init_max_size), |
2747 | - filled_(0), |
2748 | - consume_interval_(0), |
2749 | - request_(nullptr), |
2750 | - callback_fn_(nullptr), |
2751 | - callback_data_(nullptr) { |
2752 | - if (ware_ != INVALID_INDEX) |
2753 | + : InputQueue(init_owner, init_ware, init_max_size, wwWARE), filled_(0) { |
2754 | + if (index_ != INVALID_INDEX) |
2755 | update(); |
2756 | } |
2757 | |
2758 | -/** |
2759 | - * Clear the queue appropriately. |
2760 | -*/ |
2761 | void WaresQueue::cleanup() { |
2762 | - assert(ware_ != INVALID_INDEX); |
2763 | + assert(index_ != INVALID_INDEX); |
2764 | |
2765 | if (filled_ && owner_.get_economy()) |
2766 | - owner_.get_economy()->remove_wares(ware_, filled_); |
2767 | + owner_.get_economy()->remove_wares(index_, filled_); |
2768 | |
2769 | filled_ = 0; |
2770 | max_size_ = 0; |
2771 | @@ -67,130 +53,51 @@ |
2772 | |
2773 | update(); |
2774 | |
2775 | - ware_ = INVALID_INDEX; |
2776 | -} |
2777 | - |
2778 | -/** |
2779 | - * Fix filled <= size and requests. |
2780 | - * You must call this after every call to set_*() |
2781 | -*/ |
2782 | -void WaresQueue::update() { |
2783 | - assert(ware_ != INVALID_INDEX); |
2784 | - |
2785 | - if (filled_ > max_size_) { |
2786 | - if (owner_.get_economy()) |
2787 | - owner_.get_economy()->remove_wares(ware_, filled_ - max_size_); |
2788 | - filled_ = max_size_; |
2789 | - } |
2790 | - |
2791 | - if (filled_ < max_fill_) { |
2792 | - if (!request_) |
2793 | - request_ = new Request(owner_, ware_, WaresQueue::request_callback, wwWARE); |
2794 | - |
2795 | - request_->set_count(max_fill_ - filled_); |
2796 | - request_->set_required_interval(consume_interval_); |
2797 | - } else { |
2798 | - delete request_; |
2799 | - request_ = nullptr; |
2800 | - } |
2801 | -} |
2802 | - |
2803 | -/** |
2804 | - * Set the callback function that is called when an item has arrived. |
2805 | -*/ |
2806 | -void WaresQueue::set_callback(CallbackFn* const fn, void* const data) { |
2807 | - callback_fn_ = fn; |
2808 | - callback_data_ = data; |
2809 | -} |
2810 | - |
2811 | -/** |
2812 | - * Called when an item arrives at the owning building. |
2813 | -*/ |
2814 | -void WaresQueue::request_callback(Game& game, |
2815 | - Request&, |
2816 | - DescriptionIndex const ware, |
2817 | + index_ = INVALID_INDEX; |
2818 | +} |
2819 | + |
2820 | +void WaresQueue::entered(DescriptionIndex index, |
2821 | #ifndef NDEBUG |
2822 | - Worker* const w, |
2823 | + Worker* worker |
2824 | #else |
2825 | - Worker*, |
2826 | + Worker* |
2827 | #endif |
2828 | - PlayerImmovable& target) { |
2829 | - WaresQueue& wq = dynamic_cast<Building&>(target).waresqueue(ware); |
2830 | +) { |
2831 | |
2832 | - assert(!w); // WaresQueue can't hold workers |
2833 | - assert(wq.filled_ < wq.max_size_); |
2834 | - assert(wq.ware_ == ware); |
2835 | + assert(worker == nullptr); // WaresQueue can't hold workers |
2836 | + assert(filled_ < max_size_); |
2837 | + assert(index_ == index); |
2838 | |
2839 | // Update |
2840 | - wq.set_filled(wq.filled_ + 1); |
2841 | - |
2842 | - if (wq.callback_fn_) |
2843 | - (*wq.callback_fn_)(game, &wq, ware, wq.callback_data_); |
2844 | + set_filled(filled_ + 1); |
2845 | } |
2846 | |
2847 | -/** |
2848 | - * Remove the wares in this queue from the given economy (used in accounting). |
2849 | -*/ |
2850 | void WaresQueue::remove_from_economy(Economy& e) { |
2851 | - if (ware_ != INVALID_INDEX) { |
2852 | - e.remove_wares(ware_, filled_); |
2853 | + if (index_ != INVALID_INDEX) { |
2854 | + e.remove_wares(index_, filled_); |
2855 | if (request_) |
2856 | request_->set_economy(nullptr); |
2857 | } |
2858 | } |
2859 | |
2860 | -/** |
2861 | - * Add the wares in this queue to the given economy (used in accounting) |
2862 | -*/ |
2863 | void WaresQueue::add_to_economy(Economy& e) { |
2864 | - if (ware_ != INVALID_INDEX) { |
2865 | - e.add_wares(ware_, filled_); |
2866 | + if (index_ != INVALID_INDEX) { |
2867 | + e.add_wares(index_, filled_); |
2868 | if (request_) |
2869 | request_->set_economy(&e); |
2870 | } |
2871 | } |
2872 | |
2873 | -/** |
2874 | - * Change size of the queue. |
2875 | - */ |
2876 | -void WaresQueue::set_max_size(const Quantity size) { |
2877 | - Quantity old_size = max_size_; |
2878 | - max_size_ = size; |
2879 | - |
2880 | - // make sure that max fill is reduced as well if the max size is decreased |
2881 | - // because this is very likely what the user wanted to only consume so |
2882 | - // and so many wares in the first place. If it is increased, keep the |
2883 | - // max fill fill as it was |
2884 | - set_max_fill(std::min(max_fill_, max_fill_ - (old_size - max_size_))); |
2885 | - |
2886 | - update(); |
2887 | -} |
2888 | - |
2889 | -/** |
2890 | - * Change the number of wares that should be available in this queue |
2891 | - * |
2892 | - * This is basically the same as setting the maximum size, |
2893 | - * but if there are more wares than that in the queue, they will not get |
2894 | - * lost (the building should drop them). |
2895 | - */ |
2896 | -void WaresQueue::set_max_fill(Quantity size) { |
2897 | - if (size > max_size_) |
2898 | - size = max_size_; |
2899 | - |
2900 | - max_fill_ = size; |
2901 | - |
2902 | - update(); |
2903 | -} |
2904 | - |
2905 | -/** |
2906 | - * Change fill status of the queue. |
2907 | - */ |
2908 | -void WaresQueue::set_filled(const Quantity filled) { |
2909 | +void WaresQueue::set_filled(Quantity filled) { |
2910 | + |
2911 | + if (filled > max_size_) |
2912 | + filled = max_size_; |
2913 | + |
2914 | if (owner_.get_economy()) { |
2915 | if (filled > filled_) |
2916 | - owner_.get_economy()->add_wares(ware_, filled - filled_); |
2917 | + owner_.get_economy()->add_wares(index_, filled - filled_); |
2918 | else if (filled < filled_) |
2919 | - owner_.get_economy()->remove_wares(ware_, filled_ - filled); |
2920 | + owner_.get_economy()->remove_wares(index_, filled_ - filled); |
2921 | } |
2922 | |
2923 | filled_ = filled; |
2924 | @@ -199,60 +106,22 @@ |
2925 | } |
2926 | |
2927 | /** |
2928 | - * Set the time between consumption of items when the owning building |
2929 | - * is consuming at full speed. |
2930 | - * |
2931 | - * This interval is merely a hint for the Supply/Request balancing code. |
2932 | -*/ |
2933 | -void WaresQueue::set_consume_interval(const uint32_t time) { |
2934 | - consume_interval_ = time; |
2935 | - |
2936 | - update(); |
2937 | -} |
2938 | - |
2939 | -/** |
2940 | * Read and write |
2941 | */ |
2942 | |
2943 | -constexpr uint16_t kCurrentPacketVersion = 2; |
2944 | +constexpr uint16_t kCurrentPacketVersion = 3; |
2945 | |
2946 | -void WaresQueue::write(FileWrite& fw, Game& game, MapObjectSaver& mos) { |
2947 | +void WaresQueue::write_child(FileWrite& fw, Game&, MapObjectSaver&) { |
2948 | fw.unsigned_16(kCurrentPacketVersion); |
2949 | |
2950 | - // Owner and callback is not saved, but this should be obvious on load. |
2951 | - fw.c_string(owner().tribe().get_ware_descr(ware_)->name().c_str()); |
2952 | - fw.signed_32(max_size_); |
2953 | - fw.signed_32(max_fill_); |
2954 | fw.signed_32(filled_); |
2955 | - fw.signed_32(consume_interval_); |
2956 | - if (request_) { |
2957 | - fw.unsigned_8(1); |
2958 | - request_->write(fw, game, mos); |
2959 | - } else |
2960 | - fw.unsigned_8(0); |
2961 | } |
2962 | |
2963 | -void WaresQueue::read(FileRead& fr, Game& game, MapObjectLoader& mol) { |
2964 | +void WaresQueue::read_child(FileRead& fr, Game&, MapObjectLoader&) { |
2965 | uint16_t const packet_version = fr.unsigned_16(); |
2966 | try { |
2967 | if (packet_version == kCurrentPacketVersion) { |
2968 | - delete request_; |
2969 | - ware_ = owner().tribe().ware_index(fr.c_string()); |
2970 | - max_size_ = fr.unsigned_32(); |
2971 | - max_fill_ = fr.signed_32(); |
2972 | filled_ = fr.unsigned_32(); |
2973 | - consume_interval_ = fr.unsigned_32(); |
2974 | - if (fr.unsigned_8()) { |
2975 | - request_ = // TODO(unknown): Change Request::read |
2976 | - new Request // to a constructor. |
2977 | - (owner_, 0, WaresQueue::request_callback, wwWORKER); |
2978 | - request_->read(fr, game, mol); |
2979 | - } else |
2980 | - request_ = nullptr; |
2981 | - |
2982 | - // Now Economy stuff. We have to add our filled items to the economy. |
2983 | - if (owner_.get_economy()) |
2984 | - add_to_economy(*owner_.get_economy()); |
2985 | } else { |
2986 | throw UnhandledVersionError("WaresQueue", packet_version, kCurrentPacketVersion); |
2987 | } |
2988 | |
2989 | === modified file 'src/economy/wares_queue.h' |
2990 | --- src/economy/wares_queue.h 2016-08-04 15:49:05 +0000 |
2991 | +++ src/economy/wares_queue.h 2017-01-21 14:37:18 +0000 |
2992 | @@ -20,6 +20,7 @@ |
2993 | #ifndef WL_ECONOMY_WARES_QUEUE_H |
2994 | #define WL_ECONOMY_WARES_QUEUE_H |
2995 | |
2996 | +#include "economy/input_queue.h" |
2997 | #include "logic/map_objects/immovable.h" |
2998 | #include "logic/widelands.h" |
2999 | |
3000 | @@ -37,67 +38,35 @@ |
3001 | /** |
3002 | * This micro storage room can hold any number of items of a fixed ware. |
3003 | */ |
3004 | -class WaresQueue { |
3005 | +class WaresQueue : public InputQueue { |
3006 | public: |
3007 | - using CallbackFn = void(Game&, WaresQueue*, DescriptionIndex ware, void* data); |
3008 | - |
3009 | WaresQueue(PlayerImmovable&, DescriptionIndex, uint8_t size); |
3010 | |
3011 | #ifndef NDEBUG |
3012 | - ~WaresQueue() { |
3013 | - assert(ware_ == INVALID_INDEX); |
3014 | + ~WaresQueue() override { |
3015 | + assert(index_ == INVALID_INDEX); |
3016 | } |
3017 | #endif |
3018 | |
3019 | - DescriptionIndex get_ware() const { |
3020 | - return ware_; |
3021 | - } |
3022 | - Quantity get_max_fill() const { |
3023 | - return max_fill_; |
3024 | - } |
3025 | - Quantity get_max_size() const { |
3026 | - return max_size_; |
3027 | - } |
3028 | - Quantity get_filled() const { |
3029 | + Quantity get_filled() const override { |
3030 | return filled_; |
3031 | } |
3032 | |
3033 | - void cleanup(); |
3034 | - |
3035 | - void set_callback(CallbackFn*, void* data); |
3036 | - |
3037 | - void remove_from_economy(Economy&); |
3038 | - void add_to_economy(Economy&); |
3039 | - |
3040 | - void set_max_size(Quantity); |
3041 | - void set_max_fill(Quantity); |
3042 | - void set_filled(Quantity); |
3043 | - void set_consume_interval(uint32_t); |
3044 | - |
3045 | - Player& owner() const { |
3046 | - return owner_.owner(); |
3047 | - } |
3048 | - |
3049 | - void read(FileRead&, Game&, MapObjectLoader&); |
3050 | - void write(FileWrite&, Game&, MapObjectSaver&); |
3051 | - |
3052 | -private: |
3053 | - static void request_callback(Game&, Request&, DescriptionIndex, Worker*, PlayerImmovable&); |
3054 | - void update(); |
3055 | - |
3056 | - PlayerImmovable& owner_; |
3057 | - DescriptionIndex ware_; ///< ware ID |
3058 | - Quantity max_size_; ///< nr of items that fit into the queue maximum |
3059 | - Quantity max_fill_; ///< nr of wares that should be ideally in this queue |
3060 | - Quantity filled_; ///< nr of items that are currently in the queue |
3061 | - |
3062 | - ///< time in ms between consumption at full speed |
3063 | - uint32_t consume_interval_; |
3064 | - |
3065 | - Request* request_; ///< currently pending request |
3066 | - |
3067 | - CallbackFn* callback_fn_; |
3068 | - void* callback_data_; |
3069 | + void cleanup() override; |
3070 | + |
3071 | + void remove_from_economy(Economy&) override; |
3072 | + void add_to_economy(Economy&) override; |
3073 | + |
3074 | + void set_filled(Quantity) override; |
3075 | + |
3076 | +protected: |
3077 | + void read_child(FileRead&, Game&, MapObjectLoader&) override; |
3078 | + void write_child(FileWrite&, Game&, MapObjectSaver&) override; |
3079 | + |
3080 | + void entered(DescriptionIndex index, Worker* worker) override; |
3081 | + |
3082 | + /// Number of items that are currently in the queue |
3083 | + Quantity filled_; |
3084 | }; |
3085 | } |
3086 | |
3087 | |
3088 | === added file 'src/economy/workers_queue.cc' |
3089 | --- src/economy/workers_queue.cc 1970-01-01 00:00:00 +0000 |
3090 | +++ src/economy/workers_queue.cc 2017-01-21 14:37:18 +0000 |
3091 | @@ -0,0 +1,196 @@ |
3092 | +/* |
3093 | + * Copyright (C) 2004-2016 by the Widelands Development Team |
3094 | + * |
3095 | + * This program is free software; you can redistribute it and/or |
3096 | + * modify it under the terms of the GNU General Public License |
3097 | + * as published by the Free Software Foundation; either version 2 |
3098 | + * of the License, or (at your option) any later version. |
3099 | + * |
3100 | + * This program is distributed in the hope that it will be useful, |
3101 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3102 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3103 | + * GNU General Public License for more details. |
3104 | + * |
3105 | + * You should have received a copy of the GNU General Public License |
3106 | + * along with this program; if not, write to the Free Software |
3107 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
3108 | + * |
3109 | + */ |
3110 | + |
3111 | +#include "economy/workers_queue.h" |
3112 | + |
3113 | +#include "base/wexception.h" |
3114 | +#include "economy/economy.h" |
3115 | +#include "economy/request.h" |
3116 | +#include "io/fileread.h" |
3117 | +#include "io/filewrite.h" |
3118 | +#include "logic/editor_game_base.h" |
3119 | +#include "logic/game.h" |
3120 | +#include "logic/map_objects/tribes/tribe_descr.h" |
3121 | +#include "logic/player.h" |
3122 | +#include "map_io/map_object_loader.h" |
3123 | +#include "map_io/map_object_saver.h" |
3124 | + |
3125 | +namespace Widelands { |
3126 | + |
3127 | +/** |
3128 | + * Pre-initialize a WorkersQueue |
3129 | +*/ |
3130 | +WorkersQueue::WorkersQueue(PlayerImmovable& init_owner, |
3131 | + DescriptionIndex const init_ware, |
3132 | + uint8_t const init_max_size) |
3133 | + : InputQueue(init_owner, init_ware, init_max_size, wwWORKER), workers_() { |
3134 | + if (index_ != INVALID_INDEX) |
3135 | + update(); |
3136 | +} |
3137 | + |
3138 | +/** |
3139 | + * Clear the queue appropriately. |
3140 | +*/ |
3141 | +void WorkersQueue::cleanup() { |
3142 | + assert(index_ != INVALID_INDEX); |
3143 | + |
3144 | + // Seems like workers don't need to be removed (done by building?) |
3145 | + workers_.clear(); |
3146 | + max_size_ = 0; |
3147 | + max_fill_ = 0; |
3148 | + |
3149 | + update(); |
3150 | + |
3151 | + index_ = INVALID_INDEX; |
3152 | +} |
3153 | + |
3154 | +/** |
3155 | + * Called when a worker arrives at the owning building. |
3156 | +*/ |
3157 | +void WorkersQueue::entered(DescriptionIndex index, Worker* worker) { |
3158 | + |
3159 | + assert(worker != nullptr); |
3160 | + assert(get_filled() < max_size_); |
3161 | + assert(index_ == index); |
3162 | + |
3163 | + EditorGameBase& egbase = owner().egbase(); |
3164 | + if (worker->get_location(egbase) != &(owner_)) { |
3165 | + worker->set_location(&(owner_)); |
3166 | + } |
3167 | + assert(worker->get_location(egbase) == &owner_); |
3168 | + |
3169 | + // Bind the worker into this house, hide him on the map |
3170 | + if (upcast(Game, game, &egbase)) { |
3171 | + worker->start_task_idle(*game, 0, -1); |
3172 | + } |
3173 | + |
3174 | + // Add worker to queue |
3175 | + workers_.push_back(worker); |
3176 | + |
3177 | + // Make sure the request count is reduced or the request is deleted. |
3178 | + update(); |
3179 | +} |
3180 | + |
3181 | +void WorkersQueue::remove_from_economy(Economy&) { |
3182 | + if (index_ != INVALID_INDEX) { |
3183 | + if (request_) { |
3184 | + request_.reset(); |
3185 | + } |
3186 | + // Removal of workers from the economy is not required, this is done by the building (or so) |
3187 | + } |
3188 | +} |
3189 | + |
3190 | +void WorkersQueue::add_to_economy(Economy&) { |
3191 | + if (index_ != INVALID_INDEX) { |
3192 | + update(); |
3193 | + } |
3194 | +} |
3195 | + |
3196 | +/** |
3197 | + * Change fill status of the queue. |
3198 | + */ |
3199 | +void WorkersQueue::set_filled(Quantity filled) { |
3200 | + if (filled > max_size_) { |
3201 | + filled = max_size_; |
3202 | + } |
3203 | + if (filled == get_filled()) |
3204 | + return; |
3205 | + |
3206 | + // Now adjust them |
3207 | + const TribeDescr& tribe = owner().tribe(); |
3208 | + const WorkerDescr* worker_descr = tribe.get_worker_descr(index_); |
3209 | + EditorGameBase& egbase = owner().egbase(); |
3210 | + upcast(Game, game, &egbase); |
3211 | + assert(game != nullptr); |
3212 | + |
3213 | + // Add workers |
3214 | + while (get_filled() < filled) { |
3215 | + // Create new worker |
3216 | + Worker& w = |
3217 | + worker_descr->create(egbase, owner(), &owner_, owner_.get_positions(egbase).front()); |
3218 | + assert(w.get_location(egbase) == &owner_); |
3219 | + w.start_task_idle(*game, 0, -1); |
3220 | + workers_.push_back(&w); |
3221 | + } |
3222 | + assert(get_filled() >= filled); |
3223 | + |
3224 | + // Remove workers |
3225 | + // Note: This might be slow (removing from start) but we want to consume |
3226 | + // the first worker in the queue first |
3227 | + while (get_filled() > filled) { |
3228 | + // Remove worker |
3229 | + assert(!workers_.empty()); |
3230 | + Worker* w = workers_.front(); |
3231 | + assert(w->get_location(egbase) == &owner_); |
3232 | + // Remove from game |
3233 | + w->schedule_destroy(*game); |
3234 | + // Remove reference from list |
3235 | + workers_.erase(workers_.begin()); |
3236 | + } |
3237 | + assert(get_filled() == filled); |
3238 | + update(); |
3239 | +} |
3240 | + |
3241 | +void WorkersQueue::set_max_fill(Quantity q) { |
3242 | + InputQueue::set_max_fill(q); |
3243 | + |
3244 | + // If requested, kick out workers |
3245 | + upcast(Game, game, &owner().egbase()); |
3246 | + while (workers_.size() > max_fill_) { |
3247 | + workers_.back()->reset_tasks(*game); |
3248 | + workers_.back()->start_task_leavebuilding(*game, true); |
3249 | + workers_.pop_back(); |
3250 | + } |
3251 | +} |
3252 | + |
3253 | +/** |
3254 | + * Read and write |
3255 | + */ |
3256 | + |
3257 | +constexpr uint16_t kCurrentPacketVersion = 3; |
3258 | + |
3259 | +void WorkersQueue::write_child(FileWrite& fw, Game&, MapObjectSaver& mos) { |
3260 | + fw.unsigned_16(kCurrentPacketVersion); |
3261 | + // Store references to the workers |
3262 | + fw.unsigned_32(workers_.size()); |
3263 | + for (Worker* w : workers_) { |
3264 | + assert(mos.is_object_known(*w)); |
3265 | + fw.unsigned_32(mos.get_object_file_index(*w)); |
3266 | + } |
3267 | +} |
3268 | + |
3269 | +void WorkersQueue::read_child(FileRead& fr, Game&, MapObjectLoader& mol) { |
3270 | + uint16_t const packet_version = fr.unsigned_16(); |
3271 | + try { |
3272 | + if (packet_version == kCurrentPacketVersion) { |
3273 | + size_t nr_workers = fr.unsigned_32(); |
3274 | + assert(nr_workers <= max_size_); |
3275 | + assert(workers_.empty()); |
3276 | + for (size_t i = 0; i < nr_workers; ++i) { |
3277 | + workers_.push_back(&mol.get<Worker>(fr.unsigned_32())); |
3278 | + } |
3279 | + assert(workers_.size() == nr_workers); |
3280 | + } else { |
3281 | + throw UnhandledVersionError("WorkersQueue", packet_version, kCurrentPacketVersion); |
3282 | + } |
3283 | + } catch (const GameDataError& e) { |
3284 | + throw GameDataError("workersqueue: %s", e.what()); |
3285 | + } |
3286 | +} |
3287 | +} |
3288 | |
3289 | === added file 'src/economy/workers_queue.h' |
3290 | --- src/economy/workers_queue.h 1970-01-01 00:00:00 +0000 |
3291 | +++ src/economy/workers_queue.h 2017-01-21 14:37:18 +0000 |
3292 | @@ -0,0 +1,75 @@ |
3293 | +/* |
3294 | + * Copyright (C) 2004-2016 by the Widelands Development Team |
3295 | + * |
3296 | + * This program is free software; you can redistribute it and/or |
3297 | + * modify it under the terms of the GNU General Public License |
3298 | + * as published by the Free Software Foundation; either version 2 |
3299 | + * of the License, or (at your option) any later version. |
3300 | + * |
3301 | + * This program is distributed in the hope that it will be useful, |
3302 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3303 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3304 | + * GNU General Public License for more details. |
3305 | + * |
3306 | + * You should have received a copy of the GNU General Public License |
3307 | + * along with this program; if not, write to the Free Software |
3308 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
3309 | + * |
3310 | + */ |
3311 | + |
3312 | +#ifndef WL_ECONOMY_WORKERS_QUEUE_H |
3313 | +#define WL_ECONOMY_WORKERS_QUEUE_H |
3314 | + |
3315 | +#include "economy/input_queue.h" |
3316 | +#include "logic/map_objects/immovable.h" |
3317 | +#include "logic/widelands.h" |
3318 | + |
3319 | +namespace Widelands { |
3320 | + |
3321 | +class Economy; |
3322 | +class EditorGameBase; |
3323 | +class Game; |
3324 | +class MapObjectLoader; |
3325 | +struct MapObjectSaver; |
3326 | +class Player; |
3327 | +class Request; |
3328 | +class Worker; |
3329 | + |
3330 | +/** |
3331 | + * This micro storage room can hold any number of items of a fixed worker. |
3332 | + */ |
3333 | +class WorkersQueue : public InputQueue { |
3334 | +public: |
3335 | + WorkersQueue(PlayerImmovable&, DescriptionIndex, uint8_t size); |
3336 | + |
3337 | +#ifndef NDEBUG |
3338 | + ~WorkersQueue() override { |
3339 | + assert(index_ == INVALID_INDEX); |
3340 | + } |
3341 | +#endif |
3342 | + |
3343 | + Quantity get_filled() const override { |
3344 | + return workers_.size(); |
3345 | + } |
3346 | + |
3347 | + void cleanup() override; |
3348 | + |
3349 | + void remove_from_economy(Economy&) override; |
3350 | + void add_to_economy(Economy&) override; |
3351 | + |
3352 | + void set_filled(Quantity) override; |
3353 | + |
3354 | + void set_max_fill(Quantity q) override; |
3355 | + |
3356 | +protected: |
3357 | + void read_child(FileRead&, Game&, MapObjectLoader&) override; |
3358 | + void write_child(FileWrite&, Game&, MapObjectSaver&) override; |
3359 | + |
3360 | + void entered(DescriptionIndex index, Worker* worker) override; |
3361 | + |
3362 | + /// The workers currently in the queue |
3363 | + std::vector<Worker*> workers_; |
3364 | +}; |
3365 | +} |
3366 | + |
3367 | +#endif // WL_ECONOMY_WORKERS_QUEUE_H |
3368 | |
3369 | === modified file 'src/logic/cmd_luacoroutine.cc' |
3370 | --- src/logic/cmd_luacoroutine.cc 2017-01-08 15:42:04 +0000 |
3371 | +++ src/logic/cmd_luacoroutine.cc 2017-01-21 14:37:18 +0000 |
3372 | @@ -49,7 +49,7 @@ |
3373 | } catch (LuaError& e) { |
3374 | log("Error in Lua Coroutine\n"); |
3375 | log("%s\n", e.what()); |
3376 | - log("Send message to all players and pause game"); |
3377 | + log("Send message to all players and pause game\n"); |
3378 | for (int i = 1; i <= game.map().get_nrplayers(); i++) { |
3379 | Widelands::Message& msg = *new Widelands::Message( |
3380 | Message::Type::kGameLogic, game.get_gametime(), "Coroutine", |
3381 | |
3382 | === modified file 'src/logic/game.cc' |
3383 | --- src/logic/game.cc 2017-01-08 15:42:04 +0000 |
3384 | +++ src/logic/game.cc 2017-01-21 14:37:18 +0000 |
3385 | @@ -704,11 +704,12 @@ |
3386 | *new CmdSetWarePriority(get_gametime(), imm.owner().player_number(), imm, type, index, prio)); |
3387 | } |
3388 | |
3389 | -void Game::send_player_set_ware_max_fill(PlayerImmovable& imm, |
3390 | - DescriptionIndex const index, |
3391 | - uint32_t const max_fill) { |
3392 | - send_player_command( |
3393 | - *new CmdSetWareMaxFill(get_gametime(), imm.owner().player_number(), imm, index, max_fill)); |
3394 | +void Game::send_player_set_input_max_fill(PlayerImmovable& imm, |
3395 | + DescriptionIndex const index, |
3396 | + WareWorker type, |
3397 | + uint32_t const max_fill) { |
3398 | + send_player_command(*new CmdSetInputMaxFill( |
3399 | + get_gametime(), imm.owner().player_number(), imm, index, type, max_fill)); |
3400 | } |
3401 | |
3402 | void Game::send_player_change_training_options(TrainingSite& ts, |
3403 | |
3404 | === modified file 'src/logic/game.h' |
3405 | --- src/logic/game.h 2016-08-04 15:49:05 +0000 |
3406 | +++ src/logic/game.h 2017-01-21 14:37:18 +0000 |
3407 | @@ -198,7 +198,10 @@ |
3408 | int32_t type, |
3409 | DescriptionIndex index, |
3410 | int32_t prio); |
3411 | - void send_player_set_ware_max_fill(PlayerImmovable&, DescriptionIndex index, uint32_t); |
3412 | + void send_player_set_input_max_fill(PlayerImmovable&, |
3413 | + DescriptionIndex index, |
3414 | + WareWorker type, |
3415 | + uint32_t); |
3416 | void send_player_change_training_options(TrainingSite&, TrainingAttribute, int32_t); |
3417 | void send_player_drop_soldier(Building&, int32_t); |
3418 | void send_player_change_soldier_capacity(Building&, int32_t); |
3419 | |
3420 | === modified file 'src/logic/map_objects/immovable.h' |
3421 | --- src/logic/map_objects/immovable.h 2016-12-18 17:02:44 +0000 |
3422 | +++ src/logic/map_objects/immovable.h 2017-01-21 14:37:18 +0000 |
3423 | @@ -357,7 +357,7 @@ |
3424 | /** |
3425 | * \return a list of workers that are currently located at this |
3426 | * immovable. This is not the same as the list of production |
3427 | - * workers returned by \ref ProductionSite::get_production_workers |
3428 | + * workers returned by \ref ProductionSite::working_positions |
3429 | */ |
3430 | const Workers& get_workers() const { |
3431 | return workers_; |
3432 | |
3433 | === modified file 'src/logic/map_objects/tribes/building.cc' |
3434 | --- src/logic/map_objects/tribes/building.cc 2016-12-15 20:39:17 +0000 |
3435 | +++ src/logic/map_objects/tribes/building.cc 2017-01-21 14:37:18 +0000 |
3436 | @@ -30,7 +30,10 @@ |
3437 | #include "base/macros.h" |
3438 | #include "base/wexception.h" |
3439 | #include "economy/flag.h" |
3440 | +#include "economy/input_queue.h" |
3441 | #include "economy/request.h" |
3442 | +#include "economy/wares_queue.h" |
3443 | +#include "economy/workers_queue.h" |
3444 | #include "graphic/graphic.h" |
3445 | #include "graphic/rendertarget.h" |
3446 | #include "io/filesystem/filesystem.h" |
3447 | @@ -476,10 +479,22 @@ |
3448 | return result; |
3449 | } |
3450 | |
3451 | +InputQueue& Building::inputqueue(DescriptionIndex const wi, WareWorker const t) { |
3452 | + if (t == wwWARE) { |
3453 | + return waresqueue(wi); |
3454 | + } else { |
3455 | + return workersqueue(wi); |
3456 | + } |
3457 | +} |
3458 | + |
3459 | WaresQueue& Building::waresqueue(DescriptionIndex const wi) { |
3460 | throw wexception("%s (%u) has no WaresQueue for %u", descr().name().c_str(), serial(), wi); |
3461 | } |
3462 | |
3463 | +WorkersQueue& Building::workersqueue(DescriptionIndex const wi) { |
3464 | + throw wexception("%s (%u) has no WorkersQueue for %u", descr().name().c_str(), serial(), wi); |
3465 | +} |
3466 | + |
3467 | /* |
3468 | =============== |
3469 | This function is called by workers in the buildingwork task. |
3470 | |
3471 | === modified file 'src/logic/map_objects/tribes/building.h' |
3472 | --- src/logic/map_objects/tribes/building.h 2016-11-03 07:20:57 +0000 |
3473 | +++ src/logic/map_objects/tribes/building.h 2017-01-21 14:37:18 +0000 |
3474 | @@ -49,7 +49,9 @@ |
3475 | struct Flag; |
3476 | struct Message; |
3477 | class TribeDescr; |
3478 | +class InputQueue; |
3479 | class WaresQueue; |
3480 | +class WorkersQueue; |
3481 | |
3482 | class Building; |
3483 | |
3484 | @@ -235,9 +237,15 @@ |
3485 | return statistics_string_; |
3486 | } |
3487 | |
3488 | + /// \returns the queue for the matching ware or worker type or \throws WException. |
3489 | + virtual InputQueue& inputqueue(DescriptionIndex, WareWorker); |
3490 | + |
3491 | /// \returns the queue for a ware type or \throws WException. |
3492 | virtual WaresQueue& waresqueue(DescriptionIndex); |
3493 | |
3494 | + /// \returns the queue for a worker type or \throws WException. |
3495 | + virtual WorkersQueue& workersqueue(DescriptionIndex); |
3496 | + |
3497 | virtual bool burn_on_destroy(); |
3498 | void destroy(EditorGameBase&) override; |
3499 | |
3500 | |
3501 | === modified file 'src/logic/map_objects/tribes/constructionsite.cc' |
3502 | --- src/logic/map_objects/tribes/constructionsite.cc 2016-12-01 17:35:34 +0000 |
3503 | +++ src/logic/map_objects/tribes/constructionsite.cc 2017-01-21 14:37:18 +0000 |
3504 | @@ -82,7 +82,7 @@ |
3505 | */ |
3506 | WaresQueue& ConstructionSite::waresqueue(DescriptionIndex const wi) { |
3507 | for (WaresQueue* ware : wares_) { |
3508 | - if (ware->get_ware() == wi) { |
3509 | + if (ware->get_index() == wi) { |
3510 | return *ware; |
3511 | } |
3512 | } |
3513 | @@ -240,8 +240,8 @@ |
3514 | WaresQueue* queue = iqueue; |
3515 | if (queue->get_filled() > queue->get_max_fill()) { |
3516 | queue->set_filled(queue->get_filled() - 1); |
3517 | - const WareDescr& wd = *owner().tribe().get_ware_descr(queue->get_ware()); |
3518 | - WareInstance& ware = *new WareInstance(queue->get_ware(), &wd); |
3519 | + const WareDescr& wd = *owner().tribe().get_ware_descr(queue->get_index()); |
3520 | + WareInstance& ware = *new WareInstance(queue->get_index(), &wd); |
3521 | ware.init(game); |
3522 | worker.start_task_dropoff(game, ware); |
3523 | return true; |
3524 | @@ -260,7 +260,7 @@ |
3525 | wq.set_max_size(wq.get_max_size() - 1); |
3526 | |
3527 | // Update consumption statistic |
3528 | - owner().ware_consumed(wq.get_ware(), 1); |
3529 | + owner().ware_consumed(wq.get_index(), 1); |
3530 | |
3531 | working_ = true; |
3532 | work_steptime_ = game.get_gametime() + CONSTRUCTIONSITE_STEP_TIME; |
3533 | @@ -282,13 +282,11 @@ |
3534 | |
3535 | /* |
3536 | =============== |
3537 | -Called by WaresQueue code when an ware has arrived |
3538 | +Called by InputQueue code when an ware has arrived |
3539 | =============== |
3540 | */ |
3541 | -void ConstructionSite::wares_queue_callback(Game& game, |
3542 | - WaresQueue*, |
3543 | - DescriptionIndex, |
3544 | - void* const data) { |
3545 | +void ConstructionSite::wares_queue_callback( |
3546 | + Game& game, InputQueue*, DescriptionIndex, Worker*, void* const data) { |
3547 | ConstructionSite& cs = *static_cast<ConstructionSite*>(data); |
3548 | |
3549 | if (!cs.working_) |
3550 | |
3551 | === modified file 'src/logic/map_objects/tribes/constructionsite.h' |
3552 | --- src/logic/map_objects/tribes/constructionsite.h 2016-11-03 07:20:57 +0000 |
3553 | +++ src/logic/map_objects/tribes/constructionsite.h 2017-01-21 14:37:18 +0000 |
3554 | @@ -112,7 +112,7 @@ |
3555 | } |
3556 | void create_options_window(InteractiveGameBase&, UI::Window*& registry) override; |
3557 | |
3558 | - static void wares_queue_callback(Game&, WaresQueue*, DescriptionIndex, void* data); |
3559 | + static void wares_queue_callback(Game&, InputQueue*, DescriptionIndex, Worker*, void* data); |
3560 | |
3561 | void draw(uint32_t gametime, |
3562 | TextToDraw draw_text, |
3563 | |
3564 | === modified file 'src/logic/map_objects/tribes/dismantlesite.cc' |
3565 | --- src/logic/map_objects/tribes/dismantlesite.cc 2016-12-01 17:35:34 +0000 |
3566 | +++ src/logic/map_objects/tribes/dismantlesite.cc 2017-01-21 14:37:18 +0000 |
3567 | @@ -184,10 +184,10 @@ |
3568 | wq.set_max_size(wq.get_max_size() - 1); |
3569 | |
3570 | // Update statistics |
3571 | - owner().ware_produced(wq.get_ware()); |
3572 | + owner().ware_produced(wq.get_index()); |
3573 | |
3574 | - const WareDescr& wd = *owner().tribe().get_ware_descr(wq.get_ware()); |
3575 | - WareInstance& ware = *new WareInstance(wq.get_ware(), &wd); |
3576 | + const WareDescr& wd = *owner().tribe().get_ware_descr(wq.get_index()); |
3577 | + WareInstance& ware = *new WareInstance(wq.get_index(), &wd); |
3578 | ware.init(game); |
3579 | worker.start_task_dropoff(game, ware); |
3580 | |
3581 | |
3582 | === modified file 'src/logic/map_objects/tribes/production_program.cc' |
3583 | --- src/logic/map_objects/tribes/production_program.cc 2016-12-03 13:32:28 +0000 |
3584 | +++ src/logic/map_objects/tribes/production_program.cc 2017-01-21 14:37:18 +0000 |
3585 | @@ -32,6 +32,7 @@ |
3586 | #include "economy/economy.h" |
3587 | #include "economy/flag.h" |
3588 | #include "economy/wares_queue.h" |
3589 | +#include "economy/workers_queue.h" |
3590 | #include "graphic/graphic.h" |
3591 | #include "helper.h" |
3592 | #include "io/filesystem/layered_filesystem.h" |
3593 | @@ -200,8 +201,9 @@ |
3594 | void ProductionProgram::parse_ware_type_group(char*& parameters, |
3595 | WareTypeGroup& group, |
3596 | const Tribes& tribes, |
3597 | - const BillOfMaterials& inputs) { |
3598 | - std::set<DescriptionIndex>::iterator last_insert_pos = group.first.end(); |
3599 | + const BillOfMaterials& input_wares, |
3600 | + const BillOfMaterials& input_workers) { |
3601 | + std::set<std::pair<DescriptionIndex, WareWorker>>::iterator last_insert_pos = group.first.end(); |
3602 | uint8_t count = 1; |
3603 | uint8_t count_max = 0; |
3604 | for (;;) { |
3605 | @@ -211,25 +213,41 @@ |
3606 | char const terminator = *parameters; |
3607 | *parameters = '\0'; |
3608 | |
3609 | - DescriptionIndex const ware_index = tribes.safe_ware_index(ware); |
3610 | + // Try as ware |
3611 | + WareWorker type = wwWARE; |
3612 | + const BillOfMaterials* input_list = &input_wares; |
3613 | + DescriptionIndex ware_index = tribes.ware_index(ware); |
3614 | + if (!tribes.ware_exists(ware_index)) { |
3615 | + ware_index = tribes.worker_index(ware); |
3616 | + if (tribes.worker_exists(ware_index)) { |
3617 | + // It is a worker |
3618 | + type = wwWORKER; |
3619 | + input_list = &input_workers; |
3620 | + } else { |
3621 | + throw GameDataError("Unknown ware or worker type \"%s\"", ware); |
3622 | + } |
3623 | + } |
3624 | |
3625 | - for (BillOfMaterials::const_iterator input_it = inputs.begin(); input_it != inputs.end(); |
3626 | - ++input_it) { |
3627 | - if (input_it == inputs.end()) { |
3628 | - throw GameDataError("%s is not declared as an input (\"%s=<count>\" was not " |
3629 | - "found in the [inputs] section)", |
3630 | - ware, ware); |
3631 | - } else if (input_it->first == ware_index) { |
3632 | - count_max += input_it->second; |
3633 | + bool found = false; |
3634 | + for (const WareAmount& input : *input_list) { |
3635 | + if (input.first == ware_index) { |
3636 | + count_max += input.second; |
3637 | + found = true; |
3638 | break; |
3639 | } |
3640 | } |
3641 | + if (!found) { |
3642 | + throw GameDataError("%s is not declared as an input (\"%s=<count>\" was not " |
3643 | + "found in the [inputs] section)", |
3644 | + ware, ware); |
3645 | + } |
3646 | |
3647 | - if (group.first.size() && ware_index <= *group.first.begin()) |
3648 | + if (group.first.size() && ware_index <= group.first.begin()->first) |
3649 | throw GameDataError("wrong order of ware types within group: ware type %s appears " |
3650 | "after ware type %s (fix order!)", |
3651 | - ware, tribes.get_ware_descr(*group.first.begin())->name().c_str()); |
3652 | - last_insert_pos = group.first.insert(last_insert_pos, ware_index); |
3653 | + ware, |
3654 | + tribes.get_ware_descr(group.first.begin()->first)->name().c_str()); |
3655 | + last_insert_pos = group.first.insert(last_insert_pos, std::make_pair(ware_index, type)); |
3656 | *parameters = terminator; |
3657 | switch (terminator) { |
3658 | case ':': { |
3659 | @@ -331,7 +349,7 @@ |
3660 | const ProductionSiteDescr& descr, |
3661 | const Tribes& tribes) { |
3662 | try { |
3663 | - parse_ware_type_group(parameters, group, tribes, descr.inputs()); |
3664 | + parse_ware_type_group(parameters, group, tribes, descr.input_wares(), descr.input_workers()); |
3665 | } catch (const WException& e) { |
3666 | throw GameDataError("has ware_type1[,ware_type2[,...]][:N]: %s", e.what()); |
3667 | } |
3668 | @@ -339,11 +357,14 @@ |
3669 | bool ProductionProgram::ActReturn::SiteHas::evaluate(const ProductionSite& ps) const { |
3670 | uint8_t count = group.second; |
3671 | for (WaresQueue* ip_queue : ps.warequeues()) { |
3672 | - if (group.first.count(ip_queue->get_ware())) { |
3673 | - uint8_t const filled = ip_queue->get_filled(); |
3674 | - if (count <= filled) |
3675 | - return true; |
3676 | - count -= filled; |
3677 | + for (const auto& ware_type : group.first) { |
3678 | + if (ware_type.first == ip_queue->get_index() && ware_type.second == wwWARE) { |
3679 | + uint8_t const filled = ip_queue->get_filled(); |
3680 | + if (count <= filled) |
3681 | + return true; |
3682 | + count -= filled; |
3683 | + break; |
3684 | + } |
3685 | } |
3686 | } |
3687 | return false; |
3688 | @@ -351,8 +372,12 @@ |
3689 | |
3690 | std::string ProductionProgram::ActReturn::SiteHas::description(const Tribes& tribes) const { |
3691 | std::vector<std::string> condition_list; |
3692 | - for (const DescriptionIndex& temp_ware : group.first) { |
3693 | - condition_list.push_back(tribes.get_ware_descr(temp_ware)->descname()); |
3694 | + for (const auto& entry : group.first) { |
3695 | + if (entry.second == wwWARE) { |
3696 | + condition_list.push_back(tribes.get_ware_descr(entry.first)->descname()); |
3697 | + } else { |
3698 | + condition_list.push_back(tribes.get_worker_descr(entry.first)->descname()); |
3699 | + } |
3700 | } |
3701 | std::string condition = i18n::localize_list(condition_list, i18n::ConcatenateWith::AND); |
3702 | if (1 < group.second) { |
3703 | @@ -373,8 +398,12 @@ |
3704 | std::string |
3705 | ProductionProgram::ActReturn::SiteHas::description_negation(const Tribes& tribes) const { |
3706 | std::vector<std::string> condition_list; |
3707 | - for (const DescriptionIndex& temp_ware : group.first) { |
3708 | - condition_list.push_back(tribes.get_ware_descr(temp_ware)->descname()); |
3709 | + for (const auto& entry : group.first) { |
3710 | + if (entry.second == wwWARE) { |
3711 | + condition_list.push_back(tribes.get_ware_descr(entry.first)->descname()); |
3712 | + } else { |
3713 | + condition_list.push_back(tribes.get_worker_descr(entry.first)->descname()); |
3714 | + } |
3715 | } |
3716 | std::string condition = i18n::localize_list(condition_list, i18n::ConcatenateWith::AND); |
3717 | if (1 < group.second) { |
3718 | @@ -759,13 +788,14 @@ |
3719 | const Tribes& tribes) { |
3720 | try { |
3721 | for (;;) { |
3722 | - consumed_wares_.resize(consumed_wares_.size() + 1); |
3723 | - parse_ware_type_group(parameters, *consumed_wares_.rbegin(), tribes, descr.inputs()); |
3724 | + consumed_wares_workers_.resize(consumed_wares_workers_.size() + 1); |
3725 | + parse_ware_type_group(parameters, *consumed_wares_workers_.rbegin(), tribes, descr.input_wares(), |
3726 | + descr.input_workers()); |
3727 | if (!*parameters) |
3728 | break; |
3729 | force_skip(parameters); |
3730 | } |
3731 | - if (consumed_wares_.empty()) { |
3732 | + if (consumed_wares_workers_.empty()) { |
3733 | throw GameDataError("expected ware_type1[,ware_type2[,...]][:N] ..."); |
3734 | } |
3735 | } catch (const WException& e) { |
3736 | @@ -775,38 +805,76 @@ |
3737 | |
3738 | void ProductionProgram::ActConsume::execute(Game& game, ProductionSite& ps) const { |
3739 | std::vector<WaresQueue*> const warequeues = ps.warequeues(); |
3740 | - size_t const nr_warequeues = warequeues.size(); |
3741 | - std::vector<uint8_t> consumption_quantities(nr_warequeues, 0); |
3742 | + std::vector<WorkersQueue*> const workerqueues = ps.workerqueues(); |
3743 | + std::vector<uint8_t> consumption_quantities_wares(warequeues.size(), 0); |
3744 | + std::vector<uint8_t> consumption_quantities_workers(workerqueues.size(), 0); |
3745 | |
3746 | - Groups l_groups = consumed_wares_; // make a copy for local modification |
3747 | + Groups l_groups = consumed_wares_workers_; // make a copy for local modification |
3748 | |
3749 | // Iterate over all input queues and see how much we should consume from |
3750 | // each of them. |
3751 | - for (size_t i = 0; i < nr_warequeues; ++i) { |
3752 | - DescriptionIndex const ware_type = warequeues[i]->get_ware(); |
3753 | + bool found; |
3754 | + for (size_t i = 0; i < warequeues.size(); ++i) { |
3755 | + DescriptionIndex const ware_type = warequeues[i]->get_index(); |
3756 | uint8_t nr_available = warequeues[i]->get_filled(); |
3757 | - consumption_quantities[i] = 0; |
3758 | + consumption_quantities_wares[i] = 0; |
3759 | |
3760 | // Iterate over all consume groups and see if they want us to consume |
3761 | // any thing from the currently considered input queue. |
3762 | - for (Groups::iterator it = l_groups.begin(); it != l_groups.end();) |
3763 | - if (it->first.count(ware_type)) { |
3764 | - if (it->second <= nr_available) { |
3765 | - // There are enough wares of the currently considered type |
3766 | - // to fulfill the requirements of the current group. We can |
3767 | - // therefore erase the group. |
3768 | - consumption_quantities[i] += it->second; |
3769 | - nr_available -= it->second; |
3770 | - it = l_groups.erase(it); |
3771 | - // No increment here, erase moved next element to the position |
3772 | - // pointed to by it. |
3773 | - } else { |
3774 | - consumption_quantities[i] += nr_available; |
3775 | - it->second -= nr_available; |
3776 | - ++it; // Now check if the next group includes this ware type. |
3777 | - } |
3778 | - } else |
3779 | - ++it; |
3780 | + for (Groups::iterator it = l_groups.begin(); it != l_groups.end();) { |
3781 | + found = false; |
3782 | + for (auto ware_it = it->first.begin(); ware_it != it->first.end(); ware_it++) { |
3783 | + if (ware_it->first == ware_type && ware_it->second == wwWARE) { |
3784 | + found = true; |
3785 | + if (it->second <= nr_available) { |
3786 | + // There are enough wares of the currently considered type |
3787 | + // to fulfill the requirements of the current group. We can |
3788 | + // therefore erase the group. |
3789 | + consumption_quantities_wares[i] += it->second; |
3790 | + nr_available -= it->second; |
3791 | + it = l_groups.erase(it); |
3792 | + // No increment here, erase moved next element to the position |
3793 | + // pointed to by it. |
3794 | + } else { |
3795 | + consumption_quantities_wares[i] += nr_available; |
3796 | + it->second -= nr_available; |
3797 | + ++it; // Now check if the next group includes this ware type. |
3798 | + } |
3799 | + break; |
3800 | + } |
3801 | + } |
3802 | + // group does not request ware |
3803 | + if (!found) |
3804 | + ++it; |
3805 | + } |
3806 | + } |
3807 | + |
3808 | + // Same for workers |
3809 | + for (size_t i = 0; i < workerqueues.size(); ++i) { |
3810 | + DescriptionIndex const worker_type = workerqueues[i]->get_index(); |
3811 | + uint8_t nr_available = workerqueues[i]->get_filled(); |
3812 | + consumption_quantities_workers[i] = 0; |
3813 | + |
3814 | + for (Groups::iterator it = l_groups.begin(); it != l_groups.end();) { |
3815 | + found = false; |
3816 | + for (auto worker_it = it->first.begin(); worker_it != it->first.end(); worker_it++) { |
3817 | + if (worker_it->first == worker_type && worker_it->second == wwWORKER) { |
3818 | + found = true; |
3819 | + if (it->second <= nr_available) { |
3820 | + consumption_quantities_workers[i] += it->second; |
3821 | + nr_available -= it->second; |
3822 | + it = l_groups.erase(it); |
3823 | + } else { |
3824 | + consumption_quantities_workers[i] += nr_available; |
3825 | + it->second -= nr_available; |
3826 | + ++it; |
3827 | + } |
3828 | + break; |
3829 | + } |
3830 | + } |
3831 | + if (!found) |
3832 | + ++it; |
3833 | + } |
3834 | } |
3835 | |
3836 | // "Did not start working because .... is/are missing" |
3837 | @@ -818,8 +886,12 @@ |
3838 | assert(group.first.size()); |
3839 | |
3840 | std::vector<std::string> ware_list; |
3841 | - for (const DescriptionIndex& ware : group.first) { |
3842 | - ware_list.push_back(tribe.get_ware_descr(ware)->descname()); |
3843 | + for (const auto& entry : group.first) { |
3844 | + if (entry.second == wwWARE) { |
3845 | + ware_list.push_back(tribe.get_ware_descr(entry.first)->descname()); |
3846 | + } else { |
3847 | + ware_list.push_back(tribe.get_worker_descr(entry.first)->descname()); |
3848 | + } |
3849 | } |
3850 | std::string ware_string = i18n::localize_list(ware_list, i18n::ConcatenateWith::OR); |
3851 | |
3852 | @@ -862,14 +934,21 @@ |
3853 | ps.set_production_result(result_string); |
3854 | return ps.program_end(game, Failed); |
3855 | } else { // we fulfilled all consumption requirements |
3856 | - for (size_t i = 0; i < nr_warequeues; ++i) |
3857 | - if (uint8_t const q = consumption_quantities[i]) { |
3858 | + for (size_t i = 0; i < warequeues.size(); ++i) { |
3859 | + if (uint8_t const q = consumption_quantities_wares[i]) { |
3860 | assert(q <= warequeues[i]->get_filled()); |
3861 | warequeues[i]->set_filled(warequeues[i]->get_filled() - q); |
3862 | |
3863 | - // Update consumption statistic |
3864 | - ps.owner().ware_consumed(warequeues[i]->get_ware(), q); |
3865 | - } |
3866 | + // Update consumption statistics |
3867 | + ps.owner().ware_consumed(warequeues[i]->get_index(), q); |
3868 | + } |
3869 | + } |
3870 | + for (size_t i = 0; i < workerqueues.size(); ++i) { |
3871 | + if (uint8_t const q = consumption_quantities_workers[i]) { |
3872 | + assert(q <= workerqueues[i]->get_filled()); |
3873 | + workerqueues[i]->set_filled(workerqueues[i]->get_filled() - q); |
3874 | + } |
3875 | + } |
3876 | return ps.program_step(game); |
3877 | } |
3878 | } |
3879 | @@ -1532,7 +1611,7 @@ |
3880 | |
3881 | // Second step: give ware to worker |
3882 | WareInstance* ware = |
3883 | - new WareInstance(wq->get_ware(), game.tribes().get_ware_descr(wq->get_ware())); |
3884 | + new WareInstance(wq->get_index(), game.tribes().get_ware_descr(wq->get_index())); |
3885 | ware->init(game); |
3886 | worker.set_carried_ware(game, ware); |
3887 | wq->set_filled(wq->get_filled() - 1); |
3888 | @@ -1619,8 +1698,8 @@ |
3889 | } |
3890 | |
3891 | const ProductionProgram::Action& action = *actions_.back().get(); |
3892 | - for (const auto& group : action.consumed_wares()) { |
3893 | - consumed_wares_.push_back(group); |
3894 | + for (const auto& group : action.consumed_wares_workers()) { |
3895 | + consumed_wares_workers_.push_back(group); |
3896 | } |
3897 | // Add produced wares. If the ware already exists, increase the amount |
3898 | for (const auto& ware : action.produced_wares()) { |
3899 | @@ -1658,8 +1737,8 @@ |
3900 | return *actions_.at(idx).get(); |
3901 | } |
3902 | |
3903 | -const ProductionProgram::Groups& ProductionProgram::consumed_wares() const { |
3904 | - return consumed_wares_; |
3905 | +const ProductionProgram::Groups& ProductionProgram::consumed_wares_workers() const { |
3906 | + return consumed_wares_workers_; |
3907 | } |
3908 | const Buildcost& ProductionProgram::produced_wares() const { |
3909 | return produced_wares_; |
3910 | |
3911 | === modified file 'src/logic/map_objects/tribes/production_program.h' |
3912 | --- src/logic/map_objects/tribes/production_program.h 2016-08-04 15:49:05 +0000 |
3913 | +++ src/logic/map_objects/tribes/production_program.h 2017-01-21 14:37:18 +0000 |
3914 | @@ -52,7 +52,7 @@ |
3915 | struct ProductionProgram { |
3916 | |
3917 | /// A group of ware types with a count. |
3918 | - using WareTypeGroup = std::pair<std::set<DescriptionIndex>, uint8_t>; |
3919 | + using WareTypeGroup = std::pair<std::set<std::pair<DescriptionIndex, WareWorker>>, uint8_t>; |
3920 | using Groups = std::vector<WareTypeGroup>; |
3921 | |
3922 | /// Can be executed on a ProductionSite. |
3923 | @@ -76,8 +76,8 @@ |
3924 | */ |
3925 | virtual void building_work_failed(Game&, ProductionSite&, Worker&) const; |
3926 | |
3927 | - const Groups& consumed_wares() const { |
3928 | - return consumed_wares_; |
3929 | + const Groups& consumed_wares_workers() const { |
3930 | + return consumed_wares_workers_; |
3931 | } |
3932 | const BillOfMaterials& produced_wares() const { |
3933 | return produced_wares_; |
3934 | @@ -87,7 +87,7 @@ |
3935 | } |
3936 | |
3937 | protected: |
3938 | - Groups consumed_wares_; |
3939 | + Groups consumed_wares_workers_; |
3940 | BillOfMaterials produced_wares_; |
3941 | BillOfMaterials recruited_workers_; |
3942 | |
3943 | @@ -100,7 +100,8 @@ |
3944 | static void parse_ware_type_group(char*& parameters, |
3945 | WareTypeGroup& group, |
3946 | const Tribes& tribes, |
3947 | - const BillOfMaterials& inputs); |
3948 | + const BillOfMaterials& input_wares, |
3949 | + const BillOfMaterials& input_workers); |
3950 | |
3951 | /// Returns from the program. |
3952 | /// |
3953 | @@ -540,7 +541,7 @@ |
3954 | size_t size() const; |
3955 | const ProductionProgram::Action& operator[](size_t const idx) const; |
3956 | |
3957 | - const ProductionProgram::Groups& consumed_wares() const; |
3958 | + const ProductionProgram::Groups& consumed_wares_workers() const; |
3959 | const Buildcost& produced_wares() const; |
3960 | const Buildcost& recruited_workers() const; |
3961 | |
3962 | @@ -548,7 +549,7 @@ |
3963 | std::string name_; |
3964 | std::string descname_; |
3965 | std::vector<std::unique_ptr<Action>> actions_; |
3966 | - ProductionProgram::Groups consumed_wares_; |
3967 | + ProductionProgram::Groups consumed_wares_workers_; |
3968 | Buildcost produced_wares_; |
3969 | Buildcost recruited_workers_; |
3970 | }; |
3971 | |
3972 | === modified file 'src/logic/map_objects/tribes/productionsite.cc' |
3973 | --- src/logic/map_objects/tribes/productionsite.cc 2016-12-18 17:02:44 +0000 |
3974 | +++ src/logic/map_objects/tribes/productionsite.cc 2017-01-21 14:37:18 +0000 |
3975 | @@ -30,6 +30,7 @@ |
3976 | #include "economy/request.h" |
3977 | #include "economy/ware_instance.h" |
3978 | #include "economy/wares_queue.h" |
3979 | +#include "economy/workers_queue.h" |
3980 | #include "graphic/text_constants.h" |
3981 | #include "logic/editor_game_base.h" |
3982 | #include "logic/game.h" |
3983 | @@ -117,16 +118,26 @@ |
3984 | if (amount < 1 || 255 < amount) { |
3985 | throw wexception("amount is out of range 1 .. 255"); |
3986 | } |
3987 | - DescriptionIndex const idx = egbase.tribes().ware_index(ware_name); |
3988 | + DescriptionIndex idx = egbase.tribes().ware_index(ware_name); |
3989 | if (egbase.tribes().ware_exists(idx)) { |
3990 | - for (const auto& temp_inputs : inputs()) { |
3991 | + for (const auto& temp_inputs : input_wares()) { |
3992 | if (temp_inputs.first == idx) { |
3993 | throw wexception("duplicated"); |
3994 | } |
3995 | } |
3996 | - inputs_.push_back(WareAmount(idx, amount)); |
3997 | + input_wares_.push_back(WareAmount(idx, amount)); |
3998 | } else { |
3999 | - throw wexception("tribes do not define a ware type with this name"); |
4000 | + idx = egbase.tribes().worker_index(ware_name); |
4001 | + if (egbase.tribes().worker_exists(idx)) { |
4002 | + for (const auto& temp_inputs : input_workers()) { |
4003 | + if (temp_inputs.first == idx) { |
4004 | + throw wexception("duplicated"); |
4005 | + } |
4006 | + } |
4007 | + input_workers_.push_back(WareAmount(idx, amount)); |
4008 | + } else { |
4009 | + throw wexception("tribes do not define a ware or worker type with this name"); |
4010 | + } |
4011 | } |
4012 | } catch (const WException& e) { |
4013 | throw wexception("input \"%s=%d\": %s", ware_name.c_str(), amount, e.what()); |
4014 | @@ -316,14 +327,25 @@ |
4015 | } |
4016 | |
4017 | WaresQueue& ProductionSite::waresqueue(DescriptionIndex const wi) { |
4018 | - for (WaresQueue* ip_queue : input_queues_) { |
4019 | - if (ip_queue->get_ware() == wi) { |
4020 | + for (WaresQueue* ip_queue : input_ware_queues_) { |
4021 | + if (ip_queue->get_index() == wi) { |
4022 | return *ip_queue; |
4023 | } |
4024 | } |
4025 | throw wexception("%s (%u) has no WaresQueue for %u", descr().name().c_str(), serial(), wi); |
4026 | } |
4027 | |
4028 | +WorkersQueue& ProductionSite::workersqueue(DescriptionIndex const wi) { |
4029 | + // Check for perfect match |
4030 | + for (WorkersQueue* ip_queue : input_worker_queues_) { |
4031 | + if (ip_queue->get_index() == wi) { |
4032 | + return *ip_queue; |
4033 | + } |
4034 | + } |
4035 | + // Only check for perfect matches since they are requested by the queue |
4036 | + throw wexception("%s (%u) has no WorkersQueue for %u", descr().name().c_str(), serial(), wi); |
4037 | +} |
4038 | + |
4039 | /** |
4040 | * Calculate statistic. |
4041 | */ |
4042 | @@ -391,10 +413,17 @@ |
4043 | void ProductionSite::init(EditorGameBase& egbase) { |
4044 | Building::init(egbase); |
4045 | |
4046 | - const BillOfMaterials& inputs = descr().inputs(); |
4047 | - input_queues_.resize(inputs.size()); |
4048 | - for (WareRange i(inputs); i; ++i) |
4049 | - input_queues_[i.i] = new WaresQueue(*this, i.current->first, i.current->second); |
4050 | + const BillOfMaterials& input_wares = descr().input_wares(); |
4051 | + input_ware_queues_.resize(input_wares.size()); |
4052 | + for (WareRange i(input_wares); i; ++i) { |
4053 | + input_ware_queues_[i.i] = new WaresQueue(*this, i.current->first, i.current->second); |
4054 | + } |
4055 | + |
4056 | + const BillOfMaterials& input_workers = descr().input_workers(); |
4057 | + input_worker_queues_.resize(input_workers.size()); |
4058 | + for (WareRange i(input_workers); i; ++i) { |
4059 | + input_worker_queues_[i.i] = new WorkersQueue(*this, i.current->first, i.current->second); |
4060 | + } |
4061 | |
4062 | // Request missing workers. |
4063 | WorkingPosition* wp = working_positions_; |
4064 | @@ -418,7 +447,10 @@ |
4065 | */ |
4066 | void ProductionSite::set_economy(Economy* const e) { |
4067 | if (Economy* const old = get_economy()) { |
4068 | - for (WaresQueue* ip_queue : input_queues_) { |
4069 | + for (WaresQueue* ip_queue : input_ware_queues_) { |
4070 | + ip_queue->remove_from_economy(*old); |
4071 | + } |
4072 | + for (WorkersQueue* ip_queue : input_worker_queues_) { |
4073 | ip_queue->remove_from_economy(*old); |
4074 | } |
4075 | } |
4076 | @@ -429,7 +461,10 @@ |
4077 | r->set_economy(e); |
4078 | |
4079 | if (e) { |
4080 | - for (WaresQueue* ip_queue : input_queues_) { |
4081 | + for (WaresQueue* ip_queue : input_ware_queues_) { |
4082 | + ip_queue->add_to_economy(*e); |
4083 | + } |
4084 | + for (WorkersQueue* ip_queue : input_worker_queues_) { |
4085 | ip_queue->add_to_economy(*e); |
4086 | } |
4087 | } |
4088 | @@ -454,11 +489,17 @@ |
4089 | } |
4090 | |
4091 | // Cleanup the wares queues |
4092 | - for (uint32_t i = 0; i < input_queues_.size(); ++i) { |
4093 | - input_queues_[i]->cleanup(); |
4094 | - delete input_queues_[i]; |
4095 | - } |
4096 | - input_queues_.clear(); |
4097 | + for (uint32_t i = 0; i < input_ware_queues_.size(); ++i) { |
4098 | + input_ware_queues_[i]->cleanup(); |
4099 | + delete input_ware_queues_[i]; |
4100 | + } |
4101 | + input_ware_queues_.clear(); |
4102 | + |
4103 | + for (uint32_t i = 0; i < input_worker_queues_.size(); ++i) { |
4104 | + input_worker_queues_[i]->cleanup(); |
4105 | + delete input_worker_queues_[i]; |
4106 | + } |
4107 | + input_worker_queues_.clear(); |
4108 | |
4109 | Building::cleanup(egbase); |
4110 | } |
4111 | @@ -786,11 +827,11 @@ |
4112 | } |
4113 | |
4114 | // Drop all the wares that are too much out to the flag. |
4115 | - for (WaresQueue* queue : input_queues_) { |
4116 | + for (WaresQueue* queue : input_ware_queues_) { |
4117 | if (queue->get_filled() > queue->get_max_fill()) { |
4118 | queue->set_filled(queue->get_filled() - 1); |
4119 | - const WareDescr& wd = *owner().tribe().get_ware_descr(queue->get_ware()); |
4120 | - WareInstance& ware = *new WareInstance(queue->get_ware(), &wd); |
4121 | + const WareDescr& wd = *owner().tribe().get_ware_descr(queue->get_index()); |
4122 | + WareInstance& ware = *new WareInstance(queue->get_index(), &wd); |
4123 | ware.init(game); |
4124 | worker.start_task_dropoff(game, ware); |
4125 | return true; |
4126 | |
4127 | === modified file 'src/logic/map_objects/tribes/productionsite.h' |
4128 | --- src/logic/map_objects/tribes/productionsite.h 2016-08-04 15:49:05 +0000 |
4129 | +++ src/logic/map_objects/tribes/productionsite.h 2017-01-21 14:37:18 +0000 |
4130 | @@ -85,8 +85,11 @@ |
4131 | bool is_output_worker_type(const DescriptionIndex& i) const { |
4132 | return output_worker_types_.count(i); |
4133 | } |
4134 | - const BillOfMaterials& inputs() const { |
4135 | - return inputs_; |
4136 | + const BillOfMaterials& input_wares() const { |
4137 | + return input_wares_; |
4138 | + } |
4139 | + const BillOfMaterials& input_workers() const { |
4140 | + return input_workers_; |
4141 | } |
4142 | using Output = std::set<DescriptionIndex>; |
4143 | const Output& output_ware_types() const { |
4144 | @@ -118,7 +121,8 @@ |
4145 | |
4146 | private: |
4147 | BillOfMaterials working_positions_; |
4148 | - BillOfMaterials inputs_; |
4149 | + BillOfMaterials input_wares_; |
4150 | + BillOfMaterials input_workers_; |
4151 | Output output_ware_types_; |
4152 | Output output_worker_types_; |
4153 | Programs programs_; |
4154 | @@ -192,6 +196,7 @@ |
4155 | } |
4156 | |
4157 | WaresQueue& waresqueue(DescriptionIndex) override; |
4158 | + WorkersQueue& workersqueue(DescriptionIndex) override; |
4159 | |
4160 | void init(EditorGameBase&) override; |
4161 | void cleanup(EditorGameBase&) override; |
4162 | @@ -207,8 +212,14 @@ |
4163 | |
4164 | using InputQueues = std::vector<WaresQueue*>; |
4165 | const InputQueues& warequeues() const { |
4166 | - return input_queues_; |
4167 | - } |
4168 | + return input_ware_queues_; |
4169 | + } |
4170 | + |
4171 | + using InputWorkerQueues = std::vector<WorkersQueue*>; |
4172 | + const InputWorkerQueues& workerqueues() const { |
4173 | + return input_worker_queues_; |
4174 | + } |
4175 | + |
4176 | const std::vector<Worker*>& workers() const; |
4177 | |
4178 | bool can_start_working() const; |
4179 | @@ -302,7 +313,8 @@ |
4180 | |
4181 | BillOfMaterials produced_wares_; |
4182 | BillOfMaterials recruited_workers_; |
4183 | - InputQueues input_queues_; ///< input queues for all inputs |
4184 | + InputQueues input_ware_queues_; ///< input queues for all inputs |
4185 | + InputWorkerQueues input_worker_queues_; ///< input queues for workers |
4186 | std::vector<bool> statistics_; |
4187 | uint8_t last_stat_percent_; |
4188 | // integer 0-10000000, to be divided by 10000 to get a percent, to avoid float (target range: |
4189 | |
4190 | === modified file 'src/logic/map_objects/tribes/soldier.cc' |
4191 | --- src/logic/map_objects/tribes/soldier.cc 2016-12-03 13:32:28 +0000 |
4192 | +++ src/logic/map_objects/tribes/soldier.cc 2017-01-21 14:37:18 +0000 |
4193 | @@ -841,7 +841,8 @@ |
4194 | } |
4195 | if (upcast(Warehouse, wh, enemy)) { |
4196 | Requirements noreq; |
4197 | - defenders = wh->count_workers(game, wh->owner().tribe().soldier(), noreq); |
4198 | + defenders = |
4199 | + wh->count_workers(game, wh->owner().tribe().soldier(), noreq, Warehouse::Match::kExact); |
4200 | } |
4201 | // Any enemy soldier at baseflag count as defender. |
4202 | std::vector<Bob*> soldiers; |
4203 | |
4204 | === modified file 'src/logic/map_objects/tribes/tribes.cc' |
4205 | --- src/logic/map_objects/tribes/tribes.cc 2017-01-01 19:20:04 +0000 |
4206 | +++ src/logic/map_objects/tribes/tribes.cc 2017-01-21 14:37:18 +0000 |
4207 | @@ -331,7 +331,7 @@ |
4208 | |
4209 | // Add consumers and producers to wares. |
4210 | if (upcast(ProductionSiteDescr, de, &building_descr)) { |
4211 | - for (const auto& ware_amount : de->inputs()) { |
4212 | + for (const auto& ware_amount : de->input_wares()) { |
4213 | wares_->get_mutable(ware_amount.first)->add_consumer(i); |
4214 | } |
4215 | for (const DescriptionIndex& wareindex : de->output_ware_types()) { |
4216 | |
4217 | === modified file 'src/logic/map_objects/tribes/warehouse.cc' |
4218 | --- src/logic/map_objects/tribes/warehouse.cc 2016-12-05 19:45:49 +0000 |
4219 | +++ src/logic/map_objects/tribes/warehouse.cc 2017-01-21 14:37:18 +0000 |
4220 | @@ -192,8 +192,11 @@ |
4221 | } |
4222 | |
4223 | uint32_t WarehouseSupply::nr_supplies(const Game& game, const Request& req) const { |
4224 | - if (req.get_type() == wwWORKER) |
4225 | - return warehouse_->count_workers(game, req.get_index(), req.get_requirements()); |
4226 | + if (req.get_type() == wwWORKER) { |
4227 | + return warehouse_->count_workers( |
4228 | + game, req.get_index(), req.get_requirements(), |
4229 | + (req.get_exact_match() ? Warehouse::Match::kExact : Warehouse::Match::kCompatible)); |
4230 | + } |
4231 | |
4232 | // Calculate how many wares can be sent out - it might be that we need them |
4233 | // ourselves. E.g. for hiring new soldiers. |
4234 | @@ -738,8 +741,10 @@ |
4235 | * \return the number of workers that we can launch satisfying the given |
4236 | * requirements. |
4237 | */ |
4238 | -Quantity |
4239 | -Warehouse::count_workers(const Game& /* game */, DescriptionIndex ware, const Requirements& req) { |
4240 | +Quantity Warehouse::count_workers(const Game& /* game */, |
4241 | + DescriptionIndex ware, |
4242 | + const Requirements& req, |
4243 | + Match exact) { |
4244 | Quantity sum = 0; |
4245 | |
4246 | do { |
4247 | @@ -755,8 +760,11 @@ |
4248 | } |
4249 | } |
4250 | } |
4251 | - |
4252 | - ware = owner().tribe().get_worker_descr(ware)->becomes(); |
4253 | + if (exact == Match::kCompatible) { |
4254 | + ware = owner().tribe().get_worker_descr(ware)->becomes(); |
4255 | + } else { |
4256 | + ware = INVALID_INDEX; |
4257 | + } |
4258 | } while (owner().tribe().has_ware(ware)); |
4259 | |
4260 | return sum; |
4261 | @@ -1177,7 +1185,7 @@ |
4262 | DescriptionIndex const soldier_index = owner().tribe().soldier(); |
4263 | Requirements noreq; |
4264 | |
4265 | - if (!count_workers(game, soldier_index, noreq)) |
4266 | + if (!count_workers(game, soldier_index, noreq, Match::kCompatible)) |
4267 | return; |
4268 | |
4269 | Soldier& defender = dynamic_cast<Soldier&>(launch_worker(game, soldier_index, noreq)); |
4270 | @@ -1189,7 +1197,7 @@ |
4271 | DescriptionIndex const soldier_index = owner().tribe().soldier(); |
4272 | Requirements noreq; |
4273 | |
4274 | - if (count_workers(game, soldier_index, noreq)) { |
4275 | + if (count_workers(game, soldier_index, noreq, Match::kCompatible)) { |
4276 | Soldier& defender = dynamic_cast<Soldier&>(launch_worker(game, soldier_index, noreq)); |
4277 | defender.start_task_defense(game, true); |
4278 | enemy.send_signal(game, "sleep"); |
4279 | |
4280 | === modified file 'src/logic/map_objects/tribes/warehouse.h' |
4281 | --- src/logic/map_objects/tribes/warehouse.h 2016-12-02 07:53:21 +0000 |
4282 | +++ src/logic/map_objects/tribes/warehouse.h 2017-01-21 14:37:18 +0000 |
4283 | @@ -111,6 +111,22 @@ |
4284 | kRemove = 3, |
4285 | }; |
4286 | |
4287 | + /** |
4288 | + * Whether worker indices in count_workers() have to match exactly. |
4289 | + */ |
4290 | + enum class Match { |
4291 | + /** |
4292 | + * Return the number of workers with matching indices. |
4293 | + */ |
4294 | + kExact, |
4295 | + |
4296 | + /** |
4297 | + * Return the number of workers with matching indices or |
4298 | + * which are more experienced workers of the given lower type. |
4299 | + */ |
4300 | + kCompatible |
4301 | + }; |
4302 | + |
4303 | Warehouse(const WarehouseDescr&); |
4304 | virtual ~Warehouse(); |
4305 | |
4306 | @@ -181,7 +197,7 @@ |
4307 | |
4308 | bool fetch_from_flag(Game&) override; |
4309 | |
4310 | - Quantity count_workers(const Game&, DescriptionIndex, const Requirements&); |
4311 | + Quantity count_workers(const Game&, DescriptionIndex, const Requirements&, Match); |
4312 | Worker& launch_worker(Game&, DescriptionIndex worker, const Requirements&); |
4313 | |
4314 | // Adds the worker to the inventory. Takes ownership and might delete |
4315 | |
4316 | === modified file 'src/logic/playercommand.cc' |
4317 | --- src/logic/playercommand.cc 2016-12-01 16:59:34 +0000 |
4318 | +++ src/logic/playercommand.cc 2017-01-21 14:37:18 +0000 |
4319 | @@ -23,7 +23,7 @@ |
4320 | #include "base/macros.h" |
4321 | #include "base/wexception.h" |
4322 | #include "economy/economy.h" |
4323 | -#include "economy/wares_queue.h" |
4324 | +#include "economy/input_queue.h" |
4325 | #include "io/fileread.h" |
4326 | #include "io/filewrite.h" |
4327 | #include "io/streamwrite.h" |
4328 | @@ -79,7 +79,7 @@ |
4329 | PLCMD_MESSAGESETSTATUSREAD = 18, |
4330 | PLCMD_MESSAGESETSTATUSARCHIVED = 19, |
4331 | PLCMD_SETSTOCKPOLICY = 20, |
4332 | - PLCMD_SETWAREMAXFILL = 21, |
4333 | + PLCMD_SETINPUTMAXFILL = 21, |
4334 | PLCMD_DISMANTLEBUILDING = 22, |
4335 | PLCMD_EVICTWORKER = 23, |
4336 | PLCMD_MILITARYSITESETSOLDIERPREFERENCE = 24, |
4337 | @@ -149,8 +149,8 @@ |
4338 | return new CmdMessageSetStatusArchived(des); |
4339 | case PLCMD_SETSTOCKPOLICY: |
4340 | return new CmdSetStockPolicy(des); |
4341 | - case PLCMD_SETWAREMAXFILL: |
4342 | - return new CmdSetWareMaxFill(des); |
4343 | + case PLCMD_SETINPUTMAXFILL: |
4344 | + return new CmdSetInputMaxFill(des); |
4345 | case PLCMD_DISMANTLEBUILDING: |
4346 | return new CmdDismantleBuilding(des); |
4347 | case PLCMD_EVICTWORKER: |
4348 | @@ -165,7 +165,7 @@ |
4349 | /** |
4350 | * Write this player command to a file. Call this from base classes |
4351 | */ |
4352 | -constexpr uint16_t kCurrentPacketVersionPlayerCommand = 2; |
4353 | +constexpr uint16_t kCurrentPacketVersionPlayerCommand = 3; |
4354 | |
4355 | void PlayerCommand::write(FileWrite& fw, EditorGameBase& egbase, MapObjectSaver& mos) { |
4356 | // First, write version |
4357 | @@ -180,7 +180,7 @@ |
4358 | void PlayerCommand::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { |
4359 | try { |
4360 | const uint16_t packet_version = fr.unsigned_16(); |
4361 | - if (packet_version == kCurrentPacketVersionPlayerCommand) { |
4362 | + if (packet_version >= 2 && packet_version <= kCurrentPacketVersionPlayerCommand) { |
4363 | GameLogicCommand::read(fr, egbase, mol); |
4364 | sender_ = fr.unsigned_8(); |
4365 | if (!egbase.get_player(sender_)) |
4366 | @@ -1077,18 +1077,20 @@ |
4367 | } |
4368 | |
4369 | /*** class Cmd_SetWareMaxFill ***/ |
4370 | -CmdSetWareMaxFill::CmdSetWareMaxFill(const uint32_t init_duetime, |
4371 | - const PlayerNumber init_sender, |
4372 | - PlayerImmovable& imm, |
4373 | - const DescriptionIndex index, |
4374 | - const uint32_t max_fill) |
4375 | +CmdSetInputMaxFill::CmdSetInputMaxFill(const uint32_t init_duetime, |
4376 | + const PlayerNumber init_sender, |
4377 | + PlayerImmovable& imm, |
4378 | + const DescriptionIndex index, |
4379 | + const WareWorker type, |
4380 | + const uint32_t max_fill) |
4381 | : PlayerCommand(init_duetime, init_sender), |
4382 | serial_(imm.serial()), |
4383 | index_(index), |
4384 | + type_(type), |
4385 | max_fill_(max_fill) { |
4386 | } |
4387 | |
4388 | -void CmdSetWareMaxFill::execute(Game& game) { |
4389 | +void CmdSetInputMaxFill::execute(Game& game) { |
4390 | upcast(Building, b, game.objects().get_object(serial_)); |
4391 | |
4392 | if (!b) |
4393 | @@ -1096,50 +1098,71 @@ |
4394 | if (b->owner().player_number() != sender()) |
4395 | return; |
4396 | |
4397 | - b->waresqueue(index_).set_max_fill(max_fill_); |
4398 | + b->inputqueue(index_, type_).set_max_fill(max_fill_); |
4399 | } |
4400 | |
4401 | -constexpr uint16_t kCurrentPacketVersionCmdSetWareMaxFill = 1; |
4402 | +constexpr uint16_t kCurrentPacketVersionCmdSetInputMaxFill = 2; |
4403 | |
4404 | -void CmdSetWareMaxFill::write(FileWrite& fw, EditorGameBase& egbase, MapObjectSaver& mos) { |
4405 | - fw.unsigned_16(kCurrentPacketVersionCmdSetWareMaxFill); |
4406 | +void CmdSetInputMaxFill::write(FileWrite& fw, EditorGameBase& egbase, MapObjectSaver& mos) { |
4407 | + fw.unsigned_16(kCurrentPacketVersionCmdSetInputMaxFill); |
4408 | |
4409 | PlayerCommand::write(fw, egbase, mos); |
4410 | |
4411 | fw.unsigned_32(mos.get_object_file_index_or_zero(egbase.objects().get_object(serial_))); |
4412 | fw.signed_32(index_); |
4413 | + if (type_ == wwWARE) { |
4414 | + fw.unsigned_8(0); |
4415 | + } else { |
4416 | + fw.unsigned_8(1); |
4417 | + } |
4418 | fw.unsigned_32(max_fill_); |
4419 | } |
4420 | |
4421 | -void CmdSetWareMaxFill::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { |
4422 | +void CmdSetInputMaxFill::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { |
4423 | try { |
4424 | const uint16_t packet_version = fr.unsigned_16(); |
4425 | - if (packet_version == kCurrentPacketVersionCmdSetWareMaxFill) { |
4426 | + if (packet_version >= 1 && packet_version <= kCurrentPacketVersionCmdSetInputMaxFill) { |
4427 | PlayerCommand::read(fr, egbase, mol); |
4428 | serial_ = get_object_serial_or_zero<Building>(fr.unsigned_32(), mol); |
4429 | index_ = fr.signed_32(); |
4430 | + if (packet_version > 1) { |
4431 | + if (fr.unsigned_8() == 0) { |
4432 | + type_ = wwWARE; |
4433 | + } else { |
4434 | + type_ = wwWORKER; |
4435 | + } |
4436 | + } |
4437 | max_fill_ = fr.unsigned_32(); |
4438 | } else { |
4439 | throw UnhandledVersionError( |
4440 | - "CmdSetWareMaxFill", packet_version, kCurrentPacketVersionCmdSetWareMaxFill); |
4441 | + "CmdSetInputMaxFill", packet_version, kCurrentPacketVersionCmdSetInputMaxFill); |
4442 | } |
4443 | } catch (const WException& e) { |
4444 | throw GameDataError("set ware max fill: %s", e.what()); |
4445 | } |
4446 | } |
4447 | |
4448 | -CmdSetWareMaxFill::CmdSetWareMaxFill(StreamRead& des) |
4449 | - : PlayerCommand(0, des.unsigned_8()), |
4450 | - serial_(des.unsigned_32()), |
4451 | - index_(des.signed_32()), |
4452 | - max_fill_(des.unsigned_32()) { |
4453 | +CmdSetInputMaxFill::CmdSetInputMaxFill(StreamRead& des) : PlayerCommand(0, des.unsigned_8()) { |
4454 | + serial_ = des.unsigned_32(); |
4455 | + index_ = des.signed_32(); |
4456 | + if (des.unsigned_8() == 0) { |
4457 | + type_ = wwWARE; |
4458 | + } else { |
4459 | + type_ = wwWORKER; |
4460 | + } |
4461 | + max_fill_ = des.unsigned_32(); |
4462 | } |
4463 | |
4464 | -void CmdSetWareMaxFill::serialize(StreamWrite& ser) { |
4465 | - ser.unsigned_8(PLCMD_SETWAREMAXFILL); |
4466 | +void CmdSetInputMaxFill::serialize(StreamWrite& ser) { |
4467 | + ser.unsigned_8(PLCMD_SETINPUTMAXFILL); |
4468 | ser.unsigned_8(sender()); |
4469 | ser.unsigned_32(serial_); |
4470 | ser.signed_32(index_); |
4471 | + if (type_ == wwWARE) { |
4472 | + ser.unsigned_8(0); |
4473 | + } else { |
4474 | + ser.unsigned_8(1); |
4475 | + } |
4476 | ser.unsigned_32(max_fill_); |
4477 | } |
4478 | |
4479 | |
4480 | === modified file 'src/logic/playercommand.h' |
4481 | --- src/logic/playercommand.h 2016-08-04 15:49:05 +0000 |
4482 | +++ src/logic/playercommand.h 2017-01-21 14:37:18 +0000 |
4483 | @@ -493,21 +493,25 @@ |
4484 | int32_t priority_; |
4485 | }; |
4486 | |
4487 | -struct CmdSetWareMaxFill : public PlayerCommand { |
4488 | - CmdSetWareMaxFill() : PlayerCommand(), serial_(0), index_(), max_fill_(0) { |
4489 | +struct CmdSetInputMaxFill : public PlayerCommand { |
4490 | + CmdSetInputMaxFill() : PlayerCommand(), serial_(0), index_(), type_(wwWARE), max_fill_(0) { |
4491 | } // For savegame loading |
4492 | - CmdSetWareMaxFill( |
4493 | - uint32_t duetime, PlayerNumber, PlayerImmovable&, DescriptionIndex, uint32_t maxfill); |
4494 | + CmdSetInputMaxFill(uint32_t duetime, |
4495 | + PlayerNumber, |
4496 | + PlayerImmovable&, |
4497 | + DescriptionIndex, |
4498 | + WareWorker, |
4499 | + uint32_t maxfill); |
4500 | |
4501 | // Write these commands to a file (for savegames) |
4502 | void write(FileWrite&, EditorGameBase&, MapObjectSaver&) override; |
4503 | void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; |
4504 | |
4505 | QueueCommandTypes id() const override { |
4506 | - return QueueCommandTypes::kSetWareMaxFill; |
4507 | + return QueueCommandTypes::kSetInputMaxFill; |
4508 | } |
4509 | |
4510 | - CmdSetWareMaxFill(StreamRead&); |
4511 | + CmdSetInputMaxFill(StreamRead&); |
4512 | |
4513 | void execute(Game&) override; |
4514 | void serialize(StreamWrite&) override; |
4515 | @@ -515,6 +519,7 @@ |
4516 | private: |
4517 | Serial serial_; |
4518 | DescriptionIndex index_; |
4519 | + WareWorker type_; |
4520 | uint32_t max_fill_; |
4521 | }; |
4522 | |
4523 | |
4524 | === modified file 'src/logic/queue_cmd_factory.cc' |
4525 | --- src/logic/queue_cmd_factory.cc 2016-12-03 13:32:28 +0000 |
4526 | +++ src/logic/queue_cmd_factory.cc 2017-01-21 14:37:18 +0000 |
4527 | @@ -64,8 +64,8 @@ |
4528 | return *new CmdSetWorkerTargetQuantity(); |
4529 | case QueueCommandTypes::kResetWorkerTargetQuantity: |
4530 | return *new CmdResetWorkerTargetQuantity(); |
4531 | - case QueueCommandTypes::kSetWareMaxFill: |
4532 | - return *new CmdSetWareMaxFill(); |
4533 | + case QueueCommandTypes::kSetInputMaxFill: |
4534 | + return *new CmdSetInputMaxFill(); |
4535 | case QueueCommandTypes::kMessageSetStatusRead: |
4536 | return *new CmdMessageSetStatusRead(); |
4537 | case QueueCommandTypes::kMessageSetStatusArchived: |
4538 | |
4539 | === modified file 'src/logic/queue_cmd_ids.h' |
4540 | --- src/logic/queue_cmd_ids.h 2016-08-04 15:49:05 +0000 |
4541 | +++ src/logic/queue_cmd_ids.h 2017-01-21 14:37:18 +0000 |
4542 | @@ -60,7 +60,7 @@ |
4543 | |
4544 | // 17 was a command related to old events. removed |
4545 | |
4546 | - kSetWareMaxFill = 18, |
4547 | + kSetInputMaxFill = 18, |
4548 | |
4549 | kMessageSetStatusRead = 21, |
4550 | kMessageSetStatusArchived, |
4551 | |
4552 | === modified file 'src/map_io/map_buildingdata_packet.cc' |
4553 | --- src/map_io/map_buildingdata_packet.cc 2016-12-01 16:59:34 +0000 |
4554 | +++ src/map_io/map_buildingdata_packet.cc 2017-01-21 14:37:18 +0000 |
4555 | @@ -30,6 +30,7 @@ |
4556 | #include "economy/request.h" |
4557 | #include "economy/warehousesupply.h" |
4558 | #include "economy/wares_queue.h" |
4559 | +#include "economy/workers_queue.h" |
4560 | #include "io/fileread.h" |
4561 | #include "io/filewrite.h" |
4562 | #include "logic/editor_game_base.h" |
4563 | @@ -61,7 +62,7 @@ |
4564 | constexpr uint16_t kCurrentPacketPFBuilding = 1; |
4565 | constexpr uint16_t kCurrentPacketVersionWarehouse = 6; |
4566 | constexpr uint16_t kCurrentPacketVersionMilitarysite = 5; |
4567 | -constexpr uint16_t kCurrentPacketVersionProductionsite = 5; |
4568 | +constexpr uint16_t kCurrentPacketVersionProductionsite = 6; |
4569 | constexpr uint16_t kCurrentPacketVersionTrainingsite = 5; |
4570 | |
4571 | void MapBuildingdataPacket::read(FileSystem& fs, |
4572 | @@ -547,7 +548,7 @@ |
4573 | MapObjectLoader& mol) { |
4574 | try { |
4575 | uint16_t const packet_version = fr.unsigned_16(); |
4576 | - if (packet_version == kCurrentPacketVersionProductionsite) { |
4577 | + if (packet_version >= 5 && packet_version <= kCurrentPacketVersionProductionsite) { |
4578 | ProductionSite::WorkingPosition& wp_begin = *productionsite.working_positions_; |
4579 | const ProductionSiteDescr& pr_descr = productionsite.descr(); |
4580 | const BillOfMaterials& working_positions = pr_descr.working_positions(); |
4581 | @@ -673,15 +674,30 @@ |
4582 | productionsite.program_time_ = fr.signed_32(); |
4583 | |
4584 | uint16_t nr_queues = fr.unsigned_16(); |
4585 | - assert(!productionsite.input_queues_.size()); |
4586 | + assert(!productionsite.input_ware_queues_.size()); |
4587 | for (uint16_t i = 0; i < nr_queues; ++i) { |
4588 | WaresQueue* wq = new WaresQueue(productionsite, INVALID_INDEX, 0); |
4589 | wq->read(fr, game, mol); |
4590 | |
4591 | - if (!game.tribes().ware_exists(wq->get_ware())) { |
4592 | + if (!game.tribes().ware_exists(wq->get_index())) { |
4593 | delete wq; |
4594 | } else { |
4595 | - productionsite.input_queues_.push_back(wq); |
4596 | + productionsite.input_ware_queues_.push_back(wq); |
4597 | + } |
4598 | + } |
4599 | + |
4600 | + if (packet_version > 5) { |
4601 | + nr_queues = fr.unsigned_16(); |
4602 | + assert(!productionsite.input_worker_queues_.size()); |
4603 | + for (uint16_t i = 0; i < nr_queues; ++i) { |
4604 | + WorkersQueue* wq = new WorkersQueue(productionsite, INVALID_INDEX, 0); |
4605 | + wq->read(fr, game, mol); |
4606 | + |
4607 | + if (!game.tribes().worker_exists(wq->get_index())) { |
4608 | + delete wq; |
4609 | + } else { |
4610 | + productionsite.input_worker_queues_.push_back(wq); |
4611 | + } |
4612 | } |
4613 | } |
4614 | |
4615 | @@ -1124,10 +1140,17 @@ |
4616 | fw.unsigned_8(productionsite.program_timer_); |
4617 | fw.signed_32(productionsite.program_time_); |
4618 | |
4619 | - const uint16_t input_queues_size = productionsite.input_queues_.size(); |
4620 | + const uint16_t input_queues_size = productionsite.input_ware_queues_.size(); |
4621 | fw.unsigned_16(input_queues_size); |
4622 | - for (uint16_t i = 0; i < input_queues_size; ++i) |
4623 | - productionsite.input_queues_[i]->write(fw, game, mos); |
4624 | + for (uint16_t i = 0; i < input_queues_size; ++i) { |
4625 | + productionsite.input_ware_queues_[i]->write(fw, game, mos); |
4626 | + } |
4627 | + |
4628 | + const uint16_t input_worker_queues_size = productionsite.input_worker_queues_.size(); |
4629 | + fw.unsigned_16(input_worker_queues_size); |
4630 | + for (uint16_t i = 0; i < input_worker_queues_size; ++i) { |
4631 | + productionsite.input_worker_queues_[i]->write(fw, game, mos); |
4632 | + } |
4633 | |
4634 | const uint16_t statistics_size = productionsite.statistics_.size(); |
4635 | fw.unsigned_16(statistics_size); |
4636 | |
4637 | === modified file 'src/scripting/lua_map.cc' |
4638 | --- src/scripting/lua_map.cc 2017-01-21 14:22:31 +0000 |
4639 | +++ src/scripting/lua_map.cc 2017-01-21 14:37:18 +0000 |
4640 | @@ -27,6 +27,7 @@ |
4641 | #include "base/macros.h" |
4642 | #include "base/wexception.h" |
4643 | #include "economy/wares_queue.h" |
4644 | +#include "economy/workers_queue.h" |
4645 | #include "graphic/graphic.h" |
4646 | #include "logic/findimmovable.h" |
4647 | #include "logic/map_objects/checkstep.h" |
4648 | @@ -152,9 +153,108 @@ |
4649 | using WorkerAmount = std::pair<Widelands::DescriptionIndex, Widelands::Quantity>; |
4650 | using PlrInfluence = std::pair<Widelands::PlayerNumber, Widelands::MilitaryInfluence>; |
4651 | using WaresSet = std::set<Widelands::DescriptionIndex>; |
4652 | +using InputSet = std::set<std::pair<Widelands::DescriptionIndex, Widelands::WareWorker>>; |
4653 | using WorkersSet = std::set<Widelands::DescriptionIndex>; |
4654 | using SoldiersList = std::vector<Widelands::Soldier*>; |
4655 | |
4656 | +// Versions of the above macros which accept wares and workers |
4657 | +InputSet parse_get_input_arguments(lua_State* L, const TribeDescr& tribe, bool* return_number) { |
4658 | + /* takes either "all", a name or an array of names */ |
4659 | + int32_t nargs = lua_gettop(L); |
4660 | + if (nargs != 2) |
4661 | + report_error(L, "Wrong number of arguments to get_inputs!"); |
4662 | + *return_number = false; |
4663 | + InputSet rv; |
4664 | + if (lua_isstring(L, 2)) { |
4665 | + std::string what = luaL_checkstring(L, -1); |
4666 | + if (what == "all") { |
4667 | + for (const DescriptionIndex& i : tribe.wares()) { |
4668 | + rv.insert(std::make_pair(i, wwWARE)); |
4669 | + } |
4670 | + for (const DescriptionIndex& i : tribe.workers()) { |
4671 | + rv.insert(std::make_pair(i, wwWORKER)); |
4672 | + } |
4673 | + } else { |
4674 | + /* Only one item requested */ |
4675 | + DescriptionIndex index = tribe.ware_index(what); |
4676 | + if (tribe.has_ware(index)) { |
4677 | + rv.insert(std::make_pair(index, wwWARE)); |
4678 | + *return_number = true; |
4679 | + } else { |
4680 | + index = tribe.worker_index(what); |
4681 | + if (tribe.has_worker(index)) { |
4682 | + rv.insert(std::make_pair(index, wwWORKER)); |
4683 | + *return_number = true; |
4684 | + } else { |
4685 | + report_error(L, "Invalid input: <%s>", what.c_str()); |
4686 | + } |
4687 | + } |
4688 | + } |
4689 | + } else { |
4690 | + /* array of names */ |
4691 | + luaL_checktype(L, 2, LUA_TTABLE); |
4692 | + lua_pushnil(L); |
4693 | + while (lua_next(L, 2) != 0) { |
4694 | + std::string what = luaL_checkstring(L, -1); |
4695 | + DescriptionIndex index = tribe.ware_index(what); |
4696 | + if (tribe.has_ware(index)) { |
4697 | + rv.insert(std::make_pair(index, wwWARE)); |
4698 | + } else { |
4699 | + index = tribe.worker_index(what); |
4700 | + if (tribe.has_worker(index)) { |
4701 | + rv.insert(std::make_pair(index, wwWORKER)); |
4702 | + } else { |
4703 | + report_error(L, "Invalid input: <%s>", what.c_str()); |
4704 | + } |
4705 | + } |
4706 | + lua_pop(L, 1); |
4707 | + } |
4708 | + } |
4709 | + return rv; |
4710 | +} |
4711 | + |
4712 | +InputMap parse_set_input_arguments(lua_State* L, const TribeDescr& tribe) { |
4713 | + int32_t nargs = lua_gettop(L); |
4714 | + if (nargs != 2 && nargs != 3) |
4715 | + report_error(L, "Wrong number of arguments to set_inputs!"); |
4716 | + InputMap rv; |
4717 | + if (nargs == 3) { |
4718 | + /* name amount */ |
4719 | + std::string what = luaL_checkstring(L, 2); |
4720 | + DescriptionIndex index = tribe.ware_index(what); |
4721 | + if (tribe.has_ware(index)) { |
4722 | + rv.insert(std::make_pair(std::make_pair(index, wwWARE), luaL_checkuint32(L, 3))); |
4723 | + } else { |
4724 | + index = tribe.worker_index(what); |
4725 | + if (tribe.has_worker(index)) { |
4726 | + rv.insert(std::make_pair(std::make_pair(index, wwWORKER), luaL_checkuint32(L, 3))); |
4727 | + } else { |
4728 | + report_error(L, "Invalid input: <%s>", what.c_str()); |
4729 | + } |
4730 | + } |
4731 | + } else { |
4732 | + /* array of (name, count) */ |
4733 | + luaL_checktype(L, 2, LUA_TTABLE); |
4734 | + lua_pushnil(L); |
4735 | + while (lua_next(L, 2) != 0) { |
4736 | + std::string what = luaL_checkstring(L, -2); |
4737 | + DescriptionIndex index = tribe.ware_index(what); |
4738 | + if (tribe.has_ware(index)) { |
4739 | + rv.insert(std::make_pair(std::make_pair(index, wwWARE), luaL_checkuint32(L, -1))); |
4740 | + } else { |
4741 | + index = tribe.worker_index(what); |
4742 | + if (tribe.has_worker(index)) { |
4743 | + rv.insert(std::make_pair(std::make_pair(index, wwWORKER), luaL_checkuint32(L, -1))); |
4744 | + } else { |
4745 | + report_error(L, "Invalid input: <%s>", what.c_str()); |
4746 | + } |
4747 | + } |
4748 | + lua_pop(L, 1); |
4749 | + } |
4750 | + } |
4751 | + return rv; |
4752 | +} |
4753 | + |
4754 | WaresWorkersMap count_wares_on_flag_(Flag& f, const Tribes& tribes) { |
4755 | WaresWorkersMap rv; |
4756 | |
4757 | @@ -262,7 +362,7 @@ |
4758 | const TribeDescr& tribe = pi->owner().tribe(); |
4759 | |
4760 | // setpoints is map of index:quantity |
4761 | - WaresWorkersMap setpoints; |
4762 | + InputMap setpoints; |
4763 | parse_wares_workers_counted(L, tribe, &setpoints, false); |
4764 | |
4765 | // c_workers is actual statistics, the map index:quantity |
4766 | @@ -273,18 +373,19 @@ |
4767 | c_workers.insert(WorkerAmount(i, 1)); |
4768 | else |
4769 | c_workers[i] += 1; |
4770 | - if (!setpoints.count(i)) |
4771 | - setpoints.insert(WorkerAmount(i, 0)); |
4772 | + if (!setpoints.count(std::make_pair(i, Widelands::WareWorker::wwWORKER))) |
4773 | + setpoints.insert(std::make_pair(std::make_pair(i, Widelands::WareWorker::wwWORKER), 0)); |
4774 | } |
4775 | |
4776 | // The idea is to change as little as possible |
4777 | - for (const WaresWorkersMap::value_type& sp : setpoints) { |
4778 | - const WorkerDescr* wdes = tribe.get_worker_descr(sp.first); |
4779 | - if (!valid_workers.count(sp.first)) |
4780 | + for (const auto& sp : setpoints) { |
4781 | + const Widelands::DescriptionIndex& index = sp.first.first; |
4782 | + const WorkerDescr* wdes = tribe.get_worker_descr(index); |
4783 | + if (sp.second != 0 && !valid_workers.count(index)) |
4784 | report_error(L, "<%s> can't be employed here!", wdes->name().c_str()); |
4785 | |
4786 | Widelands::Quantity cur = 0; |
4787 | - WaresWorkersMap::iterator i = c_workers.find(sp.first); |
4788 | + WaresWorkersMap::iterator i = c_workers.find(index); |
4789 | if (i != c_workers.end()) |
4790 | cur = i->second; |
4791 | |
4792 | @@ -292,7 +393,7 @@ |
4793 | if (d < 0) { |
4794 | while (d) { |
4795 | for (const Worker* w : pi->get_workers()) { |
4796 | - if (tribe.worker_index(w->descr().name()) == sp.first) { |
4797 | + if (tribe.worker_index(w->descr().name()) == index) { |
4798 | const_cast<Worker*>(w)->remove(egbase); |
4799 | ++d; |
4800 | break; |
4801 | @@ -668,7 +769,7 @@ |
4802 | // Very similar to above function, but expects numbers for every received ware/worker |
4803 | RequestedWareWorker parse_wares_workers_counted(lua_State* L, |
4804 | const TribeDescr& tribe, |
4805 | - WaresWorkersMap* ware_workers_list, |
4806 | + InputMap* ware_workers_list, |
4807 | bool is_ware) { |
4808 | RequestedWareWorker result = RequestedWareWorker::kUndefined; |
4809 | int32_t nargs = lua_gettop(L); |
4810 | @@ -685,13 +786,13 @@ |
4811 | report_error(L, "Illegal ware %s", luaL_checkstring(L, 2)); |
4812 | } |
4813 | ware_workers_list->insert( |
4814 | - WareAmount(tribe.ware_index(luaL_checkstring(L, 2)), luaL_checkuint32(L, 3))); |
4815 | + std::make_pair(std::make_pair(tribe.ware_index(luaL_checkstring(L, 2)), Widelands::WareWorker::wwWARE), luaL_checkuint32(L, 3))); |
4816 | } else { |
4817 | if (tribe.worker_index(luaL_checkstring(L, 2)) == INVALID_INDEX) { |
4818 | report_error(L, "Illegal worker %s", luaL_checkstring(L, 2)); |
4819 | } |
4820 | ware_workers_list->insert( |
4821 | - WorkerAmount(tribe.worker_index(luaL_checkstring(L, 2)), luaL_checkuint32(L, 3))); |
4822 | + std::make_pair(std::make_pair(tribe.worker_index(luaL_checkstring(L, 2)), Widelands::WareWorker::wwWORKER), luaL_checkuint32(L, 3))); |
4823 | } |
4824 | } else { |
4825 | result = RequestedWareWorker::kList; |
4826 | @@ -711,10 +812,10 @@ |
4827 | |
4828 | if (is_ware) { |
4829 | ware_workers_list->insert( |
4830 | - WareAmount(tribe.ware_index(luaL_checkstring(L, -2)), luaL_checkuint32(L, -1))); |
4831 | + std::make_pair(std::make_pair(tribe.ware_index(luaL_checkstring(L, -2)), Widelands::WareWorker::wwWARE), luaL_checkuint32(L, -1))); |
4832 | } else { |
4833 | ware_workers_list->insert( |
4834 | - WorkerAmount(tribe.worker_index(luaL_checkstring(L, -2)), luaL_checkuint32(L, -1))); |
4835 | + std::make_pair(std::make_pair(tribe.worker_index(luaL_checkstring(L, -2)), Widelands::WareWorker::wwWORKER), luaL_checkuint32(L, -1))); |
4836 | } |
4837 | lua_pop(L, 1); |
4838 | } |
4839 | @@ -742,10 +843,9 @@ |
4840 | |
4841 | .. class:: HasWares |
4842 | |
4843 | - HasWares is an interface that all :class:`PlayerImmovable` objects |
4844 | + HasWares is an interface that most :class:`PlayerImmovable` objects |
4845 | that can contain wares implement. This is at the time of this writing |
4846 | - :class:`~wl.map.Flag`, :class:`~wl.map.Warehouse` and |
4847 | - :class:`~wl.map.ProductionSite`. |
4848 | + :class:`~wl.map.Flag` and :class:`~wl.map.Warehouse`. |
4849 | */ |
4850 | |
4851 | /* RST |
4852 | @@ -762,7 +862,7 @@ |
4853 | * a ware name. |
4854 | In this case a single integer is returned. No check is made |
4855 | if this ware makes sense for this location, you can for example ask a |
4856 | - :const:`lumberjacks_hut` for the number of :const:`raw_stone` he has |
4857 | + :const:`lumberjacks_hut` for the number of :const:`granite` he has |
4858 | and he will return 0. |
4859 | * an :class:`array` of ware names. |
4860 | In this case a :class:`table` of |
4861 | @@ -776,7 +876,7 @@ |
4862 | .. method:: set_wares(which[, amount]) |
4863 | |
4864 | Sets the wares available in this location. Either takes two arguments, |
4865 | - a ware name and an amount to set it too. Or it takes a table of |
4866 | + a ware name and an amount to set it to. Or it takes a table of |
4867 | (ware name, amount) pairs. Wares are created and added to an economy out |
4868 | of thin air. |
4869 | |
4870 | @@ -803,14 +903,85 @@ |
4871 | */ |
4872 | |
4873 | /* RST |
4874 | +HasInputs |
4875 | +-------- |
4876 | + |
4877 | +.. class:: HasInputs |
4878 | + |
4879 | + HasInputs is an interface that some :class:`PlayerImmovable` objects |
4880 | + implement. At the time of this writing these are |
4881 | + :class:`~wl.map.ProductionSite` and :class:`~wl.map.TrainingSite`. |
4882 | + This interface is similar to :class:`HasWares` but additionally allows |
4883 | + to set workers as inputs. These workers are consumed by the production |
4884 | + or trainings programm. |
4885 | +*/ |
4886 | + |
4887 | +/* RST |
4888 | + .. method:: get_inputs(which) |
4889 | + |
4890 | + Gets the number of wares and workers that currently reside here |
4891 | + for consumption. |
4892 | + |
4893 | + :arg which: can be either of |
4894 | + |
4895 | + * the string :const:`all`. |
4896 | + In this case the function will return a |
4897 | + :class:`table` of (ware/worker name,amount) pairs that gives |
4898 | + information about all ware information available for this object. |
4899 | + * a ware or worker name. |
4900 | + In this case a single integer is returned. No check is made |
4901 | + if this ware/worker makes sense for this location, you can for example ask a |
4902 | + :const:`lumberjacks_hut` for the number of :const:`granite` he has |
4903 | + and he will return 0. |
4904 | + * an :class:`array` of ware and worker names. |
4905 | + In this case a :class:`table` of |
4906 | + (ware/worker name,amount) pairs is returned where only the requested |
4907 | + wares/workers are listed. All other entries are :const:`nil`. |
4908 | + |
4909 | + :returns: :class:`integer` or :class:`table` |
4910 | +*/ |
4911 | + |
4912 | +/* RST |
4913 | + .. method:: set_inputs(which[, amount]) |
4914 | + |
4915 | + Sets the wares/workers available in this location which will |
4916 | + be consumed by the production/training programm. Either takes two arguments, |
4917 | + a ware/worker name and an amount to set it to. Or it takes a table of |
4918 | + (ware/worker name, amount) pairs. Wares are created and added to an |
4919 | + economy out of thin air. |
4920 | + |
4921 | + :arg which: name of ware/worker or (ware/worker name, amount) table |
4922 | + :type which: :class:`string` or :class:`table` |
4923 | + :arg amount: this many units will be available after the call |
4924 | + :type amount: :class:`integer` |
4925 | +*/ |
4926 | + |
4927 | +/* RST |
4928 | + .. attribute:: valid_inputs |
4929 | + |
4930 | + (RO) A :class:`table` of (ware/worker name, count) which describes how |
4931 | + many wares/workers can be stored here for consumption. For example for a |
4932 | + :class:`~wl.map.ProductionSite` this is the information what wares/workers |
4933 | + and can be stored in which amount as inputs. |
4934 | + |
4935 | + You can use this to quickly fill a building: |
4936 | + |
4937 | + .. code-block:: lua |
4938 | + |
4939 | + if b.valid_inputs then b:set_inputs(b.valid_inputs) end |
4940 | +*/ |
4941 | + |
4942 | +/* RST |
4943 | HasWorkers |
4944 | ---------- |
4945 | |
4946 | .. class:: HasWorkers |
4947 | |
4948 | - Analogon to :class:`HasWares`, but for Workers. Supported at the time of |
4949 | - this writing by :class:`~wl.map.Road`, :class:`~wl.map.Warehouse` and |
4950 | - :class:`~wl.map.ProductionSite`. |
4951 | + Analogon to :class:`HasWares`, but for Workers. Supported at the time |
4952 | + of this writing by :class:`~wl.map.Road`, :class:`~wl.map.Warehouse` |
4953 | + and :class:`~wl.map.ProductionSite`. In the case of ProductionSites, |
4954 | + these methods allow access to the workers which do the work instead of |
4955 | + workers which are consumed as accessed by the methods of :class:`HasInputs`. |
4956 | */ |
4957 | |
4958 | /* RST |
4959 | @@ -1930,7 +2101,7 @@ |
4960 | */ |
4961 | const char LuaProductionSiteDescription::className[] = "ProductionSiteDescription"; |
4962 | const MethodType<LuaProductionSiteDescription> LuaProductionSiteDescription::Methods[] = { |
4963 | - METHOD(LuaProductionSiteDescription, consumed_wares), |
4964 | + METHOD(LuaProductionSiteDescription, consumed_wares_workers), |
4965 | METHOD(LuaProductionSiteDescription, produced_wares), |
4966 | METHOD(LuaProductionSiteDescription, recruited_workers), |
4967 | {nullptr, nullptr}, |
4968 | @@ -1958,7 +2129,7 @@ |
4969 | int LuaProductionSiteDescription::get_inputs(lua_State* L) { |
4970 | lua_newtable(L); |
4971 | int index = 1; |
4972 | - for (const auto& input_ware : get()->inputs()) { |
4973 | + for (const auto& input_ware : get()->input_wares()) { |
4974 | lua_pushint32(L, index++); |
4975 | const WareDescr* descr = get_egbase(L).tribes().get_ware_descr(input_ware.first); |
4976 | to_lua<LuaWareDescription>(L, new LuaWareDescription(descr)); |
4977 | @@ -2042,7 +2213,7 @@ |
4978 | } |
4979 | |
4980 | /* RST |
4981 | - .. attribute:: consumed_wares |
4982 | + .. attribute:: consumed_wares_workers |
4983 | |
4984 | :arg program_name: the name of the production program that we want to get the consumed wares for |
4985 | :type tribename: :class:`string` |
4986 | @@ -2050,18 +2221,22 @@ |
4987 | (RO) Returns a table of {{ware name}, ware amount} for the wares consumed by this production program. |
4988 | Multiple entries in {ware name} are alternatives (OR logic)). |
4989 | */ |
4990 | -int LuaProductionSiteDescription::consumed_wares(lua_State* L) { |
4991 | +int LuaProductionSiteDescription::consumed_wares_workers(lua_State* L) { |
4992 | std::string program_name = luaL_checkstring(L, -1); |
4993 | const Widelands::ProductionSiteDescr::Programs& programs = get()->programs(); |
4994 | if (programs.count(program_name) == 1) { |
4995 | const ProductionProgram& program = *programs.at(program_name); |
4996 | lua_newtable(L); |
4997 | int counter = 0; |
4998 | - for (const auto& group : program.consumed_wares()) { |
4999 | + for (const auto& group : program.consumed_wares_workers()) { |
5000 | lua_pushuint32(L, ++counter); |
Continuous integration builds have changed state:
Travis build 1556. State: failed. Details: https:/ /travis- ci.org/ widelands/ widelands/ builds/ 172322064. /ci.appveyor. com/project/ widelands- dev/widelands/ build/_ notabilis27_ widelands_ casern- 1396.
Appveyor build 1396. State: success. Details: https:/