Commit Graph

84 Commits (45444c0d6abce74f47272c3217d3d1bd2c2363f6)

Author SHA1 Message Date
David Dormagen 196f528201 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/FancyGridMenu.ocd/DefCore.txt
	planet/Objects.ocd/HUD.ocd/GridMenu.ocd/DefCore.txt
	planet/Objects.ocd/Helpers.ocd/Dummy.ocd/Graphics.png
	planet/Objects.ocd/Items.ocd/Tools.ocd/WindBag.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Javelin.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Flag.ocd/Marker.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Flagpole.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c
	src/game/C4Game.cpp
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/landscape/C4Landscape.cpp
2015-06-03 22:32:36 +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 379d189787 now always use on leftclick and throw on rightclick (drop if you click your Clonk or below); also removed some old references to the right mouse button (UseAlt) 2015-03-09 13:33:31 +01:00
Sven Eberhardt bcd821a786 Fix construction menu opened at wrong position. (#982).
It was always opened at the last mouse position of the owner of the hammer. Fixed it to use the controlling player instead.
2015-02-08 13:31:51 +01:00
Mark 850bf1b9d4 CreateObject/CreateObjectAbove (#1214)
Renamed CreateObject() to CreateObjectAbove() and replaced all occurrences in script files.
Added CreateObject(), the function may need a rewrite though, see comment in code.
Updated documentation
2015-01-11 19:02:03 +01:00
David Dormagen bc9697ab3a worked on making the order of items in the interaction menu and action bar more consistent; changed some minor things 2015-01-03 15:32:06 +01:00
David Dormagen d73799ab07 when a currently-used object is suddenly deleted, the usage is quickly cancelled (#899) 2014-12-25 18:04:19 +01:00
Maikel de Vries 856e37a360 fix c4script error in clonkcontrol library 2014-10-28 18:01:59 +01:00
Maikel de Vries 1d34c12431 fixed underwater dropping of second hand item (#1155) 2014-10-18 12:00:49 +02:00
David Dormagen 6a875a1b29 CustomGuis: renamed several script functions to be more consistent; removed Gui_AddMargin as it is obsolete
All calls that reference an existing Gui window now start with "GuiUpdate" (exception: GuiClose). All other functions are always to be called DURING menu creation and layouting.
The "Margin" property replaces Gui_AddMargin.

find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiOpen/GuiOpen/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiClose/GuiClose/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiSetTag/GuiUpdateTag/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiUpdate/GuiUpdate/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/Gui_AddCloseButton/GuiAddCloseButton/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/Gui_UpdateText/GuiUpdateText/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/Gui_AddSubwindow/GuiAddSubwindow/g'
2014-10-11 11:51:26 +02:00
Sven Eberhardt fe59448c5d Reset cursor view on UnGrab control.
This is to reset the view e.g. after controlling a switch.
2014-10-03 22:34:35 +02:00
Sven Eberhardt 6766ac1526 Prevent NPCs from accidentally collecting things. 2014-09-21 16:18:43 +02:00
David Dormagen 89878f64ab Clonks can now exit things and do both interactions if an object can be grabbed and entered 2014-03-31 20:46:51 +02:00
David Dormagen 0da9293686 allow Clonk::SetMenu to also take a custom GUI ID; cleaned up some menu-related mess (like not handling unclosable menus correctly) 2014-02-26 12:03:27 +01:00
David Dormagen 6d3c42b5b1 added callbacks QueryRejectDeselection and QueryRejectDeparture
removed internal variable Clonk.inventory.forced_ejection (hand never selects next item when throwing now)
2014-02-15 14:32:53 +01:00
David Dormagen 6a04337f7c intermediate changes [TO AMMEND] 2014-02-15 14:32:42 +01:00
Sven Eberhardt f12fe2a24a Call MaxContentsCount using this->MaxContentsCount() to allow runtime overload 2013-12-30 13:46:34 +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 2bf88cea5f Clonks' max contents count reduced from 7 to 5 2013-05-24 23:22:16 +02:00
David Dormagen e6487533c2 added first version of object information dialogue on right-click 2013-01-30 21:27:09 +01:00
David Dormagen 299cc7e478 when not able to execute an Use-command (f.e. shield when not walking), the command is remembered and executed when possible 2012-12-29 18:42:19 +01: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
David Dormagen bc4fd5f9ed merged master into Controls 2012-12-23 15:17:23 +01:00
Bernhard Bonigl 1011c858cc Introduce QuickSwitch on Q (or Apostrophe for Dvorak)
QuickSwitch changes the current selection of the Inventory to the last selected one.
2012-10-07 15:44:01 +02:00
Bernhard Bonigl 89b035d35e Reduce the Clonks hand-slots to 1.
That means the clonk can only have 1 active item now. The old 2-hand-stuff still
exists and can easily be activated through an appendto for scenarios etc.
2012-10-07 15:12:36 +02:00
David Dormagen 96ac1c6f0d Clonks do not collect stuff when inside a container (f.e. a respawn-helper-object) 2012-10-27 16:34:19 +02:00
Tobias Zwick a2d55ceecc fix #436: throw objects into walls 2012-10-22 00:11:24 +02:00
Tobias Zwick 5ad59e3a59 fix #821: Can't release lorry 2012-10-21 21:49:37 +02:00
Tobias Zwick 7498d0bb51 clonk can drop items in the water, similarly to how it worked in CR 2012-10-20 19:32:16 +02:00
Sven Eberhardt 8bd2beb164 Increase Clonk collection radius downwards (#810) 2012-10-13 18:47:31 +02:00
David Dormagen 45eb8e16e5 added some zero-pointer safeties after calls to OnSlotFull 2012-06-21 23:40:27 +02:00
David Dormagen a7a16e1f5b clonk control: zero pointer safety, check whether menu exist after trying to create it 2012-06-17 21:37:13 +02:00
Bernhard Bonigl 0729c4577f Fixed Non-Inventory-Contents(CarryHeavy) using up Space in the ContentsMenu (#778) 2012-05-13 20:37:44 +02:00
Bernhard Bonigl c601231960 Added Interaction for flipping construction sites during placement 2012-05-08 20:27:24 +02:00
Bernhard Bonigl 43deb1fc37 Extra-Interactions can now be placed at every position in the actionbar 2012-05-08 20:26:50 +02:00
Bernhard Bonigl 90fdc232fa InteractionBar now can display additional interactions from the Clonk via GetExtraInteractions callback.
Also moved carryheavy-dropping from hardcoded to that callback.
2012-05-07 22:57:52 +02:00
Bernhard Bonigl 6a885d33aa Fixed incorrect Selection call to selected item when switching left and right hand.
Sometimes also caused errors.
2012-05-06 18:24:56 +02:00
Bernhard Bonigl 5ae4496d7f Clonk now aborts usage if a related inventory-slot is changed. (e.g. when aiming the bow) 2012-04-29 16:26:32 +02:00
Bernhard Bonigl 56809d9e43 Fixed a carryheavy-bug with Collect(x,x, pos) 2012-04-29 15:05:29 +02:00
Bernhard Bonigl b52dafc7b2 Cleaned up ClonkControls a bit and added more Comments.
Removed unused function HUDShowItems
2012-04-22 18:44:28 +02:00
Bernhard Bonigl 9da6d67c80 Space now also closes menus 2012-04-14 22:53:36 +02:00
Bernhard Bonigl b4fb51249e Controls now tries to handle first actionbar-item before using hardcoded behaviour on pressing Space 2012-04-14 18:41:56 +02:00
Bernhard Bonigl deec6a902a Fixed Bug with CarryHeavy-Display and reaction 2012-04-14 16:51:30 +02:00
Bernhard Bonigl 0bac82bcc3 Fixd UI-Updates with CarryHeavy on Clonk-Selection
Added CarryHeavy to the Contentsmenu
2012-04-13 20:24:41 +02:00
Bernhard Bonigl 9a4295f745 Fixed beeing able to drop carryheavy in non-walk 2012-04-13 17:49:09 +02:00
Bernhard Bonigl de3e9ed9aa Fixed Carryheavy-Animation bugs
Re-enabled beeing able to grab stuff with carryheavy
2012-04-08 01:43:15 +02:00
Bernhard Bonigl 45cf4ff147 Reworked Carryheavy:
* It doesn't need inventory-slots
* It has HUD-Support
* It has a drop-button in the interaction bar
2012-04-07 23:31:59 +02:00
Felix Wagner b8be22d9e3 Uncloseable menu for weapon chooser. 2012-04-03 14:51:38 +01:00
Felix Wagner bf795164f2 Resolved all warnings due to global function in included scripts. 2012-04-03 02:12:44 +01:00