Merge lp:~widelands-dev/widelands/list-directories-in-cpp into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 9129
Proposed branch: lp:~widelands-dev/widelands/list-directories-in-cpp
Merge into: lp:widelands
Diff against target: 4547 lines (+822/-805)
197 files modified
data/scripting/mapobjects.lua (+8/-55)
data/sound/wl-sound-docu.csv (+39/-38)
data/tribes/atlanteans.lua (+12/-21)
data/tribes/barbarians.lua (+9/-16)
data/tribes/empire.lua (+10/-19)
data/tribes/frisians.lua (+9/-16)
data/tribes/immovables/berry_bushes/blueberry/init.lua (+4/-4)
data/tribes/immovables/berry_bushes/currant_black/init.lua (+4/-4)
data/tribes/immovables/berry_bushes/currant_red/init.lua (+4/-4)
data/tribes/immovables/berry_bushes/desert_hackberry/init.lua (+4/-4)
data/tribes/immovables/berry_bushes/juniper/init.lua (+4/-4)
data/tribes/immovables/berry_bushes/raspberry/init.lua (+4/-4)
data/tribes/immovables/berry_bushes/sea_buckthorn/init.lua (+4/-4)
data/tribes/immovables/berry_bushes/strawberry/init.lua (+4/-4)
data/tribes/ships/atlanteans/init.lua (+1/-1)
data/tribes/ships/barbarians/init.lua (+1/-1)
data/tribes/ships/empire/init.lua (+1/-1)
data/tribes/ships/frisians/init.lua (+1/-1)
data/tribes/workers/atlanteans/armorsmith/init.lua (+2/-2)
data/tribes/workers/atlanteans/baker/init.lua (+2/-2)
data/tribes/workers/atlanteans/blackroot_farmer/init.lua (+2/-2)
data/tribes/workers/atlanteans/builder/init.lua (+2/-2)
data/tribes/workers/atlanteans/carrier/init.lua (+4/-9)
data/tribes/workers/atlanteans/charcoal_burner/init.lua (+2/-2)
data/tribes/workers/atlanteans/farmer/init.lua (+2/-2)
data/tribes/workers/atlanteans/fishbreeder/init.lua (+1/-1)
data/tribes/workers/atlanteans/fisher/init.lua (+2/-2)
data/tribes/workers/atlanteans/forester/init.lua (+2/-2)
data/tribes/workers/atlanteans/geologist/init.lua (+2/-2)
data/tribes/workers/atlanteans/horse/init.lua (+2/-2)
data/tribes/workers/atlanteans/horsebreeder/init.lua (+1/-1)
data/tribes/workers/atlanteans/hunter/init.lua (+2/-2)
data/tribes/workers/atlanteans/miller/init.lua (+2/-2)
data/tribes/workers/atlanteans/miner/init.lua (+2/-2)
data/tribes/workers/atlanteans/recruit/init.lua (+1/-1)
data/tribes/workers/atlanteans/sawyer/init.lua (+2/-2)
data/tribes/workers/atlanteans/scout/init.lua (+1/-1)
data/tribes/workers/atlanteans/shipwright/init.lua (+2/-2)
data/tribes/workers/atlanteans/smelter/init.lua (+2/-2)
data/tribes/workers/atlanteans/smoker/init.lua (+2/-2)
data/tribes/workers/atlanteans/soldier/init.lua (+1/-1)
data/tribes/workers/atlanteans/spiderbreeder/init.lua (+2/-2)
data/tribes/workers/atlanteans/stonecutter/init.lua (+2/-2)
data/tribes/workers/atlanteans/toolsmith/init.lua (+2/-2)
data/tribes/workers/atlanteans/trainer/init.lua (+2/-2)
data/tribes/workers/atlanteans/weaponsmith/init.lua (+2/-2)
data/tribes/workers/atlanteans/weaver/init.lua (+2/-2)
data/tribes/workers/atlanteans/woodcutter/init.lua (+3/-3)
data/tribes/workers/barbarians/baker/init.lua (+2/-2)
data/tribes/workers/barbarians/blacksmith/init.lua (+2/-2)
data/tribes/workers/barbarians/blacksmith_master/init.lua (+2/-2)
data/tribes/workers/barbarians/brewer/init.lua (+2/-2)
data/tribes/workers/barbarians/brewer_master/init.lua (+2/-2)
data/tribes/workers/barbarians/builder/init.lua (+2/-2)
data/tribes/workers/barbarians/carrier/init.lua (+4/-9)
data/tribes/workers/barbarians/cattlebreeder/init.lua (+2/-2)
data/tribes/workers/barbarians/charcoal_burner/init.lua (+2/-2)
data/tribes/workers/barbarians/farmer/init.lua (+2/-2)
data/tribes/workers/barbarians/fisher/init.lua (+2/-2)
data/tribes/workers/barbarians/gamekeeper/init.lua (+2/-2)
data/tribes/workers/barbarians/gardener/init.lua (+2/-2)
data/tribes/workers/barbarians/geologist/init.lua (+2/-2)
data/tribes/workers/barbarians/helmsmith/init.lua (+2/-2)
data/tribes/workers/barbarians/hunter/init.lua (+2/-2)
data/tribes/workers/barbarians/innkeeper/init.lua (+2/-2)
data/tribes/workers/barbarians/lime_burner/init.lua (+2/-2)
data/tribes/workers/barbarians/lumberjack/init.lua (+3/-4)
data/tribes/workers/barbarians/miner/init.lua (+2/-2)
data/tribes/workers/barbarians/miner_chief/init.lua (+2/-2)
data/tribes/workers/barbarians/miner_master/init.lua (+2/-2)
data/tribes/workers/barbarians/ox/init.lua (+2/-2)
data/tribes/workers/barbarians/ranger/init.lua (+2/-2)
data/tribes/workers/barbarians/recruit/init.lua (+1/-1)
data/tribes/workers/barbarians/scout/init.lua (+2/-2)
data/tribes/workers/barbarians/shipwright/init.lua (+2/-2)
data/tribes/workers/barbarians/smelter/init.lua (+2/-2)
data/tribes/workers/barbarians/soldier/init.lua (+1/-1)
data/tribes/workers/barbarians/stonemason/init.lua (+2/-2)
data/tribes/workers/barbarians/trainer/init.lua (+2/-2)
data/tribes/workers/barbarians/weaver/init.lua (+2/-2)
data/tribes/workers/empire/armorsmith/init.lua (+2/-2)
data/tribes/workers/empire/baker/init.lua (+2/-2)
data/tribes/workers/empire/brewer/init.lua (+2/-2)
data/tribes/workers/empire/builder/init.lua (+2/-2)
data/tribes/workers/empire/carpenter/init.lua (+2/-2)
data/tribes/workers/empire/carrier/init.lua (+4/-9)
data/tribes/workers/empire/charcoal_burner/init.lua (+2/-2)
data/tribes/workers/empire/donkey/init.lua (+2/-2)
data/tribes/workers/empire/donkeybreeder/init.lua (+2/-2)
data/tribes/workers/empire/farmer/init.lua (+2/-2)
data/tribes/workers/empire/fisher/init.lua (+2/-2)
data/tribes/workers/empire/forester/init.lua (+2/-2)
data/tribes/workers/empire/geologist/init.lua (+2/-2)
data/tribes/workers/empire/hunter/init.lua (+2/-2)
data/tribes/workers/empire/innkeeper/init.lua (+2/-2)
data/tribes/workers/empire/lumberjack/init.lua (+3/-4)
data/tribes/workers/empire/miller/init.lua (+2/-2)
data/tribes/workers/empire/miner/init.lua (+2/-2)
data/tribes/workers/empire/miner_master/init.lua (+2/-2)
data/tribes/workers/empire/pigbreeder/init.lua (+2/-2)
data/tribes/workers/empire/recruit/init.lua (+1/-1)
data/tribes/workers/empire/scout/init.lua (+2/-2)
data/tribes/workers/empire/shepherd/init.lua (+2/-2)
data/tribes/workers/empire/shipwright/init.lua (+2/-2)
data/tribes/workers/empire/smelter/init.lua (+2/-2)
data/tribes/workers/empire/soldier/init.lua (+1/-1)
data/tribes/workers/empire/stonemason/init.lua (+2/-2)
data/tribes/workers/empire/toolsmith/init.lua (+2/-2)
data/tribes/workers/empire/trainer/init.lua (+2/-2)
data/tribes/workers/empire/vinefarmer/init.lua (+2/-2)
data/tribes/workers/empire/vintner/init.lua (+2/-2)
data/tribes/workers/empire/weaponsmith/init.lua (+2/-2)
data/tribes/workers/empire/weaver/init.lua (+2/-2)
data/tribes/workers/frisians/baker/init.lua (+2/-2)
data/tribes/workers/frisians/baker_master/init.lua (+2/-2)
data/tribes/workers/frisians/beekeeper/init.lua (+2/-2)
data/tribes/workers/frisians/berry_farmer/init.lua (+1/-1)
data/tribes/workers/frisians/blacksmith/init.lua (+2/-2)
data/tribes/workers/frisians/blacksmith_master/init.lua (+2/-2)
data/tribes/workers/frisians/brewer/init.lua (+2/-2)
data/tribes/workers/frisians/brewer_master/init.lua (+2/-2)
data/tribes/workers/frisians/brickmaker/init.lua (+2/-2)
data/tribes/workers/frisians/builder/init.lua (+2/-2)
data/tribes/workers/frisians/carrier/init.lua (+4/-9)
data/tribes/workers/frisians/charcoal_burner/init.lua (+2/-2)
data/tribes/workers/frisians/claydigger/init.lua (+2/-2)
data/tribes/workers/frisians/farmer/init.lua (+2/-2)
data/tribes/workers/frisians/fisher/init.lua (+2/-2)
data/tribes/workers/frisians/forester/init.lua (+1/-1)
data/tribes/workers/frisians/fruit_collector/init.lua (+2/-2)
data/tribes/workers/frisians/geologist/init.lua (+1/-1)
data/tribes/workers/frisians/hunter/init.lua (+2/-2)
data/tribes/workers/frisians/landlady/init.lua (+2/-2)
data/tribes/workers/frisians/miner/init.lua (+2/-2)
data/tribes/workers/frisians/miner_master/init.lua (+2/-2)
data/tribes/workers/frisians/reed_farmer/init.lua (+2/-2)
data/tribes/workers/frisians/reindeer/init.lua (+2/-2)
data/tribes/workers/frisians/reindeer_breeder/init.lua (+2/-2)
data/tribes/workers/frisians/scout/init.lua (+2/-2)
data/tribes/workers/frisians/seamstress/init.lua (+2/-2)
data/tribes/workers/frisians/seamstress_master/init.lua (+2/-2)
data/tribes/workers/frisians/shipwright/init.lua (+2/-2)
data/tribes/workers/frisians/smelter/init.lua (+2/-2)
data/tribes/workers/frisians/smoker/init.lua (+2/-2)
data/tribes/workers/frisians/soldier/init.lua (+4/-4)
data/tribes/workers/frisians/stonemason/init.lua (+2/-2)
data/tribes/workers/frisians/trainer/init.lua (+2/-2)
data/tribes/workers/frisians/woodcutter/init.lua (+4/-2)
data/world/critters/badger/init.lua (+1/-1)
data/world/critters/brownbear/init.lua (+1/-1)
data/world/critters/bunny/init.lua (+1/-1)
data/world/critters/chamois/init.lua (+1/-1)
data/world/critters/deer/init.lua (+1/-1)
data/world/critters/duck/init.lua (+1/-1)
data/world/critters/elk/init.lua (+1/-1)
data/world/critters/fox/init.lua (+1/-1)
data/world/critters/lynx/init.lua (+1/-1)
data/world/critters/marten/init.lua (+1/-1)
data/world/critters/reindeer/init.lua (+1/-1)
data/world/critters/sheep/init.lua (+1/-1)
data/world/critters/stag/init.lua (+1/-1)
data/world/critters/wildboar/init.lua (+1/-1)
data/world/critters/wisent/init.lua (+1/-1)
data/world/critters/wolf/init.lua (+1/-1)
data/world/immovables/grass1/init.lua (+1/-1)
data/world/immovables/grass2/init.lua (+1/-1)
data/world/immovables/grass3/init.lua (+1/-1)
doc/sphinx/source/animations.rst (+30/-59)
src/CMakeLists.txt (+0/-1)
src/game_io/game_loader.cc (+2/-1)
src/graphic/animation.cc (+165/-143)
src/graphic/animation.h (+8/-4)
src/helper.h (+0/-13)
src/io/filesystem/disk_filesystem.cc (+2/-2)
src/io/filesystem/disk_filesystem.h (+2/-2)
src/io/filesystem/filesystem.cc (+81/-0)
src/io/filesystem/filesystem.h (+20/-2)
src/io/filesystem/layered_filesystem.cc (+2/-2)
src/io/filesystem/layered_filesystem.h (+2/-2)
src/io/filesystem/zip_filesystem.cc (+2/-2)
src/io/filesystem/zip_filesystem.h (+2/-2)
src/logic/map_objects/map_object.cc (+47/-18)
src/logic/map_objects/map_object.h (+8/-4)
src/logic/map_objects/tribes/ship.cc (+1/-1)
src/logic/map_objects/tribes/tribe_descr.cc (+6/-4)
src/logic/map_objects/tribes/worker_descr.cc (+3/-3)
src/logic/map_objects/world/critter.cc (+1/-1)
src/map_io/CMakeLists.txt (+0/-1)
src/map_io/map_scripting_packet.cc (+1/-2)
src/scripting/lua_path.cc (+5/-1)
src/sound/fxset.cc (+9/-16)
src/sound/fxset.h (+4/-2)
src/sound/songset.cc (+1/-5)
src/sound/sound_handler.cc (+4/-0)
src/sound/sound_handler.h (+2/-0)
src/wlapplication.cc (+5/-6)
src/wui/load_or_save_game.cc (+2/-3)
To merge this branch: bzr merge lp:~widelands-dev/widelands/list-directories-in-cpp
Reviewer Review Type Date Requested Status
Toni Förster Approve
Review via email: mp+366614@code.launchpad.net

Commit message

Improve performance and memory usage when loading tribes and world
- Save memory and loading time by not listing files via Lua
- Common sequential file loading function for image and sound files
- Replace regular expressions with NumberGlob for speedup
- Only load mipmap scales that are being used
- Preload sound files and animations at default scale for existing
  map objects to prevent dropping FPS at game start

Description of the change

Performance :)

I have only converted the directional animations to the new system - the remaining animations will take care of themselves once we move to Spritemaps. Converting them now would cause a lot of unnecessary extra work.

Some stats:

TRUNK:

┏━ Running Lua for world:
┃ Resources: 58ms
┃ Terrains: 85ms
┃ Immovables: 1157ms
┃ Critters: 709ms
┗━ took: 2009ms
Loading the world took 2050ms
┏━ Running Lua for tribes:
┃ Ships: 280ms
┃ Wares: 871ms
┃ Immovables: 671ms
┃ Workers: 5775ms
┃ Warehouses: 357ms
┃ Productionsites: 3167ms
┃ Trainingsites: 162ms
┃ Militarysites: 318ms
┃ Partially finished buildings: 26ms
┃ Tribe infos: 380ms
┗━ took: 12007ms
Loading the tribes took 12033ms

THIS BRANCH:

┏━ Running Lua for world:
┃ Resources: 1ms
┃ Terrains: 13ms
┃ Immovables: 172ms
┃ Critters: 163ms
┗━ took: 349ms
Loading the world took 360ms
┏━ Running Lua for tribes:
┃ Ships: 70ms
┃ Wares: 65ms
┃ Immovables: 127ms
┃ Workers: 2134ms
┃ Warehouses: 33ms
┃ Productionsites: 384ms
┃ Trainingsites: 35ms
┃ Militarysites: 55ms
┃ Partially finished buildings: 2ms
┃ Tribe infos: 60ms
┗━ took: 2965ms
Loading the tribes took 2966ms

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4826. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/525572046.
Appveyor build 4607. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_list_directories_in_cpp-4607.

Revision history for this message
Toni Förster (stonerl) wrote :

I got ~100 compile warnings:

src/io/filesystem/filesystem.h:150:71: warning: unknown command tag name [-Wdocumentation-unknown-command]
        /// Returns all files in the given 'directory' that match 'basename[_\d{1,3}].extension'
                                                                             ^~

Revision history for this message
GunChleoc (gunchleoc) wrote :

Eek. Should be fixed now.

Revision history for this message
kaputtnik (franku) wrote :

This is a big feature and should be merged soon!

Will do some testing today :-)

Revision history for this message
kaputtnik (franku) wrote :

hm, loading a 8-players save game needs much more time with this branch here. trunk is r9111, both are release builds:

stoppped by hand:
trunk: ~ 11 sec.
this branch: ~ 24 sec.

The main difference when comparing the logs, is this output:

Trunk:
Second and third phase loading Map Objects ... took 34ms

This branch:
Second and third phase loading Map Objects ... ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred took 13645ms

So i am not sure if the alsa-thing is the cause of the difference. This alsa underrun happens each time i load that savegame with this branch, but not when loading it in trunk.

Revision history for this message
kaputtnik (franku) wrote :

When watching the console output, the output stops exactly at that line for a while. It shows the error from alsa-lib and and after some time the timestamp "took: ...ms"

Revision history for this message
Toni Förster (stonerl) wrote :

Same savegame with this branch.

 Second and third phase loading Map Objects ... took 37ms

Not sure what triggers the underrun on your system. The question is, is this caused by changes in this branch OR is this a problem with your system that you never noticed until this branch...

Revision history for this message
kaputtnik (franku) wrote :

I get this on a slow laptop, so maybe this machine dependent. Just curious that i didn't get this with trunk.

Toni, can you compare loading the save game with trunk, so we can see if this is really 10 sec. faster? Comparing the time for the editor would also be nice.

Anyway i noticed no other issues with this branch :-) So please can someone make a code review?

Revision history for this message
GunChleoc (gunchleoc) wrote :

I now pre-loading the sounds for the existing Map Objects. I don't do that in trunk, and I get a lot of stutter there at game start instead.

Do you also get the ALSA problem with Build 20?

Revision history for this message
GunChleoc (gunchleoc) wrote :

I don't get the ALSA error, looks like your sound driver doesn't like one of the files.

Revision history for this message
kaputtnik (franku) wrote :

with build20 i get the alsa error much earlier, when loading immovables:

┃ Immovables: 859ms
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred

I had to create a new save game though, because the attached one is incompatible. Not sure if all buildings were erected at this time. And i have the feeling the game starts much faster than with this branch.

With current trunk i get never the alsa error, so my sound driver seems to work fine with all of the files.

Maybe related: https://stackoverflow.com/questions/14601666/alsa-ways-to-prevent-underrun-for-speaker

Revision history for this message
GunChleoc (gunchleoc) wrote :

I have added some debug log output to this branch so that we can find out which file is causing the problem for you. You should see something like this with your savegame:

Second and third phase loading Map Objects ... NOCOM loading sound effect: sound/animals//frog.ogg
NOCOM loading sound effect: world/critters/duck//duck_00.ogg
NOCOM loading sound effect: world/critters/duck//duck_01.ogg
NOCOM loading sound effect: world/critters/duck//duck_02.ogg
NOCOM loading sound effect: sound/animals//coyote_00.ogg
NOCOM loading sound effect: sound/animals//coyote_01.ogg
NOCOM loading sound effect: sound/farm//sheep_00.ogg
NOCOM loading sound effect: sound/farm//sheep_01.ogg
NOCOM loading sound effect: sound/farm//sheep_02.ogg
NOCOM loading sound effect: sound/hammering//hammering_00.ogg
NOCOM loading sound effect: sound/hammering//hammering_01.ogg
NOCOM loading sound effect: sound/hammering//hammering_02.ogg
NOCOM loading sound effect: sound/animals//bird5_00.ogg
NOCOM loading sound effect: sound/animals//bird5_01.ogg
NOCOM loading sound effect: sound/animals//bird5_02.ogg
NOCOM loading sound effect: sound/animals//bird4_00.ogg
NOCOM loading sound effect: sound/animals//bird4_01.ogg
NOCOM loading sound effect: sound/animals//bird4_02.ogg
NOCOM loading sound effect: sound/animals//bird6_00.ogg
NOCOM loading sound effect: sound/animals//bird6_01.ogg
NOCOM loading sound effect: sound/animals//bird3_00.ogg
NOCOM loading sound effect: sound/animals//bird3_01.ogg
NOCOM loading sound effect: sound/animals//bird3_02.ogg
NOCOM loading sound effect: sound/animals//bird3_03.ogg
NOCOM loading sound effect: sound/animals//boar.ogg
took 14653ms

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 5022. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/534690803.
Appveyor build 4802. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_list_directories_in_cpp-4802.

Revision history for this message
kaputtnik (franku) wrote :

hm, there is now a text conflict shown...

Text conflict in data/tribes/workers/frisians/soldier/init.lua

Revision history for this message
kaputtnik (franku) wrote :

I am on my fast(er) machine now, but here there is no also error. But after the output of

NOCOM loading sound effect: sound/hammering//hammering_02.ogg

the output stops for a while. On each load of the save game the stop-time is different, one time the stop lasts longer, the other time it lasts shorter (but noticeable).

Revision history for this message
Toni Förster (stonerl) wrote :

The merge conflict needs fixing. Also this is not part of this branch but maybe can be foxed here.

Game: Reading Map Data ... Game: Reading Map Data took 7ms
Game: Reading Player Info ... ┏━ Running Lua for world:

Here are newlines missing.

Besides that it sped up the loading for me.

review: Needs Fixing
Revision history for this message
GunChleoc (gunchleoc) wrote :

> the output stops for a while. On each load of the save game the stop-time is different, one time the stop lasts longer, the other time it lasts shorter (but noticeable).

It stops because Widelands is loading more stuff for starting the game that isn't producing log outputs. This has nothing to do with this branch.

The ALSA error also has nothing to do with Widelands code, but we could try reencoding the affected sound file(s). I have removed the extra log output from this branch though, so this needs to be tested and fixed in a separate branch by somebody who can reproduce it. I have opened a new bug report for this:

https://bugs.launchpad.net/widelands/+bug/1830467

> The merge conflict needs fixing.

Of course it does - done :)

> Also this is not part of this branch but maybe can be foxed here.

Done.

Revision history for this message
Toni Förster (stonerl) wrote :

LGTM :)

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks a lot for the review and testing :)

@bunnybot merge

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 5043. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/537115107.
Appveyor build 4823. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_list_directories_in_cpp-4823.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Refusing to merge, since Travis is not green. Use @bunnybot merge force for merging anyways.

Travis build 5043. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/537115107.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 5056. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/537329131.
Appveyor build 4836. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_list_directories_in_cpp-4836.

Revision history for this message
GunChleoc (gunchleoc) wrote :

@bunnybot merge

Revision history for this message
bunnybot (widelandsofficial) wrote :
Download full text (15.7 KiB)

Error merging this proposal:

Output:
stdout:

stderr:
R data/music/intro_00.ogg => data/music/intro.ogg
R data/music/menu_00.ogg => data/music/menu.ogg
 M data/scripting/mapobjects.lua
R data/sound/animals/boar_01.ogg => data/sound/animals/boar.ogg
R data/sound/animals/coyote_01.ogg => data/sound/animals/coyote_00.ogg
R data/sound/animals/coyote_02.ogg => data/sound/animals/coyote_01.ogg
R data/sound/animals/crickets1_01.ogg => data/sound/animals/crickets1_00.ogg
R data/sound/animals/crickets2_01.ogg => data/sound/animals/crickets2_00.ogg
R data/sound/animals/elk_01.ogg => data/sound/animals/elk_00.ogg
R data/sound/animals/elk_02.ogg => data/sound/animals/elk_01.ogg
R data/sound/animals/elk_10.ogg => data/sound/animals/elk_02.ogg
R data/sound/animals/elk_11.ogg => data/sound/animals/elk_03.ogg
R data/sound/animals/frog1_00.ogg => data/sound/animals/frog.ogg
R data/sound/animals/stag_01.ogg => data/sound/animals/stag_00.ogg
R data/sound/animals/stag_02.ogg => data/sound/animals/stag_01.ogg
R data/sound/animals/stag_10.ogg => data/sound/animals/stag_02.ogg
R data/sound/animals/stag_11.ogg => data/sound/animals/stag_03.ogg
R data/sound/animals/stag_12.ogg => data/sound/animals/stag_04.ogg
R data/sound/animals/stag_13.ogg => data/sound/animals/stag_05.ogg
R data/sound/animals/wolf_01.ogg => data/sound/animals/wolf_00.ogg
R data/sound/animals/wolf_02.ogg => data/sound/animals/wolf_01.ogg
R data/sound/animals/wolf_03.ogg => data/sound/animals/wolf_02.ogg
R data/sound/animals/wolf_10.ogg => data/sound/animals/wolf_03.ogg
R data/sound/animals/wolf_11.ogg => data/sound/animals/wolf_04.ogg
R data/sound/animals/wolf_12.ogg => data/sound/animals/wolf_05.ogg
R data/sound/animals/wolf_13.ogg => data/sound/animals/wolf_06.ogg
R data/sound/animals/wolf_14.ogg => data/sound/animals/wolf_07.ogg
R data/sound/atlanteans/cutting/stonecutter_01.ogg => data/sound/atlanteans/cutting/stonecutter_00.ogg
R data/sound/atlanteans/cutting/stonecutter_02.ogg => data/sound/atlanteans/cutting/stonecutter_01.ogg
R data/sound/atlanteans/cutting/stonecutter_03.ogg => data/sound/atlanteans/cutting/stonecutter_02.ogg
R data/sound/atlanteans/goldspin_01.ogg => data/sound/atlanteans/goldspin_00.ogg
R data/sound/atlanteans/goldspin_02.ogg => data/sound/atlanteans/goldspin_01.ogg
R data/sound/atlanteans/saw/benchsaw_01.ogg => data/sound/atlanteans/saw/benchsaw_00.ogg
R data/sound/atlanteans/saw/benchsaw_02.ogg => data/sound/atlanteans/saw/benchsaw_01.ogg
R data/sound/atlanteans/saw/benchsaw_03.ogg => data/sound/atlanteans/saw/benchsaw_02.ogg
R data/sound/atlanteans/saw/sawing_01.ogg => data/sound/atlanteans/saw/sawing_00.ogg
R data/sound/atlanteans/saw/sawing_02.ogg => data/sound/atlanteans/saw/sawing_01.ogg
R data/sound/atlanteans/saw/sawing_03.ogg => data/sound/atlanteans/saw/sawing_02.ogg
R data/sound/barbarians/blackwood_01.ogg => data/sound/barbarians/blackwood.ogg
R data/sound/barbarians/mortar_01.ogg => data/sound/barbarians/mortar.ogg
R data/sound/barbarians/stonegrind_01.ogg => data/sound/barbarians/stonegrind.ogg
R data/sound/barbarians/taverns/biginn_01.ogg => data/sound/barbarians/taverns/...

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 5072. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/537848543.
Appveyor build 4852. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_list_directories_in_cpp-4852.

