Commit Graph

46 Commits (03d0bb49dc83ac553e02608dcc1399b78e69e481)

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
Sven Eberhardt bce903ee04 Merge branch 'master' into qteditor
Conflicts:
	planet/Objects.ocd/Items.ocd/Tools.ocd/Dynamite.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Animal.ocd/CreatureControl.ocd/DefCore.txt
2016-08-13 23:42:59 -04:00
Lukas Werling f3b2ff1295 Merge branch 'gamepad-controls' 2016-08-07 18:10:24 +02:00
Sven Eberhardt 5db45c0f47 Merge branch 'master' into qteditor 2016-08-06 21:45:19 -04:00
Clonkonaut 8d6d57089b Inventory slot selection is back on key down.
This makes the selection of the Q slot slightly more awkward because you select the target slot in between. Or to say otherwise: it is kind of like it was before.
2016-08-05 19:36:26 +02: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
Clonkonaut d1382f7244 Fixed inventory slot selection. 2016-08-02 23:59:15 +02:00
Clonkonaut 36e2e1ab3e Switch inventory slots by pressing number key (hold) + number key.
This can be used to sort the inventory according to personal liking!
2016-08-02 18:39:13 +02:00
Clonkonaut 89be1da072 Changed quick switch slot selection to Number + Q.
As suggested by Zapper in this posting: http://forum.openclonk.org/topic_show.pl?pid=31073#pid31073.
This way is probably the only way item usage will ever work on Q. For now, this reverses the previous changes. Q will again react on key down.
2016-08-02 17:49:34 +02:00
Clonkonaut faf3add7e7 Quick Switch slot is now selectable using Q + number key.
This makes a very fundamental change with quick switch: The switching action is now performed on the key release instead of the key press. Let's see if this performs badly for players.
2016-08-02 00:37:40 +02:00
Clonkonaut 2713462cd2 Show quick switch key above quick switch item slot in HUD.
This will prepare the quick switch system according to Maikel's suggestion (http://forum.openclonk.org/topic_show.pl?pid=31070). The highlighting method is open to discussion. Currently, font colour and style are similar to the interaction key above the action bar icon. But it is very well possible that this will look bad when the key name is very long.
2016-08-01 17:14:34 +02:00
Sven Eberhardt 36685a3119 Add HideInCreator=true to internal/helper/library definitions 2016-07-10 22:06:48 -04:00
David Dormagen 6524136c9d inventory: collect directly into pushed lorry when using Shift
As suggested by Dmyst: http://forum.openclonk.org/topic_show.pl?pid=32169#pid32169
2016-06-22 09:53:52 +02:00
Maikel de Vries 08668ef988 do not reset last item for quick switch when selecting same slot twice 2016-04-27 21:15:37 +02:00
Lukas Werling 11904c0217 Fix Q doing nothing initially
Both the initial “selected” and “last” inventory slots were initialized
to 0, making Q useless. Many melees give more than one item to the
player, filling up from the first slot. Having Q switch to the second
slot initially is better than doing nothing, which will never happen
later on.
2016-04-27 19:02:54 +02:00
Maikel de Vries 06e8df86ca fix FacetBase typos 2016-04-22 23:27:33 +02:00
Lukas Werling 0afa589286 Replace all usage of "bool released" with "int status" 2016-03-21 18:45:42 +01:00
David Dormagen 77bdc8e841 disallow collection via shift when contained (#1677) 2016-02-10 18:12:09 +01:00
Sven Eberhardt 05b6ee2407 Remove unused library dummy graphics. 2016-01-10 11:59:55 -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
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
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 a78e1fc448 disallow collection of moving objects via shift (#1386) 2015-09-25 14:05:52 +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
Clonkonaut d98134332c Carry heavy objs draw special pickup symbol when holding Shift. 2015-09-11 01:08:54 +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
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
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 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
David Dormagen 7d1d70f017 removed NoCollectDelay from engine; it's now handled by script
Which allows a lot more fine-grained controls as all the control and UI stuff is now also in script anyway.
2015-03-26 12:23:20 +01:00
David Dormagen afbaf8c6aa contents menu: fix not being able to put stuff into f.e. construction sites by ignoring the OCF check when collecting; allow Clonks to take stuff out of containers even if hand is full 2014-02-28 22:19:30 +01:00
David Dormagen 0c23d1b9a6 reimplemented the action bar to use the custom GUIs
action bar now only shows shortly after hitting Interact
2013-05-26 14:59:19 +02:00
David Dormagen 00382611be fixed wrapping the hand position around when scrolling to the item before your first item 2013-05-24 23:24:33 +02:00
David Dormagen 04c8ad1cac removed CON_Collect (now collects only into empty slots)
fixed inventory shifting
2013-05-24 20:09:19 +02:00
David Dormagen 6c861f9165 removed the hold-number-and-click-mouse controls 2013-05-24 00:00:18 +02:00
David Dormagen c1d27bc3e9 mouse-wheel now scrolls through inventory (zoom is on shift+mouse-wheel) 2013-05-23 22:46:23 +02:00
David Dormagen 80ac9a9503 more one-hand cleanups 2012-12-29 14:08:53 +01:00
David Dormagen d7eb93be1b split ClonkControl.ocd into five libraries
Library_Inventory: handles slots and an arbitrary amount of hands, generic and not only Clonk-related
Library_InventoryControl: interactions between the user and the inventory
Library_CarryHeavyControl: interaction with carry-heavy-objects
Library_ClonkGamepadControl: gamepad-related stuff
Library_ClonkControl: general Clonk control library
2012-12-25 12:19:23 +01:00