Commit Graph

906 Commits (03d0bb49dc83ac553e02608dcc1399b78e69e481)

Author SHA1 Message Date
Mark 8d4f6399aa Bugfix: Trees seed wrongly.
The trees actually seeded at a very wrong place in case the property "Confinement" was not set: The area.x, area.y, area.w, area.h coordinates were specified as global coordinates, but were used as offset coordinates in PlaceVegetation.

This leads to the trees seeding underground, too, unfortunately.
2016-04-11 22:14:20 +02:00
Mark 9cb261aac8 Bugfix: Trees seed wrongly.
The trees actually seeded at a very wrong place in case the property "Confinement" was not set: The area.x, area.y, area.w, area.h coordinates were specified as global coordinates, but were used as offset coordinates in PlaceVegetation.

This leads to the trees seeding underground, too, unfortunately.
2016-04-11 22:12:51 +02:00
Mark b6b5f5a79f Merge branch 'master' into liquid_container 2016-04-11 21:23:28 +02:00
Mark 89718f35a4 Vendor: Allow rebuy
Added a callback QueryRebuy(int for_player, object base) in the vendor library. If an object that will be sold returns true in that function then the object will not be added to the base material of the selling player.
Currently the only objects that are sellable are Diamond, GoldBar, Nugget, Ruby. They cannot be rebought, just as in the previous implementation.
2016-04-11 21:21:41 +02:00
Mark 43d6fcd231 Plant: Extracted a function for plant reproduction.
The existing Seed() places plants with a random chance. This makes testing the placement tiresome, so the actual placing part was moved to the new function DoSeed().
2016-04-11 21:21:38 +02:00
Maikel de Vries 9bb2de333a fix and improve grabbing onto ropeladders 2016-04-11 21:04:51 +02:00
Maikel de Vries 6bcd8fd596 implement uncash sound for buying at the vendor library 2016-04-10 12:21:41 +02:00
Maikel de Vries 79beb8de47 compactify buy menu entries a little
This prevents unnecessary scrolling and there was a unused little whitespace.
2016-04-08 22:09:22 +02:00
Maikel de Vries 43c7e92fd8 show no power need rule in flagpole interaction menu overview 2016-04-08 21:30:29 +02:00
Maikel de Vries fbb365fd65 fix playing sounds in vendor library 2016-04-07 19:27:27 +02:00
Mark 69467d3c70 Found unused function 2016-04-07 17:29:40 +02:00
Mark c607e3e4c2 Merge commit '0795d088d1f82e8d4158e4fa859bbe69e0c4c875' into liquid_container
Conflicts:
	planet/Objects.ocd/Libraries.ocd/Stackable.ocd/Script.c

Unit tests still pass!
2016-04-05 06:29:08 +02:00
Maikel de Vries 0795d088d1 stack objects with extra slots in menu iff slot contents can be stacked 2016-04-04 22:23: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 bc9538200c Merge branch 'master' into liquid_container 2016-03-29 20:06:14 +02:00
Mark 7e74baac55 Refactoring: Construction site takes materials, not the constructor
The functionality of taking construction materials from a clonk and lorries was extracted to a separate function and moved from the constructor to the construction site. This is a little bit of an esthetic decision, but it is also useful for my project that has a spacebar-interaction which takes construction materials from the clonk without the need to open the inventory menu.
2016-03-29 18:56:10 +02:00
Mark 7110882813 Vendor: Extracted functions for ejection of contents
In certain overloads of the object I want to be able to not eject contents, or eject only certain objects. The default behaviour of ejecting ALL contents whenever someone buys something is annoying in certain structures, such as a marketplace.
2016-03-28 22:33:58 +02:00
Mark 96c84a5bcd Deleted outdated Library_BarrelFiller
Barrels get filled by liquid objects now, you just have to insert liquid objects into the container.
2016-03-25 20:01:38 +01:00
Mark ab5d92117a Refactoring: Added parameter for container in CreateLiquid() 2016-03-25 19:44:36 +01:00
Mark 52542d7977 Refactoring: Liquids: Removed GetLiquidID() and changed CreateLiquid()
CreateLiquid() can be called from definition context now, to create a certain amount of liquid.
2016-03-25 19:34:36 +01:00
Mark 1c1ea38efa Renamed the liquids IDs
Omitted the prefix "Liquid_".
2016-03-25 19:11:55 +01:00
Mark ed75112715 Move liquids to the folder Items\Resources 2016-03-25 19:11:34 +01: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 a34eea41dc Power: Fixed unit test 21 2016-03-25 16:24:43 +01:00
Mark 6b7dc6015d Liquids: Fix liquids entering Clonks 2016-03-25 16:12:02 +01:00
Mark b491260fac Refactoring: Producers: Removed another special case from IsCollectionAllowed()
This special case was handled by the fact that liquid items are components anyway, and the ice object is handled differently.
2016-03-24 22:26:09 +01:00
Mark 0ef237988e Refactoring: Producers: Removed special case in IsCollectionAllowed()
The special case can be handled in RejectCollect(). Unit tests passed.
2016-03-24 22:20:55 +01:00
Mark ff89f337de Refactoring: Producers: Readability
Renamed some parameters and variables
2016-03-24 22:16:08 +01:00
Mark 29870b5e6d Producers: Code formatting 2016-03-24 21:28:09 +01:00
Mark fc3d6a69f0 Producers: More unit tests for basic operation
Added tests for adding to the queue and clearing the queue. The other tests are dummies for now. Found out that the parameter 'abort' in ClearQueue() was never used.
2016-03-24 18:27:23 +01:00
Mark 18ad5894e2 Producers: Producers can convert ice to water
This special case is a relic, because I do not know whether this is actually a use case that is required in a scenario. All unit tests in the producers test pass now.
2016-03-24 16:19:15 +01:00
Mark 332b899c54 Barrel: Fixed barrel liquid ejection
The barrel did not eject liquids with the correct angle when using the barrel, because the parameters were not used by the liquids.
2016-03-23 20:18:08 +01: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
Lukas Werling acc04b2398 Improve default Use/Throw angles when not aiming 2016-03-22 18:56:31 +01:00
Lukas Werling fac684a973 Fix crosshair being visible initially 2016-03-22 17:13:21 +01:00
Lukas Werling b30860112a Use regular Use instead of UseDelayed for gamepads 2016-03-21 18:45:42 +01:00
Lukas Werling f63f4b9ab3 Use regular Throw instead of ThrowDelayed for gamepads
There is no need to delay throwing as aiming is now possible at any time
using the analog stick.
2016-03-21 18:45:42 +01:00
Lukas Werling b8c8bf825c Crosshair: Use analog stick input properly
- Crosshair doesn't work with a dpad anymore. Supporting dpads adds
   unnecessary complexity, as a gamepad user with dpad will never be
   competitive with mouse users.

 - Crosshair isn't bound to item usage anymore, but will always show
   when the analog stick is outside of a deadzone.

