Commit Graph

68 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
Maikel de Vries a4d20d79d5 cable cars: extend order interface and let producer order more components at a time 2018-04-16 11:13:32 +02:00
Maikel de Vries c00a8cf3c3 fix a bunch of suspicious assignment warnings 2018-04-09 11:53:55 +02:00
Maikel de Vries a70ab8b843 cable cars: let steam engine request coal when needed 2018-04-01 20:54:12 +02: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 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
Sven Eberhardt bdb3118309 Add missing inherited calls to structure Definiton calls 2016-12-28 08:53:55 -04:00
Maikel de Vries 135a7d8aff fix support for multiple liquids in liquid containers 2016-12-25 12:48:15 +01:00
Maikel de Vries c7afed1aeb allow pumping liquids from container (foundry and steam engine) 2016-12-24 14:09:47 +01: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 dd7bf3e89e Merge remote-tracking branch 'origin/master' into liquid_container
Conflicts will be merged in the next commit:
	planet/Objects.ocd/Items.ocd/Tools.ocd/Pipe.ocd/PipeLine.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Tools.ocd/Pipe.ocd/Script.c
2016-03-25 17:15:39 +01:00
Mark db061b5cad Refactoring: Simplified script.
Unit tests still pass.
2016-03-25 16:31:17 +01:00
Mark c0b783c976 Power: Fix unit test 20 2016-03-25 16:13:11 +01:00
Mark 274379ddc3 Producers: Fixed unit test 5
Added unit test 6 for fuel objects that do not behave correctly. Fuel should always return the current fuel amount if not parameter is passed.
2016-03-18 17:44:51 +01:00
Mark 8749300622 Fix unit tests: Some code adjustments were forgotten in the other commits. 2016-03-16 22:44:48 +01:00
Mark afc8797b2f Fix steam engine 2016-03-01 19:54:55 +01:00
Mark 072f599cdb Refactoring fuel: Removed the 'get_partial' parameter.
This was used inconsistently and without regard to correctness, so it is better removed altogether. In case of incomplete objects, the incomplete object always returns the reduced amount.
2016-03-01 17:19:39 +01:00
Mark 4f51a75a20 Removed fuel object
Need for a fuel burner library is evident
2016-03-01 06:55:02 +01:00
Mark 7561779d8c Producers handle fuel and liquid with liquid objects 2016-02-27 15:04:37 +01:00
Mark a524e7db2c Added comment 2016-02-27 14:43:24 +01:00
Mark 0a77b58b6a Steam Engine: Use fuel as liquid, finished
The pump was blocked, because the steam engine did not insert enough material
2016-02-27 14:35:38 +01:00
Mark 7894fb0fc6 Steam Engine: Use fuel liquid, Work in progress 2016-02-27 12:41:46 +01:00
Mark 8f7d823633 Steam Engine: Replace fuel_amount with GetFuelAmount() where possible 2016-02-26 23:30:17 +01:00
Mark 8c578931bb Liquid Object: Replaced liquid container logic
The liquid container now stores liquid objects, instead of volume and liquid type. Liquid objects can have be of a specific type, such as Liquid_Water, Liquid_Oil, etc..., but they can also just stay Library_Liquid for other liquids.
The liquid container logic has become more complex now, but still works as before. Transferring liquids to other objects may still need some improvements:
- at the moment, transferring liquids between liquid containers is possible
- maybe liquids objects, such as oil, can enter a liquid container while another liquid is in that container already - will need a unit test for that
- transferring liquid from a liquid container to a structure or crew member should be possible (but is not yet), if the target is not a liquid container but contains liquid containers
2016-02-19 06:53:44 +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 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 734987cd8d Steam engine: Reduced duplicate code 2016-02-16 21:07:41 +01:00
Mark 8e692a25c4 Use property instead of function for barrel intake 2016-02-16 21:07:17 +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 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 cce260a9a7 Refactoring: Steam engine
Made the steam engine interface more modular, removing duplicate code. Added a callback when refilling fuel that allows the objects not to be removed. This is important for barrels, because barrels will just empty their contents, they should not vanish!
2016-02-16 21:03:57 +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 fbdd5eeb09 Refactoring: Pimp, Pipe, SteamEngine
Now it is possible to connect lines from a pump to the steam engine. This is achieved by the steam engine being a liquid tank. It did not seem good to allow connection from pumps to all liquid containers (i.e. barrels). A liquid tank is also a liquid container, they share the same interface, but it is also a structure.

It is not yet possible to fill the steam engine with any liquid though, because it is not defined what kind of liquid it accepts. This will be oil in the future. Furthermore, the behaviour when the pump adds incompatible liquid is not defined yet.
2016-02-16 21:02:28 +01:00
Lukas Werling 29491ec3b7 Replace lots of empty parameters with proplist for Sound() 2016-02-10 13:31:16 +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
Maikel de Vries a24dd229c4 producer does not depend on partial fuel amounts 2015-03-24 22:39:18 +01:00
Maikel de Vries ca04f00a58 add test for underproduction of power 2015-03-09 18:55:18 +01:00
Maikel de Vries 13a72c65f0 improved power system callbacks 2015-02-04 10:35:16 +01:00
Maikel de Vries c0ff94eb75 normalize power values to multiples of ten
This makes it easier for internal calculations and that value of 10 now represents a single light bulb. It is advisable to only use multiples of 10 for production and consumption values.
2015-02-04 10:35:15 +01:00
Maikel de Vries f9f790cbd6 fixed callbacks from the power library to producers and consumers 2015-02-04 10:35:15 +01:00
Maikel de Vries 2d00588dff new power system (work in progress) 2015-02-04 10:35:14 +01:00
Maikel de Vries 4ea0cb0ca6 make ContainBlast a property instead of DefCore entry 2015-01-15 17:46:53 +01:00
Maikel de Vries 2d1647ea77 improved prioritizing of power consumers 2014-12-19 21:47:08 +01:00
Maikel de Vries 13ab324603 improved smoke for some structures 2014-10-18 15:49:44 +02:00
Sven Eberhardt 5094cc5c1b Reworked "Save as scenario" option in editor to write a script file instead of Game.txt. 2013-12-27 17:10:09 +01:00
Clonkonaut 9a706eddcc Sound effect for the working steam engine. 2013-11-27 22:23:12 +01:00