Commit Graph

11259 Commits (master)
 

Author SHA1 Message Date
Mark 286d4d6a5b Added version info to the docu 2018-12-21 21:15:11 +01:00
Mark cf7469043d Simplified logic for substitutes
The production cost method returns an array of material cost arrays, but
their format has changed. Instead of
  [<default resource>, <cost>, <substitute(s)>]
it now returns an array of proplists
  [{Resource = optionA, Amount = costA}, {Resource = optionB, Amount =
costB}]
so that there are fewer cases to keep in mind: No "are there
substitutes?", but you can simply check all variants and pick the best.
This also allows different substitutions, for example "2 earth or 3
sand" is now possible.
2018-12-21 16:54:43 +01:00
Mark 36dbbd27e1 Formatted code 2018-12-21 14:26:24 +01:00
Mark c6254c2512 Added more producer tests 2018-12-21 14:05:30 +01:00
Mark 2ed69b96a5 Added producer test for substitute components 2018-12-21 11:57:39 +01:00
Mark b73169616b Fix producer test
Updating the values for substitutions was forgotten in 808e7fa, leading
to a failing test 5.
2018-12-21 11:49:56 +01:00
Mark 6bdb4275f7 Formatted code, no change in functionality
Brackets, protected/private func => func, whitespaces
2018-12-21 11:25:19 +01:00
Mark d9bc1d9142 Added callback for production progress 2018-12-21 11:08:10 +01:00
Mark 9deab8e6a9 Fix the logic again
Otherwise you can exit containers without an entrance area.
2018-12-21 09:56:19 +01:00
Mark b35a58a7fc Removed unused constants
This was a weird menu thing that I added about 2 years ago, and it is
not very useable, and not used :)
2018-12-21 09:10:33 +01:00
Mark ed514b7716 Added option for ignoring contents in the interaction menu
Also ignore Clonks as "inventory items" if they are contained.
2018-12-21 09:01:20 +01:00
Mark fcf2af1937 Fix not being able to exit a structure
It seems that the default structures have the entrance close to the
offset, so that there is an overlap and can_be_entered is true even
inside the structure.

