Commit Graph

73 Commits (c00a8cf3c3a33a88c5a8aba152d06d9f483921a5)

Author SHA1 Message Date
Maikel de Vries aa892171fb update version to 8.0 in DefCore.txt, Scenario.txt and Version.txt 2018-01-28 13:18:46 +01:00
David Dormagen 1d93216f33 powder keg: drop icon overlay in favor of custom menu overlay (#1972)
The old icon overlay was behind the numbers in the inventory menu anyway. Now the object uses a bar similar to loam. And it also updates its description.
When turning empty, the (new) barrel is also no longer play-colored inside.

The powder barrel could of course just use actual gunpowder and be an extra-slot item (like the bow / dynamite box / etc.).
2018-01-07 18:23:14 +01:00
Clonkonaut 6acea8930b Various objects: include library flammable
Increased burn time (140 frames) for: axe, bucket, grapple bow, hammer, pickaxe, shovel, sickle. So useful items will burn a little bit longer.
Coal will burn for 245 frames and then just burst into ashes and not change into a Burned Object.
2017-11-01 00:54:24 +01:00
Maikel de Vries 6f1470dbbd correctly update barrel graphics when emptied onto existing stack 2017-04-25 14:04:43 +02:00
Maikel de Vries 135a7d8aff fix support for multiple liquids in liquid containers 2016-12-25 12:48:15 +01:00
Maikel de Vries caef28c7f6 add concrete object (#1572)
This still needs some work to fully function with pumps and pipes.
2016-12-19 21:09:22 +01:00
Lukas Werling 68ddeb3bed Convert all text files in planet to UTF-8 2016-12-11 21:19:13 +01:00
Clonkonaut 34af29fd7b Show quick slot item on clonk.
All GetCarry* callbacks receive a parameter whether they are held in this slot and can then return a different display mode!

I also took the opportunity to restructure many scripts in a similar way.
2016-08-05 01:14:13 +02:00
David Dormagen 58bb6af75a barrel: prevent entrance of arbitrary objects
You could put e.g. tools into the barrel using the interaction menu. This would lead to a script error later, when the barrel did Contents()->GetLiquidType().
PS: And the RejectStack function is part of a private internal interface. I made that clear so the next one does not have to look it up again.
2016-05-30 09:56:39 +02:00
Maikel de Vries 2a731b2545 implement Components as a property lookup table 2016-05-21 13:34:34 +02:00
Maikel de Vries 1df322b7ff adapt objects and scenarios to new component implementation 2016-05-21 13:34:34 +02:00
Mark b00290f5f7 Vendor: Added parameter for the base that is selling the object.
This way the barrel can sell its contents, leaving behind an empty barrel.
2016-03-29 20:11:41 +02:00
Mark 02b8cf8422 Barrel: Fixed barrel getting filled with liquids
Barrels was not updating, and caused an error when getting filled with liquid.
2016-03-23 20:11:23 +01:00
Mark a2700890ce Refactoring: Unit test for liquid containers uses doTest()
This is more readable and failures can be identified more easily.
2016-03-17 18:13:40 +01:00
Mark 7febb8fd91 Refactoring: Stackable: The size of stacks can be limited by a container now.
The function RejectEntrance() has two more callbacks to the object it should enter:
- CollectFromStack(object stack): The object can grab items from the stack, before the stack tries to merge with stacks in the object. This is necessary for barrels, so that a large liquid stack can fill an empty barrel.
- RejectStack(object stack): This is called after the stack is merged. Currently, the stack merging counts as handled only if the stack is removed. This callback allows the object to still reject the stack, for example if it accepts only one item, such as the barrel does.
2016-03-16 22:43:44 +01:00
Mark 96e59a0626 Failed attempt at unit test nr. 6 2016-03-03 22:10:10 +01:00
Mark 1786f5b3d9 Liquid objects: Fix unit test, Stackable
Addedv debugging logs, will remove them once all unit tests work. The stackable library function "TryPutInto" was changed slightly.
2016-03-03 17:10:43 +01:00
Mark a7ed516c39 Refactoring: Liquid container
The liquid container library was severely reduced by the changes that the liquid objects bring. The remaining unit tests nearly work.
2016-03-01 22:29:35 +01:00
Mark d0cf26490e Removed unused function from erroneous merge 2016-02-20 17:31:26 +01:00
Mark 2dd09fc8bd Liquid Object: Dispersing contents is a function of the liquid object now, instead of the barrel
The object now also disperses if it exits a liquid container
2016-02-20 17:08:55 +01:00
Mark 91adb6140a Fix/merge from rebase: BarrelIntake as property 2016-02-16 21:16:32 +01:00
Mark 651f5c806b Refactoring: Steam engine liquid extraction
The steam engine treats barrels the same as itself when it comes to extracting liquids. This removes the need for the callback OnFuelRemoved() in the barrel, as well as the stupid definition call from the barrel to the steam engine.
2016-02-16 21:07:46 +01:00
Mark fb397618df Failsafe barrel names 2016-02-16 21:07:36 +01:00
Mark 6f7152eba6 Fixed bug in barrel stacking and added a unit test for this use case 2016-02-16 21:07:31 +01:00
Mark 8e692a25c4 Use property instead of function for barrel intake 2016-02-16 21:07:17 +01:00
Mark a0fb0473b3 Barrels function as fuel now.
The steam engine does not remove the barrels, it just empties them. Made power system unit test 19 end if both pumps are pumping, this seems to be the intention of the unit test. Added power system unit test 20: Steam engine fueled by oil barrels.
2016-02-16 21:04:01 +01:00
Mark 07b242d6b1 Barrels accept oil 2016-02-16 21:03:52 +01:00
Mark 6f557520e8 Refactoring: Renamed Set/GetLiquidName to Set/GetLiquidType 2016-02-16 21:02:09 +01:00
Mark 9a8c3f4fea Refactoring: Barrel fill with liquid
The function had some crazy checks and delegation, now everything is in one function
2016-02-16 21:02:04 +01:00
Mark 9d17cff91e Refactoring: Removed old barrel functions
Replaced old barrel functions with the liquid container library calls
2016-02-16 21:01:59 +01:00
Mark 2f5cc035b6 Library: Liquid Container
Added unit test.
2016-02-16 21:01:55 +01:00
Mark b64a0e852a Library: Liquid Container
Added a new library for liquid containers that is based on the original barrel script.

Library_LiquidContainer
- Extracted the interface from the barrel. The function names and argument types are not final yet.
- Fixed an inconsistency in the script: There were two ways of determining whether a barrel is suited
   for a material. Either by name, or material index.
- renamed argument names to "liquid_name" for liquids, "amount" for quantities, so that the code is more easily understandable
- replaced comparison 'fill level > 0' with 'is not empty?'
- moved storage variables to a local proplist, so that names do not clash
- Ordered the methods by application and documented each section

Barrel:
- The original barrel functions delegate to Library_LiquidContainer-functions now, so that the original functionality is not disturbed. Obsolete functions are marked with "TODO: deprecated".
- Moved barrel value change to the update function
- Moved hit sound effect to separate function
- Replaced uses of the magic number '3' with a runtime-overloadable call to GetBarrelIntakeY()
- Replaced comparison 'fill level > 0' with 'is not empty?'

MetalBarrel:
- Adjusted the hit function. The difference between this and the normal barrel is the hit sound and material position. These should be constants or functions, instead of magic numbers
- Moved hit sound effect to separate function
- Removed the Hit()-function, because the hit sound is played in a separate function now
- With this change the y-offset of the barrel checking for other liquids on a hit is now 3 instead of 7. This should be ok, because the barrels have the same dimensions, it seemed strange that they would have different offsets
2016-02-16 21:01:50 +01:00
Mark 7a3be2dd62 Refactoring: Steam engine liquid extraction
The steam engine treats barrels the same as itself when it comes to extracting liquids. This removes the need for the callback OnFuelRemoved() in the barrel, as well as the stupid definition call from the barrel to the steam engine.
2016-02-10 06:21:13 +01:00
Mark f0a1e41ac2 Failsafe barrel names 2016-02-09 18:30:50 +01:00
Mark 80fda5ae0d Fixed bug in barrel stacking and added a unit test for this use case 2016-02-09 06:43:38 +01:00
Mark c135c2da37 Use property instead of function for barrel intake 2016-02-09 06:27:42 +01:00
Mark b0153fbc51 Cleanup
Removed reference to ST-DDT in the tank library, since his code was completely removed. Moved functions in steam engine. Fixed typo in DefCore.txt
2016-02-08 20:54:26 +01:00
Mark b6476330d4 Barrels function as fuel now.
The steam engine does not remove the barrels, it just empties them. Made power system unit test 19 end if both pumps are pumping, this seems to be the intention of the unit test. Added power system unit test 20: Steam engine fueled by oil barrels.
2016-02-07 17:13:03 +01:00
Mark 46fceea0e0 Barrels accept oil 2016-02-07 16:03:51 +01:00
Mark 8c883937d4 Refactoring: Renamed Set/GetLiquidName to Set/GetLiquidType 2016-02-01 06:39:21 +01:00
Mark dbf1f0326f Refactoring: Barrel fill with liquid
The function had some crazy checks and delegation, now everything is in one function
2016-02-01 06:28:17 +01:00
Mark 9ee44b39ed Refactoring: Removed old barrel functions
Replaced old barrel functions with the liquid container library calls
2016-02-01 06:28:09 +01:00
Mark 64f7b4152e Library: Liquid Container
Added unit test.
2016-02-01 06:27:35 +01:00
Mark f810f210be Library: Liquid Container
Added a new library for liquid containers that is based on the original barrel script.

Library_LiquidContainer
- Extracted the interface from the barrel. The function names and argument types are not final yet.
- Fixed an inconsistency in the script: There were two ways of determining whether a barrel is suited
   for a material. Either by name, or material index.
- renamed argument names to "liquid_name" for liquids, "amount" for quantities, so that the code is more easily understandable
- replaced comparison 'fill level > 0' with 'is not empty?'
- moved storage variables to a local proplist, so that names do not clash
- Ordered the methods by application and documented each section

Barrel:
- The original barrel functions delegate to Library_LiquidContainer-functions now, so that the original functionality is not disturbed. Obsolete functions are marked with "TODO: deprecated".
- Moved barrel value change to the update function
- Moved hit sound effect to separate function
- Replaced uses of the magic number '3' with a runtime-overloadable call to GetBarrelIntakeY()
- Replaced comparison 'fill level > 0' with 'is not empty?'

MetalBarrel:
- Adjusted the hit function. The difference between this and the normal barrel is the hit sound and material position. These should be constants or functions, instead of magic numbers
- Moved hit sound effect to separate function
- Removed the Hit()-function, because the hit sound is played in a separate function now
- With this change the y-offset of the barrel checking for other liquids on a hit is now 3 instead of 7. This should be ok, because the barrels have the same dimensions, it seemed strange that they would have different offsets
2016-02-01 06:23:44 +01:00
Maikel de Vries 509bdac5bc remove unused Rebuy property from objects 2015-12-28 10:21:49 +01:00
David Dormagen dcfb986e34 moved sounds into subfolders
This completes http://forum.openclonk.org/topic_show.pl?tid=3215
2015-12-13 22:14:55 +01:00
David Dormagen 1bd3354086 contents menu: changed stacking logic (#1424)
Objects now stack iff CanBeStackedWith returns true. The displayed symbol is now the first object of the stack (instead of the definition).
Also fixed barrel to not overwrite the custom name just after setting it.
2015-10-17 12:09:35 +02:00
Armin Burgmeier b8ed577c0f Rotate the OGRE coordinate frame by 90 degrees in X
Also rotate all meshes backwards so that everything keeps working. This should
make it more convenient for modellers to create new meshes.
See http://forum.openclonk.org/topic_show.pl?pid=29410#pid29410.
2015-10-03 11:39:08 -04:00
Sven Eberhardt fe5fe69ce9 Fix metal barrel collectibility.
It was probably missed during CarryHeavy conversion because it includes CarryHeavy only indirectly.
2015-09-23 23:23:55 -04:00
Clonkonaut b4905b2bcf Rework of Carry Heavy Objects: Pick up with Shift.
No more interaction necessary!
2015-09-10 01:17:44 +02:00