Future planned feature: Also use the actual strength to allow
distance input in addition to direction. This is used heavily by
Knüppeln.c4s.
2016-03-21 18:45:42 +01:00
Lukas Werling 0afa589286 Replace all usage of "bool released" with "int status" 2016-03-21 18:45:42 +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 2e3a984b20 Producers: Fixed objects with liquid need
Liquids are handled as objects now, so that the function GetLiquidNeed() in the objects is obsolete. Adjusted the collection function accordingly.
2016-03-18 06:35:44 +01:00
Mark 49fdd59362 Refactoring: Stackable: Moved callback CollectFromStack()
The callback happens in every call to MergeWithStacksIn() now, instead of RejectEntrance(). Otherwise the following use case does not work: Liquid enters crew/building and fills the contained barrels. Added a unit test for that use case. Stackable unit tests still pass.
2016-03-17 18:43:08 +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 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 ac8d40418c Refactoring: Stackable: Renamed TryPutInto() to MergeWithStacksIn()
The previous name suggested that the object actually gets put into another object. In fact it merges the stack count with other stacks, and it does not only try to (and reverts the state if it fails), but it actually changes other objects even if the function returns false.
2016-03-16 18:19:55 +01:00
Mark e1cde6a92e Stackable: Better explanation of TryPutInto() 2016-03-16 07:00:54 +01:00
Mark 918baf3c11 Stackable: Documentation 2016-03-16 06:52:59 +01:00
Mark 176856e276 Refactoring: Stackable: Moved HUD notifications to a separate function.
It should be OK that the new function calls OnInventoryChange() in Clonks on destruction now.
2016-03-11 17:10:41 +01:00
Mark a61eac6ff3 Refactoring: Stackable: Reenabled recursive stacking into items
This got removed by accidet (checking if the object was added to another stack seemed logical). However, this whole function does not really make sense. It returns true if the object got removed only. That means that the object would not enter the other object anyway.
Removed the UpdateStackDisplay(), because that happens in TryAddToStack() if the count changes, anyway.
2016-03-11 07:03:22 +01:00
Mark 674145dc48 Refactoring: Stackable: Fix unit test 5
Added documentation for Stack(); Stack() does not stack on top of itself anymore.
2016-03-10 06:41:34 +01:00
Mark 969469190e Refactoring: Stackable: Replaced 'count' with GetStackCount()
This is possible, because the function returns the actual count now.
2016-03-10 06:25:04 +01:00
Mark 25408b4367 Refactoring: Stackable: Simplified TakeObject() even further
The check whether the stack is infinite happens in DoStackCount(), too.
2016-03-10 06:17:07 +01:00
Mark ea3c5ad920 Refactoring: Stackable: Simplified TakeObject()
The part where the stack count is reduced behaves the same as DoStackCount(); The stack display is updated in SetStackCount()/DoStackCount() respectively, so that line can be removed.
2016-03-10 06:14:49 +01:00
Mark 556454fcf4 Stackable: Fix unit test 14
The function IsInfiniteStackCount() now returns an actual boolean value, instead of nil.
2016-03-10 06:11:14 +01:00
Mark 76a0860a68 Refactoring: Stackable: Infinite stacks are not removed when taking the whole stack
Also made IsInfiniteStackCount() runtime-overloadable
2016-03-09 16:39:30 +01:00
Mark 114ad2697e Refactoring: Stackable: A stack can never contain 0 items
Stacks with 0 or less items are always removed. GetStackCount() returns the actual stack count now, which should always be positive.
2016-03-09 06:59:46 +01:00
Mark 0ea8894dbd Comment out logging in stackable 2016-03-09 06:32:12 +01:00
Mark 350088525c Refactoring: Stackable: Use InitialStackCount() where it makes sense 2016-03-08 06:57:53 +01:00
Mark dc84a1a5e2 Refactoring: Stackable: IsInfiniteStackCount() instead of count_is_infinite
The interface should be used instead of the internal variable, in case something gets renamed.
2016-03-07 17:49:11 +01:00
Maikel de Vries 1862161708 eject structure contents on destruction 2016-03-05 16:40:33 +01:00
Mark a785ca83da Stackable: Added InitialStackCount()
For things such as the liquid object that starts with 1 item in the stack, so that the Construction() function does not have to be overloaded.
2016-03-03 22:13:27 +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 cbe8bbd8e8 Removed authors Ringwaul and ST-DDT from liquid container
They were not involved in the current script
2016-03-03 17:07:37 +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 f78890142c Refactoring: Fuel
Added parameter to 'GetFuelAmount' that specified how much fuel is requested from this object. Oil is now fuel and only the needed amount is removed instead of removing the entire stack when a producer requests fuel.
2016-03-01 17:29:24 +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 4f19651f0e Removed liquid need objects 2016-03-01 06:58:16 +01:00
Mark 4f51a75a20 Removed fuel object
Need for a fuel burner library is evident
2016-03-01 06:55:02 +01:00
Mark 3591681f32 Liquid objects: Removed check liquid logic from producer
The liquid objects cannot be converted from one to another. The fuel object will be removed again, it does not make sense that "burnt fuel" can be transferred from one object to another.
2016-03-01 06:47:12 +01:00
Mark 0536520bc8 Refactoring: Liquid object stackable
Made the liquid object stackable again. Will replace component amounts in the next step.
2016-02-29 21:40:45 +01:00
Nicolas Hake fe91cec2b7 Merge remote-tracking branch 'github/pull/14' 2016-02-29 14:05:45 +01:00
Mark 7561779d8c Producers handle fuel and liquid with liquid objects 2016-02-27 15:04:37 +01:00
Mark 7894fb0fc6 Steam Engine: Use fuel liquid, Work in progress 2016-02-27 12:41:46 +01: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 351e61832c Liquid Container: Fixed liquid objects remaining in existence after test. 2016-02-26 22:38:38 +01:00
Mark af8e681ec8 Liquid Container: Let liquid object handle removing liquids 2016-02-26 22:11:11 +01:00
Mark 8a49ae10c0 Liquid Container: Removed logging 2016-02-26 22:06:04 +01:00
Mark 1acdfd4c1a Liquid object: Fixed unit test 3 2016-02-26 21:56:52 +01:00
Mark 55401f88e3 Liquid object: Fixed unit test 12
Added test for filling an empty barrel partially
2016-02-26 15:42:54 +01:00
Mark 79df36eb6b Liquid object: Refactored object entering system.
Unit test 3 still fails, because the functions are not runtime overloadable. Test 12 fails, because liquid transfer does not work correctly yet. This fill be fixed in the next checkin.