Revision history for this message
GunChleoc (gunchleoc) wrote :

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== renamed file 'data/music/intro_00.ogg' => 'data/music/intro.ogg'
=== renamed file 'data/music/menu_00.ogg' => 'data/music/menu.ogg'
=== modified file 'data/scripting/mapobjects.lua'
--- data/scripting/mapobjects.lua 2019-04-24 20:48:37 +0000
+++ data/scripting/mapobjects.lua 2019-05-27 14:29:35 +0000
@@ -21,25 +21,6 @@
21 print(("%s: %dms"):format(preamble, ticks() - start))21 print(("%s: %dms"):format(preamble, ticks() - start))
22end22end
2323
24
25-- Helper function for finding animation files with varying numbering length
26function get_animation_files(prefix)
27 local animation_files = path.list_files(prefix .. "_??.png")
28 if #animation_files < 1 then
29 animation_files = path.list_files(prefix .. "_???.png")
30 end
31 if #animation_files < 1 then
32 animation_files = path.list_files(prefix .. "_?.png")
33 end
34 return animation_files
35end
36
37
38-- The mipmap scales supported by the engine.
39-- Ensure that this always matches kSupportedScales in animations.cc
40local supported_scales = { 0.5, 1, 2, 4 }
41
42
43-- RST24-- RST
44-- .. function:: add_animation(animationtable, animationname, dirname, basename, hotspot [, fps])25-- .. function:: add_animation(animationtable, animationname, dirname, basename, hotspot [, fps])
45--26--
@@ -55,8 +36,8 @@
55-- :arg dirname: The name of the directory where the animation image files are located.36-- :arg dirname: The name of the directory where the animation image files are located.
56-- :type dirname: :class:`string`37-- :type dirname: :class:`string`
57-- :arg basename: The basename of the animation files. The filenames of the38-- :arg basename: The basename of the animation files. The filenames of the
58-- animation files need to have the format ``<basename>_\d{2,3}.png`` for simple39-- animation files need to have the format ``<basename>_[_\d+].png`` for simple
59-- file animations, and ``<basename>_<scale>_\d{2,3}.png`` for mipmaps.40-- file animations, and ``<basename>_<scale>[_\d+].png`` for mipmaps.
60-- Supported scales are ``0.5``, ``1``, ``2`` and ``4``.41-- Supported scales are ``0.5``, ``1``, ``2`` and ``4``.
61-- :type basename: :class:`string`42-- :type basename: :class:`string`
62-- :arg hotspot: The hotspot coordinates for blitting, e.g. ``{2, 20}``.43-- :arg hotspot: The hotspot coordinates for blitting, e.g. ``{2, 20}``.
@@ -65,30 +46,9 @@
65-- 1 frame, and if you need to deviate from the default frame rate.46-- 1 frame, and if you need to deviate from the default frame rate.
66-- :type fps: :class:`integer`47-- :type fps: :class:`integer`
67function add_animation(animationtable, animationname, dirname, basename, hotspot, fps)48function add_animation(animationtable, animationname, dirname, basename, hotspot, fps)
68 mipmap = {}
69 for scale_idx, current_scale in ipairs(supported_scales) do
70 local listed_files = get_animation_files(dirname .. basename .. "_" .. current_scale)
71 if #listed_files > 0 then
72 table.insert(
73 mipmap,
74 {
75 scale = current_scale,
76 files = listed_files,
77 }
78 )
79 end
80 end
81 if #mipmap < 1 then
82 table.insert(
83 mipmap,
84 {
85 scale = 1,
86 files = get_animation_files(dirname .. basename),
87 }
88 )
89 end
90 animationtable[animationname] = {49 animationtable[animationname] = {
91 mipmap = mipmap,50 directory = dirname,
51 basename = basename,
92 hotspot = hotspot,52 hotspot = hotspot,
93 }53 }
94 if (fps ~= nil) then54 if (fps ~= nil) then
@@ -96,10 +56,8 @@
96 end56 end
97end57end
9858
99
100
101-- RST59-- RST
102-- .. function:: add_walking_animations(animationtable, animationname, dirname, basename, hotspot [, fps])60-- .. function:: add_directional_animation(animationtable, animationname, dirname, basename, hotspot [, fps])
103--61--
104-- Adds 6 walk or sail animations - one for each walking direction - to `animationtable`.62-- Adds 6 walk or sail animations - one for each walking direction - to `animationtable`.
105-- Supports both simple animations and mipmaps.63-- Supports both simple animations and mipmaps.
@@ -123,12 +81,7 @@
123-- :arg fps: Frames per second. Only use this if the animation has more than81-- :arg fps: Frames per second. Only use this if the animation has more than
124-- 1 frame, and if you need to deviate from the default frame rate.82-- 1 frame, and if you need to deviate from the default frame rate.
125-- :type fps: :class:`integer`83-- :type fps: :class:`integer`
126function add_walking_animations(animationtable, animationname, dirname, basename, hotspot, fps)84function add_directional_animation(animationtable, animationname, dirname, basename, hotspot, fps)
127 for idx, dir in ipairs{ "ne", "e", "se", "sw", "w", "nw" } do85 add_animation(animationtable, animationname, dirname, basename, hotspot, fps)
128 if fps ~= nil then86 animationtable[animationname]["directional"] = true
129 add_animation(animationtable, animationname .. "_" .. dir, dirname, basename .. "_" .. dir, hotspot, fps)
130 else
131 add_animation(animationtable, animationname .. "_" .. dir, dirname, basename .. "_" .. dir, hotspot)
132 end
133 end
134end87end
13588
=== renamed file 'data/sound/animals/boar_01.ogg' => 'data/sound/animals/boar.ogg'
=== renamed file 'data/sound/animals/coyote_01.ogg' => 'data/sound/animals/coyote_00.ogg'
=== renamed file 'data/sound/animals/coyote_02.ogg' => 'data/sound/animals/coyote_01.ogg'
=== renamed file 'data/sound/animals/crickets1_01.ogg' => 'data/sound/animals/crickets1_00.ogg'
=== renamed file 'data/sound/animals/crickets2_01.ogg' => 'data/sound/animals/crickets2_00.ogg'
=== renamed file 'data/sound/animals/elk_01.ogg' => 'data/sound/animals/elk_00.ogg'
=== renamed file 'data/sound/animals/elk_02.ogg' => 'data/sound/animals/elk_01.ogg'
=== renamed file 'data/sound/animals/elk_10.ogg' => 'data/sound/animals/elk_02.ogg'
=== renamed file 'data/sound/animals/elk_11.ogg' => 'data/sound/animals/elk_03.ogg'
=== renamed file 'data/sound/animals/frog1_00.ogg' => 'data/sound/animals/frog.ogg'
=== renamed file 'data/sound/animals/stag_01.ogg' => 'data/sound/animals/stag_00.ogg'
=== renamed file 'data/sound/animals/stag_02.ogg' => 'data/sound/animals/stag_01.ogg'
=== renamed file 'data/sound/animals/stag_10.ogg' => 'data/sound/animals/stag_02.ogg'
=== renamed file 'data/sound/animals/stag_11.ogg' => 'data/sound/animals/stag_03.ogg'
=== renamed file 'data/sound/animals/stag_12.ogg' => 'data/sound/animals/stag_04.ogg'
=== renamed file 'data/sound/animals/stag_13.ogg' => 'data/sound/animals/stag_05.ogg'
=== renamed file 'data/sound/animals/wolf_01.ogg' => 'data/sound/animals/wolf_00.ogg'
=== renamed file 'data/sound/animals/wolf_02.ogg' => 'data/sound/animals/wolf_01.ogg'
=== renamed file 'data/sound/animals/wolf_03.ogg' => 'data/sound/animals/wolf_02.ogg'
=== renamed file 'data/sound/animals/wolf_10.ogg' => 'data/sound/animals/wolf_03.ogg'
=== renamed file 'data/sound/animals/wolf_11.ogg' => 'data/sound/animals/wolf_04.ogg'
=== renamed file 'data/sound/animals/wolf_12.ogg' => 'data/sound/animals/wolf_05.ogg'
=== renamed file 'data/sound/animals/wolf_13.ogg' => 'data/sound/animals/wolf_06.ogg'
=== renamed file 'data/sound/animals/wolf_14.ogg' => 'data/sound/animals/wolf_07.ogg'
=== renamed file 'data/sound/atlanteans/cutting/stonecutter_01.ogg' => 'data/sound/atlanteans/cutting/stonecutter_00.ogg'
=== renamed file 'data/sound/atlanteans/cutting/stonecutter_02.ogg' => 'data/sound/atlanteans/cutting/stonecutter_01.ogg'
=== renamed file 'data/sound/atlanteans/cutting/stonecutter_03.ogg' => 'data/sound/atlanteans/cutting/stonecutter_02.ogg'
=== renamed file 'data/sound/atlanteans/goldspin_01.ogg' => 'data/sound/atlanteans/goldspin_00.ogg'
=== renamed file 'data/sound/atlanteans/goldspin_02.ogg' => 'data/sound/atlanteans/goldspin_01.ogg'
=== renamed file 'data/sound/atlanteans/saw/benchsaw_01.ogg' => 'data/sound/atlanteans/saw/benchsaw_00.ogg'
=== renamed file 'data/sound/atlanteans/saw/benchsaw_02.ogg' => 'data/sound/atlanteans/saw/benchsaw_01.ogg'
=== renamed file 'data/sound/atlanteans/saw/benchsaw_03.ogg' => 'data/sound/atlanteans/saw/benchsaw_02.ogg'
=== renamed file 'data/sound/atlanteans/saw/sawing_01.ogg' => 'data/sound/atlanteans/saw/sawing_00.ogg'
=== renamed file 'data/sound/atlanteans/saw/sawing_02.ogg' => 'data/sound/atlanteans/saw/sawing_01.ogg'
=== renamed file 'data/sound/atlanteans/saw/sawing_03.ogg' => 'data/sound/atlanteans/saw/sawing_02.ogg'
=== renamed file 'data/sound/barbarians/blackwood_01.ogg' => 'data/sound/barbarians/blackwood.ogg'
=== renamed file 'data/sound/barbarians/mortar_01.ogg' => 'data/sound/barbarians/mortar.ogg'
=== renamed file 'data/sound/barbarians/stonegrind_01.ogg' => 'data/sound/barbarians/stonegrind.ogg'
=== renamed file 'data/sound/barbarians/taverns/biginn_01.ogg' => 'data/sound/barbarians/taverns/biginn_00.ogg'
=== renamed file 'data/sound/barbarians/taverns/biginn_02.ogg' => 'data/sound/barbarians/taverns/biginn_01.ogg'
=== removed file 'data/sound/barbarians/taverns/biginn_10.ogg'
136Binary files data/sound/barbarians/taverns/biginn_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/barbarians/taverns/biginn_10.ogg 1970-01-01 00:00:00 +0000 differ89Binary files data/sound/barbarians/taverns/biginn_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/barbarians/taverns/biginn_10.ogg 1970-01-01 00:00:00 +0000 differ
=== renamed file 'data/sound/barbarians/taverns/inn_01.ogg' => 'data/sound/barbarians/taverns/inn_00.ogg'
=== renamed file 'data/sound/barbarians/taverns/inn_02.ogg' => 'data/sound/barbarians/taverns/inn_01.ogg'
=== removed file 'data/sound/barbarians/taverns/inn_10.ogg'
137Binary files data/sound/barbarians/taverns/inn_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/barbarians/taverns/inn_10.ogg 1970-01-01 00:00:00 +0000 differ90Binary files data/sound/barbarians/taverns/inn_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/barbarians/taverns/inn_10.ogg 1970-01-01 00:00:00 +0000 differ
=== renamed file 'data/sound/barbarians/taverns/tavern_01.ogg' => 'data/sound/barbarians/taverns/tavern_00.ogg'
=== renamed file 'data/sound/barbarians/taverns/tavern_02.ogg' => 'data/sound/barbarians/taverns/tavern_01.ogg'
=== removed file 'data/sound/barbarians/taverns/tavern_10.ogg'
138Binary files data/sound/barbarians/taverns/tavern_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/barbarians/taverns/tavern_10.ogg 1970-01-01 00:00:00 +0000 differ91Binary files data/sound/barbarians/taverns/tavern_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/barbarians/taverns/tavern_10.ogg 1970-01-01 00:00:00 +0000 differ
=== renamed file 'data/sound/barbarians/weaver_01.ogg' => 'data/sound/barbarians/weaver.ogg'
=== renamed file 'data/sound/click_00.ogg' => 'data/sound/click.ogg'
=== renamed file 'data/sound/create_construction_site_00.ogg' => 'data/sound/create_construction_site.ogg'
=== renamed file 'data/sound/empire/beerbubble_01.ogg' => 'data/sound/empire/beerbubble_00.ogg'
=== renamed file 'data/sound/empire/beerbubble_02.ogg' => 'data/sound/empire/beerbubble_01.ogg'
=== renamed file 'data/sound/empire/taverns/meal_01.ogg' => 'data/sound/empire/taverns/meal_00.ogg'
=== renamed file 'data/sound/empire/taverns/meal_02.ogg' => 'data/sound/empire/taverns/meal_01.ogg'
=== removed file 'data/sound/empire/taverns/meal_10.ogg'
139Binary files data/sound/empire/taverns/meal_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/empire/taverns/meal_10.ogg 1970-01-01 00:00:00 +0000 differ92Binary files data/sound/empire/taverns/meal_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/empire/taverns/meal_10.ogg 1970-01-01 00:00:00 +0000 differ
=== renamed file 'data/sound/empire/taverns/ration_01.ogg' => 'data/sound/empire/taverns/ration_00.ogg'
=== renamed file 'data/sound/empire/taverns/ration_02.ogg' => 'data/sound/empire/taverns/ration_01.ogg'
=== removed file 'data/sound/empire/taverns/ration_10.ogg'
140Binary files data/sound/empire/taverns/ration_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/empire/taverns/ration_10.ogg 1970-01-01 00:00:00 +0000 differ93Binary files data/sound/empire/taverns/ration_10.ogg 2016-07-18 09:25:41 +0000 and data/sound/empire/taverns/ration_10.ogg 1970-01-01 00:00:00 +0000 differ
=== renamed file 'data/sound/empire/winebubble_01.ogg' => 'data/sound/empire/winebubble_00.ogg'
=== renamed file 'data/sound/empire/winebubble_02.ogg' => 'data/sound/empire/winebubble_01.ogg'
=== renamed file 'data/sound/farm/donkey_00.ogg' => 'data/sound/farm/donkey.ogg'
=== renamed file 'data/sound/farm/sheep_01.ogg' => 'data/sound/farm/sheep_00.ogg'
=== renamed file 'data/sound/farm/sheep_02.ogg' => 'data/sound/farm/sheep_01.ogg'
=== renamed file 'data/sound/farm/sheep_03.ogg' => 'data/sound/farm/sheep_02.ogg'
=== renamed file 'data/sound/fisher/fisher_pull_net_00.ogg' => 'data/sound/fisher/fisher_pull_net.ogg'
=== renamed file 'data/sound/fisher/fisher_throw_net_00.ogg' => 'data/sound/fisher/fisher_throw_net.ogg'
=== renamed file 'data/sound/hammering/geologist_hammer_00.ogg' => 'data/sound/hammering/geologist_hammer.ogg'
=== renamed file 'data/sound/lobby_chat_00.ogg' => 'data/sound/lobby_chat.ogg'
=== renamed file 'data/sound/lobby_freshmen_00.ogg' => 'data/sound/lobby_freshmen.ogg'
=== renamed file 'data/sound/metal/fizzle_01.ogg' => 'data/sound/metal/fizzle.ogg'
=== renamed file 'data/sound/metal/furnace_01.ogg' => 'data/sound/metal/furnace.ogg'
=== renamed file 'data/sound/metal/goldping_01.ogg' => 'data/sound/metal/goldping.ogg'
=== renamed file 'data/sound/metal/ironping_01.ogg' => 'data/sound/metal/ironping.ogg'
=== renamed file 'data/sound/military/site_occupied_00.ogg' => 'data/sound/military/site_occupied.ogg'
=== renamed file 'data/sound/military/under_attack_00.ogg' => 'data/sound/military/under_attack.ogg'
=== renamed file 'data/sound/mill/weaving_01.ogg' => 'data/sound/mill/weaving.ogg'
=== renamed file 'data/sound/smiths/sharpening_00.ogg' => 'data/sound/smiths/sharpening.ogg'
=== removed directory 'data/sound/spoken'
=== removed file 'data/sound/spoken/timber_00.ogg'
141Binary files data/sound/spoken/timber_00.ogg 2008-10-19 07:47:24 +0000 and data/sound/spoken/timber_00.ogg 1970-01-01 00:00:00 +0000 differ94Binary files data/sound/spoken/timber_00.ogg 2008-10-19 07:47:24 +0000 and data/sound/spoken/timber_00.ogg 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/sound/spoken/timber_01.ogg'
142Binary files data/sound/spoken/timber_01.ogg 2008-10-19 07:47:24 +0000 and data/sound/spoken/timber_01.ogg 1970-01-01 00:00:00 +0000 differ95Binary files data/sound/spoken/timber_01.ogg 2008-10-19 07:47:24 +0000 and data/sound/spoken/timber_01.ogg 1970-01-01 00:00:00 +0000 differ
=== renamed file 'data/sound/stonecutting/stonecutter_00.ogg' => 'data/sound/stonecutting/stonecutter.ogg'
=== renamed file 'data/sound/stonecutting/stonemason_00.ogg' => 'data/sound/stonecutting/stonemason.ogg'
=== modified file 'data/sound/wl-sound-docu.csv'
--- data/sound/wl-sound-docu.csv 2017-02-09 13:11:36 +0000
+++ data/sound/wl-sound-docu.csv 2019-05-27 14:29:35 +0000
@@ -1,53 +1,54 @@
1Widelands Sound Documentation (toptopple’s sounds added since BZR 8019),,,,,,,,,,1Widelands Sound Documentation (toptopple’s sounds added since BZR 8019),,,,,,,,,,
2There are some empty sounds to reduce the probability value of playing them below 1. You can recognize them by the file size of 3.6kB.,,,,,,,,,,
2,,,,,,,,,,3,,,,,,,,,,
3File Name,Format,Location,Usage,Author,License,reworked,Original File Name,Source,Orig. Format,BZR4File Name,Format,Location,Usage,Author,License,reworked,Original File Name,Source,Orig. Format,BZR
4,,,,,,,,,,5,,,,,,,,,,
6beerbubble_00.ogg,11025 – 16,sound/empire,empire.brewery,Julian Evans,CC-0,yes,338107__mentalsanityoff__beer-fermenter-gurgling-liquid-bubbles-glug.wav,http://www.freesound.org/people/MentalSanityOff/sounds/338107/,48000 – 24,8022
5beerbubble_01.ogg,11025 – 16,sound/empire,empire.brewery,Julian Evans,CC-0,yes,338107__mentalsanityoff__beer-fermenter-gurgling-liquid-bubbles-glug.wav,http://www.freesound.org/people/MentalSanityOff/sounds/338107/,48000 – 24,80227beerbubble_01.ogg,11025 – 16,sound/empire,empire.brewery,Julian Evans,CC-0,yes,338107__mentalsanityoff__beer-fermenter-gurgling-liquid-bubbles-glug.wav,http://www.freesound.org/people/MentalSanityOff/sounds/338107/,48000 – 24,8022
6beerbubble_02.ogg,11025 – 16,sound/empire,empire.brewery,Julian Evans,CC-0,yes,338107__mentalsanityoff__beer-fermenter-gurgling-liquid-bubbles-glug.wav,http://www.freesound.org/people/MentalSanityOff/sounds/338107/,48000 – 24,80228winebubble_00.ogg,22050 – 16,sound/empire,empire.winery,Michael Hinze,CC-0,yes,275578__hinzebeat__big-bubbles-on-water.wav,http://www.freesound.org/people/hinzebeat/sounds/275578/,44100 – 16,8022
7winebubble_01.ogg,22050 – 16,sound/empire,empire.winery,Michael Hinze,CC-0,yes,275578__hinzebeat__big-bubbles-on-water.wav,http://www.freesound.org/people/hinzebeat/sounds/275578/,44100 – 16,80229winebubble_01.ogg,22050 – 16,sound/empire,empire.winery,Michael Hinze,CC-0,yes,275578__hinzebeat__big-bubbles-on-water.wav,http://www.freesound.org/people/hinzebeat/sounds/275578/,44100 – 16,8022
8winebubble_02.ogg,22050 – 16,sound/empire,empire.winery,Michael Hinze,CC-0,yes,275578__hinzebeat__big-bubbles-on-water.wav,http://www.freesound.org/people/hinzebeat/sounds/275578/,44100 – 16,802210fizzle.ogg,11025 – 16,sound/metal,empire.smelting_works,luffy,CC-3,yes,17299__luffy__luffy-fire3alternate.wav,http://www.freesound.org/people/luffy/sounds/17299/,44100 – 16,8022
9fizzle_01.ogg,11025 – 16,sound/metal,empire.smelting_works,luffy,CC-3,yes,17299__luffy__luffy-fire3alternate.wav,http://www.freesound.org/people/luffy/sounds/17299/,44100 – 16,802211ironping.ogg,22050 – 16,sound/metal,empire.smelting_works,timgormly,CC-3,yes,170964__timgormly__metal-ping1.aiff,http://www.freesound.org/people/timgormly/sounds/170964/,44100 – 16,8022
10ironping_01.ogg,22050 – 16,sound/metal,empire.smelting_works,timgormly,CC-3,yes,170964__timgormly__metal-ping1.aiff,http://www.freesound.org/people/timgormly/sounds/170964/,44100 – 16,802212goldping.ogg,22050 – 16,sound/metal,empire.smelting_works,timgormly,CC-3,yes,170964__timgormly__metal-ping1.aiff,http://www.freesound.org/people/timgormly/sounds/170964/,44100 – 16,8022
11goldping_01.ogg,22050 – 16,sound/metal,empire.smelting_works,timgormly,CC-3,yes,170964__timgormly__metal-ping1.aiff,http://www.freesound.org/people/timgormly/sounds/170964/,44100 – 16,802213furnace.ogg,11025 – 16,sound/metal,barbarian.smelting_works,UNKNOWN,,yes,Fire-8.wav,UNKNOWN,22050,8022
12furnace_01.ogg,11025 – 16,sound/metal,barbarian.smelting_works,UNKNOWN,,yes,Fire-8.wav,UNKNOWN,22050,802214blackwood.ogg,11025 – 16,sound/barbarians,barbarian.wood_hardener,UNKNOWN,,,Creek-1.wav,UNKNOWN,11025-32,8029
13blackwood_01.ogg,11025 – 16,sound/barbarians,barbarian.wood_hardener,UNKNOWN,,,Creek-1.wav,UNKNOWN,11025-32,802915mortar.ogg,11025 – 16,sound/barbarians,barbarian.limekiln,qubodup,CC-0,yes,184383__qubodup__gathering-stone-resources.flac,http://www.freesound.org/people/qubodup/sounds/184383/,48000 – 16,8029
14mortar_01.ogg,11025 – 16,sound/barbarians,barbarian.limekiln,qubodup,CC-0,yes,184383__qubodup__gathering-stone-resources.flac,http://www.freesound.org/people/qubodup/sounds/184383/,48000 – 16,802916stonegrind.ogg,22050 – 16,sound/barbarians,barbarian.limekiln,timgormly,CC-3,yes,232102__thalamus-lab__stone-grind.wav,http://www.freesound.org/people/Thalamus_Lab/sounds/232102/,44100 – 32,8029
15stonegrind_01.ogg,22050 – 16,sound/barbarians,barbarian.limekiln,timgormly,CC-3,yes,232102__thalamus-lab__stone-grind.wav,http://www.freesound.org/people/Thalamus_Lab/sounds/232102/,44100 – 32,802917tavern_00.ogg,11025 – 16,sound/barbarians/taverns,,UNKNOWN,,,Dishes-21.wav,UNKNOWN,11025,8029
16tavern_01.ogg,11025 – 16,sound/barbarians/taverns,,UNKNOWN,,,Dishes-21.wav,UNKNOWN,11025,802918tavern_01.ogg,16000,sound/barbarians/taverns,,UNKNOWN,,,Dishes-1.wav,UNKNOWN,22050,8029
17tavern_02.ogg,16000,sound/barbarians/taverns,,UNKNOWN,,,Dishes-1.wav,UNKNOWN,22050,802919inn_00.ogg,22050 – 16,sound/barbarians/taverns,barbarian.inn,Eelke Dekker,CC-3,yes,192099__eelke__preparing-dishes.wav,http://www.freesound.org/people/Eelke/sounds/192099/,44100 – 32,8145
18inn_01.ogg,22050 – 16,sound/barbarians/taverns,barbarian.inn,Eelke Dekker,CC-3,yes,192099__eelke__preparing-dishes.wav,http://www.freesound.org/people/Eelke/sounds/192099/,44100 – 32,814520inn_01.ogg,22050 – 16,sound/barbarians/taverns,barbarian.inn,Hannebu,CC-0,yes,194806__hannebu__frying.wav,http://www.freesound.org/people/Hannebu/sounds/194806/,48000 – 24,8145
19inn_02.ogg,22050 – 16,sound/barbarians/taverns,barbarian.inn,Hannebu,CC-0,yes,194806__hannebu__frying.wav,http://www.freesound.org/people/Hannebu/sounds/194806/,48000 – 24,814521biginn_00.ogg,22050 – 16,sound/barbarians/taverns,barbarian.biginn,Eelke Dekker,CC-3,yes,192099__eelke__preparing-dishes.wav,http://www.freesound.org/people/Eelke/sounds/192099/,44100 – 32,8145
20biginn_01.ogg,22050 – 16,sound/barbarians/taverns,barbarian.biginn,Eelke Dekker,CC-3,yes,192099__eelke__preparing-dishes.wav,http://www.freesound.org/people/Eelke/sounds/192099/,44100 – 32,814522biginn_01.ogg,11025 – 16,sound/barbarians/taverns,barbarian.biginn,Mike Koenig,CC-3,yes,Glass Cookie Jar-SoundBible.com-2105585386.wav,http://soundbible.com/314-Glass-Cookie-Jar.html,32000 – 32,8145
21biginn_02.ogg,11025 – 16,sound/barbarians/taverns,barbarian.biginn,Mike Koenig,CC-3,yes,Glass Cookie Jar-SoundBible.com-2105585386.wav,http://soundbible.com/314-Glass-Cookie-Jar.html,32000 – 32,814523meal_00.ogg,,sound/empire/taverns,empire.biginn,DUPLICATE to inn_01.ogg,,,,,,8145
22meal_01.ogg,,sound/empire/taverns,empire.biginn,DUPLICATE to inn_01.ogg,,,,,,814524meal_01.ogg,22050 – 16,sound/empire/taverns,empire.biginn,UNKNOWN,,,Bottle-2.wav,UNKNOWN,22050 – 32,8145
23meal_02.ogg,22050 – 16,sound/empire/taverns,empire.biginn,UNKNOWN,,,Bottle-2.wav,UNKNOWN,22050 – 32,814525ration_00.ogg,,sound/empire/taverns,empire.inn,DUPLICATE to tavern_02.ogg,,,,,,8145
24ration_01.ogg,,sound/empire/taverns,empire.inn,DUPLICATE to tavern_02.ogg,,,,,,814526ration_01.ogg,,sound/empire/taverns,empire.inn,DUPLICATE to tavern_01.ogg,,,,,,8145
25ration_02.ogg,,sound/empire/taverns,empire.inn,DUPLICATE to tavern_01.ogg,,,,,,814527weaving.ogg,22050 – 32,sound/mill,"empire.weavingmill, atlanteans.weavingmill",Xavier Serra,CC-3,yes,320510__xserra__kerala-1.wav,http://www.freesound.org/people/xserra/sounds/320510/,44100 – 16,8251
26weaving_01.ogg,22050 – 32,sound/mill,"empire.weavingmill, atlanteans.weavingmill",Xavier Serra,CC-3,yes,320510__xserra__kerala-1.wav,http://www.freesound.org/people/xserra/sounds/320510/,44100 – 16,825128weaver.ogg,22050 – 32,sound/barbarians,barbarian.weavingmill,Yle Arkisto,CC-3,yes,368577__ylearkisto__kangaspuut-old-wooden-loom-from-1857-weaving-a-rag-rug.wav,http://www.freesound.org/people/YleArkisto/sounds/368577/,44100 – 24,8251
27weaver_01.ogg,22050 – 32,sound/barbarians,barbarian.weavingmill,Yle Arkisto,CC-3,yes,368577__ylearkisto__kangaspuut-old-wooden-loom-from-1857-weaving-a-rag-rug.wav,http://www.freesound.org/people/YleArkisto/sounds/368577/,44100 – 24,825129stonecutter_00.ogg,22050 – 32,sound/atlanteans/cutting,atlanteans.stonecutter,Benboncan,CC-3,yes,71823__benboncan__pickaxe-striking-rock.wav,http://www.freesound.org/people/Benboncan/sounds/71823/,44100 – 16,8251
28stonecutter_01.ogg,22050 – 32,sound/atlanteans/cutting,atlanteans.stonecutter,Benboncan,CC-3,yes,71823__benboncan__pickaxe-striking-rock.wav,http://www.freesound.org/people/Benboncan/sounds/71823/,44100 – 16,825130stonecutter_01.ogg,22050 – 32,sound/atlanteans/cutting,atlanteans.stonecutter,Benboncan,CC-3,yes,71823__benboncan__pickaxe-striking-rock.wav,http://www.freesound.org/people/Benboncan/sounds/71823/,44100 – 16,8251
29stonecutter_02.ogg,22050 – 32,sound/atlanteans/cutting,atlanteans.stonecutter,Benboncan,CC-3,yes,71823__benboncan__pickaxe-striking-rock.wav,http://www.freesound.org/people/Benboncan/sounds/71823/,44100 – 16,825131stonecutter_02.ogg,22050 – 32,sound/atlanteans/cutting,atlanteans.stonecutter,Benboncan,CC-3,yes,71823__benboncan__pickaxe-striking-rock.wav,http://www.freesound.org/people/Benboncan/sounds/71823/,44100 – 16,8251
30stonecutter_03.ogg,22050 – 32,sound/atlanteans/cutting,atlanteans.stonecutter,Benboncan,CC-3,yes,71823__benboncan__pickaxe-striking-rock.wav,http://www.freesound.org/people/Benboncan/sounds/71823/,44100 – 16,825132benchsaw_00.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.sawmill,mauxuam,CC-0,yes,216828__mauxuam__saw-of-avalon-2.wav,http://www.freesound.org/people/mauxuam/sounds/216828/,44100 – 16,8251
31benchsaw_01.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.sawmill,mauxuam,CC-0,yes,216828__mauxuam__saw-of-avalon-2.wav,http://www.freesound.org/people/mauxuam/sounds/216828/,44100 – 16,825133benchsaw_01.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.sawmill,mauxuam,CC-0,yes,216828__mauxuam__saw-of-avalon-2.wav,http://www.freesound.org/people/mauxuam/sounds/216828/,44100 – 16,8251
32benchsaw_02.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.sawmill,mauxuam,CC-0,yes,216828__mauxuam__saw-of-avalon-2.wav,http://www.freesound.org/people/mauxuam/sounds/216828/,44100 – 16,825134sawing_00.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.woodcutter,dobroide,CC-3,yes,102844__dobroide__20100802-sawing.wav,http://www.freesound.org/people/dobroide/sounds/102844/,44100 – 16,8251
33sawing_01.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.woodcutter,dobroide,CC-3,yes,102844__dobroide__20100802-sawing.wav,http://www.freesound.org/people/dobroide/sounds/102844/,44100 – 16,825135sawing_01.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.woodcutter,dobroide,CC-3,yes,102844__dobroide__20100802-sawing.wav,http://www.freesound.org/people/dobroide/sounds/102844/,44100 – 16,8251
34sawing_02.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.woodcutter,dobroide,CC-3,yes,102844__dobroide__20100802-sawing.wav,http://www.freesound.org/people/dobroide/sounds/102844/,44100 – 16,825136sawing_02.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.woodcutter,dobroide,CC-3,yes,102844__dobroide__20100802-sawing.wav,http://www.freesound.org/people/dobroide/sounds/102844/,44100 – 16,8251
35sawing_03.ogg,22050 – 32,sound/atlanteans/saw,atlanteans.woodcutter,dobroide,CC-3,yes,102844__dobroide__20100802-sawing.wav,http://www.freesound.org/people/dobroide/sounds/102844/,44100 – 16,825137goldspin_00.ogg,22050 – 32,sound/atlanteans,atlanteans.goldspinner,Mike Koenig,CC-3,yes,Metal Debris Falling-SoundBible.com-238218965.wav,http://soundbible.com/1099-Metal-Debris-Falling.html,44100 – 16,8251
36goldspin_01.ogg,22050 – 32,sound/atlanteans,atlanteans.goldspinner,Mike Koenig,CC-3,yes,Metal Debris Falling-SoundBible.com-238218965.wav,http://soundbible.com/1099-Metal-Debris-Falling.html,44100 – 16,825138goldspin_01.ogg,22050 – 32,sound/atlanteans,atlanteans.goldspinner,Mike Koenig,CC-3,yes,Metal Debris Falling-SoundBible.com-238218965.wav,http://soundbible.com/1099-Metal-Debris-Falling.html,44100 – 16,8251
37goldspin_02.ogg,22050 – 32,sound/atlanteans,atlanteans.goldspinner,Mike Koenig,CC-3,yes,Metal Debris Falling-SoundBible.com-238218965.wav,http://soundbible.com/1099-Metal-Debris-Falling.html,44100 – 16,825139tree_falling_00.ogg,11025 – 16,sound/woodcutting,woodcutters,ecfike,CC-0,yes,139952__ecfike__a-tree-falling-down.wav,http://www.freesound.org/people/ecfike/sounds/139952/,44100 – 16,new
38tree-falling_00.ogg,11025 – 16,sound/woodcutting,woodcutters,ecfike,CC-0,yes,139952__ecfike__a-tree-falling-down.wav,http://www.freesound.org/people/ecfike/sounds/139952/,44100 – 16,new40tree_falling_01.ogg,11025 – 16,sound/woodcutting,woodcutters,Daniel Simion,CC-3,yes,Tree_Fall_Small-Daniel_Simion-1639156552.wav,http://soundbible.com/2039-Tree-Fall-Small.html,44100 – 16,new
39tree-falling_01.ogg,11025 – 16,sound/woodcutting,woodcutters,Daniel Simion,CC-3,yes,Tree_Fall_Small-Daniel_Simion-1639156552.wav,http://soundbible.com/2039-Tree-Fall-Small.html,44100 – 16,new
40,,,,,,,,,,41,,,,,,,,,,
41boar_01.ogg,11025 – 16,data/sound/animals,,UNKNOWN,personal,yes,Pig-SoundBible.com-1026656068.wav,http://soundbible.com/736-Pig.html,11025,801942boar.ogg,11025 – 16,data/sound/animals,,UNKNOWN,personal,yes,Pig-SoundBible.com-1026656068.wav,http://soundbible.com/736-Pig.html,11025,8019
42elk_01.ogg,16000,data/sound/animals,,fws.gov,PD,yes,Elk Bellowing In Forest-SoundBible.com-681308174.wav,http://soundbible.com/245-Elk-Bellowing-In-Forest.html,48000,801943elk_00.ogg,16000,data/sound/animals,,fws.gov,PD,yes,Elk Bellowing In Forest-SoundBible.com-681308174.wav,http://soundbible.com/245-Elk-Bellowing-In-Forest.html,48000,8019
43elk_02.ogg,22050 – 16,data/sound/animals,,fws.gov,PD,yes,Elk Bellowing In Forest 2-SoundBible.com-860406835.wav,http://soundbible.com/246-Elk-Bellowing-In-Forest-2.html,48000,802944elk_01.ogg,22050 – 16,data/sound/animals,,fws.gov,PD,yes,Elk Bellowing In Forest 2-SoundBible.com-860406835.wav,http://soundbible.com/246-Elk-Bellowing-In-Forest-2.html,48000,8029
45stag_00.ogg,11025 – 16,data/sound/animals,,Juan Carlos,PD,yes,Red_stag_roar-Juan_Carlos_-2004708707.wav,http://soundbible.com/2073-Red-Stag-Roar.html,44100 – 16,8019
44stag_01.ogg,11025 – 16,data/sound/animals,,Juan Carlos,PD,yes,Red_stag_roar-Juan_Carlos_-2004708707.wav,http://soundbible.com/2073-Red-Stag-Roar.html,44100 – 16,801946stag_01.ogg,11025 – 16,data/sound/animals,,Juan Carlos,PD,yes,Red_stag_roar-Juan_Carlos_-2004708707.wav,http://soundbible.com/2073-Red-Stag-Roar.html,44100 – 16,8019
45stag_02.ogg,11025 – 16,data/sound/animals,,Juan Carlos,PD,yes,Red_stag_roar-Juan_Carlos_-2004708707.wav,http://soundbible.com/2073-Red-Stag-Roar.html,44100 – 16,801947coyote_00.ogg,11025 – 16,data/sound/animals,,UNKNOWN,PD,yes,Coyote Call-SoundBible.com-2012388009.wav,http://soundbible.com/977-Coyote-Call.html,44100 – 16,8019
46coyote_01.ogg,11025 – 16,data/sound/animals,,UNKNOWN,PD,yes,Coyote Call-SoundBible.com-2012388009.wav,http://soundbible.com/977-Coyote-Call.html,44100 – 16,801948coyote_01.ogg,11025 – 16,data/sound/animals,,UNKNOWN,PD,yes,Coyote Call-SoundBible.com-2012388009.wav,http://soundbible.com/977-Coyote-Call.html,44100 – 16,8019
47coyote_02.ogg,11025 – 16,data/sound/animals,,UNKNOWN,PD,yes,Coyote Call-SoundBible.com-2012388009.wav,http://soundbible.com/977-Coyote-Call.html,44100 – 16,801949wolf_00.ogg,11025 – 16,data/sound/animals,,UNKNOWN,,,Howl-5.wav,UNKNOWN,11025,8019
48wolf_01.ogg,11025 – 16,data/sound/animals,,UNKNOWN,,,Howl-5.wav,UNKNOWN,11025,801950wolf_01.ogg,22050 – 16,data/sound/animals,,UNKNOWN,,,Howl-4.wav,UNKNOWN,22050,8019
49wolf_02.ogg,22050 – 16,data/sound/animals,,UNKNOWN,,,Howl-4.wav,UNKNOWN,22050,801951wolf_02.ogg,11025 – 16,data/sound/animals,,UNKNOWN,,,Howl-6.wav,UNKNOWN,11025,8019
50wolf_03.ogg,11025 – 16,data/sound/animals,,UNKNOWN,,,Howl-6.wav,UNKNOWN,11025,801952sheep_00.ogg,22050 – 16,data/sound/farm,,UNKNOWN,,,Sheep-3.wav,UNKNOWN,22050,8019
51sheep_01.ogg,22050 – 16,data/sound/farm,,UNKNOWN,,,Sheep-3.wav,UNKNOWN,22050,801953sheep_01.ogg,22050 – 16,data/sound/farm,,UNKNOWN,,,Sheep-6.wav,UNKNOWN,22050,8019
52sheep_02.ogg,22050 – 16,data/sound/farm,,UNKNOWN,,,Sheep-6.wav,UNKNOWN,22050,801954sheep_02.ogg,22050 – 16,data/sound/farm,,UNKNOWN,,,Sheep-2.wav,UNKNOWN,22050,8019
53sheep_03.ogg,22050 – 16,data/sound/farm,,UNKNOWN,,,Sheep-2.wav,UNKNOWN,22050,8019
5455
=== removed file 'data/sound/woodcutting/tree-falling_10.ogg'
55Binary files data/sound/woodcutting/tree-falling_10.ogg 2017-02-07 18:05:21 +0000 and data/sound/woodcutting/tree-falling_10.ogg 1970-01-01 00:00:00 +0000 differ56Binary files data/sound/woodcutting/tree-falling_10.ogg 2017-02-07 18:05:21 +0000 and data/sound/woodcutting/tree-falling_10.ogg 1970-01-01 00:00:00 +0000 differ
=== renamed file 'data/sound/woodcutting/tree-falling_00.ogg' => 'data/sound/woodcutting/tree_falling_00.ogg'
=== renamed file 'data/sound/woodcutting/tree-falling_01.ogg' => 'data/sound/woodcutting/tree_falling_01.ogg'
=== renamed file 'data/sound/woodcutting/woodcutting_00.ogg' => 'data/sound/woodcutting/woodcutting.ogg'
=== modified file 'data/tribes/atlanteans.lua'
--- data/tribes/atlanteans.lua 2019-05-18 13:33:00 +0000
+++ data/tribes/atlanteans.lua 2019-05-27 14:29:35 +0000
@@ -5,10 +5,7 @@
5-- ---------------------5-- ---------------------
6--6--
7-- This file contains all the units for a tribe.7-- This file contains all the units for a tribe.
88--
9dirname = path.dirname(__file__)
10
11-- RST
12-- .. function:: new_tribe{table}9-- .. function:: new_tribe{table}
13--10--
14-- This function adds all units to a tribe.11-- This function adds all units to a tribe.
@@ -47,31 +44,25 @@
47-- **ship**: The internal name of the tribe's ship.44-- **ship**: The internal name of the tribe's ship.
48--45--
49-- **port**: The internal name of the tribe's port building. This unit needs to be defined in the ``buildings`` table too.46-- **port**: The internal name of the tribe's port building. This unit needs to be defined in the ``buildings`` table too.
47
48image_dirname = path.dirname(__file__) .. "images/atlanteans/"
49
50animations = {}
51add_animation(animations, "frontier", image_dirname, "frontier", {3, 12})
52add_animation(animations, "flag", image_dirname, "flag", {15, 35}, 10)
53
50tribes:new_tribe {54tribes:new_tribe {
51 name = "atlanteans",55 name = "atlanteans",
5256 animations = animations,
53 animations = {
54 -- Some blue fires would be fine, but just an idea
55 frontier = {
56 pictures = path.list_files(dirname .. "images/atlanteans/frontier_??.png"),
57 hotspot = { 3, 12 },
58 },
59 flag = {
60 -- Not just a plain color, maybe a cross or some stripes
61 pictures = path.list_files(dirname .. "images/atlanteans/flag_??.png"),
62 hotspot = { 15, 35 },
63 fps = 10
64 }
65 },
6657
67 -- Image file paths for this tribe's road textures58 -- Image file paths for this tribe's road textures
68 roads = {59 roads = {
69 busy = {60 busy = {
70 "tribes/images/atlanteans/roadt_busy.png",61 image_dirname .. "roadt_busy.png",
71 },62 },
72 normal = {63 normal = {
73 "tribes/images/atlanteans/roadt_normal_00.png",64 image_dirname .. "roadt_normal_00.png",
74 "tribes/images/atlanteans/roadt_normal_01.png",65 image_dirname .. "roadt_normal_01.png",
75 },66 },
76 },67 },
7768
7869
=== modified file 'data/tribes/barbarians.lua'
--- data/tribes/barbarians.lua 2019-05-25 10:47:18 +0000
+++ data/tribes/barbarians.lua 2019-05-27 14:29:35 +0000
@@ -1,28 +1,21 @@
1dirname = path.dirname(__file__)1image_dirname = path.dirname(__file__) .. "images/barbarians/"
2
3animations = {}
4add_animation(animations, "frontier", image_dirname, "frontier", {1, 19})
5add_animation(animations, "flag", image_dirname, "flag", {10, 38}, 5)
26
3tribes:new_tribe {7tribes:new_tribe {
4 name = "barbarians",8 name = "barbarians",
59 animations = animations,
6 animations = {
7 frontier = {
8 pictures = path.list_files(dirname .. "images/barbarians/frontier_??.png"),
9 hotspot = { 1, 19 },
10 },
11 flag = {
12 pictures = path.list_files(dirname .. "images/barbarians/flag_??.png"),
13 hotspot = { 10, 38 },
14 fps = 5
15 }
16 },
1710
18 -- Image file paths for this tribe's road textures11 -- Image file paths for this tribe's road textures
19 roads = {12 roads = {
20 busy = {13 busy = {
21 "tribes/images/barbarians/roadt_busy.png",14 image_dirname .. "roadt_busy.png",
22 },15 },
23 normal = {16 normal = {
24 "tribes/images/barbarians/roadt_normal_00.png",17 image_dirname .. "roadt_normal_00.png",
25 "tribes/images/barbarians/roadt_normal_01.png",18 image_dirname .. "roadt_normal_01.png",
26 },19 },
27 },20 },
2821
2922
=== modified file 'data/tribes/empire.lua'
--- data/tribes/empire.lua 2019-05-25 10:47:18 +0000
+++ data/tribes/empire.lua 2019-05-27 14:29:35 +0000
@@ -1,31 +1,22 @@
1dirname = path.dirname(__file__)1image_dirname = path.dirname(__file__) .. "images/empire/"
2
3animations = {}
4add_animation(animations, "frontier", image_dirname, "frontier", {1, 19})
5add_animation(animations, "flag", image_dirname, "flag", {14, 38}, 10)
26
3tribes:new_tribe {7tribes:new_tribe {
4 name = "empire",8 name = "empire",
59 animations = animations,
6 animations = {
7 -- No idea for the frontier. Maybe some javelins?
8 frontier = {
9 pictures = path.list_files(dirname .. "images/empire/frontier_??.png"),
10 hotspot = { 1, 19 },
11 },
12 -- Not just a plain color, maybe a cross or some stripes
13 flag = {
14 pictures = path.list_files(dirname .. "images/empire/flag_??.png"),
15 hotspot = { 14, 38 },
16 fps = 10
17 }
18 },
1910
20 -- Image file paths for this tribe's road textures11 -- Image file paths for this tribe's road textures
21 roads = {12 roads = {
22 busy = {13 busy = {
23 "tribes/images/empire/roadt_busy.png",14 image_dirname .. "roadt_busy.png",
24 },15 },
25 normal = {16 normal = {
26 "tribes/images/empire/roadt_normal_00.png",17 image_dirname .. "roadt_normal_00.png",
27 "tribes/images/empire/roadt_normal_01.png",18 image_dirname .. "roadt_normal_01.png",
28 "tribes/images/empire/roadt_normal_02.png",19 image_dirname .. "roadt_normal_02.png",
29 },20 },
30 },21 },
3122
3223
=== modified file 'data/tribes/frisians.lua'
--- data/tribes/frisians.lua 2019-05-25 10:47:18 +0000
+++ data/tribes/frisians.lua 2019-05-27 14:29:35 +0000
@@ -1,28 +1,21 @@
1dirname = path.dirname (__file__)1image_dirname = path.dirname(__file__) .. "images/frisians/"
2
3animations = {}
4add_animation(animations, "frontier", image_dirname, "frontier", {9, 26})
5add_animation(animations, "flag", image_dirname, "flag", {10, 39}, 10)
26
3tribes:new_tribe {7tribes:new_tribe {
4 name = "frisians",8 name = "frisians",
59 animations = animations,
6 animations = {
7 frontier = {
8 pictures = path.list_files (dirname .. "images/frisians/frontier_??.png"),
9 hotspot = { 9, 26 },
10 },
11 flag = {
12 pictures = path.list_files (dirname .. "images/frisians/flag_??.png"),
13 hotspot = { 10, 39 },
14 fps = 10,
15 }
16 },
1710
18 -- Image file paths for this tribe's road textures11 -- Image file paths for this tribe's road textures
19 roads = {12 roads = {
20 busy = {13 busy = {
21 "tribes/images/frisians/roadt_busy.png",14 image_dirname .. "roadt_busy.png",
22 },15 },
23 normal = {16 normal = {
24 "tribes/images/frisians/roadt_normal_00.png",17 image_dirname .. "roadt_normal_00.png",
25 "tribes/images/frisians/roadt_normal_01.png",18 image_dirname .. "roadt_normal_01.png",
26 },19 },
27 },20 },
2821
2922
=== modified file 'data/tribes/immovables/berry_bushes/blueberry/init.lua'
--- data/tribes/immovables/berry_bushes/blueberry/init.lua 2019-03-02 13:56:42 +0000
+++ data/tribes/immovables/berry_bushes/blueberry/init.lua 2019-05-27 14:29:35 +0000
@@ -10,7 +10,7 @@
10}10}
1111
12animations = {}12animations = {}
13add_animation(animations, "idle", dirname, "tiny/idle", { 6, 7 })13add_animation(animations, "idle", dirname .. "tiny", "idle", { 6, 7 })
1414
15tribes:new_immovable_type {15tribes:new_immovable_type {
16 msgctxt = "immovable",16 msgctxt = "immovable",
@@ -31,7 +31,7 @@
31}31}
3232
33animations = {}33animations = {}
34add_animation(animations, "idle", dirname, "small/idle", { 12, 13 })34add_animation(animations, "idle", dirname .. "small", "idle", { 12, 13 })
3535
36tribes:new_immovable_type {36tribes:new_immovable_type {
37 msgctxt = "immovable",37 msgctxt = "immovable",
@@ -52,7 +52,7 @@
52}52}
5353
54animations = {}54animations = {}
55add_animation(animations, "idle", dirname, "medium/idle", { 15, 16 })55add_animation(animations, "idle", dirname .. "medium", "idle", { 15, 16 })
5656
57tribes:new_immovable_type {57tribes:new_immovable_type {
58 msgctxt = "immovable",58 msgctxt = "immovable",
@@ -73,7 +73,7 @@
73}73}
7474
75animations = {}75animations = {}
76add_animation(animations, "idle", dirname, "ripe/idle", { 15, 16 })76add_animation(animations, "idle", dirname .. "ripe", "idle", { 15, 16 })
7777
78tribes:new_immovable_type {78tribes:new_immovable_type {
79 msgctxt = "immovable",79 msgctxt = "immovable",
8080
=== modified file 'data/tribes/immovables/berry_bushes/currant_black/init.lua'
--- data/tribes/immovables/berry_bushes/currant_black/init.lua 2019-03-02 13:56:42 +0000
+++ data/tribes/immovables/berry_bushes/currant_black/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8}8}
99
10animations = {}10animations = {}
11add_animation(animations, "idle", dirname, "tiny/idle", { 4, 10 })11add_animation(animations, "idle", dirname .. "tiny", "idle", { 4, 10 })
1212
13tribes:new_immovable_type {13tribes:new_immovable_type {
14 msgctxt = "immovable",14 msgctxt = "immovable",
@@ -29,7 +29,7 @@
29}29}
3030
31animations = {}31animations = {}
32add_animation(animations, "idle", dirname, "small/idle", { 8, 20 })32add_animation(animations, "idle", dirname .. "small", "idle", { 8, 20 })
3333
34tribes:new_immovable_type {34tribes:new_immovable_type {
35 msgctxt = "immovable",35 msgctxt = "immovable",
@@ -50,7 +50,7 @@
50}50}
5151
52animations = {}52animations = {}
53add_animation(animations, "idle", dirname, "medium/idle", { 13, 33 })53add_animation(animations, "idle", dirname .. "medium", "idle", { 13, 33 })
5454
55tribes:new_immovable_type {55tribes:new_immovable_type {
56 msgctxt = "immovable",56 msgctxt = "immovable",
@@ -71,7 +71,7 @@
71}71}
7272
73animations = {}73animations = {}
74add_animation(animations, "idle", dirname, "ripe/idle", { 13, 33 })74add_animation(animations, "idle", dirname .. "ripe", "idle", { 13, 33 })
7575
76tribes:new_immovable_type {76tribes:new_immovable_type {
77 msgctxt = "immovable",77 msgctxt = "immovable",
7878
=== modified file 'data/tribes/immovables/berry_bushes/currant_red/init.lua'
--- data/tribes/immovables/berry_bushes/currant_red/init.lua 2019-03-02 13:56:42 +0000
+++ data/tribes/immovables/berry_bushes/currant_red/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8}8}
99
10animations = {}10animations = {}
11add_animation(animations, "idle", dirname, "tiny/idle", { 4, 10 })11add_animation(animations, "idle", dirname .. "tiny", "idle", { 4, 10 })
1212
13tribes:new_immovable_type {13tribes:new_immovable_type {
14 msgctxt = "immovable",14 msgctxt = "immovable",
@@ -29,7 +29,7 @@
29}29}
3030
31animations = {}31animations = {}
32add_animation(animations, "idle", dirname, "small/idle", { 8, 20 })32add_animation(animations, "idle", dirname .. "small", "idle", { 8, 20 })
3333
34tribes:new_immovable_type {34tribes:new_immovable_type {
35 msgctxt = "immovable",35 msgctxt = "immovable",
@@ -50,7 +50,7 @@
50}50}
5151
52animations = {}52animations = {}
53add_animation(animations, "idle", dirname, "medium/idle", { 13, 33 })53add_animation(animations, "idle", dirname .. "medium", "idle", { 13, 33 })
5454
55tribes:new_immovable_type {55tribes:new_immovable_type {
56 msgctxt = "immovable",56 msgctxt = "immovable",
@@ -71,7 +71,7 @@
71}71}
7272
73animations = {}73animations = {}
74add_animation(animations, "idle", dirname, "ripe/idle", { 13, 33 })74add_animation(animations, "idle", dirname .. "ripe", "idle", { 13, 33 })
7575
76tribes:new_immovable_type {76tribes:new_immovable_type {
77 msgctxt = "immovable",77 msgctxt = "immovable",
7878
=== modified file 'data/tribes/immovables/berry_bushes/desert_hackberry/init.lua'
--- data/tribes/immovables/berry_bushes/desert_hackberry/init.lua 2019-03-02 13:56:42 +0000
+++ data/tribes/immovables/berry_bushes/desert_hackberry/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8}8}
99
10animations = {}10animations = {}
11add_animation(animations, "idle", dirname, "tiny/idle", { 10, 9 })11add_animation(animations, "idle", dirname .. "tiny", "idle", { 10, 9 })
1212
13tribes:new_immovable_type {13tribes:new_immovable_type {
14 msgctxt = "immovable",14 msgctxt = "immovable",
@@ -29,7 +29,7 @@
29}29}
3030
31animations = {}31animations = {}
32add_animation(animations, "idle", dirname, "small/idle", { 19, 21 })32add_animation(animations, "idle", dirname .. "small", "idle", { 19, 21 })
3333
34tribes:new_immovable_type {34tribes:new_immovable_type {
35 msgctxt = "immovable",35 msgctxt = "immovable",
@@ -50,7 +50,7 @@
50}50}
5151
52animations = {}52animations = {}
53add_animation(animations, "idle", dirname, "medium/idle", { 21, 27 })53add_animation(animations, "idle", dirname .. "medium", "idle", { 21, 27 })
5454
55tribes:new_immovable_type {55tribes:new_immovable_type {
56 msgctxt = "immovable",56 msgctxt = "immovable",
@@ -71,7 +71,7 @@
71}71}
7272
73animations = {}73animations = {}
74add_animation(animations, "idle", dirname, "ripe/idle", { 21, 27 })74add_animation(animations, "idle", dirname .. "ripe", "idle", { 21, 27 })
7575
76tribes:new_immovable_type {76tribes:new_immovable_type {
77 msgctxt = "immovable",77 msgctxt = "immovable",
7878
=== modified file 'data/tribes/immovables/berry_bushes/juniper/init.lua'
--- data/tribes/immovables/berry_bushes/juniper/init.lua 2019-03-02 13:56:42 +0000
+++ data/tribes/immovables/berry_bushes/juniper/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8}8}
99
10animations = {}10animations = {}
11add_animation(animations, "idle", dirname, "tiny/idle", { 3, 15 })11add_animation(animations, "idle", dirname .. "tiny", "idle", { 3, 15 })
1212
13tribes:new_immovable_type {13tribes:new_immovable_type {
14 msgctxt = "immovable",14 msgctxt = "immovable",
@@ -29,7 +29,7 @@
29}29}
3030
31animations = {}31animations = {}
32add_animation(animations, "idle", dirname, "small/idle", { 6, 30 })32add_animation(animations, "idle", dirname .. "small", "idle", { 6, 30 })
3333
34tribes:new_immovable_type {34tribes:new_immovable_type {
35 msgctxt = "immovable",35 msgctxt = "immovable",
@@ -50,7 +50,7 @@
50}50}
5151
52animations = {}52animations = {}
53add_animation(animations, "idle", dirname, "medium/idle", { 10, 47 })53add_animation(animations, "idle", dirname .. "medium", "idle", { 10, 47 })
5454
55tribes:new_immovable_type {55tribes:new_immovable_type {
56 msgctxt = "immovable",56 msgctxt = "immovable",
@@ -71,7 +71,7 @@
71}71}
7272
73animations = {}73animations = {}
74add_animation(animations, "idle", dirname, "ripe/idle", { 11, 49 })74add_animation(animations, "idle", dirname .. "ripe", "idle", { 11, 49 })
7575
76tribes:new_immovable_type {76tribes:new_immovable_type {
77 msgctxt = "immovable",77 msgctxt = "immovable",
7878
=== modified file 'data/tribes/immovables/berry_bushes/raspberry/init.lua'
--- data/tribes/immovables/berry_bushes/raspberry/init.lua 2019-03-02 13:56:42 +0000
+++ data/tribes/immovables/berry_bushes/raspberry/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8}8}
99
10animations = {}10animations = {}
11add_animation(animations, "idle", dirname, "tiny/idle", { 4, 7 })11add_animation(animations, "idle", dirname .. "tiny", "idle", { 4, 7 })
1212
13tribes:new_immovable_type {13tribes:new_immovable_type {
14 msgctxt = "immovable",14 msgctxt = "immovable",
@@ -29,7 +29,7 @@
29}29}
3030
31animations = {}31animations = {}
32add_animation(animations, "idle", dirname, "small/idle", { 16, 31 })32add_animation(animations, "idle", dirname .. "small", "idle", { 16, 31 })
3333
34tribes:new_immovable_type {34tribes:new_immovable_type {
35 msgctxt = "immovable",35 msgctxt = "immovable",
@@ -50,7 +50,7 @@
50}50}
5151
52animations = {}52animations = {}
53add_animation(animations, "idle", dirname, "medium/idle", { 17, 34 })53add_animation(animations, "idle", dirname .. "medium", "idle", { 17, 34 })
5454
55tribes:new_immovable_type {55tribes:new_immovable_type {
56 msgctxt = "immovable",56 msgctxt = "immovable",
@@ -71,7 +71,7 @@
71}71}
7272
73animations = {}73animations = {}
74add_animation(animations, "idle", dirname, "ripe/idle", { 17, 34 })74add_animation(animations, "idle", dirname .. "ripe", "idle", { 17, 34 })
7575
76tribes:new_immovable_type {76tribes:new_immovable_type {
77 msgctxt = "immovable",77 msgctxt = "immovable",
7878
=== modified file 'data/tribes/immovables/berry_bushes/sea_buckthorn/init.lua'
--- data/tribes/immovables/berry_bushes/sea_buckthorn/init.lua 2019-03-02 13:56:42 +0000
+++ data/tribes/immovables/berry_bushes/sea_buckthorn/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8}8}
99
10animations = {}10animations = {}
11add_animation(animations, "idle", dirname, "tiny/idle", { 9, 19 })11add_animation(animations, "idle", dirname .. "tiny", "idle", { 9, 19 })
1212
13tribes:new_immovable_type {13tribes:new_immovable_type {
14 msgctxt = "immovable",14 msgctxt = "immovable",
@@ -29,7 +29,7 @@
29}29}
3030
31animations = {}31animations = {}
32add_animation(animations, "idle", dirname, "small/idle", { 14, 32 })32add_animation(animations, "idle", dirname .. "small", "idle", { 14, 32 })
3333
34tribes:new_immovable_type {34tribes:new_immovable_type {
35 msgctxt = "immovable",35 msgctxt = "immovable",
@@ -50,7 +50,7 @@
50}50}
5151
52animations = {}52animations = {}
53add_animation(animations, "idle", dirname, "medium/idle", { 17, 40 })53add_animation(animations, "idle", dirname .. "medium", "idle", { 17, 40 })
5454
55tribes:new_immovable_type {55tribes:new_immovable_type {
56 msgctxt = "immovable",56 msgctxt = "immovable",
@@ -71,7 +71,7 @@
71}71}
7272
73animations = {}73animations = {}
74add_animation(animations, "idle", dirname, "ripe/idle", { 17, 40 })74add_animation(animations, "idle", dirname .. "ripe", "idle", { 17, 40 })
7575
76tribes:new_immovable_type {76tribes:new_immovable_type {
77 msgctxt = "immovable",77 msgctxt = "immovable",
7878
=== modified file 'data/tribes/immovables/berry_bushes/strawberry/init.lua'
--- data/tribes/immovables/berry_bushes/strawberry/init.lua 2019-03-02 13:56:42 +0000
+++ data/tribes/immovables/berry_bushes/strawberry/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8}8}
99
10animations = {}10animations = {}
11add_animation(animations, "idle", dirname, "tiny/idle", { 4, 4 })11add_animation(animations, "idle", dirname .. "tiny", "idle", { 4, 4 })
1212
13tribes:new_immovable_type {13tribes:new_immovable_type {
14 msgctxt = "immovable",14 msgctxt = "immovable",
@@ -29,7 +29,7 @@
29}29}
3030
31animations = {}31animations = {}
32add_animation(animations, "idle", dirname, "small/idle", { 12, 9 })32add_animation(animations, "idle", dirname .. "small", "idle", { 12, 9 })
3333
34tribes:new_immovable_type {34tribes:new_immovable_type {
35 msgctxt = "immovable",35 msgctxt = "immovable",
@@ -50,7 +50,7 @@
50}50}
5151
52animations = {}52animations = {}
53add_animation(animations, "idle", dirname, "medium/idle", { 21, 15 })53add_animation(animations, "idle", dirname .. "medium", "idle", { 21, 15 })
5454
55tribes:new_immovable_type {55tribes:new_immovable_type {
56 msgctxt = "immovable",56 msgctxt = "immovable",
@@ -71,7 +71,7 @@
71}71}
7272
73animations = {}73animations = {}
74add_animation(animations, "idle", dirname, "ripe/idle", { 21, 15 })74add_animation(animations, "idle", dirname .. "ripe", "idle", { 21, 15 })
7575
76tribes:new_immovable_type {76tribes:new_immovable_type {
77 msgctxt = "immovable",77 msgctxt = "immovable",
7878
=== modified file 'data/tribes/ships/atlanteans/init.lua'
--- data/tribes/ships/atlanteans/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/ships/atlanteans/init.lua 2019-05-27 14:29:35 +0000
@@ -24,7 +24,7 @@
24 fps = 724 fps = 7
25 }25 }
26}26}
27add_walking_animations(animations, "sail", dirname, "sail", {89, 86}, 10)27add_directional_animation(animations, "sail", dirname, "sail", {89, 86}, 10)
2828
2929
30-- RST30-- RST
3131
=== modified file 'data/tribes/ships/barbarians/init.lua'
--- data/tribes/ships/barbarians/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/ships/barbarians/init.lua 2019-05-27 14:29:35 +0000
@@ -7,7 +7,7 @@
7 fps = 107 fps = 10
8 }8 }
9}9}
10add_walking_animations(animations, "sail", dirname, "sail", {115, 76}, 10)10add_directional_animation(animations, "sail", dirname, "sail", {115, 76}, 10)
1111
1212
13tribes:new_ship_type {13tribes:new_ship_type {
1414
=== modified file 'data/tribes/ships/empire/init.lua'
--- data/tribes/ships/empire/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/ships/empire/init.lua 2019-05-27 14:29:35 +0000
@@ -7,7 +7,7 @@
7 fps = 107 fps = 10
8 }8 }
9}9}
10add_walking_animations(animations, "sail", dirname, "sail", {115, 100}, 10)10add_directional_animation(animations, "sail", dirname, "sail", {115, 100}, 10)
1111
1212
13tribes:new_ship_type {13tribes:new_ship_type {
1414
=== modified file 'data/tribes/ships/frisians/init.lua'
--- data/tribes/ships/frisians/init.lua 2018-02-08 17:18:30 +0000
+++ data/tribes/ships/frisians/init.lua 2019-05-27 14:29:35 +0000
@@ -12,7 +12,7 @@
12 fps = 712 fps = 7
13 }13 }
14}14}
15add_walking_animations (animations, "sail", dirname, "sail", {146, 153}, 10)15add_directional_animation(animations, "sail", dirname, "sail", {146, 153}, 10)
1616
17tribes:new_ship_type {17tribes:new_ship_type {
18 name = "frisians_ship",18 name = "frisians_ship",
1919
=== modified file 'data/tribes/workers/atlanteans/armorsmith/init.lua'
--- data/tribes/workers/atlanteans/armorsmith/init.lua 2017-08-30 16:46:00 +0000
+++ data/tribes/workers/atlanteans/armorsmith/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 hotspot = { 10, 21 },21 hotspot = { 10, 21 },
22 }22 }
23}23}
24add_walking_animations(animations, "walk", dirname, "walk", {8, 23}, 10)24add_directional_animation(animations, "walk", dirname, "walk", {8, 23}, 10)
25add_walking_animations(animations, "walkload", dirname, "walkload", {8, 23}, 10)25add_directional_animation(animations, "walkload", dirname, "walkload", {8, 23}, 10)
2626
27-- RST27-- RST
28-- .. function:: new_worker_type{table}28-- .. function:: new_worker_type{table}
2929
=== modified file 'data/tribes/workers/atlanteans/baker/init.lua'
--- data/tribes/workers/atlanteans/baker/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/baker/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 5, 23 },6 hotspot = { 5, 23 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {7, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {7, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {9, 25}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {9, 25}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/blackroot_farmer/init.lua'
--- data/tribes/workers/atlanteans/blackroot_farmer/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/atlanteans/blackroot_farmer/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 1021 fps = 10
22 }22 }
23}23}
24add_walking_animations(animations, "walk", dirname, "walk", {13, 24}, 10)24add_directional_animation(animations, "walk", dirname, "walk", {13, 24}, 10)
25add_walking_animations(animations, "walkload", dirname, "walk", {13, 24}, 10)25add_directional_animation(animations, "walkload", dirname, "walk", {13, 24}, 10)
2626
2727
28tribes:new_worker_type {28tribes:new_worker_type {
2929
=== modified file 'data/tribes/workers/atlanteans/builder/init.lua'
--- data/tribes/workers/atlanteans/builder/init.lua 2019-03-17 08:30:43 +0000
+++ data/tribes/workers/atlanteans/builder/init.lua 2019-05-27 14:29:35 +0000
@@ -16,8 +16,8 @@
16 fps=10,16 fps=10,
17 }17 }
18}18}
19add_walking_animations(animations, "walk", dirname, "walk", {8, 24}, 10)19add_directional_animation(animations, "walk", dirname, "walk", {8, 24}, 10)
20add_walking_animations(animations, "walkload", dirname, "walk", {8, 24}, 10)20add_directional_animation(animations, "walkload", dirname, "walk", {8, 24}, 10)
2121
2222
23tribes:new_worker_type {23tribes:new_worker_type {
2424
=== modified file 'data/tribes/workers/atlanteans/carrier/init.lua'
--- data/tribes/workers/atlanteans/carrier/init.lua 2018-11-30 10:36:42 +0000
+++ data/tribes/workers/atlanteans/carrier/init.lua 2019-05-27 14:29:35 +0000
@@ -15,15 +15,10 @@
1515
16dirname = path.dirname(__file__)16dirname = path.dirname(__file__)
1717
18animations = {18animations = {}
19 idle = {19add_animation(animations, "idle", dirname, "idle", {13, 24}, 10)
20 pictures = path.list_files(dirname .. "idle_??.png"),20add_directional_animation(animations, "walk", dirname, "walk", {8, 25}, 10)
21 hotspot = { 13, 24 },21add_directional_animation(animations, "walkload", dirname, "walkload", {8, 25}, 10)
22 fps=10,
23 }
24}
25add_walking_animations(animations, "walk", dirname, "walk", {8, 25}, 10)
26add_walking_animations(animations, "walkload", dirname, "walkload", {8, 25}, 10)
2722
28-- RST23-- RST
29-- .. function:: new_carrier_type{table}24-- .. function:: new_carrier_type{table}
3025
=== modified file 'data/tribes/workers/atlanteans/charcoal_burner/init.lua'
--- data/tribes/workers/atlanteans/charcoal_burner/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/charcoal_burner/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 22 }6 hotspot = { 4, 22 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 22}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 22}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/farmer/init.lua'
--- data/tribes/workers/atlanteans/farmer/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/atlanteans/farmer/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 521 fps = 5
22 }22 }
23}23}
24add_walking_animations(animations, "walk", dirname, "walk", {18, 23}, 10)24add_directional_animation(animations, "walk", dirname, "walk", {18, 23}, 10)
25add_walking_animations(animations, "walkload", dirname, "walk", {18, 23}, 10)25add_directional_animation(animations, "walkload", dirname, "walk", {18, 23}, 10)
2626
2727
28tribes:new_worker_type {28tribes:new_worker_type {
2929
=== modified file 'data/tribes/workers/atlanteans/fishbreeder/init.lua'
--- data/tribes/workers/atlanteans/fishbreeder/init.lua 2017-11-18 17:49:18 +0000
+++ data/tribes/workers/atlanteans/fishbreeder/init.lua 2019-05-27 14:29:35 +0000
@@ -11,7 +11,7 @@
11 fps = 1011 fps = 10
12 }12 }
13}13}
14add_walking_animations(animations, "walk", dirname, "walk", {11, 23}, 20)14add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 20)
1515
16tribes:new_worker_type {16tribes:new_worker_type {
17 msgctxt = "atlanteans_worker",17 msgctxt = "atlanteans_worker",
1818
=== modified file 'data/tribes/workers/atlanteans/fisher/init.lua'
--- data/tribes/workers/atlanteans/fisher/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/atlanteans/fisher/init.lua 2019-05-27 14:29:35 +0000
@@ -11,8 +11,8 @@
11 fps = 1011 fps = 10
12 }12 }
13}13}
14add_walking_animations(animations, "walk", dirname, "walk", {8, 21}, 20)14add_directional_animation(animations, "walk", dirname, "walk", {8, 21}, 20)
15add_walking_animations(animations, "walkload", dirname, "walkload", {8, 20}, 10)15add_directional_animation(animations, "walkload", dirname, "walkload", {8, 20}, 10)
1616
1717
18tribes:new_worker_type {18tribes:new_worker_type {
1919
=== modified file 'data/tribes/workers/atlanteans/forester/init.lua'
--- data/tribes/workers/atlanteans/forester/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/atlanteans/forester/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 521 fps = 5
22 }22 }
23}23}
24add_walking_animations(animations, "walk", dirname, "walk", {10, 23}, 10)24add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 10)
25add_walking_animations(animations, "walkload", dirname, "walk", {10, 23}, 10)25add_directional_animation(animations, "walkload", dirname, "walk", {10, 23}, 10)
2626
2727
28tribes:new_worker_type {28tribes:new_worker_type {
2929
=== modified file 'data/tribes/workers/atlanteans/geologist/init.lua'
--- data/tribes/workers/atlanteans/geologist/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/atlanteans/geologist/init.lua 2019-05-27 14:29:35 +0000
@@ -12,8 +12,8 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations(animations, "walk", dirname, "walk", {11, 23}, 10)15add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 10)
16add_walking_animations(animations, "walkload", dirname, "walk", {11, 23}, 10)16add_directional_animation(animations, "walkload", dirname, "walk", {11, 23}, 10)
1717
1818
19tribes:new_worker_type {19tribes:new_worker_type {
2020
=== modified file 'data/tribes/workers/atlanteans/horse/init.lua'
--- data/tribes/workers/atlanteans/horse/init.lua 2019-05-18 13:04:13 +0000
+++ data/tribes/workers/atlanteans/horse/init.lua 2019-05-27 14:29:35 +0000
@@ -7,8 +7,8 @@
7 fps = 107 fps = 10
8 }8 }
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {19, 33}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {19, 33}, 10)
11add_walking_animations(animations, "walkload", dirname, "walk", {19, 33}, 10) -- TODO(GunChleoc): Make animation11add_directional_animation(animations, "walkload", dirname, "walk", {19, 33}, 10) -- TODO(GunChleoc): Make animation
1212
1313
14tribes:new_carrier_type {14tribes:new_carrier_type {
1515
=== modified file 'data/tribes/workers/atlanteans/horsebreeder/init.lua'
--- data/tribes/workers/atlanteans/horsebreeder/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/horsebreeder/init.lua 2019-05-27 14:29:35 +0000
@@ -6,7 +6,7 @@
6 hotspot = { 8, 23 },6 hotspot = { 8, 23 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {35, 28}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {35, 28}, 10)
1010
11tribes:new_worker_type {11tribes:new_worker_type {
12 msgctxt = "atlanteans_worker",12 msgctxt = "atlanteans_worker",
1313
=== modified file 'data/tribes/workers/atlanteans/hunter/init.lua'
--- data/tribes/workers/atlanteans/hunter/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/atlanteans/hunter/init.lua 2019-05-27 14:29:35 +0000
@@ -7,8 +7,8 @@
7 fps = 107 fps = 10
8 }8 }
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {14, 22}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {14, 22}, 10)
11add_walking_animations(animations, "walkload", dirname, "walkload", {13, 23}, 10)11add_directional_animation(animations, "walkload", dirname, "walkload", {13, 23}, 10)
1212
1313
14tribes:new_worker_type {14tribes:new_worker_type {
1515
=== modified file 'data/tribes/workers/atlanteans/miller/init.lua'
--- data/tribes/workers/atlanteans/miller/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/miller/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 22 }6 hotspot = { 4, 22 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 22}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 22}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/miner/init.lua'
--- data/tribes/workers/atlanteans/miner/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/miner/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 3, 23 }6 hotspot = { 3, 23 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {10, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {10, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {10, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/recruit/init.lua'
--- data/tribes/workers/atlanteans/recruit/init.lua 2017-05-25 20:30:41 +0000
+++ data/tribes/workers/atlanteans/recruit/init.lua 2019-05-27 14:29:35 +0000
@@ -7,7 +7,7 @@
7 fps = 57 fps = 5
8 },8 },
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {20, 30}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {20, 30}, 10)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "atlanteans_worker",13 msgctxt = "atlanteans_worker",
1414
=== modified file 'data/tribes/workers/atlanteans/sawyer/init.lua'
--- data/tribes/workers/atlanteans/sawyer/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/sawyer/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 5, 31 }6 hotspot = { 5, 31 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {16, 31}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {16, 31}, 10)
10add_walking_animations(animations, "walkload", dirname, "walk", {16, 31}, 10)10add_directional_animation(animations, "walkload", dirname, "walk", {16, 31}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/scout/init.lua'
--- data/tribes/workers/atlanteans/scout/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/atlanteans/scout/init.lua 2019-05-27 14:29:35 +0000
@@ -6,7 +6,7 @@
6 hotspot = { 4, 22 },6 hotspot = { 4, 22 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {9, 25}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {9, 25}, 10)
1010
11tribes:new_worker_type {11tribes:new_worker_type {
12 msgctxt = "atlanteans_worker",12 msgctxt = "atlanteans_worker",
1313
=== modified file 'data/tribes/workers/atlanteans/shipwright/init.lua'
--- data/tribes/workers/atlanteans/shipwright/init.lua 2019-03-17 08:30:43 +0000
+++ data/tribes/workers/atlanteans/shipwright/init.lua 2019-05-27 14:29:35 +0000
@@ -11,8 +11,8 @@
11 fps = 1011 fps = 10
12 }12 }
13}13}
14add_walking_animations(animations, "walk", dirname, "walk", {12, 28}, 10)14add_directional_animation(animations, "walk", dirname, "walk", {12, 28}, 10)
15add_walking_animations(animations, "walkload", dirname, "walkload", {12, 28}, 10)15add_directional_animation(animations, "walkload", dirname, "walkload", {12, 28}, 10)
1616
1717
18tribes:new_worker_type {18tribes:new_worker_type {
1919
=== modified file 'data/tribes/workers/atlanteans/smelter/init.lua'
--- data/tribes/workers/atlanteans/smelter/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/smelter/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 10, 22 }6 hotspot = { 10, 22 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {12, 22}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {12, 22}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {12, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {12, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/smoker/init.lua'
--- data/tribes/workers/atlanteans/smoker/init.lua 2018-08-29 11:31:58 +0000
+++ data/tribes/workers/atlanteans/smoker/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 17, 22 }6 hotspot = { 17, 22 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {20, 22}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {20, 22}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {20, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {20, 24}, 10)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "atlanteans_worker",13 msgctxt = "atlanteans_worker",
1414
=== modified file 'data/tribes/workers/atlanteans/soldier/init.lua'
--- data/tribes/workers/atlanteans/soldier/init.lua 2019-05-19 09:36:33 +0000
+++ data/tribes/workers/atlanteans/soldier/init.lua 2019-05-27 14:29:35 +0000
@@ -71,7 +71,7 @@
71 fps = 1071 fps = 10
72 }72 }
73}73}
74add_walking_animations(animations, "walk", dirname, "walk", {20, 34}, 10)74add_directional_animation(animations, "walk", dirname, "walk", {20, 34}, 10)
7575
76all_levels_atl = {76all_levels_atl = {
77 min_health = 0,77 min_health = 0,
7878
=== modified file 'data/tribes/workers/atlanteans/spiderbreeder/init.lua'
--- data/tribes/workers/atlanteans/spiderbreeder/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/spiderbreeder/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 8, 22 }6 hotspot = { 8, 22 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {10, 22}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {10, 22}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {10, 22}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 22}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/stonecutter/init.lua'
--- data/tribes/workers/atlanteans/stonecutter/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/atlanteans/stonecutter/init.lua 2019-05-27 14:29:35 +0000
@@ -11,8 +11,8 @@
11 fps = 1011 fps = 10
12 }12 }
13}13}
14add_walking_animations(animations, "walk", dirname, "walk", {10, 21}, 10)14add_directional_animation(animations, "walk", dirname, "walk", {10, 21}, 10)
15add_walking_animations(animations, "walkload", dirname, "walkload", {10, 23}, 10)15add_directional_animation(animations, "walkload", dirname, "walkload", {10, 23}, 10)
1616
1717
18tribes:new_worker_type {18tribes:new_worker_type {
1919
=== modified file 'data/tribes/workers/atlanteans/toolsmith/init.lua'
--- data/tribes/workers/atlanteans/toolsmith/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/toolsmith/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 10, 21 }6 hotspot = { 10, 21 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 23}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 23}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 23}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/trainer/init.lua'
--- data/tribes/workers/atlanteans/trainer/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/trainer/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 11, 21 }6 hotspot = { 11, 21 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {14, 21}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {14, 21}, 10)
10add_walking_animations(animations, "walkload", dirname, "walk", {14, 21}, 10)10add_directional_animation(animations, "walkload", dirname, "walk", {14, 21}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/weaponsmith/init.lua'
--- data/tribes/workers/atlanteans/weaponsmith/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/weaponsmith/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 10, 21 }6 hotspot = { 10, 21 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 23}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 23}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 23}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/weaver/init.lua'
--- data/tribes/workers/atlanteans/weaver/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/atlanteans/weaver/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 2, 22 }6 hotspot = { 2, 22 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {6, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {6, 23}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {9, 22}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {9, 22}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/atlanteans/woodcutter/init.lua'
--- data/tribes/workers/atlanteans/woodcutter/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/atlanteans/woodcutter/init.lua 2019-05-27 14:29:35 +0000
@@ -11,8 +11,8 @@
11 fps = 1011 fps = 10
12 }12 }
13}13}
14add_walking_animations(animations, "walk", dirname, "walk", {16, 31}, 10)14add_directional_animation(animations, "walk", dirname, "walk", {16, 31}, 10)
15add_walking_animations(animations, "walkload", dirname, "walkload", {13, 29}, 10)15add_directional_animation(animations, "walkload", dirname, "walkload", {13, 29}, 10)
1616
1717
18tribes:new_worker_type {18tribes:new_worker_type {
@@ -35,7 +35,7 @@
35 "walk=object",35 "walk=object",
36 "playsound=sound/atlanteans/saw/sawing 230",36 "playsound=sound/atlanteans/saw/sawing 230",
37 "animate=sawing 10000",37 "animate=sawing 10000",
38 "playsound=sound/woodcutting/tree-falling 130",38 "playsound=sound/woodcutting/tree_falling 130",
39 "callobject=fall",39 "callobject=fall",
40 "animate=idle 2000",40 "animate=idle 2000",
41 "createware=log",41 "createware=log",
4242
=== modified file 'data/tribes/workers/barbarians/baker/init.lua'
--- data/tribes/workers/barbarians/baker/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/baker/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 5, 23 },6 hotspot = { 5, 23 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {7, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {7, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {9, 25}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {9, 25}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/blacksmith/init.lua'
--- data/tribes/workers/barbarians/blacksmith/init.lua 2017-12-07 08:33:46 +0000
+++ data/tribes/workers/barbarians/blacksmith/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 6, 28 },6 hotspot = { 6, 28 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {11, 24}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
10add_walking_animations(animations, "walkload", dirname, "walk", {11, 24}, 15)10add_directional_animation(animations, "walkload", dirname, "walk", {11, 24}, 15)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/blacksmith_master/init.lua'
--- data/tribes/workers/barbarians/blacksmith_master/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/blacksmith_master/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 3, 22 },6 hotspot = { 3, 22 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {6, 22}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {6, 22}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {9, 23}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {9, 23}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/brewer/init.lua'
--- data/tribes/workers/barbarians/brewer/init.lua 2017-12-07 08:33:46 +0000
+++ data/tribes/workers/barbarians/brewer/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 7, 22 },6 hotspot = { 7, 22 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {12, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {12, 23}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {11, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {11, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/brewer_master/init.lua'
--- data/tribes/workers/barbarians/brewer_master/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/brewer_master/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 8, 26 },6 hotspot = { 8, 26 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {15, 26}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {15, 26}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {11, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {11, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/builder/init.lua'
--- data/tribes/workers/barbarians/builder/init.lua 2019-04-24 06:32:02 +0000
+++ data/tribes/workers/barbarians/builder/init.lua 2019-05-27 14:29:35 +0000
@@ -7,8 +7,8 @@
7 path = "sound/hammering/hammering",7 path = "sound/hammering/hammering",
8 priority = 648 priority = 64
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {7, 22}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {7, 22}, 10)
11add_walking_animations(animations, "walkload", dirname, "walk", {7, 22}, 10)11add_directional_animation(animations, "walkload", dirname, "walk", {7, 22}, 10)
1212
1313
14tribes:new_worker_type {14tribes:new_worker_type {
1515
=== modified file 'data/tribes/workers/barbarians/carrier/init.lua'
--- data/tribes/workers/barbarians/carrier/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/carrier/init.lua 2019-05-27 14:29:35 +0000
@@ -1,14 +1,9 @@
1dirname = path.dirname(__file__)1dirname = path.dirname(__file__)
22
3animations = {3animations = {}
4 idle = {4add_animation(animations, "idle", dirname, "idle", {14, 21}, 5)
5 pictures = path.list_files(dirname .. "idle_??.png"),5add_directional_animation(animations, "walk", dirname, "walk", {9, 19}, 10)
6 hotspot = { 14, 21 },6add_directional_animation(animations, "walkload", dirname, "walkload", {7, 22}, 10)
7 fps = 5
8 }
9}
10add_walking_animations(animations, "walk", dirname, "walk", {9, 19}, 10)
11add_walking_animations(animations, "walkload", dirname, "walkload", {7, 22}, 10)
127
138
14tribes:new_carrier_type {9tribes:new_carrier_type {
1510
=== modified file 'data/tribes/workers/barbarians/cattlebreeder/init.lua'
--- data/tribes/workers/barbarians/cattlebreeder/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/cattlebreeder/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 3, 21 },6 hotspot = { 3, 21 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {42, 30}, 20)9add_directional_animation(animations, "walk", dirname, "walk", {42, 30}, 20)
10add_walking_animations(animations, "walkload", dirname, "walk", {42, 30}, 20)10add_directional_animation(animations, "walkload", dirname, "walk", {42, 30}, 20)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/charcoal_burner/init.lua'
--- data/tribes/workers/barbarians/charcoal_burner/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/charcoal_burner/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 6, 22 },6 hotspot = { 6, 22 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 22}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 22}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {9, 23}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {9, 23}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/farmer/init.lua'
--- data/tribes/workers/barbarians/farmer/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/barbarians/farmer/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 521 fps = 5
22 }22 }
23}23}
24add_walking_animations(animations, "walk", dirname, "walk", {18, 23}, 10)24add_directional_animation(animations, "walk", dirname, "walk", {18, 23}, 10)
25add_walking_animations(animations, "walkload", dirname, "walkload", {16, 23}, 10)25add_directional_animation(animations, "walkload", dirname, "walkload", {16, 23}, 10)
2626
2727
28tribes:new_worker_type {28tribes:new_worker_type {
2929
=== modified file 'data/tribes/workers/barbarians/fisher/init.lua'
--- data/tribes/workers/barbarians/fisher/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/barbarians/fisher/init.lua 2019-05-27 14:29:35 +0000
@@ -11,8 +11,8 @@
11 fps = 1011 fps = 10
12 }12 }
13}13}
14add_walking_animations(animations, "walk", dirname, "walk", {10, 38}, 10)14add_directional_animation(animations, "walk", dirname, "walk", {10, 38}, 10)
15add_walking_animations(animations, "walkload", dirname, "walk", {10, 38}, 10)15add_directional_animation(animations, "walkload", dirname, "walk", {10, 38}, 10)
1616
1717
18tribes:new_worker_type {18tribes:new_worker_type {
1919
=== modified file 'data/tribes/workers/barbarians/gamekeeper/init.lua'
--- data/tribes/workers/barbarians/gamekeeper/init.lua 2017-11-18 21:01:55 +0000
+++ data/tribes/workers/barbarians/gamekeeper/init.lua 2019-05-27 14:29:35 +0000
@@ -16,8 +16,8 @@
16 fps = 516 fps = 5
17 }17 }
18}18}
19add_walking_animations(animations, "walk", dirname, "walk", {15, 22}, 10)19add_directional_animation(animations, "walk", dirname, "walk", {15, 22}, 10)
20add_walking_animations(animations, "walkload", dirname, "walkload", {15, 22})20add_directional_animation(animations, "walkload", dirname, "walkload", {15, 22})
2121
2222
23tribes:new_worker_type {23tribes:new_worker_type {
2424
=== modified file 'data/tribes/workers/barbarians/gardener/init.lua'
--- data/tribes/workers/barbarians/gardener/init.lua 2019-05-19 11:25:28 +0000
+++ data/tribes/workers/barbarians/gardener/init.lua 2019-05-27 14:29:35 +0000
@@ -16,8 +16,8 @@
16 fps = 516 fps = 5
17 }17 }
18}18}
19add_walking_animations(animations, "walk", dirname, "walk", {8, 23}, 10)19add_directional_animation(animations, "walk", dirname, "walk", {8, 23}, 10)
20add_walking_animations(animations, "walkload", dirname, "walkload", {7, 23}, 10)20add_directional_animation(animations, "walkload", dirname, "walkload", {7, 23}, 10)
2121
2222
23tribes:new_worker_type {23tribes:new_worker_type {
2424
=== modified file 'data/tribes/workers/barbarians/geologist/init.lua'
--- data/tribes/workers/barbarians/geologist/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/barbarians/geologist/init.lua 2019-05-27 14:29:35 +0000
@@ -12,8 +12,8 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations(animations, "walk", dirname, "walk", {9, 21}, 10)15add_directional_animation(animations, "walk", dirname, "walk", {9, 21}, 10)
16add_walking_animations(animations, "walkload", dirname, "walk", {9, 21}, 10)16add_directional_animation(animations, "walkload", dirname, "walk", {9, 21}, 10)
1717
1818
19tribes:new_worker_type {19tribes:new_worker_type {
2020
=== modified file 'data/tribes/workers/barbarians/helmsmith/init.lua'
--- data/tribes/workers/barbarians/helmsmith/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/helmsmith/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 21 }6 hotspot = { 4, 21 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {9, 21}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {9, 21}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {7, 21}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {7, 21}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/hunter/init.lua'
--- data/tribes/workers/barbarians/hunter/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/barbarians/hunter/init.lua 2019-05-27 14:29:35 +0000
@@ -7,8 +7,8 @@
7 fps = 107 fps = 10
8 }8 }
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {6, 26}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {6, 26}, 10)
11add_walking_animations(animations, "walkload", dirname, "walkload", {6, 26}, 10)11add_directional_animation(animations, "walkload", dirname, "walkload", {6, 26}, 10)
1212
1313
14tribes:new_worker_type {14tribes:new_worker_type {
1515
=== modified file 'data/tribes/workers/barbarians/innkeeper/init.lua'
--- data/tribes/workers/barbarians/innkeeper/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/innkeeper/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 9, 24 }6 hotspot = { 9, 24 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {10, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {10, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/lime_burner/init.lua'
--- data/tribes/workers/barbarians/lime_burner/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/lime_burner/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 23 },6 hotspot = { 4, 23 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {7, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {7, 23}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 27}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 27}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/lumberjack/init.lua'
--- data/tribes/workers/barbarians/lumberjack/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/barbarians/lumberjack/init.lua 2019-05-27 14:29:35 +0000
@@ -12,8 +12,8 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations(animations, "walk", dirname, "walk", {10, 22}, 10)15add_directional_animation(animations, "walk", dirname, "walk", {10, 22}, 10)
16add_walking_animations(animations, "walkload", dirname, "walkload", {10, 21}, 10)16add_directional_animation(animations, "walkload", dirname, "walkload", {10, 21}, 10)
1717
1818
19tribes:new_worker_type {19tribes:new_worker_type {
@@ -36,8 +36,7 @@
36 "walk=object",36 "walk=object",
37 "playsound=sound/woodcutting/woodcutting 255",37 "playsound=sound/woodcutting/woodcutting 255",
38 "animate=hacking 10000",38 "animate=hacking 10000",
39 -- "playsound=sound/spoken timber 192",39 "playsound=sound/woodcutting/tree_falling 130",
40 "playsound=sound/woodcutting/tree-falling 130",
41 "callobject=fall",40 "callobject=fall",
42 "animate=idle 2000",41 "animate=idle 2000",
43 "createware=log",42 "createware=log",
4443
=== modified file 'data/tribes/workers/barbarians/miner/init.lua'
--- data/tribes/workers/barbarians/miner/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/miner/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 3, 24 }6 hotspot = { 3, 24 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {9, 25}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {9, 25}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {6, 23}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {6, 23}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/miner_chief/init.lua'
--- data/tribes/workers/barbarians/miner_chief/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/miner_chief/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 3, 24 }6 hotspot = { 3, 24 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {9, 25}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {9, 25}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {6, 23}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {6, 23}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/miner_master/init.lua'
--- data/tribes/workers/barbarians/miner_master/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/miner_master/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 2, 24 }6 hotspot = { 2, 24 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {9, 25}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {9, 25}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {6, 23}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {6, 23}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/ox/init.lua'
--- data/tribes/workers/barbarians/ox/init.lua 2019-05-18 13:04:13 +0000
+++ data/tribes/workers/barbarians/ox/init.lua 2019-05-27 14:29:35 +0000
@@ -8,8 +8,8 @@
8 }8 }
9}9}
10-- TODO(GunChleoc): Make real oxen animations10-- TODO(GunChleoc): Make real oxen animations
11add_walking_animations(animations, "walk", dirname, "walk", {21, 31}, 20)11add_directional_animation(animations, "walk", dirname, "walk", {21, 31}, 20)
12add_walking_animations(animations, "walkload", dirname, "walk", {21, 31}, 10)12add_directional_animation(animations, "walkload", dirname, "walk", {21, 31}, 10)
1313
1414
15tribes:new_carrier_type {15tribes:new_carrier_type {
1616
=== modified file 'data/tribes/workers/barbarians/ranger/init.lua'
--- data/tribes/workers/barbarians/ranger/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/barbarians/ranger/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 521 fps = 5
22 }22 }
23}23}
24add_walking_animations(animations, "walk", dirname, "walk", {11, 23}, 10)24add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 10)
25add_walking_animations(animations, "walkload", dirname, "walkload", {11, 23})25add_directional_animation(animations, "walkload", dirname, "walkload", {11, 23})
2626
2727
28tribes:new_worker_type {28tribes:new_worker_type {
2929
=== modified file 'data/tribes/workers/barbarians/recruit/init.lua'
--- data/tribes/workers/barbarians/recruit/init.lua 2018-04-12 07:50:05 +0000
+++ data/tribes/workers/barbarians/recruit/init.lua 2019-05-27 14:29:35 +0000
@@ -2,7 +2,7 @@
22
3animations = {}3animations = {}
4add_animation(animations, "idle", dirname, "idle", {16, 30}, 5)4add_animation(animations, "idle", dirname, "idle", {16, 30}, 5)
5add_walking_animations(animations, "walk", dirname, "walk", {16, 30}, 10)5add_directional_animation(animations, "walk", dirname, "walk", {16, 30}, 10)
66
77
8tribes:new_worker_type {8tribes:new_worker_type {
99
=== modified file 'data/tribes/workers/barbarians/scout/init.lua'
--- data/tribes/workers/barbarians/scout/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/barbarians/scout/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 23 },6 hotspot = { 4, 23 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {9, 25}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {9, 25}, 10)
10add_walking_animations(animations, "walkload", dirname, "walk", {9, 25}, 10)10add_directional_animation(animations, "walkload", dirname, "walk", {9, 25}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/shipwright/init.lua'
--- data/tribes/workers/barbarians/shipwright/init.lua 2019-04-24 06:32:02 +0000
+++ data/tribes/workers/barbarians/shipwright/init.lua 2019-05-27 14:29:35 +0000
@@ -7,8 +7,8 @@
7 path = "sound/hammering/hammering",7 path = "sound/hammering/hammering",
8 priority = 648 priority = 64
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {9, 24}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {9, 24}, 10)
11add_walking_animations(animations, "walkload", dirname, "walkload", {11, 22}, 10)11add_directional_animation(animations, "walkload", dirname, "walkload", {11, 22}, 10)
1212
1313
14tribes:new_worker_type {14tribes:new_worker_type {
1515
=== modified file 'data/tribes/workers/barbarians/smelter/init.lua'
--- data/tribes/workers/barbarians/smelter/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/smelter/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 7, 21 }6 hotspot = { 7, 21 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {18, 25}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {18, 25}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 27}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 27}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/barbarians/soldier/init.lua'
--- data/tribes/workers/barbarians/soldier/init.lua 2019-05-19 09:36:33 +0000
+++ data/tribes/workers/barbarians/soldier/init.lua 2019-05-27 14:29:35 +0000
@@ -57,7 +57,7 @@
57 fps = 2057 fps = 20
58 },58 },
59}59}
60add_walking_animations(animations, "walk", dirname, "walk", {16, 31}, 10)60add_directional_animation(animations, "walk", dirname, "walk", {16, 31}, 10)
6161
62all_levels_bar = {62all_levels_bar = {
63 min_health = 0,63 min_health = 0,
6464
=== modified file 'data/tribes/workers/barbarians/stonemason/init.lua'
--- data/tribes/workers/barbarians/stonemason/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/barbarians/stonemason/init.lua 2019-05-27 14:29:35 +0000
@@ -12,8 +12,8 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations(animations, "walk", dirname, "walk", {9, 24}, 10)15add_directional_animation(animations, "walk", dirname, "walk", {9, 24}, 10)
16add_walking_animations(animations, "walkload", dirname, "walkload", {7, 22}, 10)16add_directional_animation(animations, "walkload", dirname, "walkload", {7, 22}, 10)
1717
1818
19tribes:new_worker_type {19tribes:new_worker_type {
2020
=== modified file 'data/tribes/workers/barbarians/trainer/init.lua'
--- data/tribes/workers/barbarians/trainer/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/trainer/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 23 }6 hotspot = { 4, 23 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 23}, 10)
10add_walking_animations(animations, "walkload", dirname, "walk", {8, 23}, 10)10add_directional_animation(animations, "walkload", dirname, "walk", {8, 23}, 10)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "barbarians_worker",13 msgctxt = "barbarians_worker",
1414
=== modified file 'data/tribes/workers/barbarians/weaver/init.lua'
--- data/tribes/workers/barbarians/weaver/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/barbarians/weaver/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 5, 22 }6 hotspot = { 5, 22 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {7, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {7, 23}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {11, 28}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {11, 28}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/armorsmith/init.lua'
--- data/tribes/workers/empire/armorsmith/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/armorsmith/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 8, 24 }6 hotspot = { 8, 24 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/baker/init.lua'
--- data/tribes/workers/empire/baker/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/baker/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 5, 26 }6 hotspot = { 5, 26 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {14, 27}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {14, 27}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {14, 27}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {14, 27}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/brewer/init.lua'
--- data/tribes/workers/empire/brewer/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/brewer/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 8, 24 }6 hotspot = { 8, 24 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {14, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {14, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {10, 22}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 22}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/builder/init.lua'
--- data/tribes/workers/empire/builder/init.lua 2019-03-17 08:30:43 +0000
+++ data/tribes/workers/empire/builder/init.lua 2019-05-27 14:29:35 +0000
@@ -16,8 +16,8 @@
16 fps = 1016 fps = 10
17 }17 }
18}18}
19add_walking_animations(animations, "walk", dirname, "walk", {11, 23}, 10)19add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 10)
20add_walking_animations(animations, "walkload", dirname, "walk", {11, 23}, 10)20add_directional_animation(animations, "walkload", dirname, "walk", {11, 23}, 10)
2121
2222
23tribes:new_worker_type {23tribes:new_worker_type {
2424
=== modified file 'data/tribes/workers/empire/carpenter/init.lua'
--- data/tribes/workers/empire/carpenter/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/carpenter/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 7, 29 }6 hotspot = { 7, 29 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {11, 30}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {11, 30}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {11, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {11, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/carrier/init.lua'
--- data/tribes/workers/empire/carrier/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/carrier/init.lua 2019-05-27 14:29:35 +0000
@@ -1,14 +1,9 @@
1dirname = path.dirname(__file__)1dirname = path.dirname(__file__)
22
3animations = {3animations = {}
4 idle = {4add_animation(animations, "idle", dirname, "idle", {7, 22}, 10)
5 pictures = path.list_files(dirname .. "idle_??.png"),5add_directional_animation(animations, "walk", dirname, "walk", {7, 20}, 10)
6 hotspot = { 7, 22 },6add_directional_animation(animations, "walkload", dirname, "walkload", {8, 22}, 10)
7 fps = 10
8 }
9}
10add_walking_animations(animations, "walk", dirname, "walk", {7, 20}, 10)
11add_walking_animations(animations, "walkload", dirname, "walkload", {8, 22}, 10)
127
138
14tribes:new_carrier_type {9tribes:new_carrier_type {
1510
=== modified file 'data/tribes/workers/empire/charcoal_burner/init.lua'
--- data/tribes/workers/empire/charcoal_burner/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/charcoal_burner/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 11, 23 }6 hotspot = { 11, 23 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {21, 28}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {21, 28}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {17, 27}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {17, 27}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/donkey/init.lua'
--- data/tribes/workers/empire/donkey/init.lua 2019-05-18 13:04:13 +0000
+++ data/tribes/workers/empire/donkey/init.lua 2019-05-27 14:29:35 +0000
@@ -7,8 +7,8 @@
7 fps = 107 fps = 10
8 }8 }
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {14, 25}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {14, 25}, 10)
11add_walking_animations(animations, "walkload", dirname, "walk", {14, 25}, 10) -- TODO(GunChleoc): Make animation11add_directional_animation(animations, "walkload", dirname, "walk", {14, 25}, 10) -- TODO(GunChleoc): Make animation
1212
1313
14tribes:new_carrier_type {14tribes:new_carrier_type {
1515
=== modified file 'data/tribes/workers/empire/donkeybreeder/init.lua'
--- data/tribes/workers/empire/donkeybreeder/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/donkeybreeder/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 19, 23 },6 hotspot = { 19, 23 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {28, 26}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {28, 26}, 10)
10add_walking_animations(animations, "walkload", dirname, "walk", {28, 26}, 10)10add_directional_animation(animations, "walkload", dirname, "walk", {28, 26}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/farmer/init.lua'
--- data/tribes/workers/empire/farmer/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/empire/farmer/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 521 fps = 5
22 }22 }
23}23}
24add_walking_animations(animations, "walk", dirname, "walk", {18, 24}, 10)24add_directional_animation(animations, "walk", dirname, "walk", {18, 24}, 10)
25add_walking_animations(animations, "walkload", dirname, "walk", {18, 24}, 10)25add_directional_animation(animations, "walkload", dirname, "walk", {18, 24}, 10)
2626
2727
28tribes:new_worker_type {28tribes:new_worker_type {
2929
=== modified file 'data/tribes/workers/empire/fisher/init.lua'
--- data/tribes/workers/empire/fisher/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/empire/fisher/init.lua 2019-05-27 14:29:35 +0000
@@ -11,8 +11,8 @@
11 fps = 10,11 fps = 10,
12 }12 }
13}13}
14add_walking_animations(animations, "walk", dirname, "walk", {10, 38}, 20)14add_directional_animation(animations, "walk", dirname, "walk", {10, 38}, 20)
15add_walking_animations(animations, "walkload", dirname, "walk", {10, 38}, 20)15add_directional_animation(animations, "walkload", dirname, "walk", {10, 38}, 20)
1616
1717
18tribes:new_worker_type {18tribes:new_worker_type {
1919
=== modified file 'data/tribes/workers/empire/forester/init.lua'
--- data/tribes/workers/empire/forester/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/empire/forester/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 521 fps = 5
22 }22 }
23}23}
24add_walking_animations(animations, "walk", dirname, "walk", {10, 23}, 10)24add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 10)
25add_walking_animations(animations, "walkload", dirname, "walk", {10, 23}, 10)25add_directional_animation(animations, "walkload", dirname, "walk", {10, 23}, 10)
2626
2727
28tribes:new_worker_type {28tribes:new_worker_type {
2929
=== modified file 'data/tribes/workers/empire/geologist/init.lua'
--- data/tribes/workers/empire/geologist/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/empire/geologist/init.lua 2019-05-27 14:29:35 +0000
@@ -12,8 +12,8 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations(animations, "walk", dirname, "walk", {9, 21}, 10)15add_directional_animation(animations, "walk", dirname, "walk", {9, 21}, 10)
16add_walking_animations(animations, "walkload", dirname, "walk", {9, 21}, 10)16add_directional_animation(animations, "walkload", dirname, "walk", {9, 21}, 10)
1717
1818
19tribes:new_worker_type {19tribes:new_worker_type {
2020
=== modified file 'data/tribes/workers/empire/hunter/init.lua'
--- data/tribes/workers/empire/hunter/init.lua 2017-11-18 21:08:26 +0000
+++ data/tribes/workers/empire/hunter/init.lua 2019-05-27 14:29:35 +0000
@@ -7,8 +7,8 @@
7 fps = 107 fps = 10
8 }8 }
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {9, 32}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {9, 32}, 10)
11add_walking_animations(animations, "walkload", dirname, "walkload", {9, 32}, 10)11add_directional_animation(animations, "walkload", dirname, "walkload", {9, 32}, 10)
1212
1313
14tribes:new_worker_type {14tribes:new_worker_type {
1515
=== modified file 'data/tribes/workers/empire/innkeeper/init.lua'
--- data/tribes/workers/empire/innkeeper/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/innkeeper/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 26 },6 hotspot = { 4, 26 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {6, 26}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {6, 26}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {6, 26}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {6, 26}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/lumberjack/init.lua'
--- data/tribes/workers/empire/lumberjack/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/empire/lumberjack/init.lua 2019-05-27 14:29:35 +0000
@@ -12,8 +12,8 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations(animations, "walk", dirname, "walk", {9, 22}, 10)15add_directional_animation(animations, "walk", dirname, "walk", {9, 22}, 10)
16add_walking_animations(animations, "walkload", dirname, "walkload", {9, 22}, 10)16add_directional_animation(animations, "walkload", dirname, "walkload", {9, 22}, 10)
1717
1818
19tribes:new_worker_type {19tribes:new_worker_type {
@@ -36,8 +36,7 @@
36 "walk=object",36 "walk=object",
37 "playsound=sound/woodcutting/fast_woodcutting 250",37 "playsound=sound/woodcutting/fast_woodcutting 250",
38 "animate=hacking 10000",38 "animate=hacking 10000",
39 -- "playsound=sound/spoken/timber 156",39 "playsound=sound/woodcutting/tree_falling 130",
40 "playsound=sound/woodcutting/tree-falling 130",
41 "callobject=fall",40 "callobject=fall",
42 "animate=idle 2000",41 "animate=idle 2000",
43 "createware=log",42 "createware=log",
4443
=== modified file 'data/tribes/workers/empire/miller/init.lua'
--- data/tribes/workers/empire/miller/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/miller/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 5, 23 }6 hotspot = { 5, 23 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/miner/init.lua'
--- data/tribes/workers/empire/miner/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/miner/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 3, 23 }6 hotspot = { 3, 23 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {9, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {9, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {7, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {7, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/miner_master/init.lua'
--- data/tribes/workers/empire/miner_master/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/miner_master/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 7, 22 }6 hotspot = { 7, 22 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {11, 22}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {11, 22}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {10, 22}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 22}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/pigbreeder/init.lua'
--- data/tribes/workers/empire/pigbreeder/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/pigbreeder/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 16, 29 },6 hotspot = { 16, 29 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {27, 29}, 20)9add_directional_animation(animations, "walk", dirname, "walk", {27, 29}, 20)
10add_walking_animations(animations, "walkload", dirname, "walk", {27, 29}, 20)10add_directional_animation(animations, "walkload", dirname, "walk", {27, 29}, 20)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/recruit/init.lua'
--- data/tribes/workers/empire/recruit/init.lua 2017-05-25 21:24:54 +0000
+++ data/tribes/workers/empire/recruit/init.lua 2019-05-27 14:29:35 +0000
@@ -7,7 +7,7 @@
7 fps = 57 fps = 5
8 },8 },
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {10, 30}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {10, 30}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/scout/init.lua'
--- data/tribes/workers/empire/scout/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/empire/scout/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 22 },6 hotspot = { 4, 22 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {9, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {9, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walk", {9, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walk", {9, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/shepherd/init.lua'
--- data/tribes/workers/empire/shepherd/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/shepherd/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 16, 29 },6 hotspot = { 16, 29 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {26, 30}, 20)9add_directional_animation(animations, "walk", dirname, "walk", {26, 30}, 20)
10add_walking_animations(animations, "walkload", dirname, "walk", {26, 30}, 20)10add_directional_animation(animations, "walkload", dirname, "walk", {26, 30}, 20)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/shipwright/init.lua'
--- data/tribes/workers/empire/shipwright/init.lua 2019-03-17 08:30:43 +0000
+++ data/tribes/workers/empire/shipwright/init.lua 2019-05-27 14:29:35 +0000
@@ -15,8 +15,8 @@
15 fps = 1015 fps = 10
16 }16 }
17}17}
18add_walking_animations(animations, "walk", dirname, "walk", {11, 24}, 10)18add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 10)
19add_walking_animations(animations, "walkload", dirname, "walkload", {9, 22}, 10)19add_directional_animation(animations, "walkload", dirname, "walkload", {9, 22}, 10)
2020
2121
22tribes:new_worker_type {22tribes:new_worker_type {
2323
=== modified file 'data/tribes/workers/empire/smelter/init.lua'
--- data/tribes/workers/empire/smelter/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/smelter/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 23 }6 hotspot = { 4, 23 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {18, 25}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {18, 25}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 22}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 22}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/soldier/init.lua'
--- data/tribes/workers/empire/soldier/init.lua 2019-05-19 09:36:33 +0000
+++ data/tribes/workers/empire/soldier/init.lua 2019-05-27 14:29:35 +0000
@@ -57,7 +57,7 @@
57 fps = 1057 fps = 10
58 }58 }
59}59}
60add_walking_animations(animations, "walk", dirname, "walk", {10, 36}, 10)60add_directional_animation(animations, "walk", dirname, "walk", {10, 36}, 10)
6161
62all_levels_emp = {62all_levels_emp = {
63 min_health = 0,63 min_health = 0,
6464
=== modified file 'data/tribes/workers/empire/stonemason/init.lua'
--- data/tribes/workers/empire/stonemason/init.lua 2019-03-17 07:20:58 +0000
+++ data/tribes/workers/empire/stonemason/init.lua 2019-05-27 14:29:35 +0000
@@ -12,8 +12,8 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations(animations, "walk", dirname, "walk", {9, 22}, 10)15add_directional_animation(animations, "walk", dirname, "walk", {9, 22}, 10)
16add_walking_animations(animations, "walkload", dirname, "walkload", {8, 25}, 10)16add_directional_animation(animations, "walkload", dirname, "walkload", {8, 25}, 10)
1717
1818
19tribes:new_worker_type {19tribes:new_worker_type {
2020
=== modified file 'data/tribes/workers/empire/toolsmith/init.lua'
--- data/tribes/workers/empire/toolsmith/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/toolsmith/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 8, 24 }6 hotspot = { 8, 24 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/trainer/init.lua'
--- data/tribes/workers/empire/trainer/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/trainer/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 6, 23 }6 hotspot = { 6, 23 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {9, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {9, 23}, 10)
10add_walking_animations(animations, "walkload", dirname, "walk", {9, 23}, 10)10add_directional_animation(animations, "walkload", dirname, "walk", {9, 23}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/vinefarmer/init.lua'
--- data/tribes/workers/empire/vinefarmer/init.lua 2018-02-28 09:38:13 +0000
+++ data/tribes/workers/empire/vinefarmer/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 1021 fps = 10
22 }22 }
23}23}
24add_walking_animations(animations, "walk", dirname, "walk", {8, 23}, 10)24add_directional_animation(animations, "walk", dirname, "walk", {8, 23}, 10)
25add_walking_animations(animations, "walkload", dirname, "walkload", {8, 24}, 10)25add_directional_animation(animations, "walkload", dirname, "walkload", {8, 24}, 10)
2626
2727
28tribes:new_worker_type {28tribes:new_worker_type {
2929
=== modified file 'data/tribes/workers/empire/vintner/init.lua'
--- data/tribes/workers/empire/vintner/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/vintner/init.lua 2019-05-27 14:29:35 +0000
@@ -7,8 +7,8 @@
7 hotspot = { 12, 24 }7 hotspot = { 12, 24 }
8 }8 }
9}9}
10add_walking_animations(animations, "walk", dirname, "walk", {12, 24}, 10)10add_directional_animation(animations, "walk", dirname, "walk", {12, 24}, 10)
11add_walking_animations(animations, "walkload", dirname, "walk", {12, 24}, 10)11add_directional_animation(animations, "walkload", dirname, "walk", {12, 24}, 10)
1212
1313
14tribes:new_worker_type {14tribes:new_worker_type {
1515
=== modified file 'data/tribes/workers/empire/weaponsmith/init.lua'
--- data/tribes/workers/empire/weaponsmith/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/weaponsmith/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 8, 24 }6 hotspot = { 8, 24 }
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {8, 24}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {8, 24}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {8, 24}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {8, 24}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/empire/weaver/init.lua'
--- data/tribes/workers/empire/weaver/init.lua 2017-02-12 09:10:57 +0000
+++ data/tribes/workers/empire/weaver/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = { 4, 24 },6 hotspot = { 4, 24 },
7 }7 }
8}8}
9add_walking_animations(animations, "walk", dirname, "walk", {6, 26}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {6, 26}, 10)
10add_walking_animations(animations, "walkload", dirname, "walkload", {6, 26}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {6, 26}, 10)
1111
1212
13tribes:new_worker_type {13tribes:new_worker_type {
1414
=== modified file 'data/tribes/workers/frisians/baker/init.lua'
--- data/tribes/workers/frisians/baker/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/baker/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {11, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/baker_master/init.lua'
--- data/tribes/workers/frisians/baker_master/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/baker_master/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {11, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/beekeeper/init.lua'
--- data/tribes/workers/frisians/beekeeper/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/beekeeper/init.lua 2019-05-27 14:29:35 +0000
@@ -11,8 +11,8 @@
11 fps = 5011 fps = 50
12 }12 }
13}13}
14add_walking_animations (animations, "walk", dirname, "walk", {11, 24}, 15)14add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
15add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)15add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1616
17tribes:new_worker_type {17tribes:new_worker_type {
18 msgctxt = "frisians_worker",18 msgctxt = "frisians_worker",
1919
=== modified file 'data/tribes/workers/frisians/berry_farmer/init.lua'
--- data/tribes/workers/frisians/berry_farmer/init.lua 2018-03-25 18:28:00 +0000
+++ data/tribes/workers/frisians/berry_farmer/init.lua 2019-05-27 14:29:35 +0000
@@ -21,7 +21,7 @@
21 fps = 1021 fps = 10
22 }22 }
23}23}
24add_walking_animations (animations, "walk", dirname, "walk", {11, 24}, 15)24add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
2525
26tribes:new_worker_type {26tribes:new_worker_type {
27 msgctxt = "frisians_worker",27 msgctxt = "frisians_worker",
2828
=== modified file 'data/tribes/workers/frisians/blacksmith/init.lua'
--- data/tribes/workers/frisians/blacksmith/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/blacksmith/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {11, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/blacksmith_master/init.lua'
--- data/tribes/workers/frisians/blacksmith_master/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/blacksmith_master/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {11, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/brewer/init.lua'
--- data/tribes/workers/frisians/brewer/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/brewer/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/brewer_master/init.lua'
--- data/tribes/workers/frisians/brewer_master/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/brewer_master/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/brickmaker/init.lua'
--- data/tribes/workers/frisians/brickmaker/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/brickmaker/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 },7 },
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {13, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {13, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 23}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 23}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/builder/init.lua'
--- data/tribes/workers/frisians/builder/init.lua 2019-03-17 08:30:43 +0000
+++ data/tribes/workers/frisians/builder/init.lua 2019-05-27 14:29:35 +0000
@@ -16,8 +16,8 @@
16 fps = 1016 fps = 10
17 }17 }
18}18}
19add_walking_animations (animations, "walk", dirname, "walk", {11, 24}, 15)19add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
20add_walking_animations (animations, "walkload", dirname, "walkload", {10, 24}, 15)20add_directional_animation(animations, "walkload", dirname, "walkload", {10, 24}, 15)
2121
22tribes:new_worker_type {22tribes:new_worker_type {
23 msgctxt = "frisians_worker",23 msgctxt = "frisians_worker",
2424
=== modified file 'data/tribes/workers/frisians/carrier/init.lua'
--- data/tribes/workers/frisians/carrier/init.lua 2018-02-06 11:17:48 +0000
+++ data/tribes/workers/frisians/carrier/init.lua 2019-05-27 14:29:35 +0000
@@ -1,14 +1,9 @@
1dirname = path.dirname (__file__)1dirname = path.dirname (__file__)
22
3animations = {3animations = {}
4 idle = {4add_animation(animations, "idle", dirname, "idle", {17, 18}, 10)
5 pictures = path.list_files (dirname .. "idle_???.png"),5add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 15)
6 hotspot = {17, 18},6add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
7 fps = 10
8 },
9}
10add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 15)
11add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)
127
13tribes:new_carrier_type {8tribes:new_carrier_type {
14 msgctxt = "frisians_worker",9 msgctxt = "frisians_worker",
1510
=== modified file 'data/tribes/workers/frisians/charcoal_burner/init.lua'
--- data/tribes/workers/frisians/charcoal_burner/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/charcoal_burner/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/claydigger/init.lua'
--- data/tribes/workers/frisians/claydigger/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/claydigger/init.lua 2019-05-27 14:29:35 +0000
@@ -11,8 +11,8 @@
11 fps = 2011 fps = 20
12 }12 }
13}13}
14add_walking_animations (animations, "walk", dirname, "walk", {11, 24}, 15)14add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
15add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)15add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1616
17tribes:new_worker_type {17tribes:new_worker_type {
18 msgctxt = "frisians_worker",18 msgctxt = "frisians_worker",
1919
=== modified file 'data/tribes/workers/frisians/farmer/init.lua'
--- data/tribes/workers/frisians/farmer/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/farmer/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 1021 fps = 10
22 }22 }
23}23}
24add_walking_animations (animations, "walk", dirname, "walk", {11, 24}, 15)24add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
25add_walking_animations (animations, "walkload", dirname, "walkload", {16, 26}, 15)25add_directional_animation(animations, "walkload", dirname, "walkload", {16, 26}, 15)
2626
27tribes:new_worker_type {27tribes:new_worker_type {
28 msgctxt = "frisians_worker",28 msgctxt = "frisians_worker",
2929
=== modified file 'data/tribes/workers/frisians/fisher/init.lua'
--- data/tribes/workers/frisians/fisher/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/fisher/init.lua 2019-05-27 14:29:35 +0000
@@ -16,8 +16,8 @@
16 fps = 1016 fps = 10
17 }17 }
18}18}
19add_walking_animations (animations, "walk", dirname, "walk", {13, 25}, 15)19add_directional_animation(animations, "walk", dirname, "walk", {13, 25}, 15)
20add_walking_animations (animations, "walkload", dirname, "walkload", {13, 26}, 15)20add_directional_animation(animations, "walkload", dirname, "walkload", {13, 26}, 15)
2121
22tribes:new_worker_type {22tribes:new_worker_type {
23 msgctxt = "frisians_worker",23 msgctxt = "frisians_worker",
2424
=== modified file 'data/tribes/workers/frisians/forester/init.lua'
--- data/tribes/workers/frisians/forester/init.lua 2018-03-25 18:28:00 +0000
+++ data/tribes/workers/frisians/forester/init.lua 2019-05-27 14:29:35 +0000
@@ -21,7 +21,7 @@
21 fps = 1021 fps = 10
22 }22 }
23}23}
24add_walking_animations (animations, "walk", dirname, "walk", {11, 24}, 15)24add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
2525
26tribes:new_worker_type {26tribes:new_worker_type {
27 msgctxt = "frisians_worker",27 msgctxt = "frisians_worker",
2828
=== modified file 'data/tribes/workers/frisians/fruit_collector/init.lua'
--- data/tribes/workers/frisians/fruit_collector/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/fruit_collector/init.lua 2019-05-27 14:29:35 +0000
@@ -12,8 +12,8 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations (animations, "walk", dirname, "walk", {11, 24}, 15)15add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
16add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)16add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1717
18tribes:new_worker_type {18tribes:new_worker_type {
19 msgctxt = "frisians_worker",19 msgctxt = "frisians_worker",
2020
=== modified file 'data/tribes/workers/frisians/geologist/init.lua'
--- data/tribes/workers/frisians/geologist/init.lua 2018-03-25 18:28:00 +0000
+++ data/tribes/workers/frisians/geologist/init.lua 2019-05-27 14:29:35 +0000
@@ -12,7 +12,7 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations (animations, "walk", dirname, "walk", {11, 23}, 15)15add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 15)
1616
17tribes:new_worker_type {17tribes:new_worker_type {
18 msgctxt = "frisians_worker",18 msgctxt = "frisians_worker",
1919
=== modified file 'data/tribes/workers/frisians/hunter/init.lua'
--- data/tribes/workers/frisians/hunter/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/hunter/init.lua 2019-05-27 14:29:35 +0000
@@ -7,8 +7,8 @@
7 fps = 107 fps = 10
8 }8 }
9}9}
10add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 15)10add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 15)
11add_walking_animations (animations, "walkload", dirname, "walkload", {11, 26}, 15)11add_directional_animation(animations, "walkload", dirname, "walkload", {11, 26}, 15)
1212
13tribes:new_worker_type {13tribes:new_worker_type {
14 msgctxt = "frisians_worker",14 msgctxt = "frisians_worker",
1515
=== modified file 'data/tribes/workers/frisians/landlady/init.lua'
--- data/tribes/workers/frisians/landlady/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/landlady/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {9, 23},6 hotspot = {9, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/miner/init.lua'
--- data/tribes/workers/frisians/miner/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/miner/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 24},6 hotspot = {8, 24},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 24}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 24}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/miner_master/init.lua'
--- data/tribes/workers/frisians/miner_master/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/miner_master/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 24},6 hotspot = {8, 24},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 24}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 24}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/reed_farmer/init.lua'
--- data/tribes/workers/frisians/reed_farmer/init.lua 2019-05-19 11:25:28 +0000
+++ data/tribes/workers/frisians/reed_farmer/init.lua 2019-05-27 14:29:35 +0000
@@ -21,8 +21,8 @@
21 fps = 1021 fps = 10
22 }22 }
23}23}
24add_walking_animations (animations, "walk", dirname, "walk", {10, 24}, 15)24add_directional_animation(animations, "walk", dirname, "walk", {10, 24}, 15)
25add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)25add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
2626
27tribes:new_worker_type {27tribes:new_worker_type {
28 msgctxt = "frisians_worker",28 msgctxt = "frisians_worker",
2929
=== modified file 'data/tribes/workers/frisians/reindeer/init.lua'
--- data/tribes/workers/frisians/reindeer/init.lua 2019-05-18 13:04:13 +0000
+++ data/tribes/workers/frisians/reindeer/init.lua 2019-05-27 14:29:35 +0000
@@ -8,8 +8,8 @@
8 }8 }
9}9}
1010
11add_walking_animations (animations, "walk", dirname, "walk", {21, 43}, 20)11add_directional_animation(animations, "walk", dirname, "walk", {21, 43}, 20)
12add_walking_animations (animations, "walkload", dirname, "walk", {21, 43}, 20)12add_directional_animation(animations, "walkload", dirname, "walk", {21, 43}, 20)
1313
14tribes:new_carrier_type {14tribes:new_carrier_type {
15 msgctxt = "frisians_worker",15 msgctxt = "frisians_worker",
1616
=== modified file 'data/tribes/workers/frisians/reindeer_breeder/init.lua'
--- data/tribes/workers/frisians/reindeer_breeder/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/reindeer_breeder/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 10)9add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 10)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 10)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 10)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/scout/init.lua'
--- data/tribes/workers/frisians/scout/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/scout/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {11, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {11, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {12, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {12, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/seamstress/init.lua'
--- data/tribes/workers/frisians/seamstress/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/seamstress/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {9, 23},6 hotspot = {9, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/seamstress_master/init.lua'
--- data/tribes/workers/frisians/seamstress_master/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/seamstress_master/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {21, 25},6 hotspot = {21, 25},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/shipwright/init.lua'
--- data/tribes/workers/frisians/shipwright/init.lua 2019-03-17 08:30:43 +0000
+++ data/tribes/workers/frisians/shipwright/init.lua 2019-05-27 14:29:35 +0000
@@ -15,8 +15,8 @@
15 fps = 1015 fps = 10
16 }16 }
17}17}
18add_walking_animations (animations, "walk", dirname, "walk", {11, 24}, 15)18add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
19add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)19add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
2020
21tribes:new_worker_type {21tribes:new_worker_type {
22 msgctxt = "frisians_worker",22 msgctxt = "frisians_worker",
2323
=== modified file 'data/tribes/workers/frisians/smelter/init.lua'
--- data/tribes/workers/frisians/smelter/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/smelter/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {13, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {13, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/smoker/init.lua'
--- data/tribes/workers/frisians/smoker/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/smoker/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 23}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 23}, 15)
10add_walking_animations (animations, "walkload", dirname, "walk", {10, 26}, 15)10add_directional_animation(animations, "walkload", dirname, "walk", {10, 26}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/soldier/init.lua'
--- data/tribes/workers/frisians/soldier/init.lua 2019-05-19 09:25:06 +0000
+++ data/tribes/workers/frisians/soldier/init.lua 2019-05-27 14:29:35 +0000
@@ -347,10 +347,10 @@
347 fps = 10347 fps = 10
348 },348 },
349}349}
350add_walking_animations (animations, "walk", dirname, "rookie/walk", {7, 24}, 15)350add_directional_animation(animations, "walk", dirname .. "rookie", "walk", {7, 24}, 15)
351add_walking_animations (animations, "health_walk", dirname, "helm/walk", {7, 25}, 15)351add_directional_animation(animations, "health_walk", dirname .. "helm", "walk", {7, 25}, 15)
352add_walking_animations (animations, "attack_walk", dirname, "sword/walk", {8, 24}, 15)352add_directional_animation(animations, "attack_walk", dirname .. "sword", "walk", {8, 24}, 15)
353add_walking_animations (animations, "hero_walk", dirname, "hero/walk", {8, 25}, 15)353add_directional_animation(animations, "hero_walk", dirname .. "hero", "walk", {8, 25}, 15)
354354
355-- convenience definitions so we don´t have to repeat this table for every single entry below355-- convenience definitions so we don´t have to repeat this table for every single entry below
356fri_health = {356fri_health = {
357357
=== modified file 'data/tribes/workers/frisians/stonemason/init.lua'
--- data/tribes/workers/frisians/stonemason/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/stonemason/init.lua 2019-05-27 14:29:35 +0000
@@ -11,8 +11,8 @@
11 fps = 1011 fps = 10
12 }12 }
13}13}
14add_walking_animations (animations, "walk", dirname, "walk", {11, 24}, 15)14add_directional_animation(animations, "walk", dirname, "walk", {11, 24}, 15)
15add_walking_animations (animations, "walkload", dirname, "walkload", {10, 26}, 15)15add_directional_animation(animations, "walkload", dirname, "walkload", {10, 26}, 15)
1616
17tribes:new_worker_type {17tribes:new_worker_type {
18 msgctxt = "frisians_worker",18 msgctxt = "frisians_worker",
1919
=== modified file 'data/tribes/workers/frisians/trainer/init.lua'
--- data/tribes/workers/frisians/trainer/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/trainer/init.lua 2019-05-27 14:29:35 +0000
@@ -6,8 +6,8 @@
6 hotspot = {8, 23},6 hotspot = {8, 23},
7 }7 }
8}8}
9add_walking_animations (animations, "walk", dirname, "walk", {10, 24}, 15)9add_directional_animation(animations, "walk", dirname, "walk", {10, 24}, 15)
10add_walking_animations (animations, "walkload", dirname, "walkload", {10, 25}, 15)10add_directional_animation(animations, "walkload", dirname, "walkload", {10, 25}, 15)
1111
12tribes:new_worker_type {12tribes:new_worker_type {
13 msgctxt = "frisians_worker",13 msgctxt = "frisians_worker",
1414
=== modified file 'data/tribes/workers/frisians/woodcutter/init.lua'
--- data/tribes/workers/frisians/woodcutter/init.lua 2018-11-30 10:27:21 +0000
+++ data/tribes/workers/frisians/woodcutter/init.lua 2019-05-27 14:29:35 +0000
@@ -12,8 +12,8 @@
12 fps = 1012 fps = 10
13 }13 }
14}14}
15add_walking_animations (animations, "walk", dirname, "walk", {16, 23}, 15)15add_directional_animation(animations, "walk", dirname, "walk", {16, 23}, 15)
16add_walking_animations (animations, "walkload", dirname, "walkload", {12, 26}, 15)16add_directional_animation(animations, "walkload", dirname, "walkload", {12, 26}, 15)
1717
18tribes:new_worker_type {18tribes:new_worker_type {
19 msgctxt = "frisians_worker",19 msgctxt = "frisians_worker",
@@ -33,7 +33,9 @@
33 harvest = {33 harvest = {
34 "findobject=attrib:tree radius:10",34 "findobject=attrib:tree radius:10",
35 "walk=object",35 "walk=object",
36 "playsound=sound/woodcutting/woodcutting 255",
36 "animate=hacking 10000",37 "animate=hacking 10000",
38 "playsound=sound/woodcutting/tree_falling 130",
37 "callobject=fall",39 "callobject=fall",
38 "animate=idle 2000",40 "animate=idle 2000",
39 "createware=log",41 "createware=log",
4042
=== modified file 'data/world/critters/badger/init.lua'
--- data/world/critters/badger/init.lua 2017-09-03 09:39:39 +0000
+++ data/world/critters/badger/init.lua 2019-05-27 14:29:35 +0000
@@ -19,7 +19,7 @@
19 },19 },
20}20}
2121
22add_walking_animations(animations, "walk", dirname, "walk", {13, 15}, 20)22add_directional_animation(animations, "walk", dirname, "walk", {13, 15}, 20)
2323
24-- RST24-- RST
25-- .. function:: new_critter_type{table}25-- .. function:: new_critter_type{table}
2626
=== modified file 'data/world/critters/brownbear/init.lua'
--- data/world/critters/brownbear/init.lua 2017-02-12 09:10:57 +0000
+++ data/world/critters/brownbear/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8 },8 },
9}9}
1010
11add_walking_animations(animations, "walk", dirname, "walk", {24, 24}, 4)11add_directional_animation(animations, "walk", dirname, "walk", {24, 24}, 4)
1212
13world:new_critter_type{13world:new_critter_type{
14 name = "brownbear",14 name = "brownbear",
1515
=== modified file 'data/world/critters/bunny/init.lua'
--- data/world/critters/bunny/init.lua 2017-02-12 09:10:57 +0000
+++ data/world/critters/bunny/init.lua 2019-05-27 14:29:35 +0000
@@ -7,7 +7,7 @@
7 },7 },
8}8}
99
10add_walking_animations(animations, "walk", dirname, "walk", {5, 9}, 4)10add_directional_animation(animations, "walk", dirname, "walk", {5, 9}, 4)
1111
12world:new_critter_type{12world:new_critter_type{
13 name = "bunny",13 name = "bunny",
1414
=== modified file 'data/world/critters/chamois/init.lua'
--- data/world/critters/chamois/init.lua 2017-02-12 09:10:57 +0000
+++ data/world/critters/chamois/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8 },8 },
9}9}
1010
11add_walking_animations(animations, "walk", dirname, "walk", {11, 20}, 20)11add_directional_animation(animations, "walk", dirname, "walk", {11, 20}, 20)
1212
13world:new_critter_type{13world:new_critter_type{
14 name = "chamois",14 name = "chamois",
1515
=== modified file 'data/world/critters/deer/init.lua'
--- data/world/critters/deer/init.lua 2017-02-12 09:10:57 +0000
+++ data/world/critters/deer/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8 },8 },
9}9}
1010
11add_walking_animations(animations, "walk", dirname, "walk", {15, 25}, 20)11add_directional_animation(animations, "walk", dirname, "walk", {15, 25}, 20)
1212
13world:new_critter_type{13world:new_critter_type{
14 name = "deer",14 name = "deer",
1515
=== modified file 'data/world/critters/duck/init.lua'
--- data/world/critters/duck/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/critters/duck/init.lua 2019-05-27 14:29:35 +0000
@@ -11,7 +11,7 @@
11 },11 },
12}12}
1313
14add_walking_animations(animations, "walk", dirname, "walk", {5, 10})14add_directional_animation(animations, "walk", dirname, "walk", {5, 10})
1515
16world:new_critter_type{16world:new_critter_type{
17 name = "duck",17 name = "duck",
1818
=== modified file 'data/world/critters/elk/init.lua'
--- data/world/critters/elk/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/critters/elk/init.lua 2019-05-27 14:29:35 +0000
@@ -12,7 +12,7 @@
12 },12 },
13}13}
1414
15add_walking_animations(animations, "walk", dirname, "walk", {21, 34}, 20)15add_directional_animation(animations, "walk", dirname, "walk", {21, 34}, 20)
1616
17world:new_critter_type{17world:new_critter_type{
18 name = "elk",18 name = "elk",
1919
=== modified file 'data/world/critters/fox/init.lua'
--- data/world/critters/fox/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/critters/fox/init.lua 2019-05-27 14:29:35 +0000
@@ -12,7 +12,7 @@
12 },12 },
13}13}
1414
15add_walking_animations(animations, "walk", dirname, "walk", {11, 14}, 20)15add_directional_animation(animations, "walk", dirname, "walk", {11, 14}, 20)
1616
17world:new_critter_type{17world:new_critter_type{
18 name = "fox",18 name = "fox",
1919
=== modified file 'data/world/critters/lynx/init.lua'
--- data/world/critters/lynx/init.lua 2017-02-12 09:10:57 +0000
+++ data/world/critters/lynx/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8 },8 },
9}9}
1010
11add_walking_animations(animations, "walk", dirname, "walk", {11, 21}, 20)11add_directional_animation(animations, "walk", dirname, "walk", {11, 21}, 20)
1212
1313
14world:new_critter_type{14world:new_critter_type{
1515
=== modified file 'data/world/critters/marten/init.lua'
--- data/world/critters/marten/init.lua 2017-02-12 09:10:57 +0000
+++ data/world/critters/marten/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8 },8 },
9}9}
1010
11add_walking_animations(animations, "walk", dirname, "walk", {15, 14}, 20)11add_directional_animation(animations, "walk", dirname, "walk", {15, 14}, 20)
1212
13world:new_critter_type{13world:new_critter_type{
14 name = "marten",14 name = "marten",
1515
=== modified file 'data/world/critters/reindeer/init.lua'
--- data/world/critters/reindeer/init.lua 2017-02-12 09:10:57 +0000
+++ data/world/critters/reindeer/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8 },8 },
9}9}
1010
11add_walking_animations(animations, "walk", dirname, "walk", {25, 30}, 20)11add_directional_animation(animations, "walk", dirname, "walk", {25, 30}, 20)
1212
1313
14world:new_critter_type{14world:new_critter_type{
1515
=== modified file 'data/world/critters/sheep/init.lua'
--- data/world/critters/sheep/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/critters/sheep/init.lua 2019-05-27 14:29:35 +0000
@@ -11,7 +11,7 @@
11 },11 },
12}12}
1313
14add_walking_animations(animations, "walk", dirname, "walk", {15, 25}, 20)14add_directional_animation(animations, "walk", dirname, "walk", {15, 25}, 20)
1515
16world:new_critter_type{16world:new_critter_type{
17 name = "sheep",17 name = "sheep",
1818
=== modified file 'data/world/critters/stag/init.lua'
--- data/world/critters/stag/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/critters/stag/init.lua 2019-05-27 14:29:35 +0000
@@ -12,7 +12,7 @@
12 },12 },
13}13}
1414
15add_walking_animations(animations, "walk", dirname, "walk", {25, 30}, 20)15add_directional_animation(animations, "walk", dirname, "walk", {25, 30}, 20)
1616
17world:new_critter_type{17world:new_critter_type{
18 name = "stag",18 name = "stag",
1919
=== modified file 'data/world/critters/wildboar/init.lua'
--- data/world/critters/wildboar/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/critters/wildboar/init.lua 2019-05-27 14:29:35 +0000
@@ -11,7 +11,7 @@
11 },11 },
12}12}
1313
14add_walking_animations(animations, "walk", dirname, "walk", {20, 22}, 20)14add_directional_animation(animations, "walk", dirname, "walk", {20, 22}, 20)
1515
16world:new_critter_type{16world:new_critter_type{
17 name = "wildboar",17 name = "wildboar",
1818
=== modified file 'data/world/critters/wisent/init.lua'
--- data/world/critters/wisent/init.lua 2017-02-12 09:10:57 +0000
+++ data/world/critters/wisent/init.lua 2019-05-27 14:29:35 +0000
@@ -8,7 +8,7 @@
8 },8 },
9}9}
1010
11add_walking_animations(animations, "walk", dirname, "walk", {24, 32}, 20)11add_directional_animation(animations, "walk", dirname, "walk", {24, 32}, 20)
1212
13world:new_critter_type{13world:new_critter_type{
14 name = "wisent",14 name = "wisent",
1515
=== modified file 'data/world/critters/wolf/init.lua'
--- data/world/critters/wolf/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/critters/wolf/init.lua 2019-05-27 14:29:35 +0000
@@ -12,7 +12,7 @@
12 },12 },
13}13}
1414
15add_walking_animations(animations, "walk", dirname, "walk", {19, 19}, 20)15add_directional_animation(animations, "walk", dirname, "walk", {19, 19}, 20)
1616
17world:new_critter_type{17world:new_critter_type{
18 name = "wolf",18 name = "wolf",
1919
=== modified file 'data/world/immovables/grass1/init.lua'
--- data/world/immovables/grass1/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/immovables/grass1/init.lua 2019-05-27 14:29:35 +0000
@@ -12,7 +12,7 @@
12 pictures = path.list_files(dirname .. "idle.png"),12 pictures = path.list_files(dirname .. "idle.png"),
13 hotspot = { 10, 20 },13 hotspot = { 10, 20 },
14 sound_effect = {14 sound_effect = {
15 path = "sound/animals/frog1",15 path = "sound/animals/frog",
16 },16 },
17 },17 },
18 }18 }
1919
=== modified file 'data/world/immovables/grass2/init.lua'
--- data/world/immovables/grass2/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/immovables/grass2/init.lua 2019-05-27 14:29:35 +0000
@@ -12,7 +12,7 @@
12 pictures = path.list_files(dirname .. "idle.png"),12 pictures = path.list_files(dirname .. "idle.png"),
13 hotspot = { 10, 16 },13 hotspot = { 10, 16 },
14 sound_effect = {14 sound_effect = {
15 path = "sound/animals/frog1",15 path = "sound/animals/frog",
16 },16 },
17 },17 },
18 }18 }
1919
=== modified file 'data/world/immovables/grass3/init.lua'
--- data/world/immovables/grass3/init.lua 2019-03-17 08:30:43 +0000
+++ data/world/immovables/grass3/init.lua 2019-05-27 14:29:35 +0000
@@ -12,7 +12,7 @@
12 pictures = path.list_files(dirname .. "idle.png"),12 pictures = path.list_files(dirname .. "idle.png"),
13 hotspot = { 10, 11 },13 hotspot = { 10, 11 },
14 sound_effect = {14 sound_effect = {
15 path = "sound/animals/frog1",15 path = "sound/animals/frog",
16 },16 },
17 },17 },
18 }18 }
1919
=== modified file 'doc/sphinx/source/animations.rst'
--- doc/sphinx/source/animations.rst 2019-05-11 13:48:12 +0000
+++ doc/sphinx/source/animations.rst 2019-05-27 14:29:35 +0000
@@ -19,7 +19,8 @@
1919
20 animations = {20 animations = {
21 idle = {21 idle = {
22 files = path.list_files(path.dirname(__file__) .. "idle_??.png"),22 directory = path.dirname(__file__),
23 basename = "idle",
23 hotspot = { 5, 7 },24 hotspot = { 5, 7 },
24 fps = 4,25 fps = 4,
25 sound_effect = {26 sound_effect = {
@@ -28,7 +29,14 @@
28 },29 },
29 representative_frame = 3,30 representative_frame = 3,
30 },31 },
31 working = ...32 walk = {
33 directory = path.dirname(__file__),
34 basename = "walk",
35 hotspot = { 5, 7 },
36 fps = 4,
37 directional = true
38 },
39 ...
32 }40 }
3341
34Let's have a detailed look at the ``idle`` animation:42Let's have a detailed look at the ``idle`` animation:
@@ -36,11 +44,23 @@
36**idle**44**idle**
37 *Mandatory*. This is the name of the animation. The animation can then be referenced by this name e.g. if you want to trigger it in a production program.45 *Mandatory*. This is the name of the animation. The animation can then be referenced by this name e.g. if you want to trigger it in a production program.
3846
39**files**47**directory**
40 *Mandatory*. A template for the image names. Our example will pick up any image from ``idle_00.png`` through ``idle_99.png`` in the specified directory path -- the current path in our example. These images can optionally have corresponding player color mask images called ``idle_00_pc.png`` through ``idle_99_pc.png``. Make sure to include leading 0's in the file names and to have consistent length -- we support 1, 2 and 3 digit numbers in an animation.48 *Mandatory*. The directory where the animation image files are located.
49
50**basename**
51 *Mandatory*. The filename prefix for the image files. Our example will pick up any image from ``idle_00.png`` through ``idle_99.png`` in the specified directory path -- the current path in our example. These images can optionally have corresponding player color mask images called ``idle_00_pc.png`` through ``idle_99_pc.png``. Make sure to include leading 0's in the file names and to have consistent length -- we support 1, 2 and 3 digit numbers in an animation.
52 If your animation contains only one file, you can also call it ``idle.png`` (and ``idle_pc.png`` for the player color mask) without ``_`` or any numbers in the file name.
53
54 We support *mipmaps* for animations. They allow us to provide the same image in different resolutions for optimum rendering quality.
55 For using mipmaps, simply name your files accordingly, and the engine will pick them up. e.g. ``idle_0.5_00.png`` will be rendered at scale ``0.5``, and ``idle_1_00.png`` will be rendered at the neutral scale ``1``.
56 The scale of ``1`` is mandatory, and other supported scales are ``0.5``, ``2`` and ``4``.
4157
42**pictures**58**pictures**
43 *DEPRECATED*. The same as ``files``.59 *DEPRECATED*. This is older code that is slowly being phased out - do not use this parameter.
60 A table with full directory and file names.
61
62**directional**
63 *Optional*. If this is ``true``, indicates to the engine that this is a directional animation. In our example, the engine will create a set of 6 animations called ``"walk_ne"``, ``"walk_e"``, ``"walk_se"``, ``"walk_sw"``, ``"walk_w"``, and ``"walk_nw"``. See :ref:`animations_directional` below.
4464
45**hotspot**65**hotspot**
46 *Mandatory*. Hotspots define a place on a graphic image through its *x* and *y* coordinates that can be used as a handle or reference point to provide control over positioning the image on the map. For example, hotspots help carriers stay on the road, and control the positioning of the wares they carry. Increase ``x`` to shift the animation to the left and ``y`` to shift it upwards.66 *Mandatory*. Hotspots define a place on a graphic image through its *x* and *y* coordinates that can be used as a handle or reference point to provide control over positioning the image on the map. For example, hotspots help carriers stay on the road, and control the positioning of the wares they carry. Increase ``x`` to shift the animation to the left and ``y`` to shift it upwards.
@@ -56,56 +76,7 @@
56 * **255:** Always play76 * **255:** Always play
5777
5878
59Mipmaps79.. _animations_directional:
60-------
61
62We support mipmaps for animations. They allow us to provide the same image in different
63resolutions for optimum rendering quality. Let's look at an example with a mipmap ``idle`` animation and a normal ``build`` animation:
64
65.. code-block:: lua
66
67 animations = {
68 idle = {
69 mipmap = {
70 {
71 scale = 0.5,
72 files = path.list_files(dirname .. "idle_0.5_??.png"),
73 },
74 {
75 scale = 1,
76 files = path.list_files(dirname .. "idle_1_??.png"),
77 },
78 {
79 scale = 2,
80 files = path.list_files(dirname .. "idle_2_??.png"),
81 },
82 {
83 scale = 4,
84 files = path.list_files(dirname .. "idle_4_??.png"),
85 }
86 },
87 hotspot = { 5, 7 },
88 fps = 4,
89 sound_effect = {
90 directory = "sound/foo",
91 name = "bar",
92 },
93 },
94 build = {
95 files = path.list_files(dirname .. "build_??.png"),
96 hotspot = { 5, 7 },
97 }
98 },
99
100The scale of ``1`` is mandatory, and other supported scales are ``0.5``, ``2``
101and ``4``.
102The base table should no longer contain the ``files`` entry
103when you're using a mipmap.
104Each mimap entry must define the ``files`` and the ``scale``.
105See also :ref:`animations_converting_formats`.
106
107**representative_frame**
108 *Optional*. Choose the animation frame that will be displayed in messages and in the encyclopedia as a representative image. Default is 0.
10980
110Directional Animations81Directional Animations
111----------------------82----------------------
@@ -126,7 +97,7 @@
126---------------------97---------------------
12798
128In order to cut down on the manual coding needed, we provide the convenience functions99In order to cut down on the manual coding needed, we provide the convenience functions
129:any:`add_animation` for static animations and :any:`add_walking_animations` for walking100:any:`add_animation` for static animations and :any:`add_directional_animation` for walking
130animations, both of which will also detect mipmaps automatically.101animations, both of which will also detect mipmaps automatically.
131The corresponding ``.lua`` script file is included centrally when the tribe or world102The corresponding ``.lua`` script file is included centrally when the tribe or world
132loading is started, so you won't need to include it again. Example:103loading is started, so you won't need to include it again. Example:
@@ -142,10 +113,10 @@
142 add_animation(animations, "idle", dirname, "idle", {16, 30}, 5)113 add_animation(animations, "idle", dirname, "idle", {16, 30}, 5)
143114
144 -- Add animations for the 6 directions with hotspot = {16, 30} and fps = 10115 -- Add animations for the 6 directions with hotspot = {16, 30} and fps = 10
145 add_walking_animations(animations, "walk", dirname, "walk", {16, 30}, 10)116 add_directional_animation(animations, "walk", dirname, "walk", {16, 30}, 10)
146117
147 -- Add a "walkload" animation. The animation hasn't been created yet in this example, so we reuse the files for the "walk" animation.118 -- Add a "walkload" animation. The animation hasn't been created yet in this example, so we reuse the files for the "walk" animation.
148 add_walking_animations(animations, "walkload", dirname, "walk", {16, 30}, 10)119 add_directional_animation(animations, "walkload", dirname, "walk", {16, 30}, 10)
149120
150121
151 tribes:new_worker_type {122 tribes:new_worker_type {
@@ -191,7 +162,7 @@
191 MipmapMaker accepts high-resolution images as input files (they should be at least 4 times the in-game size)162 MipmapMaker accepts high-resolution images as input files (they should be at least 4 times the in-game size)
192 and creates correctly named mipmap images for all supported scales for each animation, e.g.:163 and creates correctly named mipmap images for all supported scales for each animation, e.g.:
193164
194 java MipmapMaker ~/widelands/data/tribes/workers/fancytribe/diligentworker walk_se 2 true true true 4.0165 ``java MipmapMaker ~/widelands/data/tribes/workers/fancytribe/diligentworker walk_se 2 true true true 4.0``
195166
196 MipmapMaker is documented in ``widelands-media/graphics/tools/Graphics Tools (Java)/Readme``.167 MipmapMaker is documented in ``widelands-media/graphics/tools/Graphics Tools (Java)/Readme``.
197168
198169
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2019-05-12 07:45:59 +0000
+++ src/CMakeLists.txt 2019-05-27 14:29:35 +0000
@@ -107,7 +107,6 @@
107 graphic107 graphic
108 graphic_fonthandler108 graphic_fonthandler
109 graphic_text109 graphic_text
110 helper
111 io_filesystem110 io_filesystem
112 logic111 logic
113 logic_exceptions112 logic_exceptions
114113
=== modified file 'src/game_io/game_loader.cc'
--- src/game_io/game_loader.cc 2019-02-23 11:00:49 +0000
+++ src/game_io/game_loader.cc 2019-05-27 14:29:35 +0000
@@ -93,7 +93,8 @@
93 log("Game: Reading Scenario Tribes took %ums\n", timer.ms_since_last_query());93 log("Game: Reading Scenario Tribes took %ums\n", timer.ms_since_last_query());
94 }94 }
9595
96 log("Game: Reading Player Info ... ");96 // This also triggers loading the world and tribes, so we need a newline at the end of the log output
97 log("Game: Reading Player Info ...\n");
97 {98 {
98 GamePlayerInfoPacket p;99 GamePlayerInfoPacket p;
99 p.read(fs_, game_);100 p.read(fs_, game_);
100101
=== modified file 'src/graphic/animation.cc'
--- src/graphic/animation.cc 2019-05-04 09:59:51 +0000
+++ src/graphic/animation.cc 2019-05-27 14:29:35 +0000
@@ -31,13 +31,13 @@
31#include "base/i18n.h"31#include "base/i18n.h"
32#include "base/log.h"32#include "base/log.h"
33#include "base/macros.h"33#include "base/macros.h"
34#include "base/wexception.h"
35#include "graphic/diranimations.h"34#include "graphic/diranimations.h"
36#include "graphic/graphic.h"35#include "graphic/graphic.h"
37#include "graphic/image.h"36#include "graphic/image.h"
38#include "graphic/image_cache.h"37#include "graphic/image_cache.h"
39#include "graphic/playercolor.h"38#include "graphic/playercolor.h"
40#include "graphic/texture.h"39#include "graphic/texture.h"
40#include "io/filesystem/filesystem.h"
41#include "io/filesystem/layered_filesystem.h"41#include "io/filesystem/layered_filesystem.h"
42#include "logic/game_data_error.h"42#include "logic/game_data_error.h"
43#include "scripting/lua_table.h"43#include "scripting/lua_table.h"
@@ -56,25 +56,36 @@
56class NonPackedAnimation : public Animation {56class NonPackedAnimation : public Animation {
57public:57public:
58 struct MipMapEntry {58 struct MipMapEntry {
59 explicit MipMapEntry(float scale, const LuaTable& table);59 explicit MipMapEntry(std::vector<std::string> files);
60
61 // Loads the graphics if they are not yet loaded.
62 void ensure_graphics_are_loaded() const;
63
64 // Load the needed graphics from disk.
65 void load_graphics();
66
67 void blit(uint32_t idx, const Rectf& source_rect, const Rectf& destination_rect, const RGBColor* clr, Surface* target) const;
6068
61 // Whether this image set has player color masks provided69 // Whether this image set has player color masks provided
62 bool has_playercolor_masks;70 bool has_playercolor_masks;
6371
64 // Image files on disk72 // Image files on disk
65 std::vector<std::string> image_files;73 std::vector<std::string> image_files;
74
75 // Loaded images for each frame
76 std::vector<const Image*> frames;
77
78 private:
66 // Player color mask files on disk79 // Player color mask files on disk
67 std::vector<std::string> playercolor_mask_image_files;80 std::vector<std::string> playercolor_mask_image_files;
6881
69 // Loaded images for each frame
70 std::vector<const Image*> frames;
71 // Loaded player color mask images for each frame82 // Loaded player color mask images for each frame
72 std::vector<const Image*> playercolor_mask_frames;83 std::vector<const Image*> playercolor_mask_frames;
73 };84 };
7485
75 ~NonPackedAnimation() override {86 ~NonPackedAnimation() override {
76 }87 }
77 explicit NonPackedAnimation(const LuaTable& table);88 explicit NonPackedAnimation(const LuaTable& table, const std::string& basename);
7889
79 // Implements Animation.90 // Implements Animation.
80 float height() const override;91 float height() const override;
@@ -90,8 +101,8 @@
90 const Rectf& source_rect,101 const Rectf& source_rect,
91 const Rectf& destination_rect,102 const Rectf& destination_rect,
92 const RGBColor* clr,103 const RGBColor* clr,
93 Surface* target,104 Surface* target, float scale) const override;
94 float scale) const override;105 void load_default_scale_and_sounds() const override;
95106
96private:107private:
97 float find_best_scale(float scale) const;108 float find_best_scale(float scale) const;
@@ -100,12 +111,6 @@
100 // What if the game runs very slowly or very quickly?111 // What if the game runs very slowly or very quickly?
101 void trigger_sound(uint32_t framenumber, const Widelands::Coords& coords) const override;112 void trigger_sound(uint32_t framenumber, const Widelands::Coords& coords) const override;
102113
103 // Loads the graphics if they are not yet loaded.
104 void ensure_graphics_are_loaded() const;
105
106 // Load the needed graphics from disk.
107 void load_graphics();
108
109 uint32_t current_frame(uint32_t time) const;114 uint32_t current_frame(uint32_t time) const;
110115
111 uint32_t frametime_;116 uint32_t frametime_;
@@ -126,22 +131,17 @@
126 bool play_once_;131 bool play_once_;
127};132};
128133
129NonPackedAnimation::MipMapEntry::MipMapEntry(float scale, const LuaTable& table)134/*
130 : has_playercolor_masks(false) {135==============================================================================
131 if (scale <= 0.0f) {136
132 throw wexception(137NonPackedAnimation::MipMapEntry IMPLEMENTATION
133 "Animation scales must be positive numbers. Found %.2f", static_cast<double>(scale));138
134 }139==============================================================================
135140*/
136 // TODO(GunChleoc): We want to rename these from "pictures" to "files", because we'll have141
137 // spritesheets etc. in the future, and this naming will be clearer. We don't want to convert142NonPackedAnimation::MipMapEntry::MipMapEntry(std::vector<std::string> files) : has_playercolor_masks(false), image_files(files) {
138 // them in bulk right now though - it will take care of itself as we convert to mipmaps.
139 image_files = (table.has_key("files") ? table.get_table("files") : table.get_table("pictures"))
140 ->array_entries<std::string>();
141
142 if (image_files.empty()) {143 if (image_files.empty()) {
143 throw wexception("Animation without image files. For a scale of 1.0, the template should "144 throw Widelands::GameDataError("Animation without image files. For a scale of 1.0, the template should look similar to this:"
144 "look similar to this:"
145 " 'directory/idle_1_??.png' for 'directory/idle_1_00.png' etc.");145 " 'directory/idle_1_??.png' for 'directory/idle_1_00.png' etc.");
146 }146 }
147147
@@ -151,18 +151,84 @@
151 has_playercolor_masks = true;151 has_playercolor_masks = true;
152 playercolor_mask_image_files.push_back(image_file);152 playercolor_mask_image_files.push_back(image_file);
153 } else if (has_playercolor_masks) {153 } else if (has_playercolor_masks) {
154 throw wexception("Animation is missing player color file: %s", image_file.c_str());154 throw Widelands::GameDataError("Animation is missing player color file: %s", image_file.c_str());
155 }155 }
156 }156 }
157157
158 assert(!image_files.empty());158 assert(!image_files.empty());
159 assert(playercolor_mask_image_files.size() == image_files.size() ||159 assert(playercolor_mask_image_files.size() == image_files.size() || playercolor_mask_image_files.empty());
160 playercolor_mask_image_files.empty());160}
161}161
162162// Loads the graphics if they are not yet loaded.
163NonPackedAnimation::NonPackedAnimation(const LuaTable& table)163void NonPackedAnimation::MipMapEntry::ensure_graphics_are_loaded() const {
164 if (frames.empty()) {
165 const_cast<MipMapEntry*>(this)->load_graphics();
166 }
167}
168
169// Load the needed graphics from disk.
170void NonPackedAnimation::MipMapEntry::load_graphics() {
171 if (image_files.empty()) {
172 throw Widelands::GameDataError("animation without image files.");
173 }
174 if (playercolor_mask_image_files.size() && playercolor_mask_image_files.size() != image_files.size()) {
175 throw Widelands::GameDataError("animation has %" PRIuS " frames but playercolor mask has %" PRIuS " frames. First image is %s",
176 image_files.size(), playercolor_mask_image_files.size(), image_files.front().c_str());
177 }
178
179 for (const std::string& filename : image_files) {
180 const Image* image = g_gr->images().get(filename);
181 if (frames.size() &&
182 (frames.front()->width() != image->width() || frames.front()->height() != image->height())) {
183 throw Widelands::GameDataError("wrong size: (%u, %u) for file %s, should be (%u, %u) like the first frame",
184 image->width(), image->height(), filename.c_str(), frames.front()->width(),
185 frames.front()->height());
186 }
187 frames.push_back(image);
188 }
189
190 for (const std::string& filename : playercolor_mask_image_files) {
191 // TODO(unknown): Do not load playercolor mask as opengl texture or use it as
192 // opengl texture.
193 const Image* pc_image = g_gr->images().get(filename);
194 if (frames.front()->width() != pc_image->width() || frames.front()->height() != pc_image->height()) {
195 throw Widelands::GameDataError("playercolor mask %s has wrong size: (%u, %u), should "
196 "be (%u, %u) like the animation frame",
197 filename.c_str(), pc_image->width(), pc_image->height(), frames.front()->width(),
198 frames.front()->height());
199 }
200 playercolor_mask_frames.push_back(pc_image);
201 }
202}
203
204void NonPackedAnimation::MipMapEntry::blit(uint32_t idx,
205 const Rectf& source_rect,
206 const Rectf& destination_rect,
207 const RGBColor* clr,
208 Surface* target) const {
209 assert(!frames.empty());
210 assert(target);
211 assert(idx < frames.size());
212
213 if (!has_playercolor_masks || clr == nullptr) {
214 target->blit(destination_rect, *frames.at(idx), source_rect, 1., BlendMode::UseAlpha);
215 } else {
216 target->blit_blended(
217 destination_rect, *frames.at(idx), *playercolor_mask_frames.at(idx), source_rect, *clr);
218 }
219}
220
221/*
222==============================================================================
223
224NonPackedAnimation IMPLEMENTATION
225
226==============================================================================
227*/
228
229NonPackedAnimation::NonPackedAnimation(const LuaTable& table, const std::string& basename)
164 : Animation(table.has_key("representative_frame") ? table.get_int("representative_frame") : 0),230 : Animation(table.has_key("representative_frame") ? table.get_int("representative_frame") : 0),
165 frametime_(FRAME_LENGTH),231 frametime_(FRAME_LENGTH),
166 hotspot_(table.get_vector<std::string, int>("hotspot")),232 hotspot_(table.get_vector<std::string, int>("hotspot")),
167 sound_effect_(kNoSoundEffect),233 sound_effect_(kNoSoundEffect),
168 sound_priority_(kFxPriorityLowest),234 sound_priority_(kFxPriorityLowest),
@@ -190,36 +256,47 @@
190 play_once_ = table.get_bool("play_once");256 play_once_ = table.get_bool("play_once");
191 }257 }
192258
193 if (table.has_key("mipmap")) {259 // Get image files
194 std::unique_ptr<LuaTable> mipmaps_table = table.get_table("mipmap");260 if (table.has_key("pictures")) {
195 for (const int key : mipmaps_table->keys<int>()) {261 // TODO(GunChleoc): Old code - remove this option once conversion has been completed
196 std::unique_ptr<LuaTable> current_scale_table = mipmaps_table->get_table(key);262 mipmaps_.insert(std::make_pair(
197 const float current_scale = current_scale_table->get_double("scale");263 1.0f,
198 if (kSupportedScales.count(current_scale) != 1) {264 std::unique_ptr<MipMapEntry>(new MipMapEntry(table.get_table("pictures")->array_entries<std::string>()))));
199 std::string supported_scales = "";
200 for (const float supported_scale : kSupportedScales) {
201 supported_scales =
202 (boost::format("%s %.1f") % supported_scales % supported_scale).str();
203 }
204 throw wexception(
205 "Animation has unsupported scale '%.2f' in mipmap - supported scales are:%s",
206 static_cast<double>(current_scale), supported_scales.c_str());
207 }
208 mipmaps_.insert(std::make_pair(
209 current_scale,
210 std::unique_ptr<MipMapEntry>(new MipMapEntry(current_scale, *current_scale_table))));
211 }
212 } else {265 } else {
213 mipmaps_.insert(266 if (basename.empty() || !table.has_key("directory")) {
214 std::make_pair(1.0f, std::unique_ptr<MipMapEntry>(new MipMapEntry(1.0f, table))));267 throw Widelands::GameDataError("Animation did not define both a basename and a directory for its image files");
268 }
269 const std::string directory = table.get_string("directory");
270
271 // List files for the given scale, and if we have any, add a mipmap entry for them.
272 auto add_scale = [this, basename, directory](float scale_as_float, const std::string& scale_as_string) {
273 std::vector<std::string> filenames = g_fs->get_sequential_files(directory, basename + scale_as_string, "png");
274 if (!filenames.empty()) {
275 mipmaps_.insert(std::make_pair(scale_as_float, std::unique_ptr<MipMapEntry>(new MipMapEntry(filenames))));
276 }
277 };
278 add_scale(0.5f, "_0.5");
279 add_scale(1.0f, "_1");
280 add_scale(2.0f, "_2");
281 add_scale(4.0f, "_4");
282
283 if (mipmaps_.count(1.0f) == 0) {
284 // There might be only 1 scale
285 add_scale(1.0f, "");
286 if (mipmaps_.count(1.0f) == 0) {
287 // No files found at all
288 throw Widelands::GameDataError(
289 "Animation in directory '%s' with basename '%s' has no images for mandatory scale '1' in mipmap - supported scales are: 0.5, 1, 2, 4", directory.c_str(), basename.c_str());
290 }
291 }
215 }292 }
216293
217 // Frames294 // Frames and FPS
218 nr_frames_ = mipmaps_.begin()->second->image_files.size();295 nr_frames_ = mipmaps_.begin()->second->image_files.size();
219 if (table.has_key("fps")) {296 if (table.has_key("fps")) {
220 if (nr_frames_ == 1) {297 if (nr_frames_ == 1) {
221 throw wexception("Animation with one picture %s must not have 'fps'",298 throw Widelands::GameDataError(
222 mipmaps_.begin()->second->image_files[0].c_str());299 "Animation with one picture %s must not have 'fps'", mipmaps_.begin()->second->image_files.front().c_str());
223 }300 }
224 frametime_ = 1000 / get_positive_int(table, "fps");301 frametime_ = 1000 / get_positive_int(table, "fps");
225 }302 }
@@ -234,22 +311,22 @@
234 const bool should_have_playercolor = mipmaps_.begin()->second->has_playercolor_masks;311 const bool should_have_playercolor = mipmaps_.begin()->second->has_playercolor_masks;
235 for (const auto& mipmap : mipmaps_) {312 for (const auto& mipmap : mipmaps_) {
236 if (mipmap.second->image_files.size() != nr_frames_) {313 if (mipmap.second->image_files.size() != nr_frames_) {
237 throw wexception(314 throw Widelands::GameDataError("Mismatched number of images for different scales in animation table: %" PRIuS " vs. %u at scale %.2f",
238 "Mismatched number of images for different scales in animation table: %" PRIuS315 mipmap.second->image_files.size(),
239 " vs. %u at scale %.2f",316 nr_frames_,
240 mipmap.second->image_files.size(), nr_frames_, static_cast<double>(mipmap.first));317 static_cast<double>(mipmap.first));
241 }318 }
242 if (mipmap.second->has_playercolor_masks != should_have_playercolor) {319 if (mipmap.second->has_playercolor_masks != should_have_playercolor) {
243 throw wexception(320 throw Widelands::GameDataError("Mismatched existence of player colors in animation table for scales %.2f and %.2f",
244 "Mismatched existence of player colors in animation table for scales %.2f and %.2f",321 static_cast<double>(mipmaps_.begin()->first),
245 static_cast<double>(mipmaps_.begin()->first), static_cast<double>(mipmap.first));322 static_cast<double>(mipmap.first));
246 }323 }
247 }324 }
248 if (mipmaps_.count(1.0f) != 1) {325 if (mipmaps_.count(1.0f) != 1) {
249 throw wexception("All animations must provide images for the neutral scale (1.0)");326 throw Widelands::GameDataError("All animations must provide images for the neutral scale (1.0)");
250 }327 }
251 } catch (const LuaError& e) {328 } catch (const LuaError& e) {
252 throw wexception("Error in animation table: %s", e.what());329 throw Widelands::GameDataError("Error in animation table: %s", e.what());
253 }330 }
254}331}
255332
@@ -266,59 +343,10 @@
266 return result;343 return result;
267}344}
268345
269void NonPackedAnimation::ensure_graphics_are_loaded() const {
270 if (mipmaps_.begin()->second->frames.empty()) {
271 const_cast<NonPackedAnimation*>(this)->load_graphics();
272 }
273}
274
275void NonPackedAnimation::load_graphics() {
276 for (const auto& entry : mipmaps_) {
277 MipMapEntry* mipmap = entry.second.get();
278
279 if (mipmap->image_files.empty()) {
280 throw wexception("animation without image files at promised scale %.2f.",
281 static_cast<double>(entry.first));
282 }
283 if (mipmap->playercolor_mask_image_files.size() &&
284 mipmap->playercolor_mask_image_files.size() != mipmap->image_files.size()) {
285 throw wexception("animation has %" PRIuS " frames but playercolor mask has %" PRIuS
286 " frames for scale %.2f",
287 mipmap->image_files.size(), mipmap->playercolor_mask_image_files.size(),
288 static_cast<double>(entry.first));
289 }
290
291 for (const std::string& filename : mipmap->image_files) {
292 const Image* image = g_gr->images().get(filename);
293 if (mipmap->frames.size() && (mipmap->frames[0]->width() != image->width() ||
294 mipmap->frames[0]->height() != image->height())) {
295 throw wexception("wrong size: (%u, %u), should be (%u, %u) like the first frame",
296 image->width(), image->height(), mipmap->frames[0]->width(),
297 mipmap->frames[0]->height());
298 }
299 mipmap->frames.push_back(image);
300 }
301
302 for (const std::string& filename : mipmap->playercolor_mask_image_files) {
303 // TODO(unknown): Do not load playercolor mask as opengl texture or use it as
304 // opengl texture.
305 const Image* pc_image = g_gr->images().get(filename);
306 if (mipmap->frames[0]->width() != pc_image->width() ||
307 mipmap->frames[0]->height() != pc_image->height()) {
308 // TODO(unknown): see bug #1324642
309 throw wexception("playercolor mask has wrong size: (%u, %u), should "
310 "be (%u, %u) like the animation frame",
311 pc_image->width(), pc_image->height(), mipmap->frames[0]->width(),
312 mipmap->frames[0]->height());
313 }
314 mipmap->playercolor_mask_frames.push_back(pc_image);
315 }
316 }
317}
318
319float NonPackedAnimation::height() const {346float NonPackedAnimation::height() const {
320 ensure_graphics_are_loaded();347 const MipMapEntry& mipmap = *mipmaps_.at(1.0f);
321 return mipmaps_.at(1.0f)->frames.at(0)->height();348 mipmap.ensure_graphics_are_loaded();
349 return mipmap.frames.front()->height();
322}350}
323351
324uint16_t NonPackedAnimation::nr_frames() const {352uint16_t NonPackedAnimation::nr_frames() const {
@@ -368,8 +396,9 @@
368}396}
369397
370Rectf NonPackedAnimation::source_rectangle(const int percent_from_bottom, float scale) const {398Rectf NonPackedAnimation::source_rectangle(const int percent_from_bottom, float scale) const {
371 ensure_graphics_are_loaded();399 const MipMapEntry& mipmap = *mipmaps_.at(find_best_scale(scale));
372 const Image* first_frame = mipmaps_.at(find_best_scale(scale))->frames.at(0);400 mipmap.ensure_graphics_are_loaded();
401 const Image* first_frame = mipmap.frames.front();
373 const float h = percent_from_bottom * first_frame->height() / 100;402 const float h = percent_from_bottom * first_frame->height() / 100;
374 // Using floor for pixel perfect positioning403 // Using floor for pixel perfect positioning
375 return Rectf(0.f, std::floor(first_frame->height() - h), first_frame->width(), h);404 return Rectf(0.f, std::floor(first_frame->height() - h), first_frame->width(), h);
@@ -378,7 +407,6 @@
378Rectf NonPackedAnimation::destination_rectangle(const Vector2f& position,407Rectf NonPackedAnimation::destination_rectangle(const Vector2f& position,
379 const Rectf& source_rect,408 const Rectf& source_rect,
380 const float scale) const {409 const float scale) const {
381 ensure_graphics_are_loaded();
382 const float best_scale = find_best_scale(scale);410 const float best_scale = find_best_scale(scale);
383 return Rectf(position.x - (hotspot_.x - source_rect.x / best_scale) * scale,411 return Rectf(position.x - (hotspot_.x - source_rect.x / best_scale) * scale,
384 position.y - (hotspot_.y - source_rect.y / best_scale) * scale,412 position.y - (hotspot_.y - source_rect.y / best_scale) * scale,
@@ -390,23 +418,18 @@
390 const Rectf& source_rect,418 const Rectf& source_rect,
391 const Rectf& destination_rect,419 const Rectf& destination_rect,
392 const RGBColor* clr,420 const RGBColor* clr,
393 Surface* target,421 Surface* target, float scale) const {
394 float scale) const {422 mipmaps_.at(find_best_scale(scale))->blit(current_frame(time), source_rect, destination_rect, clr, target);
395 ensure_graphics_are_loaded();
396 assert(target);
397 const uint32_t idx = current_frame(time);
398 assert(idx < nr_frames());
399
400 const MipMapEntry& mipmap = *mipmaps_.at(find_best_scale(scale));
401 if (!mipmap.has_playercolor_masks || clr == nullptr) {
402 target->blit(destination_rect, *mipmap.frames.at(idx), source_rect, 1., BlendMode::UseAlpha);
403 } else {
404 target->blit_blended(destination_rect, *mipmap.frames.at(idx),
405 *mipmap.playercolor_mask_frames.at(idx), source_rect, *clr);
406 }
407 trigger_sound(time, coords);423 trigger_sound(time, coords);
408}424}
409425
426void NonPackedAnimation::load_default_scale_and_sounds() const {
427 mipmaps_.at(1.0f)->ensure_graphics_are_loaded();
428 if (sound_effect_ != kNoSoundEffect && !SoundHandler::is_backend_disabled()) {
429 g_sh->load_fx(SoundType::kAmbient, sound_effect_);
430 }
431}
432
410} // namespace433} // namespace
411434
412/*435/*
@@ -434,13 +457,12 @@
434457
435==============================================================================458==============================================================================
436*/459*/
437460uint32_t AnimationManager::load(const LuaTable& table, const std::string& basename) {
438uint32_t AnimationManager::load(const LuaTable& table) {461 animations_.push_back(std::unique_ptr<Animation>(new NonPackedAnimation(table, basename)));
439 animations_.push_back(std::unique_ptr<Animation>(new NonPackedAnimation(table)));
440 return animations_.size();462 return animations_.size();
441}463}
442uint32_t AnimationManager::load(const std::string& map_object_name, const LuaTable& table) {464uint32_t AnimationManager::load(const std::string& map_object_name, const LuaTable& table, const std::string& basename) {
443 animations_.push_back(std::unique_ptr<Animation>(new NonPackedAnimation(table)));465 animations_.push_back(std::unique_ptr<Animation>(new NonPackedAnimation(table, basename)));
444 const size_t result = animations_.size();466 const size_t result = animations_.size();
445 representative_animations_by_map_object_name_.insert(std::make_pair(map_object_name, result));467 representative_animations_by_map_object_name_.insert(std::make_pair(map_object_name, result));
446 return result;468 return result;
@@ -448,7 +470,7 @@
448470
449const Animation& AnimationManager::get_animation(uint32_t id) const {471const Animation& AnimationManager::get_animation(uint32_t id) const {
450 if (!id || id > animations_.size())472 if (!id || id > animations_.size())
451 throw wexception("Requested unknown animation with id: %i", id);473 throw Widelands::GameDataError("Requested unknown animation with id: %i", id);
452474
453 return *animations_[id - 1];475 return *animations_[id - 1];
454}476}
455477
=== modified file 'src/graphic/animation.h'
--- src/graphic/animation.h 2019-05-04 09:59:51 +0000
+++ src/graphic/animation.h 2019-05-27 14:29:35 +0000
@@ -94,8 +94,10 @@
94 const Rectf& source_rect,94 const Rectf& source_rect,
95 const Rectf& destination_rect,95 const Rectf& destination_rect,
96 const RGBColor* clr,96 const RGBColor* clr,
97 Surface* target,97 Surface* target, float scale) const = 0;
98 float scale) const = 0;98
99 /// Load animation images into memory for default scale.
100 virtual void load_default_scale_and_sounds() const = 0;
99101
100protected:102protected:
101 /// Play the sound effect associated with this animation at the given time.103 /// Play the sound effect associated with this animation at the given time.
@@ -118,14 +120,16 @@
118 /**120 /**
119 * Loads an animation, graphics sound and everything from a Lua table.121 * Loads an animation, graphics sound and everything from a Lua table.
120 *122 *
123 * The 'basename' is the filename prefix for loading the images, e.g. "idle" or "walk_ne".
124 *
121 * The Lua table must contain a table 'pictures' with image paths and a 'hotspot' table.125 * The Lua table must contain a table 'pictures' with image paths and a 'hotspot' table.
122 *126 *
123 * Optional parameters in the Lua table are 'fps' and 'sound_effect'.127 * Optional parameters in the Lua table are 'fps' and 'sound_effect'.
124 */128 */
125 uint32_t load(const LuaTable& table);129 uint32_t load(const LuaTable& table, const std::string& basename);
126 /// Same as above, but this animation will be used for getting a representative image by map130 /// Same as above, but this animation will be used for getting a representative image by map
127 /// object name131 /// object name
128 uint32_t load(const std::string& map_object_name, const LuaTable& table);132 uint32_t load(const std::string& map_object_name, const LuaTable& table, const std::string& basename);
129133
130 /// Returns the animation with the given ID or throws an exception if it is134 /// Returns the animation with the given ID or throws an exception if it is
131 /// unknown.135 /// unknown.
132136
=== modified file 'src/helper.h'
--- src/helper.h 2019-02-23 11:00:49 +0000
+++ src/helper.h 2019-05-27 14:29:35 +0000
@@ -41,17 +41,4 @@
41/// lines.41/// lines.
42std::vector<std::string> split_string(const std::string&, char const* separators);42std::vector<std::string> split_string(const std::string&, char const* separators);
4343
44// A functional container filtering (by copying the values). Returns a new
45// ContainerType that contains all values where 'test' returned true.
46template <typename ContainerType, class UnaryPredicate>
47ContainerType filter(const ContainerType& container, UnaryPredicate test) {
48 ContainerType filtered;
49 for (const auto& entry : container) {
50 if (!test(entry)) {
51 continue;
52 }
53 filtered.insert(entry);
54 }
55 return filtered;
56}
57#endif // end of include guard: WL_HELPER_H44#endif // end of include guard: WL_HELPER_H
5845
=== modified file 'src/io/filesystem/disk_filesystem.cc'
--- src/io/filesystem/disk_filesystem.cc 2019-02-23 11:00:49 +0000
+++ src/io/filesystem/disk_filesystem.cc 2019-05-27 14:29:35 +0000
@@ -76,7 +76,7 @@
76 return true;76 return true;
77}77}
7878
79std::set<std::string> RealFSImpl::list_directory(const std::string& path) {79FilenameSet RealFSImpl::list_directory(const std::string& path) const {
80#ifdef _WIN3280#ifdef _WIN32
81 std::string buf;81 std::string buf;
82 struct _finddata_t c_file;82 struct _finddata_t c_file;
@@ -152,7 +152,7 @@
152 * \e can't exist then)152 * \e can't exist then)
153 */153 */
154// TODO(unknown): Can this be rewritten to just using exceptions? Should it?154// TODO(unknown): Can this be rewritten to just using exceptions? Should it?
155bool RealFSImpl::file_exists(const std::string& path) {155bool RealFSImpl::file_exists(const std::string& path) const {
156 return FileSystemPath(canonicalize_name(path)).exists_;156 return FileSystemPath(canonicalize_name(path)).exists_;
157}157}
158158
159159
=== modified file 'src/io/filesystem/disk_filesystem.h'
--- src/io/filesystem/disk_filesystem.h 2019-02-23 11:00:49 +0000
+++ src/io/filesystem/disk_filesystem.h 2019-05-27 14:29:35 +0000
@@ -30,10 +30,10 @@
30public:30public:
31 explicit RealFSImpl(const std::string& Directory);31 explicit RealFSImpl(const std::string& Directory);
3232
33 std::set<std::string> list_directory(const std::string& path) override;33 FilenameSet list_directory(const std::string& path) const override;
3434
35 bool is_writable() const override;35 bool is_writable() const override;
36 bool file_exists(const std::string& path) override;36 bool file_exists(const std::string& path) const override;
37 bool is_directory(const std::string& path) override;37 bool is_directory(const std::string& path) override;
38 void ensure_directory_exists(const std::string& fs_dirname) override;38 void ensure_directory_exists(const std::string& fs_dirname) override;
39 void make_directory(const std::string& fs_dirname) override;39 void make_directory(const std::string& fs_dirname) override;
4040
=== modified file 'src/io/filesystem/filesystem.cc'
--- src/io/filesystem/filesystem.cc 2019-03-12 20:55:44 +0000
+++ src/io/filesystem/filesystem.cc 2019-05-27 14:29:35 +0000
@@ -34,7 +34,9 @@
3434
35// We have to add Boost to this block to make codecheck happy35// We have to add Boost to this block to make codecheck happy
36#include <boost/algorithm/string/predicate.hpp>36#include <boost/algorithm/string/predicate.hpp>
37#include <boost/algorithm/string/replace.hpp>
37#include <boost/format.hpp>38#include <boost/format.hpp>
39#include <boost/lexical_cast.hpp>
38#ifdef _WIN3240#ifdef _WIN32
39#include <direct.h>41#include <direct.h>
40#include <io.h>42#include <io.h>
@@ -81,6 +83,54 @@
81const std::vector<std::string> illegal_filename_characters{83const std::vector<std::string> illegal_filename_characters{
82 "<", ">", ":", "\"", "|", "?", "*", "/", "\\",84 "<", ">", ":", "\"", "|", "?", "*", "/", "\\",
83};85};
86
87/// A class that makes iteration over filename_?.* templates easy. It is much faster than using regex.
88class NumberGlob {
89public:
90 explicit NumberGlob(const std::string& file_template);
91
92 /// If there is a next filename, puts it in 's' and returns true.
93 bool next(std::string* s);
94
95private:
96 std::string template_;
97 std::string format_;
98 std::string to_replace_;
99 uint32_t current_;
100 uint32_t max_;
101
102 DISALLOW_COPY_AND_ASSIGN(NumberGlob);
103};
104
105/**
106 * Implementation for NumberGlob.
107 */
108NumberGlob::NumberGlob(const std::string& file_template) : template_(file_template), current_(0) {
109 int nchars = count(file_template.begin(), file_template.end(), '?');
110 format_ = "%0" + boost::lexical_cast<std::string>(nchars) + "i";
111
112 max_ = 1;
113 for (int i = 0; i < nchars; ++i) {
114 max_ *= 10;
115 to_replace_ += "?";
116 }
117 max_ -= 1;
118}
119
120bool NumberGlob::next(std::string* s) {
121 if (current_ > max_) {
122 return false;
123 }
124
125 if (max_) {
126 *s = boost::replace_last_copy(
127 template_, to_replace_, (boost::format(format_) % current_).str());
128 } else {
129 *s = template_;
130 }
131 ++current_;
132 return true;
133}
84} // namespace134} // namespace
85135
86/**136/**
@@ -261,6 +311,37 @@
261 return homedir;311 return homedir;
262}312}
263313
314// Returning a vector rather than a set because animations need the indices
315std::vector<std::string> FileSystem::get_sequential_files(const std::string& directory, const std::string& basename, const std::string& extension) const {
316 std::vector<std::string> result;
317
318 auto get_files = [this, directory, basename, extension](const std::string& number_template) {
319 std::vector<std::string> files;
320 const std::string filename_template = directory + file_separator() + basename + number_template + "." + extension;
321
322 NumberGlob glob(filename_template);
323 std::string filename;
324 while (glob.next(&filename)) {
325 if (!file_exists(filename)) {
326 break;
327 }
328 files.push_back(filename);
329 }
330 return files;
331 };
332 result = get_files("");
333 if (result.empty()) {
334 result = get_files("_?");
335 }
336 if (result.empty()) {
337 result = get_files("_??");
338 }
339 if (result.empty()) {
340 result = get_files("_???");
341 }
342 return result;
343}
344
264/**345/**
265 * Split a string into components separated by a certain character.346 * Split a string into components separated by a certain character.
266 *347 *
267348
=== modified file 'src/io/filesystem/filesystem.h'
--- src/io/filesystem/filesystem.h 2019-02-23 11:00:49 +0000
+++ src/io/filesystem/filesystem.h 2019-05-27 14:29:35 +0000
@@ -50,11 +50,11 @@
50 }50 }
5151
52 // Returns all files and directories (full path) in the given directory 'directory'.52 // Returns all files and directories (full path) in the given directory 'directory'.
53 virtual std::set<std::string> list_directory(const std::string& directory) = 0;53 virtual FilenameSet list_directory(const std::string& directory) const = 0;
5454
55 virtual bool is_writable() const = 0;55 virtual bool is_writable() const = 0;
56 virtual bool is_directory(const std::string& path) = 0;56 virtual bool is_directory(const std::string& path) = 0;
57 virtual bool file_exists(const std::string& path) = 0;57 virtual bool file_exists(const std::string& path) const = 0;
5858
59 virtual void* load(const std::string& fname, size_t& length) = 0;59 virtual void* load(const std::string& fname, size_t& length) = 0;
6060
@@ -132,6 +132,24 @@
132 static std::string filename_without_ext(const char* n);132 static std::string filename_without_ext(const char* n);
133 static std::string get_homedir();133 static std::string get_homedir();
134134
135
136 /// Return the files in the given 'directory' that match the condition in 'test', i.e. 'test' returned 'true' for their filenames.
137 template <class UnaryPredicate>
138 FilenameSet filter_directory(const std::string& directory, UnaryPredicate test) const {
139 FilenameSet result = list_directory(directory);
140 for (auto it = result.begin(); it != result.end();) {
141 if (!test(*it)) {
142 it = result.erase(it);
143 } else {
144 ++it;
145 }
146 }
147 return result;
148 }
149
150 /// Returns all files in the given 'directory' that match 'basename' followed by 1-3 numbers, followed by '.', followed by 'extension'
151 std::vector<std::string> get_sequential_files(const std::string& directory, const std::string& basename, const std::string& extension) const;
152
135 virtual unsigned long long disk_space() = 0;153 virtual unsigned long long disk_space() = 0;
136154
137protected:155protected:
138156
=== modified file 'src/io/filesystem/layered_filesystem.cc'
--- src/io/filesystem/layered_filesystem.cc 2019-02-23 11:00:49 +0000
+++ src/io/filesystem/layered_filesystem.cc 2019-05-27 14:29:35 +0000
@@ -59,7 +59,7 @@
59 *59 *
60 * Returns the number of files found.60 * Returns the number of files found.
61 */61 */
62std::set<std::string> LayeredFileSystem::list_directory(const std::string& path) {62FilenameSet LayeredFileSystem::list_directory(const std::string& path) const {
63 std::set<std::string> results;63 std::set<std::string> results;
64 FilenameSet files;64 FilenameSet files;
65 // Check home system first65 // Check home system first
@@ -81,7 +81,7 @@
81/**81/**
82 * Returns true if the file can be found in at least one of the sub-filesystems82 * Returns true if the file can be found in at least one of the sub-filesystems
83 */83 */
84bool LayeredFileSystem::file_exists(const std::string& path) {84bool LayeredFileSystem::file_exists(const std::string& path) const {
85 if (home_ && home_->file_exists(path))85 if (home_ && home_->file_exists(path))
86 return true;86 return true;
87 for (auto it = filesystems_.rbegin(); it != filesystems_.rend(); ++it)87 for (auto it = filesystems_.rbegin(); it != filesystems_.rend(); ++it)
8888
=== modified file 'src/io/filesystem/layered_filesystem.h'
--- src/io/filesystem/layered_filesystem.h 2019-02-23 11:00:49 +0000
+++ src/io/filesystem/layered_filesystem.h 2019-05-27 14:29:35 +0000
@@ -56,10 +56,10 @@
56 // files). Take ownership of the given filesystem.56 // files). Take ownership of the given filesystem.
57 void set_home_file_system(FileSystem*);57 void set_home_file_system(FileSystem*);
5858
59 std::set<std::string> list_directory(const std::string& path) override;59 FilenameSet list_directory(const std::string& path) const override;
6060
61 bool is_writable() const override;61 bool is_writable() const override;
62 bool file_exists(const std::string& path) override;62 bool file_exists(const std::string& path) const override;
63 bool is_directory(const std::string& path) override;63 bool is_directory(const std::string& path) override;
64 void ensure_directory_exists(const std::string& fs_dirname) override;64 void ensure_directory_exists(const std::string& fs_dirname) override;
65 void make_directory(const std::string& fs_dirname) override;65 void make_directory(const std::string& fs_dirname) override;
6666
=== modified file 'src/io/filesystem/zip_filesystem.cc'
--- src/io/filesystem/zip_filesystem.cc 2019-02-23 11:00:49 +0000
+++ src/io/filesystem/zip_filesystem.cc 2019-05-27 14:29:35 +0000
@@ -154,7 +154,7 @@
154 * pathname) in the results. There doesn't seem to be an even remotely154 * pathname) in the results. There doesn't seem to be an even remotely
155 * cross-platform way of doing this155 * cross-platform way of doing this
156 */156 */
157std::set<std::string> ZipFilesystem::list_directory(const std::string& path_in) {157FilenameSet ZipFilesystem::list_directory(const std::string& path_in) const {
158 assert(path_in.size()); // prevent invalid read below158 assert(path_in.size()); // prevent invalid read below
159159
160 std::string path = basedir_in_zip_file_;160 std::string path = basedir_in_zip_file_;
@@ -197,7 +197,7 @@
197 * Returns true if the given file exists, and false if it doesn't.197 * Returns true if the given file exists, and false if it doesn't.
198 * Also returns false if the pathname is invalid198 * Also returns false if the pathname is invalid
199 */199 */
200bool ZipFilesystem::file_exists(const std::string& path) {200bool ZipFilesystem::file_exists(const std::string& path) const {
201 try {201 try {
202 unzGoToFirstFile(zip_file_->read_handle());202 unzGoToFirstFile(zip_file_->read_handle());
203 } catch (...) {203 } catch (...) {
204204
=== modified file 'src/io/filesystem/zip_filesystem.h'
--- src/io/filesystem/zip_filesystem.h 2019-02-23 11:00:49 +0000
+++ src/io/filesystem/zip_filesystem.h 2019-05-27 14:29:35 +0000
@@ -38,10 +38,10 @@
3838
39 bool is_writable() const override;39 bool is_writable() const override;
4040
41 std::set<std::string> list_directory(const std::string& path) override;41 FilenameSet list_directory(const std::string& path) const override;
4242
43 bool is_directory(const std::string& path) override;43 bool is_directory(const std::string& path) override;
44 bool file_exists(const std::string& path) override;44 bool file_exists(const std::string& path) const override;
4545
46 void* load(const std::string& fname, size_t& length) override;46 void* load(const std::string& fname, size_t& length) override;
4747
4848
=== modified file 'src/logic/map_objects/map_object.cc'
--- src/logic/map_objects/map_object.cc 2019-05-26 17:21:15 +0000
+++ src/logic/map_objects/map_object.cc 2019-05-27 14:29:35 +0000
@@ -44,6 +44,10 @@
44#include "map_io/map_object_loader.h"44#include "map_io/map_object_loader.h"
45#include "map_io/map_object_saver.h"45#include "map_io/map_object_saver.h"
4646
47namespace {
48char const* const animation_direction_names[6] = {"_ne", "_e", "_se", "_sw", "_w", "_nw"};
49} // namespace
50
47namespace Widelands {51namespace Widelands {
4852
49CmdDestroyMapObject::CmdDestroyMapObject(uint32_t const t, MapObject& o)53CmdDestroyMapObject::CmdDestroyMapObject(uint32_t const t, MapObject& o)
@@ -239,15 +243,7 @@
239 init_descname,243 init_descname,
240 table.has_key("helptext_script") ? table.get_string("helptext_script") : "") {244 table.has_key("helptext_script") ? table.get_string("helptext_script") : "") {
241 if (table.has_key("animations")) {245 if (table.has_key("animations")) {
242 std::unique_ptr<LuaTable> anims(table.get_table("animations"));246 add_animations(*table.get_table("animations"));
243 for (const std::string& animation : anims->keys<std::string>()) {
244 if (animation == "idle") {
245 add_animation(
246 animation, g_gr->animations().load(init_name, *anims->get_table(animation)));
247 } else {
248 add_animation(animation, g_gr->animations().load(*anims->get_table(animation)));
249 }
250 }
251 if (!is_animation_known("idle")) {247 if (!is_animation_known("idle")) {
252 throw GameDataError(248 throw GameDataError(
253 "Map object %s has animations but no idle animation", init_name.c_str());249 "Map object %s has animations but no idle animation", init_name.c_str());
@@ -275,20 +271,43 @@
275}271}
276272
277/**273/**
278 * Add this animation for this map object under this name274 * Add all animations for this map object
279 */275 */
280void MapObjectDescr::add_animation(const std::string& animname, uint32_t const anim) {276void MapObjectDescr::add_animations(const LuaTable& table) {
281 if (is_animation_known(animname)) {277 for (const std::string& animname : table.keys<std::string>()) {
282 throw GameDataError("Tried to add already existing animation \"%s\"", animname.c_str());278 try {
283 } else {279 std::unique_ptr<LuaTable> anim = table.get_table(animname);
284 anims_.insert(std::pair<std::string, uint32_t>(animname, anim));280 // TODO(GunChleoc): Require basename after conversion has been completed
281 const std::string basename = anim->has_key<std::string>("basename") ? anim->get_string("basename") : "";
282 const bool is_directional = anim->has_key<std::string>("directional") ? anim->get_bool("directional") : false;
283 if (is_directional) {
284 for (int dir = 1; dir <= 6; ++dir) {
285 const std::string directional_animname = animname + animation_direction_names[dir - 1];
286 if (is_animation_known(directional_animname)) {
287 throw GameDataError("Tried to add already existing directional animation '%s\'", directional_animname.c_str());
288 }
289 const std::string directional_basename = basename + animation_direction_names[dir - 1];
290 anims_.insert(std::pair<std::string, uint32_t>(directional_animname, g_gr->animations().load(*anim, directional_basename)));
291 }
292 } else {
293 if (is_animation_known(animname)) {
294 throw GameDataError("Tried to add already existing animation '%s'", animname.c_str());
295 }
296 if (animname == "idle") {
297 anims_.insert(std::pair<std::string, uint32_t>(animname, g_gr->animations().load(name_, *anim, basename)));
298 } else {
299 anims_.insert(std::pair<std::string, uint32_t>(animname, g_gr->animations().load(*anim, basename)));
300 }
301 }
302 } catch (const std::exception& e) {
303 throw GameDataError("Error loading animation for map object '%s': %s", name().c_str(), e.what());
304 }
285 }305 }
286}306}
287307
288void MapObjectDescr::add_directional_animation(DirAnimations* anims, const std::string& prefix) {308void MapObjectDescr::assign_directional_animation(DirAnimations* anims, const std::string& basename) {
289 static char const* const dirstrings[6] = {"ne", "e", "se", "sw", "w", "nw"};
290 for (int32_t dir = 1; dir <= 6; ++dir) {309 for (int32_t dir = 1; dir <= 6; ++dir) {
291 const std::string anim_name = prefix + std::string("_") + dirstrings[dir - 1];310 const std::string anim_name = basename + animation_direction_names[dir - 1];
292 try {311 try {
293 anims->set_animation(dir, get_animation(anim_name, nullptr));312 anims->set_animation(dir, get_animation(anim_name, nullptr));
294 } catch (const GameDataError& e) {313 } catch (const GameDataError& e) {
@@ -318,6 +337,12 @@
318 NEVER_HERE();337 NEVER_HERE();
319}338}
320339
340void MapObjectDescr::load_graphics() const {
341 for (const auto& temp_anim : anims_) {
342 g_gr->animations().get_animation(temp_anim.second).load_default_scale_and_sounds();
343 }
344}
345
321const Image* MapObjectDescr::representative_image(const RGBColor* player_color) const {346const Image* MapObjectDescr::representative_image(const RGBColor* player_color) const {
322 if (is_animation_known("idle")) {347 if (is_animation_known("idle")) {
323 return g_gr->animations().get_representative_image(348 return g_gr->animations().get_representative_image(
@@ -639,8 +664,12 @@
639 * configured.664 * configured.
640 *665 *
641 * Derived functions must call ancestor's function in the appropriate place.666 * Derived functions must call ancestor's function in the appropriate place.
667 *
668 * We also preload some animation graphics here to prevent jitter at game start.
642 */669 */
643void MapObject::Loader::load_finish() {670void MapObject::Loader::load_finish() {
671 MapObject& mo = get<MapObject>();
672 mo.descr().load_graphics();
644}673}
645674
646/**675/**
647676
=== modified file 'src/logic/map_objects/map_object.h'
--- src/logic/map_objects/map_object.h 2019-05-11 13:48:12 +0000
+++ src/logic/map_objects/map_object.h 2019-05-27 14:29:35 +0000
@@ -129,11 +129,9 @@
129 std::string get_animation_name(uint32_t) const; ///< needed for save, debug129 std::string get_animation_name(uint32_t) const; ///< needed for save, debug
130130
131 bool is_animation_known(const std::string& name) const;131 bool is_animation_known(const std::string& name) const;
132 void add_animation(const std::string& name, uint32_t anim);
133132
134 /// Sets the directional animations in 'anims' with the animations133 /// Preload animation graphics at default scale
135 /// '&lt;prefix&gt;_(ne|e|se|sw|w|nw)'.134 void load_graphics() const;
136 void add_directional_animation(DirAnimations* anims, const std::string& prefix);
137135
138 /// Returns the image for the first frame of the idle animation if the MapObject has animations,136 /// Returns the image for the first frame of the idle animation if the MapObject has animations,
139 /// nullptr otherwise137 /// nullptr otherwise
@@ -154,7 +152,13 @@
154 const std::set<uint32_t>& allowed_special);152 const std::set<uint32_t>& allowed_special);
155 void add_attribute(uint32_t attr);153 void add_attribute(uint32_t attr);
156154
155 /// Sets the directional animations in 'anims' with the animations
156 /// '&lt;basename&gt;_(ne|e|se|sw|w|nw)'.
157 void assign_directional_animation(DirAnimations* anims, const std::string& basename);
158
157private:159private:
160 void add_animations(const LuaTable& table);
161
158 /// Throws an exception if the MapObjectDescr has no representative image162 /// Throws an exception if the MapObjectDescr has no representative image
159 void check_representative_image();163 void check_representative_image();
160164
161165
=== modified file 'src/logic/map_objects/tribes/ship.cc'
--- src/logic/map_objects/tribes/ship.cc 2019-05-27 05:37:03 +0000
+++ src/logic/map_objects/tribes/ship.cc 2019-05-27 14:29:35 +0000
@@ -114,7 +114,7 @@
114 i18n::Textdomain td("tribes");114 i18n::Textdomain td("tribes");
115115
116 // Read the sailing animations116 // Read the sailing animations
117 add_directional_animation(&sail_anims_, "sail");117 assign_directional_animation(&sail_anims_, "sail");
118118
119 capacity_ = table.has_key("capacity") ? table.get_int("capacity") : 20;119 capacity_ = table.has_key("capacity") ? table.get_int("capacity") : 20;
120}120}
121121
=== modified file 'src/logic/map_objects/tribes/tribe_descr.cc'
--- src/logic/map_objects/tribes/tribe_descr.cc 2019-05-18 13:33:00 +0000
+++ src/logic/map_objects/tribes/tribe_descr.cc 2019-05-27 14:29:35 +0000
@@ -63,10 +63,12 @@
63 initializations_ = info.initializations;63 initializations_ = info.initializations;
6464
65 std::unique_ptr<LuaTable> items_table = table.get_table("animations");65 std::unique_ptr<LuaTable> items_table = table.get_table("animations");
66 frontier_animation_id_ = g_gr->animations().load(66 {
67 name_ + std::string("_frontier"), *items_table->get_table("frontier"));67 std::unique_ptr<LuaTable> animations_table = items_table->get_table("frontier");
68 flag_animation_id_ =68 frontier_animation_id_ = g_gr->animations().load(name_ + std::string("_frontier"), *animations_table, animations_table->get_string("basename"));
69 g_gr->animations().load(name_ + std::string("_flag"), *items_table->get_table("flag"));69 animations_table = items_table->get_table("flag");
70 flag_animation_id_ = g_gr->animations().load(name_ + std::string("_frontier"), *animations_table, animations_table->get_string("basename"));
71 }
7072
71 items_table = table.get_table("roads");73 items_table = table.get_table("roads");
72 const auto load_roads = [&items_table](74 const auto load_roads = [&items_table](
7375
=== modified file 'src/logic/map_objects/tribes/worker_descr.cc'
--- src/logic/map_objects/tribes/worker_descr.cc 2019-05-22 11:23:14 +0000
+++ src/logic/map_objects/tribes/worker_descr.cc 2019-05-27 14:29:35 +0000
@@ -92,13 +92,13 @@
92 }92 }
9393
94 // Read the walking animations94 // Read the walking animations
95 add_directional_animation(&walk_anims_, "walk");95 assign_directional_animation(&walk_anims_, "walk");
9696
97 // Many workers don't carry wares, so they have no walkload animation.97 // Many workers don't carry wares, so they have no walkload animation.
98 std::unique_ptr<LuaTable> anims(table.get_table("animations"));98 std::unique_ptr<LuaTable> anims(table.get_table("animations"));
99 anims->do_not_warn_about_unaccessed_keys();99 anims->do_not_warn_about_unaccessed_keys();
100 if (anims->has_key("walkload_e")) {100 if (is_animation_known("walkload_e")) {
101 add_directional_animation(&walkload_anims_, "walkload");101 assign_directional_animation(&walkload_anims_, "walkload");
102 }102 }
103103
104 // Read programs104 // Read programs
105105
=== modified file 'src/logic/map_objects/world/critter.cc'
--- src/logic/map_objects/world/critter.cc 2019-04-26 12:46:40 +0000
+++ src/logic/map_objects/world/critter.cc 2019-05-27 14:29:35 +0000
@@ -101,7 +101,7 @@
101 const World& world)101 const World& world)
102 : BobDescr(init_descname, MapObjectType::CRITTER, MapObjectDescr::OwnerType::kWorld, table),102 : BobDescr(init_descname, MapObjectType::CRITTER, MapObjectDescr::OwnerType::kWorld, table),
103 editor_category_(nullptr) {103 editor_category_(nullptr) {
104 add_directional_animation(&walk_anims_, "walk");104 assign_directional_animation(&walk_anims_, "walk");
105105
106 add_attributes(106 add_attributes(
107 table.get_table("attributes")->array_entries<std::string>(), std::set<uint32_t>());107 table.get_table("attributes")->array_entries<std::string>(), std::set<uint32_t>());
108108
=== modified file 'src/map_io/CMakeLists.txt'
--- src/map_io/CMakeLists.txt 2019-05-05 18:53:14 +0000
+++ src/map_io/CMakeLists.txt 2019-05-27 14:29:35 +0000
@@ -103,7 +103,6 @@
103 graphic_minimap_renderer103 graphic_minimap_renderer
104 graphic_playercolor104 graphic_playercolor
105 graphic_surface105 graphic_surface
106 helper
107 io_fileread106 io_fileread
108 io_filesystem107 io_filesystem
109 logic108 logic
110109
=== modified file 'src/map_io/map_scripting_packet.cc'
--- src/map_io/map_scripting_packet.cc 2019-02-23 11:00:49 +0000
+++ src/map_io/map_scripting_packet.cc 2019-05-27 14:29:35 +0000
@@ -24,7 +24,6 @@
24#include <boost/algorithm/string/predicate.hpp>24#include <boost/algorithm/string/predicate.hpp>
2525
26#include "base/macros.h"26#include "base/macros.h"
27#include "helper.h"
28#include "io/fileread.h"27#include "io/fileread.h"
29#include "io/filewrite.h"28#include "io/filewrite.h"
30#include "logic/editor_game_base.h"29#include "logic/editor_game_base.h"
@@ -43,7 +42,7 @@
43void write_lua_dir(FileSystem& target_fs, FileSystem* map_fs, const std::string& path) {42void write_lua_dir(FileSystem& target_fs, FileSystem* map_fs, const std::string& path) {
44 assert(map_fs);43 assert(map_fs);
45 target_fs.ensure_directory_exists(path);44 target_fs.ensure_directory_exists(path);
46 for (const std::string& script : filter(map_fs->list_directory(path), [](const std::string& fn) {45 for (const std::string& script : map_fs->filter_directory(path, [](const std::string& fn) {
47 return boost::ends_with(fn, ".lua");46 return boost::ends_with(fn, ".lua");
48 })) {47 })) {
49 size_t length;48 size_t length;
5049
=== modified file 'src/scripting/lua_path.cc'
--- src/scripting/lua_path.cc 2019-02-23 11:00:49 +0000
+++ src/scripting/lua_path.cc 2019-05-27 14:29:35 +0000
@@ -30,6 +30,8 @@
30namespace {30namespace {
3131
32/// A class that makes iteration over filename_?.png templates easy.32/// A class that makes iteration over filename_?.png templates easy.
33// TODO(GunChleoc): Code duplication with g_fs->get_sequential_files.
34// Get rid of this and list_files when conversion to spritemaps has been done.
33class NumberGlob {35class NumberGlob {
34public:36public:
35 explicit NumberGlob(const std::string& file_template);37 explicit NumberGlob(const std::string& file_template);
@@ -132,10 +134,11 @@
132/* RST134/* RST
133.. function:: list_files(filename_template)135.. function:: list_files(filename_template)
134136
135 Lists the full path for all files that fit the template pattern.137 **DEPRECATED**. Lists the full path for all files that fit the template pattern.
136 Use ? as placeholders for numbers, e.g. 'directory/idle\_??.png' will list138 Use ? as placeholders for numbers, e.g. 'directory/idle\_??.png' will list
137 'directory/idle_00.png', 'directory/idle_01.png' etc, and139 'directory/idle_00.png', 'directory/idle_01.png' etc, and
138 'directory/idle.png' will just list 'directory/idle.png'.140 'directory/idle.png' will just list 'directory/idle.png'.
141 Lua Tables need lots of memory, so only use this when you have to.
139142
140 :type filename_template: class:`string`143 :type filename_template: class:`string`
141 :arg filename_template: The filename template to use for the listing.144 :arg filename_template: The filename template to use for the listing.
@@ -165,6 +168,7 @@
165.. function:: list_directory(filename)168.. function:: list_directory(filename)
166169
167 Returns all file names contained in the given directory.170 Returns all file names contained in the given directory.
171 Lua Tables need lots of memory, so only use this when you have to.
168172
169 :type filename: class:`string`173 :type filename: class:`string`
170 :arg filename: The directory to read.174 :arg filename: The directory to read.
171175
=== modified file 'src/sound/fxset.cc'
--- src/sound/fxset.cc 2019-04-24 06:01:37 +0000
+++ src/sound/fxset.cc 2019-05-27 14:29:35 +0000
@@ -36,25 +36,15 @@
36 * \param random: Randomize the time last played a bit to prevent sound onslaught at game start36 * \param random: Randomize the time last played a bit to prevent sound onslaught at game start
37 */37 */
38FXset::FXset(const std::string& path, uint32_t random) : last_used_(random % 2000) {38FXset::FXset(const std::string& path, uint32_t random) : last_used_(random % 2000) {
39 // Check directory39 const std::string dirname = FileSystem::fs_dirname(path.c_str());
40 std::string directory = FileSystem::fs_dirname(path);40 const std::string basename = FileSystem::fs_filename(path.c_str());
41 if (!g_fs->is_directory(directory)) {41 paths_ = g_fs->get_sequential_files(dirname, basename, "ogg");
42 throw Widelands::GameDataError(
43 "SoundHandler: Can't load files from %s, not a directory!", directory.c_str());
44 }
45
46 // Find files
47 std::string base_filename = FileSystem::fs_filename(path.c_str());
48 boost::regex re(base_filename + "_\\d+\\.ogg");
49 paths_ = filter(g_fs->list_directory(directory), [&re](const std::string& fn) {
50 return boost::regex_match(FileSystem::fs_filename(fn.c_str()), re);
51 });
5242
53 // Ensure that we have at least 1 file43 // Ensure that we have at least 1 file
54 if (paths_.empty()) {44 if (paths_.empty()) {
55 throw Widelands::GameDataError(45 throw Widelands::GameDataError(
56 "FXset: No files matching the pattern '%s_<numbers>.ogg' found in directory %s\n",46 "FXset: No files matching the pattern '%s_<numbers>.ogg' found in directory %s\n",
57 base_filename.c_str(), directory.c_str());47 basename.c_str(), dirname.c_str());
58 }48 }
5949
60#ifndef NDEBUG50#ifndef NDEBUG
@@ -81,7 +71,7 @@
81 return SDL_GetTicks() - last_used_;71 return SDL_GetTicks() - last_used_;
82}72}
8373
84Mix_Chunk* FXset::get_fx(uint32_t random) {74void FXset::load_sound_files() {
85 if (!paths_.empty()) {75 if (!paths_.empty()) {
86 // Load sounds from paths if this FX hasn't been played yet76 // Load sounds from paths if this FX hasn't been played yet
87 for (const std::string& path : paths_) {77 for (const std::string& path : paths_) {
@@ -91,8 +81,11 @@
91 // We don't need the paths any more81 // We don't need the paths any more
92 paths_.clear();82 paths_.clear();
93 }83 }
94
95 assert(paths_.empty());84 assert(paths_.empty());
85}
86
87Mix_Chunk* FXset::get_fx(uint32_t random) {
88 load_sound_files();
9689
97 if (fxs_.empty()) {90 if (fxs_.empty()) {
98 return nullptr;91 return nullptr;
9992
=== modified file 'src/sound/fxset.h'
--- src/sound/fxset.h 2019-04-24 06:01:37 +0000
+++ src/sound/fxset.h 2019-05-27 14:29:35 +0000
@@ -20,7 +20,6 @@
20#ifndef WL_SOUND_FXSET_H20#ifndef WL_SOUND_FXSET_H
21#define WL_SOUND_FXSET_H21#define WL_SOUND_FXSET_H
2222
23#include <set>
24#include <string>23#include <string>
25#include <vector>24#include <vector>
2625
@@ -49,6 +48,9 @@
49 */48 */
50 Mix_Chunk* get_fx(uint32_t random);49 Mix_Chunk* get_fx(uint32_t random);
5150
51 /// Load the sound files into memory
52 void load_sound_files();
53
52private:54private:
53 /** Load an audio file into memory.55 /** Load an audio file into memory.
54 * \param path the effect to be loaded56 * \param path the effect to be loaded
@@ -69,7 +71,7 @@
69 * This will be cleared when the effects have been loaded into memory by \ref get_fx on first71 * This will be cleared when the effects have been loaded into memory by \ref get_fx on first
70 * play.72 * play.
71 */73 */
72 std::set<std::string> paths_;74 std::vector<std::string> paths_;
7375
74 /// The collection of sound effects, to be loaded on demand76 /// The collection of sound effects, to be loaded on demand
75 std::vector<Mix_Chunk*> fxs_;77 std::vector<Mix_Chunk*> fxs_;
7678
=== modified file 'src/sound/songset.cc'
--- src/sound/songset.cc 2019-04-24 06:01:37 +0000
+++ src/sound/songset.cc 2019-05-27 14:29:35 +0000
@@ -33,11 +33,7 @@
33Songset::Songset(const std::string& dir, const std::string& basename)33Songset::Songset(const std::string& dir, const std::string& basename)
34 : m_(nullptr), rwops_(nullptr) {34 : m_(nullptr), rwops_(nullptr) {
35 assert(g_fs);35 assert(g_fs);
36 FilenameSet files = filter(g_fs->list_directory(dir), [&basename](const std::string& fn) {36 std::vector<std::string> files = g_fs->get_sequential_files(dir, basename, "ogg");
37 const std::string only_filename = FileSystem::fs_filename(fn.c_str());
38 return boost::starts_with(only_filename, basename) && boost::ends_with(only_filename, ".ogg");
39 });
40
41 for (const std::string& filename : files) {37 for (const std::string& filename : files) {
42 assert(!g_fs->is_directory(filename));38 assert(!g_fs->is_directory(filename));
43 add_song(filename);39 add_song(filename);
4440
=== modified file 'src/sound/sound_handler.cc'
--- src/sound/sound_handler.cc 2019-04-24 06:01:37 +0000
+++ src/sound/sound_handler.cc 2019-05-27 14:29:35 +0000
@@ -412,6 +412,10 @@
412 }412 }
413}413}
414414
415void SoundHandler::load_fx(SoundType type, FxId id) {
416 fxs_[type][id]->load_sound_files();
417}
418
415/// Removes the given FXset from memory419/// Removes the given FXset from memory
416void SoundHandler::remove_fx_set(SoundType type) {420void SoundHandler::remove_fx_set(SoundType type) {
417 fxs_.erase(type);421 fxs_.erase(type);
418422
=== modified file 'src/sound/sound_handler.h'
--- src/sound/sound_handler.h 2019-04-24 06:01:37 +0000
+++ src/sound/sound_handler.h 2019-05-27 14:29:35 +0000
@@ -180,6 +180,8 @@
180 uint8_t priority = kFxPriorityAlwaysPlay,180 uint8_t priority = kFxPriorityAlwaysPlay,
181 int32_t stereo_position = kStereoCenter,181 int32_t stereo_position = kStereoCenter,
182 int distance = 0);182 int distance = 0);
183 // Trigger loading of the sound files for the given effect.
184 void load_fx(SoundType type, FxId id);
183 void remove_fx_set(SoundType type);185 void remove_fx_set(SoundType type);
184186
185 void register_songs(const std::string& dir, const std::string& basename);187 void register_songs(const std::string& dir, const std::string& basename);
186188
=== modified file 'src/wlapplication.cc'
--- src/wlapplication.cc 2019-05-13 06:04:34 +0000
+++ src/wlapplication.cc 2019-05-27 14:29:35 +0000
@@ -55,7 +55,6 @@
55#include "graphic/default_resolution.h"55#include "graphic/default_resolution.h"
56#include "graphic/font_handler.h"56#include "graphic/font_handler.h"
57#include "graphic/text/font_set.h"57#include "graphic/text/font_set.h"
58#include "helper.h"
59#include "io/filesystem/disk_filesystem.h"58#include "io/filesystem/disk_filesystem.h"
60#include "io/filesystem/filesystem_exceptions.h"59#include "io/filesystem/filesystem_exceptions.h"
61#include "io/filesystem/layered_filesystem.h"60#include "io/filesystem/layered_filesystem.h"
@@ -1500,7 +1499,7 @@
1500 */1499 */
1501void WLApplication::cleanup_replays() {1500void WLApplication::cleanup_replays() {
1502 for (const std::string& filename :1501 for (const std::string& filename :
1503 filter(g_fs->list_directory(kReplayDir), [](const std::string& fn) {1502 g_fs->filter_directory(kReplayDir, [](const std::string& fn) {
1504 return boost::ends_with(1503 return boost::ends_with(
1505 fn, (boost::format("%s%s") % kReplayExtension % kSyncstreamExtension).str());1504 fn, (boost::format("%s%s") % kReplayExtension % kSyncstreamExtension).str());
1506 })) {1505 })) {
@@ -1521,7 +1520,7 @@
1521 */1520 */
1522void WLApplication::cleanup_ai_files() {1521void WLApplication::cleanup_ai_files() {
1523 for (const std::string& filename :1522 for (const std::string& filename :
1524 filter(g_fs->list_directory(kAiDir), [](const std::string& fn) {1523 g_fs->filter_directory(kAiDir, [](const std::string& fn) {
1525 return boost::ends_with(fn, kAiExtension) || boost::contains(fn, "ai_player");1524 return boost::ends_with(fn, kAiExtension) || boost::contains(fn, "ai_player");
1526 })) {1525 })) {
1527 if (is_autogenerated_and_expired(filename, kAIFilesKeepAroundTime)) {1526 if (is_autogenerated_and_expired(filename, kAIFilesKeepAroundTime)) {
@@ -1541,7 +1540,7 @@
1541 */1540 */
1542void WLApplication::cleanup_temp_files() {1541void WLApplication::cleanup_temp_files() {
1543 for (const std::string& filename :1542 for (const std::string& filename :
1544 filter(g_fs->list_directory(kTempFileDir),1543 g_fs->filter_directory(kTempFileDir,
1545 [](const std::string& fn) { return boost::ends_with(fn, kTempFileExtension); })) {1544 [](const std::string& fn) { return boost::ends_with(fn, kTempFileExtension); })) {
1546 if (is_autogenerated_and_expired(filename, kTempFilesKeepAroundTime)) {1545 if (is_autogenerated_and_expired(filename, kTempFilesKeepAroundTime)) {
1547 log("Deleting old temp file: %s\n", filename.c_str());1546 log("Deleting old temp file: %s\n", filename.c_str());
@@ -1559,7 +1558,7 @@
1559 * Recursively delete temporary backup files in a given directory1558 * Recursively delete temporary backup files in a given directory
1560 */1559 */
1561void WLApplication::cleanup_temp_backups(std::string dir) {1560void WLApplication::cleanup_temp_backups(std::string dir) {
1562 for (const std::string& filename : filter(g_fs->list_directory(dir), [](const std::string& fn) {1561 for (const std::string& filename : g_fs->filter_directory(dir, [](const std::string& fn) {
1563 return boost::ends_with(fn, kTempBackupExtension);1562 return boost::ends_with(fn, kTempBackupExtension);
1564 })) {1563 })) {
1565 if (is_autogenerated_and_expired(filename, kTempBackupsKeepAroundTime)) {1564 if (is_autogenerated_and_expired(filename, kTempBackupsKeepAroundTime)) {
@@ -1573,7 +1572,7 @@
1573 }1572 }
1574 }1573 }
1575 // recursively delete in subdirs1574 // recursively delete in subdirs
1576 for (const std::string& dirname : filter(g_fs->list_directory(dir), [](const std::string& fn) {1575 for (const std::string& dirname : g_fs->filter_directory(dir, [](const std::string& fn) {
1577 return g_fs->is_directory(fn) &&1576 return g_fs->is_directory(fn) &&
1578 // avoid searching within savegames/maps/backups that were created1577 // avoid searching within savegames/maps/backups that were created
1579 // as directories instead of zipfiles1578 // as directories instead of zipfiles
15801579
=== modified file 'src/wui/load_or_save_game.cc'
--- src/wui/load_or_save_game.cc 2019-05-26 17:21:15 +0000
+++ src/wui/load_or_save_game.cc 2019-05-27 14:29:35 +0000
@@ -367,16 +367,15 @@
367 table_.clear();367 table_.clear();
368368
369 FilenameSet gamefiles;369 FilenameSet gamefiles;
370
371 if (filetype_ == FileType::kReplay) {370 if (filetype_ == FileType::kReplay) {
372 gamefiles = filter(g_fs->list_directory(kReplayDir), [](const std::string& fn) {371 gamefiles = g_fs->filter_directory(kReplayDir, [](const std::string& fn) {
373 return boost::algorithm::ends_with(fn, kReplayExtension);372 return boost::algorithm::ends_with(fn, kReplayExtension);
374 });373 });
375 // Update description column title for replays374 // Update description column title for replays
376 table_.set_column_tooltip(2, show_filenames_ ? _("Filename: Map name (start of replay)") :375 table_.set_column_tooltip(2, show_filenames_ ? _("Filename: Map name (start of replay)") :
377 _("Map name (start of replay)"));376 _("Map name (start of replay)"));
378 } else {377 } else {
379 gamefiles = filter(g_fs->list_directory(kSaveDir), [](const std::string& fn) {378 gamefiles = g_fs->filter_directory(kSaveDir, [](const std::string& fn) {
380 return boost::algorithm::ends_with(fn, kSavegameExtension);379 return boost::algorithm::ends_with(fn, kSavegameExtension);
381 });380 });
382 }381 }

Subscribers

People subscribed via source and target branches

to status/vote changes: