Commit Graph

92 Commits (00b1b3778795cf5e69f59d27371d3029837274a3)

Author SHA1 Message Date
Mark 00b1b37787 Renamed Library_Tank to Library_PipeControl
The library did not depend on the Library_LiquidContainer script at all,
removed that include and added it to the previous includers.
Removed the IsLiquidTank() identifier, because it was unused.
2018-12-27 21:21:53 +01:00
Mark 1c9164b4be Collect cut pipes to Clonk inventory, if possible 2018-12-25 15:53:51 +01:00
Mark 431456d1fa Use new library in pump 2018-12-25 11:13:01 +01:00
Maikel de Vries 41cecc6a6f liquid tank: show to which object the pipe is connected in interaction menu 2018-01-25 13:44:57 +01:00
David Dormagen fda3eecd84 made structures either flippable or prevent it completely (#1980)
Foundry is now flippable. SteamEngine is not yet flippable due to collection zone (could use similar solution as foundry).
Pump is not yet flippable, because I don't want to test the bazillion combinations of states of the pump now - maybe after a release.
2018-01-19 17:16:10 +01:00
Maikel de Vries eb24079b2f pump: add interaction menu entries for air pipes 2018-01-13 12:09:59 +01:00
Maikel de Vries 3255b02728 pipes: fix attaching, cutting, swapping, messaging, and interface 2018-01-13 11:06:35 +01:00
Clonkonaut 8cb3c6f6b3 New property, set for all buildings: FireproofContainer.
A fireproof container shields all contents from incendiary material (lava mainly). Structures can now be submerged in lava and the contents will not burn up.
2017-11-21 18:16:45 +01:00
Maikel de Vries 2fa7aabcac prevent buildings from partially burning down (#1880) 2017-08-18 17:59:25 +02:00
Maikel de Vries f56e10c082 fix pump liquid selection menu entry for german language 2017-07-04 22:44:23 +02:00
Maikel de Vries b2a966150c pump: fix connecting already defined drain and source pipes 2017-07-04 15:19:31 +02:00
Sven Eberhardt 218961f6a8 Add DuroLava liquid object #1879
The extra object is called "Magma" to distinguish it from Lava and has a slightly different color on the symbol. In the pump menu, only "Lava" is shown and magma is turned on/off with it automatically.

It would be nice to have only one object and control a flag somehow. However, this is bound to cause us headaches later on (combining materials, etc.). This solution is probably least error-prone.
2017-01-16 12:54:34 -05:00
Maikel de Vries 6fe22afe1a fix script runtime error in pump 2016-12-29 18:57:33 +01:00
Sven Eberhardt bdb3118309 Add missing inherited calls to structure Definiton calls 2016-12-28 08:53:55 -04:00
Maikel de Vries 7f1b6ac19b pumping air: fixed power need and high consumer priority 2016-12-25 19:07:26 +01:00
Maikel de Vries 525caa069a properly implement air pumping: no source needed, only pump on air need 2016-12-25 18:53:43 +01:00
Maikel de Vries b9aaa2fda4 pump: implement gui interface for selecting materials to pump 2016-12-24 15:12:14 +01:00
Maikel de Vries ae40126dbb implement pumping specific liquids only 2016-12-24 14:09:47 +01:00
Maikel de Vries c7afed1aeb allow pumping liquids from container (foundry and steam engine) 2016-12-24 14:09:47 +01:00
Maikel de Vries 32dc9e3133 pump: fix InsertMaterialAtDrain taking into account if pixels have been inserted 2016-12-17 17:29:28 +01:00
Mark d356d9db3d Fix inherited() calls
The ... operator should be added so that the parameters are passed down. In some cases even the named parameters were not passed down.
2016-11-26 18:57:31 +01:00
Maikel de Vries 89be9bd158 implement scenario saving for liquid tank, pump & pipe 2016-10-03 18:07:49 +02:00
Maikel de Vries b0ff00439f fix possible script error in pump 2016-10-01 19:18:23 +02:00
Maikel de Vries 18424aaaa7 add rule to control pump speed 2016-09-23 09:26:06 +02:00
Clonkonaut afe5cd3c24 Added diving helmet, must be connect to a pump!
Rudimentary handling of air pumping added to the pump and of course the helmet. The functions of the helmet concerning air pumping can maybe later used for a library.
2016-08-17 20:23:18 +02:00
Maikel de Vries df098d2840 pump only activates when drain is free or accepts liquid 2016-08-07 21:26:23 +02:00
Clonkonaut b6ca10d11a Constructor library: Changed to search through all available knowledge and filter using an overloadable function.
The hammer will now only construct definitions that have the callback "IsHammerBuidable". This will exclude all C4D_Structure objects that are not buildings and can't be build in a meaningful way.
Also, with the carry heavy branch I want to test adhoc built lorries (lorries as construction sites). Sven suggested this.
2016-06-18 19:45:45 +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 52884fb685 Removed liquid container logic from pump.
Previously, sharing the logic made sense, because both objects used variables to store the liquid. Now, the liquid container stores liquid in an object - this is not desirable in the pump because it would create and remove objects for no good reason (only so that it has a virtual liquid storage) every time it pumps. Consequently, liquid objects cannot enter a pump anymore.
2016-02-26 23:17:38 +01:00
Mark fa0af84686 Fixed pump 2016-02-26 23:03:52 +01:00
Mark e2689ad1c3 Prototype: Liquid objects as menu icon
It seems that real objects would be nicer.
2016-02-16 21:08:23 +01:00
Mark be8fd0833c Oil-burning steam engine
The steam engine can burn oil as fuel now. Added test to power system unit test. Still needs support for actually getting oil into the engine.
Fixed a bug in LiquidContainer that would return no liquid if the entire contents are removed. Added unit test for said bug.
Fixed overspilling of connected liquid containers. Pump no longer counts as a liquid container/tank, so that it still spills liquid if no drain is connected.
2016-02-16 21:04:06 +01:00
Mark e985ffbd45 Changed pipe interface
- connect / disconnect callbacks do not include the line anymore
- the drain and source pipes are set to the pipe now, instead of the line
2016-02-16 21:03:43 +01:00
Mark e99ab4471a Refactoring: Completely remodeled pipe interface
Pipes can connect to nearly anything now. The connecting object is responsible for rejecting the connection.
2016-02-16 21:03:20 +01:00
Mark 5c83545900 Refactoring: Replaced pump internal liquid storage with library function calls
The pump actually stores liquid until it can pump. This may not be desired, but it was like that before my changes already. This probably is better than having it drop excess material at the pump.
2016-02-16 21:03:10 +01:00
Mark 30352e422e Refactoring: Replaced pump pipe variables with library function calls 2016-02-16 21:03:06 +01:00
Mark 9c28cb978a Analysis for refactoring 2016-02-16 21:03:01 +01:00
Mark 371fdaeaa6 Refactoring: Pump interface names
The pump uses the same function names as the liquid tank now. This is a preparation for the consolidation of the two.
2016-02-16 21:02:56 +01:00
Mark e1627a2619 Pump liquids to liquid containers
The pump can transfer liquids to and from liquid containers now. Changed the material storage from material index to material name now, because liquid containers may contain fantasy liquids, too. The pipe cannot output such imaginary liquids though, so only transfer between compatible containers is possible.
2016-02-16 21:02:51 +01:00
Mark 427cacfbba Bugfix: Insert at wrong object 2016-02-16 21:02:46 +01:00
Mark 7b573691a4 Bugfix: Wrong menu entry in pump 2016-02-16 21:02:41 +01:00
Mark 97bdd342fc Refactoring: Pump, pipe, better menu handling
The pipe can be connected from the interaction menu now, too. Expanded the disconnection logic, because more problems arise when the pipe can still be connected to other structures - it would be sufficient to remove the line, but that could be annoying:
- if the pipe is connected to a container, then you can disconnect the pipe from that liquid tank and it will still be connected to the pump
- if you disconnect the pipe from the pump, then it will disconnect from the liquid tank as well

Maybe this is confusing to the user, we can still kick that out later again.
2016-02-16 21:02:32 +01:00
Mark 94d47aa2ba Pump: Menu action constants
Replaced the hardcoded strings in the pump interaction menu with constants.
2016-02-16 21:02:18 +01:00
Mark 35604ec1ac Pump interface:
The pump gets the interfaces ExtractMaterialFromSource and InsertMaterialAtDrain that allow for overloading the pumping process
2016-02-16 21:01:46 +01:00
Sven Eberhardt 1bb78ecd4f Remove some unnecessery animation weights.
These overwrite the animations in their slots while there are no other references to existing animations in the slot.
2016-01-28 23:47:53 -05: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 95285c6f9e pump: added info about state to interaction menu
The pump is rather complex. This should allow for (new) players to figure out faster whether e.g. the drain pipe is clogged (as opposed to them doing anything wrong).
2015-11-25 12:05:26 +01:00
David Dormagen f333df2c73 always show interaction menu for pump & structures in general
The HasInteractionMenu callback of the pump was eaten by the merge. I checked.
2015-09-10 18:23:44 +02:00
David Dormagen cc3452bd0d custom guis: properly scale with font size now
Previously, the em <-> pixels conversion was a hardcoded value. Now the GUI scales with the font size that can be selected in the options.
Sadly, all scales were off since the hardcoded value was too low.
2015-09-06 19:02:31 +02:00