In my case the structure offset and entrance area do not overlap, so you
could unfortunately not leave the structure.
2018-12-20 23:49:39 +01:00
Mark 6351fe7a66 GetEnergy() offers exact energy value optionally (Bug #2043) 2018-12-20 08:40:04 +01:00
Nicolas Hake 11cfcdd910 Appveyor: Stop depending on specific Qt build for building too 2018-11-18 10:15:28 +01:00
Nicolas Hake 5808ca8047 Appveyor: Stop depending on specific Qt build
AppVeyor occasionally updates platform images without really
versioning them, so in order to have a higher chance of not being
broken by those, we'll just use 5.11 instead of specifying 5.11.1
explicitly.
2018-11-18 10:02:11 +01:00
Nicolas Hake f90e424f4a Appveyor: Bundle C4Group
Users have requested that C4Group is bundled with the snapshots, and
the file itself is fairly small, so it should be fine to ship it as
well.
2018-11-14 20:03:52 +01:00
Lukas Werling 34d89adf47 Fix build on gcc 4.x 2018-10-15 21:01:15 +02:00
Clonkonaut c6d5c5044f Rework interaction menu into a new style. Also, style overloads are easily possible.
Because I did this in the test scenario first, it wasn't really possible to encapsulate different steps, sorry!
2018-10-15 17:38:22 +02:00
Lukas Werling 952cfef497 Add missing C4Include include in C4ConsoleQtShapes
Qt's moc generates another source file that includes this header without
including C4Include.h first. The generates source file thus doesn't
compile. It is unclear to me why this isn't an issue with our current
build setup (it is an issue with a meson-based build).
2018-10-14 23:19:32 +02:00
Lukas Werling a73e5fc871 undef "s" macro in C4Config
Necessary for unity builds, but also has a high conflict probability in
general.
2018-10-14 23:16:59 +02:00
Lukas Werling ca11d86893 Add missing include guards
These are necessary for unity builds.
2018-10-14 23:15:01 +02:00
Lukas Werling 7273b87b01 StdAdaptors: Replace array size macros with templates 2018-10-14 23:07:23 +02:00
Clonkonaut 2d3914b33b Fresh repository, fresh build on Windows, VS created these folders. Hope it's cool to put them on ignore. 2018-10-10 01:43:58 +02:00
Nicolas Hake a65dd5874f Appveyor: Fix library bundling path 2018-10-08 20:57:39 +02:00
Nicolas Hake ca2ba96969 Appveyor: Generate package and upload it if credentials are set 2018-10-07 20:21:17 +02:00
Nicolas Hake 6dcaaa7af5 Appveyor: Inject Google Test location 2018-10-07 20:21:17 +02:00
Nicolas Hake 9691c1e41a Appveyor: Build on Visual Studio 2017 x64 only
There is no pre-built binary package of Qt for 32 bit Visual Studio
2017, so we'll drop it for now.
2018-10-07 20:21:17 +02:00
Nicolas Hake 354b6be1c6 CI: Use AppVeyor to build MSVC binaries 2018-10-07 20:21:17 +02:00
Julius Michaelis 0d7738dce5 Drop broken GCC precompiled header support 2018-10-04 08:33:31 +02:00
Lukas Werling 04535b5438 Travis: Add update information for AppImage snapshots 2018-10-03 23:45:45 +02:00
Lukas Werling 55c34ecbd7 Add git branch to C4Version.h
The branch information is necessary for upcoming automatically-updating
snapshots. For Travis, cmake will also pick up the branch name from the
C4REVISION_BRANCH environment variable.
2018-10-03 23:44:35 +02:00
Lukas Werling 7616fa81be Travis: Update dependencies for AppImage snapshot 2018-09-25 20:02:51 +02:00
Lukas Werling 950ad4cf2f Fix C4ScriptLibrary destruction
C4PropListStaticMember must be deleted manually.
2018-09-25 20:02:51 +02:00
Lukas Werling 05e3648495 Travis: Skip TCP bind test because of missing IPv6 support 2018-09-25 20:02:51 +02:00
Lukas Werling 82feac4ccb Remove broken assert() 2018-09-25 20:02:51 +02:00
Lukas Werling 8aeef938fc Travis: Build and upload AppImage snapshot 2018-09-25 20:01:16 +02:00
Lukas Werling 8df71d3f32 Prevent parallel groups packing with ninja
For some reason, generating the groups in parallel fails frequently.
2018-09-24 19:22:32 +02:00
Lukas Werling 5395a8dc84 Add WITH_APPDIR_INSTALLATION configuration option
With this option enabled, `make install` will install the files in an
AppDir-compatible directory structure suitable for creating an AppImage.
2018-09-24 19:22:32 +02:00
Lukas Werling d8add861fe Fix LTO ar wrappers for versioned gcc executables
Debian packages older/newer gcc versions with executables named like
gcc-5, gcc-ar-5. The previous implementation did not handle this
correctly, breaking LTO-enabled linking.
2018-09-24 17:43:27 +02:00
Lukas Werling 2fb14b026d Script: Remove effect after error in Timer
As the timer tends to run more than once, you'd also very likely get the
error more than once. The timer also often determines the effect
lifetime, making a broken effect live forever.

This was especially annoying with one-off Schedule() invokations
that wouldn't even stop throwing errors after finishing the
designated number of repeats. Although fixing just that script
function would have been possible, I believe that a more general
solution for all effects is useful.
2018-08-26 23:15:05 +02:00
Nicolas Hake f5988085a7 Figure out whether a warning/error was #include'd or #appendto'd
We already notified the user on warning/error that the mistake
happened in a different script than the one we were currently
compiing. It's not too difficult to figure out whether that other
script was added due to an #include or an #appendto directive, so we
can just show the user which one it is.

We also don't show warnings in #include'd scripts anymore, since
they get compiled individually anyway and all warnings will show up
there. This way we don't duplicate warnings several times.
2018-07-24 14:35:12 +02:00
Nicolas Hake 829bb8cb28 Script functions: remove all BCCs at once instead of individually 2018-07-24 14:24:19 +02:00
Nicolas Hake 1cd3534740 C4KeyboardInput: Replace std::bind2nd &c by lambda
std::ptr_fun and std::bind_2nd have been deprecated since C++11, and
are no longer part of the standard since C++17.
2018-07-24 14:21:42 +02:00
Nicolas Hake 907c701fc6 Save scenario: Disable all warnings in auto-generated file 2018-07-24 14:20:09 +02:00
Nicolas Hake 4c5dfac952 Remove or use unused variables in Objects, System 2018-07-24 14:19:26 +02:00
Nicolas Hake 5ef52f2450 Fix variable_out_of_scope warnings in Worlds 2018-07-23 12:30:23 +02:00
Nicolas Hake 14ed608941 Fix variable_out_of_scope warnings in Missions 2018-07-23 12:30:23 +02:00
Nicolas Hake 7fb098c4df Fix variable_out_of_scope warnings in Defense 2018-07-23 12:30:23 +02:00
Nicolas Hake 1ef6b7a7fc Fix variable_out_of_scope warnings in Arena 2018-07-23 12:30:23 +02:00
Nicolas Hake 1bb728b047 Fix variable_out_of_scope warnings in Objects 2018-07-23 12:12:23 +02:00