Added debug logging, this has to be removed again later.
2016-02-26 15:19:41 +01:00
Mark 862e69655e Liquid object: Test for liquid leaving the container 2016-02-20 21:10:41 +01:00
Mark 7cc88bd909 Liquid Object: Simplified transfer into liquid container.
Unfortunately, now the object is not actually transferred, but removed, and a new one is created or an existing one is filled in the liquid container. The logic could use a rework actually, because everything was more clear when the container stored things in variables.
2016-02-20 21:00:48 +01:00
Mark 9e46d752a9 Liquid Object: Unit test for entering liquid containers
The tests handles the entrance of liquid objects into the container. Will look to simplify the script in the next commit.
2016-02-20 20:14:19 +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 8698aa25cf Object Interation Menu: Request displayed amount from objects
The special handling of the stackable library was moved from the interaction menu to that library. The reasoning behind this is that the menu should not have to know each and every object, but the objects should tell the menu how they are displayed.
Liquids are displayed by their liquid count now. It would be even better, if the max. capacity would be displayed without having to hover the description field.
2016-02-19 15:19:41 +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 9a2b8449ec Liquid objects: No stackable library 2016-02-17 06:49:53 +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 1cf04d24c5 Liquid objects: Enter liquid containers only 2016-02-16 21:08:18 +01:00
Mark 9b17e41900 Liquid objects: Adjusted producer 2016-02-16 21:08:14 +01:00
Mark e39dbe48db Prototype: Liquid objects
Stackable liquid objects, as a prototype for storing liquids
2016-02-16 21:08:09 +01:00
Mark da87ac2d69 Bugfix: Called wrong function 2016-02-16 21:08:04 +01:00
Mark ae9736c18b Move liquid libraries to sub-folder LiquidControl 2016-02-16 21:08:00 +01:00
Mark 7707c7237e Producer: Liquid can be extracted from the producer itself 2016-02-16 21:07:55 +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 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 cc2b0aa15b Connection in Liquid Tank
The liquid tank can connect and deconnect lines properly now
2016-02-16 21:02:37 +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
Mark 75ebbb2851 Library: Tank
Drain and source pipes can be connected to the tank
2016-02-16 21:02:23 +01:00
Mark a4058777f0 Library: Liquid Container
Added inherited-call to Construction()
2016-02-16 21:02:13 +01:00
Mark 6f557520e8 Refactoring: Renamed Set/GetLiquidName to Set/GetLiquidType 2016-02-16 21:02:09 +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
David Dormagen 77bdc8e841 disallow collection via shift when contained (#1677) 2016-02-10 18:12:09 +01:00
Lukas Werling 29491ec3b7 Replace lots of empty parameters with proplist for Sound() 2016-02-10 13:31:16 +01:00
David Dormagen 76f971e9d9 interaction highlight: limit highlight's Plane for objects behind the Clonk
Otherwise, a catapult might appear to shine through the Clonk. This might look odd.
For objects in front the the Clonk, the GUI-Plane is kept.
2016-02-08 12:35:42 +01:00
David Dormagen c6da7d54aa interaction highlight: create selector particle with a slight delay
Only on first selection, though.
http://forum.openclonk.org/topic_show.pl?pid=31112#pid31112
2016-02-08 12:31:54 +01:00
David Dormagen 28ffc3d3b1 Library_Constructor: use normal single-use instead of holding-use
..because the library wasn't actually USING the holding callback at all. And it had/has its own CON_Aim hackery anyway. No need for the control-library internal CON_Aim stuff then (I could imagine this might just lead to issues at some point).
2016-02-07 10:47:33 +01:00
David Dormagen d9760cdab6 controls: properly set noholdingcallbacks to false when using ControlUseStart (#1327)
Otherwise the situation could arise where you used a ControlUseStart object (the wallkit) but noholdingcallbacks was still set to true (because e.g. you used a hammer before). Then you would not be able to move the preview.
This is described in a comment to the referenced bug.
2016-02-07 10:47:33 +01:00
Sven Eberhardt 623f838799 Add sounds: Hits::BucketHit*, Structures::DoorOpen*, Structures::DoorClose* by ala 2016-02-06 14:37:18 -05:00
Maikel de Vries fb0932df26 fix additional preview overlay after combining with other structure
This caused an overlay warning in the previewer object when constructing an elevetor and combining it with another elevator and detaching it again.
2016-01-30 12:28:35 +01:00
Maikel de Vries 2d22022a20 correctly place/preview basement for elevator (#1534) 2016-01-30 12:28:35 +01:00
David Dormagen 447be6c91d Clonk control: moved "menu" local to "clonk.control.menu"
"menu" is an error prone name in one of the most frequently used/overloaded objects of the planet. Actually, there was a bug in some other thing which disappeared now. So I guess something, somewhere uses the name "menu", too.
Anyway, this is more consistent (because the other control stuff is in this.control, too) and less error prone. So it's a good change regardless of whether it actually fixes an existing bug.
2016-01-29 22:48:59 +01:00
Maikel de Vries 5927e55973 fix script error in power library when a foundry (not really a consumer) is removed 2016-01-29 11:40:08 +01:00
Clonkonaut 29bfdf73ea Elevator construction preview shows placement of the case (#1534).
Structures can use the definition call ConstructionPreview(Previewer Object, Overlay, Direction) to add any overlay to the previewer. It will be coloured accordingly.
2016-01-28 00:31:22 +01:00
Mark 93ba7c5954 Vendor Library
Extracted the buy menu of the flagpole to a library, so that other objects can implement a buy menu without having to duplicate the code. An overview of the changes follows:

Library_Base:
- Moved auto-sell functionality to Library_Vendor
- Moved buy and sell functionality to Library_Vendor
- Removed the old engine menu for buying and selling

Library_Vendor:
- Added proplist for accessing local variables, avoiding variable clashes
- Added interfaces GetBuyValue, GetBuyableItems, GetBuyableAmount, ChangeBuyableAmount, GetSellValue
- Changed DoBuy: it uses the interface functions, instead of hardcoded base material
- Changed / merged the existing sell functionality and the flagpole sell functionality in DoSell:
   * does not sell items if QueryOnSell returns true
   * sell sound only audible to seller
   * the sold object tries selling its contents first (for example a bow, if it ever were sellable. This may not hold in the settlement games, but adventures would allow it)
   * the sold object ejects any contents before it is removed. These are usually unsellable objects. Previously they would just be removed together with the object. It has to be tested whether this places the items on the ground or at the center of the sold object
   * removed the "sell all" functionality on right-click for the moment.
- Still has some functions from the old base selling: CanStack and GetSellableContents, for the auto-sell functionality
- Fixed a logical error in AllowBuyMenuEntries
- Distinguish between buyer/seller and payer more, so that the logic can easily be changed in one line later
- Allow for runtime overloads of interface functions
- Changed inconsistent variable naming to a more consistent one
- Added namespaces to all sounds, the "UnCash" sound still does not exist
- Added localization strings for insufficient wealth
- Fixed property name error (missing 'e')
- Buy menu is active by default

Flagpole:
- Replaced the custom sell functionality (how many of these do we have actually??) with the sell functionality from Library_Vendor
- Buying menu is allowed if the rule is active

System.ocg/Object.c
- global functions Buy and Sell ask the target if it is a vendor, instead of whether it is a base, and do the callback there.
- renamed the argument so that it is no longer called "base", but "vendor"
2016-01-24 20:11:27 +01:00
Maikel de Vries 84218d1cbc merge UsageHelp into Description
This is better for the new interaction menu, since only the description is shown for items, but it can be longer now.
2016-01-23 16:28:02 +01:00
Julius Michaelis 711df05e1a Add button X to fade through half solidmasks.
Enabled on the elevator case for testing.
2016-01-20 18:58:11 +01:00
Maikel de Vries d9dccd01ad fix construction previewer showing green in front of existing sites 2016-01-20 16:32:05 +01:00
Maikel de Vries d500218a02 fix shape of basement construction preview and site (#1586) 2016-01-20 15:40:19 +01:00
Maikel de Vries 4114738b45 add power information to interaction menu for flagpole (#1579) 2016-01-20 13:21:02 +01:00
Maikel de Vries d23328f2c7 power library: methods to for storage information and balance updates 2016-01-20 13:19:37 +01:00
David Dormagen 5f25baa058 producers: show progress of current product (#1549)
This is solved via another entry in the production menu (below the products), which is updated by an effect, that is being told the menu ID/target by the interaction menu through a callback.
This setup allows for very intrusive changes to the interaction menu with only few lines of code!
2016-01-20 10:36:50 +01:00
Sven Eberhardt 729712fa2f Allow use of bucket, pickaxe, bow, club, grenade launcher, javelin and musket during scale/hangle.
Temporarily disables scale/hangle during usage of these items.
2016-01-17 14:31:51 -05:00
Maikel de Vries 5b111131e9 remove unused is wallkick effect 2016-01-17 13:30:01 +01:00
Sven Eberhardt 8d805a49a7 Raid: Fix goal descroptions and buckets in Mave's foundry. 2016-01-16 01:33:06 +01:00
Sven Eberhardt 44f913d0e5 Do not display grab interaction when swimming (unless clonk returns true on CanGrabUnderwater callback) 2016-01-15 08:54:50 -05:00
Sven Eberhardt 71b96bc5de Fix nil pointer access when recovering from over-full inventory 2016-01-14 22:30:55 -05:00
Maikel de Vries 4357004dbf prevent picking up heavy objects when on grapple rope and draw in rope when picking up heavy object (#1521)
Maybe there are other places where the controls libraries should make callbacks to control effects. But that is for the future.
2016-01-13 23:13:44 +01:00
Maikel de Vries 82b090c7ca producer library does not request power if producer is not a consumer (#1602) 2016-01-12 22:17:41 +01:00
Sven Eberhardt 7208a3c299 Ignore CarryHeavy for collection limit #1587
It was always ignored when picking up the CarryHeavy, but not when collecting another item. Now CarryHeavy consistently gives an extra item slot.
2016-01-10 21:52:44 -05:00
Sven Eberhardt 05b6ee2407 Remove unused library dummy graphics. 2016-01-10 11:59:55 -05:00
Sven Eberhardt 0f2057032f Retain inventory slot order on respawn #1543 2016-01-10 11:10:45 -05:00
Sven Eberhardt 3dad1c6d81 Turn MaxContentsCount and HandObjects into properties instead of callbacks (Possibly fixes #1553) 2016-01-10 10:41:34 -05:00
Maikel de Vries 092f9846dc ensure showing construction materials for sites at the bottom of the map (#1365) 2016-01-10 14:18:58 +01:00
David Dormagen 14c413028c interactions: always show action target & use AtRect instead of AtPoint
The players have no notion about the midpoint of an object and are thus confused when clearly standing in front of something and not being able to interact with it.
(Yes that happened in a Let's Play and yes, that's why the interaction menu also uses Find_AtRect.)
2016-01-03 17:39:26 +01:00
David Dormagen 22d9a21ff7 carry heavy: remove special treatment of CON_Interact
Because it's an interaction. It should use the interaction interface and not some self-made hack. Previously, setting down a carry heavy object would always be executed even if aborted with Space+S.
2016-01-03 17:38:05 +01:00
David Dormagen 4b398f95eb construction site: fix unstuck check for free objects
We are looking for free objects. So for OCF_InFree and not for Not(OCF_InFree). Now Clonks are e.g. unstuck when the landscape adjusts to a construction site.
2016-01-03 17:35:47 +01:00
Clonkonaut b2ecfcfc48 Slight improvements to Guardians.
A single player now receives four times more wave bounty than before, scaling up to four players. It's still challenging but I believe now doable.
Enemies should no longer jump off airships when being shot at.
Fixed a typo in the airship appendto script.
Fixed a possible null pointer when changing weapons.
2016-01-03 01:53:55 +01:00
David Dormagen a3e4b620b9 reworked interactions (grabbing etc.)
The player interface is now similar to how picking up works. This should increase acceptance. Also it was pretty fucked up before. The action bar is gone.
The script logic is now outsourced into a new library similar to the other stuff.
Objects can overload the selector for the new interaction (see "call elevator case").

Additional issues hit and resolved when working on this:
Shifting a cursor did not cancel certain actions (and there was no callback for that). This is now solved by adding two new callbacks.

Issues hit and not resolved:
Certain interactions (calling an elevator case, flipping a construction) are in some control library. They should be in the respective objects (and shown via callbacks etc.). Meh.
The internal interface (declaring interactions etc) has a few places where proplists are just translated because the properties are called differently. This is also a fuckup (i.e. a.interaction_object = b.Object) where the properties should just have been called the same in all places from the beginning.
The name "Action Bar" is pretty misleading now as it is no bar. But that's not something visible to the players. todo: cleanup.
2016-01-02 13:02:45 +01:00
Günther Brammer 00a4c6c428 Replace BorderBound DefCore value with BorderBound object property 2016-01-01 22:18:41 +01:00
Clonkonaut ef48a60b27 Fix possible null pointer. 2015-12-30 03:21:53 +01:00
Maikel de Vries ede6078c75 move out of solidmask as structure library function 2015-12-29 22:40:52 +01:00
David Dormagen 7fce9071e3 lower interaction priority of dead Clonks 2015-12-29 18:28:23 +01:00
David Dormagen 58aec33841 prevent insects from being hit by projectiles (#1515)
..which is now possible due to IsProjectileTarget being the only criterium (because OCF_Alive is not explicitely checked anymore).
2015-12-28 11:20:58 +01:00
Maikel de Vries 509bdac5bc remove unused Rebuy property from objects 2015-12-28 10:21:49 +01:00
Maikel de Vries 42cf57afb6 improve drawing speed of ropebridge (and further clean up) 2015-12-26 15:57:30 +01:00
Maikel de Vries e4b1fe94ca clean up grapple bow scripts 2015-12-25 16:11:17 +01:00
David Dormagen 25eb673b4c insect swarm library: slightly improved performance of MoveToTarget
..by not using proplist access too much. I noticed the Playground would start lagging (debug build) and the profiler told me it was the mosquitos.

Before, 83% of the time in Mosquito::Activity was spent in MoveToTarget. After the change, only around 70% (multiple runs).
Is this a sensible way to measure the change?

Previous:
[14:30:22] 00186ms	Mosquito.Activity
[14:30:22] 00155ms	Mosquito.MoveToTarget

Afterwards:
[14:37:37] 00238ms	Mosquito.Activity
[14:37:37] 00172ms	Mosquito.MoveToTarget
2015-12-24 14:44:57 +01:00
Maikel de Vries 4c37584ea2 fix ladder grabbing when at the top of the ladder 2015-12-22 09:57:35 +01:00
Maikel de Vries 32bc68fdab fix letting go of wall when pulling in grappler rope (1219) 2015-12-21 22:21:32 +01:00
David Dormagen d7b2ef9f75 prevent clonk idle animation when in dialogs and reduced frequency of idle sound (#1506)
This doesn't work for intros, though, because they use simple messages. We should unify the systems to only have one dialogue system that uses new-style-menus and implement required features in those menus..
2015-12-20 19:17:34 +01:00
Maikel de Vries dea3b7f1c3 fix invertion of clonk on top ladder elements (#775) 2015-12-17 19:40:15 +01:00
David Dormagen 7f4f5fee58 added new vocals for three skins (by ala)
They are played e.g. when being hit by stuff, catching fire, killing teammates, idling, trying to put a shovel into the pump, and much more!
2015-12-16 23:01:29 +01:00
Maikel de Vries b98ab3e699 lantern and torch have call back to indicate them as light sources 2015-12-16 21:06:33 +01:00
Clonkonaut f0a3213a82 Fix possible nullpointer in DetachObjects. 2015-12-16 01:27:33 +01:00
David Dormagen c767ad6931 added sounds for constructing and repairing (by ala) 2015-12-15 22:16:36 +01:00
Maikel de Vries 1523c3f012 add growth to animal library 2015-12-14 18:13:18 +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 6065571742 fix rope particles on ladder and clean up rope related scripts
The ladder only had one of the ropes drawn and the clean up resulted in some small speed up for the rope related objects. See also (#1143).
2015-12-11 23:32:33 +01:00
David Dormagen 8d9d3a1ef9 producer: use infinity symbol instead of text "always"
After some testing, the text turned out to be the worse solution. At least Sven complained that the text was split into two lines on his resolution from 1997.
2015-12-11 20:42:15 +01:00
Maikel de Vries 285288546c allow wall jump from rope ladder 2015-12-08 17:22:13 +01:00
Maikel de Vries 64a4d12683 clean up and small speed gain for rope library
Also clean up for related objects, this is still work in progress to fix some bugs and get more speed up.
2015-12-08 16:43:52 +01:00
Maikel de Vries 69de4e72fd grab ladder while in wall jump 2015-12-08 16:26:20 +01:00
Sven Eberhardt c5f12523aa Fix ruby sale goal counting gems twice (#1489). 2015-12-06 21:45:06 -05:00
David Dormagen 7a0b170075 interaction menu: made menu-rejection errors a callback
Objects that prevent interaction just in some situations (hostility, dead Clonks, ..) should always be shown in the interaction menu (because otherwise players might suspect bugs) and TELL the player WHY they want no interaction.
For that, they might need to specify own error messages.

Known issues:
* The "OnOpen" callback is done even if interaction is disallowed, however just simply removing the callback might not be sufficient, because we might get a callback disbalance if objects change their attitude while the menu is opened and the menu is closed again.
* Some objects (which should) do not include the Library_Ownable. However, we have no base melees atm and since this might introduce new errors, postpone it to 8.0.
2015-12-06 21:28:03 +01:00
Sven Eberhardt 6b5bd38cc8 Fix aim cancellation by spear AI (#1474) 2015-12-05 21:13:37 -05:00
Maikel de Vries 042ba9a164 speed up finding flagpole for position 2015-12-05 11:45:43 +01:00
David Dormagen af9fe24dac AimManager: catch a nil-pointer
..which could happen if you RemoveObject()'ed an item from the Clonks hands.
2015-11-29 22:25:38 +01:00
David Dormagen aec1988722 removed category "vehicle" of several helper objects
Otherwise you can spawn them in the "Playground" scenario.
2015-11-29 18:28:40 +01:00
Maikel de Vries 7a8de4fc55 fix power loss bug when producer moves out of base area (#1447) 2015-11-28 18:05:17 +01:00
Maikel de Vries 004bd3c59e move structure related libraries to separate subfolder 2015-11-28 15:40:25 +01:00
David Dormagen ebc9395220 fuzzy logic: added DumpCache debug function
This can be helpful to see why the observed behavior is triggered in some cases (e.g. why a fish swims straight into a wall (hint: because the wall was left AND right)).

DumpCache() can be used like so:
var brain = FuzzyLogic->Init();
// ..do stuff
brain->DumpCache();
2015-11-25 11:02:54 +01:00
David Dormagen 2c5d0c6600 producer: stop infinite items jamming the production
When CheckAllComponentsForProduct returned true, but the item could still not be produced (due to missing water etc.), Produce would fail but the queue would not be cycled.
Now CheckAllComponentsForProduct is gone (why was it there anyway?) and if anything happens in Produce, the queue is cycled.
2015-11-22 22:12:13 +01:00
David Dormagen d21fb63a3b Library_Stackable: properly update stack count in inventory bar
Previously, using a javelin stack would not lower the displayed stack number in the inventory bar.
2015-11-22 11:37:26 +01:00
Maikel de Vries b1228bea2f additional power system test for bug #1447 2015-11-22 11:34:24 +01:00
Sven Eberhardt 85b739ce1f Fix nil pointer access in basement placement script. 2015-11-20 20:50:26 -05:00
Sven Eberhardt 619cce13ba Fix script error when power levels vary while sawmill (and some other producers) have an active queue but no active production. 2015-11-20 18:36:06 -05:00
David Dormagen eb2b18457e roll: only roll while direction key is held down
This means that you start a roll currently with walking left/right and tapping [down]. OR falling a great height and just holding left/right when landing. When you let go of left/right, you will instantly walk again. This reduces the possibility of the players rolling into an abyss.
2015-11-14 14:58:02 +01:00
David Dormagen e29028457e fixed count display of stackable objects
The count was displayed twice in certain situations: in the picture AND as a number.
Now the responsibility for displaying the count is solely on the menus' side. The objects only show an additional overlay when their count is infinite (to not display an arbitrary "50" there).
2015-11-10 17:32:38 +01:00
David Dormagen cb2b189ff9 removed Library_GoldSeller
Valuables are now solely sold by putting them into the flag. This is consistent with everything else now.
2015-11-07 22:56:57 +01:00
David Dormagen 0f1b48d2c6 structures: update interaction menus when taking damage 2015-10-25 15:57:20 +01:00
David Dormagen ffe25efdfe construction site: add missing materials to interaction menu (related to #1365 and #1364) 2015-10-23 18:49:12 +02:00
Sven Eberhardt 789f910213 Clonk 'use' control: Fix nil pointer access when target object of shelved action removes itself. 2015-10-22 23:58:15 -04: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
David Dormagen ba681c8ee4 fixed auto-pickup after using an item that destroys itself or exits the clonk
Steps to reproduce: put shovel on ground. take dynamite. stand on shovel. aim below you. leftclick. leftlick. => dynamite is planted AND shovel is collected.
2015-10-14 20:17:25 +02:00
David Dormagen 88d7e1209e producer: added hint to infinite production below menu 2015-10-13 07:35:04 +02:00
David Dormagen 12ef9c243d producer: removed currently unused StringTbl entry 2015-10-12 09:48:29 +02:00
David Dormagen 3258ca003b producer: use shift+click for infinite production (and the usual 'cancel' symbol to reduce the queue count by 1) 2015-10-11 18:31:40 +02:00
Clonkonaut e8ecdb0251 Fix interaction bar hotkeys. 2015-10-11 16:38:33 +02:00
Clonkonaut b9bb89945a Do not unregister producer as power consumer if queue still full (fix sawmill not continuously sawing). 2015-10-11 16:21:23 +02:00
Clonkonaut 1178d8f0ce Prevent dead clonks from sitting upright (#1358).
Also added convenient constants defining the animation slots to use for clonk animation.
2015-10-11 14:08:14 +02:00
Clonkonaut ce505a04ae Fix creation of No Power Need Rule with uninitialized power network. 2015-10-11 00:17:01 +02:00
Clonkonaut 3c97c25301 Make big vehicles (catapult) control a double elevator but not a single one. 2015-10-11 00:16:14 +02:00
Clonkonaut 070236a6de Make the elevator better at catching vehicles with ElevatorControl. 2015-10-10 23:18:23 +02:00
Clonkonaut acec73dd51 New global const FIRE_LIGHT_COLOR. Added fire light color to various objects. 2015-10-07 23:26:03 +02:00
Clonkonaut 9f7b2fc007 ActionBar: Show description for ACTIONTYPE_EXTRA. 2015-10-06 15:08:50 +02:00
Clonkonaut 0aab3cf4e6 Added new material textures by Nachtfalter and Matthi. 2015-10-05 02:02:36 +02:00
David Dormagen cb58bed40e fuzzy logic library: changed interface & added documentation
The interface now follows the Shape library's interface.
2015-10-04 18:38:05 +02:00
Clonkonaut 986917ce13 Crops: Fix endless loop in WaterCheck. 2015-10-04 01:38:24 +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
David Dormagen a8943f88d5 added squid
Model and texture by Matthi.
2015-09-30 18:31:44 +02:00
Clonkonaut bfd0bd035d Added magic energy support for 3rd party devs. 2015-09-30 10:20:20 +02:00
Clonkonaut 178e904fdd HUD redesign. Beware!
Added interaction icon to help knowing when interaction is possible.
Limited crew portraits and information to two clonks.
Added additional warnings texts for further clonks (crew count > 2).
Moved inventory from bottom to top.
2015-09-30 10:11:43 +02:00
David Dormagen a78e1fc448 disallow collection of moving objects via shift (#1386) 2015-09-25 14:05:52 +02:00
Maikel de Vries 4c66cc4ad7 change time interface to remove connection between System.ocg and Objects.ocd 2015-09-22 23:31:17 +02:00
David Dormagen d4c5815173 construction site: moved tear-down-construction from [space] to E-menu 2015-09-22 18:49:08 +02:00
David Dormagen b35b1ae022 inventory: allow dropping multiple objects in one frame (f.e. through E->[move all to surrounding]) 2015-09-22 18:28:43 +02:00
David Dormagen cfa0d61e98 inventory: do not immediately pick up again when dropping via shift+throw 2015-09-22 18:22:17 +02:00
David Dormagen ed5ff63cfe inventory: allow collecting items with mouse-click when nothing in hand
This seems to be the intuition of every living being ever to have touched Clonk. You can now collect items that you click on (given that they are in range). You will however also just collect the next-best item when either not clicking on anything specific or when the item is out of range.
That means that you can use left-click as a shortcut to hitting [shift].
2015-09-22 18:05:23 +02:00
David Dormagen 745f452afb inventory: allow dropping the hand item on Shift+Throw 2015-09-21 14:21:57 +02:00
David Dormagen 0409f03a17 inventory control: allow picking up all items on shift+up 2015-09-20 18:27:19 +02:00
David Dormagen aca1bcce34 clonk: disable rolling when stuck 2015-09-20 17:53:05 +02:00
David Dormagen 7a6e8cdf90 interaction menu: simplified object-finding-logic greatly
This is mainly to get rid of IsContainerEx, because wtf.
The only reason why the categories were restricted was to prevent HasExtraSlot-objets from being found. Some C4D_Objects (or with wrong category in general) wanted to be found however. They are now found just like that.. like it was supposed to be.
2015-09-20 17:36:45 +02:00
Maikel de Vries f1a6653c94 remove energy bar rule
This rule is obsolete as the HP of structures is shown in the interaction menu now.
2015-09-19 07:59:05 +02:00
Clonkonaut 6a9ef8b961 New: Cotton, Cotton Seed, Cloth, Seed Library 2015-09-18 19:44:49 +02:00
Clonkonaut e196ddcb2c Tidy up Crop Library. 2015-09-18 19:41:21 +02:00
Sven Eberhardt af5302b949 Fix insect swarm and boiling lava scenario saving. 2015-09-17 21:59:05 -04:00
Sven Eberhardt c466fd6257 Remove some dead files. 2015-09-17 18:39:25 -04:00
Clonkonaut c1d87dd971 Added random value to Seed timer to prevent possible calculation spikes in key frames. 2015-09-18 00:00:46 +02:00
Sven Eberhardt 0bb693172d Lamp post offsets light source to lamp attachment position. 2015-09-16 21:14:09 -04:00
Sven Eberhardt 56ff5bbf27 Lantern: Fix attachment on CreateContents, fix scenario saving and remove lantern dummy.
RejectCollect is not called on CreateContents or other forced entry methods but should still cause the lantern to attach. So move any side-effects to Collection2 instead of direct RejectCollect.

The lantern dummy had Timer=1 and wasn't doing anything. Use a simple overlay instead.

Note that interaction menus still show the lantern always with off-material. But that's a bug in the interaction menu.
2015-09-15 22:41:30 -04:00
Sven Eberhardt 53a002c31f Lantern: Increase light range and color light.
The range wasn't any further than the clonk's natural light which made lamp usage a bit pointless.
2015-09-15 21:48:02 -04:00
Sven Eberhardt bf1596a229 Adjust interaction menu object ordering.
The clonk opening the menu should always have higher priority so the clonk is predictably selected on the left side even if standing behind e.g. a crate.

Other clonks should be behind because interaction with them is rare but having your fellow players stand in front of a building is very common. Allies also tend to run in front just when you opened that menu.
2015-09-15 21:13:53 -04:00
Sven Eberhardt 9ec3ca0304 Fix production menu entries in unowned producer buildings. 2015-09-15 20:50:50 -04:00
Maikel de Vries 71c7cd0a5b add object to block areas from flag ownership
These objects also live in the flag list and for now have only rectangular shapes, more features may come in the future.
2015-09-15 22:25:52 +02:00
Maikel de Vries 2dde6fd600 move flag coordinate in area check into flag's script
This allows also for using rectangular ownership shapes, which can be useful for blocking areas.
2015-09-14 20:58:13 +02:00
Sven Eberhardt 4b29c83477 Pass coordinates to ControlThrow. 2015-09-13 13:09:28 -04:00
Sven Eberhardt 0e085e435b Add ControlThrow callback into objects that want to implement custom throwing or even non-throw actions on the throw key. 2015-09-13 13:04:18 -04:00
Maikel de Vries e94af5b87c remove moving flag markers on border crossing
This can for example lead to infinitely moving markers when a border crossing rule is active, and the flag markers move from left to right for ever.
2015-09-12 20:51:16 +02:00
David Dormagen 673243c9dd properly handle QueryRejectDeparture everywhere (#1382) 2015-09-11 21:08:38 +02:00
Maikel de Vries 358d282ec2 do not perform QueryRejectDeparture when pressing movement keys 2015-09-11 19:04:50 +02:00
Clonkonaut d98134332c Carry heavy objs draw special pickup symbol when holding Shift. 2015-09-11 01:08:54 +02:00
Sven Eberhardt a0deca27b6 Make HUD controller reinitialization after section change more failsafe. 2015-09-10 18:35:03 -04: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
Sven Eberhardt e440df645b Fix initial object selection and cycle order when picking up objects.
The check for initial selection was broken because GetIndexOf does not return nil when the index is not found. It returns -1.

The previously intended logic (that never worked) of selecting in direction of the clonk view first may sound intuitive, but is weird in practice when you're standing just on top of an object that is 1px behind you and it selects an item very far away instead. It's particularly counter-intuitive when picking up objects out of the earth while scaling.
2015-09-09 22:51:58 -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
Sven Eberhardt c536afefd3 Fix HUD after section change in Deep Sea Mining.
Also fixed a typo, which is a related bugfix and therefore in the same commit.
2015-09-08 23:18:53 -04:00
Sven Eberhardt e444ec534c Fix script error when bucket is transferred into non-producer container.
IsCollectionAllowed is only defined for producers.
2015-09-07 23:39:35 -04: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
David Dormagen 5dcc9e387c collection: do not also pickup stuff when dropping items 2015-09-05 11:28:26 +02:00
David Dormagen 87a824b49d inventory & interaction: added Find_Layer where appropriate 2015-09-05 11:22:23 +02:00
Maikel de Vries e684efdb7b fixed setting power helper of a not found flag in power library 2015-09-04 18:57:17 +02:00
David Dormagen 438b405d29 collection: utilize Find_Property and unify collection behavior between "surrounding" tab in interaction menu and shift-collect
You can now intentionally collect objects that are stuck. Player-friendliness over everything! Losing an object in a basement had been the number 1 reason for suicides in Clonk.
2015-09-04 16:29:46 +02:00
Maikel de Vries 1a98f1ecf7 move animal libraries into animal subfolder 2015-09-02 23:50:47 +02:00
Maikel de Vries 9f4cc44b4c allow for dead animal collection with the Ctrl key 2015-09-02 23:32:09 +02:00