Commit Graph

598 Commits (544c1cbb4bb6da97d30571ff28772660c7ad5969)

Author SHA1 Message Date
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
David Dormagen ac738735b2 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Vehicles.ocd/Airplane.ocd/Script.c
	src/game/C4Game.cpp
	src/game/C4GraphicsSystem.cpp
	src/gamescript/C4GameScript.cpp
2015-09-02 08:19:34 +02:00
David Dormagen 18808da543 object pickup: reworked selector effect
The reworked effect makes it clearer that this is a meta-action and is not part of the ingame world.
2015-09-01 13:37:44 +02:00
Maikel de Vries 37bd5abf87 fixed a wrong call to Contained() 2015-08-31 01:56:31 +02:00
David Dormagen e9a69c4252 collect objects solely via CTRL now
The player can also choose which object to collect by holding CTRL and navigating left/right.
2015-08-30 20:39:50 +02:00
Clonkonaut 6bcdfa3525 Added Zaps + hive.
Necessary changes to swarm library: SwarmCall
2015-08-24 00:10:30 +02:00
Clonkonaut bd5e127b22 Added GetTreetopPosition for placement in treetops.
TODO rework coconut to utilize this.
2015-08-24 00:10:29 +02:00
Clonkonaut c7df46762d Swarm library includes insect library. It's needed anyway. 2015-08-24 00:10:29 +02:00
Maikel de Vries a61a91798b move DrawMaterial to map library functions 2015-08-18 12:36:59 +02:00